Title: [236510] tags/Safari-607.1.7.3
Revision
236510
Author
[email protected]
Date
2018-09-26 11:20:09 -0700 (Wed, 26 Sep 2018)

Log Message

Cherry-pick r236288. rdar://problem/43659749

    Release assert under RenderView::pageOrViewLogicalHeight
    https://bugs.webkit.org/show_bug.cgi?id=189798
    <rdar://problem/43659749>

    Reviewed by Simon Fraser.

    Source/WebCore:

    Only the mainframe's render view is sized to the page while printing.
    Use the matching check (see RenderView::layout) when accessing m_pageLogicalSize.

    Test: printing/crash-while-formatting-subframe-for-printing.html

    * rendering/RenderView.cpp:
    (WebCore::RenderView::pageOrViewLogicalHeight const):

    LayoutTests:

    * printing/crash-while-formatting-subframe-for-printing-expected.txt: Added.
    * printing/crash-while-formatting-subframe-for-printing.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: tags/Safari-607.1.7.3/LayoutTests/ChangeLog (236509 => 236510)


--- tags/Safari-607.1.7.3/LayoutTests/ChangeLog	2018-09-26 18:20:06 UTC (rev 236509)
+++ tags/Safari-607.1.7.3/LayoutTests/ChangeLog	2018-09-26 18:20:09 UTC (rev 236510)
@@ -1,3 +1,42 @@
+2018-09-26  Babak Shafiei  <[email protected]>
+
+        Cherry-pick r236288. rdar://problem/43659749
+
+    Release assert under RenderView::pageOrViewLogicalHeight
+    https://bugs.webkit.org/show_bug.cgi?id=189798
+    <rdar://problem/43659749>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    Only the mainframe's render view is sized to the page while printing.
+    Use the matching check (see RenderView::layout) when accessing m_pageLogicalSize.
+    
+    Test: printing/crash-while-formatting-subframe-for-printing.html
+    
+    * rendering/RenderView.cpp:
+    (WebCore::RenderView::pageOrViewLogicalHeight const):
+    
+    LayoutTests:
+    
+    * printing/crash-while-formatting-subframe-for-printing-expected.txt: Added.
+    * printing/crash-while-formatting-subframe-for-printing.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-09-20  Zalan Bujtas  <[email protected]>
+
+            Release assert under RenderView::pageOrViewLogicalHeight
+            https://bugs.webkit.org/show_bug.cgi?id=189798
+            <rdar://problem/43659749>
+
+            Reviewed by Simon Fraser.
+
+            * printing/crash-while-formatting-subframe-for-printing-expected.txt: Added.
+            * printing/crash-while-formatting-subframe-for-printing.html: Added.
+
 2018-09-19  Ms2ger  <[email protected]>
 
         [GTK] Unreviewed test gardening

Added: tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing-expected.txt (0 => 236510)


--- tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing-expected.txt	                        (rev 0)
+++ tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing-expected.txt	2018-09-26 18:20:09 UTC (rev 236510)
@@ -0,0 +1 @@
+

Added: tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing.html (0 => 236510)


--- tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing.html	                        (rev 0)
+++ tags/Safari-607.1.7.3/LayoutTests/printing/crash-while-formatting-subframe-for-printing.html	2018-09-26 18:20:09 UTC (rev 236510)
@@ -0,0 +1,17 @@
+<title>Unfortunately not 100% repro.</title>
+<body _onload_="runTests()">
+    <div id="foobar">
+        <iframe style="width: 90%" src="" style='width: 80%'>PASS if no crash</body>"></iframe>
+    </div>
+</body>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+function runTests() {
+    setTimeout(function() {
+        foobar.style.width = "400px";
+    }, 0);
+    window.print();
+}
+</script>

Modified: tags/Safari-607.1.7.3/Source/WebCore/ChangeLog (236509 => 236510)


--- tags/Safari-607.1.7.3/Source/WebCore/ChangeLog	2018-09-26 18:20:06 UTC (rev 236509)
+++ tags/Safari-607.1.7.3/Source/WebCore/ChangeLog	2018-09-26 18:20:09 UTC (rev 236510)
@@ -1,5 +1,49 @@
 2018-09-26  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r236288. rdar://problem/43659749
+
+    Release assert under RenderView::pageOrViewLogicalHeight
+    https://bugs.webkit.org/show_bug.cgi?id=189798
+    <rdar://problem/43659749>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    Only the mainframe's render view is sized to the page while printing.
+    Use the matching check (see RenderView::layout) when accessing m_pageLogicalSize.
+    
+    Test: printing/crash-while-formatting-subframe-for-printing.html
+    
+    * rendering/RenderView.cpp:
+    (WebCore::RenderView::pageOrViewLogicalHeight const):
+    
+    LayoutTests:
+    
+    * printing/crash-while-formatting-subframe-for-printing-expected.txt: Added.
+    * printing/crash-while-formatting-subframe-for-printing.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-09-20  Zalan Bujtas  <[email protected]>
+
+            Release assert under RenderView::pageOrViewLogicalHeight
+            https://bugs.webkit.org/show_bug.cgi?id=189798
+            <rdar://problem/43659749>
+
+            Reviewed by Simon Fraser.
+
+            Only the mainframe's render view is sized to the page while printing.
+            Use the matching check (see RenderView::layout) when accessing m_pageLogicalSize.
+
+            Test: printing/crash-while-formatting-subframe-for-printing.html
+
+            * rendering/RenderView.cpp:
+            (WebCore::RenderView::pageOrViewLogicalHeight const):
+
+2018-09-26  Babak Shafiei  <[email protected]>
+
         Cherry-pick r236254. rdar://problem/44182860
 
     Fix crash under FontCache::purgeInactiveFontData() when a memory warning fires

Modified: tags/Safari-607.1.7.3/Source/WebCore/rendering/RenderView.cpp (236509 => 236510)


--- tags/Safari-607.1.7.3/Source/WebCore/rendering/RenderView.cpp	2018-09-26 18:20:06 UTC (rev 236509)
+++ tags/Safari-607.1.7.3/Source/WebCore/rendering/RenderView.cpp	2018-09-26 18:20:09 UTC (rev 236510)
@@ -248,7 +248,7 @@
 
 LayoutUnit RenderView::pageOrViewLogicalHeight() const
 {
-    if (document().printing())
+    if (shouldUsePrintingLayout())
         return m_pageLogicalSize->height();
     
     if (multiColumnFlow() && !style().hasInlineColumnAxis()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to