HTML to reproduce the bug; https://skoji.jp/get-client-rects-extremely-slow.html getClientRects is extremeley slow with this sambple on iPad OS 16.1 compared to iPadOS 13.7 or iPadOS 14.5. The result of sample above: * (Simulator) iPad Pro (12.9-inch 4th gen)/ iPadOS 13.7 : 541 msec * (Simulator) iPad Pro (12.9-inch 5th gen)/ iPadOS 14.5 : 1629 msec * (Simulator) iPad Pro (12.9-inch 5th gen)/ iPadOS 16.1 : 46384 msec * iPad 7th generation / iPadOS 15.5 : 25274 msec * iPad Pro (11-inch) 2nd generation : 17811 msec
<rdar://problem/102197839>
Lots of time under: + 2096 WebCore::RenderText::absoluteQuadsForRange(unsigned int, unsigned int, bool, bool, bool*) const (in WebCore) + 669 [0x345bacfed] + ! 2095 WebCore::InlineIterator::TextBox::selectionRect(unsigned int, unsigned int) const (in WebCore) + 909 [0x34558019d] + ! : 2087 WebCore::FontCascade::adjustSelectionRectForComplexText(WebCore::TextRun const&, WebCore::LayoutRect&, unsigned int, unsigned int) const (in WebCore) + 69 [0x345862615] + ! : | 1986 WebCore::ComplexTextController::ComplexTextController(WebCore::FontCascade const&, WebCore::TextRun const&, bool, WTF::HashSet<WebCore::Font const*, WTF::DefaultHash<WebCore::Font const*>, WTF::HashTraits<WebCore::Font const*>, WTF::HashTableTraits>*, bool) (in WebCore) + 1620 [0x34584a004] + ! : | + 1982 WebCore::ComplexTextController::collectComplexTextRunsForCharacters(char16_t const*, unsigned int, unsigned int, WebCore::Font const*) (in WebCore) + 253 [0x3449586bd] + ! : | + ! 1982 CTTypesetterCreateWithUniCharProviderAndOptions (in CoreText) + 112 [0x7ff807e9ebf8]