[Webkit-unassigned] [Bug 24527] New: caret does not paint the first time you focus on a 0px right padding RTL div
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 11 15:46:47 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=24527
Summary: caret does not paint the first time you focus on a 0px
right padding RTL div
Product: WebKit
Version: 525.x (Safari 3.2)
Platform: PC
OS/Version: Windows 2000
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: xji at chromium.org
Test case attached.
For an RTL div with 0px right padding,
the first time you focus on it, caret does not paint.
The reason of caret not painted is because in
SelectionController::paintCaret(), after computing "IntRect caret =
intersection(drawingRect, clipRect);", the "caret" is empty() when the right
padding is "0px".
It is because the x-axis of "drawingRect" is 1 pixel shifted wrongly. The
1-pixel shift of "drawingRect" is because the x-axis of the local caret rect is
computed wrongly in RenderBlock::localCaretRect().
There is the following line in RenderBlock::localCaretRect():
case alignRight:
x = w - (borderRight() + paddingRight());
It should be
case alignRight:
x = w - (borderRight() + paddingRight()) - 1;
So, for a div with width equals to 150, the x-axis when align right should be
149, not 150.
I will provide patch and layout test after I get Mac environment.
Or if anyone saw this bug and want to go ahead with the patch, you are very
well welcomed.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list