Changeset 207274 in webkit


Ignore:
Timestamp:
Oct 12, 2016 8:16:15 PM (8 years ago)
Author:
Simon Fraser
Message:

Source/WebCore:
Crash when using megaplan.ru
https://bugs.webkit.org/show_bug.cgi?id=163276
rdar://problem/28446672

Reviewed by Sam Weinig.

Make sure we allocate enough space in the vector of CGPoints that we use for path building.

Test: css3/masking/large-clip-path.html

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::polygonPathFromPoints):

LayoutTests:
polygonPathFromPoints calls uncheckedAppend, but assertion size() < capacity() fails
https://bugs.webkit.org/show_bug.cgi?id=163276

Reviewed by Sam Weinig.

  • css3/masking/large-clip-path-expected.txt: Added.
  • css3/masking/large-clip-path.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207267 r207274  
     12016-10-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        polygonPathFromPoints calls uncheckedAppend, but assertion size() < capacity() fails
     4        https://bugs.webkit.org/show_bug.cgi?id=163276
     5
     6        Reviewed by Sam Weinig.
     7
     8        * css3/masking/large-clip-path-expected.txt: Added.
     9        * css3/masking/large-clip-path.html: Added.
     10
    1112016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r207273 r207274  
     12016-10-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Crash when using megaplan.ru
     4        https://bugs.webkit.org/show_bug.cgi?id=163276
     5        rdar://problem/28446672
     6
     7        Reviewed by Sam Weinig.
     8
     9        Make sure we allocate enough space in the vector of CGPoints that we use for path building.
     10
     11        Test: css3/masking/large-clip-path.html
     12
     13        * platform/graphics/cg/PathCG.cpp:
     14        (WebCore::Path::polygonPathFromPoints):
     15
    1162016-10-12  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebCore/platform/graphics/cg/PathCG.cpp

    r195170 r207274  
    8181
    8282    Vector<CGPoint, 32> cgPoints;
    83     cgPoints.reserveInitialCapacity(points.size() - 1);
     83    cgPoints.reserveInitialCapacity(points.size());
    8484    for (size_t i = 0; i < points.size(); ++i)
    8585        cgPoints.uncheckedAppend(points[i]);
Note: See TracChangeset for help on using the changeset viewer.