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

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

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Created 3 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "core/inspector/ConsoleMessage.h" 63 #include "core/inspector/ConsoleMessage.h"
64 #include "core/layout/HitTestRequest.h" 64 #include "core/layout/HitTestRequest.h"
65 #include "core/layout/HitTestResult.h" 65 #include "core/layout/HitTestResult.h"
66 #include "core/layout/LayoutListBox.h" 66 #include "core/layout/LayoutListBox.h"
67 #include "core/layout/LayoutMenuList.h" 67 #include "core/layout/LayoutMenuList.h"
68 #include "core/layout/LayoutTheme.h" 68 #include "core/layout/LayoutTheme.h"
69 #include "core/page/AutoscrollController.h" 69 #include "core/page/AutoscrollController.h"
70 #include "core/page/ChromeClient.h" 70 #include "core/page/ChromeClient.h"
71 #include "core/page/Page.h" 71 #include "core/page/Page.h"
72 #include "core/page/SpatialNavigation.h" 72 #include "core/page/SpatialNavigation.h"
73 #include "platform/PlatformMouseEvent.h"
74 #include "platform/PopupMenu.h" 73 #include "platform/PopupMenu.h"
75 #include "platform/instrumentation/tracing/TraceEvent.h" 74 #include "platform/instrumentation/tracing/TraceEvent.h"
76 #include "platform/text/PlatformLocale.h" 75 #include "platform/text/PlatformLocale.h"
77 76
78 using namespace WTF::Unicode; 77 using namespace WTF::Unicode;
79 78
80 namespace blink { 79 namespace blink {
81 80
82 using namespace HTMLNames; 81 using namespace HTMLNames;
83 82
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 return; 1280 return;
1282 } 1281 }
1283 1282
1284 // The key handling below shouldn't be used for non spatial navigation 1283 // The key handling below shouldn't be used for non spatial navigation
1285 // mode Mac 1284 // mode Mac
1286 if (LayoutTheme::theme().popsMenuByArrowKeys() && 1285 if (LayoutTheme::theme().popsMenuByArrowKeys() &&
1287 !isSpatialNavigationEnabled(document().frame())) 1286 !isSpatialNavigationEnabled(document().frame()))
1288 return; 1287 return;
1289 1288
1290 int ignoreModifiers = PlatformEvent::ShiftKey | PlatformEvent::CtrlKey | 1289 int ignoreModifiers = PlatformEvent::ShiftKey | PlatformEvent::CtrlKey |
1291 PlatformEvent::AltKey | PlatformMouseEvent::MetaKey; 1290 PlatformEvent::AltKey | PlatformEvent::MetaKey;
1292 if (keyEvent->modifiers() & ignoreModifiers) 1291 if (keyEvent->modifiers() & ignoreModifiers)
1293 return; 1292 return;
1294 1293
1295 const String& key = keyEvent->key(); 1294 const String& key = keyEvent->key();
1296 bool handled = true; 1295 bool handled = true;
1297 const ListItems& listItems = this->listItems(); 1296 const ListItems& listItems = this->listItems();
1298 HTMLOptionElement* option = selectedOption(); 1297 HTMLOptionElement* option = selectedOption();
1299 int listIndex = option ? option->listIndex() : -1; 1298 int listIndex = option ? option->listIndex() : -1;
1300 1299
1301 if (key == "ArrowDown" || key == "ArrowRight") 1300 if (key == "ArrowDown" || key == "ArrowRight")
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 m_popupUpdater = nullptr; 2043 m_popupUpdater = nullptr;
2045 } 2044 }
2046 2045
2047 void HTMLSelectElement::didMutateSubtree() { 2046 void HTMLSelectElement::didMutateSubtree() {
2048 DCHECK(popupIsVisible()); 2047 DCHECK(popupIsVisible());
2049 DCHECK(m_popup); 2048 DCHECK(m_popup);
2050 m_popup->updateFromElement(PopupMenu::ByDOMChange); 2049 m_popup->updateFromElement(PopupMenu::ByDOMChange);
2051 } 2050 }
2052 2051
2053 } // namespace blink 2052 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698