Title: [129551] trunk/Source/WebCore
- Revision
- 129551
- Author
- [email protected]
- Date
- 2012-09-25 13:47:23 -0700 (Tue, 25 Sep 2012)
Log Message
Remove unused DOMAttrModified from EventsNames and Document::ListenerType
https://bugs.webkit.org/show_bug.cgi?id=97591
Reviewed by Ojan Vafai.
WebKit does not, and will never, fire DOMAttrModified events, so
there's no need to create the "DOMAttrModified" event name.
The only use of the name was to set the DOMATTRMODIFIED_LISTENER bit
on Document; with the name gone, the enum value can be removed as well.
* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded):
* dom/Document.h: Remove DOMATTRMODIFIED_LISTENER, and switch this
enum to use shift-left instead of hex values, so as to be easier to
update in future.
* dom/EventNames.h:
(WebCore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129550 => 129551)
--- trunk/Source/WebCore/ChangeLog 2012-09-25 20:44:19 UTC (rev 129550)
+++ trunk/Source/WebCore/ChangeLog 2012-09-25 20:47:23 UTC (rev 129551)
@@ -1,3 +1,24 @@
+2012-09-25 Adam Klein <[email protected]>
+
+ Remove unused DOMAttrModified from EventsNames and Document::ListenerType
+ https://bugs.webkit.org/show_bug.cgi?id=97591
+
+ Reviewed by Ojan Vafai.
+
+ WebKit does not, and will never, fire DOMAttrModified events, so
+ there's no need to create the "DOMAttrModified" event name.
+
+ The only use of the name was to set the DOMATTRMODIFIED_LISTENER bit
+ on Document; with the name gone, the enum value can be removed as well.
+
+ * dom/Document.cpp:
+ (WebCore::Document::addListenerTypeIfNeeded):
+ * dom/Document.h: Remove DOMATTRMODIFIED_LISTENER, and switch this
+ enum to use shift-left instead of hex values, so as to be easier to
+ update in future.
+ * dom/EventNames.h:
+ (WebCore):
+
2012-09-25 Leo Yang <[email protected]>
GraphicsContext3D::compileShader is using incorrect string length in GraphicsContext3DOpenGLCommon.cpp
Modified: trunk/Source/WebCore/dom/Document.cpp (129550 => 129551)
--- trunk/Source/WebCore/dom/Document.cpp 2012-09-25 20:44:19 UTC (rev 129550)
+++ trunk/Source/WebCore/dom/Document.cpp 2012-09-25 20:47:23 UTC (rev 129551)
@@ -3767,8 +3767,6 @@
addMutationEventListenerTypeIfEnabled(DOMNODEREMOVEDFROMDOCUMENT_LISTENER);
else if (eventType == eventNames().DOMNodeInsertedIntoDocumentEvent)
addMutationEventListenerTypeIfEnabled(DOMNODEINSERTEDINTODOCUMENT_LISTENER);
- else if (eventType == eventNames().DOMAttrModifiedEvent)
- addMutationEventListenerTypeIfEnabled(DOMATTRMODIFIED_LISTENER);
else if (eventType == eventNames().DOMCharacterDataModifiedEvent)
addMutationEventListenerTypeIfEnabled(DOMCHARACTERDATAMODIFIED_LISTENER);
else if (eventType == eventNames().overflowchangedEvent)
Modified: trunk/Source/WebCore/dom/Document.h (129550 => 129551)
--- trunk/Source/WebCore/dom/Document.h 2012-09-25 20:44:19 UTC (rev 129550)
+++ trunk/Source/WebCore/dom/Document.h 2012-09-25 20:47:23 UTC (rev 129551)
@@ -757,20 +757,20 @@
// keep track of what types of event listeners are registered, so we don't
// dispatch events unnecessarily
enum ListenerType {
- DOMSUBTREEMODIFIED_LISTENER = 0x01,
- DOMNODEINSERTED_LISTENER = 0x02,
- DOMNODEREMOVED_LISTENER = 0x04,
- DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 0x08,
- DOMNODEINSERTEDINTODOCUMENT_LISTENER = 0x10,
- DOMATTRMODIFIED_LISTENER = 0x20,
- DOMCHARACTERDATAMODIFIED_LISTENER = 0x40,
- OVERFLOWCHANGED_LISTENER = 0x80,
- ANIMATIONEND_LISTENER = 0x100,
- ANIMATIONSTART_LISTENER = 0x200,
- ANIMATIONITERATION_LISTENER = 0x400,
- TRANSITIONEND_LISTENER = 0x800,
- BEFORELOAD_LISTENER = 0x1000,
- SCROLL_LISTENER = 0x2000
+ DOMSUBTREEMODIFIED_LISTENER = 1,
+ DOMNODEINSERTED_LISTENER = 1 << 1,
+ DOMNODEREMOVED_LISTENER = 1 << 2,
+ DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3,
+ DOMNODEINSERTEDINTODOCUMENT_LISTENER = 1 << 4,
+ DOMCHARACTERDATAMODIFIED_LISTENER = 1 << 5,
+ OVERFLOWCHANGED_LISTENER = 1 << 6,
+ ANIMATIONEND_LISTENER = 1 << 7,
+ ANIMATIONSTART_LISTENER = 1 << 8,
+ ANIMATIONITERATION_LISTENER = 1 << 9,
+ TRANSITIONEND_LISTENER = 1 << 10,
+ BEFORELOAD_LISTENER = 1 << 11,
+ SCROLL_LISTENER = 1 << 12
+ // 3 bits remaining
};
bool hasListenerType(ListenerType listenerType) const { return (m_listenerTypes & listenerType); }
Modified: trunk/Source/WebCore/dom/EventNames.h (129550 => 129551)
--- trunk/Source/WebCore/dom/EventNames.h 2012-09-25 20:44:19 UTC (rev 129550)
+++ trunk/Source/WebCore/dom/EventNames.h 2012-09-25 20:47:23 UTC (rev 129551)
@@ -126,7 +126,6 @@
macro(DOMActivate) \
macro(DOMFocusIn) \
macro(DOMFocusOut) \
- macro(DOMAttrModified) \
macro(DOMCharacterDataModified) \
macro(DOMNodeInserted) \
macro(DOMNodeInsertedIntoDocument) \
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes