| 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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 focus(); | 1488 focus(); |
| 1489 // Calling focus() may cause us to lose our layoutObject, in which case | 1489 // Calling focus() may cause us to lose our layoutObject, in which case |
| 1490 // do not want to handle the event. | 1490 // do not want to handle the event. |
| 1491 if (!GetLayoutObject() || !GetLayoutObject()->IsListBox() || | 1491 if (!GetLayoutObject() || !GetLayoutObject()->IsListBox() || |
| 1492 IsDisabledFormControl()) | 1492 IsDisabledFormControl()) |
| 1493 return; | 1493 return; |
| 1494 | 1494 |
| 1495 // Convert to coords relative to the list box if needed. | 1495 // Convert to coords relative to the list box if needed. |
| 1496 MouseEvent* mouse_event = ToMouseEvent(event); | 1496 MouseEvent* mouse_event = ToMouseEvent(event); |
| 1497 if (HTMLOptionElement* option = EventTargetOption(*mouse_event)) { | 1497 if (HTMLOptionElement* option = EventTargetOption(*mouse_event)) { |
| 1498 if (!IsDisabledFormControl()) { | 1498 if (!option->IsDisabledFormControl()) { |
| 1499 #if OS(MACOSX) | 1499 #if OS(MACOSX) |
| 1500 UpdateSelectedState(option, mouse_event->metaKey(), | 1500 UpdateSelectedState(option, mouse_event->metaKey(), |
| 1501 mouse_event->shiftKey()); | 1501 mouse_event->shiftKey()); |
| 1502 #else | 1502 #else |
| 1503 UpdateSelectedState(option, mouse_event->ctrlKey(), | 1503 UpdateSelectedState(option, mouse_event->ctrlKey(), |
| 1504 mouse_event->shiftKey()); | 1504 mouse_event->shiftKey()); |
| 1505 #endif | 1505 #endif |
| 1506 } | 1506 } |
| 1507 if (LocalFrame* frame = GetDocument().GetFrame()) | 1507 if (LocalFrame* frame = GetDocument().GetFrame()) |
| 1508 frame->GetEventHandler().SetMouseDownMayStartAutoscroll(); | 1508 frame->GetEventHandler().SetMouseDownMayStartAutoscroll(); |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2055 popup_updater_ = nullptr; | 2055 popup_updater_ = nullptr; |
| 2056 } | 2056 } |
| 2057 | 2057 |
| 2058 void HTMLSelectElement::DidMutateSubtree() { | 2058 void HTMLSelectElement::DidMutateSubtree() { |
| 2059 DCHECK(PopupIsVisible()); | 2059 DCHECK(PopupIsVisible()); |
| 2060 DCHECK(popup_); | 2060 DCHECK(popup_); |
| 2061 popup_->UpdateFromElement(PopupMenu::kByDOMChange); | 2061 popup_->UpdateFromElement(PopupMenu::kByDOMChange); |
| 2062 } | 2062 } |
| 2063 | 2063 |
| 2064 } // namespace blink | 2064 } // namespace blink |
| OLD | NEW |