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

Side by Side Diff: Source/core/html/HTMLFormControlElement.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/HTMLFormControlElement.h ('k') | Source/core/html/HTMLInputElement.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) 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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.h ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698