Address fullscreen api CSS env feedback
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2018 23:13:17 +0000 (23:13 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2018 23:13:17 +0000 (23:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186684

Reviewed by Simon Fraser.

Source/WebCore:

Test: fullscreen/fullscreen-env.html

+ Update the phishing alert text to be more explicit about the specific threats
  phishing sites represent.
+ Make the top inset static, rather than dynamic.
+ Add bottom, left, and right insets for completeness.
+ Set the fullscreen animation duration as well as delay.
+ Notify the page when the controls show and hide.

* English.lproj/Localizable.strings:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesFullScreenControlsHiddenPseudoClass):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
* dom/ConstantPropertyMap.cpp:
(WebCore::ConstantPropertyMap::nameForProperty const):
(WebCore::ConstantPropertyMap::updateConstantsForFullscreenInsets):
(WebCore::ConstantPropertyMap::didChangeFullscreenInsets):
(WebCore::ConstantPropertyMap::setFullscreenAutoHideDuration):
(WebCore::ConstantPropertyMap::setFullscreenInsetTop): Deleted.
* dom/ConstantPropertyMap.h:
* dom/Document.cpp:
(WebCore::Document::areFullscreenControlsHidden const):
(WebCore::Document::setFullscreenControlsHidden):
* dom/Document.h:
* page/Page.cpp:
(WebCore::Page::setFullscreenInsets):
(WebCore::Page::setFullscreenAutoHideDuration):
(WebCore::Page::setFullscreenControlsHidden):
(WebCore::Page::setFullscreenInsetTop): Deleted.
* page/Page.h:
(WebCore::Page::fullscreenInsets const):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setFullscreenInsets):
(WebCore::Internals::setFullscreenAutoHideDuration):
(WebCore::Internals::setFullscreenControlsHidden):
(WebCore::Internals::setFullscreenInsetTop): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

+ Update the phishing alert text to be more explicit about the specific threats
  phishing sites represent.
+ Make the top inset static, rather than dynamic.
+ Add bottom, left, and right insets for completeness.
+ Set the fullscreen animation duration as well as delay.
+ Notify the page when the controls show and hide.

* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::setFullscreenInsets):
(WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideTiming):
(WebKit::WebFullScreenManagerProxy::setFullscreenControlsHidden):
(WebKit::WebFullScreenManagerProxy::setFullscreenInsetTop): Deleted.
(WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideDelay): Deleted.
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController showUI]):
(-[WKFullScreenViewController hideUI]):
(-[WKFullScreenViewController viewWillAppear:]):
(-[WKFullScreenViewController _effectiveFullscreenInsets]):
(-[WKFullScreenViewController _updateWebViewFullscreenInsets]):
(-[WKFullScreenViewController _showPhishingAlert]):
(-[WKFullScreenViewController _effectiveFullscreenInsetTop]): Deleted.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::didExitFullScreen):
(WebKit::WebFullScreenManager::setFullscreenInsets):
(WebKit::WebFullScreenManager::setFullscreenAutoHideTiming):
(WebKit::WebFullScreenManager::setFullscreenControlsHidden):
(WebKit::WebFullScreenManager::setFullscreenInsetTop): Deleted.
(WebKit::WebFullScreenManager::setFullscreenAutoHideDelay): Deleted.
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:

LayoutTests:

* fullscreen/fullscreen-env-expected.txt: Added.
* fullscreen/fullscreen-env.html: Added.
* fullscreen/fullscreen-inset-top-expected.txt: Removed.
* fullscreen/fullscreen-inset-top.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
LayoutTests/ChangeLog
LayoutTests/fullscreen/fullscreen-env-expected.txt [new file with mode: 0644]
LayoutTests/fullscreen/fullscreen-env.html [new file with mode: 0644]
LayoutTests/fullscreen/fullscreen-inset-top-expected.txt [deleted file]
LayoutTests/fullscreen/fullscreen-inset-top.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorCheckerTestFunctions.h
Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/dom/ConstantPropertyMap.cpp
Source/WebCore/dom/ConstantPropertyMap.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp
Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.messages.in

index 2dc87ad..fb09754 100644 (file)
@@ -1,3 +1,15 @@
+2018-06-15  Jer Noble  <jer.noble@apple.com>
+
+        Address fullscreen api CSS env feedback
+        https://bugs.webkit.org/show_bug.cgi?id=186684
+
+        Reviewed by Simon Fraser.
+
+        * fullscreen/fullscreen-env-expected.txt: Added.
+        * fullscreen/fullscreen-env.html: Added.
+        * fullscreen/fullscreen-inset-top-expected.txt: Removed.
+        * fullscreen/fullscreen-inset-top.html: Removed.
+
 2018-06-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         RenderSVGInline has to be inline always regardless of its css display value
diff --git a/LayoutTests/fullscreen/fullscreen-env-expected.txt b/LayoutTests/fullscreen/fullscreen-env-expected.txt
new file mode 100644 (file)
index 0000000..ae4fac8
--- /dev/null
@@ -0,0 +1,35 @@
+RUN(internals.setFullscreenInsets({top:1, left:2, bottom:3, right:4}))
+EXPECTED (window.getComputedStyle(target).top == '1px') OK
+EXPECTED (window.getComputedStyle(target).left == '2px') OK
+EXPECTED (window.getComputedStyle(target).bottom == '3px') OK
+EXPECTED (window.getComputedStyle(target).right == '4px') OK
+RUN(internals.setFullscreenInsets({top:20, left:30, bottom:40, right:50}))
+EXPECTED (window.getComputedStyle(target).top == '20px') OK
+EXPECTED (window.getComputedStyle(target).left == '30px') OK
+EXPECTED (window.getComputedStyle(target).bottom == '40px') OK
+EXPECTED (window.getComputedStyle(target).right == '50px') OK
+RUN(internals.setFullscreenInsets({top:0, left:0, bottom:0, right:0}))
+EXPECTED (window.getComputedStyle(target).top == '0px') OK
+EXPECTED (window.getComputedStyle(target).left == '0px') OK
+EXPECTED (window.getComputedStyle(target).bottom == '0px') OK
+EXPECTED (window.getComputedStyle(target).right == '0px') OK
+RUN(internals.setFullscreenAutoHideDelay(1))
+RUN(internals.setFullscreenAutoHideDuration(2))
+EXPECTED (window.getComputedStyle(target).transitionDelay == '1s') OK
+EXPECTED (window.getComputedStyle(target).transitionDuration == '2s') OK
+RUN(internals.setFullscreenAutoHideDelay(20))
+RUN(internals.setFullscreenAutoHideDuration(30))
+EXPECTED (window.getComputedStyle(target).transitionDelay == '20s') OK
+EXPECTED (window.getComputedStyle(target).transitionDuration == '30s') OK
+RUN(internals.setFullscreenAutoHideDelay(0))
+RUN(internals.setFullscreenAutoHideDuration(0))
+EXPECTED (window.getComputedStyle(target).transitionDelay == '0s') OK
+EXPECTED (window.getComputedStyle(target).transitionDuration == '0s') OK
+EVENT(webkitfullscreenchange)
+RUN(internals.setFullscreenControlsHidden(true))
+EXPECTED (document.querySelector("#target:-webkit-full-screen-controls-hidden") == '[object HTMLDivElement]') OK
+RUN(internals.setFullscreenControlsHidden(false))
+EXPECTED (document.querySelector("#target:-webkit-full-screen-controls-hidden") == 'null') OK
+END OF TEST
+
diff --git a/LayoutTests/fullscreen/fullscreen-env.html b/LayoutTests/fullscreen/fullscreen-env.html
new file mode 100644 (file)
index 0000000..acf7adf
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <script src="full-screen-test.js"></script>
+    <script>
+        window.addEventListener('load', event => {
+            window.target = document.querySelector('#target');
+            run('internals.setFullscreenInsets({top:1, left:2, bottom:3, right:4})');
+            testExpected('window.getComputedStyle(target).top', '1px');
+            testExpected('window.getComputedStyle(target).left', '2px');
+            testExpected('window.getComputedStyle(target).bottom', '3px');
+            testExpected('window.getComputedStyle(target).right', '4px');
+            run('internals.setFullscreenInsets({top:20, left:30, bottom:40, right:50})');
+            testExpected('window.getComputedStyle(target).top', '20px');
+            testExpected('window.getComputedStyle(target).left', '30px');
+            testExpected('window.getComputedStyle(target).bottom', '40px');
+            testExpected('window.getComputedStyle(target).right', '50px');
+            run('internals.setFullscreenInsets({top:0, left:0, bottom:0, right:0})');
+            testExpected('window.getComputedStyle(target).top', '0px');
+            testExpected('window.getComputedStyle(target).left', '0px');
+            testExpected('window.getComputedStyle(target).bottom', '0px');
+            testExpected('window.getComputedStyle(target).right', '0px');
+            run('internals.setFullscreenAutoHideDelay(1)');
+            run('internals.setFullscreenAutoHideDuration(2)');
+            testExpected('window.getComputedStyle(target).transitionDelay', '1s');
+            testExpected('window.getComputedStyle(target).transitionDuration', '2s');
+            run('internals.setFullscreenAutoHideDelay(20)');
+            run('internals.setFullscreenAutoHideDuration(30)');
+            testExpected('window.getComputedStyle(target).transitionDelay', '20s');
+            testExpected('window.getComputedStyle(target).transitionDuration', '30s');
+            run('internals.setFullscreenAutoHideDelay(0)');
+            run('internals.setFullscreenAutoHideDuration(0)');
+            testExpected('window.getComputedStyle(target).transitionDelay', '0s');
+            testExpected('window.getComputedStyle(target).transitionDuration', '0s');
+            runWithKeyDown(() => {target.webkitRequestFullscreen() });
+            waitForEventOnce(document, 'webkitfullscreenchange', event => {
+                run('internals.setFullscreenControlsHidden(true)');
+                testExpected('document.querySelector("#target:-webkit-full-screen-controls-hidden")', target);
+                run('internals.setFullscreenControlsHidden(false)');
+                testExpected('document.querySelector("#target:-webkit-full-screen-controls-hidden")', null);
+                endTest();
+            });
+        });
+    </script>
+    <style>
+        #target {
+            position: absolute;
+            top: env(fullscreen-inset-top);
+            left: env(fullscreen-inset-left);
+            bottom: env(fullscreen-inset-bottom);
+            right: env(fullscreen-inset-right);
+            transition-duration: env(fullscreen-auto-hide-duration);
+            transition-delay: env(fullscreen-auto-hide-delay);
+        }
+    </style>
+</head>
+<body>
+    <div id="target">&nbsp;</div>
+</body>
+</html>
diff --git a/LayoutTests/fullscreen/fullscreen-inset-top-expected.txt b/LayoutTests/fullscreen/fullscreen-inset-top-expected.txt
deleted file mode 100644 (file)
index cf823d9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-RUN(internals.setFullscreenInsetTop(1))
-EXPECTED (window.getComputedStyle(target).top == '1px') OK
-RUN(internals.setFullscreenInsetTop(20))
-EXPECTED (window.getComputedStyle(target).top == '20px') OK
-RUN(internals.setFullscreenInsetTop(0))
-EXPECTED (window.getComputedStyle(target).top == '0px') OK
-END OF TEST
-
diff --git a/LayoutTests/fullscreen/fullscreen-inset-top.html b/LayoutTests/fullscreen/fullscreen-inset-top.html
deleted file mode 100644 (file)
index 9ad9700..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <script src="full-screen-test.js"></script>
-    <script>
-        window.addEventListener('load', event => {
-            window.target = document.querySelector('#target');
-            run('internals.setFullscreenInsetTop(1)');
-            testExpected('window.getComputedStyle(target).top', '1px');
-            run('internals.setFullscreenInsetTop(20)');
-            testExpected('window.getComputedStyle(target).top', '20px');
-            run('internals.setFullscreenInsetTop(0)');
-            testExpected('window.getComputedStyle(target).top', '0px');
-            endTest();
-        });
-    </script>
-    <style>
-        #target {
-            position: relative;
-            top: env(fullscreen-inset-top);
-        }
-    </style>
-</head>
-<body>
-    <div id="target">&nbsp;</div>
-</body>
-</html>
\ No newline at end of file
index 73aad94..56f26de 100644 (file)
@@ -1,3 +1,57 @@
+2018-06-15  Jer Noble  <jer.noble@apple.com>
+
+        Address fullscreen api CSS env feedback
+        https://bugs.webkit.org/show_bug.cgi?id=186684
+
+        Reviewed by Simon Fraser.
+
+        Test: fullscreen/fullscreen-env.html
+
+        + Update the phishing alert text to be more explicit about the specific threats
+          phishing sites represent.
+        + Make the top inset static, rather than dynamic.
+        + Add bottom, left, and right insets for completeness.
+        + Set the fullscreen animation duration as well as delay.
+        + Notify the page when the controls show and hide.
+
+        * English.lproj/Localizable.strings:
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::selectorText const):
+        * css/CSSSelector.h:
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne const):
+        * css/SelectorCheckerTestFunctions.h:
+        (WebCore::matchesFullScreenControlsHiddenPseudoClass):
+        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::addPseudoClassType):
+        * dom/ConstantPropertyMap.cpp:
+        (WebCore::ConstantPropertyMap::nameForProperty const):
+        (WebCore::ConstantPropertyMap::updateConstantsForFullscreenInsets):
+        (WebCore::ConstantPropertyMap::didChangeFullscreenInsets):
+        (WebCore::ConstantPropertyMap::setFullscreenAutoHideDuration):
+        (WebCore::ConstantPropertyMap::setFullscreenInsetTop): Deleted.
+        * dom/ConstantPropertyMap.h:
+        * dom/Document.cpp:
+        (WebCore::Document::areFullscreenControlsHidden const):
+        (WebCore::Document::setFullscreenControlsHidden):
+        * dom/Document.h:
+        * page/Page.cpp:
+        (WebCore::Page::setFullscreenInsets):
+        (WebCore::Page::setFullscreenAutoHideDuration):
+        (WebCore::Page::setFullscreenControlsHidden):
+        (WebCore::Page::setFullscreenInsetTop): Deleted.
+        * page/Page.h:
+        (WebCore::Page::fullscreenInsets const):
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setFullscreenInsets):
+        (WebCore::Internals::setFullscreenAutoHideDuration):
+        (WebCore::Internals::setFullscreenControlsHidden):
+        (WebCore::Internals::setFullscreenInsetTop): Deleted.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2018-06-21  Jer Noble  <jer.noble@apple.com>
 
         [Fullscreen] Page sometimes ends up with an incorrect zoom level after entering fullscreen
index 68d17b6..4b79ba9 100644 (file)
 "The user name or password you entered for this area on %@ was incorrect. Make sure you’re entering them correctly, and then try again." = "The user name or password you entered for this area on %@ was incorrect. Make sure you’re entering them correctly, and then try again.";
 
 /* Fullscreen Deceptive Website Warning Sheet Content Text */
-"The website \"%@\" may be a deceptive website. Would you like to exit fullscreen?" = "The website \"%@\" may be a deceptive website. Would you like to exit fullscreen?";
+"The website “%@” may try to trick you into doing something dangerous, like installing software or disclosing personal or financial information, like passwords, phone numbers, or credit cards." = "The website “%@” may try to trick you into doing something dangerous, like installing software or disclosing personal or financial information, like passwords, phone numbers, or credit cards.";
 
 /* text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' */
 "This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
index 906b3b0..67c5a32 100644 (file)
@@ -453,6 +453,9 @@ String CSSSelector::selectorText(const String& rightSide) const
             case CSSSelector::PseudoClassFullScreenDocument:
                 str.appendLiteral(":-webkit-full-screen-document");
                 break;
+            case CSSSelector::PseudoClassFullScreenControlsHidden:
+                str.appendLiteral(":-webkit-full-screen-controls-hidden");
+                break;
 #endif
             case CSSSelector::PseudoClassActive:
                 str.appendLiteral(":active");
index 03e9f16..6f571f1 100644 (file)
@@ -148,6 +148,7 @@ namespace WebCore {
             PseudoClassFullScreenDocument,
             PseudoClassFullScreenAncestor,
             PseudoClassAnimatingFullScreenTransition,
+            PseudoClassFullScreenControlsHidden,
 #endif
             PseudoClassInRange,
             PseudoClassOutOfRange,
index 354bfc2..0ab7388 100644 (file)
@@ -1033,6 +1033,8 @@ bool SelectorChecker::checkOne(CheckingContext& checkingContext, const LocalCont
             return matchesFullScreenAncestorPseudoClass(element);
         case CSSSelector::PseudoClassFullScreenDocument:
             return matchesFullScreenDocumentPseudoClass(element);
+        case CSSSelector::PseudoClassFullScreenControlsHidden:
+            return matchesFullScreenControlsHiddenPseudoClass(element);
 #endif
         case CSSSelector::PseudoClassInRange:
             return isInRange(element);
index 0e8534a..b7b2e3b 100644 (file)
@@ -365,6 +365,13 @@ ALWAYS_INLINE bool matchesFullScreenDocumentPseudoClass(const Element& element)
         return false;
     return true;
 }
+
+ALWAYS_INLINE bool matchesFullScreenControlsHiddenPseudoClass(const Element& element)
+{
+    if (&element != element.document().webkitCurrentFullScreenElement())
+        return false;
+    return element.document().areFullscreenControlsHidden();
+}
 #endif
 
 #if ENABLE(VIDEO_TRACK)
index 9bcd104..63bd94a 100644 (file)
@@ -72,6 +72,7 @@ window-inactive
 -webkit-full-screen
 -webkit-full-screen-ancestor
 -webkit-full-screen-document
+-webkit-full-screen-controls-hidden
 #endif
 
 #if ENABLE(VIDEO_TRACK)
index d79ad01..6efe000 100644 (file)
@@ -604,6 +604,10 @@ static inline FunctionType addPseudoClassType(const CSSSelector& selector, Selec
     case CSSSelector::PseudoClassAnimatingFullScreenTransition:
         fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<CSSOperationPtrTag>(matchesFullScreenAnimatingFullScreenTransitionPseudoClass));
         return FunctionType::SimpleSelectorChecker;
+
+    case CSSSelector::PseudoClassFullScreenControlsHidden:
+        fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<CSSOperationPtrTag>(matchesFullScreenControlsHiddenPseudoClass));
+        return FunctionType::SimpleSelectorChecker;
 #endif
 #if ENABLE(VIDEO_TRACK)
     case CSSSelector::PseudoClassFuture:
index e1350b5..04d991e 100644 (file)
@@ -55,7 +55,11 @@ const AtomicString& ConstantPropertyMap::nameForProperty(ConstantProperty proper
     static NeverDestroyed<AtomicString> safeAreaInsetBottomName("safe-area-inset-bottom", AtomicString::ConstructFromLiteral);
     static NeverDestroyed<AtomicString> safeAreaInsetLeftName("safe-area-inset-left", AtomicString::ConstructFromLiteral);
     static NeverDestroyed<AtomicString> fullscreenInsetTopName("fullscreen-inset-top", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> fullscreenInsetLeftName("fullscreen-inset-left", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> fullscreenInsetBottomName("fullscreen-inset-bottom", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> fullscreenInsetRightName("fullscreen-inset-right", AtomicString::ConstructFromLiteral);
     static NeverDestroyed<AtomicString> fullscreenAutoHideDelayName("fullscreen-auto-hide-delay", AtomicString::ConstructFromLiteral);
+    static NeverDestroyed<AtomicString> fullscreenAutoHideDurationName("fullscreen-auto-hide-duration", AtomicString::ConstructFromLiteral);
 
     switch (property) {
     case ConstantProperty::SafeAreaInsetTop:
@@ -68,8 +72,16 @@ const AtomicString& ConstantPropertyMap::nameForProperty(ConstantProperty proper
         return safeAreaInsetLeftName;
     case ConstantProperty::FullscreenInsetTop:
         return fullscreenInsetTopName;
+    case ConstantProperty::FullscreenInsetLeft:
+        return fullscreenInsetLeftName;
+    case ConstantProperty::FullscreenInsetBottom:
+        return fullscreenInsetBottomName;
+    case ConstantProperty::FullscreenInsetRight:
+        return fullscreenInsetRightName;
     case ConstantProperty::FullscreenAutoHideDelay:
         return fullscreenAutoHideDelayName;
+    case ConstantProperty::FullscreenAutoHideDuration:
+        return fullscreenAutoHideDurationName;
     }
 
     return nullAtom();
@@ -103,11 +115,11 @@ static Ref<CSSVariableData> variableDataForPositivePixelLength(float lengthInPx)
     return CSSVariableData::create(tokenRange, false);
 }
 
-static Ref<CSSVariableData> variableDataForPositiveDuration(float durationInSeconds)
+static Ref<CSSVariableData> variableDataForPositiveDuration(Seconds durationInSeconds)
 {
-    ASSERT(durationInSeconds >= 0);
+    ASSERT(durationInSeconds >= 0_s);
 
-    CSSParserToken token(NumberToken, durationInSeconds, NumberValueType, NoSign);
+    CSSParserToken token(NumberToken, durationInSeconds.value(), NumberValueType, NoSign);
     token.convertToDimensionWithUnit("s");
 
     Vector<CSSParserToken> tokens { token };
@@ -130,16 +142,31 @@ void ConstantPropertyMap::didChangeSafeAreaInsets()
     m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc();
 }
 
-void ConstantPropertyMap::setFullscreenInsetTop(double inset)
+void ConstantPropertyMap::updateConstantsForFullscreenInsets()
 {
-    setValueForProperty(ConstantProperty::FullscreenInsetTop, variableDataForPositivePixelLength(inset));
+    FloatBoxExtent fullscreenInsets = m_document.page() ? m_document.page()->fullscreenInsets() : FloatBoxExtent();
+    setValueForProperty(ConstantProperty::FullscreenInsetTop, variableDataForPositivePixelLength(fullscreenInsets.top()));
+    setValueForProperty(ConstantProperty::FullscreenInsetRight, variableDataForPositivePixelLength(fullscreenInsets.right()));
+    setValueForProperty(ConstantProperty::FullscreenInsetBottom, variableDataForPositivePixelLength(fullscreenInsets.bottom()));
+    setValueForProperty(ConstantProperty::FullscreenInsetLeft, variableDataForPositivePixelLength(fullscreenInsets.left()));
+}
+
+void ConstantPropertyMap::didChangeFullscreenInsets()
+{
+    updateConstantsForFullscreenInsets();
     m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc();
 }
 
-void ConstantPropertyMap::setFullscreenAutoHideDelay(double delay)
+void ConstantPropertyMap::setFullscreenAutoHideDelay(Seconds delay)
 {
     setValueForProperty(ConstantProperty::FullscreenAutoHideDelay, variableDataForPositiveDuration(delay));
     m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc();
 }
 
+void ConstantPropertyMap::setFullscreenAutoHideDuration(Seconds duration)
+{
+    setValueForProperty(ConstantProperty::FullscreenAutoHideDuration, variableDataForPositiveDuration(duration));
+    m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc();
+}
+
 }
index 88f5a76..1d5eb7c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <wtf/HashMap.h>
 #include <wtf/Ref.h>
+#include <wtf/Seconds.h>
 #include <wtf/text/AtomicString.h>
 #include <wtf/text/AtomicStringHash.h>
 
@@ -43,7 +44,11 @@ enum class ConstantProperty {
     SafeAreaInsetBottom,
     SafeAreaInsetLeft,
     FullscreenInsetTop,
+    FullscreenInsetRight,
+    FullscreenInsetBottom,
+    FullscreenInsetLeft,
     FullscreenAutoHideDelay,
+    FullscreenAutoHideDuration,
 };
 
 class ConstantPropertyMap {
@@ -54,8 +59,9 @@ public:
     const Values& values() const;
 
     void didChangeSafeAreaInsets();
-    void setFullscreenInsetTop(double);
-    void setFullscreenAutoHideDelay(double);
+    void didChangeFullscreenInsets();
+    void setFullscreenAutoHideDelay(Seconds);
+    void setFullscreenAutoHideDuration(Seconds);
 
 private:
     void buildValues();
@@ -64,6 +70,7 @@ private:
     void setValueForProperty(ConstantProperty, Ref<CSSVariableData>&&);
 
     void updateConstantsForSafeAreaInsets();
+    void updateConstantsForFullscreenInsets();
 
     std::optional<Values> m_values;
 
index fc083cc..36ddf00 100644 (file)
@@ -6424,6 +6424,23 @@ void Document::setAnimatingFullScreen(bool flag)
     }
 }
 
+bool Document::areFullscreenControlsHidden() const
+{
+    return m_areFullscreenControlsHidden;
+}
+
+void Document::setFullscreenControlsHidden(bool flag)
+{
+    if (m_areFullscreenControlsHidden == flag)
+        return;
+    m_areFullscreenControlsHidden = flag;
+
+    if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(*this)) {
+        m_fullScreenElement->invalidateStyleForSubtree();
+        scheduleForcedStyleRecalc();
+    }
+}
+
 void Document::clearFullscreenElementStack()
 {
     m_fullScreenElementStack.clear();
index 25bee77..fdd1b63 100644 (file)
@@ -1156,6 +1156,9 @@ public:
     WEBCORE_EXPORT bool isAnimatingFullScreen() const;
     WEBCORE_EXPORT void setAnimatingFullScreen(bool);
 
+    WEBCORE_EXPORT bool areFullscreenControlsHidden() const;
+    WEBCORE_EXPORT void setFullscreenControlsHidden(bool);
+
     WEBCORE_EXPORT bool webkitFullscreenEnabled() const;
     Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.isEmpty() ? m_fullScreenElementStack.last().get() : nullptr; }
     Element* webkitFullscreenElementForBindings() const { return ancestorElementInThisScope(webkitFullscreenElement()); }
@@ -1711,6 +1714,7 @@ private:
 
     bool m_areKeysEnabledInFullScreen { false };
     bool m_isAnimatingFullScreen { false };
+    bool m_areFullscreenControlsHidden { false };
 #endif
 
     HashSet<HTMLPictureElement*> m_viewportDependentPictures;
index 59a7876..20a610a 100644 (file)
@@ -2377,16 +2377,20 @@ bool Page::defaultAppearance() const
     return m_defaultAppearance;
 }
 
-void Page::setFullscreenInsetTop(double inset)
+void Page::setFullscreenInsets(const FloatBoxExtent& insets)
 {
+    if (insets == m_fullscreenInsets)
+        return;
+    m_fullscreenInsets = insets;
+
     for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
         if (!frame->document())
             continue;
-        frame->document()->constantProperties().setFullscreenInsetTop(inset);
+        frame->document()->constantProperties().didChangeFullscreenInsets();
     }
 }
 
-void Page::setFullscreenAutoHideDelay(double delay)
+void Page::setFullscreenAutoHideDelay(Seconds delay)
 {
     for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
         if (!frame->document())
@@ -2395,6 +2399,28 @@ void Page::setFullscreenAutoHideDelay(double delay)
     }
 }
 
+void Page::setFullscreenAutoHideDuration(Seconds duration)
+{
+    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        if (!frame->document())
+            continue;
+        frame->document()->constantProperties().setFullscreenAutoHideDuration(duration);
+    }
+}
+
+void Page::setFullscreenControlsHidden(bool hidden)
+{
+#if ENABLE(FULLSCREEN_API)
+    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        if (!frame->document())
+            continue;
+        frame->document()->setFullscreenControlsHidden(hidden);
+    }
+#else
+    UNUSED_PARAM(hidden);
+#endif
+}
+
 #if ENABLE(DATA_INTERACTION)
 
 bool Page::hasSelectionAtPosition(const FloatPoint& position) const
index 6b8482a..ec498c5 100644 (file)
@@ -350,9 +350,13 @@ public:
     void setTextAutosizingWidth(float textAutosizingWidth) { m_textAutosizingWidth = textAutosizingWidth; }
 #endif
 
-    WEBCORE_EXPORT void setFullscreenInsetTop(double);
-    WEBCORE_EXPORT void setFullscreenAutoHideDelay(double);
-    
+    WEBCORE_EXPORT void setFullscreenInsets(const FloatBoxExtent&);
+    const FloatBoxExtent& fullscreenInsets() const { return m_fullscreenInsets; }
+
+    WEBCORE_EXPORT void setFullscreenAutoHideDelay(Seconds);
+    WEBCORE_EXPORT void setFullscreenAutoHideDuration(Seconds);
+    WEBCORE_EXPORT void setFullscreenControlsHidden(bool);
+
     bool shouldSuppressScrollbarAnimations() const { return m_suppressScrollbarAnimations; }
     WEBCORE_EXPORT void setShouldSuppressScrollbarAnimations(bool suppressAnimations);
     void lockAllOverlayScrollbarsToHidden(bool lockOverlayScrollbars);
@@ -743,6 +747,7 @@ private:
     float m_topContentInset { 0 };
     FloatBoxExtent m_obscuredInsets;
     FloatBoxExtent m_unobscuredSafeAreaInsets;
+    FloatBoxExtent m_fullscreenInsets;
 
 #if PLATFORM(IOS)
     bool m_enclosedInScrollableAncestorView { false };
index 13ce8ae..1ccacb1 100644 (file)
@@ -503,8 +503,10 @@ void Internals::resetToConsistentState(Page& page)
 #endif
 
     page.settings().setStorageAccessAPIEnabled(false);
-    page.setFullscreenAutoHideDelay(0);
-    page.setFullscreenInsetTop(0);
+    page.setFullscreenAutoHideDelay(0_s);
+    page.setFullscreenAutoHideDuration(0_s);
+    page.setFullscreenInsets({ });
+    page.setFullscreenControlsHidden(false);
 }
 
 Internals::Internals(Document& document)
@@ -2840,12 +2842,12 @@ bool Internals::isAnimatingFullScreen() const
 
 #endif
 
-void Internals::setFullscreenInsetTop(double inset)
+void Internals::setFullscreenInsets(FullscreenInsets insets)
 {
     Page* page = contextDocument()->frame()->page();
     ASSERT(page);
 
-    page->setFullscreenInsetTop(inset);
+    page->setFullscreenInsets(FloatBoxExtent(insets.top, insets.right, insets.bottom, insets.left));
 }
 
 void Internals::setFullscreenAutoHideDelay(double delay)
@@ -2853,7 +2855,23 @@ void Internals::setFullscreenAutoHideDelay(double delay)
     Page* page = contextDocument()->frame()->page();
     ASSERT(page);
 
-    page->setFullscreenAutoHideDelay(delay);
+    page->setFullscreenAutoHideDelay(Seconds(delay));
+}
+
+void Internals::setFullscreenAutoHideDuration(double duration)
+{
+    Page* page = contextDocument()->frame()->page();
+    ASSERT(page);
+
+    page->setFullscreenAutoHideDuration(Seconds(duration));
+}
+
+void Internals::setFullscreenControlsHidden(bool hidden)
+{
+    Page* page = contextDocument()->frame()->page();
+    ASSERT(page);
+
+    page->setFullscreenControlsHidden(hidden);
 }
 
 void Internals::setApplicationCacheOriginQuota(unsigned long long quota)
index 5abbbf0..8faca71 100644 (file)
@@ -401,8 +401,16 @@ public:
     bool isAnimatingFullScreen() const;
 #endif
 
-    void setFullscreenInsetTop(double);
+    struct FullscreenInsets {
+        float top;
+        float left;
+        float bottom;
+        float right;
+    };
+    void setFullscreenInsets(FullscreenInsets);
     void setFullscreenAutoHideDelay(double);
+    void setFullscreenAutoHideDuration(double);
+    void setFullscreenControlsHidden(bool);
 
     WEBCORE_TESTSUPPORT_EXPORT void setApplicationCacheOriginQuota(unsigned long long);
 
index 3e0b4cd..33e8aa5 100644 (file)
@@ -102,6 +102,16 @@ enum EventThrottlingBehavior {
 
 [
     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
+    JSGenerateToJSObject,
+] dictionary FullscreenInsets {
+    double top;
+    double left;
+    double bottom;
+    double right;
+};
+
+[
+    ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
     NoInterfaceObject,
 ] interface Internals {
     DOMString address(Node node);
@@ -371,8 +381,10 @@ enum EventThrottlingBehavior {
     [Conditional=FULLSCREEN_API] void webkitDidExitFullScreenForElement(Element element);
     [Conditional=FULLSCREEN_API] readonly attribute boolean isAnimatingFullScreen;
 
-    void setFullscreenInsetTop(double inset);
+    void setFullscreenInsets(FullscreenInsets insets);
     void setFullscreenAutoHideDelay(double delay);
+    void setFullscreenAutoHideDuration(double duration);
+    void setFullscreenControlsHidden(boolean hidden);
 
     void setApplicationCacheOriginQuota(unsigned long long quota);
 
index 05aa2ff..ffc8db0 100644 (file)
@@ -1,3 +1,42 @@
+2018-06-15  Jer Noble  <jer.noble@apple.com>
+
+        Address fullscreen api CSS env feedback
+        https://bugs.webkit.org/show_bug.cgi?id=186684
+
+        Reviewed by Simon Fraser.
+
+        + Update the phishing alert text to be more explicit about the specific threats
+          phishing sites represent.
+        + Make the top inset static, rather than dynamic.
+        + Add bottom, left, and right insets for completeness.
+        + Set the fullscreen animation duration as well as delay.
+        + Notify the page when the controls show and hide.
+
+        * UIProcess/WebFullScreenManagerProxy.cpp:
+        (WebKit::WebFullScreenManagerProxy::setFullscreenInsets):
+        (WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideTiming):
+        (WebKit::WebFullScreenManagerProxy::setFullscreenControlsHidden):
+        (WebKit::WebFullScreenManagerProxy::setFullscreenInsetTop): Deleted.
+        (WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideDelay): Deleted.
+        * UIProcess/WebFullScreenManagerProxy.h:
+        * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+        (-[WKFullScreenViewController showUI]):
+        (-[WKFullScreenViewController hideUI]):
+        (-[WKFullScreenViewController viewWillAppear:]):
+        (-[WKFullScreenViewController _effectiveFullscreenInsets]):
+        (-[WKFullScreenViewController _updateWebViewFullscreenInsets]):
+        (-[WKFullScreenViewController _showPhishingAlert]):
+        (-[WKFullScreenViewController _effectiveFullscreenInsetTop]): Deleted.
+        * WebProcess/FullScreen/WebFullScreenManager.cpp:
+        (WebKit::WebFullScreenManager::didExitFullScreen):
+        (WebKit::WebFullScreenManager::setFullscreenInsets):
+        (WebKit::WebFullScreenManager::setFullscreenAutoHideTiming):
+        (WebKit::WebFullScreenManager::setFullscreenControlsHidden):
+        (WebKit::WebFullScreenManager::setFullscreenInsetTop): Deleted.
+        (WebKit::WebFullScreenManager::setFullscreenAutoHideDelay): Deleted.
+        * WebProcess/FullScreen/WebFullScreenManager.h:
+        * WebProcess/FullScreen/WebFullScreenManager.messages.in:
+
 2018-06-21  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r232884.
index a0d8cdb..0ae141e 100644 (file)
@@ -120,14 +120,19 @@ void WebFullScreenManagerProxy::restoreScrollPosition()
     m_page->process().send(Messages::WebFullScreenManager::RestoreScrollPosition(), m_page->pageID());
 }
 
-void WebFullScreenManagerProxy::setFullscreenInsetTop(double inset)
+void WebFullScreenManagerProxy::setFullscreenInsets(const WebCore::FloatBoxExtent& insets)
 {
-    m_page->process().send(Messages::WebFullScreenManager::SetFullscreenInsetTop(inset), m_page->pageID());
+    m_page->process().send(Messages::WebFullScreenManager::SetFullscreenInsets(insets), m_page->pageID());
 }
 
-void WebFullScreenManagerProxy::setFullscreenAutoHideDelay(double delay)
+void WebFullScreenManagerProxy::setFullscreenAutoHideTiming(Seconds delay, Seconds duration)
 {
-    m_page->process().send(Messages::WebFullScreenManager::SetFullscreenAutoHideDelay(delay), m_page->pageID());
+    m_page->process().send(Messages::WebFullScreenManager::SetFullscreenAutoHideTiming(delay, duration), m_page->pageID());
+}
+
+void WebFullScreenManagerProxy::setFullscreenControlsHidden(bool hidden)
+{
+    m_page->process().send(Messages::WebFullScreenManager::SetFullscreenControlsHidden(hidden), m_page->pageID());
 }
 
 void WebFullScreenManagerProxy::invalidate()
index 897e9b4..ce89030 100644 (file)
 #include "MessageReceiver.h"
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
+#include <wtf/Seconds.h>
 
 namespace WebCore {
 class IntRect;
+
+template <typename> class RectEdges;
+using FloatBoxExtent = RectEdges<float>;
 }
 
 namespace WebKit {
@@ -69,8 +73,9 @@ public:
     void requestExitFullScreen();
     void saveScrollPosition();
     void restoreScrollPosition();
-    void setFullscreenInsetTop(double);
-    void setFullscreenAutoHideDelay(double);
+    void setFullscreenInsets(const WebCore::FloatBoxExtent&);
+    void setFullscreenAutoHideTiming(Seconds delay, Seconds duration);
+    void setFullscreenControlsHidden(bool);
 
 private:
     explicit WebFullScreenManagerProxy(WebPageProxy&, WebFullScreenManagerProxyClient&);
index 3fcbf7b..01d8965 100644 (file)
@@ -103,7 +103,7 @@ private:
 @interface WKFullScreenViewController () <UIGestureRecognizerDelegate, UIToolbarDelegate>
 @property (weak, nonatomic) WKWebView *_webView; // Cannot be retained, see <rdar://problem/14884666>.
 @property (readonly, nonatomic) WebFullScreenManagerProxy* _manager;
-@property (readonly, nonatomic) CGFloat _effectiveFullscreenInsetTop;
+@property (readonly, nonatomic) WebCore::FloatBoxExtent _effectiveFullscreenInsets;
 @end
 
 @implementation WKFullScreenViewController {
@@ -167,6 +167,11 @@ private:
         [_stackView setHidden:NO];
         [_stackView setAlpha:1];
         self.prefersStatusBarHidden = NO;
+        [self.view removeConstraints:@[_topConstraint.get()]];
+        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor];
+        [_topConstraint setActive:YES];
+        if (auto* manager = self._manager)
+            manager->setFullscreenControlsHidden(false);
     }];
 }
 
@@ -175,17 +180,16 @@ private:
     [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideUI) object:nil];
     [UIView animateWithDuration:showHideAnimationDuration animations:^{
         [self.view removeConstraints:@[_topConstraint.get()]];
-        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:self.view.safeAreaInsets.top];
+        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.topAnchor constant:self.view.safeAreaInsets.top];
         [_topConstraint setActive:YES];
         [_stackView setAlpha:0];
         self.prefersStatusBarHidden = YES;
+        if (auto* manager = self._manager)
+            manager->setFullscreenControlsHidden(true);
     } completion:^(BOOL finished) {
         if (!finished)
             return;
 
-        [self.view removeConstraints:@[_topConstraint.get()]];
-        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor];
-        [_topConstraint setActive:YES];
         [_stackView setHidden:YES];
     }];
 }
@@ -302,7 +306,7 @@ private:
     [self.view insertSubview:self._webView atIndex:0];
 
     if (auto* manager = self._manager)
-        manager->setFullscreenAutoHideDelay(autoHideDelay);
+        manager->setFullscreenAutoHideTiming(Seconds(autoHideDelay), Seconds(showHideAnimationDuration));
 
     [super viewWillAppear:animated];
 }
@@ -359,15 +363,16 @@ private:
     return nullptr;
 }
 
-@dynamic _effectiveFullscreenInsetTop;
-- (CGFloat)_effectiveFullscreenInsetTop
+@dynamic _effectiveFullscreenInsets;
+- (WebCore::FloatBoxExtent)_effectiveFullscreenInsets
 {
-    if (self.prefersStatusBarHidden)
-        return 0;
+    auto safeAreaInsets = self.view.safeAreaInsets;
+    WebCore::FloatBoxExtent insets { safeAreaInsets.top, safeAreaInsets.right, safeAreaInsets.bottom, safeAreaInsets.left };
 
     CGRect cancelFrame = _cancelButton.get().frame;
     CGPoint maxXY = CGPointMake(CGRectGetMaxX(cancelFrame), CGRectGetMaxY(cancelFrame));
-    return [_cancelButton convertPoint:maxXY toView:self.view].y;
+    insets.setTop([_cancelButton convertPoint:maxXY toView:self.view].y);
+    return insets;
 }
 
 - (void)_cancelAction:(id)sender
@@ -419,13 +424,13 @@ private:
 - (void)_updateWebViewFullscreenInsets
 {
     if (auto* manager = self._manager)
-        manager->setFullscreenInsetTop(self._effectiveFullscreenInsetTop);
+        manager->setFullscreenInsets(self._effectiveFullscreenInsets);
 }
 
 - (void)_showPhishingAlert
 {
     NSString *alertTitle = WEB_UI_STRING("Deceptive Website Warning", "Fullscreen Deceptive Website Warning Sheet Title");
-    NSString *alertMessage = [NSString stringWithFormat:WEB_UI_STRING("The website \"%@\" may be a deceptive website. Would you like to exit fullscreen?", "Fullscreen Deceptive Website Warning Sheet Content Text") , (NSString *)self.location];
+    NSString *alertMessage = [NSString stringWithFormat:WEB_UI_STRING("The website “%@” may try to trick you into doing something dangerous, like installing software or disclosing personal or financial information, like passwords, phone numbers, or credit cards.", "Fullscreen Deceptive Website Warning Sheet Content Text") , (NSString *)self.location];
     UIAlertController* alert = [UIAlertController alertControllerWithTitle:alertTitle message:alertMessage preferredStyle:UIAlertControllerStyleAlert];
 
     if (auto* page = [self._webView _page])
index 11f5790..414596e 100644 (file)
@@ -181,8 +181,8 @@ void WebFullScreenManager::willExitFullScreen()
 void WebFullScreenManager::didExitFullScreen()
 {
     ASSERT(m_element);
-    setFullscreenInsetTop(0);
-    setFullscreenAutoHideDelay(0);
+    setFullscreenInsets(FloatBoxExtent());
+    setFullscreenAutoHideTiming(0_s, 0_s);
     m_element->document().webkitDidExitFullScreenForElement(m_element.get());
 }
 
@@ -213,14 +213,21 @@ void WebFullScreenManager::restoreScrollPosition()
     m_page->corePage()->mainFrame().view()->setScrollPosition(m_scrollPosition);
 }
 
-void WebFullScreenManager::setFullscreenInsetTop(double inset)
+void WebFullScreenManager::setFullscreenInsets(const WebCore::FloatBoxExtent& insets)
 {
-    m_page->corePage()->setFullscreenInsetTop(inset);
+    m_page->corePage()->setFullscreenInsets(insets);
 }
 
-void WebFullScreenManager::setFullscreenAutoHideDelay(double delay)
+void WebFullScreenManager::setFullscreenAutoHideTiming(Seconds delay, Seconds duration)
 {
-    m_page->corePage()->setFullscreenAutoHideDelay(delay);
+    auto corePage = m_page->corePage();
+    corePage->setFullscreenAutoHideDelay(delay);
+    corePage->setFullscreenAutoHideDuration(duration);
+}
+
+void WebFullScreenManager::setFullscreenControlsHidden(bool hidden)
+{
+    m_page->corePage()->setFullscreenControlsHidden(hidden);
 }
 
 } // namespace WebKit
index c170fa2..eee706e 100644 (file)
@@ -27,7 +27,9 @@
 
 #if ENABLE(FULLSCREEN_API)
 
+#include "WebCoreArgumentCoders.h"
 #include <WebCore/IntRect.h>
+#include <WebCore/LengthBox.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
@@ -78,8 +80,9 @@ protected:
     void requestExitFullScreen();
     void saveScrollPosition();
     void restoreScrollPosition();
-    void setFullscreenInsetTop(double);
-    void setFullscreenAutoHideDelay(double);
+    void setFullscreenInsets(const WebCore::FloatBoxExtent&);
+    void setFullscreenAutoHideTiming(Seconds delay, Seconds duration);
+    void setFullscreenControlsHidden(bool);
 
     void didReceiveWebFullScreenManagerMessage(IPC::Connection&, IPC::Decoder&);
 
index 1de8179..7f371f8 100644 (file)
@@ -30,7 +30,8 @@ messages -> WebFullScreenManager LegacyReceiver {
     SetAnimatingFullScreen(bool animating)
     SaveScrollPosition()
     RestoreScrollPosition()
-    SetFullscreenInsetTop(double inset)
-    SetFullscreenAutoHideDelay(double delay)
+    SetFullscreenInsets(WebCore::RectEdges<float> insets)
+    SetFullscreenAutoHideTiming(Seconds delay, Seconds duration)
+    SetFullscreenControlsHidden(bool hidden)
 }
 #endif