isEditablePosition shouldn't trigger synchronous layout
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 21:56:27 +0000 (21:56 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 21:56:27 +0000 (21:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129026

Reviewed by Brent Fulgham.

Just trigger style recalc instead.

* editing/htmlediting.cpp:
(WebCore::isEditablePosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/editing/htmlediting.cpp

index 60bbbb75c5cd68f3169a9d0c9b91fc6d477ec308..f5b90ef1271e6922e99d1496c4ace0771c8a6c54 100644 (file)
@@ -1,3 +1,15 @@
+2014-02-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        isEditablePosition shouldn't trigger synchronous layout
+        https://bugs.webkit.org/show_bug.cgi?id=129026
+
+        Reviewed by Brent Fulgham.
+
+        Just trigger style recalc instead.
+
+        * editing/htmlediting.cpp:
+        (WebCore::isEditablePosition):
+
 2014-02-19  Beth Dakin  <bdakin@apple.com>
 
         UIProcess needs to know the color of the page's extended background
index d7a9293e254f5d74b7f7a1b630a63040589aa287..3b7276572d43743cd75bbd9c76f968000512c204 100644 (file)
@@ -146,13 +146,13 @@ bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
     if (!node)
         return false;
     if (updateStyle == UpdateStyle)
-        node->document().updateLayoutIgnorePendingStylesheets();
+        node->document().updateStyleIfNeeded();
     else
         ASSERT(updateStyle == DoNotUpdateStyle);
 
     if (node->renderer() && node->renderer()->isTable())
         node = node->parentNode();
-    
+
     return node->hasEditableStyle(editableType);
 }