| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 case CSSSelector::PseudoDecrement: | 1153 case CSSSelector::PseudoDecrement: |
| 1154 return part == BackButtonStartPart || part == BackButtonEndPart || part
== BackTrackPart; | 1154 return part == BackButtonStartPart || part == BackButtonEndPart || part
== BackTrackPart; |
| 1155 case CSSSelector::PseudoIncrement: | 1155 case CSSSelector::PseudoIncrement: |
| 1156 return part == ForwardButtonStartPart || part == ForwardButtonEndPart ||
part == ForwardTrackPart; | 1156 return part == ForwardButtonStartPart || part == ForwardButtonEndPart ||
part == ForwardTrackPart; |
| 1157 case CSSSelector::PseudoStart: | 1157 case CSSSelector::PseudoStart: |
| 1158 return part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart; | 1158 return part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart; |
| 1159 case CSSSelector::PseudoEnd: | 1159 case CSSSelector::PseudoEnd: |
| 1160 return part == BackButtonEndPart || part == ForwardButtonEndPart || part
== ForwardTrackPart; | 1160 return part == BackButtonEndPart || part == ForwardButtonEndPart || part
== ForwardTrackPart; |
| 1161 case CSSSelector::PseudoDoubleButton: | 1161 case CSSSelector::PseudoDoubleButton: |
| 1162 { | 1162 { |
| 1163 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1163 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme().butt
onsPlacement(); |
| 1164 if (part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart) | 1164 if (part == BackButtonStartPart || part == ForwardButtonStartPart ||
part == BackTrackPart) |
| 1165 return buttonsPlacement == ScrollbarButtonsPlacementDoubleStart
|| buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; | 1165 return buttonsPlacement == ScrollbarButtonsPlacementDoubleStart
|| buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; |
| 1166 if (part == BackButtonEndPart || part == ForwardButtonEndPart || par
t == ForwardTrackPart) | 1166 if (part == BackButtonEndPart || part == ForwardButtonEndPart || par
t == ForwardTrackPart) |
| 1167 return buttonsPlacement == ScrollbarButtonsPlacementDoubleEnd ||
buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; | 1167 return buttonsPlacement == ScrollbarButtonsPlacementDoubleEnd ||
buttonsPlacement == ScrollbarButtonsPlacementDoubleBoth; |
| 1168 return false; | 1168 return false; |
| 1169 } | 1169 } |
| 1170 case CSSSelector::PseudoSingleButton: | 1170 case CSSSelector::PseudoSingleButton: |
| 1171 { | 1171 { |
| 1172 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1172 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme().butt
onsPlacement(); |
| 1173 if (part == BackButtonStartPart || part == ForwardButtonEndPart || p
art == BackTrackPart || part == ForwardTrackPart) | 1173 if (part == BackButtonStartPart || part == ForwardButtonEndPart || p
art == BackTrackPart || part == ForwardTrackPart) |
| 1174 return buttonsPlacement == ScrollbarButtonsPlacementSingle; | 1174 return buttonsPlacement == ScrollbarButtonsPlacementSingle; |
| 1175 return false; | 1175 return false; |
| 1176 } | 1176 } |
| 1177 case CSSSelector::PseudoNoButton: | 1177 case CSSSelector::PseudoNoButton: |
| 1178 { | 1178 { |
| 1179 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme()->but
tonsPlacement(); | 1179 ScrollbarButtonsPlacement buttonsPlacement = scrollbar->theme().butt
onsPlacement(); |
| 1180 if (part == BackTrackPart) | 1180 if (part == BackTrackPart) |
| 1181 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleEnd; | 1181 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleEnd; |
| 1182 if (part == ForwardTrackPart) | 1182 if (part == ForwardTrackPart) |
| 1183 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleStart; | 1183 return buttonsPlacement == ScrollbarButtonsPlacementNone || butt
onsPlacement == ScrollbarButtonsPlacementDoubleStart; |
| 1184 return false; | 1184 return false; |
| 1185 } | 1185 } |
| 1186 case CSSSelector::PseudoCornerPresent: | 1186 case CSSSelector::PseudoCornerPresent: |
| 1187 return scrollbar->scrollableArea() && scrollbar->scrollableArea()->isScr
ollCornerVisible(); | 1187 return scrollbar->scrollableArea() && scrollbar->scrollableArea()->isScr
ollCornerVisible(); |
| 1188 default: | 1188 default: |
| 1189 return false; | 1189 return false; |
| 1190 } | 1190 } |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) | 1193 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) |
| 1194 { | 1194 { |
| 1195 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) | 1195 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element
), CSSSelector::PseudoFocus)) |
| 1196 return true; | 1196 return true; |
| 1197 return element.focused() && isFrameFocused(element); | 1197 return element.focused() && isFrameFocused(element); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 } | 1200 } |
| OLD | NEW |