| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "core/frame/FrameHost.h" | 42 #include "core/frame/FrameHost.h" |
| 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/shadow/ShadowElementNames.h" | 46 #include "core/html/shadow/ShadowElementNames.h" |
| 47 #include "core/html/shadow/TextControlInnerElements.h" | 47 #include "core/html/shadow/TextControlInnerElements.h" |
| 48 #include "core/page/Chrome.h" | 48 #include "core/page/Chrome.h" |
| 49 #include "core/page/ChromeClient.h" | 49 #include "core/page/ChromeClient.h" |
| 50 #include "core/rendering/RenderTextControlMultiLine.h" | 50 #include "core/rendering/RenderTextControlMultiLine.h" |
| 51 #include "platform/text/PlatformLocale.h" | 51 #include "platform/text/PlatformLocale.h" |
| 52 #include "platform/text/TextDirection.h" |
| 52 #include "wtf/StdLibExtras.h" | 53 #include "wtf/StdLibExtras.h" |
| 53 #include "wtf/text/StringBuilder.h" | 54 #include "wtf/text/StringBuilder.h" |
| 54 | 55 |
| 55 namespace blink { | 56 namespace blink { |
| 56 | 57 |
| 57 using namespace HTMLNames; | 58 using namespace HTMLNames; |
| 58 | 59 |
| 59 static const int defaultRows = 2; | 60 static const int defaultRows = 2; |
| 60 static const int defaultCols = 20; | 61 static const int defaultCols = 20; |
| 61 | 62 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 { | 205 { |
| 205 if (name().isEmpty()) | 206 if (name().isEmpty()) |
| 206 return false; | 207 return false; |
| 207 | 208 |
| 208 document().updateLayout(); | 209 document().updateLayout(); |
| 209 | 210 |
| 210 const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : valu
e(); | 211 const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : valu
e(); |
| 211 encoding.appendData(name(), text); | 212 encoding.appendData(name(), text); |
| 212 | 213 |
| 213 const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr); | 214 const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr); |
| 214 if (!dirnameAttrValue.isNull()) | 215 if (!dirnameAttrValue.isNull()) { |
| 215 encoding.appendData(dirnameAttrValue, directionForFormData()); | 216 const AtomicString& dirValue = determineDirection() == RTL ? "rtl" : "lt
r"; |
| 217 encoding.appendData(dirnameAttrValue, dirValue); |
| 218 } |
| 216 return true; | 219 return true; |
| 217 } | 220 } |
| 218 | 221 |
| 219 void HTMLTextAreaElement::resetImpl() | 222 void HTMLTextAreaElement::resetImpl() |
| 220 { | 223 { |
| 221 setNonDirtyValue(defaultValue()); | 224 setNonDirtyValue(defaultValue()); |
| 222 } | 225 } |
| 223 | 226 |
| 224 bool HTMLTextAreaElement::hasCustomFocusLogic() const | 227 bool HTMLTextAreaElement::hasCustomFocusLogic() const |
| 225 { | 228 { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 { | 567 { |
| 565 return true; | 568 return true; |
| 566 } | 569 } |
| 567 | 570 |
| 568 bool HTMLTextAreaElement::supportsAutofocus() const | 571 bool HTMLTextAreaElement::supportsAutofocus() const |
| 569 { | 572 { |
| 570 return true; | 573 return true; |
| 571 } | 574 } |
| 572 | 575 |
| 573 } | 576 } |
| OLD | NEW |