OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |