Commit 755d9c29 authored by philipj@opera.com's avatar philipj@opera.com

Remove webkitIsFullScreen everywhere except in bindings

It's equivalent to webkitCurrentFullScreenElement != null.

BUG=383813

Review URL: https://codereview.chromium.org/476353002

git-svn-id: svn://svn.chromium.org/blink/trunk@180439 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent ba21d857
...@@ -855,12 +855,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib ...@@ -855,12 +855,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
// context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied. // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied.
if (isHTMLFrameElementBase(element) && element.containsFullScreenElement()) if (isHTMLFrameElementBase(element) && element.containsFullScreenElement())
return true; return true;
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(element.document())) { return Fullscreen::isActiveFullScreenElement(element);
if (!fullscreen->webkitIsFullScreen())
return false;
return element == fullscreen->webkitCurrentFullScreenElement();
}
return false;
case CSSSelector::PseudoFullScreenAncestor: case CSSSelector::PseudoFullScreenAncestor:
return element.containsFullScreenElement(); return element.containsFullScreenElement();
case CSSSelector::PseudoFullScreenDocument: case CSSSelector::PseudoFullScreenDocument:
......
...@@ -47,13 +47,6 @@ void DocumentFullscreen::exitFullscreen(Document& document) ...@@ -47,13 +47,6 @@ void DocumentFullscreen::exitFullscreen(Document& document)
Fullscreen::from(document).exitFullscreen(); Fullscreen::from(document).exitFullscreen();
} }
bool DocumentFullscreen::webkitIsFullScreen(Document& document)
{
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document))
return fullscreen->webkitIsFullScreen();
return false;
}
bool DocumentFullscreen::webkitFullScreenKeyboardInputAllowed(Document& document) bool DocumentFullscreen::webkitFullScreenKeyboardInputAllowed(Document& document)
{ {
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document)) if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document))
......
...@@ -43,7 +43,6 @@ public: ...@@ -43,7 +43,6 @@ public:
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenerror); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(fullscreenerror);
// Mozilla version // Mozilla version
static bool webkitIsFullScreen(Document&);
static bool webkitFullScreenKeyboardInputAllowed(Document&); static bool webkitFullScreenKeyboardInputAllowed(Document&);
static Element* webkitCurrentFullScreenElement(Document&); static Element* webkitCurrentFullScreenElement(Document&);
......
...@@ -29,7 +29,7 @@ partial interface Document { ...@@ -29,7 +29,7 @@ partial interface Document {
[RuntimeEnabled=FullscreenUnprefixed] attribute EventHandler onfullscreenerror; [RuntimeEnabled=FullscreenUnprefixed] attribute EventHandler onfullscreenerror;
// Mozilla version // Mozilla version
[MeasureAs=PrefixedDocumentIsFullscreen] readonly attribute boolean webkitIsFullScreen; [MeasureAs=PrefixedDocumentIsFullscreen, ImplementedAs=webkitCurrentFullScreenElement] readonly attribute boolean webkitIsFullScreen;
[MeasureAs=PrefixedDocumentFullScreenKeyboardInputAllowed] readonly attribute boolean webkitFullScreenKeyboardInputAllowed; [MeasureAs=PrefixedDocumentFullScreenKeyboardInputAllowed] readonly attribute boolean webkitFullScreenKeyboardInputAllowed;
[MeasureAs=PrefixedDocumentCurrentFullScreenElement] readonly attribute Element webkitCurrentFullScreenElement; [MeasureAs=PrefixedDocumentCurrentFullScreenElement] readonly attribute Element webkitCurrentFullScreenElement;
[MeasureAs=PrefixedDocumentCancelFullScreen, ImplementedAs=exitFullscreen] void webkitCancelFullScreen(); [MeasureAs=PrefixedDocumentCancelFullScreen, ImplementedAs=exitFullscreen] void webkitCancelFullScreen();
......
...@@ -122,9 +122,7 @@ Element* Fullscreen::currentFullScreenElementFrom(Document& document) ...@@ -122,9 +122,7 @@ Element* Fullscreen::currentFullScreenElementFrom(Document& document)
bool Fullscreen::isFullScreen(Document& document) bool Fullscreen::isFullScreen(Document& document)
{ {
if (Fullscreen* found = fromIfExists(document)) return currentFullScreenElementFrom(document);
return found->webkitIsFullScreen();
return false;
} }
Fullscreen::Fullscreen(Document& document) Fullscreen::Fullscreen(Document& document)
......
...@@ -85,7 +85,6 @@ public: ...@@ -85,7 +85,6 @@ public:
void elementRemoved(Element&); void elementRemoved(Element&);
// Mozilla API // Mozilla API
bool webkitIsFullScreen() const { return m_fullScreenElement.get(); }
bool webkitFullScreenKeyboardInputAllowed() const { return m_fullScreenElement.get() && m_areKeysEnabledInFullScreen; } bool webkitFullScreenKeyboardInputAllowed() const { return m_fullScreenElement.get() && m_areKeysEnabledInFullScreen; }
Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement.get(); } Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement.get(); }
......
...@@ -2969,7 +2969,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) ...@@ -2969,7 +2969,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
ASSERT(m_frame->document()); ASSERT(m_frame->document());
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*m_frame->document())) { if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*m_frame->document())) {
if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(fullscreen, initialKeyEvent)) { if (fullscreen->webkitCurrentFullScreenElement() && !isKeyEventAllowedInFullScreen(fullscreen, initialKeyEvent)) {
UseCounter::count(*m_frame->document(), UseCounter::KeyEventNotAllowedInFullScreen); UseCounter::count(*m_frame->document(), UseCounter::KeyEventNotAllowedInFullScreen);
return false; return false;
} }
......
...@@ -134,7 +134,7 @@ void FullscreenController::didExitFullScreen() ...@@ -134,7 +134,7 @@ void FullscreenController::didExitFullScreen()
if (Document* doc = m_fullScreenFrame->document()) { if (Document* doc = m_fullScreenFrame->document()) {
if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*doc)) { if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*doc)) {
if (fullscreen->webkitIsFullScreen()) { if (fullscreen->webkitCurrentFullScreenElement()) {
if (m_exitFullscreenPageScaleFactor) { if (m_exitFullscreenPageScaleFactor) {
m_webViewImpl->setPageScaleFactor(m_exitFullscreenPageScaleFactor); m_webViewImpl->setPageScaleFactor(m_exitFullscreenPageScaleFactor);
m_webViewImpl->setMainFrameScrollOffset(IntPoint(m_exitFullscreenScrollOffset)); m_webViewImpl->setMainFrameScrollOffset(IntPoint(m_exitFullscreenScrollOffset));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment