When a selected replaced element moves, then the selection is not fully repainted.
Created attachment 25459 [details] Testcase
The selection rect for the relpositioned element doesn't make much sense -- there is no good reason to extend the selection blow the element in that case, because the line doesn't extend that far.
Created attachment 25466 [details] Patch, testcase, changelog Note that the localSelectionRect() refactor will also be used in the fix for bug 15739.
This patch blows out absoluteClippedOverflowRect() to envelop the selection rect. If you'd prefer we change the selection rect for positioned/transformed replaced elements, I can do that too (just use overflowRect()?). Note that it will cause a replaced with position:relative and no offset to render selection slightly differently.
Comment on attachment 25466 [details] Patch, testcase, changelog r=me
Committed r38922 M WebCore/ChangeLog M WebCore/rendering/RenderReplaced.h M WebCore/rendering/RenderReplaced.cpp A LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.png A LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.txt A LayoutTests/platform/mac/fast/repaint/selected-replaced-expected.checksum M LayoutTests/ChangeLog A LayoutTests/fast/repaint/selected-replaced.html r38922 = 2e3c814163128d96700fe09f2b57c571b0036c57 (trunk)