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

Issue 1755153002: Remove SVGUseElement helper subtreeContainsDisallowedElement (Closed)

Created:
4 years, 9 months ago by fs
Modified:
4 years, 9 months ago
Reviewers:
pdr., Stephen Chennney
CC:
blink-reviews, chromium-reviews, krit, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@svg-useelm-shadowbuilder-cleanup-4
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove SVGUseElement helper subtreeContainsDisallowedElement The related helper removeDisallowedElementsFromSubtree() already walks the same subtree and checks with the same predicate[1], so letting the removing function do all the work should not be a problem. Also change isDisallowedElement to take a const Node&, and tighten the type of the subtree root passed to removeDisallowedElementsFromSubtree (it's always either a SVGSVGElement or a SVGGElement.) Move the lengthy - and somewhat outdated - comment above removeDisallowedElementsFromSubtree to just above its definition. (We aim to align the current behavior to it though, so keeping it around unchanged.) [1] subtreeContainsDisallowedElement() was walking the Nodes of the tree, while removeDisallowedElementsFromSubtree() walks the Elements. Thus they did not look at the exact same set of nodes. Since the removal took place on the smaller set though there should be no change in behavior. Previously we could end up walking the entire subtree looking for something to remove (in removeDisallowedElementsFromSubtree) eventhough we wouldn't find it (like for example a COMMENT node.) BUG=589682 Committed: https://crrev.com/1b7b24793aceb615c9d54ae73c0cbbd7b9480622 Cr-Commit-Position: refs/heads/master@{#378993}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -38 lines) Patch
M third_party/WebKit/Source/core/svg/SVGUseElement.cpp View 9 chunks +19 lines, -38 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (4 generated)
fs
4 years, 9 months ago (2016-03-02 16:41:34 UTC) #2
Stephen Chennney
LGTM. I'm assuming we don't regress performance here, which we would do if it's much ...
4 years, 9 months ago (2016-03-02 17:40:03 UTC) #4
fs
On 2016/03/02 at 17:40:03, schenney wrote: > LGTM. I'm assuming we don't regress performance here, ...
4 years, 9 months ago (2016-03-02 17:58:22 UTC) #5
pdr.
On 2016/03/02 at 17:58:22, fs wrote: > On 2016/03/02 at 17:40:03, schenney wrote: > > ...
4 years, 9 months ago (2016-03-02 21:01:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1755153002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1755153002/1
4 years, 9 months ago (2016-03-03 10:22:56 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 9 months ago (2016-03-03 10:27:51 UTC) #9
commit-bot: I haz the power
4 years, 9 months ago (2016-03-03 10:29:12 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1b7b24793aceb615c9d54ae73c0cbbd7b9480622
Cr-Commit-Position: refs/heads/master@{#378993}

Powered by Google App Engine
This is Rietveld 408576698