WebKit Bugzilla
Attachment 343113 Details for
Bug 186684
: Address fullscreen api CSS env feedback
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186684-20180619152845.patch (text/plain), 44.08 KB, created by
Jer Noble
on 2018-06-19 15:28:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-19 15:28:45 PDT
Size:
44.08 KB
patch
obsolete
>Subversion Revision: 232855 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3a8797e97a6e345f20d2fdccaefe3746bfff1fd3..b6f42cae0f98f326762f529234bbe268e72a5356 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ 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-14 Nan Wang <n_wang@apple.com> > > AX: Crash in AccessibilityNodeObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const + 536 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3ec6cd2c47707f8c39ca49e834da6ef5fc483368..72f6f9f7806427cb20bcdd7269176d56a94ddba9 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,40 @@ >+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 NOBODY (OOPS!). >+ >+ + 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::setFullscreenAutoHideDuration): >+ (WebKit::WebFullScreenManagerProxy::setFullscreenControlsHidden): >+ (WebKit::WebFullScreenManagerProxy::setFullscreenInsetTop): 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::setFullscreenAutoHideDuration): >+ (WebKit::WebFullScreenManager::setFullscreenControlsHidden): >+ (WebKit::WebFullScreenManager::setFullscreenInsetTop): Deleted. >+ * WebProcess/FullScreen/WebFullScreenManager.h: >+ * WebProcess/FullScreen/WebFullScreenManager.messages.in: >+ > 2018-06-12 Jer Noble <jer.noble@apple.com> > > Make Modern EME An Experimental Feature Again >diff --git a/Source/WebCore/English.lproj/Localizable.strings b/Source/WebCore/English.lproj/Localizable.strings >index 68d17b6769a41e9a9e6479597be4bf37660a10d7..4b79ba91cbf0f7859e5048c30f561942af779017 100644 >--- a/Source/WebCore/English.lproj/Localizable.strings >+++ b/Source/WebCore/English.lproj/Localizable.strings >@@ -734,7 +734,7 @@ > "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: "; >diff --git a/Source/WebCore/css/CSSSelector.cpp b/Source/WebCore/css/CSSSelector.cpp >index 906b3b071b960c07b373433b3859b450590137ce..67c5a32ce3c9b1889cad50367fb2de2dfe08ae06 100644 >--- a/Source/WebCore/css/CSSSelector.cpp >+++ b/Source/WebCore/css/CSSSelector.cpp >@@ -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"); >diff --git a/Source/WebCore/css/CSSSelector.h b/Source/WebCore/css/CSSSelector.h >index 03e9f16d884d7a2b5e21e2c7ee7628bd7b47ba5e..6f571f15287ebc6d618afa6c975e68364ac319ab 100644 >--- a/Source/WebCore/css/CSSSelector.h >+++ b/Source/WebCore/css/CSSSelector.h >@@ -148,6 +148,7 @@ namespace WebCore { > PseudoClassFullScreenDocument, > PseudoClassFullScreenAncestor, > PseudoClassAnimatingFullScreenTransition, >+ PseudoClassFullScreenControlsHidden, > #endif > PseudoClassInRange, > PseudoClassOutOfRange, >diff --git a/Source/WebCore/css/SelectorChecker.cpp b/Source/WebCore/css/SelectorChecker.cpp >index 354bfc234eb43b36bba69d6b190c0da91a4460e4..0ab738815b202b7841d059cac95c941effab6194 100644 >--- a/Source/WebCore/css/SelectorChecker.cpp >+++ b/Source/WebCore/css/SelectorChecker.cpp >@@ -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); >diff --git a/Source/WebCore/css/SelectorCheckerTestFunctions.h b/Source/WebCore/css/SelectorCheckerTestFunctions.h >index 0e8534aa745bf6387137900539a92968e88f25fc..b7b2e3bcff0e3506c355816160465219ac089245 100644 >--- a/Source/WebCore/css/SelectorCheckerTestFunctions.h >+++ b/Source/WebCore/css/SelectorCheckerTestFunctions.h >@@ -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) >diff --git a/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in b/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in >index 9bcd104a760ae70c8f1de63f72f42c80cf46148d..63bd94a6d1c82b287fe2df45a030a6c985552ead 100644 >--- a/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in >+++ b/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in >@@ -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) >diff --git a/Source/WebCore/cssjit/SelectorCompiler.cpp b/Source/WebCore/cssjit/SelectorCompiler.cpp >index d79ad01f6d084ea0087d2098f635c108dfcad189..6efe000cc84622078ba32f12eac92b0af9d3cfc7 100644 >--- a/Source/WebCore/cssjit/SelectorCompiler.cpp >+++ b/Source/WebCore/cssjit/SelectorCompiler.cpp >@@ -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: >diff --git a/Source/WebCore/dom/ConstantPropertyMap.cpp b/Source/WebCore/dom/ConstantPropertyMap.cpp >index e1350b52bf2faa74b379d6517adffcdaaf9dfac7..7a1444b8b9971ec33f671eed71aedfbd7477ba6c 100644 >--- a/Source/WebCore/dom/ConstantPropertyMap.cpp >+++ b/Source/WebCore/dom/ConstantPropertyMap.cpp >@@ -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(); >@@ -130,9 +142,18 @@ 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(); > } > >@@ -142,4 +163,10 @@ void ConstantPropertyMap::setFullscreenAutoHideDelay(double delay) > m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc(); > } > >+void ConstantPropertyMap::setFullscreenAutoHideDuration(double duration) >+{ >+ setValueForProperty(ConstantProperty::FullscreenAutoHideDuration, variableDataForPositiveDuration(duration)); >+ m_document.invalidateMatchedPropertiesCacheAndForceStyleRecalc(); >+} >+ > } >diff --git a/Source/WebCore/dom/ConstantPropertyMap.h b/Source/WebCore/dom/ConstantPropertyMap.h >index 88f5a760b20d82d1f30ad4f934261fc8d9f1ea80..8d7887ba43ba81ce4dd71c8008327c8a4e7cd720 100644 >--- a/Source/WebCore/dom/ConstantPropertyMap.h >+++ b/Source/WebCore/dom/ConstantPropertyMap.h >@@ -43,7 +43,11 @@ enum class ConstantProperty { > SafeAreaInsetBottom, > SafeAreaInsetLeft, > FullscreenInsetTop, >+ FullscreenInsetRight, >+ FullscreenInsetBottom, >+ FullscreenInsetLeft, > FullscreenAutoHideDelay, >+ FullscreenAutoHideDuration, > }; > > class ConstantPropertyMap { >@@ -54,8 +58,9 @@ public: > const Values& values() const; > > void didChangeSafeAreaInsets(); >- void setFullscreenInsetTop(double); >+ void didChangeFullscreenInsets(); > void setFullscreenAutoHideDelay(double); >+ void setFullscreenAutoHideDuration(double); > > private: > void buildValues(); >@@ -64,6 +69,7 @@ private: > void setValueForProperty(ConstantProperty, Ref<CSSVariableData>&&); > > void updateConstantsForSafeAreaInsets(); >+ void updateConstantsForFullscreenInsets(); > > std::optional<Values> m_values; > >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 6873146b6e3f03bf453beb7b0aa09fb0c75fc381..2cf488e24a76b47656c488fea9697d05dd7858bf 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -6415,6 +6415,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(); >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 0cb3c1c5842dd7d7bbf54207cb939c3c70046c44..21b205d66a32ec0ed03546fa37e0eeec8643fec5 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -1153,6 +1153,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()); } >@@ -1708,6 +1711,7 @@ private: > > bool m_areKeysEnabledInFullScreen { false }; > bool m_isAnimatingFullScreen { false }; >+ bool m_areFullscreenControlsHidden { false }; > #endif > > HashSet<HTMLPictureElement*> m_viewportDependentPictures; >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index 59a7876dd2bcb00ef667dd2dac5f4288b682050b..138bc618280780a1afe8e28caa6b3810a7090d0c 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2377,12 +2377,16 @@ 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(); > } > } > >@@ -2395,6 +2399,28 @@ void Page::setFullscreenAutoHideDelay(double delay) > } > } > >+void Page::setFullscreenAutoHideDuration(double 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 >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index 6b8482ad23e887f7d05561c075cf3b6b8be814b0..e9bb7ecf27f685c265d775c10098acdd36f2fceb 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -350,9 +350,13 @@ public: > void setTextAutosizingWidth(float textAutosizingWidth) { m_textAutosizingWidth = textAutosizingWidth; } > #endif > >- WEBCORE_EXPORT void setFullscreenInsetTop(double); >+ WEBCORE_EXPORT void setFullscreenInsets(const FloatBoxExtent&); >+ const FloatBoxExtent& fullscreenInsets() const { return m_fullscreenInsets; } >+ > WEBCORE_EXPORT void setFullscreenAutoHideDelay(double); >- >+ WEBCORE_EXPORT void setFullscreenAutoHideDuration(double); >+ 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 }; >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 58261eda23db6bd60e15be376cd1b0a295a454bf..0e97a8d63daf24a753aeccd389f3fee267020d06 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -500,7 +500,9 @@ void Internals::resetToConsistentState(Page& page) > > page.settings().setStorageAccessAPIEnabled(false); > page.setFullscreenAutoHideDelay(0); >- page.setFullscreenInsetTop(0); >+ page.setFullscreenAutoHideDuration(0); >+ page.setFullscreenInsets(FloatBoxExtent()); >+ page.setFullscreenControlsHidden(false); > } > > Internals::Internals(Document& document) >@@ -2836,12 +2838,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) >@@ -2852,6 +2854,22 @@ void Internals::setFullscreenAutoHideDelay(double delay) > page->setFullscreenAutoHideDelay(delay); > } > >+void Internals::setFullscreenAutoHideDuration(double duration) >+{ >+ Page* page = contextDocument()->frame()->page(); >+ ASSERT(page); >+ >+ page->setFullscreenAutoHideDuration(duration); >+} >+ >+void Internals::setFullscreenControlsHidden(bool hidden) >+{ >+ Page* page = contextDocument()->frame()->page(); >+ ASSERT(page); >+ >+ page->setFullscreenControlsHidden(hidden); >+} >+ > void Internals::setApplicationCacheOriginQuota(unsigned long long quota) > { > Document* document = contextDocument(); >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 93a7463464e0e99dceb801ce55ffd10d7e8a7a6e..0548458fb34956617ec45a396546cf6e51794556 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -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); > >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index 4073a04820df567b9f63dcfd2cfe24ece958ceac..31229e73906a42f89c5f0805adea24e270a33365 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -100,6 +100,16 @@ enum EventThrottlingBehavior { > unsigned long long uniqueIdentifier; > }; > >+[ >+ ExportMacro=WEBCORE_TESTSUPPORT_EXPORT, >+ JSGenerateToJSObject, >+] dictionary FullscreenInsets { >+ double top; >+ double left; >+ double bottom; >+ double right; >+}; >+ > [ > ExportMacro=WEBCORE_TESTSUPPORT_EXPORT, > NoInterfaceObject, >@@ -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); > >diff --git a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >index a0d8cdbeb2f01efe996134c61a97afb0e6e4db0e..6346c4e37c735cf0dc061301eef7a3ad85ad5e1a 100644 >--- a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >@@ -120,9 +120,9 @@ 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) >@@ -130,6 +130,16 @@ void WebFullScreenManagerProxy::setFullscreenAutoHideDelay(double delay) > m_page->process().send(Messages::WebFullScreenManager::SetFullscreenAutoHideDelay(delay), m_page->pageID()); > } > >+void WebFullScreenManagerProxy::setFullscreenAutoHideDuration(double duration) >+{ >+ m_page->process().send(Messages::WebFullScreenManager::SetFullscreenAutoHideDuration(duration), m_page->pageID()); >+} >+ >+void WebFullScreenManagerProxy::setFullscreenControlsHidden(bool hidden) >+{ >+ m_page->process().send(Messages::WebFullScreenManager::SetFullscreenControlsHidden(hidden), m_page->pageID()); >+} >+ > void WebFullScreenManagerProxy::invalidate() > { > m_page->process().removeMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID()); >diff --git a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.h b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.h >index 897e9b41e5019f368ed3a132f76e542fa24a19d0..68ded8574ed4a15c360cc4a02a0af184c63b07cc 100644 >--- a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.h >+++ b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.h >@@ -33,6 +33,9 @@ > > namespace WebCore { > class IntRect; >+ >+template <typename> class RectEdges; >+using FloatBoxExtent = RectEdges<float>; > } > > namespace WebKit { >@@ -69,8 +72,10 @@ public: > void requestExitFullScreen(); > void saveScrollPosition(); > void restoreScrollPosition(); >- void setFullscreenInsetTop(double); >+ void setFullscreenInsets(const WebCore::FloatBoxExtent&); > void setFullscreenAutoHideDelay(double); >+ void setFullscreenAutoHideDuration(double); >+ void setFullscreenControlsHidden(bool); > > private: > explicit WebFullScreenManagerProxy(WebPageProxy&, WebFullScreenManagerProxyClient&); >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >index 2d0e24443d241e4962996125172f3f351aee55bd..373c2dddacd1a2584600c7e42c335143984967e7 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >+++ b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >@@ -102,7 +102,7 @@ @end > @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 { >@@ -166,6 +166,11 @@ - (void)showUI > [_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); > }]; > } > >@@ -174,17 +179,16 @@ - (void)hideUI > [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]; > }]; > } >@@ -301,8 +305,10 @@ - (void)viewWillAppear:(BOOL)animated > self._webView.frame = self.view.bounds; > [self.view insertSubview:self._webView atIndex:0]; > >- if (auto* manager = self._manager) >+ if (auto* manager = self._manager) { > manager->setFullscreenAutoHideDelay(autoHideDelay); >+ manager->setFullscreenAutoHideDuration(showHideAnimationDuration); >+ } > > [super viewWillAppear:animated]; > } >@@ -359,15 +365,16 @@ - (WebFullScreenManagerProxy*)_manager > 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 +426,13 @@ - (void)_statusBarFrameDidChange:(NSNotificationCenter *)notification > - (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]; > > UIAlertAction* exitAction = [UIAlertAction actionWithTitle:WEB_UI_STRING("Exit Fullscreen", "Fullscreen Deceptive Website Exit Action") style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { >diff --git a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp >index 11f5790e95c8ddc8df7ed412c8a0b04a5246036c..4fba3fdb599d4710ee58b7abf4e55678d1815f22 100644 >--- a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp >+++ b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp >@@ -181,7 +181,7 @@ void WebFullScreenManager::willExitFullScreen() > void WebFullScreenManager::didExitFullScreen() > { > ASSERT(m_element); >- setFullscreenInsetTop(0); >+ setFullscreenInsets(FloatBoxExtent()); > setFullscreenAutoHideDelay(0); > m_element->document().webkitDidExitFullScreenForElement(m_element.get()); > } >@@ -213,9 +213,9 @@ 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) >@@ -223,6 +223,16 @@ void WebFullScreenManager::setFullscreenAutoHideDelay(double delay) > m_page->corePage()->setFullscreenAutoHideDelay(delay); > } > >+void WebFullScreenManager::setFullscreenAutoHideDuration(double duration) >+{ >+ m_page->corePage()->setFullscreenAutoHideDuration(duration); >+} >+ >+void WebFullScreenManager::setFullscreenControlsHidden(bool hidden) >+{ >+ m_page->corePage()->setFullscreenControlsHidden(hidden); >+} >+ > } // namespace WebKit > > #endif // ENABLE(FULLSCREEN_API) >diff --git a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h >index c170fa2aeaa72e5cf1f30261969de4228da05a79..7187dfdc34b7481ed4622dd1de06f339982b26fd 100644 >--- a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h >+++ b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h >@@ -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,10 @@ protected: > void requestExitFullScreen(); > void saveScrollPosition(); > void restoreScrollPosition(); >- void setFullscreenInsetTop(double); >+ void setFullscreenInsets(const WebCore::FloatBoxExtent&); > void setFullscreenAutoHideDelay(double); >+ void setFullscreenAutoHideDuration(double); >+ void setFullscreenControlsHidden(bool); > > void didReceiveWebFullScreenManagerMessage(IPC::Connection&, IPC::Decoder&); > >diff --git a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.messages.in b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.messages.in >index 1de817952e267de19f4ca60ebbaf82f6a7cfecdf..7fdb8d90d93e44b80fa2f05aa6851fa455cc0af5 100644 >--- a/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.messages.in >+++ b/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.messages.in >@@ -30,7 +30,9 @@ messages -> WebFullScreenManager LegacyReceiver { > SetAnimatingFullScreen(bool animating) > SaveScrollPosition() > RestoreScrollPosition() >- SetFullscreenInsetTop(double inset) >+ SetFullscreenInsets(WebCore::RectEdges<float> insets) > SetFullscreenAutoHideDelay(double delay) >+ SetFullscreenAutoHideDuration(double duration) >+ SetFullscreenControlsHidden(bool hidden) > } > #endif >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ed5faf7ab56fa4583eb638c6407a8fc6e2cc63cb..696aa40148dca97a78158a4443a08681fa922661 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -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 NOBODY (OOPS!). >+ >+ * 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-14 Nan Wang <n_wang@apple.com> > > AX: Crash in AccessibilityNodeObject::textUnderElement(WebCore::AccessibilityTextUnderElementMode) const + 536 >diff --git a/LayoutTests/fullscreen/fullscreen-env-expected.txt b/LayoutTests/fullscreen/fullscreen-env-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ae4fac8c895b5e1f4a800b89858436aae9e75c97 >--- /dev/null >+++ b/LayoutTests/fullscreen/fullscreen-env-expected.txt >@@ -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 >index 0000000000000000000000000000000000000000..acf7adfaf99878714649dae1dfa71ccaec97def9 >--- /dev/null >+++ b/LayoutTests/fullscreen/fullscreen-env.html >@@ -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"> </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 >index cf823d971abc2ec6a33a0be5fcb1db31614553f0..0000000000000000000000000000000000000000 >--- a/LayoutTests/fullscreen/fullscreen-inset-top-expected.txt >+++ /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 >index 9ad9700f1f179d28a2896dbbc4bf76bde3af32de..0000000000000000000000000000000000000000 >--- a/LayoutTests/fullscreen/fullscreen-inset-top.html >+++ /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"> </div> >-</body> >-</html> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186684
:
342830
|
342956
|
343102
|
343113
|
343243
|
343254
|
343261
|
343263
|
343264
|
343270
|
343281