Title: [179724] branches/safari-600.1.4.15-branch

Diff

Modified: branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog (179723 => 179724)


--- branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog	2015-02-06 00:53:37 UTC (rev 179724)
@@ -1,5 +1,59 @@
 2015-02-05  Lucas Forschler  <[email protected]>
 
+        Merge r179627
+
+    2015-02-03  David Hyatt  <[email protected]>
+
+            Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
+            https://bugs.webkit.org/show_bug.cgi?id=141207
+            <rdar://problem/18387659>
+
+            Reviewed by Dean Jackson.
+
+            * fast/multicol/table-dynamic-movement-expected.html: Added.
+            * fast/multicol/table-dynamic-movement.html: Added.
+
+    2015-02-04  Said Abou-Hallawa  <[email protected]>
+
+            When using SVG as an image, we should load datauri images when these images are not in the image cache.
+            https://bugs.webkit.org/show_bug.cgi?id=99677.
+
+            Reviewed by Darin Adler.
+
+            * svg/as-image/resources/image-with-nested-data-uri-images.svg: Added.
+            This SVG has a tree of depth = 5 of nested data URI images. All the data URI images are
+            SVG images expect the innermost one which is a png data URI image.
+
+            * svg/as-image/resources/image-with-nested-rects.svg: Added.
+            This SVG produces the same drawing as image-with-nested-data-uri-images.svg does but
+            it uses <rect> SVG elements instead.
+
+            * svg/as-image/svg-image-with-data-uri-background-expected.html: Added.
+            * svg/as-image/svg-image-with-data-uri-background.html: Added.
+            Test the data URI SVG as a css background image.
+
+            * svg/as-image/svg-image-with-data-uri-from-canvas-expected.html: Added.
+            * svg/as-image/svg-image-with-data-uri-from-canvas.html: Added.
+            Test the data URI image when it is the result of drawing an SVG image on a canvas object.
+
+            * svg/as-image/svg-image-with-data-uri-images-disabled-expected.html: Added.
+            * svg/as-image/svg-image-with-data-uri-images-disabled.html: Added.
+            Ensure the data uri images are not loaded if imagesEnabled is turned off.
+
+            * svg/as-image/svg-image-with-data-uri-reloading-expected.html: Added.
+            * svg/as-image/svg-image-with-data-uri-reloading.html: Added.
+            Test the data URI SVG when reloading the page.
+
+            * svg/as-image/svg-image-with-data-uri-use-data-uri-expected.svg: Added.
+            * svg/as-image/svg-image-with-data-uri-use-data-uri.svg: Added.
+            Test the data URI image when it is referenced from an SVG <use> tag.
+
+            * svg/as-image/svg-image-with-svg-data-uri-expected.html: Added.
+            * svg/as-image/svg-image-with-svg-data-uri.html: Added.
+            Test the data URI image when it is referenced from an HTML <img> tag.
+
+2015-02-05  Lucas Forschler  <[email protected]>
+
         Merge r179366
 
     2015-01-20  David Hyatt  <[email protected]>

Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement-expected.html (from rev 179627, trunk/LayoutTests/fast/multicol/table-dynamic-movement-expected.html) (0 => 179724)


--- branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement-expected.html	                        (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement-expected.html	2015-02-06 00:53:37 UTC (rev 179724)
@@ -0,0 +1,9 @@
+
+<div id='test' style="-webkit-columns:2; height:500px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
+</div>

Copied: branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement.html (from rev 179627, trunk/LayoutTests/fast/multicol/table-dynamic-movement.html) (0 => 179724)


--- branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement.html	                        (rev 0)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/multicol/table-dynamic-movement.html	2015-02-06 00:53:37 UTC (rev 179724)
@@ -0,0 +1,21 @@
+
+<script>
+function doIt()
+{
+document.getElementById('test').offsetHeight
+document.getElementById('test').style.height = '500px';
+}
+</script>
+
+<div id='test' style="-webkit-columns:2; height:400px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
+</div>
+
+<script>
+doIt()
+</script>

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog	2015-02-06 00:53:37 UTC (rev 179724)
@@ -1,5 +1,45 @@
 2015-02-05  Lucas Forschler  <[email protected]>
 
+        Merge r179627
+
+    2015-02-03  David Hyatt  <[email protected]>
+
+            Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
+            https://bugs.webkit.org/show_bug.cgi?id=141207
+            <rdar://problem/18387659>
+
+            Reviewed by Dean Jackson.
+
+            Added fast/multicol/table-dynamic-movement.html
+
+            Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.
+
+            Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
+            ended up getting marked for relayout.
+
+            Make sure rows do the right thing as well.
+
+            * rendering/RenderBlock.cpp:
+            (WebCore::RenderBlock::layoutPositionedObjects):
+            (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
+            * rendering/RenderBlock.h:
+            * rendering/RenderBlockFlow.cpp:
+            (WebCore::RenderBlockFlow::layoutBlockChild):
+            (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
+            (WebCore::RenderBlockFlow::positionNewFloats):
+            * rendering/RenderDeprecatedFlexibleBox.cpp:
+            (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+            (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+            * rendering/RenderTable.cpp:
+            (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
+            * rendering/RenderTable.h:
+            * rendering/RenderTableRow.cpp:
+            (WebCore::RenderTableRow::layout):
+            * rendering/RenderTableSection.cpp:
+            (WebCore::RenderTableSection::layout):
+
+2015-02-05  Lucas Forschler  <[email protected]>
+
         Merge r179366
 
     2015-01-20  David Hyatt  <[email protected]>

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -1432,8 +1432,7 @@
         if (relayoutChildren && r.needsPreferredWidthsRecalculation())
             r.setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
         
-        if (!r.needsLayout())
-            r.markForPaginationRelayoutIfNeeded();
+        r.markForPaginationRelayoutIfNeeded();
         
         // We don't have to do a full layout.  We just have to update our position. Try that first. If we have shrink-to-fit width
         // and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout.
@@ -1481,8 +1480,7 @@
 
 void RenderBlock::markForPaginationRelayoutIfNeeded()
 {
-    ASSERT(!needsLayout());
-    if (needsLayout())
+    if (needsLayout() || !view().layoutState()->isPaginated())
         return;
 
     if (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset()))

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.h (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.h	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlock.h	2015-02-06 00:53:37 UTC (rev 179724)
@@ -114,7 +114,7 @@
     bool generatesLineBoxesForInlineChild(RenderObject*);
 
     void markPositionedObjectsForLayout();
-    virtual void markForPaginationRelayoutIfNeeded() override final;
+    virtual void markForPaginationRelayoutIfNeeded() override;
     
     // FIXME-BLOCKFLOW: Remove virtualizaion when all of the line layout code has been moved out of RenderBlock
     virtual bool containsFloats() const { return false; }

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -705,8 +705,7 @@
             previousFloatLogicalBottom = std::max(previousFloatLogicalBottom, oldLogicalTop + childBlockFlow->lowestFloatLogicalBottom());
     }
 
-    if (!child.needsLayout())
-        child.markForPaginationRelayoutIfNeeded();
+    child.markForPaginationRelayoutIfNeeded();
 
     bool childHadLayout = child.everHadLayout();
     bool childNeededLayout = child.needsLayout();
@@ -744,8 +743,7 @@
         if (childBlockFlow) {
             if (!child.avoidsFloats() && childBlockFlow->containsFloats())
                 childBlockFlow->markAllDescendantsWithFloatsForLayout();
-            if (!child.needsLayout())
-                child.markForPaginationRelayoutIfNeeded();
+            child.markForPaginationRelayoutIfNeeded();
         }
     }
 
@@ -1543,8 +1541,7 @@
         if (childRenderBlock) {
             if (!child.avoidsFloats() && childRenderBlock->containsFloats())
                 toRenderBlockFlow(childRenderBlock)->markAllDescendantsWithFloatsForLayout();
-            if (!child.needsLayout())
-                child.markForPaginationRelayoutIfNeeded();
+            child.markForPaginationRelayoutIfNeeded();
         }
 
         // Our guess was wrong. Make the child lay itself out again.
@@ -2428,13 +2425,11 @@
 
         estimateRegionRangeForBoxChild(childBox);
 
+        childBox.markForPaginationRelayoutIfNeeded();
+        childBox.layoutIfNeeded();
+        
         LayoutState* layoutState = view().layoutState();
         bool isPaginated = layoutState->isPaginated();
-        if (isPaginated && !childBox.needsLayout())
-            childBox.markForPaginationRelayoutIfNeeded();
-        
-        childBox.layoutIfNeeded();
-
         if (isPaginated) {
             // If we are unsplittable and don't fit, then we need to move down.
             // We include our margins as part of the unsplittable area.

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -423,8 +423,7 @@
             // Compute the child's vertical margins.
             child->computeAndSetBlockDirectionMargins(this);
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
             
             // Apply the child's current layout delta.
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);
@@ -499,8 +498,7 @@
             if (oldChildHeight != child->height())
                 child->setChildNeedsLayout(MarkOnlyThis);
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
 
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);
 
@@ -744,8 +742,7 @@
             // Add in the child's marginTop to our height.
             setHeight(height() + child->marginTop());
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
 
             // Now do a layout.
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -1540,4 +1540,18 @@
     return style().borderStart();
 }
 
+void RenderTable::markForPaginationRelayoutIfNeeded()
+{
+    if (!view().layoutState()->isPaginated() || (!view().layoutState()->pageLogicalHeightChanged() && (!view().layoutState()->pageLogicalHeight() || view().layoutState()->pageLogicalOffset(this, logicalTop()) == pageLogicalOffset())))
+        return;
+    
+    // When a table moves, we have to dirty all of the sections too.
+    if (!needsLayout())
+        setChildNeedsLayout(MarkOnlyThis);
+    for (auto& child : childrenOfType<RenderTableSection>(*this)) {
+        if (!child.needsLayout())
+            child.setChildNeedsLayout(MarkOnlyThis);
+    }
 }
+
+}

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.h (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.h	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTable.h	2015-02-06 00:53:37 UTC (rev 179724)
@@ -275,7 +275,9 @@
     LayoutUnit offsetLeftForColumn(const RenderTableCol&) const;
     LayoutUnit offsetWidthForColumn(const RenderTableCol&) const;
     LayoutUnit offsetHeightForColumn(const RenderTableCol&) const;
-
+    
+    virtual void markForPaginationRelayoutIfNeeded() override final;
+    
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override final;
     virtual void simplifiedNormalFlowLayout() override final;

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableRow.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableRow.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableRow.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -168,7 +168,7 @@
     bool paginated = view().layoutState()->isPaginated();
                 
     for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
-        if (!cell->needsLayout() && paginated && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
+        if (!cell->needsLayout() && paginated && (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())))
             cell->setChildNeedsLayout(MarkOnlyThis);
 
         if (cell->needsLayout()) {

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableSection.cpp (179723 => 179724)


--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableSection.cpp	2015-02-06 00:33:49 UTC (rev 179723)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderTableSection.cpp	2015-02-06 00:53:37 UTC (rev 179724)
@@ -391,9 +391,10 @@
     m_grid.shrinkToFit();
 
     LayoutStateMaintainer statePusher(view(), *this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
-
+    bool paginated = view().layoutState()->isPaginated();
+    
     const Vector<int>& columnPos = table()->columnPositions();
-
+    
     for (unsigned r = 0; r < m_grid.size(); ++r) {
         Row& row = m_grid[r].row;
         unsigned cols = row.size();
@@ -416,8 +417,12 @@
             cell->setCellLogicalWidth(tableLayoutLogicalWidth);
         }
 
-        if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer)
+        if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) {
+            if (!rowRenderer->needsLayout() && paginated && view().layoutState()->pageLogicalHeightChanged())
+                rowRenderer->setChildNeedsLayout(MarkOnlyThis);
+
             rowRenderer->layoutIfNeeded();
+        }
     }
 
     statePusher.pop();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to