Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChi...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jan 2015 03:45:01 +0000 (03:45 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jan 2015 03:45:01 +0000 (03:45 +0000)
commitfa92f2865936b1a5c494456498d615d5a8ae415c
treed759a3724e4f302b636f9c66f72e7664a04d5370
parent55c6d94c54dfdaa0cbf28796b39ee24309e0a863
Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
https://bugs.webkit.org/show_bug.cgi?id=140523
<rdar://problem/19464329>

Reviewed by Chris Dumez.

The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.

Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".

See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLElement.cpp