Changeset 85535 in webkit


Ignore:
Timestamp:
May 2, 2011 3:46:06 PM (13 years ago)
Author:
enrica@apple.com
Message:

Text does not split on white space when typing to the edge of window.
https://bugs.webkit.org/show_bug.cgi?id=59968
<rdar://problem/9112683>

Reviewed by Dan Bernstein.

Source/WebCore:

Test: editing/inserting/typing-at-end-of-line.html

This is a regression introduced when we converted the line box tree to
floating point in r78846. In findNextLineBreak, there was still one place where
the character width was treated as int and truncated and we were inconsistent
in the way we treated a character that did not fit entirely in the line.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::findNextLineBreak):

LayoutTests:

  • editing/inserting/typing-at-end-of-line.html: Added.
  • platform/mac/editing/inserting/typing-at-end-of-line-expected.txt: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85534 r85535  
     12011-05-02  Enrica Casucci  <enrica@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Text does not split on white space when typing to the edge of window.
     6        https://bugs.webkit.org/show_bug.cgi?id=59968
     7        <rdar://problem/9112683>
     8
     9        * editing/inserting/typing-at-end-of-line.html: Added.
     10        * platform/mac/editing/inserting/typing-at-end-of-line-expected.txt: Added.
     11
    1122011-05-02  Alpha Lam  <hclam@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r85527 r85535  
     12011-05-02  Enrica Casucci  <enrica@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Text does not split on white space when typing to the edge of window.
     6        https://bugs.webkit.org/show_bug.cgi?id=59968
     7        <rdar://problem/9112683>
     8
     9        Test: editing/inserting/typing-at-end-of-line.html
     10
     11        This is a regression introduced when we converted the line box tree to
     12        floating point in r78846. In findNextLineBreak, there was still one place where
     13        the character width was treated as int and truncated and we were inconsistent
     14        in the way we treated a character that did not fit entirely in the line.
     15
     16        * rendering/RenderBlockLineLayout.cpp:
     17        (WebCore::RenderBlock::findNextLineBreak):
     18
    1192011-04-19  Adrienne Walker  <enne@google.com>
    220
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r85143 r85535  
    19781978                        bool lineWasTooWide = false;
    19791979                        if (width.fitsOnLine() && currentCharacterIsWS && o->style()->breakOnlyAfterWhiteSpace() && !midWordBreak) {
    1980                             int charWidth = textWidth(t, pos, 1, f, width.currentWidth(), isFixedPitch, collapseWhiteSpace) + (applyWordSpacing ? wordSpacing : 0);
     1980                            float charWidth = textWidth(t, pos, 1, f, width.currentWidth(), isFixedPitch, collapseWhiteSpace) + (applyWordSpacing ? wordSpacing : 0);
    19811981                            // Check if line is too big even without the extra space
    19821982                            // at the end of the line. If it is not, do nothing.
Note: See TracChangeset for help on using the changeset viewer.