fullscreen env() variables should have initial values
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2018 16:53:54 +0000 (16:53 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2018 16:53:54 +0000 (16:53 +0000)
commitfaeec8969111b74c335ed20da35fb09d15ed4fac
treed79ee476602698734375958f90db32db905b518f
parent6e68550261599f354a6e04d2c7a1df3edf443633
fullscreen env() variables should have initial values
https://bugs.webkit.org/show_bug.cgi?id=187897
<rdar://problem/42485682>

Reviewed by Sam Weinig.

Source/WebCore:

The env() values for fullscreen properties need to be
initialized, rather than wait for values to be set from WebKit.
Without this, feature detection doesn't work, and properties
won't parse correctly.

Test: fullscreen/fullscreen-env-initial.html

* dom/ConstantPropertyMap.cpp:
(WebCore::ConstantPropertyMap::buildValues): Initialize the fullscreen values.
(WebCore::ConstantPropertyMap::updateConstantsForFullscreen): Renamed function, because it
also updates the duration value.
(WebCore::ConstantPropertyMap::didChangeFullscreenInsets): Call new name.
(WebCore::ConstantPropertyMap::updateConstantsForFullscreenInsets): Deleted.
* dom/ConstantPropertyMap.h:
* page/Page.cpp:
(WebCore::Page::setFullscreenAutoHideDuration): Don't change the value if it doesn't need it.
* page/Page.h: Add accessor for fullscreenAutoHideDuration. Also add a member variable.
(WebCore::Page::fullscreenAutoHideDuration const):

LayoutTests:

* fullscreen/fullscreen-env-initial-expected.html: Added.
* fullscreen/fullscreen-env-initial.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fullscreen/fullscreen-env-initial-expected.html [new file with mode: 0644]
LayoutTests/fullscreen/fullscreen-env-initial.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/ConstantPropertyMap.cpp
Source/WebCore/dom/ConstantPropertyMap.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h