Changeset 83348 in webkit


Ignore:
Timestamp:
Apr 8, 2011 3:34:56 PM (13 years ago)
Author:
xji@chromium.org
Message:

2011-04-08 Xiaomei Ji <xji@chromium.org>

Reviewed by David Hyatt.

Local caret rectangle calculation should be relative to its containing block.
https://bugs.webkit.org/show_bug.cgi?id=49508.

  • fast/forms/cursor-at-editable-content-boundary-expected.txt: Added.
  • fast/forms/cursor-at-editable-content-boundary.html: Added.

2011-04-08 Xiaomei Ji <xji@chromium.org>

Reviewed by David Hyatt.

Local caret rectangle calculation should be relative to its containing block.
https://bugs.webkit.org/show_bug.cgi?id=49508.

InlineBox and caret rectangle are positioned relative to its containing block.
So its left and right edge value should be relative to its containing block as well.

Test: fast/forms/cursor-at-editable-content-boundary.html

  • rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83345 r83348  
     12011-04-08  Xiaomei Ji  <xji@chromium.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        Local caret rectangle calculation should be relative to its containing block.
     6        https://bugs.webkit.org/show_bug.cgi?id=49508.
     7
     8        * fast/forms/cursor-at-editable-content-boundary-expected.txt: Added.
     9        * fast/forms/cursor-at-editable-content-boundary.html: Added.
     10
    1112011-04-08  David Hyatt  <hyatt@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r83347 r83348  
     12011-04-08  Xiaomei Ji  <xji@chromium.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        Local caret rectangle calculation should be relative to its containing block.
     6        https://bugs.webkit.org/show_bug.cgi?id=49508.
     7
     8        InlineBox and caret rectangle are positioned relative to its containing block.
     9        So its left and right edge value should be relative to its containing block as well.
     10
     11        Test: fast/forms/cursor-at-editable-content-boundary.html
     12
     13        * rendering/RenderText.cpp:
     14        (WebCore::RenderText::localCaretRect):
     15
    1162011-04-08  MORITA Hajime  <morrita@google.com>
    217
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r83075 r83348  
    535535    float rightEdge;
    536536    if (style()->autoWrap()) {
    537         leftEdge = cb->logicalLeft();
    538         rightEdge = cb->logicalRight();
     537        leftEdge = 0;
     538        rightEdge = cb->logicalWidth();
    539539    } else {
    540         leftEdge = min(static_cast<float>(cb->logicalLeft()), rootLeft);
    541         rightEdge = max(static_cast<float>(cb->logicalRight()), rootRight);
     540        leftEdge = min(static_cast<float>(0), rootLeft);
     541        rightEdge = max(static_cast<float>(cb->logicalWidth()), rootRight);
    542542    }
    543543
Note: See TracChangeset for help on using the changeset viewer.