Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1096)

Issue 1780043002: Add download button to MediaDocument on Android. (Closed)

Created:
4 years, 9 months ago by qinmin
Modified:
4 years, 8 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, jam, kinuko+watch, mlamouri (slow - plz ping), nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add download button to MediaDocument on Android. For a MediaDocument on android, it is not easy to long press the element and download audio. This change adds a download button to the MediaDocument on android. This facilitates user to save the media file locally. UI Review: https://groups.google.com/a/google.com/forum/#!msg/chrome-ui-review/XzyQ2QsVyRE/0x5jU-KECwAJ Mocks: https://folio.googleplex.com/chrome-ux/mocks/065-downloads/06-media/022216_Buttons BUG=590043 Committed: https://crrev.com/20651adff7805d35635fcf6a2be9fd6a1e01b40b Cr-Commit-Position: refs/heads/master@{#385607}

Patch Set 1 #

Total comments: 24

Patch Set 2 : addressing comments #

Patch Set 3 : moving styles to css files #

Total comments: 4

Patch Set 4 : moving css back to MediaDocument #

Total comments: 6

Patch Set 5 : nits #

Total comments: 5

Patch Set 6 : moving css to a style element #

Total comments: 12

Patch Set 7 : using flexbox #

Total comments: 12

Patch Set 8 : nits #

Patch Set 9 : use base::Feature instead of switches #

Total comments: 4

Patch Set 10 : rebase and use shadow root #

Total comments: 4

Patch Set 11 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -20 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/app/strings/content_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/runtime_features.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_features.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_features.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/VirtualTestSuites View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/README.txt View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button.html View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/resources/standalone-audio.html View 1 2 3 4 5 6 7 8 9 1 chunk +52 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/mediaControls.css View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/mediaControlsNew.css View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/html/MediaDocument.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +109 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRuntimeFeatures.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebLocalizedString.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRuntimeFeatures.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (11 generated)
qinmin
philipj@ for media review esprehn@ for WebKit/Source/Platform OWNER jochen@ for content/ OWNER philipj@, you might ...
4 years, 9 months ago (2016-03-09 23:04:02 UTC) #2
philipj_slow
In Opera for Android we've added a download button as part of the media controls ...
4 years, 9 months ago (2016-03-10 06:37:36 UTC) #3
philipj_slow
Here's a screenshot: http://imgur.com/CFHEBSc
4 years, 9 months ago (2016-03-10 06:45:19 UTC) #4
esprehn
I like the opera UI, could we just do that? -- You received this message ...
4 years, 9 months ago (2016-03-10 07:09:30 UTC) #5
esprehn
I like the opera UI, could we just do that? -- You received this message ...
4 years, 9 months ago (2016-03-10 07:10:23 UTC) #6
philipj_slow
In addition to MediaDocument, it would be a straightforward spec change to allow sites to ...
4 years, 9 months ago (2016-03-10 08:48:16 UTC) #7
qinmin
On 2016/03/10 08:48:16, philipj_UTC7 wrote: > In addition to MediaDocument, it would be a straightforward ...
4 years, 9 months ago (2016-03-10 21:21:18 UTC) #8
qinmin
On 2016/03/10 21:21:18, qinmin wrote: > On 2016/03/10 08:48:16, philipj_UTC7 wrote: > > In addition ...
4 years, 9 months ago (2016-03-11 00:19:24 UTC) #9
esprehn
This doesn't seem like the right way to handle this, resize events are async, which ...
4 years, 9 months ago (2016-03-11 00:35:33 UTC) #10
qinmin
On 2016/03/11 00:35:33, esprehn wrote: > This doesn't seem like the right way to handle ...
4 years, 9 months ago (2016-03-11 23:46:42 UTC) #11
qinmin
https://codereview.chromium.org/1780043002/diff/1/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/1/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode74 third_party/WebKit/Source/core/html/MediaDocument.cpp:74: class MediaEventListener : public EventListener { On 2016/03/11 00:35:32, ...
4 years, 9 months ago (2016-03-11 23:50:55 UTC) #12
rune
On 2016/03/11 23:50:55, qinmin wrote: > On 2016/03/11 00:35:33, esprehn wrote: > > missing space, ...
4 years, 9 months ago (2016-03-12 01:20:39 UTC) #13
qinmin
On 2016/03/12 01:20:39, rune wrote: > On 2016/03/11 23:50:55, qinmin wrote: > > > On ...
4 years, 9 months ago (2016-03-13 01:06:08 UTC) #14
qinmin
ping. esprehn@, would you please take a look again? thanks
4 years, 9 months ago (2016-03-15 17:04:06 UTC) #15
esprehn
This makes div and <a> slower for the whole web. We can't put stuff like ...
4 years, 9 months ago (2016-03-15 17:33:07 UTC) #16
qinmin
https://codereview.chromium.org/1780043002/diff/40001/third_party/WebKit/Source/core/css/html.css File third_party/WebKit/Source/core/css/html.css (right): https://codereview.chromium.org/1780043002/diff/40001/third_party/WebKit/Source/core/css/html.css#newcode66 third_party/WebKit/Source/core/css/html.css:66: body:-webkit-full-page-media > div > a { On 2016/03/15 17:33:07, ...
4 years, 9 months ago (2016-03-15 17:52:16 UTC) #17
philipj_slow
On 2016/03/10 21:21:18, qinmin wrote: > On 2016/03/10 08:48:16, philipj_UTC7 wrote: > > In addition ...
4 years, 9 months ago (2016-03-16 08:39:21 UTC) #18
philipj_slow
On 2016/03/11 00:19:24, qinmin wrote: > On 2016/03/10 21:21:18, qinmin wrote: > > On 2016/03/10 ...
4 years, 9 months ago (2016-03-16 08:40:08 UTC) #19
qinmin
On 2016/03/16 08:40:08, philipj_UTC7 wrote: > On 2016/03/11 00:19:24, qinmin wrote: > > On 2016/03/10 ...
4 years, 9 months ago (2016-03-16 16:31:06 UTC) #20
qinmin
On 2016/03/16 16:31:06, qinmin wrote: > On 2016/03/16 08:40:08, philipj_UTC7 wrote: > > On 2016/03/11 ...
4 years, 9 months ago (2016-03-16 16:41:34 UTC) #21
qinmin
On 2016/03/16 16:41:34, qinmin wrote: > On 2016/03/16 16:31:06, qinmin wrote: > > On 2016/03/16 ...
4 years, 9 months ago (2016-03-17 21:04:47 UTC) #22
qinmin
+wangxianzhu for core/ OWNER
4 years, 9 months ago (2016-03-17 21:10:25 UTC) #24
Xianzhu
https://codereview.chromium.org/1780043002/diff/60001/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/60001/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode106 third_party/WebKit/Source/core/html/MediaDocument.cpp:106: div->setAttribute( Add a comment about why you inline these ...
4 years, 9 months ago (2016-03-17 21:49:22 UTC) #25
qinmin
+aelias for public/ OWNER
4 years, 9 months ago (2016-03-17 21:50:07 UTC) #27
aelias_OOO_until_Jul13
third_party/WebKit/public/ lgtm
4 years, 9 months ago (2016-03-17 22:04:26 UTC) #28
qinmin
https://codereview.chromium.org/1780043002/diff/60001/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/60001/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode106 third_party/WebKit/Source/core/html/MediaDocument.cpp:106: div->setAttribute( On 2016/03/17 21:49:21, Xianzhu wrote: > Add a ...
4 years, 9 months ago (2016-03-17 22:07:59 UTC) #29
Xianzhu
third_party/WebKit/Source/core lgtm.
4 years, 9 months ago (2016-03-17 22:09:31 UTC) #30
qinmin
On 2016/03/17 22:09:31, Xianzhu wrote: > third_party/WebKit/Source/core lgtm. jochen@, would you please take a look ...
4 years, 9 months ago (2016-03-17 22:19:28 UTC) #31
esprehn
ojan@ Can you help them with flexbox here or something? This negative margin and transform ...
4 years, 9 months ago (2016-03-18 05:19:39 UTC) #33
qinmin
I tried flex, and it didn't really work in this case for 2 reasons: 1. ...
4 years, 9 months ago (2016-03-18 06:52:40 UTC) #34
qinmin
I tried flex, and it didn't really work in this case for 2 reasons: 1. ...
4 years, 9 months ago (2016-03-18 06:52:40 UTC) #35
qinmin
To use flex, i think we can either: 1. Center the video element with flex ...
4 years, 9 months ago (2016-03-18 07:24:22 UTC) #36
qinmin
PTAL again. Thanks. esprehn@, i have included the w3c example in the comments. jochen@, please ...
4 years, 9 months ago (2016-03-18 19:42:03 UTC) #37
esprehn
You should be able to use align-items and align-content to center with flexbox. https://codereview.chromium.org/1780043002/diff/100001/third_party/WebKit/Source/core/html/MediaDocument.cpp File ...
4 years, 9 months ago (2016-03-22 18:11:21 UTC) #38
ojan
I said this over IM as well, but I think you can use flexboxes here ...
4 years, 9 months ago (2016-03-22 20:13:39 UTC) #39
ojan
Whoops. As discussed on IM, I messed up my test case when cleaning it up. ...
4 years, 9 months ago (2016-03-23 05:11:10 UTC) #40
qinmin
Thanks ojan@ for the awesome "min-height: min-content" trick. esprehn@, PTAL again. https://codereview.chromium.org/1780043002/diff/100001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button.html File third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button.html (right): ...
4 years, 9 months ago (2016-03-24 18:51:19 UTC) #41
esprehn
lgtm w/ nits fixed. https://codereview.chromium.org/1780043002/diff/120001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html File third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html (right): https://codereview.chromium.org/1780043002/diff/120001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html#newcode1 third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html:1: <script src="../../../../resources/run-after-layout-and-paint.js"></script> missing doctype https://codereview.chromium.org/1780043002/diff/120001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button.html ...
4 years, 8 months ago (2016-03-29 05:10:31 UTC) #42
qinmin
https://codereview.chromium.org/1780043002/diff/120001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html File third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html (right): https://codereview.chromium.org/1780043002/diff/120001/third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html#newcode1 third_party/WebKit/LayoutTests/virtual/android/media/mediadocument/media-document-with-download-button-expected.html:1: <script src="../../../../resources/run-after-layout-and-paint.js"></script> On 2016/03/29 05:10:31, esprehn wrote: > missing ...
4 years, 8 months ago (2016-03-29 19:23:37 UTC) #43
jochen (gone - plz use gerrit)
do you expect to use this switch on anything but android? If not, why not ...
4 years, 8 months ago (2016-03-30 16:32:51 UTC) #45
qinmin
On 2016/03/30 16:32:51, jochen wrote: > do you expect to use this switch on anything ...
4 years, 8 months ago (2016-03-31 00:06:43 UTC) #46
qinmin
4 years, 8 months ago (2016-03-31 00:07:12 UTC) #48
Ilya Sherman
Metrics LGTM % comment: https://codereview.chromium.org/1780043002/diff/180001/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/180001/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode60 third_party/WebKit/Source/core/html/MediaDocument.cpp:60: }; Please document that this ...
4 years, 8 months ago (2016-03-31 00:34:59 UTC) #49
jochen (gone - plz use gerrit)
lgtm with better strings https://codereview.chromium.org/1780043002/diff/180001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1780043002/diff/180001/chrome/app/generated_resources.grd#newcode5686 chrome/app/generated_resources.grd:5686: + Download button on MediaDocument. ...
4 years, 8 months ago (2016-03-31 15:16:13 UTC) #50
qinmin
per discussions on blink-dev, slightly changed the MediaDocument.cpp to put the div and anchor elements ...
4 years, 8 months ago (2016-04-06 17:27:13 UTC) #51
esprehn
https://codereview.chromium.org/1780043002/diff/200001/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/200001/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode115 third_party/WebKit/Source/core/html/MediaDocument.cpp:115: if (event->type() == EventTypeNames::click && !m_clicked) { Why do ...
4 years, 8 months ago (2016-04-06 17:32:08 UTC) #52
Xianzhu
On 2016/04/06 17:27:13, qinmin wrote: > per discussions on blink-dev, slightly changed the MediaDocument.cpp to ...
4 years, 8 months ago (2016-04-06 17:32:46 UTC) #53
qinmin
https://codereview.chromium.org/1780043002/diff/200001/third_party/WebKit/Source/core/html/MediaDocument.cpp File third_party/WebKit/Source/core/html/MediaDocument.cpp (right): https://codereview.chromium.org/1780043002/diff/200001/third_party/WebKit/Source/core/html/MediaDocument.cpp#newcode115 third_party/WebKit/Source/core/html/MediaDocument.cpp:115: if (event->type() == EventTypeNames::click && !m_clicked) { On 2016/04/06 ...
4 years, 8 months ago (2016-04-06 19:40:29 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780043002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780043002/220001
4 years, 8 months ago (2016-04-06 19:41:09 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/200711)
4 years, 8 months ago (2016-04-06 22:46:03 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780043002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780043002/220001
4 years, 8 months ago (2016-04-06 23:28:13 UTC) #61
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 8 months ago (2016-04-07 01:05:38 UTC) #62
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 01:07:11 UTC) #64
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/20651adff7805d35635fcf6a2be9fd6a1e01b40b
Cr-Commit-Position: refs/heads/master@{#385607}

Powered by Google App Engine
This is Rietveld 408576698