<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call...
[WebKit-https.git] / Source / WebCore / ChangeLog
index db41f14bcfa7b7d2b6e34f3c5bca3b4248881fd9..45dac44450ad432d619fdd81821140c3a7fbbbf4 100644 (file)
@@ -1,3 +1,18 @@
+2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
+
+        <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):
+
 2013-08-16  Benjamin Poulain  <benjamin@webkit.org>
 
         Remove a useless #include of SelectorChecker.h