Title: [244446] trunk

Diff

Modified: trunk/Source/WebCore/ChangeLog (244445 => 244446)


--- trunk/Source/WebCore/ChangeLog	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebCore/ChangeLog	2019-04-19 02:25:51 UTC (rev 244446)
@@ -1,3 +1,17 @@
+2019-04-18  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r244434.
+        https://bugs.webkit.org/show_bug.cgi?id=197089
+
+        caused 1 API test failure (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Regression (r244291): Broken API Test
+        AutoLayoutRenderingProgressRelativeOrdering"
+        https://bugs.webkit.org/show_bug.cgi?id=196948
+        https://trac.webkit.org/changeset/244434
+
 2019-04-18  Don Olmstead  <[email protected]>
 
         [CMake] Make WebCore headers copies

Modified: trunk/Source/WebCore/page/FrameView.cpp (244445 => 244446)


--- trunk/Source/WebCore/page/FrameView.cpp	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebCore/page/FrameView.cpp	2019-04-19 02:25:51 UTC (rev 244446)
@@ -631,8 +631,6 @@
         PageCache::singleton().markPagesForContentsSizeChanged(*page);
     }
     layoutContext().enableSetNeedsLayout();
-    if (m_shouldAutoSize)
-        m_autoSizeContentSize = size; 
 }
 
 void FrameView::adjustViewSize()
@@ -3465,6 +3463,7 @@
     resize(m_autoSizeConstraint.width(), m_autoSizeConstraint.height());
     document->updateStyleIfNeeded();
     document->updateLayoutIgnorePendingStylesheets();
+    m_autoSizeContentSize = contentsSize();
 
     auto finalWidth = std::max(m_autoSizeConstraint.width(), m_autoSizeContentSize.width());
     auto finalHeight = m_autoSizeFixedMinimumHeight ? std::max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()) : m_autoSizeContentSize.height();
@@ -4471,7 +4470,6 @@
 
     m_shouldAutoSize = enable;
     m_autoSizeConstraint = viewSize;
-    m_autoSizeContentSize = contentsSize();
     m_didRunAutosize = false;
 
     setNeedsLayoutAfterViewConfigurationChange();

Modified: trunk/Source/WebCore/page/FrameView.h (244445 => 244446)


--- trunk/Source/WebCore/page/FrameView.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebCore/page/FrameView.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -401,7 +401,6 @@
     bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; }
     WEBCORE_EXPORT void enableAutoSizeMode(bool enable, const IntSize& minSize);
     WEBCORE_EXPORT void setAutoSizeFixedMinimumHeight(int);
-    bool isAutoSizeEnabled() const { return m_shouldAutoSize; }
     IntSize autoSizingIntrinsicContentSize() const { return m_autoSizeContentSize; }
 
     WEBCORE_EXPORT void forceLayout(bool allowSubtreeLayout = false);

Modified: trunk/Source/WebKit/ChangeLog (244445 => 244446)


--- trunk/Source/WebKit/ChangeLog	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/ChangeLog	2019-04-19 02:25:51 UTC (rev 244446)
@@ -1,3 +1,17 @@
+2019-04-18  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r244434.
+        https://bugs.webkit.org/show_bug.cgi?id=197089
+
+        caused 1 API test failure (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Regression (r244291): Broken API Test
+        AutoLayoutRenderingProgressRelativeOrdering"
+        https://bugs.webkit.org/show_bug.cgi?id=196948
+        https://trac.webkit.org/changeset/244434
+
 2019-04-18  Wenson Hsieh  <[email protected]>
 
         Add new compatibility mode API on WKNavigation

Modified: trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -143,6 +143,7 @@
     virtual void updateAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const LayerTreeContext&) { }
 #if PLATFORM(COCOA)
     virtual void didUpdateGeometry() { }
+    virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&) { }
 
 #if PLATFORM(MAC)
     RunLoop::Timer<DrawingAreaProxy> m_viewExposedRectChangedTimer;

Modified: trunk/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/DrawingAreaProxy.messages.in	2019-04-19 02:25:51 UTC (rev 244446)
@@ -31,5 +31,6 @@
 #if PLATFORM(COCOA)
     // Used by TiledCoreAnimationDrawingAreaProxy.
     DidUpdateGeometry()
+    IntrinsicContentSizeDidChange(WebCore::IntSize newIntrinsicContentSize)
 #endif
 }

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-04-19 02:25:51 UTC (rev 244446)
@@ -5464,13 +5464,6 @@
     pageClient().didChangeContentSize(size);
 }
 
-void WebPageProxy::didChangeIntrinsicContentSize(const IntSize& intrinsicContentSize)
-{
-#if USE(APPKIT)
-    pageClient().intrinsicContentSizeDidChange(intrinsicContentSize);
-#endif
-}
-
 #if ENABLE(INPUT_TYPE_COLOR)
 void WebPageProxy::showColorPicker(const WebCore::Color& initialColor, const IntRect& elementRect, Vector<WebCore::Color>&& suggestions)
 {
@@ -7603,7 +7596,7 @@
 
 #if USE(APPKIT)
     if (m_viewLayoutSize.width() <= 0)
-        didChangeIntrinsicContentSize(IntSize(-1, -1));
+        intrinsicContentSizeDidChange(IntSize(-1, -1));
 #endif
 }
 

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -790,6 +790,7 @@
     NSView *inspectorAttachmentView();
     _WKRemoteObjectRegistry *remoteObjectRegistry();
 
+    void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
     CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
 #endif // PLATFORM(MAC)
 
@@ -1714,7 +1715,6 @@
     void didDestroyNotification(uint64_t notificationID);
 
     void didChangeContentSize(const WebCore::IntSize&);
-    void didChangeIntrinsicContentSize(const WebCore::IntSize&);
 
 #if ENABLE(INPUT_TYPE_COLOR)
     void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&, Vector<WebCore::Color>&&);

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in	2019-04-19 02:25:51 UTC (rev 244446)
@@ -88,7 +88,6 @@
     SetCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents)
 
     DidChangeContentSize(WebCore::IntSize newSize)
-    DidChangeIntrinsicContentSize(WebCore::IntSize newIntrinsicContentSize)
 
 #if ENABLE(INPUT_TYPE_COLOR)
     ShowColorPicker(WebCore::Color initialColor, WebCore::IntRect elementRect, Vector<WebCore::Color> suggestions);

Modified: trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -60,6 +60,7 @@
 
     // Message handlers.
     void didUpdateGeometry() override;
+    void intrinsicContentSizeDidChange(const WebCore::IntSize&) override;
 
     void sendUpdateGeometry();
 

Modified: trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm	2019-04-19 02:25:51 UTC (rev 244446)
@@ -125,6 +125,12 @@
     process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateActivityState>(m_webPageProxy.pageID(), activityStateUpdateTimeout, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives);
 }
 
+void TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange(const IntSize& newIntrinsicContentSize)
+{
+    if (m_webPageProxy.viewLayoutSize().width() > 0)
+        m_webPageProxy.intrinsicContentSizeDidChange(newIntrinsicContentSize);
+}
+
 void TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry()
 {
     m_lastSentViewLayoutSize = m_webPageProxy.viewLayoutSize();

Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (244445 => 244446)


--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm	2019-04-19 02:25:51 UTC (rev 244446)
@@ -433,6 +433,11 @@
     return result;
 }
 
+void WebPageProxy::intrinsicContentSizeDidChange(const IntSize& intrinsicContentSize)
+{
+    pageClient().intrinsicContentSizeDidChange(intrinsicContentSize);
+}
+
 void WebPageProxy::setRemoteLayerTreeRootNode(RemoteLayerTreeNode* rootNode)
 {
     pageClient().setRemoteLayerTreeRootNode(rootNode);

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (244445 => 244446)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-04-19 02:25:51 UTC (rev 244446)
@@ -6230,24 +6230,6 @@
     m_userContentController->removeAllUserContent();
 }
 
-void WebPage::updateIntrinsicContentSizeIfNeeded()
-{
-    if (!viewLayoutSize().width())
-        return;
-
-    ASSERT(mainFrameView());
-    if (!mainFrameView()->isAutoSizeEnabled())
-        return; 
-
-    ASSERT(!mainFrameView()->needsLayout());
-    auto contentSize = mainFrameView()->autoSizingIntrinsicContentSize();
-    if (m_lastSentIntrinsicContentSize == contentSize)
-        return;
-
-    m_lastSentIntrinsicContentSize = contentSize;
-    send(Messages::WebPageProxy::DidChangeIntrinsicContentSize(contentSize));
-}
-
 void WebPage::dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone> milestones)
 {
     RefPtr<API::Object> userData;
@@ -6263,8 +6245,6 @@
         if (drawingAreaRelatedMilestones && m_drawingArea->addMilestonesToDispatch(drawingAreaRelatedMilestones))
             milestones.remove(drawingAreaRelatedMilestones);
     }
-    if (milestones.contains(DidFirstLayout))
-        updateIntrinsicContentSizeIfNeeded();
 
     send(Messages::WebPageProxy::DidReachLayoutMilestone(milestones));
 }

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (244445 => 244446)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -1555,8 +1555,6 @@
 
     bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const;
 
-    void updateIntrinsicContentSizeIfNeeded();
-
     uint64_t m_pageID;
 
     std::unique_ptr<WebCore::Page> m_page;
@@ -1896,7 +1894,6 @@
 #if PLATFORM(COCOA)
     WeakPtr<RemoteObjectRegistry> m_remoteObjectRegistry;
 #endif
-    WebCore::IntSize m_lastSentIntrinsicContentSize;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (244445 => 244446)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h	2019-04-19 02:25:51 UTC (rev 244446)
@@ -121,6 +121,7 @@
     WebCore::TiledBacking* mainFrameTiledBacking() const;
     void updateDebugInfoLayer(bool showLayer);
 
+    void updateIntrinsicContentSizeIfNeeded();
     void updateScrolledExposedRect();
     void scaleViewToFitDocumentIfNeeded();
 
@@ -149,6 +150,8 @@
     WebCore::IntSize m_lastViewSizeForScaleToFit;
     WebCore::IntSize m_lastDocumentSizeForScaleToFit;
 
+    WebCore::IntSize m_lastSentIntrinsicContentSize;
+
     double m_transientZoomScale { 1 };
     WebCore::FloatPoint m_transientZoomOrigin;
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (244445 => 244446)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2019-04-19 02:25:51 UTC (rev 244446)
@@ -278,6 +278,26 @@
 {
 }
 
+void TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded()
+{
+    if (!m_webPage.viewLayoutSize().width())
+        return;
+
+    FrameView* frameView = m_webPage.mainFrameView();
+    if (!frameView)
+        return;
+
+    if (frameView->needsLayout())
+        return;
+
+    IntSize contentSize = frameView->autoSizingIntrinsicContentSize();
+    if (m_lastSentIntrinsicContentSize == contentSize)
+        return;
+
+    m_lastSentIntrinsicContentSize = contentSize;
+    send(Messages::DrawingAreaProxy::IntrinsicContentSizeDidChange(contentSize));
+}
+
 void TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument(bool shouldScaleView)
 {
     if (m_shouldScaleViewToFitDocument == shouldScaleView)
@@ -442,6 +462,8 @@
         m_webPage.updateRendering();
         m_webPage.flushPendingEditorStateUpdate();
 
+        updateIntrinsicContentSizeIfNeeded();
+
         if (m_pendingRootLayer) {
             setRootCompositingLayer(m_pendingRootLayer.get());
             m_pendingRootLayer = nullptr;

Modified: trunk/Tools/ChangeLog (244445 => 244446)


--- trunk/Tools/ChangeLog	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Tools/ChangeLog	2019-04-19 02:25:51 UTC (rev 244446)
@@ -1,3 +1,17 @@
+2019-04-18  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r244434.
+        https://bugs.webkit.org/show_bug.cgi?id=197089
+
+        caused 1 API test failure (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "Regression (r244291): Broken API Test
+        AutoLayoutRenderingProgressRelativeOrdering"
+        https://bugs.webkit.org/show_bug.cgi?id=196948
+        https://trac.webkit.org/changeset/244434
+
 2019-04-18  Wenson Hsieh  <[email protected]>
 
         Add new compatibility mode API on WKNavigation

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm (244445 => 244446)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm	2019-04-19 00:12:34 UTC (rev 244445)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm	2019-04-19 02:25:51 UTC (rev 244446)
@@ -174,7 +174,7 @@
     [webView _setShouldExpandContentToViewHeightForAutoLayout:NO];
 }
 
-TEST(WebKit, AutoLayoutRenderingProgressRelativeOrdering)
+TEST(WebKit, DISABLED_AutoLayoutRenderingProgressRelativeOrdering)
 {
     RetainPtr<AutoLayoutWKWebView> webView = adoptNS([[AutoLayoutWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 1000, 1000)]);
 
@@ -199,6 +199,7 @@
     [webView setExpectedIntrinsicContentSize:NSMakeSize(100, 400)];
     [webView loadHTMLString:@"<body style='margin: 0; height: 400px;'></body>" baseURL:nil];
     TestWebKitAPI::Util::run(&didInvalidateIntrinsicContentSize);
+    EXPECT_FALSE(didFirstLayout);
     TestWebKitAPI::Util::run(&didFirstLayout);
     TestWebKitAPI::Util::run(&didFinishNavigation);
     [webView setNavigationDelegate:nil];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to