Title: [152178] trunk
- Revision
- 152178
- Author
- [email protected]
- Date
- 2013-06-28 11:00:53 -0700 (Fri, 28 Jun 2013)
Log Message
SVG relayout problem when displayed with different image box heights
https://bugs.webkit.org/show_bug.cgi?id=118140
Patch by Morten Stenshorne <[email protected]> on 2013-06-28
Reviewed by Philip Rogers.
Source/WebCore:
If the root element is an SVG, its position and height are affected
by the view height.
Test: svg/as-image/same-source-different-height.html
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
LayoutTests:
* svg/as-image/same-source-different-height-expected.html: Added.
* svg/as-image/same-source-different-height.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (152177 => 152178)
--- trunk/LayoutTests/ChangeLog 2013-06-28 17:54:50 UTC (rev 152177)
+++ trunk/LayoutTests/ChangeLog 2013-06-28 18:00:53 UTC (rev 152178)
@@ -1,3 +1,13 @@
+2013-06-28 Morten Stenshorne <[email protected]>
+
+ SVG relayout problem when displayed with different image box heights
+ https://bugs.webkit.org/show_bug.cgi?id=118140
+
+ Reviewed by Philip Rogers.
+
+ * svg/as-image/same-source-different-height-expected.html: Added.
+ * svg/as-image/same-source-different-height.html: Added.
+
2013-06-28 Mario Sanchez Prada <[email protected]>
accessibility/media-element.html does not support platforms without subroles
Added: trunk/LayoutTests/svg/as-image/same-source-different-height-expected.html (0 => 152178)
--- trunk/LayoutTests/svg/as-image/same-source-different-height-expected.html (rev 0)
+++ trunk/LayoutTests/svg/as-image/same-source-different-height-expected.html 2013-06-28 18:00:53 UTC (rev 152178)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Same SVG source, different image heights</title>
+ </head>
+ <body>
+ <p>There should be <em>two</em> blue circles below.</p>
+ <img src="" type="image/svg+xml" style="width:100px; height:300px;">
+ <img src="" type="image/svg+xml" style="width:100px; height:100px;">
+ </body>
+</html>
Added: trunk/LayoutTests/svg/as-image/same-source-different-height.html (0 => 152178)
--- trunk/LayoutTests/svg/as-image/same-source-different-height.html (rev 0)
+++ trunk/LayoutTests/svg/as-image/same-source-different-height.html 2013-06-28 18:00:53 UTC (rev 152178)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Same SVG source, different image heights</title>
+ </head>
+ <body>
+ <p>There should be <em>two</em> blue circles below.</p>
+ <img src="" type="image/svg+xml" style="width:100px; height:300px;">
+ <img src="" type="image/svg+xml" style="width:100px; height:100px;">
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (152177 => 152178)
--- trunk/Source/WebCore/ChangeLog 2013-06-28 17:54:50 UTC (rev 152177)
+++ trunk/Source/WebCore/ChangeLog 2013-06-28 18:00:53 UTC (rev 152178)
@@ -1,3 +1,18 @@
+2013-06-28 Morten Stenshorne <[email protected]>
+
+ SVG relayout problem when displayed with different image box heights
+ https://bugs.webkit.org/show_bug.cgi?id=118140
+
+ Reviewed by Philip Rogers.
+
+ If the root element is an SVG, its position and height are affected
+ by the view height.
+
+ Test: svg/as-image/same-source-different-height.html
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::layout):
+
2013-06-28 Simon Fraser <[email protected]>
Allow some LayoutPoint and LayoutSize conversions to be inlined
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (152177 => 152178)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2013-06-28 17:54:50 UTC (rev 152177)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2013-06-28 18:00:53 UTC (rev 152178)
@@ -280,7 +280,11 @@
|| child->style()->logicalMaxHeight().isPercent()
|| child->style()->logicalHeight().isViewportPercentage()
|| child->style()->logicalMinHeight().isViewportPercentage()
- || child->style()->logicalMaxHeight().isViewportPercentage())
+ || child->style()->logicalMaxHeight().isViewportPercentage()
+#if ENABLE(SVG)
+ || child->isSVGRoot()
+#endif
+ )
child->setChildNeedsLayout(true, MarkOnlyThis);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes