Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: Source/WebCore/html/HTMLInputElement.cpp

Issue 12159003: Merge 141195 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/HTMLInputElement.h ('k') | Source/WebCore/html/InputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "HTMLNames.h" 49 #include "HTMLNames.h"
50 #include "HTMLOptionElement.h" 50 #include "HTMLOptionElement.h"
51 #include "HTMLParserIdioms.h" 51 #include "HTMLParserIdioms.h"
52 #include "IdTargetObserver.h" 52 #include "IdTargetObserver.h"
53 #include "InputType.h" 53 #include "InputType.h"
54 #include "InsertionPoint.h" 54 #include "InsertionPoint.h"
55 #include "KeyboardEvent.h" 55 #include "KeyboardEvent.h"
56 #include "Language.h" 56 #include "Language.h"
57 #include "LocalizedStrings.h" 57 #include "LocalizedStrings.h"
58 #include "MouseEvent.h" 58 #include "MouseEvent.h"
59 #include "PlatformLocale.h"
59 #include "RenderTextControlSingleLine.h" 60 #include "RenderTextControlSingleLine.h"
60 #include "RenderTheme.h" 61 #include "RenderTheme.h"
61 #include "RuntimeEnabledFeatures.h" 62 #include "RuntimeEnabledFeatures.h"
62 #include "ScopedEventQueue.h" 63 #include "ScopedEventQueue.h"
63 #include "SearchInputType.h" 64 #include "SearchInputType.h"
64 #include "ShadowRoot.h" 65 #include "ShadowRoot.h"
65 #include "ScriptEventListener.h" 66 #include "ScriptEventListener.h"
67 #include "StyleResolver.h"
66 #include <wtf/MathExtras.h> 68 #include <wtf/MathExtras.h>
67 #include <wtf/StdLibExtras.h> 69 #include <wtf/StdLibExtras.h>
68 70
69 #if ENABLE(INPUT_TYPE_COLOR) 71 #if ENABLE(INPUT_TYPE_COLOR)
70 #include "ColorInputType.h" 72 #include "ColorInputType.h"
71 #endif 73 #endif
72 74
73 #if ENABLE(INPUT_SPEECH) 75 #if ENABLE(INPUT_SPEECH)
74 #include "RuntimeEnabledFeatures.h" 76 #include "RuntimeEnabledFeatures.h"
75 #endif 77 #endif
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 , m_parsingInProgress(createdByParser) 127 , m_parsingInProgress(createdByParser)
126 , m_valueAttributeWasUpdatedAfterParsing(false) 128 , m_valueAttributeWasUpdatedAfterParsing(false)
127 , m_wasModifiedByUser(false) 129 , m_wasModifiedByUser(false)
128 , m_canReceiveDroppedFiles(false) 130 , m_canReceiveDroppedFiles(false)
129 #if ENABLE(TOUCH_EVENTS) 131 #if ENABLE(TOUCH_EVENTS)
130 , m_hasTouchEventHandler(false) 132 , m_hasTouchEventHandler(false)
131 #endif 133 #endif
132 , m_inputType(InputType::createText(this)) 134 , m_inputType(InputType::createText(this))
133 { 135 {
134 ASSERT(hasTagName(inputTag) || hasTagName(isindexTag)); 136 ASSERT(hasTagName(inputTag) || hasTagName(isindexTag));
137 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
138 setHasCustomCallbacks();
139 #endif
135 } 140 }
136 141
137 PassRefPtr<HTMLInputElement> HTMLInputElement::create(const QualifiedName& tagNa me, Document* document, HTMLFormElement* form, bool createdByParser) 142 PassRefPtr<HTMLInputElement> HTMLInputElement::create(const QualifiedName& tagNa me, Document* document, HTMLFormElement* form, bool createdByParser)
138 { 143 {
139 RefPtr<HTMLInputElement> inputElement = adoptRef(new HTMLInputElement(tagNam e, document, form, createdByParser)); 144 RefPtr<HTMLInputElement> inputElement = adoptRef(new HTMLInputElement(tagNam e, document, form, createdByParser));
140 inputElement->createShadowSubtree(); 145 inputElement->createShadowSubtree();
141 return inputElement.release(); 146 return inputElement.release();
142 } 147 }
143 148
144 void HTMLInputElement::createShadowSubtree() 149 void HTMLInputElement::createShadowSubtree()
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 HTMLTextFormControlElement::reportMemoryUsage(memoryObjectInfo); 1934 HTMLTextFormControlElement::reportMemoryUsage(memoryObjectInfo);
1930 info.addMember(m_name); 1935 info.addMember(m_name);
1931 info.addMember(m_valueIfDirty); 1936 info.addMember(m_valueIfDirty);
1932 info.addMember(m_suggestedValue); 1937 info.addMember(m_suggestedValue);
1933 info.addMember(m_inputType); 1938 info.addMember(m_inputType);
1934 #if ENABLE(DATALIST_ELEMENT) 1939 #if ENABLE(DATALIST_ELEMENT)
1935 info.addMember(m_listAttributeTargetObserver); 1940 info.addMember(m_listAttributeTargetObserver);
1936 #endif 1941 #endif
1937 } 1942 }
1938 1943
1944 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1945 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1946 {
1947 RefPtr<RenderStyle> originalStyle = document()->styleResolver()->styleForEle ment(this);
1948 if (!m_inputType->shouldApplyLocaleDirection())
1949 return originalStyle.release();
1950 TextDirection contentDirection = locale().isRTL() ? RTL : LTR;
1951 if (originalStyle->direction() == contentDirection)
1952 return originalStyle.release();
1953 RefPtr<RenderStyle> style = RenderStyle::clone(originalStyle.get());
1954 style->setDirection(contentDirection);
1955 return style.release();
1956 }
1957 #endif
1958
1939 } // namespace 1959 } // namespace
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLInputElement.h ('k') | Source/WebCore/html/InputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698