Bug 118419

Summary: [GTK] Layout Test fast/css/style-scoped/registering.html is failing
Product: WebKit Reporter: Simon Pena <spenap>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: kangil.han, mrobinson, obzhirov
Priority: P2 Keywords: Gtk, LayoutTestFailure
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Simon Pena 2013-07-05 08:38:31 PDT
The following layout test is failing on GTK

fast/css/style-scoped/registering.html

It started failing after r152291
Comment 1 Anton Obzhirov 2013-07-08 08:11:50 PDT
I am checking this one. It started to fail after 152290.
Comment 2 Anton Obzhirov 2013-07-09 02:57:19 PDT
After checking:

if I revert one of the changes made in 152290 (http://trac.webkit.org/changeset/152290)

size_t Node::numberOfScopedHTMLStyleChildren() const
{
-    size_t count = 0;
-    for (Element* element = ElementTraversal::firstWithin(this); element; element = ElementTraversal::next(element, this))
-        if (isHTMLStyleElement(element) && toHTMLStyleElement(element)->isRegisteredAsScoped())
-            count++;
-
+       size_t c = 0;
+    for (Node* child = firstChild(); child; child = child->nextSibling()) {
+        if (isHTMLStyleElement(child) && toHTMLStyleElement(child)->isRegisteredAsScoped())
+               c++;
+    }

test starts to pass again. The logic was slightly changed and the cycle started to traverse more html style elements then it did before hence count in some cases has increased as well. I am going to check with kangil.han@samsung.com
Comment 3 Anton Obzhirov 2013-07-09 03:57:40 PDT
Test results on gtk port:

Test [un]registering a <style scoped> element from its parent

--- Initial ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Attaching ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Unsetting @scoped ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Re-setting @scoped ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Inserting/removing scope elements from document ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 1
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 1
--- Multiple scoped style elements within single scope ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 3
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Removing scoping element from document ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope2) is 0
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Inserting scope within other scope ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 2
FAIL internals.numberOfScopedHTMLStyleChildren(scope2) should be 1. Was 3.
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
--- Cloning <style scoped> and parents ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 2
FAIL internals.numberOfScopedHTMLStyleChildren(scope2) should be 1. Was 3.
PASS internals.numberOfScopedHTMLStyleChildren(scope3) is 0
PASS internals.numberOfScopedHTMLStyleChildren(clonescope1deep) is 0
PASS internals.numberOfScopedHTMLStyleChildren(clonescope1shallow) is 0
PASS internals.numberOfScopedHTMLStyleChildren(clonescope2deep) is 0
PASS internals.numberOfScopedHTMLStyleChildren(clonescope2shallow) is 0
--- inserting clones into single parent ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 2
FAIL internals.numberOfScopedHTMLStyleChildren(scope2) should be 1. Was 3.
FAIL internals.numberOfScopedHTMLStyleChildren(scope3) should be 4. Was 9.
PASS internals.numberOfScopedHTMLStyleChildren(clonescope1deep) is 2
PASS internals.numberOfScopedHTMLStyleChildren(clonescope1shallow) is 0
FAIL internals.numberOfScopedHTMLStyleChildren(clonescope2deep) should be 1. Was 3.
PASS internals.numberOfScopedHTMLStyleChildren(clonescope2shallow) is 0
--- Unsetting @scoped in nested scope ---
PASS internals.numberOfScopedHTMLStyleChildren(scope1) is 1
FAIL internals.numberOfScopedHTMLStyleChildren(scope2) should be 0. Was 1.
FAIL internals.numberOfScopedHTMLStyleChildren(scope3) should be 4. Was 9.
--- DONE ---
PASS successfullyParsed is true

TEST COMPLETE
Comment 4 Martin Robinson 2014-03-08 12:05:00 PST
Style scoped support removed.