Title: [220333] trunk/Source/WebCore
Revision
220333
Author
[email protected]
Date
2017-08-07 06:14:18 -0700 (Mon, 07 Aug 2017)

Log Message

REGRESSION (r219121): Airmail 3 prints header part only.
https://bugs.webkit.org/show_bug.cgi?id=175258
<rdar://problem/33601173>

Reviewed by Andreas Kling.

When a WK1 WebViw is printed via AppKit view hierarchy it won't explictly set the page width
but uses the existing width. r219121 assumes that all printing code paths set the page width.

No test, there appears to be no good way to test AppKit printing behaviors without adding complicated
new testing infrastructure.

* rendering/RenderView.cpp:
(WebCore::RenderView::layout):

    If we are in printing layout and don't have page width set yet then use the current view width.
    This matches the behavior prior r219121.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (220332 => 220333)


--- trunk/Source/WebCore/ChangeLog	2017-08-07 13:08:32 UTC (rev 220332)
+++ trunk/Source/WebCore/ChangeLog	2017-08-07 13:14:18 UTC (rev 220333)
@@ -1,3 +1,23 @@
+2017-08-07  Antti Koivisto  <[email protected]>
+
+        REGRESSION (r219121): Airmail 3 prints header part only.
+        https://bugs.webkit.org/show_bug.cgi?id=175258
+        <rdar://problem/33601173>
+
+        Reviewed by Andreas Kling.
+
+        When a WK1 WebViw is printed via AppKit view hierarchy it won't explictly set the page width
+        but uses the existing width. r219121 assumes that all printing code paths set the page width.
+
+        No test, there appears to be no good way to test AppKit printing behaviors without adding complicated
+        new testing infrastructure.
+
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::layout):
+
+            If we are in printing layout and don't have page width set yet then use the current view width.
+            This matches the behavior prior r219121.
+
 2017-08-05  Youenn Fablet  <[email protected]>
 
         [Fetch API] Response should keep all ResourceResponse information

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (220332 => 220333)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2017-08-07 13:08:32 UTC (rev 220332)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2017-08-07 13:14:18 UTC (rev 220333)
@@ -341,7 +341,8 @@
         m_pageLogicalSize = { };
 
     if (shouldUsePrintingLayout()) {
-        ASSERT(m_pageLogicalSize);
+        if (!m_pageLogicalSize)
+            m_pageLogicalSize = LayoutSize(logicalWidth(), 0);
         m_minPreferredLogicalWidth = m_pageLogicalSize->width();
         m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to