| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "core/frame/FrameHost.h" | 53 #include "core/frame/FrameHost.h" |
| 54 #include "core/frame/FrameView.h" | 54 #include "core/frame/FrameView.h" |
| 55 #include "core/frame/LocalFrame.h" | 55 #include "core/frame/LocalFrame.h" |
| 56 #include "core/html/FormData.h" | 56 #include "core/html/FormData.h" |
| 57 #include "core/html/HTMLFormElement.h" | 57 #include "core/html/HTMLFormElement.h" |
| 58 #include "core/html/HTMLHRElement.h" | 58 #include "core/html/HTMLHRElement.h" |
| 59 #include "core/html/HTMLOptGroupElement.h" | 59 #include "core/html/HTMLOptGroupElement.h" |
| 60 #include "core/html/HTMLOptionElement.h" | 60 #include "core/html/HTMLOptionElement.h" |
| 61 #include "core/html/forms/FormController.h" | 61 #include "core/html/forms/FormController.h" |
| 62 #include "core/input/EventHandler.h" | 62 #include "core/input/EventHandler.h" |
| 63 #include "core/input/InputDeviceCapabilities.h" |
| 63 #include "core/inspector/ConsoleMessage.h" | 64 #include "core/inspector/ConsoleMessage.h" |
| 64 #include "core/layout/HitTestRequest.h" | 65 #include "core/layout/HitTestRequest.h" |
| 65 #include "core/layout/HitTestResult.h" | 66 #include "core/layout/HitTestResult.h" |
| 66 #include "core/layout/LayoutListBox.h" | 67 #include "core/layout/LayoutListBox.h" |
| 67 #include "core/layout/LayoutMenuList.h" | 68 #include "core/layout/LayoutMenuList.h" |
| 68 #include "core/layout/LayoutTheme.h" | 69 #include "core/layout/LayoutTheme.h" |
| 69 #include "core/page/AutoscrollController.h" | 70 #include "core/page/AutoscrollController.h" |
| 70 #include "core/page/ChromeClient.h" | 71 #include "core/page/ChromeClient.h" |
| 71 #include "core/page/Page.h" | 72 #include "core/page/Page.h" |
| 72 #include "core/page/SpatialNavigation.h" | 73 #include "core/page/SpatialNavigation.h" |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 form()->submitImplicitly(event, false); | 1345 form()->submitImplicitly(event, false); |
| 1345 dispatchInputAndChangeEventForMenuList(); | 1346 dispatchInputAndChangeEventForMenuList(); |
| 1346 event->setDefaultHandled(); | 1347 event->setDefaultHandled(); |
| 1347 } | 1348 } |
| 1348 } | 1349 } |
| 1349 | 1350 |
| 1350 if (event->type() == EventTypeNames::mousedown && event->isMouseEvent() && | 1351 if (event->type() == EventTypeNames::mousedown && event->isMouseEvent() && |
| 1351 toMouseEvent(event)->button() == | 1352 toMouseEvent(event)->button() == |
| 1352 static_cast<short>(WebPointerProperties::Button::Left)) { | 1353 static_cast<short>(WebPointerProperties::Button::Left)) { |
| 1353 InputDeviceCapabilities* sourceCapabilities = | 1354 InputDeviceCapabilities* sourceCapabilities = |
| 1354 toMouseEvent(event)->fromTouch() | 1355 document().domWindow()->getInputDeviceCapabilities()->firesTouchEvents( |
| 1355 ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities() | 1356 toMouseEvent(event)->fromTouch()); |
| 1356 : InputDeviceCapabilities:: | |
| 1357 doesntFireTouchEventsSourceCapabilities(); | |
| 1358 focus(FocusParams(SelectionBehaviorOnFocus::Restore, WebFocusTypeNone, | 1357 focus(FocusParams(SelectionBehaviorOnFocus::Restore, WebFocusTypeNone, |
| 1359 sourceCapabilities)); | 1358 sourceCapabilities)); |
| 1360 if (layoutObject() && layoutObject()->isMenuList() && | 1359 if (layoutObject() && layoutObject()->isMenuList() && |
| 1361 !isDisabledFormControl()) { | 1360 !isDisabledFormControl()) { |
| 1362 if (popupIsVisible()) { | 1361 if (popupIsVisible()) { |
| 1363 hidePopup(); | 1362 hidePopup(); |
| 1364 } else { | 1363 } else { |
| 1365 // Save the selection so it can be compared to the new selection | 1364 // Save the selection so it can be compared to the new selection |
| 1366 // when we call onChange during selectOption, which gets called | 1365 // when we call onChange during selectOption, which gets called |
| 1367 // from selectOptionByPopup, which gets called after the user | 1366 // from selectOptionByPopup, which gets called after the user |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2043 m_popupUpdater = nullptr; | 2042 m_popupUpdater = nullptr; |
| 2044 } | 2043 } |
| 2045 | 2044 |
| 2046 void HTMLSelectElement::didMutateSubtree() { | 2045 void HTMLSelectElement::didMutateSubtree() { |
| 2047 DCHECK(popupIsVisible()); | 2046 DCHECK(popupIsVisible()); |
| 2048 DCHECK(m_popup); | 2047 DCHECK(m_popup); |
| 2049 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2048 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
| 2050 } | 2049 } |
| 2051 | 2050 |
| 2052 } // namespace blink | 2051 } // namespace blink |
| OLD | NEW |