Title: [220738] branches/safari-604.1.38.0-branch

Diff

Modified: branches/safari-604.1.38.0-branch/LayoutTests/ChangeLog (220737 => 220738)


--- branches/safari-604.1.38.0-branch/LayoutTests/ChangeLog	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/LayoutTests/ChangeLog	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1,3 +1,7 @@
+2017-08-14  Jason Marcell  <[email protected]>
+
+        Revert r220112. rdar://problem/33890629
+
 2017-08-14  Matt Lewis  <[email protected]>
 
          Unreviwed test gardening. <rdar://problem/33831603>

Deleted: branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt (220737 => 220738)


--- branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1,2 +0,0 @@
-
-

Deleted: branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content.html (220737 => 220738)


--- branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content.html	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/media-query-growing-content.html	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>This tests that media query can't get into an ever-growing cycle.</title>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-if (window.internals)
-    internals.settings.setFrameFlattening("FullyEnabled");
-
-function runTest() {
-    if (window.testRunner) {
-        testRunner.waitUntilDone();
-        setTimeout(function() {
-            testRunner.notifyDone();
-        }, 50);
-    }
-}
-</script>
-</head>
-<body>
-<iframe _onload_="runTest()" src=""
-<div id=testResult></div>
-</body>
-</html>

Deleted: branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html (220737 => 220738)


--- branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1,34 +0,0 @@
-<style>
-    div {
-        width: 200px;
-        height: 600px;
-    }
-</style>
-<div id=growingDiv></div>
-<script>
-var counter = 0;
-window.matchMedia('(min-height: 200px)').addListener(function(changed) {
-    ++counter;
-    setTimeout(function() {
-        growingDiv.innerText = growingDiv.innerText + ' media query callback ';
-        parent.document.getElementById("testResult").innerText = counter;
-    }, 0);
-});
-
-window.matchMedia('(min-width: 600px)').addListener(function(changed) {
-    ++counter;
-    setTimeout(function() {
-        growingDiv.innerText = growingDiv.innerText + ' media query callback ';
-        parent.document.getElementById("testResult").innerText = counter;
-    }, 0);
-});
-
-window.matchMedia('(min-aspect-ratio: 1/1)').addListener(function(changed) {
-    ++counter;
-    setTimeout(function() {
-        growingDiv.innerText = growingDiv.innerText + ' media query callback ';
-        parent.document.getElementById("testResult").innerText = counter;
-    }, 0);
-});
-
-</script>
\ No newline at end of file

Modified: branches/safari-604.1.38.0-branch/Source/WebCore/ChangeLog (220737 => 220738)


--- branches/safari-604.1.38.0-branch/Source/WebCore/ChangeLog	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/Source/WebCore/ChangeLog	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1,3 +1,7 @@
+2017-08-14  Jason Marcell  <[email protected]>
+
+        Revert r220112. rdar://problem/33890629
+
 2017-08-09  Jason Marcell  <[email protected]>
 
         Cherry-pick r220459. rdar://problem/33820787

Modified: branches/safari-604.1.38.0-branch/Source/WebCore/css/MediaQueryEvaluator.cpp (220737 => 220738)


--- branches/safari-604.1.38.0-branch/Source/WebCore/css/MediaQueryEvaluator.cpp	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/Source/WebCore/css/MediaQueryEvaluator.cpp	2017-08-15 06:51:45 UTC (rev 220738)
@@ -304,14 +304,16 @@
     if (!view)
         return false;
 
-    auto viewSize = view->layoutSizeForMediaQuery();
+    auto width = view->layoutWidth();
+    auto height = view->layoutHeight();
+
     if (!is<CSSPrimitiveValue>(value)) {
         // _expression_ (orientation) evaluates to true if width and height >= 0.
-        return viewSize.height() >= 0 && viewSize.width() >= 0;
+        return height >= 0 && width >= 0;
     }
 
     auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
-    if (viewSize.width() > viewSize.height()) // Square viewport is portrait.
+    if (width > height) // Square viewport is portrait.
         return keyword == CSSValueLandscape;
     return keyword == CSSValuePortrait;
 }
@@ -322,11 +324,12 @@
     // assume if we have a device, its aspect ratio is non-zero
     if (!value)
         return true;
+
     FrameView* view = frame.view();
     if (!view)
         return true;
-    auto viewSize = view->layoutSizeForMediaQuery();
-    return compareAspectRatioValue(value, viewSize.width(), viewSize.height(), op);
+
+    return compareAspectRatioValue(value, view->layoutWidth(), view->layoutHeight(), op);
 }
 
 static bool deviceAspectRatioEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix op)
@@ -442,7 +445,7 @@
     FrameView* view = frame.view();
     if (!view)
         return false;
-    int height = view->layoutSizeForMediaQuery().height();
+    int height = view->layoutHeight();
     if (!value)
         return height;
     if (auto* renderView = frame.document()->renderView())
@@ -456,7 +459,7 @@
     FrameView* view = frame.view();
     if (!view)
         return false;
-    int width = view->layoutSizeForMediaQuery().width();
+    int width = view->layoutWidth();
     if (!value)
         return width;
     if (auto* renderView = frame.document()->renderView())

Modified: branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.cpp (220737 => 220738)


--- branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.cpp	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.cpp	2017-08-15 06:51:45 UTC (rev 220738)
@@ -1316,8 +1316,6 @@
     bool inChildFrameLayoutWithFrameFlattening = isInChildFrameWithFrameFlattening();
 
     if (inChildFrameLayoutWithFrameFlattening) {
-        if (!m_frameFlatteningViewSizeForMediaQuery)
-            m_frameFlatteningViewSizeForMediaQuery = ScrollView::layoutSize();
         startLayoutAtMainFrameViewIfNeeded(allowSubtree);
         RenderElement* root = m_layoutRoot ? m_layoutRoot : frame().document()->renderView();
         if (!root || !root->needsLayout())
@@ -1372,10 +1370,13 @@
             // FIXME: This instrumentation event is not strictly accurate since cached media query results do not persist across StyleResolver rebuilds.
             InspectorInstrumentation::mediaQueryResultChanged(document);
         }
+        
         document.evaluateMediaQueryList();
+
         // If there is any pagination to apply, it will affect the RenderView's style, so we should
         // take care of that now.
         applyPaginationToViewport();
+
         // Always ensure our style info is up-to-date. This can happen in situations where
         // the layout beats any sort of style recalc update that needs to occur.
         document.updateStyleIfNeeded();
@@ -5385,10 +5386,5 @@
 {
     return renderView() && renderView()->shouldPlaceBlockDirectionScrollbarOnLeft();
 }
-
-IntSize FrameView::layoutSizeForMediaQuery() const
-{
-    return m_frameFlatteningViewSizeForMediaQuery.value_or(ScrollView::layoutSize());
-}
-
+    
 } // namespace WebCore

Modified: branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.h (220737 => 220738)


--- branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.h	2017-08-15 06:45:44 UTC (rev 220737)
+++ branches/safari-604.1.38.0-branch/Source/WebCore/page/FrameView.h	2017-08-15 06:51:45 UTC (rev 220738)
@@ -216,8 +216,7 @@
     bool shouldUpdate() const;
 
     WEBCORE_EXPORT void adjustViewSize();
-    IntSize layoutSizeForMediaQuery() const;
-
+    
     WEBCORE_EXPORT void setViewportSizeForCSSViewportUnits(IntSize);
     IntSize viewportSizeForCSSViewportUnits() const;
     
@@ -882,8 +881,6 @@
     int m_autoSizeFixedMinimumHeight;
     // The intrinsic content size decided by autosizing.
     IntSize m_autoSizeContentSize;
-    // Report the first computed frame view size to media queries.
-    std::optional<IntSize> m_frameFlatteningViewSizeForMediaQuery;
 
     std::unique_ptr<ScrollableAreaSet> m_scrollableAreas;
     std::unique_ptr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to