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

Issue 1528843004: Only force preload=none over cellular for http, https, ftp URLs. (Closed)

Created:
5 years ago by DaleCurtis
Modified:
4 years, 1 month ago
Reviewers:
Srirama, philipj_slow
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, nessy, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@media
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only force preload=none over cellular for http, https, ftp URLs. There's no reason to force a limited preload for local or in memory resources. This is important for WebView applications which may have substantial content locally. BUG=516766 TEST=new layout test, moved existing ones into http.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Update. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -6 lines) Patch
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 chunks +3 lines, -6 lines 1 comment Download

Messages

Total messages: 11 (2 generated)
DaleCurtis
WDYT?
5 years ago (2015-12-15 20:07:18 UTC) #2
philipj_slow
Some ideas. I've been meaning to clean up the HTML spec around preload for a ...
5 years ago (2015-12-16 14:39:05 UTC) #3
Srirama
https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1911 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1911: // Force preload to none for cellular connections for ...
5 years ago (2015-12-16 14:54:12 UTC) #5
philipj_slow
https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1911 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1911: // Force preload to none for cellular connections for ...
5 years ago (2015-12-16 15:25:31 UTC) #6
Srirama
On 2015/12/16 15:25:31, philipj wrote: > https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp > File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): > > https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode1911 > ...
5 years ago (2015-12-16 16:39:26 UTC) #7
DaleCurtis
Won't have time to look at this again until January. Happy holidays! https://codereview.chromium.org/1528843004/diff/1/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ...
5 years ago (2015-12-17 00:02:19 UTC) #8
philipj_slow
On 2015/12/17 00:02:19, DaleCurtis_OOO_Until_Jan_5 wrote: > Won't have time to look at this again until ...
5 years ago (2015-12-17 15:34:16 UTC) #9
DaleCurtis
Oof, finally got back to this. Haven't updated the tests yet, but is this what ...
4 years, 9 months ago (2016-03-19 01:27:19 UTC) #10
philipj_slow
4 years, 9 months ago (2016-03-21 11:59:37 UTC) #11
https://codereview.chromium.org/1528843004/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right):

https://codereview.chromium.org/1528843004/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:1011: } else if
(networkStateNotifier().isCellularConnectionType() &&
(m_currentSrc.protocolIsInHTTPFamily() || m_currentSrc.protocolIs("ftp"))) {
OK, so since we last discussed this, srirama@ has done some refactoring so that
effectivePreloadType() is now the single source of truth for preload. So you
should be able to simply move these bits into effectivePreloadType(), which
would also make it very clear how it interacts with autoplay and the
m_ignorePreloadNone state. (I assume that preload should not matter, but that
m_ignorePreloadNone should take precedent, so some reshuffling will be needed.)

If the log message is important, maybe effectivePreloadType() could take an
extra out argument to say why preload was none. Seems like overkill, though.

Powered by Google App Engine
This is Rietveld 408576698