Title: [163831] branches/safari-537.75-branch
- Revision
- 163831
- Author
- lforsch...@apple.com
- Date
- 2014-02-10 16:03:44 -0800 (Mon, 10 Feb 2014)
Log Message
Merged r156082.
Modified Paths
Added Paths
Diff
Modified: branches/safari-537.75-branch/LayoutTests/ChangeLog (163830 => 163831)
--- branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-02-10 23:59:16 UTC (rev 163830)
+++ branches/safari-537.75-branch/LayoutTests/ChangeLog 2014-02-11 00:03:44 UTC (rev 163831)
@@ -1,5 +1,19 @@
2014-02-10 Lucas Forschler <lforsch...@apple.com>
+ Merge r156082
+
+ 2013-09-18 Mihnea Ovidenie <mih...@adobe.com>
+
+ [CSSRegions] Failed to retrieve named flow ranges for content with inline svg
+ https://bugs.webkit.org/show_bug.cgi?id=121489
+
+ Reviewed by David Hyatt.
+
+ * fast/regions/get-region-flow-ranges-inline-svg-expected.txt: Added.
+ * fast/regions/get-region-flow-ranges-inline-svg.html: Added.
+
+2014-02-10 Lucas Forschler <lforsch...@apple.com>
+
Merge r158676
2013-11-05 Daniel Bates <daba...@apple.com>
Copied: branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg-expected.txt (from rev 156082, trunk/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg-expected.txt) (0 => 163831)
--- branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg-expected.txt (rev 0)
+++ branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg-expected.txt 2014-02-11 00:03:44 UTC (rev 163831)
@@ -0,0 +1,7 @@
+Test that getting the region ranges when the flowing content has inline svg does not crash.
+
+On success you should see PASS below.
+
+PASS
+
+
Copied: branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg.html (from rev 156082, trunk/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg.html) (0 => 163831)
--- branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg.html (rev 0)
+++ branches/safari-537.75-branch/LayoutTests/fast/regions/get-region-flow-ranges-inline-svg.html 2014-02-11 00:03:44 UTC (rev 163831)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ #article { -webkit-flow-into: flow; }
+ #region { -webkit-flow-from: flow; width: 100px; height: 100px; }
+ </style>
+ </head>
+ <body>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ </script>
+ <p>Test that getting the region ranges when the flowing content has inline svg does not crash.</p>
+ <p>On success you should see PASS below.</p>
+ <p id="output"></p>
+ <div id="article">
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <rect width="100" height="100" style="fill:rgb(0,255,0)"/>
+ </svg>
+ </div>
+ <div id="region"></div>
+ <script>
+ var range = document.getElementById("region").webkitGetRegionFlowRanges();
+ document.getElementById("output").innerHTML = "PASS";
+ </script>
+ </body>
+</html>
Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (163830 => 163831)
--- branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-02-10 23:59:16 UTC (rev 163830)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-02-11 00:03:44 UTC (rev 163831)
@@ -1,5 +1,28 @@
2014-02-10 Lucas Forschler <lforsch...@apple.com>
+ Merge r156082
+
+ 2013-09-18 Mihnea Ovidenie <mih...@adobe.com>
+
+ [CSSRegions] Failed to retrieve named flow ranges for content with inline svg
+ https://bugs.webkit.org/show_bug.cgi?id=121489
+
+ Reviewed by David Hyatt.
+
+ The inline SVG element behaves like a replaced element in HTML context. When computing the ranges
+ that are displayed inside a region for a named flow that contains an inline SVG element, we have
+ to treat the SVG as a replaced and run the checks only for the SVG root element, skipping the
+ other SVG elements inside.
+
+ Test: fast/regions/get-region-flow-ranges-inline-svg.html
+
+ * rendering/RenderNamedFlowThread.cpp:
+ (WebCore::nextNodeInsideContentNode): Add function to retrieve the next node in traversal
+ under the contentNode subtree that should be used for getRanges inspection.
+ (WebCore::RenderNamedFlowThread::getRanges): Replace NodeTravesal::next with nextNodeInsideContentNode.
+
+2014-02-10 Lucas Forschler <lforsch...@apple.com>
+
Merge r153507
2013-07-30 Chris Fleizach <cfleiz...@apple.com>
Modified: branches/safari-537.75-branch/Source/WebCore/rendering/RenderNamedFlowThread.cpp (163830 => 163831)
--- branches/safari-537.75-branch/Source/WebCore/rendering/RenderNamedFlowThread.cpp 2014-02-10 23:59:16 UTC (rev 163830)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/RenderNamedFlowThread.cpp 2014-02-11 00:03:44 UTC (rev 163831)
@@ -477,6 +477,17 @@
&& logicalTopForBox < logicalBottomForRegion && logicalTopForRegion < logicalBottomForBox;
}
+// Retrieve the next node to be visited while computing the ranges inside a region.
+static Node* nextNodeInsideContentNode(const Node* currNode, const Node* contentNode)
+{
+ ASSERT(currNode);
+ ASSERT(contentNode && contentNode->inNamedFlow());
+
+ if (currNode->renderer() && currNode->renderer()->isSVGRoot())
+ return NodeTraversal::nextSkippingChildren(currNode, contentNode);
+ return NodeTraversal::next(currNode, contentNode);
+}
+
void RenderNamedFlowThread::getRanges(Vector<RefPtr<Range> >& rangeObjects, const RenderRegion* region) const
{
LayoutUnit logicalTopForRegion;
@@ -514,7 +525,7 @@
bool skipOverOutsideNodes = false;
Node* lastEndNode = 0;
- for (Node* node = contentNode; node; node = NodeTraversal::next(node, contentNode)) {
+ for (Node* node = contentNode; node; node = nextNodeInsideContentNode(node, contentNode)) {
RenderObject* renderer = node->renderer();
if (!renderer)
continue;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes