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

Side by Side Diff: Source/core/css/SelectorChecker.cpp

Issue 450623002: Styling option should not override option:checked UA style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added to isSkippableComponentForInvalidation Created 6 years, 4 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/css/SelectorChecker.h ('k') | Source/core/css/html.css » ('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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 27 matching lines...) Expand all
38 #include "core/dom/StyleEngine.h" 38 #include "core/dom/StyleEngine.h"
39 #include "core/dom/Text.h" 39 #include "core/dom/Text.h"
40 #include "core/dom/shadow/InsertionPoint.h" 40 #include "core/dom/shadow/InsertionPoint.h"
41 #include "core/dom/shadow/ShadowRoot.h" 41 #include "core/dom/shadow/ShadowRoot.h"
42 #include "core/editing/FrameSelection.h" 42 #include "core/editing/FrameSelection.h"
43 #include "core/frame/LocalFrame.h" 43 #include "core/frame/LocalFrame.h"
44 #include "core/html/HTMLDocument.h" 44 #include "core/html/HTMLDocument.h"
45 #include "core/html/HTMLFrameElementBase.h" 45 #include "core/html/HTMLFrameElementBase.h"
46 #include "core/html/HTMLInputElement.h" 46 #include "core/html/HTMLInputElement.h"
47 #include "core/html/HTMLOptionElement.h" 47 #include "core/html/HTMLOptionElement.h"
48 #include "core/html/HTMLSelectElement.h"
48 #include "core/html/parser/HTMLParserIdioms.h" 49 #include "core/html/parser/HTMLParserIdioms.h"
49 #include "core/html/track/vtt/VTTElement.h" 50 #include "core/html/track/vtt/VTTElement.h"
50 #include "core/inspector/InspectorInstrumentation.h" 51 #include "core/inspector/InspectorInstrumentation.h"
51 #include "core/page/FocusController.h" 52 #include "core/page/FocusController.h"
52 #include "core/page/Page.h" 53 #include "core/page/Page.h"
53 #include "core/rendering/RenderObject.h" 54 #include "core/rendering/RenderObject.h"
54 #include "core/rendering/RenderScrollbar.h" 55 #include "core/rendering/RenderScrollbar.h"
55 #include "core/rendering/style/RenderStyle.h" 56 #include "core/rendering/style/RenderStyle.h"
56 #include "platform/scroll/ScrollableArea.h" 57 #include "platform/scroll/ScrollableArea.h"
57 #include "platform/scroll/ScrollbarTheme.h" 58 #include "platform/scroll/ScrollbarTheme.h"
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 } 946 }
946 if (matched) { 947 if (matched) {
947 if (specificity) 948 if (specificity)
948 *specificity = maxSpecificity; 949 *specificity = maxSpecificity;
949 return true; 950 return true;
950 } 951 }
951 } 952 }
952 break; 953 break;
953 case CSSSelector::PseudoSpatialNavigationFocus: 954 case CSSSelector::PseudoSpatialNavigationFocus:
954 return context.isUARule && matchesSpatialNavigationFocusPseudoClass( element); 955 return context.isUARule && matchesSpatialNavigationFocusPseudoClass( element);
956 case CSSSelector::PseudoListBox:
957 return context.isUARule && matchesListBoxPseudoClass(element);
955 958
956 case CSSSelector::PseudoHorizontal: 959 case CSSSelector::PseudoHorizontal:
957 case CSSSelector::PseudoVertical: 960 case CSSSelector::PseudoVertical:
958 case CSSSelector::PseudoDecrement: 961 case CSSSelector::PseudoDecrement:
959 case CSSSelector::PseudoIncrement: 962 case CSSSelector::PseudoIncrement:
960 case CSSSelector::PseudoStart: 963 case CSSSelector::PseudoStart:
961 case CSSSelector::PseudoEnd: 964 case CSSSelector::PseudoEnd:
962 case CSSSelector::PseudoDoubleButton: 965 case CSSSelector::PseudoDoubleButton:
963 case CSSSelector::PseudoSingleButton: 966 case CSSSelector::PseudoSingleButton:
964 case CSSSelector::PseudoNoButton: 967 case CSSSelector::PseudoNoButton:
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element ), CSSSelector::PseudoFocus)) 1125 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element ), CSSSelector::PseudoFocus))
1123 return true; 1126 return true;
1124 return element.focused() && isFrameFocused(element); 1127 return element.focused() && isFrameFocused(element);
1125 } 1128 }
1126 1129
1127 bool SelectorChecker::matchesSpatialNavigationFocusPseudoClass(const Element& el ement) 1130 bool SelectorChecker::matchesSpatialNavigationFocusPseudoClass(const Element& el ement)
1128 { 1131 {
1129 return isHTMLOptionElement(element) && toHTMLOptionElement(element).spatialN avigationFocused() && isFrameFocused(element); 1132 return isHTMLOptionElement(element) && toHTMLOptionElement(element).spatialN avigationFocused() && isFrameFocused(element);
1130 } 1133 }
1131 1134
1135 bool SelectorChecker::matchesListBoxPseudoClass(const Element& element)
1136 {
1137 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen uList();
1138 }
1139
1132 template 1140 template
1133 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const; 1141 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const;
1134 1142
1135 template 1143 template
1136 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; 1144 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const;
1137 1145
1138 } 1146 }
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | Source/core/css/html.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698