[Webkit-unassigned] [Bug 25319] caret does not paint after type in characters in right aligned div or after delete all characters in RTL div or 0px right padding RTL textarea

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 21 17:20:28 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25319





------- Comment #2 from xji at chromium.org  2009-04-21 17:20 PDT -------
The root cause probably is in:
void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox,
bool firstLine, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd)


    int x = leftOffset(height(), firstLine);
    switch(textAlign) {
        .....
        case RIGHT:
        case WEBKIT_RIGHT:
            // Wide lines spill out of the block based off direction.
            // So even if text-align is right, if direction is LTR, wide lines
should overflow out of the right
            // side of the block.
            if (style()->direction() == LTR) {
                if (trailingSpaceRun) {
                    totWidth -= trailingSpaceRun->m_box->width();
                    trailingSpaceRun->m_box->setWidth(0);
                }
                if (totWidth < availableWidth)
                    x += availableWidth - totWidth;
            } else {
                if (totWidth > availableWidth && trailingSpaceRun) {
                    trailingSpaceRun->m_box->setWidth(max(0,
trailingSpaceRun->m_box->width() - totWidth + availableWidth));
                    totWidth -= trailingSpaceRun->m_box->width();
                } else
                    x += availableWidth - totWidth;
            }
            break;


Both statement of "x += availableWidth - totWidth;" should be "x +=
availableWidth - totWidth - caretWidth;"


-- 
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