Summary: | Should not draw selection for empty spaces. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Parag Radke <parag> | ||||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | UNCONFIRMED --- | ||||||||||||
Severity: | Normal | CC: | ap, parag, rniwa, tony | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
URL: | http://www.webkit.org/ | ||||||||||||
Attachments: |
|
Description
Parag Radke
2012-03-27 04:58:58 PDT
Created attachment 134037 [details]
Proposed Patch
Patch to avoid selection draw for empty spaces.
Created attachment 134093 [details]
text selection in TextEdit
Comment on attachment 134037 [details]
Proposed Patch
This is incorrect on Mac. On Mac, the selection is always a rectangle and lines extend to the edge of the page.
We may want different behavior on Linux/Win which has the jagged selection you describe.
If we're doing this, we probably also want to set the height of selection to the height of actual text instead of the entire line height to follow the Windows convention. Of course, that could be done in a follow up patch. I also just tried this in gedit, and it produced a Mac like selection. notepad.exe on Windows had a selection similar to the one in "Proposed Patch". (In reply to comment #6) > I also just tried this in gedit, and it produced a Mac like selection. notepad.exe on Windows had a selection similar to the one in "Proposed Patch". Yes tony you are correct the gedit selection behavior is similar to the chrome behavior on Linux. But what i was trying to match is not platform but firefox. But if webkit want to go with the default platform behavior i'll restrict this change to windows Created attachment 134240 [details]
comparison of Firefox and Webkit selection (with this change).
(In reply to comment #7) > Yes tony you are correct the gedit selection behavior is similar to the chrome behavior on Linux. But what i was trying to match is not platform but firefox. But if webkit want to go with the default platform behavior i'll restrict this change to windows We normally match platform convention. Rectangular selections are a must on Mac, and perhaps for Apple Windows products too. I'm not sure who'd be willing to make the call about the latter. (In reply to comment #10) > Rectangular selections are a must on Mac, and perhaps for Apple Windows products too. I'm not sure who'd be willing to make the call about the latter. So this change should exclude Apple windows products? And is there any way to achieve this ? This bug belongs to layout and rendering. |