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

Side by Side Diff: Source/core/html/HTMLAnchorElement.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/HTMLAnchorElement.h ('k') | Source/core/html/HTMLFormControlElement.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) 2000 Simon Hausmann <hausmann@kde.org> 4 * (C) 2000 Simon Hausmann <hausmann@kde.org>
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return HTMLElement::supportsFocus(); 82 return HTMLElement::supportsFocus();
83 // If not a link we should still be able to focus the element if it has tabI ndex. 83 // If not a link we should still be able to focus the element if it has tabI ndex.
84 return isLink() || HTMLElement::supportsFocus(); 84 return isLink() || HTMLElement::supportsFocus();
85 } 85 }
86 86
87 bool HTMLAnchorElement::shouldHaveFocusAppearance() const 87 bool HTMLAnchorElement::shouldHaveFocusAppearance() const
88 { 88 {
89 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); 89 return !m_wasFocusedByMouse || HTMLElement::supportsFocus();
90 } 90 }
91 91
92 void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type) 92 void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusT ype type)
93 { 93 {
94 if (type != FocusTypePage) 94 if (type != WebFocusTypePage)
95 m_wasFocusedByMouse = type == FocusTypeMouse; 95 m_wasFocusedByMouse = type == WebFocusTypeMouse;
96 HTMLElement::dispatchFocusEvent(oldFocusedElement, type); 96 HTMLElement::dispatchFocusEvent(oldFocusedElement, type);
97 } 97 }
98 98
99 bool HTMLAnchorElement::isMouseFocusable() const 99 bool HTMLAnchorElement::isMouseFocusable() const
100 { 100 {
101 if (isLink()) 101 if (isLink())
102 return supportsFocus(); 102 return supportsFocus();
103 103
104 return HTMLElement::isMouseFocusable(); 104 return HTMLElement::isMouseFocusable();
105 } 105 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 Vector<String> argv; 389 Vector<String> argv;
390 argv.append("a"); 390 argv.append("a");
391 argv.append(fastGetAttribute(hrefAttr)); 391 argv.append(fastGetAttribute(hrefAttr));
392 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); 392 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() );
393 } 393 }
394 } 394 }
395 return HTMLElement::insertedInto(insertionPoint); 395 return HTMLElement::insertedInto(insertionPoint);
396 } 396 }
397 397
398 } 398 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698