On Fri, Feb 20, 2015 at 11:37 AM, Morten Stenshorne <
mste...@opera.com> wrote:
> Julien Chaffraix <
jchaf...@chromium.org> writes:
>
>> On Tue, Jan 20, 2015 at 12:10 PM, Chris Harrelson <
chri...@chromium.org> wrote:
>>> Sounds good to me. We did something similar but arguably more disruptive for
>>> core/paint/ and it went pretty smoothly.
>>
>> Just a follow-up as it seems that there was some confusion / push-back
>> on part of the renaming and we haven't done a good job at sending a
>> clear plan and explaining some of the details.
>>
>> * Everything under rendering/ will get moved, the goal is to remove
>> rendering/ altogether (which involves the subdirectories, e.g.
>> rendering/style/).
>>
>> * There are some classes that are not a straight s/Render/Layout.
>> Below is the list of the controversial renamings, along with the
>> reason and the proposed names. Comments or improved names are welcome:
>> - rendering/RenderLayer -> paint/DeprecatedPaintLayer: LayoutLayer is
>> pretty wrong as RenderLayer is mostly a paint-time object and it would
>> be better under paint/.
>
> Someone needs to figure out the stacking order (z-index, etc.) during
> layout, and that's currently something (what used to be called)
> RenderLayer does, right? But that could easily be handled by some other
> class, I suppose.
You're thinking of RenderLayerStackingNode here, which while not
RenderLayer is closely associated with it.
Ideally we would want those satellite objects off RenderLayer (at
least the one unrelated to painting / hit-testing) so that we don't
have an object with several features. Also as Elliott pointed out,
those are paint-time concepts, not layout.
> Apart from that, it's mostly about painting ... oh, and hit-testing.
> This is the class that takes painting and hit-testing on a ride through
> the layout tree. LayoutTreeTraversalObject? Or something that doesn't
> start with "Layout"?
Well this is definitely a paint (and hit-testing) object, which is why
I think it's better fitted into the paint directory. FWIW I would
rather have better designed object handling the tree traversal, with
clear responsibilities, thus the push for deprecating this object
(also slimming paint may remove some of its usage).
>> The new name doesn't totally cover the class'
>> responsibilities but it describes where we want to go (this will be
>> covered by a class comment to explain the rationale).
>> - RenderTableLayout -> LayoutTableAlgorithm: (same for
>> RenderTableLayoutAuto.* and RenderTableLayoutFixed.*):
>> LayoutTableLayoutAuto would make it look like a renderer when it's not
>> (the old name had this issue already). Those corresponds to layout
>> table algorithms so it makes sense to use a name reflecting that.
>
> Actually, it used to be called TableLayout*, not RenderTableLayout*, so
> there wasn't really any confusion when this lived in rendering/. But
> yeah, having both LayoutTable and TableLayout would probably please
> nobody. If it's the bikeshedding hour already, though, I would like to
> point out that TableLayoutAlgorithm* would have been better than
> LayoutTableAlgorithm*, just to make it clear that it's still not a
> layout object. Open up chapter 17 of the CSS2.1 spec, and search for
> "table layout algorithm". :) Yeah, so that would be the name I would
> choose.
Fair point. I am fine with TableLayoutAlgorithm, which on top of
matching the English word order, doesn't seem like a LayoutObject :-)
>> - RenderOverflow -> Overflow: LayoutOverflow is confusing because it
>> makes it sounds like a renderer but also because we have the concept
>> of layout vs visual overflow. This is the reason why it's better to
>> drop the Layout-prefix. A less terse and maybe more descriptive names
>> would be OverflowBoxes.h or OverflowModel.h
>
> Or, if ClipRects has been found to be a good name for our various clip
> rectangles, maybe we could have OverflowRects for overflow rectangles?
OverflowRects seems better than OverflowBoxes. Thinking about it more,
OverflowModel has a big advantage: it allows us to change how we model
overflow (we currently don't track overflow from positioned objects as
it would yield to a giant united rectangle so we could decide that
overflow is not a rectangle anymore but a Vector<Rect> or a region).
Julien