Title: [145470] branches/chromium/1410
Revision
145470
Author
[email protected]
Date
2013-03-11 19:52:16 -0700 (Mon, 11 Mar 2013)

Log Message

Merge 144713
BUG=174846
Review URL: https://codereview.chromium.org/12518025

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate-expected.txt (from rev 144713, trunk/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate-expected.txt) (0 => 145470)


--- branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate-expected.txt	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate-expected.txt	2013-03-12 02:52:16 UTC (rev 145470)
@@ -0,0 +1 @@
+Changing a documents stylesheet's innerHTML should not crash.

Copied: branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate.html (from rev 144713, trunk/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate.html) (0 => 145470)


--- branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate.html	                        (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/css/stylesheet.innerHTML-calls-didmutate.html	2013-03-12 02:52:16 UTC (rev 145470)
@@ -0,0 +1,23 @@
+<style>
+ h6 { 
+   text-shadow: 0.85714in -110pc -0.216688mm;
+ }
+ p + h6 {
+   left: 180cm;
+ }
+</style>
+<script>
+function main() {
+  var styletag = document.getElementsByTagName("style")[0];
+  styletag.type = "p";
+  styletag.innerHTML = "t";
+  var second_h6 = document.getElementsByTagName("h6")[1];
+  second_h6.align = 'a';
+  document.styleSheets[0].removeRule(0);
+
+  if (window.testRunner)
+    testRunner.dumpAsText();
+}
+</script>
+<body _onload_=main()><h6><h6>
+Changing a documents stylesheet's innerHTML should not crash.

Modified: branches/chromium/1410/Source/WebCore/css/CSSStyleSheet.h (145469 => 145470)


--- branches/chromium/1410/Source/WebCore/css/CSSStyleSheet.h	2013-03-12 02:48:30 UTC (rev 145469)
+++ branches/chromium/1410/Source/WebCore/css/CSSStyleSheet.h	2013-03-12 02:52:16 UTC (rev 145470)
@@ -74,7 +74,7 @@
     unsigned length() const;
     CSSRule* item(unsigned index);
 
-    virtual void clearOwnerNode() OVERRIDE { m_ownerNode = 0; }
+    virtual void clearOwnerNode() OVERRIDE { didMutate(); m_ownerNode = 0; }
     virtual CSSImportRule* ownerRule() const OVERRIDE { return m_ownerRule; }
     virtual KURL baseURL() const OVERRIDE;
     virtual bool isLoading() const OVERRIDE;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to