| 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, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 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 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 // FIXME: According to HTML4, the length attribute's value can be arbitrarily | 93 // FIXME: According to HTML4, the length attribute's value can be arbitrarily |
| 94 // large. However, due to https://bugs.webkit.org/show_bug.cgi?id=14536 things | 94 // large. However, due to https://bugs.webkit.org/show_bug.cgi?id=14536 things |
| 95 // get rather sluggish when a text field has a larger number of characters than | 95 // get rather sluggish when a text field has a larger number of characters than |
| 96 // this, even when just clicking in the text field. | 96 // this, even when just clicking in the text field. |
| 97 const int HTMLInputElement::maximumLength = 524288; | 97 const int HTMLInputElement::maximumLength = 524288; |
| 98 const int defaultSize = 20; | 98 const int defaultSize = 20; |
| 99 const int maxSavedResults = 256; | 99 const int maxSavedResults = 256; |
| 100 | 100 |
| 101 HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* docum
ent, HTMLFormElement* form, bool createdByParser) | 101 HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document& docum
ent, HTMLFormElement* form, bool createdByParser) |
| 102 : HTMLTextFormControlElement(tagName, document, form) | 102 : HTMLTextFormControlElement(tagName, document, form) |
| 103 , m_size(defaultSize) | 103 , m_size(defaultSize) |
| 104 , m_maxLength(maximumLength) | 104 , m_maxLength(maximumLength) |
| 105 , m_maxResults(-1) | 105 , m_maxResults(-1) |
| 106 , m_isChecked(false) | 106 , m_isChecked(false) |
| 107 , m_reflectsCheckedAttribute(true) | 107 , m_reflectsCheckedAttribute(true) |
| 108 , m_isIndeterminate(false) | 108 , m_isIndeterminate(false) |
| 109 , m_hasType(false) | 109 , m_hasType(false) |
| 110 , m_isActivatedSubmit(false) | 110 , m_isActivatedSubmit(false) |
| 111 , m_autocomplete(Uninitialized) | 111 , m_autocomplete(Uninitialized) |
| 112 , m_isAutofilled(false) | 112 , m_isAutofilled(false) |
| 113 , m_hasNonEmptyList(false) | 113 , m_hasNonEmptyList(false) |
| 114 , m_stateRestored(false) | 114 , m_stateRestored(false) |
| 115 , m_parsingInProgress(createdByParser) | 115 , m_parsingInProgress(createdByParser) |
| 116 , m_valueAttributeWasUpdatedAfterParsing(false) | 116 , m_valueAttributeWasUpdatedAfterParsing(false) |
| 117 , m_wasModifiedByUser(false) | 117 , m_wasModifiedByUser(false) |
| 118 , m_canReceiveDroppedFiles(false) | 118 , m_canReceiveDroppedFiles(false) |
| 119 , m_hasTouchEventHandler(false) | 119 , m_hasTouchEventHandler(false) |
| 120 , m_inputType(InputType::createText(this)) | 120 , m_inputType(InputType::createText(this)) |
| 121 , m_inputTypeView(m_inputType) | 121 , m_inputTypeView(m_inputType) |
| 122 { | 122 { |
| 123 ASSERT(hasTagName(inputTag) || hasTagName(isindexTag)); | 123 ASSERT(hasTagName(inputTag) || hasTagName(isindexTag)); |
| 124 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 124 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 125 setHasCustomStyleCallbacks(); | 125 setHasCustomStyleCallbacks(); |
| 126 #endif | 126 #endif |
| 127 ScriptWrappable::init(this); | 127 ScriptWrappable::init(this); |
| 128 } | 128 } |
| 129 | 129 |
| 130 PassRefPtr<HTMLInputElement> HTMLInputElement::create(const QualifiedName& tagNa
me, Document* document, HTMLFormElement* form, bool createdByParser) | 130 PassRefPtr<HTMLInputElement> HTMLInputElement::create(const QualifiedName& tagNa
me, Document& document, HTMLFormElement* form, bool createdByParser) |
| 131 { | 131 { |
| 132 RefPtr<HTMLInputElement> inputElement = adoptRef(new HTMLInputElement(tagNam
e, document, form, createdByParser)); | 132 RefPtr<HTMLInputElement> inputElement = adoptRef(new HTMLInputElement(tagNam
e, document, form, createdByParser)); |
| 133 inputElement->ensureUserAgentShadowRoot(); | 133 inputElement->ensureUserAgentShadowRoot(); |
| 134 return inputElement.release(); | 134 return inputElement.release(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 HTMLImageLoader* HTMLInputElement::imageLoader() | 137 HTMLImageLoader* HTMLInputElement::imageLoader() |
| 138 { | 138 { |
| 139 if (!m_imageLoader) | 139 if (!m_imageLoader) |
| 140 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); | 140 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
| (...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 } | 1878 } |
| 1879 | 1879 |
| 1880 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1880 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1881 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1881 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1882 { | 1882 { |
| 1883 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1883 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1884 } | 1884 } |
| 1885 #endif | 1885 #endif |
| 1886 | 1886 |
| 1887 } // namespace | 1887 } // namespace |
| OLD | NEW |