OLD | NEW |
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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 case CSSSelector::PseudoIncrement: | 1141 case CSSSelector::PseudoIncrement: |
1142 return part == ForwardButtonStartPart || part == ForwardButtonEndPart ||
part == ForwardTrackPart; | 1142 return part == ForwardButtonStartPart || part == ForwardButtonEndPart ||
part == ForwardTrackPart; |
1143 case CSSSelector::PseudoStart: | 1143 case CSSSelector::PseudoStart: |
1144 return part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart; | 1144 return part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart; |
1145 case CSSSelector::PseudoEnd: | 1145 case CSSSelector::PseudoEnd: |
1146 return part == BackButtonEndPart || part == ForwardButtonEndPart || part
== ForwardTrackPart; | 1146 return part == BackButtonEndPart || part == ForwardButtonEndPart || part
== ForwardTrackPart; |
1147 case CSSSelector::PseudoDoubleButton: | 1147 case CSSSelector::PseudoDoubleButton: |
1148 { | 1148 { |
1149 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1149 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); |
1150 if (part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart) | 1150 if (part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart) |
1151 return buttonsPlacement == ScrollbarButtonsDoubleStart || button
sPlacement == ScrollbarButtonsDoubleBoth; | 1151 return buttonsPlacement == ScrollbarButtonsPlacementDoubleStart
|| buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; |
1152 if (part == BackButtonEndPart || part == ForwardButtonEndPart || par
t == ForwardTrackPart) | 1152 if (part == BackButtonEndPart || part == ForwardButtonEndPart || par
t == ForwardTrackPart) |
1153 return buttonsPlacement == ScrollbarButtonsDoubleEnd || buttonsP
lacement == ScrollbarButtonsDoubleBoth; | 1153 return buttonsPlacement == ScrollbarButtonsPlacementDoubleEnd ||
buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; |
1154 return false; | 1154 return false; |
1155 } | 1155 } |
1156 case CSSSelector::PseudoSingleButton: | 1156 case CSSSelector::PseudoSingleButton: |
1157 { | 1157 { |
1158 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1158 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); |
1159 if (part == BackButtonStartPart || part == ForwardButtonEndPart || p
art == BackTrackPart || part == ForwardTrackPart) | 1159 if (part == BackButtonStartPart || part == ForwardButtonEndPart || p
art == BackTrackPart || part == ForwardTrackPart) |
1160 return buttonsPlacement == ScrollbarButtonsSingle; | 1160 return buttonsPlacement == ScrollbarButtonsPlacementSingle; |
1161 return false; | 1161 return false; |
1162 } | 1162 } |
1163 case CSSSelector::PseudoNoButton: | 1163 case CSSSelector::PseudoNoButton: |
1164 { | 1164 { |
1165 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1165 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); |
1166 if (part == BackTrackPart) | 1166 if (part == BackTrackPart) |
1167 return buttonsPlacement == ScrollbarButtonsNone || buttonsPlacem
ent == ScrollbarButtonsDoubleEnd; | 1167 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleEnd; |
1168 if (part == ForwardTrackPart) | 1168 if (part == ForwardTrackPart) |
1169 return buttonsPlacement == ScrollbarButtonsNone || buttonsPlacem
ent == ScrollbarButtonsDoubleStart; | 1169 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleStart; |
1170 return false; | 1170 return false; |
1171 } | 1171 } |
1172 case CSSSelector::PseudoCornerPresent: | 1172 case CSSSelector::PseudoCornerPresent: |
1173 return scrollbar->scrollableArea() && scrollbar->scrollableArea()->isScr
ollCornerVisible(); | 1173 return scrollbar->scrollableArea() && scrollbar->scrollableArea()->isScr
ollCornerVisible(); |
1174 default: | 1174 default: |
1175 return false; | 1175 return false; |
1176 } | 1176 } |
1177 } | 1177 } |
1178 | 1178 |
1179 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1179 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
1180 { | 1180 { |
1181 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1181 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
1182 return true; | 1182 return true; |
1183 return element.focused() && isFrameFocused(element); | 1183 return element.focused() && isFrameFocused(element); |
1184 } | 1184 } |
1185 | 1185 |
1186 } | 1186 } |
OLD | NEW |