| Index: Source/WebCore/html/shadow/TextFieldDecorationElement.cpp
|
| ===================================================================
|
| --- Source/WebCore/html/shadow/TextFieldDecorationElement.cpp (revision 123532)
|
| +++ Source/WebCore/html/shadow/TextFieldDecorationElement.cpp (working copy)
|
| @@ -116,10 +116,9 @@
|
|
|
| inline HTMLInputElement* TextFieldDecorationElement::hostInput()
|
| {
|
| - // TextFieldDecorationElement is created only by C++ code, and it is always
|
| - // in <input> shadow.
|
| - ASSERT(!shadowHost() || shadowHost()->hasTagName(inputTag));
|
| - return static_cast<HTMLInputElement*>(shadowHost());
|
| + ASSERT(shadowAncestorNode());
|
| + ASSERT(shadowAncestorNode()->hasTagName(inputTag));
|
| + return static_cast<HTMLInputElement*>(shadowAncestorNode());
|
| }
|
|
|
| bool TextFieldDecorationElement::isTextFieldDecoration() const
|
| @@ -182,7 +181,7 @@
|
| void TextFieldDecorationElement::defaultEventHandler(Event* event)
|
| {
|
| RefPtr<HTMLInputElement> input(hostInput());
|
| - if (!input || input->disabled() || input->readOnly() || !event->isMouseEvent()) {
|
| + if (input->disabled() || input->readOnly() || !event->isMouseEvent()) {
|
| if (!event->defaultHandled())
|
| HTMLDivElement::defaultEventHandler(event);
|
| return;
|
|
|