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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 float m_lineDashOffset; | 276 float m_lineDashOffset; |
277 bool m_imageSmoothingEnabled; | 277 bool m_imageSmoothingEnabled; |
278 | 278 |
279 // Text state. | 279 // Text state. |
280 TextAlign m_textAlign; | 280 TextAlign m_textAlign; |
281 TextBaseline m_textBaseline; | 281 TextBaseline m_textBaseline; |
282 | 282 |
283 String m_unparsedFont; | 283 String m_unparsedFont; |
284 Font m_font; | 284 Font m_font; |
285 bool m_realizedFont; | 285 bool m_realizedFont; |
| 286 |
| 287 bool m_hasClip; |
286 }; | 288 }; |
287 | 289 |
288 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes
* attrs, bool usesCSSCompatibilityParseMode); | 290 CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes
* attrs, bool usesCSSCompatibilityParseMode); |
289 | 291 |
290 State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m
_stateStack.last(); } | 292 State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m
_stateStack.last(); } |
291 const State& state() const { return *m_stateStack.last(); } | 293 const State& state() const { return *m_stateStack.last(); } |
292 | 294 |
293 void applyLineDash() const; | 295 void applyLineDash() const; |
294 void setShadow(const FloatSize& offset, float blur, RGBA32 color); | 296 void setShadow(const FloatSize& offset, float blur, RGBA32 color); |
295 void applyShadow(); | 297 void applyShadow(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 337 |
336 template<class T> void fullCanvasCompositedFill(const T&); | 338 template<class T> void fullCanvasCompositedFill(const T&); |
337 template<class T> void fullCanvasCompositedStroke(const T&); | 339 template<class T> void fullCanvasCompositedStroke(const T&); |
338 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); | 340 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); |
339 | 341 |
340 void drawFocusIfNeededInternal(const Path&, Element*); | 342 void drawFocusIfNeededInternal(const Path&, Element*); |
341 bool focusRingCallIsValid(const Path&, Element*); | 343 bool focusRingCallIsValid(const Path&, Element*); |
342 void drawFocusRing(const Path&); | 344 void drawFocusRing(const Path&); |
343 | 345 |
344 void addHitRegionInternal(const HitRegionOptions&, ExceptionState&); | 346 void addHitRegionInternal(const HitRegionOptions&, ExceptionState&); |
| 347 bool hasClip() { return state().m_hasClip; } |
345 | 348 |
346 void validateStateStack(); | 349 void validateStateStack(); |
347 | 350 |
348 virtual bool is2d() const OVERRIDE { return true; } | 351 virtual bool is2d() const OVERRIDE { return true; } |
349 virtual bool isAccelerated() const OVERRIDE; | 352 virtual bool isAccelerated() const OVERRIDE; |
350 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } | 353 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } |
351 | 354 |
352 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver
tibleCTM; } | 355 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver
tibleCTM; } |
353 | 356 |
354 virtual blink::WebLayer* platformLayer() const OVERRIDE; | 357 virtual blink::WebLayer* platformLayer() const OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
365 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 368 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
366 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 369 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
367 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 370 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
368 }; | 371 }; |
369 | 372 |
370 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 373 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
371 | 374 |
372 } // namespace WebCore | 375 } // namespace WebCore |
373 | 376 |
374 #endif | 377 #endif |
OLD | NEW |