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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
770 | 770 |
771 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const | 771 bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const |
772 { | 772 { |
773 return layoutObject() && layoutObject()->style() && layoutObject()->style()- >selfOrAncestorHasDirAutoAttribute(); | 773 return layoutObject() && layoutObject()->style() && layoutObject()->style()- >selfOrAncestorHasDirAutoAttribute(); |
774 } | 774 } |
775 | 775 |
776 void HTMLElement::dirAttributeChanged(const AtomicString& value) | 776 void HTMLElement::dirAttributeChanged(const AtomicString& value) |
777 { | 777 { |
778 // If an ancestor has dir=auto, and this node has the first character, | 778 // If an ancestor has dir=auto, and this node has the first character, |
779 // changes to dir attribute may affect the ancestor. | 779 // changes to dir attribute may affect the ancestor. |
780 if (!canParticipateInFlatTree()) | |
781 return; | |
kochi
2016/07/22 07:41:33
nit: The comment above and these 2 lines are not r
hayato
2016/07/22 09:59:36
Ah. Thanks, but I did not think so. I thought that
| |
780 updateDistribution(); | 782 updateDistribution(); |
781 Element* parent = FlatTreeTraversal::parentElement(*this); | 783 Element* parent = FlatTreeTraversal::parentElement(*this); |
782 if (parent && parent->isHTMLElement() && toHTMLElement(parent)->selfOrAncest orHasDirAutoAttribute()) | 784 if (parent && parent->isHTMLElement() && toHTMLElement(parent)->selfOrAncest orHasDirAutoAttribute()) |
783 toHTMLElement(parent)->adjustDirectionalityIfNeededAfterChildAttributeCh anged(this); | 785 toHTMLElement(parent)->adjustDirectionalityIfNeededAfterChildAttributeCh anged(this); |
784 | 786 |
785 if (equalIgnoringCase(value, "auto")) | 787 if (equalIgnoringCase(value, "auto")) |
786 calculateAndAdjustDirectionality(); | 788 calculateAndAdjustDirectionality(); |
787 } | 789 } |
788 | 790 |
789 void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element * child) | 791 void HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged(Element * child) |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1101 #ifndef NDEBUG | 1103 #ifndef NDEBUG |
1102 | 1104 |
1103 // For use in the debugger | 1105 // For use in the debugger |
1104 void dumpInnerHTML(blink::HTMLElement*); | 1106 void dumpInnerHTML(blink::HTMLElement*); |
1105 | 1107 |
1106 void dumpInnerHTML(blink::HTMLElement* element) | 1108 void dumpInnerHTML(blink::HTMLElement* element) |
1107 { | 1109 { |
1108 printf("%s\n", element->innerHTML().ascii().data()); | 1110 printf("%s\n", element->innerHTML().ascii().data()); |
1109 } | 1111 } |
1110 #endif | 1112 #endif |
OLD | NEW |