Commit e0173750 authored by jer.noble@apple.com's avatar jer.noble@apple.com
Browse files

Default mouse cursor behavior should be auto-hide for full screen video with custom controls

https://bugs.webkit.org/show_bug.cgi?id=107601

Reviewed by Beth Dakin.

Source/WebCore:

Test: fullscreen/video-cursor-auto-hide.html

To facilitate automatically hiding the mouse cursor after a certain amount of idle mouse
time, add a new CSS property '-webkit-cursor-visibility', and handle that value inside of
EventHandler. When that value is present, the EventHandler will start a timer which, when
fired, will set the view's cursor to the None cursor. Subsequent mouse moves will either
cancel the timer, or reset the auto-hide timer.

Add a new CSS property, '-webkit-cursor-visibility':
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ECursorVisibility):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

Add a rule for video descendants of full screen elements to auto-hide the cursor on hover:
* css/fullscreen.css:
(:-webkit-full-screen video:hover):

Add a new timer, m_autoHideCursorTimer, to control resetting the view's cursor to None after
enough mouse idle time has passed.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::~EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::startAutoHideCursorTimer):
(WebCore::EventHandler::cancelAutoHideCursorTimer):
(WebCore::EventHandler::autoHideCursorTimerFired):
* page/EventHandler.h:

Make FrameView::isActive() a public function (like it is in its superclass).
* page/FrameView.h:
(FrameView):

Move the definition for timeWithoutMouseMovementBeforeHidingControls from page->theme()
to page->settings() and allow that setting to be overridden in InternalSettings for
testing purposes:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls):
(WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls):
* rendering/RenderTheme.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::startHideFullscreenControlsTimer):

Add support to FeatureObserver for CURSOR_VISIBILITY:
* page/FeatureObserver.h:

Enable the feature flag:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Enable the CURSOR_VISIBILITY feature.

* WebKit.vcxproj/FeatureDefines.props:

Source/WebKit/mac:

Enable the CURSOR_VISIBILITY feature.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Enable the CURSOR_VISIBILITY feature.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Enable the CURSOR_VISIBILITY feature.

* wtf/FeatureDefines.h:

LayoutTests:

* fullscreen/video-cursor-auto-hide-expected.txt: Added.
* fullscreen/video-cursor-auto-hide.html: Added.

Add an expected failing result in platforms which do not enable CURSOR_VISIBILITY.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 698faa65
2013-01-23 Jer Noble <jer.noble@apple.com>
Default mouse cursor behavior should be auto-hide for full screen video with custom controls
https://bugs.webkit.org/show_bug.cgi?id=107601
Reviewed by Beth Dakin.
* fullscreen/video-cursor-auto-hide-expected.txt: Added.
* fullscreen/video-cursor-auto-hide.html: Added.
Add an expected failing result in platforms which do not enable CURSOR_VISIBILITY.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
2013-03-06 Jer Noble <jer.noble@apple.com>
 
Full screen from an iframe with a z-index style will allow siblings with higher z-index to overlay full screen content.
This tests that the cursor hides after hovering over a video element in full screen mode.
EVENT(webkitfullscreenchange)
EXPECTED (window.internals.getCurrentCursorInfo(document) == 'type=Pointer hotSpot=0,0') OK
EXPECTED (window.internals.getCurrentCursorInfo(document) == 'type=None hotSpot=0,0') OK
END OF TEST
<body>
<p>This tests that the cursor hides after hovering over a video element in full screen mode.</p>
<div id=wrapper>
<video id="video" width="300"></video>
</div>
<script src="full-screen-test.js"></script>
<script>
var wrapper = document.getElementById('wrapper');
function checkForHiddenMouse()
{
testExpected('window.internals.getCurrentCursorInfo(document)', 'type=None hotSpot=0,0');
endTest();
}
function fullscreenChanged(event)
{
if (window.internals) {
internals.settings.setTimeWithoutMouseMovementBeforeHidingControls(0);
wrapperBox = internals.boundingBox(wrapper);
eventSender.mouseMoveTo(wrapperBox.left + wrapperBox.width / 2, wrapperBox.top + wrapperBox.height / 2);
testExpected('window.internals.getCurrentCursorInfo(document)', 'type=Pointer hotSpot=0,0');
setTimeout(checkForHiddenMouse, 0);
}
else
logResult(false, "window.internals == undefined");
}
waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
runWithKeyDown(function(){wrapper.webkitRequestFullScreen()});
</script>
</body>
......@@ -4420,3 +4420,6 @@ webkit.org/b/111514 [ Mac ] plugins/plugin-clip-subframe.html [ Failure ]
webkit.org/b/111524 [ Debug Win Mac ] fast/dom/HTMLDocument/document-special-properties.html [ Pass Timeout ]
webkit.org/b/111640 [ Mac Win ] fast/dom/Window/window-special-properties.html [ Slow ]
# CURSOR_VISIBILITY is not enabled in chromium
webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
......@@ -1860,3 +1860,6 @@ webkit.org/b/111058 plugins/plugin-clip-subframe.html [ Failure ]
webkit.org/b/111172 compositing/overlap-blending/children-opacity-huge.html [ ImageOnlyFailure ]
webkit.org/b/111172 compositing/overlap-blending/children-opacity-no-overlap.html [ ImageOnlyFailure ]
webkit.org/b/111172 compositing/overlap-blending/reflection-opacity-huge.html [ ImageOnlyFailure ]
# CURSOR_VISIBILITY is not enabled in efl
webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
......@@ -1406,6 +1406,9 @@ webkit.org/b/111058 plugins/plugin-clip-subframe.html [ Failure ]
webkit.org/b/111477 inspector-protocol/layers/layers-for-node.html [ Timeout ]
webkit.org/b/111477 inspector-protocol/layers/layers-reflected-content.html [ Timeout ]
# CURSOR_VISIBILITY is not enabled in gtk
webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
#////////////////////////////////////////////////////////////////////////////////////////
# End of Tests failing
#////////////////////////////////////////////////////////////////////////////////////////
......@@ -360,6 +360,9 @@ webkit.org/b/85463 editing/inserting/typing-space-to-trigger-smart-link.html
# gestureTwoFingerTap not implemented by this platform (introduced in r132406)
touchadjustment/touch-links-two-finger-tap.html
# CURSOR_VISIBILITY is not enabled in qt
webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
# =========================================================================== #
# Feature not yet supported. #
# =========================================================================== #
......
......@@ -58,6 +58,7 @@ ENABLE_CSS_VARIABLES = ;
ENABLE_CSS3_CONDITIONAL_RULES = ;
ENABLE_CSS3_TEXT = ;
ENABLE_CSS3_TEXT_LINE_BREAK = ;
ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
ENABLE_CUSTOM_SCHEME_HANDLER = ;
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
......@@ -184,4 +185,4 @@ ENABLE_WORKERS = ENABLE_WORKERS;
ENABLE_XHR_TIMEOUT = ENABLE_XHR_TIMEOUT;
ENABLE_XSLT = ENABLE_XSLT;
FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
2013-03-04 Jer Noble <jer.noble@apple.com>
Default mouse cursor behavior should be auto-hide for full screen video with custom controls
https://bugs.webkit.org/show_bug.cgi?id=107601
Reviewed by Beth Dakin.
Enable the CURSOR_VISIBILITY feature.
* wtf/FeatureDefines.h:
2013-03-04 Oliver Hunt <oliver@apple.com>
 
Make fastmalloc use guardpages
......
......@@ -186,6 +186,10 @@
#define ENABLE_WEB_AUDIO 1
#endif
#if !defined(ENABLE_CURSOR_VISIBILITY)
#define ENABLE_CURSOR_VISIBILITY 1
#endif
#endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
/* --------- Apple Windows port --------- */
......
2013-02-22 Jer Noble <jer.noble@apple.com>
Default mouse cursor behavior should be auto-hide for full screen video with custom controls
https://bugs.webkit.org/show_bug.cgi?id=107601
Reviewed by Beth Dakin.
Test: fullscreen/video-cursor-auto-hide.html
To facilitate automatically hiding the mouse cursor after a certain amount of idle mouse
time, add a new CSS property '-webkit-cursor-visibility', and handle that value inside of
EventHandler. When that value is present, the EventHandler will start a timer which, when
fired, will set the view's cursor to the None cursor. Subsequent mouse moves will either
cancel the timer, or reset the auto-hide timer.
Add a new CSS property, '-webkit-cursor-visibility':
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ECursorVisibility):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Add a rule for video descendants of full screen elements to auto-hide the cursor on hover:
* css/fullscreen.css:
(:-webkit-full-screen video:hover):
Add a new timer, m_autoHideCursorTimer, to control resetting the view's cursor to None after
enough mouse idle time has passed.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::~EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::startAutoHideCursorTimer):
(WebCore::EventHandler::cancelAutoHideCursorTimer):
(WebCore::EventHandler::autoHideCursorTimerFired):
* page/EventHandler.h:
Make FrameView::isActive() a public function (like it is in its superclass).
* page/FrameView.h:
(FrameView):
Move the definition for timeWithoutMouseMovementBeforeHidingControls from page->theme()
to page->settings() and allow that setting to be overridden in InternalSettings for
testing purposes:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls):
(WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls):
* rendering/RenderTheme.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::startHideFullscreenControlsTimer):
Add support to FeatureObserver for CURSOR_VISIBILITY:
* page/FeatureObserver.h:
Enable the feature flag:
* Configurations/FeatureDefines.xcconfig:
2013-03-06 Jer Noble <jer.noble@apple.com>
 
Full screen from an iframe with a z-index style will allow siblings with higher z-index to overlay full screen content.
......@@ -58,6 +58,7 @@ ENABLE_CSS_VARIABLES = ;
ENABLE_CSS3_CONDITIONAL_RULES = ;
ENABLE_CSS3_TEXT = ;
ENABLE_CSS3_TEXT_LINE_BREAK = ;
ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
ENABLE_CUSTOM_SCHEME_HANDLER = ;
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME));
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
......@@ -184,4 +185,4 @@ ENABLE_WORKERS = ENABLE_WORKERS;
ENABLE_XHR_TIMEOUT = ENABLE_XHR_TIMEOUT;
ENABLE_XSLT = ENABLE_XSLT;
FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
......@@ -263,6 +263,9 @@ static const CSSPropertyID computedProperties[] = {
CSSPropertyWebkitColumnRuleWidth,
CSSPropertyWebkitColumnSpan,
CSSPropertyWebkitColumnWidth,
#if ENABLE(CURSOR_VISIBILITY)
CSSPropertyWebkitCursorVisibility,
#endif
#if ENABLE(DASHBOARD_SUPPORT)
CSSPropertyWebkitDashboardRegion,
#endif
......@@ -1847,6 +1850,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
}
return value.release();
}
#if ENABLE(CURSOR_VISIBILITY)
case CSSPropertyWebkitCursorVisibility:
return cssValuePool().createValue(style->cursorVisibility());
#endif
case CSSPropertyDirection:
return cssValuePool().createValue(style->direction());
case CSSPropertyDisplay:
......
......@@ -2073,6 +2073,13 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
break;
}
#if ENABLE(CURSOR_VISIBILITY)
case CSSPropertyWebkitCursorVisibility:
if (id == CSSValueAuto || id == CSSValueAutoHide)
validPrimitive = true;
break;
#endif
case CSSPropertyBackgroundAttachment:
case CSSPropertyBackgroundClip:
case CSSPropertyWebkitBackgroundClip:
......
......@@ -1163,6 +1163,34 @@ template<> inline CSSPrimitiveValue::operator ECursor() const
return static_cast<ECursor>(m_value.ident - CSSValueAuto);
}
#if ENABLE(CURSOR_VISIBILITY)
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CursorVisibility e)
: CSSValue(PrimitiveClass)
{
m_primitiveUnitType = CSS_IDENT;
switch (e) {
case CursorVisibilityAuto:
m_value.ident = CSSValueAuto;
break;
case CursorVisibilityAutoHide:
m_value.ident = CSSValueAutoHide;
break;
}
}
template<> inline CSSPrimitiveValue::operator CursorVisibility() const
{
if (m_value.ident == CSSValueAuto)
return CursorVisibilityAuto;
if (m_value.ident == CSSValueAutoHide)
return CursorVisibilityAutoHide;
ASSERT_NOT_REACHED();
return CursorVisibilityAuto;
}
#endif
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
: CSSValue(PrimitiveClass)
{
......
......@@ -302,6 +302,9 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
case CSSPropertyWebkitBorderVerticalSpacing:
case CSSPropertyWebkitBoxDirection:
case CSSPropertyWebkitColorCorrection:
#if ENABLE(CURSOR_VISIBILITY)
case CSSPropertyWebkitCursorVisibility:
#endif
case CSSPropertyWebkitFontFeatureSettings:
case CSSPropertyWebkitFontKerning:
case CSSPropertyWebkitFontSmoothing:
......
......@@ -100,6 +100,9 @@ content
counter-increment
counter-reset
cursor
#if defined(ENABLE_CURSOR_VISIBILITY) && ENABLE_CURSOR_VISIBILITY
-webkit-cursor-visibility
#endif
empty-cells
float
font-stretch
......
......@@ -377,6 +377,10 @@ all-scroll
-webkit-grabbing
// none
//
// CSS_PROP_CURSOR_VISIBILITY:
// auto
auto-hide
//
// CSS_PROP_DIRECTION:
//
ltr
......
......@@ -1961,6 +1961,9 @@ StyleBuilder::StyleBuilder()
setPropertyHandler(CSSPropertyWebkitColumnSpan, ApplyPropertyDefault<ColumnSpan, &RenderStyle::columnSpan, ColumnSpan, &RenderStyle::setColumnSpan, ColumnSpan, &RenderStyle::initialColumnSpan>::createHandler());
setPropertyHandler(CSSPropertyWebkitColumnRuleStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::columnRuleStyle, EBorderStyle, &RenderStyle::setColumnRuleStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto<float, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth, ComputeLength>::createHandler());
#if ENABLE(CURSOR_VISIBILITY)
setPropertyHandler(CSSPropertyWebkitCursorVisibility, ApplyPropertyDefault<CursorVisibility, &RenderStyle::cursorVisibility, CursorVisibility, &RenderStyle::setCursorVisibility, CursorVisibility, &RenderStyle::initialCursorVisibility>::createHandler());
#endif
setPropertyHandler(CSSPropertyWebkitAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
setPropertyHandler(CSSPropertyWebkitAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
setPropertyHandler(CSSPropertyWebkitAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
......
......@@ -3748,6 +3748,9 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
case CSSPropertyWebkitColumnRuleWidth:
case CSSPropertyWebkitColumnSpan:
case CSSPropertyWebkitColumnWidth:
#if ENABLE(CURSOR_VISIBILITY)
case CSSPropertyWebkitCursorVisibility:
#endif
case CSSPropertyWebkitAlignContent:
case CSSPropertyWebkitAlignItems:
case CSSPropertyWebkitAlignSelf:
......
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