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 26 matching lines...) Expand all Loading... |
37 class Element; | 37 class Element; |
38 class RenderScrollbar; | 38 class RenderScrollbar; |
39 class RenderStyle; | 39 class RenderStyle; |
40 | 40 |
41 class SelectorChecker { | 41 class SelectorChecker { |
42 WTF_MAKE_NONCOPYABLE(SelectorChecker); | 42 WTF_MAKE_NONCOPYABLE(SelectorChecker); |
43 public: | 43 public: |
44 enum Match { SelectorMatches, SelectorFailsLocally, SelectorFailsAllSiblings
, SelectorFailsCompletely }; | 44 enum Match { SelectorMatches, SelectorFailsLocally, SelectorFailsAllSiblings
, SelectorFailsCompletely }; |
45 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; | 45 enum VisitedMatchType { VisitedMatchDisabled, VisitedMatchEnabled }; |
46 enum Mode { ResolvingStyle = 0, CollectingRules, QueryingRules, SharingRules
}; | 46 enum Mode { ResolvingStyle = 0, CollectingRules, QueryingRules, SharingRules
}; |
47 explicit SelectorChecker(Document*, Mode); | 47 explicit SelectorChecker(Document&, Mode); |
48 enum BehaviorAtBoundary { | 48 enum BehaviorAtBoundary { |
49 DoesNotCrossBoundary = 0, | 49 DoesNotCrossBoundary = 0, |
50 CrossesBoundary = 1, | 50 CrossesBoundary = 1, |
51 StaysWithinTreeScope = 2, | 51 StaysWithinTreeScope = 2, |
52 BoundaryBehaviorMask = 3, // 2bit for boundary behavior | 52 BoundaryBehaviorMask = 3, // 2bit for boundary behavior |
53 ScopeContainsLastMatchedElement = 4, | 53 ScopeContainsLastMatchedElement = 4, |
54 ScopeIsShadowHost = 8 | 54 ScopeIsShadowHost = 8 |
55 }; | 55 }; |
56 | 56 |
57 struct SelectorCheckingContext { | 57 struct SelectorCheckingContext { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const Attribute* attribute = element->attributeItem(i); | 149 const Attribute* attribute = element->attributeItem(i); |
150 if (attribute->matches(selectorAttributeName) && (!value || attribute->v
alue().impl() == value)) | 150 if (attribute->matches(selectorAttributeName) && (!value || attribute->v
alue().impl() == value)) |
151 return true; | 151 return true; |
152 } | 152 } |
153 return false; | 153 return false; |
154 } | 154 } |
155 | 155 |
156 } | 156 } |
157 | 157 |
158 #endif | 158 #endif |
OLD | NEW |