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

rwlbuis at webkit.org rwlbuis at webkit.org
Wed Dec 22 15:30:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a33aecc0aa432f9342d8ddc12352193707adcd0e
Author: rwlbuis at webkit.org <rwlbuis at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 5 08:04:51 2010 +0000

    2010-11-05  Rob Buis  <rwlbuis at gmail.com>
    
            Reviewed by David Hyatt.
    
            CSSRule#parentRule always null
            https://bugs.webkit.org/show_bug.cgi?id=46228
    
            Ensure MediaList child rules have the MediaList set as parent
            in order to correct their parentRule correctness.
    
            Test: fast/dom/css-mediarule-parentRule.html
    
            * css/CSSMediaRule.cpp:
            (WebCore::CSSMediaRule::CSSMediaRule):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ef33b8c..c18d295 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-05  Rob Buis  <rwlbuis at gmail.com>
+
+        Reviewed by David Hyatt.
+
+        CSSRule#parentRule always null
+        https://bugs.webkit.org/show_bug.cgi?id=46228
+
+        Test that parentRule on the child rule of MediaRule is equal to that MediaRule.
+
+        * fast/dom/css-mediarule-parentRule-expected.txt: Added.
+        * fast/dom/css-mediarule-parentRule.html: Added.
+        * fast/dom/script-tests/css-mediarule-parentRule.js: Added.
+
 2010-11-04  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Kent Tamura.
diff --git a/LayoutTests/fast/dom/css-mediarule-parentRule-expected.txt b/LayoutTests/fast/dom/css-mediarule-parentRule-expected.txt
new file mode 100644
index 0000000..469042a
--- /dev/null
+++ b/LayoutTests/fast/dom/css-mediarule-parentRule-expected.txt
@@ -0,0 +1,10 @@
+This tests that calling parentRule on the child rule of MediaRule is equal to that MediaRule.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS childRule.parentRule is mediaRule
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/css-mediarule-parentRule.html b/LayoutTests/fast/dom/css-mediarule-parentRule.html
new file mode 100644
index 0000000..e584611
--- /dev/null
+++ b/LayoutTests/fast/dom/css-mediarule-parentRule.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/css-mediarule-parentRule.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/script-tests/css-mediarule-parentRule.js b/LayoutTests/fast/dom/script-tests/css-mediarule-parentRule.js
new file mode 100644
index 0000000..f6f655f
--- /dev/null
+++ b/LayoutTests/fast/dom/script-tests/css-mediarule-parentRule.js
@@ -0,0 +1,18 @@
+description(
+'This tests that calling parentRule on the child rule of MediaRule is equal to that MediaRule.'
+);
+
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var head = document.getElementsByTagName('head')[0];
+head.innerHTML = "<style>@media all { a { border-color: red; } }</style>";
+
+var styleSheetList = document.styleSheets;
+var styleSheet = styleSheetList[0];
+var mediaRule = styleSheet.cssRules[0];
+var childRule = mediaRule.cssRules[0];
+
+shouldBe("childRule.parentRule", "mediaRule")
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 668e674..3ef9a13 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-05  Rob Buis  <rwlbuis at gmail.com>
+
+        Reviewed by David Hyatt.
+
+        CSSRule#parentRule always null
+        https://bugs.webkit.org/show_bug.cgi?id=46228
+
+        Ensure MediaList child rules have the MediaList set as parent
+        in order to correct their parentRule correctness.
+
+        Test: fast/dom/css-mediarule-parentRule.html
+
+        * css/CSSMediaRule.cpp:
+        (WebCore::CSSMediaRule::CSSMediaRule):
+
 2010-11-04  Xan Lopez  <xlopez at igalia.com>
 
         Fix the GTK+ build.
diff --git a/WebCore/css/CSSMediaRule.cpp b/WebCore/css/CSSMediaRule.cpp
index d1c220b..6348762 100644
--- a/WebCore/css/CSSMediaRule.cpp
+++ b/WebCore/css/CSSMediaRule.cpp
@@ -33,6 +33,9 @@ CSSMediaRule::CSSMediaRule(CSSStyleSheet* parent, PassRefPtr<MediaList> media, P
     , m_lstMedia(media)
     , m_lstCSSRules(rules)
 {
+    int length = m_lstCSSRules->length();
+    for (int i = 0; i < length; i++)
+        m_lstCSSRules->item(i)->setParent(this);
 }
 
 CSSMediaRule::~CSSMediaRule()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list