WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-87591-20120527215419.patch (text/plain), 15.32 KB, created by
Victor Carbune
on 2012-05-27 11:54:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Victor Carbune
Created:
2012-05-27 11:54:21 PDT
Size:
15.32 KB
patch
obsolete
>Subversion Revision: 118627 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2574f055cb838772a14940070eea8de862edf542..64864bf3aa0ae505ad792a10b52556a6df4a9bc1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,31 @@ >+2012-05-27 Victor Carbune <victor@rosedu.org> >+ >+ Display cues in the controls area >+ https://bugs.webkit.org/show_bug.cgi?id=87591 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Changed the behaviour to implicitly hide the volume slidebar >+ if the controls are hidden (due mouse moving out of the video >+ area or controls are toggled through JS). >+ >+ This seems to be the simplest fix to this issue, otherwise >+ on toggling the display:none property on the controls the >+ volume slidebar might appear below the video. >+ >+ Re-enabled failing tests for this functionality. >+ >+ * html/shadow/MediaControlElements.cpp: >+ (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled >+ timer to set the display:none property on the controls. >+ * html/shadow/MediaControlRootElement.cpp: >+ (WebCore::MediaControlRootElement::hide): Added a call to hide >+ the volume slider. >+ (WebCore::MediaControlRootElement::makeTransparent): Same. >+ * html/shadow/MediaControlRootElementChromium.cpp: >+ (WebCore::MediaControlRootElementChromium::hide): Same. >+ (WebCore::MediaControlRootElementChromium::makeTransparent): Same. >+ > 2012-05-27 David Kilzer <ddkilzer@apple.com> > > Use xcrun to find gperf path on platforms that use Xcode >diff --git a/Source/WebCore/html/shadow/MediaControlElements.cpp b/Source/WebCore/html/shadow/MediaControlElements.cpp >index b56b1d26549f1d406c8b4b9fdd1f434b76c860ed..212048ab22bb4039550b4b03a80bdd8584769537 100644 >--- a/Source/WebCore/html/shadow/MediaControlElements.cpp >+++ b/Source/WebCore/html/shadow/MediaControlElements.cpp >@@ -256,6 +256,7 @@ void MediaControlPanelElement::makeTransparent() > setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER); > > m_opaque = false; >+ startTimer(); > } > > void MediaControlPanelElement::defaultEventHandler(Event* event) >diff --git a/Source/WebCore/html/shadow/MediaControlRootElement.cpp b/Source/WebCore/html/shadow/MediaControlRootElement.cpp >index e5c8bc2c2a17b40418b47329cd9fc9e2d65c5756..0ebd0ae3c7d3aa4c8cd97d5974c8ba8f2c880fca 100644 >--- a/Source/WebCore/html/shadow/MediaControlRootElement.cpp >+++ b/Source/WebCore/html/shadow/MediaControlRootElement.cpp >@@ -301,6 +301,7 @@ void MediaControlRootElement::hide() > { > m_panel->setIsDisplayed(false); > m_panel->hide(); >+ m_volumeSliderContainer->hide(); > } > > void MediaControlRootElement::makeOpaque() >@@ -311,6 +312,7 @@ void MediaControlRootElement::makeOpaque() > void MediaControlRootElement::makeTransparent() > { > m_panel->makeTransparent(); >+ m_volumeSliderContainer->hide(); > } > > void MediaControlRootElement::reset() >diff --git a/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp b/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp >index 9fd47a35fbeeca13373ab62e8ab7260daa6dee16..bdcd9164d89dad4b7fd788daa22b33968f9e00a5 100644 >--- a/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp >+++ b/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp >@@ -178,6 +178,7 @@ void MediaControlRootElementChromium::hide() > { > m_panel->setIsDisplayed(false); > m_panel->hide(); >+ m_volumeSliderContainer->hide(); > } > > void MediaControlRootElementChromium::makeOpaque() >@@ -188,6 +189,7 @@ void MediaControlRootElementChromium::makeOpaque() > void MediaControlRootElementChromium::makeTransparent() > { > m_panel->makeTransparent(); >+ m_volumeSliderContainer->hide(); > } > > void MediaControlRootElementChromium::reset() >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2bd2d49ca14124e5dbc329ab573d0e4a9a4dcf88..81f84152df835b70b40be0e7da13c7b911fa563b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2012-05-27 Victor Carbune <victor@rosedu.org> >+ >+ Display cues in the controls area >+ https://bugs.webkit.org/show_bug.cgi?id=87591 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * media/media-volume-slider-rendered-normal-expected.txt: Renamed from LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt. >+ * media/media-volume-slider-rendered-normal.html: Renamed from LayoutTests/media/video-controls-rendering-toggle-display-none.html. >+ * platform/chromium/test_expectations.txt: Unmarked tests. >+ * platform/efl/test_expectations.txt: Unmarked tests. >+ * platform/mac/test_expectations.txt: Unmarked tests. >+ > 2012-05-27 Li Yin <li.yin@intel.com> > > [FileAPI] FileReader should fire progress event when blob has been completely read into memory >diff --git a/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt b/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..39c9b31a604d3fe0dc0b2c82ed4fc9e241ba374f >--- /dev/null >+++ b/LayoutTests/media/media-volume-slider-rendered-normal-expected.txt >@@ -0,0 +1,9 @@ >+Tests that the video controls are properly rendered when the display none is set and unset. >+ >+** The volume slider should have almost the same left offset as the mute button ** >+EXPECTED (volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold == 'true') OK >+EXPECTED (volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold == 'true') OK >+ >+** The volume slider should be on top of the mute button ** >+EXPECTED (volumeSliderElement.offsetTop < muteButtonElement.offsetTop == 'true') OK >+ >diff --git a/LayoutTests/media/media-volume-slider-rendered-normal.html b/LayoutTests/media/media-volume-slider-rendered-normal.html >new file mode 100644 >index 0000000000000000000000000000000000000000..85669e3267bbdee5c5ff570ba1556d59af15c89f >--- /dev/null >+++ b/LayoutTests/media/media-volume-slider-rendered-normal.html >@@ -0,0 +1,70 @@ >+<html> >+<head> >+ <title>Test rendering of volume slider of video tag</title> >+ <script src=media-file.js></script> >+ <script src=media-controls.js></script> >+ <script src=video-test.js></script> >+ <script> >+ var video; >+ var panel; >+ var threshold = 2; >+ >+ var muteButtonCoordinates; >+ var volumeSliderCoordinates; >+ >+ var volumeSliderElement; >+ var muteButtonElement; >+ >+ function init() >+ { >+ video = document.getElementsByTagName("video")[0]; >+ video.src = findMediaFile("video", "content/test"); >+ } >+ >+ function test() >+ { >+ if (window.eventSender) { >+ try { >+ muteButtonCoordinates = mediaControlsButtonCoordinates(video, "mute-button"); >+ volumeSliderCoordinates = mediaControlsButtonCoordinates(video, "volume-slider-container"); >+ } catch (exception) { >+ layoutTestController.notifyDone(); >+ return; >+ } >+ } >+ >+ panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel"); >+ volumeSliderElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-volume-slider-container"); >+ muteButtonElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-mute-button"); >+ >+ // Ensure paint without controls. >+ video.controls = false; >+ document.body.offsetTop; >+ >+ // Ensure (re)paint with controls displayed. >+ video.controls = true; >+ document.body.offsetTop; >+ >+ // Move the mouse back over the mute button. >+ eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]); >+ >+ // Test that the left offset of both controls is equal. >+ consoleWrite(""); >+ consoleWrite("** The volume slider should have almost the same left offset as the mute button **"); >+ testExpected("volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold", true); >+ testExpected("volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold", true); >+ >+ consoleWrite(""); >+ consoleWrite("** The volume slider should be on top of the mute button **"); >+ testExpected("volumeSliderElement.offsetTop < muteButtonElement.offsetTop", true); >+ >+ layoutTestController.notifyDone(); >+ } >+ </script> >+</head> >+<body onload="init()"> >+ Tests that the video controls are properly rendered when the display none is set and unset.<br> >+ >+ <video oncanplaythrough="test()" controls preload="true"></video> >+</body> >+</html> >diff --git a/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt b/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt >deleted file mode 100644 >index 39c9b31a604d3fe0dc0b2c82ed4fc9e241ba374f..0000000000000000000000000000000000000000 >--- a/LayoutTests/media/video-controls-rendering-toggle-display-none-expected.txt >+++ /dev/null >@@ -1,9 +0,0 @@ >-Tests that the video controls are properly rendered when the display none is set and unset. >- >-** The volume slider should have almost the same left offset as the mute button ** >-EXPECTED (volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold == 'true') OK >-EXPECTED (volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold == 'true') OK >- >-** The volume slider should be on top of the mute button ** >-EXPECTED (volumeSliderElement.offsetTop < muteButtonElement.offsetTop == 'true') OK >- >diff --git a/LayoutTests/media/video-controls-rendering-toggle-display-none.html b/LayoutTests/media/video-controls-rendering-toggle-display-none.html >deleted file mode 100644 >index aacf67fc679c352af805681aadddd2c1179cb5b0..0000000000000000000000000000000000000000 >--- a/LayoutTests/media/video-controls-rendering-toggle-display-none.html >+++ /dev/null >@@ -1,70 +0,0 @@ >-<html> >-<head> >- <title>Test rendering of volume slider of video tag</title> >- <script src=media-file.js></script> >- <script src=media-controls.js></script> >- <script src=video-test.js></script> >- <script> >- var video; >- var panel; >- var threshold = 2; >- >- var muteButtonCoordinates; >- var volumeSliderCoordinates; >- >- var volumeSliderElement; >- var muteButtonElement; >- >- function init() >- { >- video = document.getElementsByTagName("video")[0]; >- video.src = findMediaFile("video", "content/test"); >- } >- >- function test() >- { >- if (window.eventSender) { >- try { >- muteButtonCoordinates = mediaControlsButtonCoordinates(video, "mute-button"); >- volumeSliderCoordinates = mediaControlsButtonCoordinates(video, "volume-slider-container"); >- } catch (exception) { >- layoutTestController.notifyDone(); >- return; >- } >- >- eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]); >- } >- >- panel = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-panel"); >- volumeSliderElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-volume-slider-container"); >- muteButtonElement = mediaControlsElement(internals.shadowRoot(video).firstChild, "-webkit-media-controls-mute-button"); >- >- >- // Ensure paint with display property set to "none". >- panel.style.display = "none"; >- document.body.offsetTop; >- >- // Ensure (re)paint with default display property. >- panel.style.removeProperty("display"); >- document.body.offsetTop; >- >- // Test that the left offset of both controls is equal. >- consoleWrite(""); >- consoleWrite("** The volume slider should have almost the same left offset as the mute button **"); >- testExpected("volumeSliderElement.offsetLeft >= muteButtonElement.offsetLeft - threshold", true); >- testExpected("volumeSliderElement.offsetLeft <= muteButtonElement.offsetLeft + threshold", true); >- >- consoleWrite(""); >- consoleWrite("** The volume slider should be on top of the mute button **"); >- testExpected("volumeSliderElement.offsetTop < muteButtonElement.offsetTop", true); >- >- layoutTestController.notifyDone(); >- } >- </script> >-</head> >-<body onload="init()"> >- Tests that the video controls are properly rendered when the display none is set and unset.<br> >- >- <video oncanplaythrough="test()" controls preload="true"></video> >-</body> >-</html> >diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt >index 27dd861139b0cd7e259b4c90918c2d6d3e7748c2..93adf34831994c38c3c2a4198426481eb22fa3fb 100644 >--- a/LayoutTests/platform/chromium/test_expectations.txt >+++ b/LayoutTests/platform/chromium/test_expectations.txt >@@ -3024,9 +3024,6 @@ BUGWK73865 : media/track/text-track-is-reachable.html = TEXT CRASH > BUGWK81402 WIN : media/track/track-active-cues.html = PASS TIMEOUT > BUGWK83882 : media/track/track-mode.html = PASS TEXT TIMEOUT > >-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT >-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT >- > BUGWK72271 SNOWLEOPARD DEBUG : fast/dom/node-iterator-reference-node-moved-crash.html = PASS CRASH > > BUGWK72376 WIN : fast/forms/file/input-file-label.html = TEXT PASS >diff --git a/LayoutTests/platform/efl/test_expectations.txt b/LayoutTests/platform/efl/test_expectations.txt >index a41c70a6f6d2edf43635451a72fe8ddbb68a3a35..992e2f904cb18e0b25ca6f370625c96b8bfd9931 100644 >--- a/LayoutTests/platform/efl/test_expectations.txt >+++ b/LayoutTests/platform/efl/test_expectations.txt >@@ -70,10 +70,6 @@ BUGWKEFL SKIP : http/tests/misc/link-rel-prefetch-and-subresource.html = FAIL > BUGWKEFL SKIP : http/tests/misc/prefetch-purpose.html = FAIL > BUGWKEFL SKIP : loader/reload-subresource-when-type-changes.html = FAIL > >-// Seems to fail on mac as well >-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT >-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT TEXT >- > // Perf tests are way too slow on debug builds. > WONTFIX DEBUG : perf/adding-radio-buttons.html = FAIL PASS > WONTFIX DEBUG : perf/array-binary-search.html = FAIL PASS >diff --git a/LayoutTests/platform/mac/test_expectations.txt b/LayoutTests/platform/mac/test_expectations.txt >index 4387e4f9bf0606fc98914f53eb18d64b2be9f2ee..68a9d39c575a4d2d6053e44a0bbaaf124131af00 100644 >--- a/LayoutTests/platform/mac/test_expectations.txt >+++ b/LayoutTests/platform/mac/test_expectations.txt >@@ -213,9 +213,6 @@ BUGWK85565 : fast/css/border-solid-single-edge-antialias.html = IMAGE > // Interferes with the tests that should pass > BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT > >-BUGWK85990 : media/video-controls-rendering-toggle-display-none.html = TEXT >-BUGWK85990 : media/video-controls-toggling.html = TIMEOUT TEXT >- > BUGWK85308 : ietestcenter/css3/valuesandunits/units-000.htm = IMAGE > BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE >
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 87591
:
144234
|
144238
|
144619