|
Support fragment URLs for all kinds of SVG images
Add support for SVG fragment URLs in CSS backgrounds, video poster
images, image inputs and svg:image scenarios.
This patch does so by storing fragment URLs for each
SVGImageForContainer. Previous to this patch the URL was stored in the
SVGImage. This is non-optimal since the same SVGImage represents all
URLs where only the fragment string differ. This required us to update
the URL for each different draw for different containers. This patch
removes the hack in ImageResource::svgImageForLayoutObject which made
this work previously and instead stores the fragment URL in the
SVGImageForContainer.
But just storing the URL in SVGImageForContainer is not enough since
those objects are recreated all the time. See
ImageResource::setContainerParametersForLayoutObject (prior to this
patch named ImageResource::setContainerSizeForLayoutObject). Thus we
also need to store the fragment URLs one level up the ownership
hierarchy from ImageResource: in StyleFetchedImage,
StyleFetchedImageSet and LayoutImageResource. These are the
long-living objects that'll hold the URL fragment over the life-time
of their respective DOM counterparts.
Total comments: 4
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+172 lines, -61 lines) |
Patch |
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-background.html
|
View
|
1
2
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-background-expected.html
|
View
|
1
2
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-background-srcset.html
|
View
|
1
2
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-background-srcset-expected.html
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/svg/css/svg-resource-fragment-identifier-img-src.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/svg/css/svg-resource-fragment-identifier-img-src-expected.html
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-input.html
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-input-expected.html
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-svg-image.html
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-svg-image-expected.html
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-video-poster.html
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/svg/css/svg-resource-fragment-identifier-video-poster-expected.html
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/CSSImageSetValue.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/css/CSSImageValue.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/fetch/DEPS
|
View
|
1
2
3
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ImageResource.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ImageResource.cpp
|
View
|
1
2
|
4 chunks |
+2 lines, -10 lines |
4 comments
|
Download
|
 |
M |
Source/core/html/HTMLImageElement.cpp
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/HTMLVideoElement.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/forms/ImageInputType.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutImageResource.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutImageResource.cpp
|
View
|
|
3 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/loader/ImageLoader.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/loader/ImageLoader.cpp
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/style/StyleFetchedImage.h
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/style/StyleFetchedImage.cpp
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/style/StyleFetchedImageSet.h
|
View
|
|
2 chunks |
+4 lines, -3 lines |
4 comments
|
Download
|
 |
M |
Source/core/style/StyleFetchedImageSet.cpp
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGImageElement.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImage.h
|
View
|
1
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImage.cpp
|
View
|
1
|
6 chunks |
+18 lines, -10 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImageForContainer.h
|
View
|
|
3 chunks |
+6 lines, -4 lines |
1 comment
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImageForContainer.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 37 (8 generated)
|