Changeset 146992 in webkit
- Timestamp:
- Mar 27, 2013 9:43:02 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r146986 r146992 1 2013-03-27 Jer Noble <jer.noble@apple.com> 2 3 Mac: Media Controls always hide time display elements 4 https://bugs.webkit.org/show_bug.cgi?id=113355 5 6 Reviewed by Eric Carlson. 7 8 Rebaseline mac results. 9 10 * platform/mac/media/audio-controls-rendering-expected.png: 11 * platform/mac/media/audio-controls-rendering-expected.txt: 12 * platform/mac/media/controls-after-reload-expected.png: 13 * platform/mac/media/controls-after-reload-expected.txt: 14 * platform/mac/media/controls-strict-expected.png: 15 * platform/mac/media/controls-strict-expected.txt: 16 * platform/mac/media/controls-styling-strict-expected.png: Added. 17 * platform/mac/media/controls-styling-strict-expected.txt: 18 * platform/mac/media/controls-without-preload-expected.png: 19 * platform/mac/media/controls-without-preload-expected.txt: 20 * platform/mac/media/video-controls-rendering-expected.png: 21 * platform/mac/media/video-controls-rendering-expected.txt: 22 * platform/mac/media/video-display-toggle-expected.png: 23 * platform/mac/media/video-display-toggle-expected.txt: 24 * platform/mac/media/video-no-audio-expected.png: 25 * platform/mac/media/video-no-audio-expected.txt: 26 * platform/mac/media/video-playing-and-pause-expected.png: 27 * platform/mac/media/video-playing-and-pause-expected.txt: 28 1 29 2013-03-27 Chris Fleizach <cfleizach@apple.com> 2 30 -
trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt
r145588 r146992 36 36 RenderButton {INPUT} at (32,4) size 16x17 37 37 RenderFlexibleBox {DIV} at (49,5) size 246x15 38 RenderSlider {INPUT} at ( 0,2) size 246x1339 RenderFlexibleBox {DIV} at (0,0) size 246x1340 RenderBlock {DIV} at (0,2) size 246x938 RenderSlider {INPUT} at (45,2) size 156x13 39 RenderFlexibleBox {DIV} at (0,0) size 156x13 40 RenderBlock {DIV} at (0,2) size 156x9 41 41 RenderBlock {DIV} at (0,0) size 10x8 42 42 RenderBlock {DIV} at (295,6) size 25x13 43 layer at (57,92) size 45x11 44 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 45 RenderBlock (anonymous) at (9,0) size 27x11 46 RenderText {#text} at (0,0) size 26x11 47 text run at (0,0) width 26: "00:00" 48 layer at (258,92) size 45x11 49 RenderFlexibleBox {DIV} at (201,2) size 45x11 [color=#FFFFFF] 50 RenderBlock (anonymous) at (7,0) size 31x11 51 RenderText {#text} at (0,0) size 31x11 52 text run at (0,0) width 31: "-00:07" 43 53 layer at (305,92) size 14x12 44 54 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 … … 52 62 RenderButton {INPUT} at (32,4) size 16x17 53 63 RenderFlexibleBox {DIV} at (49,5) size 246x15 54 RenderSlider {INPUT} at ( 0,2) size 246x1355 RenderFlexibleBox {DIV} at (0,0) size 246x1356 RenderBlock {DIV} at (0,2) size 246x964 RenderSlider {INPUT} at (45,2) size 156x13 65 RenderFlexibleBox {DIV} at (0,0) size 156x13 66 RenderBlock {DIV} at (0,2) size 156x9 57 67 RenderBlock {DIV} at (0,0) size 10x8 58 68 RenderBlock {DIV} at (295,6) size 25x13 69 layer at (57,210) size 45x11 70 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 71 RenderBlock (anonymous) at (9,0) size 27x11 72 RenderText {#text} at (0,0) size 26x11 73 text run at (0,0) width 26: "00:00" 74 layer at (258,210) size 45x11 75 RenderFlexibleBox {DIV} at (201,2) size 45x11 [color=#FFFFFF] 76 RenderBlock (anonymous) at (7,0) size 31x11 77 RenderText {#text} at (0,0) size 31x11 78 text run at (0,0) width 31: "-00:07" 59 79 layer at (305,210) size 14x12 60 80 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt
r145588 r146992 18 18 RenderButton {INPUT} at (32,4) size 16x17 19 19 RenderFlexibleBox {DIV} at (49,5) size 216x15 20 RenderSlider {INPUT} at ( 0,2) size 216x1321 RenderFlexibleBox {DIV} at (0,0) size 216x1322 RenderBlock {DIV} at (0,2) size 216x920 RenderSlider {INPUT} at (45,2) size 126x13 21 RenderFlexibleBox {DIV} at (0,0) size 126x13 22 RenderBlock {DIV} at (0,2) size 126x9 23 23 RenderBlock {DIV} at (0,0) size 10x8 24 24 RenderButton {INPUT} at (297,4) size 16x17 25 25 RenderBlock {DIV} at (265,6) size 25x13 26 layer at (57,264) size 45x11 27 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 28 RenderBlock (anonymous) at (9,0) size 27x11 29 RenderText {#text} at (0,0) size 26x11 30 text run at (0,0) width 26: "00:00" 31 layer at (228,264) size 45x11 32 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 33 RenderBlock (anonymous) at (7,0) size 31x11 34 RenderText {#text} at (0,0) size 31x11 35 text run at (0,0) width 31: "-00:06" 26 36 layer at (275,264) size 14x12 27 37 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt
r145588 r146992 18 18 RenderButton {INPUT} at (32,4) size 16x17 19 19 RenderFlexibleBox {DIV} at (49,5) size 216x15 20 RenderSlider {INPUT} at ( 0,2) size 216x1321 RenderFlexibleBox {DIV} at (0,0) size 216x1322 RenderBlock {DIV} at (0,2) size 216x920 RenderSlider {INPUT} at (45,2) size 126x13 21 RenderFlexibleBox {DIV} at (0,0) size 126x13 22 RenderBlock {DIV} at (0,2) size 126x9 23 23 RenderBlock {DIV} at (0,0) size 10x8 24 24 RenderButton {INPUT} at (297,4) size 16x17 25 25 RenderBlock {DIV} at (265,6) size 25x13 26 layer at (57,272) size 45x11 27 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 28 RenderBlock (anonymous) at (9,0) size 27x11 29 RenderText {#text} at (0,0) size 26x11 30 text run at (0,0) width 26: "00:00" 31 layer at (228,272) size 45x11 32 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 33 RenderBlock (anonymous) at (7,0) size 31x11 34 RenderText {#text} at (0,0) size 31x11 35 text run at (0,0) width 31: "-00:06" 26 36 layer at (275,272) size 14x12 27 37 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt
r145588 r146992 22 22 RenderButton {INPUT} at (32,4) size 16x17 23 23 RenderFlexibleBox {DIV} at (49,5) size 216x15 24 RenderSlider {INPUT} at ( 0,2) size 216x1325 RenderFlexibleBox {DIV} at (0,0) size 216x1326 RenderBlock {DIV} at (0,2) size 216x924 RenderSlider {INPUT} at (45,2) size 126x13 25 RenderFlexibleBox {DIV} at (0,0) size 126x13 26 RenderBlock {DIV} at (0,2) size 126x9 27 27 RenderBlock {DIV} at (0,0) size 10x8 28 28 RenderButton {INPUT} at (297,4) size 16x17 29 29 RenderBlock {DIV} at (265,6) size 25x13 30 layer at (57,272) size 45x11 31 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 32 RenderBlock (anonymous) at (9,0) size 27x11 33 RenderText {#text} at (0,0) size 26x11 34 text run at (0,0) width 26: "00:00" 35 layer at (228,272) size 45x11 36 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 37 RenderBlock (anonymous) at (7,0) size 31x11 38 RenderText {#text} at (0,0) size 31x11 39 text run at (0,0) width 31: "-00:06" 30 40 layer at (275,272) size 14x12 31 41 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 … … 37 47 RenderButton {INPUT} at (32,4) size 16x17 38 48 RenderFlexibleBox {DIV} at (49,5) size 216x15 39 RenderSlider {INPUT} at ( 0,2) size 216x1340 RenderFlexibleBox {DIV} at (0,0) size 216x1341 RenderBlock {DIV} at (0,2) size 216x949 RenderSlider {INPUT} at (45,2) size 126x13 50 RenderFlexibleBox {DIV} at (0,0) size 126x13 51 RenderBlock {DIV} at (0,2) size 126x9 42 52 RenderBlock {DIV} at (0,0) size 10x8 43 53 RenderButton {INPUT} at (297,4) size 16x17 44 54 RenderBlock {DIV} at (265,6) size 25x13 55 layer at (381,272) size 45x11 56 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 57 RenderBlock (anonymous) at (9,0) size 27x11 58 RenderText {#text} at (0,0) size 26x11 59 text run at (0,0) width 26: "00:00" 60 layer at (552,272) size 45x11 61 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 62 RenderBlock (anonymous) at (7,0) size 31x11 63 RenderText {#text} at (0,0) size 31x11 64 text run at (0,0) width 31: "-00:06" 45 65 layer at (599,272) size 14x12 46 66 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt
r145588 r146992 18 18 RenderButton {INPUT} at (32,4) size 16x17 19 19 RenderFlexibleBox {DIV} at (49,5) size 216x15 20 RenderSlider {INPUT} at ( 0,2) size 216x1321 RenderFlexibleBox {DIV} at (0,0) size 216x1322 RenderBlock {DIV} at (0,2) size 216x920 RenderSlider {INPUT} at (45,2) size 126x13 21 RenderFlexibleBox {DIV} at (0,0) size 126x13 22 RenderBlock {DIV} at (0,2) size 126x9 23 23 RenderBlock {DIV} at (0,0) size 10x8 24 24 RenderButton {INPUT} at (297,4) size 16x17 25 25 RenderBlock {DIV} at (265,6) size 25x13 26 layer at (57,264) size 45x11 27 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 28 RenderBlock (anonymous) at (9,0) size 27x11 29 RenderText {#text} at (0,0) size 26x11 30 text run at (0,0) width 26: "00:00" 31 layer at (228,264) size 45x11 32 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 33 RenderBlock (anonymous) at (7,0) size 31x11 34 RenderText {#text} at (0,0) size 31x11 35 text run at (0,0) width 31: "-00:06" 26 36 layer at (275,264) size 14x12 27 37 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
r145588 r146992 23 23 RenderButton {INPUT} at (32,4) size 16x17 24 24 RenderFlexibleBox {DIV} at (49,5) size 216x15 25 RenderSlider {INPUT} at ( 0,2) size 216x1326 RenderFlexibleBox {DIV} at (0,0) size 216x1327 RenderBlock {DIV} at (0,2) size 216x925 RenderSlider {INPUT} at (45,2) size 126x13 26 RenderFlexibleBox {DIV} at (0,0) size 126x13 27 RenderBlock {DIV} at (0,2) size 126x9 28 28 RenderBlock {DIV} at (0,0) size 10x8 29 29 RenderButton {INPUT} at (297,4) size 16x17 30 30 RenderBlock {DIV} at (265,6) size 25x13 31 layer at (57,264) size 45x11 32 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 33 RenderBlock (anonymous) at (9,0) size 27x11 34 RenderText {#text} at (0,0) size 26x11 35 text run at (0,0) width 26: "00:00" 36 layer at (228,264) size 45x11 37 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 38 RenderBlock (anonymous) at (7,0) size 31x11 39 RenderText {#text} at (0,0) size 31x11 40 text run at (0,0) width 31: "-00:06" 31 41 layer at (275,264) size 14x12 32 42 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 … … 38 48 RenderButton {INPUT} at (32,4) size 16x17 39 49 RenderFlexibleBox {DIV} at (49,5) size 216x15 40 RenderSlider {INPUT} at ( 0,2) size 216x1341 RenderFlexibleBox {DIV} at (0,0) size 216x1342 RenderBlock {DIV} at (0,2) size 216x950 RenderSlider {INPUT} at (45,2) size 126x13 51 RenderFlexibleBox {DIV} at (0,0) size 126x13 52 RenderBlock {DIV} at (0,2) size 126x9 43 53 RenderBlock {DIV} at (0,0) size 10x8 44 54 RenderButton {INPUT} at (297,4) size 16x17 45 55 RenderBlock {DIV} at (265,6) size 25x13 56 layer at (57,504) size 45x11 57 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 58 RenderBlock (anonymous) at (9,0) size 27x11 59 RenderText {#text} at (0,0) size 26x11 60 text run at (0,0) width 26: "00:00" 61 layer at (228,504) size 45x11 62 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 63 RenderBlock (anonymous) at (7,0) size 31x11 64 RenderText {#text} at (0,0) size 31x11 65 text run at (0,0) width 31: "-00:06" 46 66 layer at (275,504) size 14x12 47 67 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 … … 55 75 RenderButton {INPUT} at (32,4) size 16x17 56 76 RenderFlexibleBox {DIV} at (49,5) size 216x15 57 RenderSlider {INPUT} at ( 0,2) size 216x1358 RenderFlexibleBox {DIV} at (0,0) size 216x1359 RenderBlock {DIV} at (0,2) size 216x977 RenderSlider {INPUT} at (45,2) size 126x13 78 RenderFlexibleBox {DIV} at (0,0) size 126x13 79 RenderBlock {DIV} at (0,2) size 126x9 60 80 RenderBlock {DIV} at (0,0) size 10x8 61 81 RenderButton {INPUT} at (297,4) size 16x17 62 82 RenderBlock {DIV} at (265,6) size 25x13 83 layer at (57,744) size 45x11 84 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 85 RenderBlock (anonymous) at (9,0) size 27x11 86 RenderText {#text} at (0,0) size 26x11 87 text run at (0,0) width 26: "00:00" 88 layer at (228,744) size 45x11 89 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 90 RenderBlock (anonymous) at (7,0) size 31x11 91 RenderText {#text} at (0,0) size 31x11 92 text run at (0,0) width 31: "-00:06" 63 93 layer at (275,744) size 14x12 64 94 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/video-display-toggle-expected.txt
r145588 r146992 17 17 RenderButton {INPUT} at (32,4) size 16x17 18 18 RenderFlexibleBox {DIV} at (49,5) size 216x15 19 RenderSlider {INPUT} at ( 0,2) size 216x1320 RenderFlexibleBox {DIV} at (0,0) size 216x1321 RenderBlock {DIV} at (0,2) size 216x919 RenderSlider {INPUT} at (45,2) size 126x13 20 RenderFlexibleBox {DIV} at (0,0) size 126x13 21 RenderBlock {DIV} at (0,2) size 126x9 22 22 RenderBlock {DIV} at (0,0) size 10x8 23 23 RenderButton {INPUT} at (297,4) size 16x17 24 24 RenderBlock {DIV} at (265,6) size 25x13 25 layer at (57,248) size 45x11 26 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 27 RenderBlock (anonymous) at (9,0) size 27x11 28 RenderText {#text} at (0,0) size 26x11 29 text run at (0,0) width 26: "00:00" 30 layer at (228,248) size 45x11 31 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 32 RenderBlock (anonymous) at (7,0) size 31x11 33 RenderText {#text} at (0,0) size 31x11 34 text run at (0,0) width 31: "-00:06" 25 35 layer at (275,248) size 14x12 26 36 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/LayoutTests/platform/mac/media/video-no-audio-expected.txt
r145588 r146992 18 18 RenderButton {INPUT} at (32,4) size 16x17 19 19 RenderFlexibleBox {DIV} at (49,5) size 273x15 20 RenderSlider {INPUT} at ( 0,2) size 273x1321 RenderFlexibleBox {DIV} at (0,0) size 273x1322 RenderBlock {DIV} at (0,2) size 273x920 RenderSlider {INPUT} at (45,2) size 183x13 21 RenderFlexibleBox {DIV} at (0,0) size 183x13 22 RenderBlock {DIV} at (0,2) size 183x9 23 23 RenderBlock {DIV} at (0,0) size 10x8 24 24 RenderButton {INPUT} at (329,4) size 16x17 25 25 RenderBlock {DIV} at (322,12) size 0x1 26 layer at (57,312) size 45x11 27 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 28 RenderBlock (anonymous) at (9,0) size 27x11 29 RenderText {#text} at (0,0) size 26x11 30 text run at (0,0) width 26: "00:00" 31 layer at (285,312) size 45x11 32 RenderFlexibleBox {DIV} at (228,2) size 45x11 [color=#FFFFFF] 33 RenderBlock (anonymous) at (7,0) size 31x11 34 RenderText {#text} at (0,0) size 31x11 35 text run at (0,0) width 31: "-00:09" -
trunk/LayoutTests/platform/mac/media/video-playing-and-pause-expected.txt
r145588 r146992 19 19 RenderButton {INPUT} at (32,4) size 16x17 20 20 RenderFlexibleBox {DIV} at (49,5) size 216x15 21 RenderSlider {INPUT} at ( 0,2) size 216x1322 RenderFlexibleBox {DIV} at (0,0) size 216x1323 RenderBlock {DIV} at (0,2) size 216x921 RenderSlider {INPUT} at (45,2) size 126x13 22 RenderFlexibleBox {DIV} at (0,0) size 126x13 23 RenderBlock {DIV} at (0,2) size 126x9 24 24 RenderBlock {DIV} at (0,0) size 10x8 25 25 RenderButton {INPUT} at (297,4) size 16x17 26 26 RenderBlock {DIV} at (265,6) size 25x13 27 layer at (57,290) size 45x11 28 RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF] 29 RenderBlock (anonymous) at (9,0) size 27x11 30 RenderText {#text} at (0,0) size 26x11 31 text run at (0,0) width 26: "00:00" 32 layer at (228,290) size 45x11 33 RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF] 34 RenderBlock (anonymous) at (7,0) size 31x11 35 RenderText {#text} at (0,0) size 31x11 36 text run at (0,0) width 31: "-00:06" 27 37 layer at (275,290) size 14x12 28 38 RenderButton zI: 1 {INPUT} at (2,0) size 14x12 -
trunk/Source/WebCore/ChangeLog
r146987 r146992 1 2013-03-26 Jer Noble <jer.noble@apple.com> 2 3 Mac: Media Controls always hide time display elements 4 https://bugs.webkit.org/show_bug.cgi?id=113355 5 6 Reviewed by Eric Carlson. 7 8 No new tests; rebaselined existing tests against correct behavior. 9 10 A prior commit set the "min-width:0" property on the time display elements, which, combined 11 with the "-webkit-flex-box:0 0" setting, caused the flex-box container to collapse the width 12 of the elements to zero. To achieve the desired effect of hiding the time display elements, 13 first set the elements' min-width to the desired width, as the new flex-box spec treats the 14 default value of "min-width:auto" as the intrinsic width, and will collapse the text display 15 elements to the intrinsic width of its contained text node. 16 17 The above allows the timeline container to collapse beyond the sum of its childrens' 18 intrinsic width. Create a custom renderer that detects when this happens, and hide the time 19 display controls. 20 21 * css/mediaControls.css: 22 * css/mediaControlsQuickTime.css: 23 (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 24 Set the "min-width:" property to equal the "width:" property. 25 (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): 26 Ditto. 27 * css/mediaControlsChromium.css: 28 (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): 29 Chromium assumes the time display controls are flex-boxes, so make that explicit. 30 * html/shadow/MediaControlElementTypes.cpp: Removed MediaControlTimeDisplayElement::createRenderer(). 31 * html/shadow/MediaControlElementTypes.h: 32 (MediaControlTimeDisplayElement): Ditto. 33 * html/shadow/MediaControlElements.cpp: 34 (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden): Added, walks through the 35 container's children and shows or hides time display elements. 36 (WebCore::MediaControlTimelineContainerElement::createRenderer): Added, creates a RenderMediaControlTimelineContainer. 37 (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to 38 query against children's shadowPseudoId(). 39 (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Moved contents to getMediaControlTimeRemainingDisplayElementShadowPseudoId. 40 (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to 41 query against children's shadowPseudoId(). 42 (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Moved contents to getMediaControlCurrentTimeDisplayElementShadowPseudoId. 43 * html/shadow/MediaControlElements.h: 44 (MediaControlTimelineContainerElement): 45 * rendering/RenderMediaControlElements.cpp: 46 (WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer): Added, simple constructor. 47 (WebCore::RenderMediaControlTimelineContainer::layout): Detect when the controller's width is greater than 48 a certain value, and show or hide the time display elements in response. 49 * rendering/RenderMediaControlElements.h: 50 (RenderMediaControlTimelineContainer): 51 1 52 2013-03-27 Ilya Tikhonovsky <loislo@chromium.org> 2 53 -
trunk/Source/WebCore/css/mediaControlsChromium.css
r142947 r146992 113 113 -webkit-user-select: none; 114 114 -webkit-flex: none; 115 display: block;115 display: -webkit-flex; 116 116 border: none; 117 117 cursor: default; -
trunk/Source/WebCore/css/mediaControlsQuickTime.css
r145588 r146992 83 83 overflow: hidden; 84 84 width: 45px; 85 min-width: 0; /* needed due to flexbox */85 min-width: 45px; 86 86 color: white; 87 87 text-shadow: black 0px 1px 1px; … … 106 106 overflow: hidden; 107 107 width: 45px; 108 min-width: 0; /* needed due to flexbox */108 min-width: 45px; 109 109 color: white; 110 110 text-shadow: black 0px 1px 1px; -
trunk/Source/WebCore/html/shadow/MediaControlElementTypes.cpp
r145818 r146992 160 160 } 161 161 162 RenderObject* MediaControlTimeDisplayElement::createRenderer(RenderArena* arena, RenderStyle*)163 {164 return new (arena) RenderMediaControlTimeDisplay(this);165 }166 167 162 // ---------------------------- 168 163 -
trunk/Source/WebCore/html/shadow/MediaControlElementTypes.h
r136613 r146992 142 142 143 143 private: 144 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;145 146 144 float m_currentValue; 147 145 }; -
trunk/Source/WebCore/html/shadow/MediaControlElements.cpp
r146647 r146992 68 68 using namespace HTMLNames; 69 69 70 static const AtomicString& getMediaControlCurrentTimeDisplayElementShadowPseudoId(); 71 static const AtomicString& getMediaControlTimeRemainingDisplayElementShadowPseudoId(); 72 70 73 #if ENABLE(VIDEO_TRACK) 71 74 static const char* textTracksOffAttrValue = "-1"; // This must match HTMLMediaElement::textTracksOffIndex() … … 317 320 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-timeline-container", AtomicString::ConstructFromLiteral)); 318 321 return id; 322 } 323 324 void MediaControlTimelineContainerElement::setTimeDisplaysHidden(bool hidden) 325 { 326 for (unsigned i = 0; i < childNodeCount(); ++i) { 327 Node* child = childNode(i); 328 if (!child || !child->isElementNode()) 329 continue; 330 Element* element = static_cast<Element*>(child); 331 if (element->shadowPseudoId() != getMediaControlTimeRemainingDisplayElementShadowPseudoId() 332 && element->shadowPseudoId() != getMediaControlCurrentTimeDisplayElementShadowPseudoId()) 333 continue; 334 335 MediaControlTimeDisplayElement* timeDisplay = static_cast<MediaControlTimeDisplayElement*>(element); 336 if (hidden) 337 timeDisplay->hide(); 338 else 339 timeDisplay->show(); 340 } 341 } 342 343 RenderObject* MediaControlTimelineContainerElement::createRenderer(RenderArena* arena, RenderStyle*) 344 { 345 return new (arena) RenderMediaControlTimelineContainer(this); 319 346 } 320 347 … … 1142 1169 } 1143 1170 1171 static const AtomicString& getMediaControlTimeRemainingDisplayElementShadowPseudoId() 1172 { 1173 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-time-remaining-display", AtomicString::ConstructFromLiteral)); 1174 return id; 1175 } 1176 1144 1177 const AtomicString& MediaControlTimeRemainingDisplayElement::shadowPseudoId() const 1145 1178 { 1146 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-time-remaining-display", AtomicString::ConstructFromLiteral)); 1147 return id; 1179 return getMediaControlTimeRemainingDisplayElementShadowPseudoId(); 1148 1180 } 1149 1181 … … 1160 1192 } 1161 1193 1194 static const AtomicString& getMediaControlCurrentTimeDisplayElementShadowPseudoId() 1195 { 1196 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-display", AtomicString::ConstructFromLiteral)); 1197 return id; 1198 } 1199 1162 1200 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() const 1163 1201 { 1164 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-display", AtomicString::ConstructFromLiteral)); 1165 return id; 1202 return getMediaControlCurrentTimeDisplayElementShadowPseudoId(); 1166 1203 } 1167 1204 -
trunk/Source/WebCore/html/shadow/MediaControlElements.h
r146380 r146992 107 107 static PassRefPtr<MediaControlTimelineContainerElement> create(Document*); 108 108 109 void setTimeDisplaysHidden(bool); 110 109 111 private: 110 112 explicit MediaControlTimelineContainerElement(Document*); 111 113 virtual const AtomicString& shadowPseudoId() const OVERRIDE; 114 115 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 112 116 }; 113 117 -
trunk/Source/WebCore/rendering/RenderMediaControlElements.cpp
r142947 r146992 60 60 // ---------------------------- 61 61 62 RenderMediaControlTime Display::RenderMediaControlTimeDisplay(Element* element)62 RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer(Element* element) 63 63 : RenderFlexibleBox(element) 64 64 { … … 69 69 static const int minWidthToDisplayTimeDisplays = 45 + 100 + 45; 70 70 71 void RenderMediaControlTime Display::layout()71 void RenderMediaControlTimelineContainer::layout() 72 72 { 73 73 RenderFlexibleBox::layout(); 74 RenderBox* timelineContainerBox = parentBox();75 while (timelineContainerBox && timelineContainerBox->isAnonymous())76 timelineContainerBox = timelineContainerBox->parentBox();77 74 78 if (timelineContainerBox && timelineContainerBox->width() < minWidthToDisplayTimeDisplays) 79 setWidth(0); 75 LayoutStateDisabler layoutStateDisabler(view()); 76 MediaControlTimelineContainerElement* container = static_cast<MediaControlTimelineContainerElement*>(node()); 77 container->setTimeDisplaysHidden(width().toInt() < minWidthToDisplayTimeDisplays); 80 78 } 81 79 -
trunk/Source/WebCore/rendering/RenderMediaControlElements.h
r142947 r146992 47 47 // ---------------------------- 48 48 49 class RenderMediaControlTime Display: public RenderFlexibleBox {49 class RenderMediaControlTimelineContainer : public RenderFlexibleBox { 50 50 public: 51 RenderMediaControlTime Display(Element*);51 RenderMediaControlTimelineContainer(Element*); 52 52 53 53 private:
Note: See TracChangeset
for help on using the changeset viewer.