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, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 28 matching lines...) Expand all Loading... | |
39 #include "core/dom/EventListener.h" | 39 #include "core/dom/EventListener.h" |
40 #include "core/dom/EventNames.h" | 40 #include "core/dom/EventNames.h" |
41 #include "core/dom/ExceptionCode.h" | 41 #include "core/dom/ExceptionCode.h" |
42 #include "core/dom/KeyboardEvent.h" | 42 #include "core/dom/KeyboardEvent.h" |
43 #include "core/dom/NodeTraversal.h" | 43 #include "core/dom/NodeTraversal.h" |
44 #include "core/dom/Text.h" | 44 #include "core/dom/Text.h" |
45 #include "core/editing/markup.h" | 45 #include "core/editing/markup.h" |
46 #include "core/html/HTMLBRElement.h" | 46 #include "core/html/HTMLBRElement.h" |
47 #include "core/html/HTMLFormElement.h" | 47 #include "core/html/HTMLFormElement.h" |
48 #include "core/html/HTMLTemplateElement.h" | 48 #include "core/html/HTMLTemplateElement.h" |
49 #include "core/html/HTMLTextAreaElement.h" | |
49 #include "core/html/HTMLTextFormControlElement.h" | 50 #include "core/html/HTMLTextFormControlElement.h" |
50 #include "core/html/parser/HTMLParserIdioms.h" | 51 #include "core/html/parser/HTMLParserIdioms.h" |
51 #include "core/loader/FrameLoader.h" | 52 #include "core/loader/FrameLoader.h" |
52 #include "core/page/Frame.h" | 53 #include "core/page/Frame.h" |
53 #include "core/page/Settings.h" | 54 #include "core/page/Settings.h" |
54 #include "core/rendering/RenderWordBreak.h" | 55 #include "core/rendering/RenderWordBreak.h" |
55 #include "wtf/StdLibExtras.h" | 56 #include "wtf/StdLibExtras.h" |
56 #include "wtf/text/CString.h" | 57 #include "wtf/text/CString.h" |
57 | 58 |
58 namespace WebCore { | 59 namespace WebCore { |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
839 isAuto = false; | 840 isAuto = false; |
840 return LTR; | 841 return LTR; |
841 } | 842 } |
842 | 843 |
843 isAuto = true; | 844 isAuto = true; |
844 return directionality(); | 845 return directionality(); |
845 } | 846 } |
846 | 847 |
847 TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c onst | 848 TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) c onst |
848 { | 849 { |
849 if (isHTMLTextFormControlElement(this)) { | 850 if (isHTMLTextFormControlElement(this) && !isHTMLTextAreaElement(this)) { |
eseidel
2013/08/22 23:32:12
Can we get rid of this code for all other elements
| |
850 HTMLTextFormControlElement* textElement = toHTMLTextFormControlElement(c onst_cast<HTMLElement*>(this)); | 851 HTMLTextFormControlElement* textElement = toHTMLTextFormControlElement(c onst_cast<HTMLElement*>(this)); |
851 bool hasStrongDirectionality; | 852 bool hasStrongDirectionality; |
852 Unicode::Direction textDirection = textElement->value().defaultWritingDi rection(&hasStrongDirectionality); | 853 Unicode::Direction textDirection = textElement->value().defaultWritingDi rection(&hasStrongDirectionality); |
853 if (strongDirectionalityTextNode) | 854 if (strongDirectionalityTextNode) |
854 *strongDirectionalityTextNode = hasStrongDirectionality ? textElemen t : 0; | 855 *strongDirectionalityTextNode = hasStrongDirectionality ? textElemen t : 0; |
855 return (textDirection == Unicode::LeftToRight) ? LTR : RTL; | 856 return (textDirection == Unicode::LeftToRight) ? LTR : RTL; |
856 } | 857 } |
857 | 858 |
858 Node* node = firstChild(); | 859 Node* node = firstChild(); |
859 while (node) { | 860 while (node) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1098 #ifndef NDEBUG | 1099 #ifndef NDEBUG |
1099 | 1100 |
1100 // For use in the debugger | 1101 // For use in the debugger |
1101 void dumpInnerHTML(WebCore::HTMLElement*); | 1102 void dumpInnerHTML(WebCore::HTMLElement*); |
1102 | 1103 |
1103 void dumpInnerHTML(WebCore::HTMLElement* element) | 1104 void dumpInnerHTML(WebCore::HTMLElement* element) |
1104 { | 1105 { |
1105 printf("%s\n", element->innerHTML().ascii().data()); | 1106 printf("%s\n", element->innerHTML().ascii().data()); |
1106 } | 1107 } |
1107 #endif | 1108 #endif |
OLD | NEW |