[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:26:10 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 47259d3e6d8ec396d317c4e79a475d70e9132c05
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 05:52:39 2009 +0000

    2009-11-08  Johnny Ding  <johnnyding.webkit at gmail.com>
    
            Reviewed by Dimitri Glazkov.
    
            https://bugs.webkit.org/show_bug.cgi?id=31224
            [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
    
            * fast/dom/StyleSheet/get-stylesheet-byname-expected.txt: Added.
            * fast/dom/StyleSheet/get-stylesheet-byname.html: Added.
            * fast/dom/StyleSheet/script-tests: Added.
            * fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js: Added.
    2009-11-08  Johnny Ding  <johnnyding.webkit at gmail.com>
    
            Reviewed by Dimitri Glazkov.
    
            https://bugs.webkit.org/show_bug.cgi?id=31224
            [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
    
            Test: fast/dom/StyleSheet/get-stylesheet-byname.html
    
            * bindings/v8/custom/V8StyleSheetListCustom.cpp:
            (WebCore::NAMED_PROPERTY_GETTER):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50637 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 738bbb6..969df84 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-08  Johnny Ding  <johnnyding.webkit at gmail.com>
+
+        Reviewed by Dimitri Glazkov.
+
+        https://bugs.webkit.org/show_bug.cgi?id=31224
+        [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
+
+        * fast/dom/StyleSheet/get-stylesheet-byname-expected.txt: Added.
+        * fast/dom/StyleSheet/get-stylesheet-byname.html: Added.
+        * fast/dom/StyleSheet/script-tests: Added.
+        * fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js: Added.
+
 2009-11-08  Daniel Bates  <dbates at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt
new file mode 100644
index 0000000..02d10cf
--- /dev/null
+++ b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname-expected.txt
@@ -0,0 +1,10 @@
+This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.styleSheets["test"].toString() is document.styleSheets[1].toString()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html
new file mode 100644
index 0000000..5689f7d
--- /dev/null
+++ b/LayoutTests/fast/dom/StyleSheet/get-stylesheet-byname.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<style id="test">
+.unknown { 
+    left: 0px;
+}
+</style>
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/get-stylesheet-byname.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js b/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js
new file mode 100644
index 0000000..30042bf
--- /dev/null
+++ b/LayoutTests/fast/dom/StyleSheet/script-tests/get-stylesheet-byname.js
@@ -0,0 +1,6 @@
+description("This test verifies that a StyleSheet object will be returned instead of a HTMLStyleElement when calling document.styleSheets named property getter.");
+
+// The type of returned object by number getter should be equal with the named property getter.
+shouldBe('document.styleSheets["test"].toString()', 'document.styleSheets[1].toString()');
+    
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b8e946a..6e84410 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-08  Johnny Ding  <johnnyding.webkit at gmail.com>
+
+        Reviewed by Dimitri Glazkov.
+
+        https://bugs.webkit.org/show_bug.cgi?id=31224
+        [V8] Return StyleSheet object instead of HTMLStyleElement w/document.styleSheets named property getter.
+
+        Test: fast/dom/StyleSheet/get-stylesheet-byname.html
+
+        * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+        (WebCore::NAMED_PROPERTY_GETTER):
+
 2009-11-08  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
index ecd0153..32a48eb 100644
--- a/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
@@ -29,6 +29,7 @@
  */
 
 #include "config.h"
+#include "HTMLStyleElement.h"
 #include "StyleSheetList.h"
 
 #include "V8Binding.h"
@@ -50,7 +51,7 @@ NAMED_PROPERTY_GETTER(StyleSheetList)
     if (!item)
         return notHandledByInterceptor();
 
-    return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLSTYLEELEMENT, item);
+    return V8DOMWrapper::convertToV8Object(V8ClassIndex::STYLESHEET, item->sheet());
 }
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list