New issue
Advanced search Search tips

Issue 624622 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 654309



Sign in to add a comment

InterpolationType hierarchy should have static create methods

Project Member Reported by suzyh@chromium.org, Jun 30 2016

Issue description

The InterpolationTypes should have static ::create methods and private constructors instead of public constructors.

The logic of PropertyInterpolationTypesMapping should be moved here as well. In doing so we might also be able to move away from switch/if-else logic.
 
I don't think inside InterpolationTypes is the right place for what PropertyInterpolationTypesMapping does. InterpolationTypes should only care about value types, not the properties that use them. CSSProperties.in would be a more appropriate place to declaratively encode the mapping.

Currently the switch/if-else code gives us on-demand initialisation of InterpolationTypes for each CSS property/SVG attribute. Without it you'd be forcing everything to initialise when most pages would only use a handful out of multiple hundreds.

Comment 2 by suzyh@chromium.org, Jun 30 2016

Owner: suzyh@chromium.org
Status: Assigned (was: Available)
I'll take this to give it some thought.
BTW static create() methods SGTM, the other ideas brought up are orthogonal.

Comment 4 by suzyh@chromium.org, Oct 6 2016

TODO: investigate whether the discussion of MakeUnique() and WrapUnique() affects this.
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Bo_4JqYXaiE

Comment 5 by suzyh@chromium.org, Oct 10 2016

Blocking: 654309

Comment 6 by suzyh@chromium.org, Jan 11 2017

Cc: suzyh@chromium.org
Owner: ----
Status: Available (was: Assigned)
I'm not likely to work on this soon, so making it Available. I'm actively working on the broader Objective (issue 654309), however, and happy to brief someone if they want to take it up before I get back to it.
Could you clarify whether the switch/if-else thing is part of this bug? The title suggests something orthogonal.

Comment 8 by suzyh@chromium.org, Jan 11 2017

Hmm, no, it shouldn't be. This bug only specifically deals with the static ::create functions. My intuition at the time was that if the inheritance hierarchy is approached correctly (for some as-yet-unclear value of 'correct'), then switch/if-else and property map logic would not be required. I think there are connected design problems (well, question marks) here, but let's leave this bug to be only about the static create methods, and address the switch/if-else logic separately if it becomes appropriate.
Labels: Hotlist-Squash-A-Bug

Comment 10 by suzyh@chromium.org, Jun 13 2017

Cc: -suzyh@chromium.org
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 13 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 12 by yigu@chromium.org, Jun 14 2018

Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment