⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 167580 in webkit


Ignore:
Timestamp:
Apr 20, 2014, 9:40:11 PM (12 years ago)
Author:
Darin Adler
Message:

Simple layout can get confused by coordinate overflow
https://bugs.webkit.org/show_bug.cgi?id=131890
rdar://problem/15558510

Reviewed by Andreas Kling.

Source/WebCore:
Test: fast/css/simple-layout-overflow.html

  • rendering/SimpleLineLayoutResolver.h:

(WebCore::SimpleLineLayout::RunResolver::rangeForRect):
If lastLine is smaller than firstList, just ignore it.

LayoutTests:

  • fast/css/simple-layout-overflow-expected.txt: Added.
  • fast/css/simple-layout-overflow.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167569 r167580  
     12014-04-19  Darin Adler  <darin@apple.com>
     2
     3        Simple layout can get confused by coordinate overflow
     4        https://bugs.webkit.org/show_bug.cgi?id=131890
     5        rdar://problem/15558510
     6
     7        Reviewed by Andreas Kling.
     8
     9        * fast/css/simple-layout-overflow-expected.txt: Added.
     10        * fast/css/simple-layout-overflow.html: Added.
     11
    1122014-04-19  Alexey Proskuryakov  <ap@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r167579 r167580  
     12014-04-19  Darin Adler  <darin@apple.com>
     2
     3        Simple layout can get confused by coordinate overflow
     4        https://bugs.webkit.org/show_bug.cgi?id=131890
     5        rdar://problem/15558510
     6
     7        Reviewed by Andreas Kling.
     8
     9        Test: fast/css/simple-layout-overflow.html
     10
     11        * rendering/SimpleLineLayoutResolver.h:
     12        (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
     13        If lastLine is smaller than firstList, just ignore it.
     14
    1152014-04-20  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.h

    r162553 r167580  
    284284
    285285    unsigned firstLine = lineIndexForHeight(rect.y());
    286     unsigned lastLine = lineIndexForHeight(rect.maxY());
     286    unsigned lastLine = std::max(firstLine, lineIndexForHeight(rect.maxY()));
    287287
    288288    auto rangeBegin = begin().advanceLines(firstLine);
     
    290290        return Range<Iterator>(end(), end());
    291291    auto rangeEnd = rangeBegin;
     292    ASSERT(lastLine >= firstLine);
    292293    rangeEnd.advanceLines(lastLine - firstLine + 1);
    293294    return Range<Iterator>(rangeBegin, rangeEnd);
Note: See TracChangeset for help on using the changeset viewer.