| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 void setCompositeOperation(const String&); | 195 void setCompositeOperation(const String&); |
| 196 | 196 |
| 197 PassRefPtr<CanvasGradient> createLinearGradient(float x0, float y0, float x1
, float y1, ExceptionState&); | 197 PassRefPtr<CanvasGradient> createLinearGradient(float x0, float y0, float x1
, float y1, ExceptionState&); |
| 198 PassRefPtr<CanvasGradient> createRadialGradient(float x0, float y0, float r0
, float x1, float y1, float r1, ExceptionState&); | 198 PassRefPtr<CanvasGradient> createRadialGradient(float x0, float y0, float r0
, float x1, float y1, float r1, ExceptionState&); |
| 199 PassRefPtr<CanvasPattern> createPattern(HTMLImageElement*, const String& rep
etitionType, ExceptionState&); | 199 PassRefPtr<CanvasPattern> createPattern(HTMLImageElement*, const String& rep
etitionType, ExceptionState&); |
| 200 PassRefPtr<CanvasPattern> createPattern(HTMLCanvasElement*, const String& re
petitionType, ExceptionState&); | 200 PassRefPtr<CanvasPattern> createPattern(HTMLCanvasElement*, const String& re
petitionType, ExceptionState&); |
| 201 | 201 |
| 202 PassRefPtr<ImageData> createImageData(PassRefPtr<ImageData>, ExceptionState&
) const; | 202 PassRefPtr<ImageData> createImageData(PassRefPtr<ImageData>, ExceptionState&
) const; |
| 203 PassRefPtr<ImageData> createImageData(float width, float height, ExceptionSt
ate&) const; | 203 PassRefPtr<ImageData> createImageData(float width, float height, ExceptionSt
ate&) const; |
| 204 PassRefPtr<ImageData> getImageData(float sx, float sy, float sw, float sh, E
xceptionState&) const; | 204 PassRefPtr<ImageData> getImageData(float sx, float sy, float sw, float sh, E
xceptionState&) const; |
| 205 PassRefPtr<ImageData> webkitGetImageDataHD(float sx, float sy, float sw, flo
at sh, ExceptionState&) const; | |
| 206 void putImageData(ImageData*, float dx, float dy, ExceptionState&); | 205 void putImageData(ImageData*, float dx, float dy, ExceptionState&); |
| 207 void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY
, float dirtyWidth, float dirtyHeight, ExceptionState&); | 206 void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY
, float dirtyWidth, float dirtyHeight, ExceptionState&); |
| 208 void webkitPutImageDataHD(ImageData*, float dx, float dy, ExceptionState&); | |
| 209 void webkitPutImageDataHD(ImageData*, float dx, float dy, float dirtyX, floa
t dirtyY, float dirtyWidth, float dirtyHeight, ExceptionState&); | |
| 210 | 207 |
| 211 float webkitBackingStorePixelRatio() const { return canvas()->deviceScaleFac
tor(); } | 208 // Slated for deprecation: |
| 209 void webkitPutImageDataHD(ImageData* image, float dx, float dy, ExceptionSta
te& e) { putImageData(image, dx, dy, e); } |
| 210 void webkitPutImageDataHD(ImageData* image, float dx, float dy, float dirtyX
, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionState& e) { putIma
geData(image, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight, e); } |
| 211 PassRefPtr<ImageData> webkitGetImageDataHD(float sx, float sy, float sw, flo
at sh, ExceptionState&) const; |
| 212 float webkitBackingStorePixelRatio() const { return 1; } |
| 212 | 213 |
| 213 void reset(); | 214 void reset(); |
| 214 | 215 |
| 215 String font() const; | 216 String font() const; |
| 216 void setFont(const String&); | 217 void setFont(const String&); |
| 217 | 218 |
| 218 String textAlign() const; | 219 String textAlign() const; |
| 219 void setTextAlign(const String&); | 220 void setTextAlign(const String&); |
| 220 | 221 |
| 221 String textBaseline() const; | 222 String textBaseline() const; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 const Font& accessFont(); | 311 const Font& accessFont(); |
| 311 | 312 |
| 312 void clearCanvas(); | 313 void clearCanvas(); |
| 313 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; | 314 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; |
| 314 | 315 |
| 315 void inflateStrokeRect(FloatRect&) const; | 316 void inflateStrokeRect(FloatRect&) const; |
| 316 | 317 |
| 317 template<class T> void fullCanvasCompositedFill(const T&); | 318 template<class T> void fullCanvasCompositedFill(const T&); |
| 318 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); | 319 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); |
| 319 | 320 |
| 320 PassRefPtr<ImageData> getImageData(ImageBuffer::CoordinateSystem, float sx,
float sy, float sw, float sh, ExceptionState&) const; | |
| 321 void putImageData(ImageData*, ImageBuffer::CoordinateSystem, float dx, float
dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionS
tate&); | |
| 322 | |
| 323 bool focusRingCallIsValid(const Path&, Element*); | 321 bool focusRingCallIsValid(const Path&, Element*); |
| 324 void updateFocusRingAccessibility(const Path&, Element*); | 322 void updateFocusRingAccessibility(const Path&, Element*); |
| 325 void drawFocusRing(const Path&); | 323 void drawFocusRing(const Path&); |
| 326 | 324 |
| 327 virtual bool is2d() const OVERRIDE { return true; } | 325 virtual bool is2d() const OVERRIDE { return true; } |
| 328 virtual bool isAccelerated() const OVERRIDE; | 326 virtual bool isAccelerated() const OVERRIDE; |
| 329 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } | 327 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } |
| 330 | 328 |
| 331 virtual bool isTransformInvertible() const { return state().m_invertibleCTM;
} | 329 virtual bool isTransformInvertible() const { return state().m_invertibleCTM;
} |
| 332 | 330 |
| 333 virtual blink::WebLayer* platformLayer() const OVERRIDE; | 331 virtual blink::WebLayer* platformLayer() const OVERRIDE; |
| 334 | 332 |
| 335 Vector<State, 1> m_stateStack; | 333 Vector<State, 1> m_stateStack; |
| 336 unsigned m_unrealizedSaveCount; | 334 unsigned m_unrealizedSaveCount; |
| 337 bool m_usesCSSCompatibilityParseMode; | 335 bool m_usesCSSCompatibilityParseMode; |
| 338 bool m_hasAlpha; | 336 bool m_hasAlpha; |
| 339 MutableStylePropertyMap m_fetchedFonts; | 337 MutableStylePropertyMap m_fetchedFonts; |
| 340 }; | 338 }; |
| 341 | 339 |
| 342 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 340 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
| 343 | 341 |
| 344 } // namespace WebCore | 342 } // namespace WebCore |
| 345 | 343 |
| 346 #endif | 344 #endif |
| OLD | NEW |