REGRESSION(r224535): Can't write reviews in the App Store
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jan 2018 18:48:42 +0000 (18:48 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jan 2018 18:48:42 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181936
<rdar://problem/36670246>

Reviewed by Zalan Bujtas.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::updateStyleForLayout):

r224535 was about media queries but it also removed a seemingly spurious call to SyleScope::didChangeStyleSheetEnvironment
from the path that does not involve media queries.
Turns out UITextContentView somehow depended on it, so revert this specific change.

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

Source/WebCore/ChangeLog
Source/WebCore/page/LayoutContext.cpp

index 1473109..99d56e6 100644 (file)
@@ -1,3 +1,18 @@
+2018-01-22  Antti Koivisto  <antti@apple.com>
+
+        REGRESSION(r224535): Can't write reviews in the App Store
+        https://bugs.webkit.org/show_bug.cgi?id=181936
+        <rdar://problem/36670246>
+
+        Reviewed by Zalan Bujtas.
+
+        * page/LayoutContext.cpp:
+        (WebCore::LayoutContext::updateStyleForLayout):
+
+        r224535 was about media queries but it also removed a seemingly spurious call to SyleScope::didChangeStyleSheetEnvironment
+        from the path that does not involve media queries.
+        Turns out UITextContentView somehow depended on it, so revert this specific change.
+
 2018-01-22  Brady Eidson  <beidson@apple.com>
 
         In WebKit2, make the MessagePortChannelRegistry live in the UI process.
index ce7c3b3..bce90df 100644 (file)
@@ -482,6 +482,11 @@ void LayoutContext::applyTextSizingIfNeeded(RenderElement& layoutRoot)
 void LayoutContext::updateStyleForLayout()
 {
     Document& document = *frame().document();
+
+    // FIXME: This shouldn't be necessary, but see rdar://problem/36670246.
+    if (!document.styleScope().resolverIfExists())
+        document.styleScope().didChangeStyleSheetEnvironment();
+
     // Viewport-dependent media queries may cause us to need completely different style information.
     document.styleScope().evaluateMediaQueriesForViewportChange();