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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 || hasLocalName(isindexTag) | 98 || hasLocalName(isindexTag) |
99 || hasLocalName(linkTag) | 99 || hasLocalName(linkTag) |
100 || hasLocalName(metaTag) | 100 || hasLocalName(metaTag) |
101 || hasLocalName(paramTag) | 101 || hasLocalName(paramTag) |
102 || hasLocalName(sourceTag) | 102 || hasLocalName(sourceTag) |
103 || hasLocalName(wbrTag)) | 103 || hasLocalName(wbrTag)) |
104 return true; | 104 return true; |
105 return false; | 105 return false; |
106 } | 106 } |
107 | 107 |
108 static inline int unicodeBidiAttributeForDirAuto(HTMLElement* element) | 108 static inline CSSValueID unicodeBidiAttributeForDirAuto(HTMLElement* element) |
109 { | 109 { |
110 if (element->hasLocalName(preTag) || element->hasLocalName(textareaTag)) | 110 if (element->hasLocalName(preTag) || element->hasLocalName(textareaTag)) |
111 return CSSValueWebkitPlaintext; | 111 return CSSValueWebkitPlaintext; |
112 // FIXME: For bdo element, dir="auto" should result in "bidi-override isolat
e" but we don't support having multiple values in unicode-bidi yet. | 112 // FIXME: For bdo element, dir="auto" should result in "bidi-override isolat
e" but we don't support having multiple values in unicode-bidi yet. |
113 // See https://bugs.webkit.org/show_bug.cgi?id=73164. | 113 // See https://bugs.webkit.org/show_bug.cgi?id=73164. |
114 return CSSValueWebkitIsolate; | 114 return CSSValueWebkitIsolate; |
115 } | 115 } |
116 | 116 |
117 unsigned HTMLElement::parseBorderWidthAttribute(const AtomicString& value) const | 117 unsigned HTMLElement::parseBorderWidthAttribute(const AtomicString& value) const |
118 { | 118 { |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 void HTMLElement::insertAdjacentText(const String& where, const String& text, Ex
ceptionCode& ec) | 557 void HTMLElement::insertAdjacentText(const String& where, const String& text, Ex
ceptionCode& ec) |
558 { | 558 { |
559 RefPtr<Text> textNode = document()->createTextNode(text); | 559 RefPtr<Text> textNode = document()->createTextNode(text); |
560 insertAdjacent(where, textNode.get(), ec); | 560 insertAdjacent(where, textNode.get(), ec); |
561 } | 561 } |
562 | 562 |
563 void HTMLElement::applyAlignmentAttributeToStyle(const AtomicString& alignment,
MutableStylePropertySet* style) | 563 void HTMLElement::applyAlignmentAttributeToStyle(const AtomicString& alignment,
MutableStylePropertySet* style) |
564 { | 564 { |
565 // Vertical alignment with respect to the current baseline of the text | 565 // Vertical alignment with respect to the current baseline of the text |
566 // right or left means floating images. | 566 // right or left means floating images. |
567 int floatValue = CSSValueInvalid; | 567 CSSValueID floatValue = CSSValueInvalid; |
568 int verticalAlignValue = CSSValueInvalid; | 568 CSSValueID verticalAlignValue = CSSValueInvalid; |
569 | 569 |
570 if (equalIgnoringCase(alignment, "absmiddle")) | 570 if (equalIgnoringCase(alignment, "absmiddle")) |
571 verticalAlignValue = CSSValueMiddle; | 571 verticalAlignValue = CSSValueMiddle; |
572 else if (equalIgnoringCase(alignment, "absbottom")) | 572 else if (equalIgnoringCase(alignment, "absbottom")) |
573 verticalAlignValue = CSSValueBottom; | 573 verticalAlignValue = CSSValueBottom; |
574 else if (equalIgnoringCase(alignment, "left")) { | 574 else if (equalIgnoringCase(alignment, "left")) { |
575 floatValue = CSSValueLeft; | 575 floatValue = CSSValueLeft; |
576 verticalAlignValue = CSSValueTop; | 576 verticalAlignValue = CSSValueTop; |
577 } else if (equalIgnoringCase(alignment, "right")) { | 577 } else if (equalIgnoringCase(alignment, "right")) { |
578 floatValue = CSSValueRight; | 578 floatValue = CSSValueRight; |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 #ifndef NDEBUG | 1031 #ifndef NDEBUG |
1032 | 1032 |
1033 // For use in the debugger | 1033 // For use in the debugger |
1034 void dumpInnerHTML(WebCore::HTMLElement*); | 1034 void dumpInnerHTML(WebCore::HTMLElement*); |
1035 | 1035 |
1036 void dumpInnerHTML(WebCore::HTMLElement* element) | 1036 void dumpInnerHTML(WebCore::HTMLElement* element) |
1037 { | 1037 { |
1038 printf("%s\n", element->innerHTML().ascii().data()); | 1038 printf("%s\n", element->innerHTML().ascii().data()); |
1039 } | 1039 } |
1040 #endif | 1040 #endif |
OLD | NEW |