| 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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "core/frame/LocalFrame.h" | 43 #include "core/frame/LocalFrame.h" |
| 44 #include "core/html/FormDataList.h" | 44 #include "core/html/FormDataList.h" |
| 45 #include "core/html/forms/FormController.h" | 45 #include "core/html/forms/FormController.h" |
| 46 #include "core/html/parser/HTMLParserIdioms.h" | 46 #include "core/html/parser/HTMLParserIdioms.h" |
| 47 #include "core/html/shadow/ShadowElementNames.h" | 47 #include "core/html/shadow/ShadowElementNames.h" |
| 48 #include "core/html/shadow/TextControlInnerElements.h" | 48 #include "core/html/shadow/TextControlInnerElements.h" |
| 49 #include "core/page/Chrome.h" | 49 #include "core/page/Chrome.h" |
| 50 #include "core/page/ChromeClient.h" | 50 #include "core/page/ChromeClient.h" |
| 51 #include "core/rendering/RenderTextControlMultiLine.h" | 51 #include "core/rendering/RenderTextControlMultiLine.h" |
| 52 #include "platform/text/PlatformLocale.h" | 52 #include "platform/text/PlatformLocale.h" |
| 53 #include "platform/text/TextDirection.h" |
| 53 #include "wtf/StdLibExtras.h" | 54 #include "wtf/StdLibExtras.h" |
| 54 #include "wtf/text/StringBuilder.h" | 55 #include "wtf/text/StringBuilder.h" |
| 55 | 56 |
| 56 namespace blink { | 57 namespace blink { |
| 57 | 58 |
| 58 using namespace HTMLNames; | 59 using namespace HTMLNames; |
| 59 | 60 |
| 60 static const int defaultRows = 2; | 61 static const int defaultRows = 2; |
| 61 static const int defaultCols = 20; | 62 static const int defaultCols = 20; |
| 62 | 63 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 { | 208 { |
| 208 if (name().isEmpty()) | 209 if (name().isEmpty()) |
| 209 return false; | 210 return false; |
| 210 | 211 |
| 211 document().updateLayout(); | 212 document().updateLayout(); |
| 212 | 213 |
| 213 const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : valu
e(); | 214 const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : valu
e(); |
| 214 encoding.appendData(name(), text); | 215 encoding.appendData(name(), text); |
| 215 | 216 |
| 216 const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr); | 217 const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr); |
| 217 if (!dirnameAttrValue.isNull()) | 218 if (!dirnameAttrValue.isNull()) { |
| 218 encoding.appendData(dirnameAttrValue, directionForFormData()); | 219 const AtomicString& dirValue = determineDirection() == RTL ? "rtl" : "lt
r"; |
| 220 encoding.appendData(dirnameAttrValue, dirValue); |
| 221 } |
| 219 return true; | 222 return true; |
| 220 } | 223 } |
| 221 | 224 |
| 222 void HTMLTextAreaElement::resetImpl() | 225 void HTMLTextAreaElement::resetImpl() |
| 223 { | 226 { |
| 224 setNonDirtyValue(defaultValue()); | 227 setNonDirtyValue(defaultValue()); |
| 225 } | 228 } |
| 226 | 229 |
| 227 bool HTMLTextAreaElement::hasCustomFocusLogic() const | 230 bool HTMLTextAreaElement::hasCustomFocusLogic() const |
| 228 { | 231 { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 { | 629 { |
| 627 return true; | 630 return true; |
| 628 } | 631 } |
| 629 | 632 |
| 630 bool HTMLTextAreaElement::supportsAutofocus() const | 633 bool HTMLTextAreaElement::supportsAutofocus() const |
| 631 { | 634 { |
| 632 return true; | 635 return true; |
| 633 } | 636 } |
| 634 | 637 |
| 635 } | 638 } |
| OLD | NEW |