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

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

Issue 476763004: Rename FullscreenElementStack to just Fullscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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
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 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/css/SelectorChecker.h" 29 #include "core/css/SelectorChecker.h"
30 30
31 #include "core/HTMLNames.h" 31 #include "core/HTMLNames.h"
32 #include "core/css/CSSSelectorList.h" 32 #include "core/css/CSSSelectorList.h"
33 #include "core/css/SiblingTraversalStrategies.h" 33 #include "core/css/SiblingTraversalStrategies.h"
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "core/dom/ElementTraversal.h" 35 #include "core/dom/ElementTraversal.h"
36 #include "core/dom/FullscreenElementStack.h" 36 #include "core/dom/Fullscreen.h"
37 #include "core/dom/NodeRenderStyle.h" 37 #include "core/dom/NodeRenderStyle.h"
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"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 break; 848 break;
849 return true; 849 return true;
850 } 850 }
851 case CSSSelector::PseudoFullScreen: 851 case CSSSelector::PseudoFullScreen:
852 // While a Document is in the fullscreen state, and the document's c urrent fullscreen 852 // While a Document is in the fullscreen state, and the document's c urrent fullscreen
853 // element is an element in the document, the 'full-screen' pseudocl ass applies to 853 // element is an element in the document, the 'full-screen' pseudocl ass applies to
854 // that element. Also, an <iframe>, <object> or <embed> element whos e child browsing 854 // that element. Also, an <iframe>, <object> or <embed> element whos e child browsing
855 // context's Document is in the fullscreen state has the 'full-scree n' pseudoclass applied. 855 // context's Document is in the fullscreen state has the 'full-scree n' pseudoclass applied.
856 if (isHTMLFrameElementBase(element) && element.containsFullScreenEle ment()) 856 if (isHTMLFrameElementBase(element) && element.containsFullScreenEle ment())
857 return true; 857 return true;
858 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fro mIfExists(element.document())) { 858 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(element.docume nt())) {
859 if (!fullscreen->webkitIsFullScreen()) 859 if (!fullscreen->webkitIsFullScreen())
860 return false; 860 return false;
861 return element == fullscreen->webkitCurrentFullScreenElement(); 861 return element == fullscreen->webkitCurrentFullScreenElement();
862 } 862 }
863 return false; 863 return false;
864 case CSSSelector::PseudoFullScreenAncestor: 864 case CSSSelector::PseudoFullScreenAncestor:
865 return element.containsFullScreenElement(); 865 return element.containsFullScreenElement();
866 case CSSSelector::PseudoFullScreenDocument: 866 case CSSSelector::PseudoFullScreenDocument:
867 // While a Document is in the fullscreen state, the 'full-screen-doc ument' pseudoclass applies 867 // While a Document is in the fullscreen state, the 'full-screen-doc ument' pseudoclass applies
868 // to all elements of that Document. 868 // to all elements of that Document.
869 if (!FullscreenElementStack::isFullScreen(element.document())) 869 if (!Fullscreen::isFullScreen(element.document()))
870 return false; 870 return false;
871 return true; 871 return true;
872 case CSSSelector::PseudoInRange: 872 case CSSSelector::PseudoInRange:
873 element.document().setContainsValidityStyleRules(); 873 element.document().setContainsValidityStyleRules();
874 return element.isInRange(); 874 return element.isInRange();
875 case CSSSelector::PseudoOutOfRange: 875 case CSSSelector::PseudoOutOfRange:
876 element.document().setContainsValidityStyleRules(); 876 element.document().setContainsValidityStyleRules();
877 return element.isOutOfRange(); 877 return element.isOutOfRange();
878 case CSSSelector::PseudoFutureCue: 878 case CSSSelector::PseudoFutureCue:
879 return (element.isVTTElement() && !toVTTElement(element).isPastNode( )); 879 return (element.isVTTElement() && !toVTTElement(element).isPastNode( ));
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen uList(); 1137 return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMen uList();
1138 } 1138 }
1139 1139
1140 template 1140 template
1141 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const; 1141 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst DOMSiblingTraversalStrategy&, MatchResult*) const;
1142 1142
1143 template 1143 template
1144 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; 1144 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const;
1145 1145
1146 } 1146 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSDefaultStyleSheets.cpp ('k') | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698