<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Aug 2013 01:31:34 +0000 (01:31 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Aug 2013 01:31:34 +0000 (01:31 +0000)
commit062445bff27c0006501c1dfedf58ac1f5f1fe677
treebba4789c81d04b19a7d624b5773395f8b5230055
parent10b82df0eafbaae3dccaeb61f3bd3bbee8db5357
<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable

Reviewed by Benjamin Poulain.

Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
the first root editable element exactly once.

* dom/Node.cpp:
(WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
when we don't have to check RenderStyle's value.
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Node.cpp
Source/WebCore/editing/htmlediting.cpp