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

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

Issue 2855843002: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" (Closed)
Patch Set: Reland "Sync requestFullscreen() and exitFullscreen() algorithms with the spec" Created 3 years, 6 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 } 1048 }
1049 case CSSSelector::kPseudoFullScreen: 1049 case CSSSelector::kPseudoFullScreen:
1050 // While a Document is in the fullscreen state, and the document's current 1050 // While a Document is in the fullscreen state, and the document's current
1051 // fullscreen element is an element in the document, the 'full-screen' 1051 // fullscreen element is an element in the document, the 'full-screen'
1052 // pseudoclass applies to that element. Also, an <iframe>, <object> or 1052 // pseudoclass applies to that element. Also, an <iframe>, <object> or
1053 // <embed> element whose child browsing context's Document is in the 1053 // <embed> element whose child browsing context's Document is in the
1054 // fullscreen state has the 'full-screen' pseudoclass applied. 1054 // fullscreen state has the 'full-screen' pseudoclass applied.
1055 if (IsHTMLFrameElementBase(element) && 1055 if (IsHTMLFrameElementBase(element) &&
1056 element.ContainsFullScreenElement()) 1056 element.ContainsFullScreenElement())
1057 return true; 1057 return true;
1058 return Fullscreen::IsCurrentFullScreenElement(element); 1058 return Fullscreen::IsFullscreenElement(element);
1059 case CSSSelector::kPseudoFullScreenAncestor: 1059 case CSSSelector::kPseudoFullScreenAncestor:
1060 return element.ContainsFullScreenElement(); 1060 return element.ContainsFullScreenElement();
1061 case CSSSelector::kPseudoVideoPersistent: 1061 case CSSSelector::kPseudoVideoPersistent:
1062 DCHECK(is_ua_rule_); 1062 DCHECK(is_ua_rule_);
1063 return isHTMLVideoElement(element) && 1063 return isHTMLVideoElement(element) &&
1064 toHTMLVideoElement(element).IsPersistent(); 1064 toHTMLVideoElement(element).IsPersistent();
1065 case CSSSelector::kPseudoVideoPersistentAncestor: 1065 case CSSSelector::kPseudoVideoPersistentAncestor:
1066 DCHECK(is_ua_rule_); 1066 DCHECK(is_ua_rule_);
1067 return element.ContainsPersistentVideo(); 1067 return element.ContainsPersistentVideo();
1068 case CSSSelector::kPseudoInRange: 1068 case CSSSelector::kPseudoInRange:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 bool SelectorChecker::MatchesFocusPseudoClass(const Element& element) { 1371 bool SelectorChecker::MatchesFocusPseudoClass(const Element& element) {
1372 bool force_pseudo_state = false; 1372 bool force_pseudo_state = false;
1373 probe::forcePseudoState(const_cast<Element*>(&element), 1373 probe::forcePseudoState(const_cast<Element*>(&element),
1374 CSSSelector::kPseudoFocus, &force_pseudo_state); 1374 CSSSelector::kPseudoFocus, &force_pseudo_state);
1375 if (force_pseudo_state) 1375 if (force_pseudo_state)
1376 return true; 1376 return true;
1377 return element.IsFocused() && IsFrameFocused(element); 1377 return element.IsFocused() && IsFrameFocused(element);
1378 } 1378 }
1379 1379
1380 } // namespace blink 1380 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp ('k') | third_party/WebKit/Source/core/dom/DocumentFullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698