Changeset 269848 in webkit
- Timestamp:
- Nov 16, 2020 4:29:26 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269847 r269848 1 2020-11-16 Andres Gonzalez <andresg_22@apple.com> 2 3 Optimization for AccessibilityNodeObject::accessibilityDescription. 4 https://bugs.webkit.org/show_bug.cgi?id=218959 5 6 Reviewed by Darin Adler. 7 8 No change in functionality, optimization. 9 10 AccessibilityObject::title() can be an expensive operations because it 11 can invoke textUnderElement which causes text extraction for all 12 descendants of the object. Thus, rewrote this snippet in a more 13 efficient way. 14 15 * accessibility/AccessibilityNodeObject.cpp: 16 (WebCore::AccessibilityNodeObject::accessibilityDescription const): 17 1 18 2020-11-16 Youenn Fablet <youenn@apple.com> 2 19 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r266026 r269848 1636 1636 // The title attribute is normally used as help text (because it is a tooltip), but if there is nothing else available, this should be used (according to ARIA). 1637 1637 // https://bugs.webkit.org/show_bug.cgi?id=170475: An exception is when the element is semantically unimportant. In those cases, title text should remain as help text. 1638 if (title().isEmpty() && !roleIgnoresTitle()) 1639 return getAttribute(titleAttr); 1638 if (!roleIgnoresTitle()) { 1639 // title() can be an expensive operation because it can invoke textUnderElement for all descendants. Thus call it last. 1640 auto titleAttribute = getAttribute(titleAttr); 1641 if (!titleAttribute.isEmpty() && title().isEmpty()) 1642 return titleAttribute; 1643 } 1640 1644 1641 1645 return String();
Note: See TracChangeset
for help on using the changeset viewer.