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

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

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dmazzoni comments Created 3 years, 11 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 451
452 void HTMLElement::parseAttribute(const AttributeModificationParams& params) { 452 void HTMLElement::parseAttribute(const AttributeModificationParams& params) {
453 if (params.name == tabindexAttr || params.name == XMLNames::langAttr) 453 if (params.name == tabindexAttr || params.name == XMLNames::langAttr)
454 return Element::parseAttribute(params); 454 return Element::parseAttribute(params);
455 455
456 if (params.name == dirAttr) { 456 if (params.name == dirAttr) {
457 dirAttributeChanged(params.newValue); 457 dirAttributeChanged(params.newValue);
458 } else if (params.name == langAttr) { 458 } else if (params.name == langAttr) {
459 pseudoStateChanged(CSSSelector::PseudoLang); 459 pseudoStateChanged(CSSSelector::PseudoLang);
460 } else if (params.name == inertAttr) {
461 UseCounter::count(document(), UseCounter::InertAttribute);
460 } else { 462 } else {
461 const AtomicString& eventName = eventNameForAttributeName(params.name); 463 const AtomicString& eventName = eventNameForAttributeName(params.name);
462 if (!eventName.isNull()) { 464 if (!eventName.isNull()) {
463 setAttributeEventListener( 465 setAttributeEventListener(
464 eventName, 466 eventName,
465 createAttributeEventListener(this, params.name, params.newValue, 467 createAttributeEventListener(this, params.name, params.newValue,
466 eventParameterName())); 468 eventParameterName()));
467 } 469 }
468 } 470 }
469 } 471 }
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1217
1216 #ifndef NDEBUG 1218 #ifndef NDEBUG
1217 1219
1218 // For use in the debugger 1220 // For use in the debugger
1219 void dumpInnerHTML(blink::HTMLElement*); 1221 void dumpInnerHTML(blink::HTMLElement*);
1220 1222
1221 void dumpInnerHTML(blink::HTMLElement* element) { 1223 void dumpInnerHTML(blink::HTMLElement* element) {
1222 printf("%s\n", element->innerHTML().ascii().data()); 1224 printf("%s\n", element->innerHTML().ascii().data());
1223 } 1225 }
1224 #endif 1226 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698