[webkit-dev] [blink-dev] Selection & CSS Regions
Yoshifumi Inoue
yosin at google.com
Thu Dec 19 17:37:54 PST 2013
I would like to provide render tree iterator base rendered position from
Render Tree for TextIterator, Selection, and others. TextIterator is the
first client of its.
I'm not clear about traversing doesn't solve CSS region selection. Does it
come from current implementation? Or, is traversing wrong idea?
BTW, changing selection will be after TextIterator, because exposing
selected node to JavaScript needs new API, e.g.
Selection.getNodeSet(scope). So, it will come later.
Thanks!
-yosi
On Fri, Dec 20, 2013 at 2:39 AM, Manuel Rego Casasnovas <rego at igalia.com>wrote:
>
> Hi Yosi,
>
> On 19/12/13 02:17, Yoshifumi Inoue wrote:
> > Selection for Shadow DOM tree is similar to CSS Region. Shadow DOM tree
> > also randomizes rendering order against (shadow/non-shadow) DOM tree
> order.
> >
> > Using render tree information for selection also allows us to handle
> > position:absolute elements, e.g. advertised elements displayed displayed
> > at page bottom.
> >
> > We have a plan to make TextIterator to traverse Render Tree rather than
> > DOM tree for ease and robust support of Shadow DOM tree.
>
> Let me check if I understand your mail properly.
>
> You're talking about fixing the selection from the user point of view
> forgetting about selection being always DOM based (like in editing
> spec).
>
> For example in the following page with absolute positions, the idea
> would be that when you select from content-1 to content-2, absolute-1
> text is not selected:
> http://people.igalia.com/mrego/css/absolute/example.html
>
> I agree that this would be the best solution from the user point of
> view.
>
> So, if I'm not wrong, the plan is to make TextIterator traverse the
> render tree, so things like shadow DOM, absolute positions or CSS
> Regions could be properly traversed.
>
> I'm wondering if the next step would be that selection's algorithms
> use TextIterator to traverse the render tree too or not. If not I
> guess that similar changes should be needed in rendering code.
>
> As a side note, in CSS Regions it might be needed to jump from a
> RenderRegion to its content in the RenderFlowThread and the other way
> around. That could be done in TextIterator as we'll have all render
> tree information. Directly traverse of the render tree won't fix the
> issue in CSS Regions.
>
> Thanks for your feedback,
> Rego
>
> PS: I've been testing different layout models (shadow DOM, absolute
> positions, flexbox and regions) checking selection's behavior, you can
> find a summary at:
>
> https://github.com/Igalia/css-regions-selection/wiki/Selection-&-Other-layout-models
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20131220/0d4f7e13/attachment.html>
More information about the webkit-dev
mailing list