Bug 118419 - [GTK] Layout Test fast/css/style-scoped/registering.html is failing
Summary: [GTK] Layout Test fast/css/style-scoped/registering.html is failing
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
Depends on:
Blocks:
 
Reported: 2013-07-05 08:38 PDT by Simon Pena
Modified: 2014-03-08 12:05 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.