https://bugs.webkit.org/show_bug.cgi?id=23111
Patch by Florin Malita <fmalita@google.com> on 2012-02-01
Reviewed by Eric Seidel.
Source/WebCore:
Test: svg/foreignObject/body-background.svg
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground):
Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.
LayoutTests:
* svg/foreignObject/body-background-expected.png: Added.
* svg/foreignObject/body-background-expected.txt: Added.
* svg/foreignObject/body-background.svg: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106510
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-01 Florin Malita <fmalita@google.com>
+
+ Backgrounds in HTML inside foreignObject don't draw
+ https://bugs.webkit.org/show_bug.cgi?id=23111
+
+ Reviewed by Eric Seidel.
+
+ * svg/foreignObject/body-background-expected.png: Added.
+ * svg/foreignObject/body-background-expected.txt: Added.
+ * svg/foreignObject/body-background.svg: Added.
+
2012-02-01 Oliver Hunt <oliver@apple.com>
Add support for inferred function names
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (20,20) size 200x100
+ RenderSVGRect {rect} at (20,20) size 200x100 [fill={[type=SOLID] [color=#FF0000]}] [x=20.00] [y=20.00] [width=200.00] [height=100.00]
+ RenderSVGForeignObject {foreignObject} at (20,20) size 200x100
+ RenderBlock {html} at (0,0) size 200x100
+ RenderBody {body} at (0,0) size 200x100 [bgcolor=#008000]
+ RenderBlock {div} at (0,0) size 200x100
--- /dev/null
+<?xml version="1.0" standalone="yes"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+ <!-- The FO <body> background should cover this red rect -->
+ <rect x="20" y="20" width="200" height="100" fill="red"/>
+ <foreignObject x="20" y="20" width="200" height="100">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <body style="background-color: green; margin: 0px;">
+ <div style="height: 100px;"></div>
+ </body>
+ </html>
+ </foreignObject>
+</svg>
+2012-02-01 Florin Malita <fmalita@google.com>
+
+ Backgrounds in HTML inside foreignObject don't draw
+ https://bugs.webkit.org/show_bug.cgi?id=23111
+
+ Reviewed by Eric Seidel.
+
+ Test: svg/foreignObject/body-background.svg
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBackground):
+ Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.
+
+
2012-02-01 Gustavo Lima Chaves <glima@profusion.mobi>
Make one able to set the local storage (tracker) database dir's path
{
if (isRoot())
paintRootBoxFillLayers(paintInfo);
- else if (!isBody() || (document()->documentElement()->renderer() && document()->documentElement()->renderer()->hasBackground())) {
- // The <body> only paints its background if the root element has defined a background
- // independent of the body.
+ else if (!isBody()
+ || (document()->documentElement()->renderer() && document()->documentElement()->renderer()->hasBackground())
+ || (document()->documentElement()->renderer() != parent())) {
+ // The <body> only paints its background if the root element has defined a background independent of the body,
+ // or if the <body>'s parent is not the document element's renderer (e.g. inside SVG foreignObject).
if (!backgroundIsObscured())
paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), paintRect, bleedAvoidance);
}