Changeset 87026 in webkit


Ignore:
Timestamp:
May 21, 2011 9:44:27 PM (13 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
https://bugs.webkit.org/show_bug.cgi?id=61241

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/block/positioning/start-ignoring-before.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
whether to merge the first trailing space with the line break.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
character, account for trailing positioned objects that occurred after the midpoint by calling
updateMidpointsForTrailingBoxes(), which adds midpoints for them.

LayoutTests:

  • fast/block/positioning/start-ignoring-before-expected.png: Added.
  • fast/block/positioning/start-ignoring-before-expected.txt: Added.
  • fast/block/positioning/start-ignoring-before.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87025 r87026  
     12011-05-21  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
     6        https://bugs.webkit.org/show_bug.cgi?id=61241
     7
     8        * fast/block/positioning/start-ignoring-before-expected.png: Added.
     9        * fast/block/positioning/start-ignoring-before-expected.txt: Added.
     10        * fast/block/positioning/start-ignoring-before.html: Added.
     11
    1122011-05-21  Justin Schuh  <jschuh@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r87022 r87026  
     12011-05-21  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/9479926> REGRESSION (r82144): Icon overlaps text in Twitter message dialog
     6        https://bugs.webkit.org/show_bug.cgi?id=61241
     7
     8        Test: fast/block/positioning/start-ignoring-before.html
     9
     10        * rendering/RenderBlockLineLayout.cpp:
     11        (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Added a boolean parameter saying
     12        whether to merge the first trailing space with the line break.
     13        (WebCore::RenderBlock::LineBreaker::nextLineBreak): When adding a midpoint behind the current
     14        character, account for trailing positioned objects that occurred after the midpoint by calling
     15        updateMidpointsForTrailingBoxes(), which adds midpoints for them.
     16
    1172011-05-21  Jeremy Noble  <jer.noble@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r86698 r87026  
    17451745    void clear();
    17461746    void appendBoxIfNeeded(RenderBox*);
    1747     void updateMidpointsForTrailingBoxes(LineMidpointState&, const InlineIterator& lBreak);
     1747
     1748    enum CollapseFirstSpaceOrNot { DoNotCollapseFirstSpace, CollapseFirstSpace };
     1749
     1750    void updateMidpointsForTrailingBoxes(LineMidpointState&, const InlineIterator& lBreak, CollapseFirstSpaceOrNot);
    17481751
    17491752private:
     
    17751778}
    17761779
    1777 void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMidpointState, const InlineIterator& lBreak)
     1780void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMidpointState, const InlineIterator& lBreak, CollapseFirstSpaceOrNot collapseFirstSpace)
    17781781{
    17791782    if (!m_whitespace)
     
    17871790        for ( ; trailingSpaceMidpoint >= 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { }
    17881791        ASSERT(trailingSpaceMidpoint >= 0);
    1789         lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
     1792        if (collapseFirstSpace == CollapseFirstSpace)
     1793            lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
    17901794
    17911795        // Now make sure every single trailingPositionedBox following the trailingSpaceMidpoint properly stops and starts
     
    18061810    } else if (!lBreak.m_obj) {
    18071811        ASSERT(m_whitespace->isText());
     1812        ASSERT(collapseFirstSpace == CollapseFirstSpace);
    18081813        // Add a new end midpoint that stops right at the very end.
    18091814        unsigned length = m_whitespace->textLength();
     
    22132218                            // before the second space.
    22142219                            addMidpoint(lineMidpointState, ignoreStart);
     2220                            trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, InlineIterator(), TrailingObjects::DoNotCollapseFirstSpace);
    22152221                        }
    22162222                    }
     
    23612367    checkMidpoints(lineMidpointState, lBreak);
    23622368
    2363     trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, lBreak);
     2369    trailingObjects.updateMidpointsForTrailingBoxes(lineMidpointState, lBreak, TrailingObjects::CollapseFirstSpace);
    23642370
    23652371    // We might have made lBreak an iterator that points past the end
Note: See TracChangeset for help on using the changeset viewer.