2010-01-22 Kelly Norton <knorton@google.com>
authorknorton@google.com <knorton@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jan 2010 00:31:07 +0000 (00:31 +0000)
committerknorton@google.com <knorton@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jan 2010 00:31:07 +0000 (00:31 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: JavaScript Error in DOMAgent.js:375 (_attributesUpdated)
        https://bugs.webkit.org/show_bug.cgi?id=33915

        Errors were caused by the fact that Element::attributes calls Element::setAttribute to
        synchronized the styleAttr. The fix is to simply check the synchronizing style attribute
        flag.

        * dom/Element.cpp:
        (WebCore::Element::setAttribute): Checked for case where styleAttr is being synchronized.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53736 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/dom/Element.cpp

index 46034ef93be1d3653617125064fdfad8ed3ea212..2c38200fd75166f1c60064e6495c45f29c359f49 100644 (file)
@@ -1,3 +1,17 @@
+2010-01-22  Kelly Norton  <knorton@google.com>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: JavaScript Error in DOMAgent.js:375 (_attributesUpdated)
+        https://bugs.webkit.org/show_bug.cgi?id=33915
+
+        Errors were caused by the fact that Element::attributes calls Element::setAttribute to
+        synchronized the styleAttr. The fix is to simply check the synchronizing style attribute
+        flag.
+
+        * dom/Element.cpp:
+        (WebCore::Element::setAttribute): Checked for case where styleAttr is being synchronized.
+
 2010-01-22  Eric Carlson  <eric.carlson@apple.com>
 
         Reviewed by Simon Fraser.
index 544532dedc126b00af72f0dbd7b207f199b1c637..27926fb21650ad29d1d340ebd583b155f709be5e 100644 (file)
@@ -532,8 +532,10 @@ void Element::setAttribute(const AtomicString& name, const AtomicString& value,
 
 #if ENABLE(INSPECTOR)
     if (Page* page = document()->page()) {
-        if (InspectorController* inspectorController = page->inspectorController())
-            inspectorController->didModifyDOMAttr(this);
+        if (InspectorController* inspectorController = page->inspectorController()) {
+            if (!m_synchronizingStyleAttribute)
+                inspectorController->didModifyDOMAttr(this);
+        }
     }
 #endif
 }
@@ -559,8 +561,10 @@ void Element::setAttribute(const QualifiedName& name, const AtomicString& value,
 
 #if ENABLE(INSPECTOR)
     if (Page* page = document()->page()) {
-        if (InspectorController* inspectorController = page->inspectorController())
-            inspectorController->didModifyDOMAttr(this);
+        if (InspectorController* inspectorController = page->inspectorController()) {
+            if (!m_synchronizingStyleAttribute)
+                inspectorController->didModifyDOMAttr(this);
+        }
     }
 #endif
 }