[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:42:43 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3c4e1243e05018a8f58c4296842a770b5a662113
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 21:36:18 2010 +0000
2010-09-23 Jeff Schiller <jeffschiller at google.com>
Reviewed by David Hyatt.
Test to confirm that object/iframe/embed backgrounds are transparent for SVG documents
https://bugs.webkit.org/show_bug.cgi?id=10687
* platform/mac/svg/in-html/by-reference-expected.txt: Added.
* svg/in-html/by-reference-expected.checksum: Added.
* svg/in-html/by-reference-expected.png: Added.
* svg/in-html/by-reference.html: Added.
2010-09-23 Jeff Schiller <jeffschiller at google.com>
Reviewed by David Hyatt.
Ensure that SVG documents included by reference (object, iframe, embed) have transparent
backgrounds (not white). https://bugs.webkit.org/show_bug.cgi?id=10687
Test: svg/in-html/by-reference.html
* dom/Document.cpp:
(WebCore::Document::hasSVGRootNode):
* dom/Document.h:
(WebCore::Document::hasSVGRootNode):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 086ef76..5db1e27 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-23 Jeff Schiller <jeffschiller at google.com>
+
+ Reviewed by David Hyatt.
+
+ Test to confirm that object/iframe/embed backgrounds are transparent for SVG documents
+ https://bugs.webkit.org/show_bug.cgi?id=10687
+
+ * platform/mac/svg/in-html/by-reference-expected.txt: Added.
+ * svg/in-html/by-reference-expected.checksum: Added.
+ * svg/in-html/by-reference-expected.png: Added.
+ * svg/in-html/by-reference.html: Added.
+
2010-09-23 Hans Wennborg <hans at chromium.org>
Reviewed by Simon Fraser.
diff --git a/LayoutTests/platform/mac/svg/in-html/by-reference-expected.txt b/LayoutTests/platform/mac/svg/in-html/by-reference-expected.txt
new file mode 100644
index 0000000..b73747a
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/in-html/by-reference-expected.txt
@@ -0,0 +1,39 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x400
+ RenderBlock {HTML} at (0,0) size 800x400
+ RenderBody {BODY} at (0,0) size 800x400
+ RenderBlock {DIV} at (0,0) size 400x400 [bgcolor=#00FF00]
+ RenderEmbeddedObject {OBJECT} at (0,50) size 50x50
+ layer at (0,0) size 50x50
+ RenderView at (0,0) size 50x50
+ layer at (0,0) size 50x50
+ RenderSVGRoot {svg} at (0,0) size 0x0
+ RenderText {#text} at (50,86) size 4x18
+ text run at (50,86) width 4: " "
+ RenderEmbeddedObject {EMBED} at (54,50) size 50x50
+ layer at (0,0) size 50x50
+ RenderView at (0,0) size 50x50
+ layer at (0,0) size 50x50
+ RenderSVGRoot {svg} at (0,0) size 0x0
+ RenderText {#text} at (104,86) size 4x18
+ text run at (104,86) width 4: " "
+ RenderPartObject {IFRAME} at (108,0) size 100x100
+ layer at (0,0) size 100x100
+ RenderView at (0,0) size 100x100
+ layer at (0,0) size 50x50
+ RenderSVGRoot {svg} at (0,0) size 0x0
+ RenderText {#text} at (208,86) size 4x18
+ text run at (208,86) width 4: " "
+ RenderEmbeddedObject {OBJECT} at (212,50) size 50x50
+ layer at (0,0) size 50x50
+ RenderView at (0,0) size 50x50
+ layer at (0,0) size 50x50
+ RenderSVGRoot {svg} at (0,0) size 0x0
+ RenderText {#text} at (262,86) size 4x18
+ text run at (262,86) width 4: " "
+ RenderEmbeddedObject {OBJECT} at (266,50) size 50x50
+ layer at (0,0) size 50x50
+ RenderView at (0,0) size 50x50
+ layer at (0,0) size 50x50
+ RenderSVGRoot {svg} at (0,0) size 0x0
diff --git a/LayoutTests/svg/in-html/by-reference-expected.checksum b/LayoutTests/svg/in-html/by-reference-expected.checksum
new file mode 100644
index 0000000..2a8d448
--- /dev/null
+++ b/LayoutTests/svg/in-html/by-reference-expected.checksum
@@ -0,0 +1 @@
+434a14689ffa1d536cec41b3d9adc6d9
\ No newline at end of file
diff --git a/LayoutTests/svg/in-html/by-reference-expected.png b/LayoutTests/svg/in-html/by-reference-expected.png
new file mode 100644
index 0000000..acf5287
Binary files /dev/null and b/LayoutTests/svg/in-html/by-reference-expected.png differ
diff --git a/LayoutTests/svg/in-html/by-reference.html b/LayoutTests/svg/in-html/by-reference.html
new file mode 100644
index 0000000..922f250
--- /dev/null
+++ b/LayoutTests/svg/in-html/by-reference.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<!--
+ SVG documents included by reference should be transparent. Any white visible in the green box is a failure.
+-->
+<head>
+ <style type='text/css'>
+ * {
+ margin: 0px;
+ padding: 0px;
+ }
+ div {
+ background-color: lime;
+ height: 400px;
+ width: 400px;
+ }
+ iframe {
+ border: none;
+ }
+ </style>
+</head>
+<body>
+ <div>
+ <object type='image/svg+xml' width='50' height='50' data='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4='></object>
+ <embed width='50' height='50' src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4='></embed>
+ <iframe seamless='seamless' width='100' height='100' src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4='></iframe>
+ <object type='text/xml' width='50' height='50' data='data:text/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4='></object>
+ <object type='application/xml' width='50' height='50' data='data:application/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4='></object-->
+ </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4c4df86..19546dd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-23 Jeff Schiller <jeffschiller at google.com>
+
+ Reviewed by David Hyatt.
+
+ Ensure that SVG documents included by reference (object, iframe, embed) have transparent
+ backgrounds (not white). https://bugs.webkit.org/show_bug.cgi?id=10687
+
+ Test: svg/in-html/by-reference.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::hasSVGRootNode):
+ * dom/Document.h:
+ (WebCore::Document::hasSVGRootNode):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+
2010-09-23 Hans Wennborg <hans at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index b9712e1..fa7b685 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -4028,6 +4028,11 @@ SVGDocumentExtensions* Document::accessSVGExtensions()
m_svgExtensions = adoptPtr(new SVGDocumentExtensions(this));
return m_svgExtensions.get();
}
+
+bool Document::hasSVGRootNode() const
+{
+ return documentElement() && documentElement()->hasTagName(SVGNames::svgTag);
+}
#endif
PassRefPtr<HTMLCollection> Document::images()
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 42d2706..82d8239 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -385,8 +385,10 @@ public:
virtual bool isImageDocument() const { return false; }
#if ENABLE(SVG)
virtual bool isSVGDocument() const { return false; }
+ bool hasSVGRootNode() const;
#else
static bool isSVGDocument() { return false; }
+ static bool hasSVGRootNode() { return false; }
#endif
virtual bool isPluginDocument() const { return false; }
virtual bool isMediaDocument() const { return false; }
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 74de8a8..d987060 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -624,6 +624,12 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
// Can't scroll a frameset document anyway.
isOpaqueRoot = body->hasLocalName(framesetTag);
}
+#if ENABLE(SVG)
+ else {
+ // SVG documents and XML documents with SVG root nodes are transparent.
+ isOpaqueRoot = !document()->hasSVGRootNode();
+ }
+#endif
}
} else
isOpaqueRoot = !view()->frameView()->isTransparent();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list