| Index: Source/core/html/InputType.cpp
|
| diff --git a/Source/core/html/InputType.cpp b/Source/core/html/InputType.cpp
|
| index 1cfcaebaf837b983fbba3ac07b92e307831d705c..07eb4db278f9a87f001e1427d41d8a2ffdbed6fa 100644
|
| --- a/Source/core/html/InputType.cpp
|
| +++ b/Source/core/html/InputType.cpp
|
| @@ -86,7 +86,7 @@ namespace WebCore {
|
| using namespace HTMLNames;
|
| using namespace std;
|
|
|
| -typedef PassOwnPtr<InputType> (*InputTypeFactoryFunction)(HTMLInputElement*);
|
| +typedef PassOwnPtr<InputType> (*InputTypeFactoryFunction)(Handle<HTMLInputElement>);
|
| typedef HashMap<AtomicString, InputTypeFactoryFunction, WTF::FastAllocator, CaseFoldingHash> InputTypeFactoryMap;
|
|
|
| static PassOwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
|
| @@ -124,16 +124,16 @@ static PassOwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
|
| return map.release();
|
| }
|
|
|
| -PassOwnPtr<InputType> InputType::create(HTMLInputElement* element, const AtomicString& typeName)
|
| +PassOwnPtr<InputType> InputType::create(Handle<HTMLInputElement> element, const AtomicString& typeName)
|
| {
|
| static const InputTypeFactoryMap* factoryMap = createInputTypeFactoryMap().leakPtr();
|
| - PassOwnPtr<InputType> (*factory)(HTMLInputElement*) = typeName.isEmpty() ? 0 : factoryMap->get(typeName);
|
| + PassOwnPtr<InputType> (*factory)(Handle<HTMLInputElement>) = typeName.isEmpty() ? 0 : factoryMap->get(typeName);
|
| if (!factory)
|
| factory = TextInputType::create;
|
| return factory(element);
|
| }
|
|
|
| -PassOwnPtr<InputType> InputType::createText(HTMLInputElement* element)
|
| +PassOwnPtr<InputType> InputType::createText(Handle<HTMLInputElement> element)
|
| {
|
| return TextInputType::create(element);
|
| }
|
| @@ -447,7 +447,7 @@ PassRefPtr<HTMLFormElement> InputType::formForSubmission() const
|
|
|
| RenderObject* InputType::createRenderer(RenderArena*, RenderStyle* style) const
|
| {
|
| - return RenderObject::createObject(element(), style);
|
| + return RenderObject::createObject(Handle<HTMLInputElement>(element()).raw(), style);
|
| }
|
|
|
| PassRefPtr<RenderStyle> InputType::customStyleForRenderer(PassRefPtr<RenderStyle> originalStyle)
|
| @@ -990,7 +990,7 @@ void InputType::applyStep(int count, AnyStepHandling anyStepHandling, TextFieldE
|
| setValueAsDecimal(newValue, eventBehavior, ec);
|
|
|
| if (AXObjectCache* cache = element()->document()->existingAXObjectCache())
|
| - cache->postNotification(element(), AXObjectCache::AXValueChanged, true);
|
| + cache->postNotification(Handle<HTMLInputElement>(element()).raw(), AXObjectCache::AXValueChanged, true);
|
| }
|
|
|
| bool InputType::getAllowedValueStep(Decimal* step) const
|
| @@ -1116,6 +1116,16 @@ void InputType::stepUpFromRenderer(int n)
|
| }
|
| }
|
|
|
| +InputType::InputType(const Handle<HTMLInputElement>& element)
|
| + : m_element(element.raw())
|
| +{
|
| +}
|
| +
|
| +Result<HTMLInputElement> InputType::element() const
|
| +{
|
| + return Handle<HTMLInputElement>(m_element);
|
| +}
|
| +
|
| void InputType::observeFeatureIfVisible(UseCounter::Feature feature) const
|
| {
|
| if (RenderStyle* style = element()->renderStyle()) {
|
|
|