| OLD | NEW |
| 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 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 bool HTMLFormControlElement::shouldShowFocusRingOnMouseFocus() const | 368 bool HTMLFormControlElement::shouldShowFocusRingOnMouseFocus() const |
| 369 { | 369 { |
| 370 return false; | 370 return false; |
| 371 } | 371 } |
| 372 | 372 |
| 373 bool HTMLFormControlElement::shouldHaveFocusAppearance() const | 373 bool HTMLFormControlElement::shouldHaveFocusAppearance() const |
| 374 { | 374 { |
| 375 return !m_wasFocusedByMouse || shouldShowFocusRingOnMouseFocus(); | 375 return !m_wasFocusedByMouse || shouldShowFocusRingOnMouseFocus(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 void HTMLFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, Focu
sType type) | 378 void HTMLFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, WebF
ocusType type) |
| 379 { | 379 { |
| 380 if (type != FocusTypePage) | 380 if (type != WebFocusTypePage) |
| 381 m_wasFocusedByMouse = type == FocusTypeMouse; | 381 m_wasFocusedByMouse = type == WebFocusTypeMouse; |
| 382 HTMLElement::dispatchFocusEvent(oldFocusedElement, type); | 382 HTMLElement::dispatchFocusEvent(oldFocusedElement, type); |
| 383 } | 383 } |
| 384 | 384 |
| 385 void HTMLFormControlElement::willCallDefaultEventHandler(const Event& event) | 385 void HTMLFormControlElement::willCallDefaultEventHandler(const Event& event) |
| 386 { | 386 { |
| 387 if (!m_wasFocusedByMouse) | 387 if (!m_wasFocusedByMouse) |
| 388 return; | 388 return; |
| 389 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown) | 389 if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown) |
| 390 return; | 390 return; |
| 391 m_wasFocusedByMouse = false; | 391 m_wasFocusedByMouse = false; |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 622 |
| 623 void HTMLFormControlElement::setFocus(bool flag) | 623 void HTMLFormControlElement::setFocus(bool flag) |
| 624 { | 624 { |
| 625 LabelableElement::setFocus(flag); | 625 LabelableElement::setFocus(flag); |
| 626 | 626 |
| 627 if (!flag && wasChangedSinceLastFormControlChangeEvent()) | 627 if (!flag && wasChangedSinceLastFormControlChangeEvent()) |
| 628 dispatchFormControlChangeEvent(); | 628 dispatchFormControlChangeEvent(); |
| 629 } | 629 } |
| 630 | 630 |
| 631 } // namespace blink | 631 } // namespace blink |
| OLD | NEW |