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

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

Issue 1485363002: Use invalidation sets for :lang changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another rebase Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | no next file » | 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-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. (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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToEventNames); i++) 353 for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToEventNames); i++)
354 attributeNameToEventNameMap.set(attrToEventNames[i].attr.localName() , attrToEventNames[i].event); 354 attributeNameToEventNameMap.set(attrToEventNames[i].attr.localName() , attrToEventNames[i].event);
355 } 355 }
356 356
357 return attributeNameToEventNameMap.get(attrName.localName()); 357 return attributeNameToEventNameMap.get(attrName.localName());
358 } 358 }
359 359
360 void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value) 360 void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
361 { 361 {
362 if (name == tabindexAttr) 362 if (name == tabindexAttr || name == XMLNames::langAttr)
363 return Element::parseAttribute(name, oldValue, value); 363 return Element::parseAttribute(name, oldValue, value);
364 364
365 if (name == dirAttr) { 365 if (name == dirAttr) {
366 dirAttributeChanged(value); 366 dirAttributeChanged(value);
367 } else if (name == langAttr) {
368 pseudoStateChanged(CSSSelector::PseudoLang);
367 } else { 369 } else {
368 const AtomicString& eventName = eventNameForAttributeName(name); 370 const AtomicString& eventName = eventNameForAttributeName(name);
369 if (!eventName.isNull()) 371 if (!eventName.isNull())
370 setAttributeEventListener(eventName, createAttributeEventListener(th is, name, value, eventParameterName())); 372 setAttributeEventListener(eventName, createAttributeEventListener(th is, name, value, eventParameterName()));
371 } 373 }
372 } 374 }
373 375
374 PassRefPtrWillBeRawPtr<DocumentFragment> HTMLElement::textToFragment(const Strin g& text, ExceptionState& exceptionState) 376 PassRefPtrWillBeRawPtr<DocumentFragment> HTMLElement::textToFragment(const Strin g& text, ExceptionState& exceptionState)
375 { 377 {
376 RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(doc ument()); 378 RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(doc ument());
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 #ifndef NDEBUG 1033 #ifndef NDEBUG
1032 1034
1033 // For use in the debugger 1035 // For use in the debugger
1034 void dumpInnerHTML(blink::HTMLElement*); 1036 void dumpInnerHTML(blink::HTMLElement*);
1035 1037
1036 void dumpInnerHTML(blink::HTMLElement* element) 1038 void dumpInnerHTML(blink::HTMLElement* element)
1037 { 1039 {
1038 printf("%s\n", element->innerHTML().ascii().data()); 1040 printf("%s\n", element->innerHTML().ascii().data());
1039 } 1041 }
1040 #endif 1042 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698