summaryrefslogtreecommitdiffstats
path: root/WebCore/html/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/canvas')
-rw-r--r--WebCore/html/canvas/ArrayBuffer.cpp5
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.cpp9
2 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/html/canvas/ArrayBuffer.cpp b/WebCore/html/canvas/ArrayBuffer.cpp
index 2136f64..ee8f149 100644
--- a/WebCore/html/canvas/ArrayBuffer.cpp
+++ b/WebCore/html/canvas/ArrayBuffer.cpp
@@ -85,10 +85,7 @@ ArrayBuffer::~ArrayBuffer()
void* ArrayBuffer::tryAllocate(unsigned numElements, unsigned elementByteSize)
{
void* result;
- // Do not allow 32-bit overflow of the total size.
- // FIXME: Why not? The tryFastCalloc function already checks its arguments,
- // and will fail if there is any overflow, so why should we include a
- // redudant unnecessarily restrictive check here?
+ // Do not allow 32-bit overflow of the total size
if (numElements) {
unsigned totalSize = numElements * elementByteSize;
if (totalSize / numElements != elementByteSize)
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index eb552c6..b9f86ce 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -813,7 +813,9 @@ void CanvasRenderingContext2D::fill()
return;
if (!m_path.isEmpty()) {
- c->fillPath(m_path);
+ c->beginPath();
+ c->addPath(m_path);
+ c->fillPath();
didDraw(m_path.boundingRect());
}
@@ -831,6 +833,9 @@ void CanvasRenderingContext2D::stroke()
return;
if (!m_path.isEmpty()) {
+ c->beginPath();
+ c->addPath(m_path);
+
#if PLATFORM(QT)
// Fast approximation of the stroke's bounding rect.
// This yields a slightly oversized rect but is very fast
@@ -841,7 +846,7 @@ void CanvasRenderingContext2D::stroke()
CanvasStrokeStyleApplier strokeApplier(this);
FloatRect boundingRect = m_path.strokeBoundingRect(&strokeApplier);
#endif
- c->strokePath(m_path);
+ c->strokePath();
didDraw(boundingRect);
}