Index: Source/WebCore/html/shadow/CalendarPickerElement.cpp |
=================================================================== |
--- Source/WebCore/html/shadow/CalendarPickerElement.cpp (リビジョン 123547) |
+++ Source/WebCore/html/shadow/CalendarPickerElement.cpp (作業コピー) |
@@ -81,9 +81,11 @@ |
inline HTMLInputElement* CalendarPickerElement::hostInput() |
{ |
- ASSERT(shadowAncestorNode()); |
- ASSERT(shadowAncestorNode()->hasTagName(inputTag)); |
- return static_cast<HTMLInputElement*>(shadowAncestorNode()); |
+ // JavaScript code can't create CalendarPickerElement objects. This is |
+ // always in shadow of <input>. |
+ ASSERT(shadowHost()); |
+ ASSERT(shadowHost()->hasTagName(inputTag)); |
+ return static_cast<HTMLInputElement*>(shadowHost()); |
} |
void CalendarPickerElement::defaultEventHandler(Event* event) |