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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 10 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
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-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 {onwebkitfullscreenchangeAttr, EventTypeNames::webkitfullscreenchange}, 410 {onwebkitfullscreenchangeAttr, EventTypeNames::webkitfullscreenchange},
411 {onwebkitfullscreenerrorAttr, EventTypeNames::webkitfullscreenerror}, 411 {onwebkitfullscreenerrorAttr, EventTypeNames::webkitfullscreenerror},
412 {onwebkittransitionendAttr, EventTypeNames::webkitTransitionEnd}, 412 {onwebkittransitionendAttr, EventTypeNames::webkitTransitionEnd},
413 {onwheelAttr, EventTypeNames::wheel}, 413 {onwheelAttr, EventTypeNames::wheel},
414 }; 414 };
415 415
416 for (const auto& name : attrToEventNames) 416 for (const auto& name : attrToEventNames)
417 attributeNameToEventNameMap.set(name.attr.localName(), name.event); 417 attributeNameToEventNameMap.set(name.attr.localName(), name.event);
418 } 418 }
419 419
420 return attributeNameToEventNameMap.get(attrName.localName()); 420 return attributeNameToEventNameMap.at(attrName.localName());
421 } 421 }
422 422
423 void HTMLElement::attributeChanged(const AttributeModificationParams& params) { 423 void HTMLElement::attributeChanged(const AttributeModificationParams& params) {
424 Element::attributeChanged(params); 424 Element::attributeChanged(params);
425 if (params.reason != AttributeModificationReason::kDirectly) 425 if (params.reason != AttributeModificationReason::kDirectly)
426 return; 426 return;
427 // adjustedFocusedElementInTreeScope() is not trivial. We should check 427 // adjustedFocusedElementInTreeScope() is not trivial. We should check
428 // attribute names, then call adjustedFocusedElementInTreeScope(). 428 // attribute names, then call adjustedFocusedElementInTreeScope().
429 if (params.name == hiddenAttr && !params.newValue.isNull()) { 429 if (params.name == hiddenAttr && !params.newValue.isNull()) {
430 if (adjustedFocusedElementInTreeScope() == this) 430 if (adjustedFocusedElementInTreeScope() == this)
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1179
1180 #ifndef NDEBUG 1180 #ifndef NDEBUG
1181 1181
1182 // For use in the debugger 1182 // For use in the debugger
1183 void dumpInnerHTML(blink::HTMLElement*); 1183 void dumpInnerHTML(blink::HTMLElement*);
1184 1184
1185 void dumpInnerHTML(blink::HTMLElement* element) { 1185 void dumpInnerHTML(blink::HTMLElement* element) {
1186 printf("%s\n", element->innerHTML().ascii().data()); 1186 printf("%s\n", element->innerHTML().ascii().data());
1187 } 1187 }
1188 #endif 1188 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCollection.h ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698