Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: Source/core/html/HTMLElement.cpp

Issue 23583032: Add onanimationXXX attributes on HTML elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/core/page/DOMWindow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 AtomicString HTMLElement::eventNameForAttributeName(const QualifiedName& attrNam e) const 197 AtomicString HTMLElement::eventNameForAttributeName(const QualifiedName& attrNam e) const
198 { 198 {
199 if (!attrName.namespaceURI().isNull()) 199 if (!attrName.namespaceURI().isNull())
200 return AtomicString(); 200 return AtomicString();
201 201
202 typedef HashMap<AtomicString, AtomicString> StringToStringMap; 202 typedef HashMap<AtomicString, AtomicString> StringToStringMap;
203 DEFINE_STATIC_LOCAL(StringToStringMap, attributeNameToEventNameMap, ()); 203 DEFINE_STATIC_LOCAL(StringToStringMap, attributeNameToEventNameMap, ());
204 if (!attributeNameToEventNameMap.size()) { 204 if (!attributeNameToEventNameMap.size()) {
205 attributeNameToEventNameMap.set(onanimationstartAttr.localName(), eventN ames().animationstartEvent);
206 attributeNameToEventNameMap.set(onanimationiterationAttr.localName(), ev entNames().animationiterationEvent);
207 attributeNameToEventNameMap.set(onanimationendAttr.localName(), eventNam es().animationendEvent);
205 attributeNameToEventNameMap.set(onclickAttr.localName(), eventNames().cl ickEvent); 208 attributeNameToEventNameMap.set(onclickAttr.localName(), eventNames().cl ickEvent);
206 attributeNameToEventNameMap.set(oncontextmenuAttr.localName(), eventName s().contextmenuEvent); 209 attributeNameToEventNameMap.set(oncontextmenuAttr.localName(), eventName s().contextmenuEvent);
207 attributeNameToEventNameMap.set(ondblclickAttr.localName(), eventNames() .dblclickEvent); 210 attributeNameToEventNameMap.set(ondblclickAttr.localName(), eventNames() .dblclickEvent);
208 attributeNameToEventNameMap.set(onmousedownAttr.localName(), eventNames( ).mousedownEvent); 211 attributeNameToEventNameMap.set(onmousedownAttr.localName(), eventNames( ).mousedownEvent);
209 attributeNameToEventNameMap.set(onmouseenterAttr.localName(), eventNames ().mouseenterEvent); 212 attributeNameToEventNameMap.set(onmouseenterAttr.localName(), eventNames ().mouseenterEvent);
210 attributeNameToEventNameMap.set(onmouseleaveAttr.localName(), eventNames ().mouseleaveEvent); 213 attributeNameToEventNameMap.set(onmouseleaveAttr.localName(), eventNames ().mouseleaveEvent);
211 attributeNameToEventNameMap.set(onmousemoveAttr.localName(), eventNames( ).mousemoveEvent); 214 attributeNameToEventNameMap.set(onmousemoveAttr.localName(), eventNames( ).mousemoveEvent);
212 attributeNameToEventNameMap.set(onmouseoutAttr.localName(), eventNames() .mouseoutEvent); 215 attributeNameToEventNameMap.set(onmouseoutAttr.localName(), eventNames() .mouseoutEvent);
213 attributeNameToEventNameMap.set(onmouseoverAttr.localName(), eventNames( ).mouseoverEvent); 216 attributeNameToEventNameMap.set(onmouseoverAttr.localName(), eventNames( ).mouseoverEvent);
214 attributeNameToEventNameMap.set(onmouseupAttr.localName(), eventNames(). mouseupEvent); 217 attributeNameToEventNameMap.set(onmouseupAttr.localName(), eventNames(). mouseupEvent);
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 #ifndef NDEBUG 1102 #ifndef NDEBUG
1100 1103
1101 // For use in the debugger 1104 // For use in the debugger
1102 void dumpInnerHTML(WebCore::HTMLElement*); 1105 void dumpInnerHTML(WebCore::HTMLElement*);
1103 1106
1104 void dumpInnerHTML(WebCore::HTMLElement* element) 1107 void dumpInnerHTML(WebCore::HTMLElement* element)
1105 { 1108 {
1106 printf("%s\n", element->innerHTML().ascii().data()); 1109 printf("%s\n", element->innerHTML().ascii().data());
1107 } 1110 }
1108 #endif 1111 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/core/page/DOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698