Bug 22472 - Selection is not completely erased when a replaced element moves
Summary: Selection is not completely erased when a replaced element moves
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks: 15739
  Show dependency treegraph
 
Reported: 2008-11-24 16:48 PST by Simon Fraser (smfr)
Modified: 2008-12-02 15:15 PST (History)
1 user (show)

See Also:


Attachments
Testcase (964 bytes, text/html)
2008-11-24 16:48 PST, Simon Fraser (smfr)
no flags Details
Patch, testcase, changelog (7.03 KB, patch)
2008-11-24 18:40 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2008-11-24 16:48:11 PST
When a selected replaced element moves, then the selection is not fully repainted.
Comment 1 Simon Fraser (smfr) 2008-11-24 16:48:43 PST
Created attachment 25459 [details]
Testcase
Comment 2 mitz 2008-11-24 17:47:34 PST
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.
Comment 3 Simon Fraser (smfr) 2008-11-24 18:40:13 PST
Created attachment 25466 [details]
Patch, testcase, changelog

Note that the localSelectionRect() refactor will also be used in the fix for bug 15739.
Comment 4 Simon Fraser (smfr) 2008-11-24 18:43:23 PST
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 5 Dave Hyatt 2008-12-02 12:32:04 PST
Comment on attachment 25466 [details]
Patch, testcase, changelog

r=me
Comment 6 Simon Fraser (smfr) 2008-12-02 15:15:45 PST
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)