Changeset 178571 in webkit
- Timestamp:
- Jan 15, 2015, 7:45:01 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r178568 r178571 1 2015-01-15 Ryosuke Niwa <rniwa@webkit.org> 2 3 Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged 4 https://bugs.webkit.org/show_bug.cgi?id=140523 5 <rdar://problem/19464329> 6 7 Reviewed by Chris Dumez. 8 9 The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to 10 unset selfOrAncestorHasDirAutoAttribute flag while removing a child element. 11 12 Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since 13 we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0". 14 15 See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp. 16 17 * html/HTMLElement.cpp: 18 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): 19 1 20 2015-01-15 Brent Fulgham <bfulgham@apple.com> 2 21 -
trunk/Source/WebCore/html/HTMLElement.cpp
r177996 r178571 945 945 { 946 946 // FIXME: This function looks suspicious. 947 if (document().renderView() && (changeType == ElementRemoved || changeType == TextRemoved)) {948 Node* node = beforeChange ? beforeChange->nextSibling() : nullptr;949 for (; node; node = node->nextSibling()) {950 if (elementAffectsDirectionality(*node))951 continue;952 953 setHasDirAutoFlagRecursively(node, false);954 }955 }956 947 957 948 if (!selfOrAncestorHasDirAutoAttribute())
Note:
See TracChangeset
for help on using the changeset viewer.