| 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. | 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 // https://html.spec.whatwg.org/multipage/semantics.html#the-bdi-element | 803 // https://html.spec.whatwg.org/multipage/semantics.html#the-bdi-element |
| 804 const AtomicString& direction = fastGetAttribute(dirAttr); | 804 const AtomicString& direction = fastGetAttribute(dirAttr); |
| 805 return (isHTMLBDIElement(*this) && direction == nullAtom) || | 805 return (isHTMLBDIElement(*this) && direction == nullAtom) || |
| 806 equalIgnoringCase(direction, "auto"); | 806 equalIgnoringCase(direction, "auto"); |
| 807 } | 807 } |
| 808 | 808 |
| 809 TextDirection HTMLElement::directionalityIfhasDirAutoAttribute( | 809 TextDirection HTMLElement::directionalityIfhasDirAutoAttribute( |
| 810 bool& isAuto) const { | 810 bool& isAuto) const { |
| 811 isAuto = hasDirectionAuto(); | 811 isAuto = hasDirectionAuto(); |
| 812 if (!isAuto) | 812 if (!isAuto) |
| 813 return TextDirection::Ltr; | 813 return TextDirection::kLtr; |
| 814 return directionality(); | 814 return directionality(); |
| 815 } | 815 } |
| 816 | 816 |
| 817 TextDirection HTMLElement::directionality( | 817 TextDirection HTMLElement::directionality( |
| 818 Node** strongDirectionalityTextNode) const { | 818 Node** strongDirectionalityTextNode) const { |
| 819 if (isHTMLInputElement(*this)) { | 819 if (isHTMLInputElement(*this)) { |
| 820 HTMLInputElement* inputElement = | 820 HTMLInputElement* inputElement = |
| 821 toHTMLInputElement(const_cast<HTMLElement*>(this)); | 821 toHTMLInputElement(const_cast<HTMLElement*>(this)); |
| 822 bool hasStrongDirectionality; | 822 bool hasStrongDirectionality; |
| 823 TextDirection textDirection = determineDirectionality( | 823 TextDirection textDirection = determineDirectionality( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 if (hasStrongDirectionality) { | 857 if (hasStrongDirectionality) { |
| 858 if (strongDirectionalityTextNode) | 858 if (strongDirectionalityTextNode) |
| 859 *strongDirectionalityTextNode = node; | 859 *strongDirectionalityTextNode = node; |
| 860 return textDirection; | 860 return textDirection; |
| 861 } | 861 } |
| 862 } | 862 } |
| 863 node = FlatTreeTraversal::next(*node, this); | 863 node = FlatTreeTraversal::next(*node, this); |
| 864 } | 864 } |
| 865 if (strongDirectionalityTextNode) | 865 if (strongDirectionalityTextNode) |
| 866 *strongDirectionalityTextNode = 0; | 866 *strongDirectionalityTextNode = 0; |
| 867 return TextDirection::Ltr; | 867 return TextDirection::kLtr; |
| 868 } | 868 } |
| 869 | 869 |
| 870 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const { | 870 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const { |
| 871 return layoutObject() && layoutObject()->style() && | 871 return layoutObject() && layoutObject()->style() && |
| 872 layoutObject()->style()->selfOrAncestorHasDirAutoAttribute(); | 872 layoutObject()->style()->selfOrAncestorHasDirAutoAttribute(); |
| 873 } | 873 } |
| 874 | 874 |
| 875 void HTMLElement::dirAttributeChanged(const AtomicString& value) { | 875 void HTMLElement::dirAttributeChanged(const AtomicString& value) { |
| 876 // If an ancestor has dir=auto, and this node has the first character, | 876 // If an ancestor has dir=auto, and this node has the first character, |
| 877 // changes to dir attribute may affect the ancestor. | 877 // changes to dir attribute may affect the ancestor. |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 | 1215 |
| 1216 #ifndef NDEBUG | 1216 #ifndef NDEBUG |
| 1217 | 1217 |
| 1218 // For use in the debugger | 1218 // For use in the debugger |
| 1219 void dumpInnerHTML(blink::HTMLElement*); | 1219 void dumpInnerHTML(blink::HTMLElement*); |
| 1220 | 1220 |
| 1221 void dumpInnerHTML(blink::HTMLElement* element) { | 1221 void dumpInnerHTML(blink::HTMLElement* element) { |
| 1222 printf("%s\n", element->innerHTML().ascii().data()); | 1222 printf("%s\n", element->innerHTML().ascii().data()); |
| 1223 } | 1223 } |
| 1224 #endif | 1224 #endif |
| OLD | NEW |