[Webkit-unassigned] [Bug 119137] [CSS Regions] Selecting text through different regions flow does not match with highlight

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 1 03:56:43 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=119137





--- Comment #11 from Javier Fernandez <jfernandez at igalia.com>  2013-08-01 03:56:26 PST ---
(In reply to comment #10)
> (From update of attachment 207639 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=207639&action=review
> 
> > Source/WebCore/editing/FrameSelection.cpp:307
> > +    if (atDifferentFlowThread(s.base(), s.extent()))
> > +        return;
> > +
> 
> This is not the right place to fix this. We need to do this inside VisibleSelection::validate probably right before or right after we call adjustSelectionToAvoidCrossingShadowBoundaries.

The purpose of this patch is to avoid setting a new VisibleSelection instance to the FrameSelection if it's incompatible in terms of RenderFlow. For the shake of clarity, I've taken the assumption that only selections starting and ending in the same FlowThread, or both outside, are allowed. On the other hand, that's the current behaviour after the fix for the bug #105641. This patch keep that behaviour form the rendering point of view, but at the same time targeting also the issues related to the selected content.

Getting back to your suggestion of implementing this in the VisibleSelection::validate(), this method is intended for adjusting the new Selection to fit in some validation rules. It's not necessary to adjust the new selection, since the one already set before in the FrameSelection instance is correct.

If done at validation() we should move back the extent Position to the last one FlowThread compatible, which it would require to explore the DOM. This could have also an impact on performance, even more considering validate(9 is called a lot of times, overall, when selection is performed by user gestures. 

After all this, do you still think VisibleSelection::validate() is the right place to put this logic ?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list