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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 // https://html.spec.whatwg.org/multipage/semantics.html#the-bdi-element | 780 // https://html.spec.whatwg.org/multipage/semantics.html#the-bdi-element |
781 const AtomicString& direction = fastGetAttribute(dirAttr); | 781 const AtomicString& direction = fastGetAttribute(dirAttr); |
782 return (isHTMLBDIElement(*this) && direction == nullAtom) || | 782 return (isHTMLBDIElement(*this) && direction == nullAtom) || |
783 equalIgnoringCase(direction, "auto"); | 783 equalIgnoringCase(direction, "auto"); |
784 } | 784 } |
785 | 785 |
786 TextDirection HTMLElement::directionalityIfhasDirAutoAttribute( | 786 TextDirection HTMLElement::directionalityIfhasDirAutoAttribute( |
787 bool& isAuto) const { | 787 bool& isAuto) const { |
788 isAuto = hasDirectionAuto(); | 788 isAuto = hasDirectionAuto(); |
789 if (!isAuto) | 789 if (!isAuto) |
790 return LTR; | 790 return TextDirection::Ltr; |
791 return directionality(); | 791 return directionality(); |
792 } | 792 } |
793 | 793 |
794 TextDirection HTMLElement::directionality( | 794 TextDirection HTMLElement::directionality( |
795 Node** strongDirectionalityTextNode) const { | 795 Node** strongDirectionalityTextNode) const { |
796 if (isHTMLInputElement(*this)) { | 796 if (isHTMLInputElement(*this)) { |
797 HTMLInputElement* inputElement = | 797 HTMLInputElement* inputElement = |
798 toHTMLInputElement(const_cast<HTMLElement*>(this)); | 798 toHTMLInputElement(const_cast<HTMLElement*>(this)); |
799 bool hasStrongDirectionality; | 799 bool hasStrongDirectionality; |
800 TextDirection textDirection = determineDirectionality( | 800 TextDirection textDirection = determineDirectionality( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 if (hasStrongDirectionality) { | 834 if (hasStrongDirectionality) { |
835 if (strongDirectionalityTextNode) | 835 if (strongDirectionalityTextNode) |
836 *strongDirectionalityTextNode = node; | 836 *strongDirectionalityTextNode = node; |
837 return textDirection; | 837 return textDirection; |
838 } | 838 } |
839 } | 839 } |
840 node = FlatTreeTraversal::next(*node, this); | 840 node = FlatTreeTraversal::next(*node, this); |
841 } | 841 } |
842 if (strongDirectionalityTextNode) | 842 if (strongDirectionalityTextNode) |
843 *strongDirectionalityTextNode = 0; | 843 *strongDirectionalityTextNode = 0; |
844 return LTR; | 844 return TextDirection::Ltr; |
845 } | 845 } |
846 | 846 |
847 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const { | 847 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const { |
848 return layoutObject() && layoutObject()->style() && | 848 return layoutObject() && layoutObject()->style() && |
849 layoutObject()->style()->selfOrAncestorHasDirAutoAttribute(); | 849 layoutObject()->style()->selfOrAncestorHasDirAutoAttribute(); |
850 } | 850 } |
851 | 851 |
852 void HTMLElement::dirAttributeChanged(const AtomicString& value) { | 852 void HTMLElement::dirAttributeChanged(const AtomicString& value) { |
853 // If an ancestor has dir=auto, and this node has the first character, | 853 // If an ancestor has dir=auto, and this node has the first character, |
854 // changes to dir attribute may affect the ancestor. | 854 // changes to dir attribute may affect the ancestor. |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 | 1192 |
1193 #ifndef NDEBUG | 1193 #ifndef NDEBUG |
1194 | 1194 |
1195 // For use in the debugger | 1195 // For use in the debugger |
1196 void dumpInnerHTML(blink::HTMLElement*); | 1196 void dumpInnerHTML(blink::HTMLElement*); |
1197 | 1197 |
1198 void dumpInnerHTML(blink::HTMLElement* element) { | 1198 void dumpInnerHTML(blink::HTMLElement* element) { |
1199 printf("%s\n", element->innerHTML().ascii().data()); | 1199 printf("%s\n", element->innerHTML().ascii().data()); |
1200 } | 1200 } |
1201 #endif | 1201 #endif |
OLD | NEW |