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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 1914933003: output should not match to :enabled or :disabled pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 7 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 bool HTMLAnchorElement::supportsFocus() const 62 bool HTMLAnchorElement::supportsFocus() const
63 { 63 {
64 if (hasEditableStyle()) 64 if (hasEditableStyle())
65 return HTMLElement::supportsFocus(); 65 return HTMLElement::supportsFocus();
66 // If not a link we should still be able to focus the element if it has tabI ndex. 66 // If not a link we should still be able to focus the element if it has tabI ndex.
67 return isLink() || HTMLElement::supportsFocus(); 67 return isLink() || HTMLElement::supportsFocus();
68 } 68 }
69 69
70 bool HTMLAnchorElement::matchesEnabledPseudoClass() const
71 {
72 return isLink();
73 }
74
70 bool HTMLAnchorElement::shouldHaveFocusAppearance() const 75 bool HTMLAnchorElement::shouldHaveFocusAppearance() const
71 { 76 {
72 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); 77 return !m_wasFocusedByMouse || HTMLElement::supportsFocus();
73 } 78 }
74 79
75 void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusT ype type, InputDeviceCapabilities* sourceCapabilities) 80 void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusT ype type, InputDeviceCapabilities* sourceCapabilities)
76 { 81 {
77 if (type != WebFocusTypePage) 82 if (type != WebFocusTypePage)
78 m_wasFocusedByMouse = type == WebFocusTypeMouse; 83 m_wasFocusedByMouse = type == WebFocusTypeMouse;
79 HTMLElement::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities) ; 84 HTMLElement::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities) ;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } 387 }
383 388
384 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint) 389 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint)
385 { 390 {
386 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int); 391 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int);
387 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); 392 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
388 return request; 393 return request;
389 } 394 }
390 395
391 } // namespace blink 396 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAnchorElement.h ('k') | third_party/WebKit/Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698