New issue
Advanced search Search tips

Issue 720310 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Task



Sign in to add a comment

Remove the SVGImageElement::needs_loader_uri_update_ flag and associated functionality

Project Member Reported by f...@opera.com, May 10 2017

Issue description

The needs_loader_uri_update_ in SVGImageElement dates back to when 'xml:base' was still a thing, adding a potential dependency on the parent (and hence the element being in the document) to fully/properly resolve the URL of the image.
Since 'xml:base' support has been removed (48008561425234093ba13f9cc1a2ea8657f3a368) we can drop this flag and simplify the URL resolving logic.
While doing this we should probably also check if we can move to a model similar to HTMLImageElement when it comes to when to initiate the fetch of the image data.
 
Labels: PaintTeamTriaged-20170510 BugSource-Team OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
Project Member

Comment 2 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f15abc6c912c395a22c2656a39e9d2c46fba70c8

commit f15abc6c912c395a22c2656a39e9d2c46fba70c8
Author: fs <fs@opera.com>
Date: Thu May 11 10:18:17 2017

Remove the SVGImageElement::needs_loader_uri_update_ flag

Since xml:base is no longer a thing, there's no reason to delay the
resource (image) load until the <image> element is in the document.

Remove the flag and initiate resource loads a way resembling
HTMLImageElement. This means a change in behavior, since it will now be
possible get the load to start before the image is inserted into the
document. The new behavior matches Gecko.

Also clean up the code a bit, remove some unused includes and add a TODO
for the document adopt case.

BUG= 720310 

Review-Url: https://codereview.chromium.org/2868323002
Cr-Commit-Position: refs/heads/master@{#470898}

[add] https://crrev.com/f15abc6c912c395a22c2656a39e9d2c46fba70c8/third_party/WebKit/LayoutTests/svg/dom/image-detached-load.html
[modify] https://crrev.com/f15abc6c912c395a22c2656a39e9d2c46fba70c8/third_party/WebKit/Source/core/svg/SVGImageElement.cpp
[modify] https://crrev.com/f15abc6c912c395a22c2656a39e9d2c46fba70c8/third_party/WebKit/Source/core/svg/SVGImageElement.h

Labels: -OS-Fuchsia
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/51ed691ff63cd64a434bb06ebe5d5a7db23a689e

commit 51ed691ff63cd64a434bb06ebe5d5a7db23a689e
Author: Fredrik Söderquist <fs@opera.com>
Date: Fri Sep 08 20:57:43 2017

Reevaluate SVGImageElement 'href' when moving to a new document

This aligns the behavior of SVGImageElement to that of HTMLImageElement
for when the element is moved to a new document.

Bug:  720310 
Change-Id: I2d78778a40de874fe45b710a0f284ded6cc8b84b
Reviewed-on: https://chromium-review.googlesource.com/657384
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#500655}
[add] https://crrev.com/51ed691ff63cd64a434bb06ebe5d5a7db23a689e/third_party/WebKit/LayoutTests/svg/dom/image-moved-to-new-document.html
[modify] https://crrev.com/51ed691ff63cd64a434bb06ebe5d5a7db23a689e/third_party/WebKit/Source/core/svg/SVGImageElement.cpp

Comment 5 by f...@opera.com, Sep 8 2017

Owner: f...@opera.com
Status: Fixed (was: Available)

Sign in to add a comment