Title: [121344] trunk/Source/WebCore
Revision
121344
Author
shin...@chromium.org
Date
2012-06-27 08:18:07 -0700 (Wed, 27 Jun 2012)

Log Message

HTMLStyleElement::removedFrom seems incorrect.
https://bugs.webkit.org/show_bug.cgi?id=89986

Reviewed by Hajime Morita.

This is a follow-up patch for Bug 88495. The Same bug as Bug 88495 seems to exist on
HTMLStyleElement::removedFrom().

No new tests, hard to write a test case.

* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::removedFrom):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121343 => 121344)


--- trunk/Source/WebCore/ChangeLog	2012-06-27 15:06:24 UTC (rev 121343)
+++ trunk/Source/WebCore/ChangeLog	2012-06-27 15:18:07 UTC (rev 121344)
@@ -1,3 +1,18 @@
+2012-06-27  Shinya Kawanaka  <shin...@chromium.org>
+
+        HTMLStyleElement::removedFrom seems incorrect.
+        https://bugs.webkit.org/show_bug.cgi?id=89986
+
+        Reviewed by Hajime Morita.
+
+        This is a follow-up patch for Bug 88495. The Same bug as Bug 88495 seems to exist on
+        HTMLStyleElement::removedFrom().
+
+        No new tests, hard to write a test case.
+
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::removedFrom):
+
 2012-06-27  Mike Reed  <r...@google.com>
 
         Cleanup scaling code in text-decorations for SVG InlineText. Use scale() instead of getCTM/normalizeTransform/setCTM

Modified: trunk/Source/WebCore/html/HTMLStyleElement.cpp (121343 => 121344)


--- trunk/Source/WebCore/html/HTMLStyleElement.cpp	2012-06-27 15:06:24 UTC (rev 121343)
+++ trunk/Source/WebCore/html/HTMLStyleElement.cpp	2012-06-27 15:18:07 UTC (rev 121344)
@@ -199,9 +199,13 @@
     // Now, if we want to register <style scoped> even if it's not inDocument,
     // we'd need to find a way to discern whether that is the case, or whether <style scoped> itself is about to be removed.
     if (m_scopedStyleRegistrationState != NotRegistered) {
-        ContainerNode* scope = parentNode()? parentNode() : insertionPoint;
-        if (m_scopedStyleRegistrationState == RegisteredInShadowRoot)
-            scope = scope->shadowRoot();
+        ContainerNode* scope;
+        if (m_scopedStyleRegistrationState == RegisteredInShadowRoot) {
+            scope = shadowRoot();
+            if (!scope)
+                scope = insertionPoint->shadowRoot();
+        } else
+            scope = parentNode() ? parentNode() : insertionPoint;
         unregisterWithScopingNode(scope);
     }
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to