Diff
Modified: trunk/LayoutTests/ChangeLog (230932 => 230933)
--- trunk/LayoutTests/ChangeLog 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/LayoutTests/ChangeLog 2018-04-24 00:13:16 UTC (rev 230933)
@@ -1,3 +1,15 @@
+2018-04-23 Antti Koivisto <an...@apple.com>
+
+ REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
+ https://bugs.webkit.org/show_bug.cgi?id=182859
+ <rdar://problem/37595065>
+
+ Reviewed by Zalan Bujtas
+
+ * fast/frames/flattening/media-query-growing-content-expected.txt: Removed.
+ * fast/frames/flattening/media-query-growing-content.html: Removed.
+ * fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Removed.
+
2018-04-23 Daniel Bates <daba...@apple.com>
Implement Same-Site cookies
Deleted: trunk/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt (230932 => 230933)
--- trunk/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/LayoutTests/fast/frames/flattening/media-query-growing-content-expected.txt 2018-04-24 00:13:16 UTC (rev 230933)
@@ -1,2 +0,0 @@
-
-
Deleted: trunk/LayoutTests/fast/frames/flattening/media-query-growing-content.html (230932 => 230933)
--- trunk/LayoutTests/fast/frames/flattening/media-query-growing-content.html 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/LayoutTests/fast/frames/flattening/media-query-growing-content.html 2018-04-24 00:13:16 UTC (rev 230933)
@@ -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: trunk/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html (230932 => 230933)
--- trunk/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/LayoutTests/fast/frames/flattening/resources/media-query-min-height-with-flattening.html 2018-04-24 00:13:16 UTC (rev 230933)
@@ -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: trunk/Source/WebCore/ChangeLog (230932 => 230933)
--- trunk/Source/WebCore/ChangeLog 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/Source/WebCore/ChangeLog 2018-04-24 00:13:16 UTC (rev 230933)
@@ -1,3 +1,24 @@
+2018-04-23 Antti Koivisto <an...@apple.com>
+
+ REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
+ https://bugs.webkit.org/show_bug.cgi?id=182859
+ <rdar://problem/37595065>
+
+ Reviewed by Zalan Bujtas.
+
+ Roll out this change from the trunk as the issue it fixed no longer occurs.
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::orientationEvaluate):
+ (WebCore::aspectRatioEvaluate):
+ (WebCore::heightEvaluate):
+ (WebCore::widthEvaluate):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layoutSizeForMediaQuery const): Deleted.
+ * page/FrameView.h:
+ * page/LayoutContext.cpp:
+ (WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
+
2018-04-23 Daniel Bates <daba...@apple.com>
Another attempt to fix the Windows build following r230921
Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (230932 => 230933)
--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2018-04-24 00:13:16 UTC (rev 230933)
@@ -335,20 +335,22 @@
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();
bool result;
- if (viewSize.width() > viewSize.height()) // Square viewport is portrait.
+ if (width > height) // Square viewport is portrait.
result = keyword == CSSValueLandscape;
else
result = keyword == CSSValuePortrait;
- LOG_WITH_STREAM(MediaQueries, stream << " orientationEvaluate: view size " << viewSize.width() << "x" << viewSize.height() << " is " << value->cssText() << ": " << result);
+ LOG_WITH_STREAM(MediaQueries, stream << " orientationEvaluate: view size " << width << "x" << height << " is " << value->cssText() << ": " << result);
return result;
}
@@ -361,9 +363,8 @@
FrameView* view = frame.view();
if (!view)
return true;
- auto viewSize = view->layoutSizeForMediaQuery();
- bool result = compareAspectRatioValue(value, viewSize.width(), viewSize.height(), op);
- LOG_WITH_STREAM(MediaQueries, stream << " aspectRatioEvaluate: " << op << " " << aspectRatioValueAsString(value) << " actual view size " << viewSize << ": " << result);
+ bool result = compareAspectRatioValue(value, view->layoutWidth(), view->layoutHeight(), op);
+ LOG_WITH_STREAM(MediaQueries, stream << " aspectRatioEvaluate: " << op << " " << aspectRatioValueAsString(value) << " actual view size " << view->layoutWidth() << "x" << view->layoutHeight() << " : " << result);
return result;
}
@@ -495,7 +496,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())
@@ -515,7 +516,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: trunk/Source/WebCore/page/FrameView.cpp (230932 => 230933)
--- trunk/Source/WebCore/page/FrameView.cpp 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/Source/WebCore/page/FrameView.cpp 2018-04-24 00:13:16 UTC (rev 230933)
@@ -5092,10 +5092,5 @@
{
return renderView() && renderView()->shouldPlaceBlockDirectionScrollbarOnLeft();
}
-
-IntSize FrameView::layoutSizeForMediaQuery() const
-{
- return m_frameFlatteningViewSizeForMediaQuery.value_or(ScrollView::layoutSize());
-}
-
+
} // namespace WebCore
Modified: trunk/Source/WebCore/page/FrameView.h (230932 => 230933)
--- trunk/Source/WebCore/page/FrameView.h 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/Source/WebCore/page/FrameView.h 2018-04-24 00:13:16 UTC (rev 230933)
@@ -209,7 +209,6 @@
bool shouldUpdate() const;
WEBCORE_EXPORT void adjustViewSize();
- IntSize layoutSizeForMediaQuery() const;
WEBCORE_EXPORT void setViewportSizeForCSSViewportUnits(IntSize);
IntSize viewportSizeForCSSViewportUnits() const;
@@ -779,8 +778,6 @@
void removeFromAXObjectCache();
void notifyWidgets(WidgetNotification);
- void setFrameFlatteningViewSizeForMediaQuery() { m_frameFlatteningViewSizeForMediaQuery = layoutSize(); }
- bool frameFlatteningViewSizeForMediaQueryIsSet() const { return m_frameFlatteningViewSizeForMediaQuery.has_value(); }
RenderElement* viewportRenderer() const;
void willDoLayout(WeakPtr<RenderElement> layoutRoot);
@@ -888,8 +885,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;
Modified: trunk/Source/WebCore/page/LayoutContext.cpp (230932 => 230933)
--- trunk/Source/WebCore/page/LayoutContext.cpp 2018-04-23 23:56:27 UTC (rev 230932)
+++ trunk/Source/WebCore/page/LayoutContext.cpp 2018-04-24 00:13:16 UTC (rev 230933)
@@ -509,10 +509,6 @@
if (!view().isInChildFrameWithFrameFlattening())
return false;
- if (!view().frameFlatteningViewSizeForMediaQueryIsSet()) {
- LOG_WITH_STREAM(MediaQueries, stream << "FrameView " << this << " snapshotting size " << view().layoutSize() << " for media queries");
- view().setFrameFlatteningViewSizeForMediaQuery();
- }
startLayoutAtMainFrameViewIfNeeded();
auto* layoutRoot = subtreeLayoutRoot() ? subtreeLayoutRoot() : frame().document()->renderView();
return !layoutRoot || !layoutRoot->needsLayout();