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

Unified Diff: Source/WebCore/html/shadow/TextFieldDecorationElement.cpp

Issue 10819007: Revert 123529 - Merge 123187 - [Chromium] Fix an assertion failure in TextFieldDecorationElement::h… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698