Diff
Modified: trunk/LayoutTests/ChangeLog (232858 => 232859)
--- trunk/LayoutTests/ChangeLog 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/LayoutTests/ChangeLog 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1,3 +1,16 @@
+2018-06-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r232823.
+
+ This caused both test timeouts and api failures.
+
+ Reverted changeset:
+
+ "[Mail] Use the Mail Viewer width as the base for resolving
+ horizontal viewport units"
+ https://bugs.webkit.org/show_bug.cgi?id=186585
+ https://trac.webkit.org/changeset/232823
+
2018-06-14 Nan Wang <[email protected]>
AX: Crash in AccessibilityNodeObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const + 536
Deleted: trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit-expected.txt (232858 => 232859)
--- trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit-expected.txt 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit-expected.txt 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1,2 +0,0 @@
-
-2000px 1000px 200px 0px
Deleted: trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit.html (232858 => 232859)
--- trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit.html 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/LayoutTests/fast/dynamic/mail-autosize-viewport-unit.html 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>This tests that autosize uses the min-width as the base for resolving viewport unit values</title>
-<style>
-#w100 {
- width: 100vw;
- height: 10px;
-}
-
-#w50 {
- width: 50vw;
- height: 10px;
-}
-
-#w10 {
- width: 10vw;
- height: 10px;
-}
-
-#w0 {
- width: 0vw;
- height: 10px;
-}
-</style>
-<script>
-if (window.internals)
- internals.enableAutoSizeMode(true, 2000, 600, 4000, 1000);
-
-if (window.testRunner)
- testRunner.dumpAsText();
-</script>
-</head>
-<body>
-<div id=w100></div>
-<div id=w50></div>
-<div id=w10></div>
-<div id=w0></div>
-<img src="" width=3000px height=100px>
-<pre id=result></pre>
-<script>
-document.body.offsetWidth;
-result.textContent = window.getComputedStyle(w100, null).getPropertyValue("width") + " "
- + window.getComputedStyle(w50, null).getPropertyValue("width") + " "
- + window.getComputedStyle(w10, null).getPropertyValue("width") + " "
- + window.getComputedStyle(w0, null).getPropertyValue("width");
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (232858 => 232859)
--- trunk/LayoutTests/platform/ios/TestExpectations 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2018-06-14 23:53:40 UTC (rev 232859)
@@ -3305,6 +3305,3 @@
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-115.html [ ImageOnlyFailure ]
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/i18n/css3-text-line-break-opclns-116.html [ ImageOnlyFailure ]
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-006.html [ ImageOnlyFailure ]
-
-# unsupported
-fast/dynamic/mail-autosize-viewport-unit.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (232858 => 232859)
--- trunk/Source/WebCore/ChangeLog 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/Source/WebCore/ChangeLog 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1,3 +1,16 @@
+2018-06-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r232823.
+
+ This caused both test timeouts and api failures.
+
+ Reverted changeset:
+
+ "[Mail] Use the Mail Viewer width as the base for resolving
+ horizontal viewport units"
+ https://bugs.webkit.org/show_bug.cgi?id=186585
+ https://trac.webkit.org/changeset/232823
+
2018-06-14 Nan Wang <[email protected]>
AX: Crash in AccessibilityNodeObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const + 536
Modified: trunk/Source/WebCore/page/FrameView.cpp (232858 => 232859)
--- trunk/Source/WebCore/page/FrameView.cpp 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/Source/WebCore/page/FrameView.cpp 2018-06-14 23:53:40 UTC (rev 232859)
@@ -190,6 +190,7 @@
, m_useCustomFixedPositionLayoutRect(false)
, m_useCustomSizeForResizeEvent(false)
#endif
+ , m_hasOverrideViewportSize(false)
, m_shouldAutoSize(false)
, m_inAutoSize(false)
, m_didRunAutosize(false)
@@ -4374,13 +4375,9 @@
setNeedsLayout();
layoutContext().scheduleLayout();
- if (m_shouldAutoSize) {
- // We should consider overriding the height as well. See webkit.org/b/186586
- overrideViewportSizeForCSSViewportUnits({ minSize.width(), std::nullopt });
+ if (m_shouldAutoSize)
return;
- }
- clearViewportSizeOverrideForCSSViewportUnits();
// Since autosize mode forces the scrollbar mode, change them to being auto.
setVerticalScrollbarLock(false);
setHorizontalScrollbarLock(false);
@@ -5091,57 +5088,30 @@
if (auto* page = frame().page())
page->pageOverlayController().didChangeViewExposedRect();
}
-
-void FrameView::clearViewportSizeOverrideForCSSViewportUnits()
-{
- if (!m_overrideViewportSize)
- return;
-
- m_overrideViewportSize = std::nullopt;
- if (auto* document = frame().document())
- document->styleScope().didChangeStyleSheetEnvironment();
-}
-
+
void FrameView::setViewportSizeForCSSViewportUnits(IntSize size)
{
- overrideViewportSizeForCSSViewportUnits({ size.width(), size.height() });
-}
-
-void FrameView::overrideViewportSizeForCSSViewportUnits(OverrideViewportSize size)
-{
- if (m_overrideViewportSize && *m_overrideViewportSize == size)
+ if (m_hasOverrideViewportSize && m_overrideViewportSize == size)
return;
-
+
m_overrideViewportSize = size;
-
- if (auto* document = frame().document())
+ m_hasOverrideViewportSize = true;
+
+ if (Document* document = frame().document())
document->styleScope().didChangeStyleSheetEnvironment();
}
-
+
IntSize FrameView::viewportSizeForCSSViewportUnits() const
{
- OverrideViewportSize viewportSize;
+ if (m_hasOverrideViewportSize)
+ return m_overrideViewportSize;
- if (m_overrideViewportSize) {
- viewportSize = *m_overrideViewportSize;
- // auto-size overrides the width only, so we can't always bail out early here.
- if (viewportSize.width && viewportSize.height)
- return { *viewportSize.width, *viewportSize.height };
- }
-
- if (useFixedLayout()) {
- auto fixedLayoutSize = this->fixedLayoutSize();
- viewportSize.width = viewportSize.width.value_or(fixedLayoutSize.width());
- viewportSize.height = viewportSize.height.value_or(fixedLayoutSize.height());
- return { *viewportSize.width, *viewportSize.height };
- }
+ if (useFixedLayout())
+ return fixedLayoutSize();
// FIXME: the value returned should take into account the value of the overflow
// property on the root element.
- auto visibleContentSizeIncludingScrollbars = visibleContentRectIncludingScrollbars().size();
- viewportSize.width = viewportSize.width.value_or(visibleContentSizeIncludingScrollbars.width());
- viewportSize.height = viewportSize.height.value_or(visibleContentSizeIncludingScrollbars.height());
- return { *viewportSize.width, *viewportSize.height };
+ return visibleContentRectIncludingScrollbars().size();
}
bool FrameView::shouldPlaceBlockDirectionScrollbarOnLeft() const
Modified: trunk/Source/WebCore/page/FrameView.h (232858 => 232859)
--- trunk/Source/WebCore/page/FrameView.h 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/Source/WebCore/page/FrameView.h 2018-06-14 23:53:40 UTC (rev 232859)
@@ -211,9 +211,8 @@
WEBCORE_EXPORT void adjustViewSize();
WEBCORE_EXPORT void setViewportSizeForCSSViewportUnits(IntSize);
- void clearViewportSizeOverrideForCSSViewportUnits();
IntSize viewportSizeForCSSViewportUnits() const;
-
+
IntRect windowClipRect() const final;
WEBCORE_EXPORT IntRect windowClipRectForFrameOwner(const HTMLFrameOwnerElement*, bool clipToLayerContents) const;
@@ -783,14 +782,6 @@
void willDoLayout(WeakPtr<RenderElement> layoutRoot);
void didLayout(WeakPtr<RenderElement> layoutRoot);
- struct OverrideViewportSize {
- std::optional<int> width;
- std::optional<int> height;
-
- bool operator==(const OverrideViewportSize& rhs) const { return rhs.width == width && rhs.height == height; }
- };
- void overrideViewportSizeForCSSViewportUnits(OverrideViewportSize);
-
HashSet<Widget*> m_widgetsInRenderTree;
static MonotonicTime sCurrentPaintTimeStamp; // used for detecting decoded resource thrash in the cache
@@ -876,7 +867,8 @@
IntSize m_customSizeForResizeEvent;
#endif
- std::optional<OverrideViewportSize> m_overrideViewportSize;
+ IntSize m_overrideViewportSize;
+ bool m_hasOverrideViewportSize;
// If true, automatically resize the frame view around its content.
bool m_shouldAutoSize;
Modified: trunk/Tools/ChangeLog (232858 => 232859)
--- trunk/Tools/ChangeLog 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/Tools/ChangeLog 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1,3 +1,16 @@
+2018-06-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r232823.
+
+ This caused both test timeouts and api failures.
+
+ Reverted changeset:
+
+ "[Mail] Use the Mail Viewer width as the base for resolving
+ horizontal viewport units"
+ https://bugs.webkit.org/show_bug.cgi?id=186585
+ https://trac.webkit.org/changeset/232823
+
2018-06-14 Youenn Fablet <[email protected]>
TestWebKitAPI.WebKit.WKNavigationResponsePDFType fails after r232815
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (232858 => 232859)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-06-14 23:21:06 UTC (rev 232858)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-06-14 23:53:40 UTC (rev 232859)
@@ -1589,9 +1589,10 @@
// W3C SVG tests expect to be 480x360
bool isSVGW3CTest = (gTestRunner->testURL().find("svg/W3C-SVG-1.1") != string::npos);
- NSSize frameSize = isSVGW3CTest ? NSMakeSize(TestRunner::w3cSVGViewWidth, TestRunner::w3cSVGViewHeight) : NSMakeSize(TestRunner::viewWidth, TestRunner::viewHeight);
- [[mainFrame webView] setFrameSize:frameSize];
- [[mainFrame frameView] setFrame:NSMakeRect(0, 0, frameSize.width, frameSize.height)];
+ if (isSVGW3CTest)
+ [[mainFrame webView] setFrameSize:NSMakeSize(TestRunner::w3cSVGViewWidth, TestRunner::w3cSVGViewHeight)];
+ else
+ [[mainFrame webView] setFrameSize:NSMakeSize(TestRunner::viewWidth, TestRunner::viewHeight)];
}
static const char *methodNameStringForFailedTest()