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

Issue 2573653003: Remove LayoutSVGViewportContainer's calcViewport and pointIsInsideViewportClip (Closed)

Created:
4 years ago by pdr.
Modified:
4 years ago
Reviewers:
fs
CC:
fs, blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove LayoutSVGViewportContainer's calcViewport and pointIsInsideViewportClip This patch removes some subclass knowledge about viewport containers from LayoutSVGContainer. LayoutSVGViewportContainer::calcViewport has been moved into LayoutSVGViewportContainer::updateLocalTransform. Similarly, LayoutSVGViewportContainer::pointIsInsideViewportClip has been removed in favor of implementing viewport clip logic in LayoutSVGViewportContainer. The unneeded LayoutSVGViewportContainer::paint override has also been removed. BUG=645667 Committed: https://crrev.com/60965ced99bdf9522cf55c0fbbe83bda653ae085 Cr-Commit-Position: refs/heads/master@{#438349}

Patch Set 1 #

Patch Set 2 : Remove unnecessary final, remove paint #

Patch Set 3 : Add code and TODO about removing setNeeds calls #

Total comments: 7

Patch Set 4 : Do Fredrik's suggestions: updated stale comment, removed premature bugfix, less draconian DCHECK #

Patch Set 5 : Actually revert SVGSVGElement changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -66 lines) Patch
M third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.h View 1 chunk +1 line, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp View 1 2 3 2 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h View 1 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.cpp View 1 2 3 2 chunks +27 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGSVGElement.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (13 generated)
pdr.
4 years ago (2016-12-13 05:51:41 UTC) #7
fs
LGTM w/ nits and (further) ramblings https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp File third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp (right): https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp#newcode49 third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp:49: // Allow LayoutSVGTransformableContainer ...
4 years ago (2016-12-13 10:11:24 UTC) #8
pdr.
https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp File third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp (right): https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp#newcode49 third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp:49: // Allow LayoutSVGTransformableContainer to update its transform. On 2016/12/13 ...
4 years ago (2016-12-13 19:48:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2573653003/80001
4 years ago (2016-12-13 19:50:00 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/333854)
4 years ago (2016-12-13 21:45:59 UTC) #14
pdr.
On 2016/12/13 at 21:45:59, commit-bot wrote: > Try jobs failed on following builders: > win_chromium_x64_rel_ng ...
4 years ago (2016-12-13 23:16:58 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2573653003/80001
4 years ago (2016-12-13 23:17:32 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-14 00:07:36 UTC) #20
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/60965ced99bdf9522cf55c0fbbe83bda653ae085 Cr-Commit-Position: refs/heads/master@{#438349}
4 years ago (2016-12-14 00:10:00 UTC) #22
fs
4 years ago (2016-12-14 12:24:45 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.cpp
(right):

https://codereview.chromium.org/2573653003/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.cpp:59:
CHECK(element && isSVGSVGElement(*element));
On 2016/12/13 at 19:48:55, pdr. wrote:
> On 2016/12/13 at 10:11:23, fs wrote:
> > This looks a bit excessive. DCHECK(isSVGSVGElement(element))? (Or element ->
element() even...)
> > 
> > My spider senses tells me there's legacy abound here... We could probably
clean this up more to make it more obvious only SVGSVGElements instantiate these
(codesearch seems to support that...) Oh well, that'll be another CL...
> 
> Good idea, done.
> 
> I agree that this can be cleaned up although it's not immediately clear how.
One slightly strange case here is that SVGSVGElement is the only class to create
viewport containers, but SVGSVGElement only does this for non-root SVG elements.
Maybe something along the names of LayoutNonRootSVGContainer?

I think what I'd like to clean up first is to remove anything that suggests that
this is a "multi-element" LayoutObject - i.e remove any isSVGSVGElement(...) and
just nail down that assumption. The 1:N from the SVGSVGElement I worry less
about.
 
> Another area of cleanup is removing the call to calculateLocalTransform in
favor of overriding layout.

This I've pondered too now and then, but not really seen anything that suggest
it to be worth it.

Powered by Google App Engine
This is Rietveld 408576698