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

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

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: Created 3 years, 9 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) 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. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (m_mode == ResolvingStyle) { 907 if (m_mode == ResolvingStyle) {
908 if (context.inRightmostCompound) { 908 if (context.inRightmostCompound) {
909 m_elementStyle->setAffectedByHover(); 909 m_elementStyle->setAffectedByHover();
910 } else { 910 } else {
911 m_elementStyle->setUnique(); 911 m_elementStyle->setUnique();
912 element.setChildrenOrSiblingsAffectedByHover(); 912 element.setChildrenOrSiblingsAffectedByHover();
913 } 913 }
914 } 914 }
915 if (!shouldMatchHoverOrActive(context)) 915 if (!shouldMatchHoverOrActive(context))
916 return false; 916 return false;
917 if (InspectorInstrumentation::forcePseudoState(&element, 917 if (probe::forcePseudoState(&element, CSSSelector::PseudoHover))
918 CSSSelector::PseudoHover))
919 return true; 918 return true;
920 return element.isHovered(); 919 return element.isHovered();
921 case CSSSelector::PseudoActive: 920 case CSSSelector::PseudoActive:
922 if (m_mode == SharingRules) 921 if (m_mode == SharingRules)
923 return true; 922 return true;
924 if (m_mode == ResolvingStyle) { 923 if (m_mode == ResolvingStyle) {
925 if (context.inRightmostCompound) { 924 if (context.inRightmostCompound) {
926 m_elementStyle->setAffectedByActive(); 925 m_elementStyle->setAffectedByActive();
927 } else { 926 } else {
928 m_elementStyle->setUnique(); 927 m_elementStyle->setUnique();
929 element.setChildrenOrSiblingsAffectedByActive(); 928 element.setChildrenOrSiblingsAffectedByActive();
930 } 929 }
931 } 930 }
932 if (!shouldMatchHoverOrActive(context)) 931 if (!shouldMatchHoverOrActive(context))
933 return false; 932 return false;
934 if (InspectorInstrumentation::forcePseudoState(&element, 933 if (probe::forcePseudoState(&element, CSSSelector::PseudoActive))
935 CSSSelector::PseudoActive))
936 return true; 934 return true;
937 return element.isActive(); 935 return element.isActive();
938 case CSSSelector::PseudoEnabled: 936 case CSSSelector::PseudoEnabled:
939 return element.matchesEnabledPseudoClass(); 937 return element.matchesEnabledPseudoClass();
940 case CSSSelector::PseudoFullPageMedia: 938 case CSSSelector::PseudoFullPageMedia:
941 return element.document().isMediaDocument(); 939 return element.document().isMediaDocument();
942 case CSSSelector::PseudoDefault: 940 case CSSSelector::PseudoDefault:
943 return element.matchesDefaultPseudoClass(); 941 return element.matchesDefaultPseudoClass();
944 case CSSSelector::PseudoDisabled: 942 case CSSSelector::PseudoDisabled:
945 return element.isDisabledFormControl(); 943 return element.isDisabledFormControl();
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1299 }
1302 case CSSSelector::PseudoCornerPresent: 1300 case CSSSelector::PseudoCornerPresent:
1303 return m_scrollbar->getScrollableArea() && 1301 return m_scrollbar->getScrollableArea() &&
1304 m_scrollbar->getScrollableArea()->isScrollCornerVisible(); 1302 m_scrollbar->getScrollableArea()->isScrollCornerVisible();
1305 default: 1303 default:
1306 return false; 1304 return false;
1307 } 1305 }
1308 } 1306 }
1309 1307
1310 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) { 1308 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) {
1311 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element), 1309 if (probe::forcePseudoState(const_cast<Element*>(&element),
1312 CSSSelector::PseudoFocus)) 1310 CSSSelector::PseudoFocus))
1313 return true; 1311 return true;
1314 return element.isFocused() && isFrameFocused(element); 1312 return element.isFocused() && isFrameFocused(element);
1315 } 1313 }
1316 1314
1317 } // namespace blink 1315 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698