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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 137833018: Remove form control related virtual methods from Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove hopefully unneeded HTMLOptGroupElement.foemControlType Created 6 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 | « no previous file | Source/core/dom/Element.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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 // Remove focus from the existing focus node (if any) 3356 // Remove focus from the existing focus node (if any)
3357 if (oldFocusedElement) { 3357 if (oldFocusedElement) {
3358 ASSERT(!oldFocusedElement->inDetach()); 3358 ASSERT(!oldFocusedElement->inDetach());
3359 3359
3360 if (oldFocusedElement->active()) 3360 if (oldFocusedElement->active())
3361 oldFocusedElement->setActive(false); 3361 oldFocusedElement->setActive(false);
3362 3362
3363 oldFocusedElement->setFocus(false); 3363 oldFocusedElement->setFocus(false);
3364 3364
3365 // Dispatch a change event for text fields or textareas that have been e dited 3365 // Dispatch a change event for text fields or textareas that have been e dited
3366 if (oldFocusedElement->wasChangedSinceLastFormControlChangeEvent()) 3366 if (oldFocusedElement->isFormControlElement()) {
tkent 2014/01/30 01:38:50 I don't like this change. It increased virtual cal
Inactive 2014/01/30 01:57:22 Did it really increase virtual calls? Sure isFormC
3367 oldFocusedElement->dispatchFormControlChangeEvent(); 3367 HTMLFormControlElement* formControlElement = toHTMLFormControlElemen t(oldFocusedElement);
3368 if (formControlElement->wasChangedSinceLastFormControlChangeEvent())
3369 formControlElement->dispatchFormControlChangeEvent();
3370 }
3368 3371
3369 // Dispatch the blur event and let the node do any other blur related ac tivities (important for text fields) 3372 // Dispatch the blur event and let the node do any other blur related ac tivities (important for text fields)
3370 // If page lost focus, blur event will have already been dispatched 3373 // If page lost focus, blur event will have already been dispatched
3371 if (page() && (page()->focusController().isFocused())) { 3374 if (page() && (page()->focusController().isFocused())) {
3372 oldFocusedElement->dispatchBlurEvent(newFocusedElement.get()); 3375 oldFocusedElement->dispatchBlurEvent(newFocusedElement.get());
3373 3376
3374 if (m_focusedElement) { 3377 if (m_focusedElement) {
3375 // handler shifted focus 3378 // handler shifted focus
3376 focusChangeBlocked = true; 3379 focusChangeBlocked = true;
3377 newFocusedElement = 0; 3380 newFocusedElement = 0;
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
5319 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) 5322 if (!page->focusController().isActive() || !page->focusController().isFocuse d())
5320 return false; 5323 return false;
5321 if (Frame* focusedFrame = page->focusController().focusedFrame()) { 5324 if (Frame* focusedFrame = page->focusController().focusedFrame()) {
5322 if (focusedFrame->tree().isDescendantOf(frame())) 5325 if (focusedFrame->tree().isDescendantOf(frame()))
5323 return true; 5326 return true;
5324 } 5327 }
5325 return false; 5328 return false;
5326 } 5329 }
5327 5330
5328 } // namespace WebCore 5331 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698