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

Side by Side Diff: Source/core/html/HTMLSelectElement.cpp

Issue 852083002: Propagate focus type to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/HTMLTextAreaElement.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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 // Actual index of option not counting OPTGROUP entries that may be in list. 1015 // Actual index of option not counting OPTGROUP entries that may be in list.
1016 int optionIndex = 0; 1016 int optionIndex = 0;
1017 for (int i = 0; i < listIndex; ++i) { 1017 for (int i = 0; i < listIndex; ++i) {
1018 if (isHTMLOptionElement(*items[i])) 1018 if (isHTMLOptionElement(*items[i]))
1019 ++optionIndex; 1019 ++optionIndex;
1020 } 1020 }
1021 1021
1022 return optionIndex; 1022 return optionIndex;
1023 } 1023 }
1024 1024
1025 void HTMLSelectElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type) 1025 void HTMLSelectElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusT ype type)
1026 { 1026 {
1027 // Save the selection so it can be compared to the new selection when 1027 // Save the selection so it can be compared to the new selection when
1028 // dispatching change events during blur event dispatch. 1028 // dispatching change events during blur event dispatch.
1029 if (usesMenuList()) 1029 if (usesMenuList())
1030 saveLastSelection(); 1030 saveLastSelection();
1031 HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type) ; 1031 HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type) ;
1032 } 1032 }
1033 1033
1034 void HTMLSelectElement::dispatchBlurEvent(Element* newFocusedElement) 1034 void HTMLSelectElement::dispatchBlurEvent(Element* newFocusedElement)
1035 { 1035 {
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 int focusedIndex = activeSelectionEndListIndex(); 1775 int focusedIndex = activeSelectionEndListIndex();
1776 if (focusedIndex < 0) 1776 if (focusedIndex < 0)
1777 focusedIndex = firstSelectableListIndex(); 1777 focusedIndex = firstSelectableListIndex();
1778 if (focusedIndex < 0) 1778 if (focusedIndex < 0)
1779 return nullptr; 1779 return nullptr;
1780 HTMLElement* focused = listItems()[focusedIndex]; 1780 HTMLElement* focused = listItems()[focusedIndex];
1781 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ; 1781 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ;
1782 } 1782 }
1783 1783
1784 } // namespace 1784 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/HTMLTextAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698