|
Add support for media attribute on link
This CL adds support to the `media` attribute on link preload tags and
equivalent Link headers. It avoids preloading the resources when media
does not match.
In order to accurately do that, even when preload is in the headers, and
the actual viewport definition is in markup, this CL delays the Link
preload header processing until the prelodScanner processed the first chunk,
gets the ViewportDescription from the preloadScanner, and applies it
before determining if a resource should be preloaded.
BUG= 590188
Committed: https://crrev.com/bab2e5a737dae7594d25d90bf27965590d3406b3
Cr-Commit-Position: refs/heads/master@{#382603}
Total comments: 1
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+291 lines, -123 lines) |
Patch |
 |
A |
third_party/WebKit/LayoutTests/http/tests/linkHeader/link-preload-in-iframe.html
|
View
|
1
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/linkHeader/resources/iframe-link-headers.php
|
View
|
1
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/preload/meta-viewport-link-headers.html
|
View
|
1
2
3
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/LayoutTests/http/tests/preload/resources/media-link-headers.php
|
View
|
1
2
3
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/MediaValues.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/MediaValuesCached.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/MediaValuesCached.cpp
|
View
|
1
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/MediaValuesDynamic.h
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/MediaValuesDynamic.cpp
|
View
|
1
|
3 chunks |
+24 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/HTMLLinkElement.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
|
View
|
1
2
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
|
View
|
1
2
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+16 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
|
View
|
|
4 chunks |
+13 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
|
View
|
1
2
|
7 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/DocumentLoader.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkHeader.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkHeader.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkHeaderTest.cpp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+49 lines, -44 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkLoader.h
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkLoader.cpp
|
View
|
1
2
3
4
|
7 chunks |
+25 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
|
View
|
1
2
3
4
|
4 chunks |
+35 lines, -27 lines |
0 comments
|
Download
|
Total messages: 24 (6 generated)
|