Changeset 162273 in webkit


Ignore:
Timestamp:
Jan 18, 2014 1:24:25 PM (10 years ago)
Author:
Alan Bujtas
Message:

Subpixel layout: IntRect::infiniteRect() overflows when subpixel layout is enabled.
https://bugs.webkit.org/show_bug.cgi?id=126899

Reviewed by Tim Horton.

Use LayoutUnits when setting the infinite values on IntRect::infiniteRect() to ensure
it won't overflow later when the IntRect gets converted to LayoutRect.

Source/WebCore:

Covered by existing tests.

  • platform/graphics/IntRect.h:

(WebCore::IntRect::infiniteRect):

LayoutTests:

  • platform/mac/TestExpectations: Unskipping svg test (failed with subpixel on)
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r162272 r162273  
     12014-01-18  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel layout: IntRect::infiniteRect() overflows when subpixel layout is enabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=126899
     5
     6        Reviewed by Tim Horton.
     7
     8        Use LayoutUnits when setting the infinite values on IntRect::infiniteRect() to ensure
     9        it won't overflow later when the IntRect gets converted to LayoutRect.
     10
     11        * platform/mac/TestExpectations: Unskipping svg test (failed with subpixel on)
     12
    1132014-01-18  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/LayoutTests/platform/mac/TestExpectations

    r162261 r162273  
    13581358webkit.org/b/126898 css3/flexbox/image-percent-max-height.html
    13591359
    1360 # Subpixel: missing text between svg contents
    1361 webkit.org/b/126899 svg/custom/masking-clipping-hidpi.svg
    1362 
    13631360# Subpixel: misplaced zoomed svg content.
    13641361webkit.org/b/126900 svg/zoom/page/zoom-zoom-coords.xhtml
  • trunk/Source/WebCore/ChangeLog

    r162272 r162273  
     12014-01-18  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel layout: IntRect::infiniteRect() overflows when subpixel layout is enabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=126899
     5
     6        Reviewed by Tim Horton.
     7
     8        Use LayoutUnits when setting the infinite values on IntRect::infiniteRect() to ensure
     9        it won't overflow later when the IntRect gets converted to LayoutRect.
     10
     11        Covered by existing tests.
     12
     13        * platform/graphics/IntRect.h:
     14        (WebCore::IntRect::infiniteRect):
     15
    1162014-01-18  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/IntRect.h

    r161699 r162273  
    2828
    2929#include "IntPoint.h"
     30#include "LayoutUnit.h"
    3031#include <wtf/Vector.h>
    3132
     
    237238inline IntRect IntRect::infiniteRect()
    238239{
    239     static IntRect infiniteRect(-std::numeric_limits<int>::max() / 2, -std::numeric_limits<int>::max() / 2, std::numeric_limits<int>::max(), std::numeric_limits<int>::max());
     240    static IntRect infiniteRect(-LayoutUnit::max() / 2, -LayoutUnit::max() / 2, LayoutUnit::max(), LayoutUnit::max());
    240241    return infiniteRect;
    241242}
Note: See TracChangeset for help on using the changeset viewer.