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

Issue 375923002: Don't dispatch '(SVG)load' to ancestors of <svg:image> after doc. 'load' (Closed)

Created:
6 years, 5 months ago by fs
Modified:
6 years, 5 months ago
Reviewers:
pdr.
CC:
blink-reviews, krit, fs, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, Stephen Chennney, kouhei+svg_chromium.org, pdr., rwlbuis
Project:
blink
Visibility:
Public.

Description

Don't dispatch '(SVG)load' to ancestors of <svg:image> after doc. 'load' When an <svg:image> is inserted after document load has been dispatched, we don't want to dispatch 'load' again to any ancestor 'svg' roots (inner or outer). Hence only dispatch an event to the element itself in this condition. Take the opportunity to clean up SVGElement::sendSVGLoadEventIfPossible a bit, by splitting it into send-to-self and send-to-self-and-ancestors methods (most callers call the former). Also unravel the control-flow of the ancestors-version a bit compared to the old version. BUG=372946 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177814

Patch Set 1 #

Total comments: 3

Patch Set 2 : Recursion-based sendSVG...AncestorChain...; Additional tests. #

Total comments: 4

Patch Set 3 : Drop assert_true; use toSVGElement. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -30 lines) Patch
A LayoutTests/svg/custom/image-svgload-after-docload.html View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/load-image-removed-in-onload.html View 1 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/load-image-reparented-in-onload.html View 1 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/load-svgfragments-inserted-after-docload.html View 1 chunk +51 lines, -0 lines 0 comments Download
M Source/core/svg/SVGElement.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/svg/SVGElement.cpp View 1 2 1 chunk +29 lines, -26 lines 0 comments Download
M Source/core/svg/SVGImageLoader.cpp View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
fs
(Split+cleanup might hide the fix more than necessary - I can split those two out ...
6 years, 5 months ago (2014-07-08 18:11:00 UTC) #1
pdr.
This is fantastic! LGTM on the idea in general. Lets do one more round though. ...
6 years, 5 months ago (2014-07-08 18:57:34 UTC) #2
fs
https://codereview.chromium.org/375923002/diff/1/Source/core/svg/SVGElement.cpp File Source/core/svg/SVGElement.cpp (right): https://codereview.chromium.org/375923002/diff/1/Source/core/svg/SVGElement.cpp#newcode866 Source/core/svg/SVGElement.cpp:866: RefPtrWillBeRawPtr<Element> parent = currentTarget->parentOrShadowHostElement(); On 2014/07/08 18:57:34, pdr wrote: ...
6 years, 5 months ago (2014-07-09 07:39:33 UTC) #3
fs
https://codereview.chromium.org/375923002/diff/1/Source/core/svg/SVGElement.cpp File Source/core/svg/SVGElement.cpp (right): https://codereview.chromium.org/375923002/diff/1/Source/core/svg/SVGElement.cpp#newcode866 Source/core/svg/SVGElement.cpp:866: RefPtrWillBeRawPtr<Element> parent = currentTarget->parentOrShadowHostElement(); On 2014/07/09 07:39:32, fs wrote: ...
6 years, 5 months ago (2014-07-09 10:58:49 UTC) #4
pdr.
LGTM After reading the spec on this I realized my questions about the edge cases ...
6 years, 5 months ago (2014-07-10 03:48:15 UTC) #5
fs
https://codereview.chromium.org/375923002/diff/20001/LayoutTests/svg/custom/image-svgload-after-docload.html File LayoutTests/svg/custom/image-svgload-after-docload.html (right): https://codereview.chromium.org/375923002/diff/20001/LayoutTests/svg/custom/image-svgload-after-docload.html#newcode18 LayoutTests/svg/custom/image-svgload-after-docload.html:18: setTimeout(function() { t.done(); }, 0); On 2014/07/10 03:48:15, pdr ...
6 years, 5 months ago (2014-07-10 08:32:50 UTC) #6
fs
The CQ bit was checked by fs@opera.com
6 years, 5 months ago (2014-07-10 08:48:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/375923002/40001
6 years, 5 months ago (2014-07-10 08:49:42 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-10 09:25:06 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 10:28:53 UTC) #10
Message was sent while issue was closed.
Change committed as 177814

Powered by Google App Engine
This is Rietveld 408576698