Changeset 84659 in webkit


Ignore:
Timestamp:
Apr 22, 2011 12:25:46 PM (13 years ago)
Author:
xji@chromium.org
Message:

2011-04-22 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.
  • platform/mac/fast/forms/cursor-at-editable-content-boundary-expected.txt: Added.

2011-04-22 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:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84657 r84659  
     12011-04-22  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        * platform/mac/fast/forms/cursor-at-editable-content-boundary-expected.txt: Added.
     11
    1122011-04-22  Roland Steiner  <rolandsteiner@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r84655 r84659  
     12011-04-22  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-22  Levi Weintraub  <leviw@chromium.org>
    217
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r84166 r84659  
    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.