[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
carol.szabo at nokia.com
carol.szabo at nokia.com
Mon Feb 21 00:32:37 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 908f9ae26353180e139af8ca80bf7a5857244f28
Author: carol.szabo at nokia.com <carol.szabo at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 1 20:28:08 2011 +0000
2011-02-01 Carol Szabo <carol.szabo at nokia.com>
Reviewed by David Hyatt.
layoutTestController.counterValueForElementById does not return the correct value
https://bugs.webkit.org/show_bug.cgi?id=53037
* fast/css/counters/deep-before-expected.txt: Added.
* fast/css/counters/deep-before.html: Added.
This tests whether DumpRenderTree properly retrieves counters and
whether counters are properly set when the before pseudo element's
renderer is not a direct child of the generating element's renderer.
2011-02-01 Carol Szabo <carol.szabo at nokia.com>
Reviewed by David Hyatt.
layoutTestController.counterValueForElementById does not return the correct value
https://bugs.webkit.org/show_bug.cgi?id=53037
Test: fast/css/counters/deep-before.html
* rendering/RenderTreeAsText.cpp:
(WebCore::counterValueForElement):
Modified to use the newly available RenderObject::beforePseudoElement()
and RenderObject::afterPseudoElement() instead of the old imperfect
algorithm to find the before and after pseudo elements.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4e2ba69..5f060e1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2011-02-01 Carol Szabo <carol.szabo at nokia.com>
+
+ Reviewed by David Hyatt.
+
+ layoutTestController.counterValueForElementById does not return the correct value
+ https://bugs.webkit.org/show_bug.cgi?id=53037
+
+ * fast/css/counters/deep-before-expected.txt: Added.
+ * fast/css/counters/deep-before.html: Added.
+ This tests whether DumpRenderTree properly retrieves counters and
+ whether counters are properly set when the before pseudo element's
+ renderer is not a direct child of the generating element's renderer.
+
2011-02-01 Dimitri Glazkov <dglazkov at chromium.org>
Added more flakiness expectations from bots.
diff --git a/LayoutTests/fast/css/counters/deep-before-expected.txt b/LayoutTests/fast/css/counters/deep-before-expected.txt
new file mode 100644
index 0000000..9b5a181
--- /dev/null
+++ b/LayoutTests/fast/css/counters/deep-before-expected.txt
@@ -0,0 +1,4 @@
+PASS layoutTestController.counterValueForElementById('div1') is '0'
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/counters/deep-before.html b/LayoutTests/fast/css/counters/deep-before.html
new file mode 100644
index 0000000..09ce5f0
--- /dev/null
+++ b/LayoutTests/fast/css/counters/deep-before.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>Counters in :before node that is hidden inside an anonymous block.</title>
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
+ <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content">
+ <meta name="flags" content="">
+ <meta name="assert" content="DumpRenderTree finds couner when anonymous
+ renderers intervene between the element and its :before descendant.">
+ <style type="text/css">
+ #div1:before {
+ content: counters(test, ".");
+ counter-reset: test;
+ }
+ #div1 {
+ border: 2px solid black;
+ }
+ </style>
+ <script src="../../js/resources/js-test-pre.js"></script>
+ <script type="text/javascript">
+
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ function run()
+ {
+ if (!window.layoutTestController)
+ return;
+ shouldBe("layoutTestController.counterValueForElementById('div1')", "'0'");
+
+ debug('');
+ debug('TEST COMPLETE');
+ // Eliminate confusing messages (counter values won't be dumped by dumpAsText).
+ var viewElement = document.getElementById("testView");
+ viewElement.parentNode.removeChild(viewElement);
+ }
+ </script>
+ </head>
+
+ <body onload="run();">
+ <div id="testView">
+ <p>Test passes if there is a "0" in the box below.</p>
+ <div id="div1">
+ <div id="div2"></div>
+ </div>
+ </div>
+ <div id="console"></div>
+ </body>
+</html>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 115d60d..5cec347 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-02-01 Carol Szabo <carol.szabo at nokia.com>
+
+ Reviewed by David Hyatt.
+
+ layoutTestController.counterValueForElementById does not return the correct value
+ https://bugs.webkit.org/show_bug.cgi?id=53037
+
+ Test: fast/css/counters/deep-before.html
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::counterValueForElement):
+ Modified to use the newly available RenderObject::beforePseudoElement()
+ and RenderObject::afterPseudoElement() instead of the old imperfect
+ algorithm to find the before and after pseudo elements.
+
2011-02-01 Anton Muhin <antonm at chromium.org>
Reviewed by Adam Barth.
diff --git a/Source/WebCore/rendering/RenderTreeAsText.cpp b/Source/WebCore/rendering/RenderTreeAsText.cpp
index 5d66b95..070eae8 100644
--- a/Source/WebCore/rendering/RenderTreeAsText.cpp
+++ b/Source/WebCore/rendering/RenderTreeAsText.cpp
@@ -769,13 +769,12 @@ String counterValueForElement(Element* element)
element->document()->updateLayout();
TextStream stream;
bool isFirstCounter = true;
- // The counter renderers should be children of anonymous children
- // (i.e., :before or :after pseudo-elements).
+ // The counter renderers should be children of :before or :after pseudo-elements.
if (RenderObject* renderer = element->renderer()) {
- for (RenderObject* child = renderer->firstChild(); child; child = child->nextSibling()) {
- if (child->isAnonymous())
- writeCounterValuesFromChildren(stream, child, isFirstCounter);
- }
+ if (RenderObject* pseudoElement = renderer->beforePseudoElementRenderer())
+ writeCounterValuesFromChildren(stream, pseudoElement, isFirstCounter);
+ if (RenderObject* pseudoElement = renderer->afterPseudoElementRenderer())
+ writeCounterValuesFromChildren(stream, pseudoElement, isFirstCounter);
}
return stream.release();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list