In order to resolve the bug 127832, we need all call sites of FrameSelection's member functions that depend on m_selection to decide whether they want the invalidated selection that's exposed to JS or that the validated selection the editing & rendering code will use. In order to simplify this transition, all such access to m_selection should be done though FrameSelection::selection().
Created attachment 222798 [details] Cleanup
Created attachment 222802 [details] Fixes GTK+ and EFL builds
Created attachment 222805 [details] Another build fix
Comment on attachment 222805 [details] Another build fix View in context: https://bugs.webkit.org/attachment.cgi?id=222805&action=review Great to see how the FrameSelection interface gets smaller. Patch looks awesome to me. Just a minor nit, DumpRenderTreeSupportGtk also accesses rootEditableElement() so you'd have to add a similar fix to the one you did for EFL. > Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp:219 > + const VisibleSelection& selection = frame.selection(); This should be frame.selection().selection() right?
Created attachment 222855 [details] One more build fix for EFL & GTK+
Created attachment 222861 [details] Fix EFL build
Comment on attachment 222861 [details] Fix EFL build View in context: https://bugs.webkit.org/attachment.cgi?id=222861&action=review Looks good to me. Please fix FrameSelection.h before landing otherwise it will break iOS builds. > Source/WebCore/editing/FrameSelection.h:343 > + bool m_updateAppearanceEnabled : 1;DragController.cpp This must be a typo. I'm sure it doesn't build like this for iOS :-) > Source/WebCore/page/DragController.cpp:816 > + const VisibleSelection& srcSelection = src.selection().selection(); I would call it sourceSelection.
Committed r163232: <http://trac.webkit.org/changeset/163232>
Debug tests fix landed in http://trac.webkit.org/changeset/163233.