[webkit-dev] [blink-dev] Selection & CSS Regions
Manuel Rego Casasnovas
rego at igalia.com
Fri Dec 20 02:58:34 PST 2013
On 20/12/13 02:37, Yoshifumi Inoue wrote:> 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.
Ok, I guess that it could be something similar to the RenderIterator
that has been recently introduced in WebKit:
> I'm not clear about traversing doesn't solve CSS region selection. Does
> it come from current implementation? Or, is traversing wrong idea?
What I mean is that regular traverse of the render tree won't fix
selection issues in CSS Regoins (neither in absolute positions for
Let me explain with a simple example:
The Render tree is something like:
However visually you get something like:
If you select from "content-1" to "content-2" and you traverse render
tree, you won't process "source-1".
So, we'd need some special conditions for CSS Regions in the
RenderIterator, to jump to the RenderFlowThread subtree (and the other
way around) when needed. I guess this is ok, as it's an implementation
> BTW, changing selection will be after TextIterator, because exposing
> Selection.getNodeSet(scope). So, it will come later.
I agree that this will be after TextIterator, just trying to understand
the whole picture.
About changing the selection I'm thinking in RenderView::setSelection()
method. This method should also use the RenderIterator instead of
regular render tree traversing to fix the problem.
BTW, where can I find information about that new API
"Selection.getNodeSet(scope)"? It is not in the editing spec .
More information about the webkit-dev