Changeset 60869 in webkit


Ignore:
Timestamp:
Jun 8, 2010 4:09:34 PM (14 years ago)
Author:
jchaffraix@webkit.org
Message:

[Qt] Crashfix on Path::contains
https://bugs.webkit.org/show_bug.cgi?id=40253

Patch by Enrico Ros <eros@codeaurora.org> on 2010-06-08
Reviewed by Ariya Hidayat.

Fix accessing the first item of an empty vector, that happens when
CanvasRenderingContext2D::isPointInPath is invoked over a borderless
path (e.g. a path made of just a MoveTo operation).

  • platform/graphics/qt/PathQt.cpp:

(WebCore::isPointOnPathBorder):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60867 r60869  
     12010-06-08  Enrico Ros  <eros@codeaurora.org>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        [Qt] Crashfix on Path::contains
     6        https://bugs.webkit.org/show_bug.cgi?id=40253
     7
     8        Fix accessing the first item of an empty vector, that happens when
     9        CanvasRenderingContext2D::isPointInPath is invoked over a borderless
     10        path (e.g. a path made of just a MoveTo operation).
     11
     12        * platform/graphics/qt/PathQt.cpp:
     13        (WebCore::isPointOnPathBorder):
     14
    1152010-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/WebCore/platform/graphics/qt/PathQt.cpp

    r60726 r60869  
    7373bool isPointOnPathBorder(const QPolygonF& border, const QPointF& p)
    7474{
     75    // null border doesn't contain points
     76    if (border.isEmpty())
     77        return false;
     78
    7579    QPointF p1 = border.at(0);
    7680    QPointF p2;
Note: See TracChangeset for help on using the changeset viewer.