[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
hyatt at apple.com
hyatt at apple.com
Thu Apr 8 00:08:55 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 6e4e98561027688925959e0bcb2f3df101b7e70b
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 1 21:32:07 2009 +0000
Fix for bug 32032, empty namespaces should be allowed in @namespace directives in CSS.
Reviewed by Simon Fraser.
Added fast/css/namespaces/namespaces-empty.xml
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addNamespace):
(WebCore::CSSStyleSheet::determineNamespace):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/css/namespaces/namespaces-empty.xml b/LayoutTests/fast/css/namespaces/namespaces-empty.xml
new file mode 100644
index 0000000..6dd4925
--- /dev/null
+++ b/LayoutTests/fast/css/namespaces/namespaces-empty.xml
@@ -0,0 +1,17 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+ <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+ <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+ <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+ <title>CSS Namespaces Test Suite: empty string default namespace</title>
+ <style>
+ @namespace "";
+ @namespace x "test";
+ *|t, *|root { display:block }
+ *|t, t[x] { background:lime }
+ t { background:red }
+ </style>
+ </head>
+ <t x="">This sentence should have a green background.</t>
+ <t xmlns="test">This sentence should have a green background.</t>
+</root>
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.checksum b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.checksum
new file mode 100644
index 0000000..a9dd58c
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.checksum
@@ -0,0 +1 @@
+a5fef65ca47bf453402a4928d1bafec9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.png b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.png
new file mode 100644
index 0000000..86b8e0a
Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.txt b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.txt
new file mode 100644
index 0000000..bf7f607
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-empty-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x36
+ RenderBlock {root} at (0,0) size 800x36
+ RenderBlock {t} at (0,0) size 800x18 [bgcolor=#00FF00]
+ RenderText {#text} at (0,0) size 299x18
+ text run at (0,0) width 299: "This sentence should have a green background."
+ RenderBlock {t} at (0,18) size 800x18 [bgcolor=#00FF00]
+ RenderText {#text} at (0,0) size 299x18
+ text run at (0,0) width 299: "This sentence should have a green background."
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d252747..affad17 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-01 Dave Hyatt <hyatt at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for bug 32032, empty namespaces should be allowed in @namespace directives in CSS.
+
+ Added fast/css/namespaces/namespaces-empty.xml
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::addNamespace):
+ (WebCore::CSSStyleSheet::determineNamespace):
+
2009-12-01 Joseph Pecoraro <joepeck at webkit.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/css/CSSStyleSheet.cpp b/WebCore/css/CSSStyleSheet.cpp
index 7dc83cf..f6cd6f2 100644
--- a/WebCore/css/CSSStyleSheet.cpp
+++ b/WebCore/css/CSSStyleSheet.cpp
@@ -138,7 +138,7 @@ void CSSStyleSheet::deleteRule(unsigned index, ExceptionCode& ec)
void CSSStyleSheet::addNamespace(CSSParser* p, const AtomicString& prefix, const AtomicString& uri)
{
- if (uri.isEmpty())
+ if (uri.isNull())
return;
m_namespaces = new CSSNamespace(prefix, uri, m_namespaces);
@@ -151,11 +151,11 @@ void CSSStyleSheet::addNamespace(CSSParser* p, const AtomicString& prefix, const
const AtomicString& CSSStyleSheet::determineNamespace(const AtomicString& prefix)
{
- if (prefix.isEmpty())
+ if (prefix.isNull())
return nullAtom; // No namespace. If an element/attribute has a namespace, we won't match it.
- else if (prefix == starAtom)
+ if (prefix == starAtom)
return starAtom; // We'll match any namespace.
- else if (m_namespaces) {
+ if (m_namespaces) {
CSSNamespace* ns = m_namespaces->namespaceForPrefix(prefix);
if (ns)
return ns->uri();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list