Title: [154991] trunk
Revision
154991
Author
commit-qu...@webkit.org
Date
2013-09-03 11:30:08 -0700 (Tue, 03 Sep 2013)

Log Message

Unreviewed, rolling out r154881.
http://trac.webkit.org/changeset/154881
https://bugs.webkit.org/show_bug.cgi?id=120643

Crashes on macworld.com (Requested by kling on #webkit).

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):

LayoutTests:

* fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt: Removed.
* fast/dom/Element/setAttributeNode-for-existing-attribute.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (154990 => 154991)


--- trunk/LayoutTests/ChangeLog	2013-09-03 17:33:22 UTC (rev 154990)
+++ trunk/LayoutTests/ChangeLog	2013-09-03 18:30:08 UTC (rev 154991)
@@ -1,3 +1,14 @@
+2013-09-03  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r154881.
+        http://trac.webkit.org/changeset/154881
+        https://bugs.webkit.org/show_bug.cgi?id=120643
+
+        Crashes on macworld.com (Requested by kling on #webkit).
+
+        * fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt: Removed.
+        * fast/dom/Element/setAttributeNode-for-existing-attribute.html: Removed.
+
 2013-09-03  Mihnea Ovidenie  <mih...@adobe.com>
 
         [CSSRegions] Pseudo-elements as regions should not be exposed to JS

Deleted: trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt (154990 => 154991)


--- trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt	2013-09-03 17:33:22 UTC (rev 154990)
+++ trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt	2013-09-03 18:30:08 UTC (rev 154991)
@@ -1,3 +0,0 @@
-Testcase for bug 120293: setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.\nThe issue can be manually verified by ascertaining that a green colored block is displayed instead of a red one.
- 
-background-color specified with lowercase style attribute was: red and specified with uppercase style attribute is: green

Deleted: trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html (154990 => 154991)


--- trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html	2013-09-03 17:33:22 UTC (rev 154990)
+++ trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html	2013-09-03 18:30:08 UTC (rev 154991)
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script>
-function runTest() {
-    if (window.testRunner)
-        testRunner.dumpAsText();
-        
-    var testElement = document.getElementById('test');
-    var testElementBgColor = testElement.style.background;
-    
-    var newAttr = document.createAttribute("STYLE");
-    newAttr.value = "background-color: green";
-    testElement.setAttributeNode(newAttr);
-    var testElementBgColorAfterReset = testElement.style.background;
-    
-    document.getElementById('result').innerHTML = "background-color specified with lowercase style attribute was: "+testElementBgColor+" and specified with uppercase style attribute is: "+testElementBgColorAfterReset;
-}
-</script>
-</head>
-<body _onload_="runTest();">
-<div>Testcase for bug <a href="" setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.\nThe issue can be manually verified by ascertaining that a green colored block is displayed instead of a red one.</div>
-<div id="test" style="background-color: red;"/>&nbsp;</div>
-<div id="result"></div>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (154990 => 154991)


--- trunk/Source/WebCore/ChangeLog	2013-09-03 17:33:22 UTC (rev 154990)
+++ trunk/Source/WebCore/ChangeLog	2013-09-03 18:30:08 UTC (rev 154991)
@@ -1,3 +1,14 @@
+2013-09-03  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r154881.
+        http://trac.webkit.org/changeset/154881
+        https://bugs.webkit.org/show_bug.cgi?id=120643
+
+        Crashes on macworld.com (Requested by kling on #webkit).
+
+        * dom/Element.cpp:
+        (WebCore::Element::setAttributeInternal):
+
 2013-09-03  Andre Moreira Magalhaes   <andre.magalh...@collabora.co.uk>
 
         [GStreamer] Don't set state to NULL until element is destroyed

Modified: trunk/Source/WebCore/dom/Element.cpp (154990 => 154991)


--- trunk/Source/WebCore/dom/Element.cpp	2013-09-03 17:33:22 UTC (rev 154990)
+++ trunk/Source/WebCore/dom/Element.cpp	2013-09-03 18:30:08 UTC (rev 154991)
@@ -963,24 +963,21 @@
         return;
     }
 
-    bool valueChanged = newValue != attributeAt(index).value();
-    const QualifiedName& attributeName = (!inSynchronizationOfLazyAttribute || valueChanged) ? attributeAt(index).name() : name;
-
     if (!inSynchronizationOfLazyAttribute)
-        willModifyAttribute(attributeName, attributeAt(index).value(), newValue);
+        willModifyAttribute(name, attributeAt(index).value(), newValue);
 
-    if (valueChanged) {
+    if (newValue != attributeAt(index).value()) {
         // If there is an Attr node hooked to this attribute, the Attr::setValue() call below
         // will write into the ElementData.
         // FIXME: Refactor this so it makes some sense.
-        if (RefPtr<Attr> attrNode = inSynchronizationOfLazyAttribute ? 0 : attrIfExists(attributeName))
+        if (RefPtr<Attr> attrNode = inSynchronizationOfLazyAttribute ? 0 : attrIfExists(name))
             attrNode->setValue(newValue);
         else
             ensureUniqueElementData().attributeAt(index).setValue(newValue);
     }
 
     if (!inSynchronizationOfLazyAttribute)
-        didModifyAttribute(attributeName, newValue);
+        didModifyAttribute(name, newValue);
 }
 
 static inline AtomicString makeIdForStyleResolution(const AtomicString& value, bool inQuirksMode)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to