[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 13:25:22 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d33c9371326c7bb228dec48d0bc3cc9a33e70c1b
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 14 23:27:19 2010 +0000

    2010-09-14  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            `document.compatMode` is `undefined` when using `application/xhtml+xml`
            https://bugs.webkit.org/show_bug.cgi?id=44422
    
            Moving the compatMode IDL attribute from HTMLDocument.idl to
            Document.idl fixes this bug and improve compliance with HTML5.
    
            Test: fast/parser/compatMode-in-xhtml.xhtml
    
            * dom/Document.cpp:
            (WebCore::Document::compatMode):
            * dom/Document.h:
            * dom/Document.idl:
            * html/HTMLDocument.cpp:
            * html/HTMLDocument.h:
    2010-09-14  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            `document.compatMode` is `undefined` when using `application/xhtml+xml`
            https://bugs.webkit.org/show_bug.cgi?id=44422
    
            Test the value of compatMode in XHTML.  I'm terrible at XML, but this
            test seems to work.
    
            * fast/parser/compatMode-in-xhtml-expected.txt: Added.
            * fast/parser/compatMode-in-xhtml.xhtml: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 18d4217..2725b7f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-14  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        `document.compatMode` is `undefined` when using `application/xhtml+xml`
+        https://bugs.webkit.org/show_bug.cgi?id=44422
+
+        Test the value of compatMode in XHTML.  I'm terrible at XML, but this
+        test seems to work.
+
+        * fast/parser/compatMode-in-xhtml-expected.txt: Added.
+        * fast/parser/compatMode-in-xhtml.xhtml: Added.
+
 2010-09-14  James Kozianski  <soulplant at gmail.com>
 
         Reviewed by Ojan Vafai.
diff --git a/LayoutTests/fast/parser/compatMode-in-xhtml-expected.txt b/LayoutTests/fast/parser/compatMode-in-xhtml-expected.txt
new file mode 100644
index 0000000..13210e6
--- /dev/null
+++ b/LayoutTests/fast/parser/compatMode-in-xhtml-expected.txt
@@ -0,0 +1,2 @@
+ALERT: CSS1Compat
+
diff --git a/LayoutTests/fast/parser/compatMode-in-xhtml.xhtml b/LayoutTests/fast/parser/compatMode-in-xhtml.xhtml
new file mode 100644
index 0000000..1f20e43
--- /dev/null
+++ b/LayoutTests/fast/parser/compatMode-in-xhtml.xhtml
@@ -0,0 +1,15 @@
+<!DOCTYPE html> 
+<html xmlns="http://www.w3.org/1999/xhtml"> 
+ <head> 
+  <meta charset="utf-8" /> 
+  <title>XHTML</title> 
+ </head> 
+ <body> 
+ <script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+    alert(document.compatMode);
+ </script>
+ </body> 
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1628ebb..ee7bfcb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,24 @@
 2010-09-14  Adam Barth  <abarth at webkit.org>
 
+        Reviewed by Eric Seidel.
+
+        `document.compatMode` is `undefined` when using `application/xhtml+xml`
+        https://bugs.webkit.org/show_bug.cgi?id=44422
+
+        Moving the compatMode IDL attribute from HTMLDocument.idl to
+        Document.idl fixes this bug and improve compliance with HTML5.
+
+        Test: fast/parser/compatMode-in-xhtml.xhtml
+
+        * dom/Document.cpp:
+        (WebCore::Document::compatMode):
+        * dom/Document.h:
+        * dom/Document.idl:
+        * html/HTMLDocument.cpp:
+        * html/HTMLDocument.h:
+
+2010-09-14  Adam Barth  <abarth at webkit.org>
+
         Reviewed by Nate Chapin.
 
         V8 security checks don't account for shadowing named frames
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 2bb2d69..1fd02b3 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -608,6 +608,11 @@ void Document::setCompatibilityMode(CompatibilityMode mode)
     }
 }
 
+String Document::compatMode() const
+{
+    return inQuirksMode() ? "BackCompat" : "CSS1Compat";
+}
+
 void Document::resetLinkColor()
 {
     m_linkColor = Color(0, 0, 238);
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 1adc4b0..42d2706 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -579,6 +579,8 @@ public:
     void lockCompatibilityMode() { m_compatibilityModeLocked = true; }
     CompatibilityMode compatibilityMode() const { return m_compatibilityMode; }
 
+    String compatMode() const;
+
     bool inQuirksMode() const { return m_compatibilityMode == QuirksMode; }
     bool inLimitedQuirksMode() const { return m_compatibilityMode == LimitedQuirksMode; }
     bool inNoQuirksMode() const { return m_compatibilityMode == NoQuirksMode; }
diff --git a/WebCore/dom/Document.idl b/WebCore/dom/Document.idl
index 0bd93b8..296bd44 100644
--- a/WebCore/dom/Document.idl
+++ b/WebCore/dom/Document.idl
@@ -233,6 +233,8 @@ module core {
         // HTML 5
         NodeList getElementsByClassName(in DOMString tagname);
 
+        readonly attribute DOMString compatMode;
+
         // NodeSelector - Selector API
         Element querySelector(in DOMString selectors)
             raises(DOMException);
diff --git a/WebCore/html/HTMLDocument.cpp b/WebCore/html/HTMLDocument.cpp
index b5e976d..08c4e22 100644
--- a/WebCore/html/HTMLDocument.cpp
+++ b/WebCore/html/HTMLDocument.cpp
@@ -136,11 +136,6 @@ void HTMLDocument::setDesignMode(const String& value)
     Document::setDesignMode(mode);
 }
 
-String HTMLDocument::compatMode() const
-{
-    return inQuirksMode() ? "BackCompat" : "CSS1Compat";
-}
-
 Element* HTMLDocument::activeElement()
 {
     if (Node* node = focusedNode())
diff --git a/WebCore/html/HTMLDocument.h b/WebCore/html/HTMLDocument.h
index 12deee2..0376d8c 100644
--- a/WebCore/html/HTMLDocument.h
+++ b/WebCore/html/HTMLDocument.h
@@ -50,7 +50,6 @@ public:
     String designMode() const;
     void setDesignMode(const String&);
 
-    String compatMode() const;
     virtual void setCompatibilityModeFromDoctype();
 
     Element* activeElement();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list