Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 238863002: Implement drawFocusIfNeeded with Path2D parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 LineCap getLineCap() const { return state().m_lineCap; } 224 LineCap getLineCap() const { return state().m_lineCap; }
225 LineJoin getLineJoin() const { return state().m_lineJoin; } 225 LineJoin getLineJoin() const { return state().m_lineJoin; }
226 226
227 bool imageSmoothingEnabled() const; 227 bool imageSmoothingEnabled() const;
228 void setImageSmoothingEnabled(bool); 228 void setImageSmoothingEnabled(bool);
229 229
230 PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const; 230 PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const;
231 231
232 void drawFocusIfNeeded(Element*); 232 void drawFocusIfNeeded(Element*);
233 void drawFocusIfNeeded(Path2D*, Element*);
233 bool drawCustomFocusRing(Element*); 234 bool drawCustomFocusRing(Element*);
234 235
235 void loseContext(); 236 void loseContext();
236 void restoreContext(); 237 void restoreContext();
237 238
238 private: 239 private:
239 class State FINAL : public CSSFontSelectorClient { 240 class State FINAL : public CSSFontSelectorClient {
240 public: 241 public:
241 State(); 242 State();
242 virtual ~State(); 243 virtual ~State();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 326
326 void clearCanvas(); 327 void clearCanvas();
327 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; 328 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const;
328 329
329 void inflateStrokeRect(FloatRect&) const; 330 void inflateStrokeRect(FloatRect&) const;
330 331
331 template<class T> void fullCanvasCompositedFill(const T&); 332 template<class T> void fullCanvasCompositedFill(const T&);
332 template<class T> void fullCanvasCompositedStroke(const T&); 333 template<class T> void fullCanvasCompositedStroke(const T&);
333 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c onst FloatRect&, CompositeOperator); 334 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c onst FloatRect&, CompositeOperator);
334 335
336 void drawFocusIfNeededInternal(const Path&, Element*);
335 bool focusRingCallIsValid(const Path&, Element*); 337 bool focusRingCallIsValid(const Path&, Element*);
336 void updateFocusRingAccessibility(const Path&, Element*); 338 void updateFocusRingAccessibility(const Path&, Element*);
337 void drawFocusRing(const Path&); 339 void drawFocusRing(const Path&);
338 340
339 virtual bool is2d() const OVERRIDE { return true; } 341 virtual bool is2d() const OVERRIDE { return true; }
340 virtual bool isAccelerated() const OVERRIDE; 342 virtual bool isAccelerated() const OVERRIDE;
341 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } 343 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; }
342 344
343 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; } 345 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver tibleCTM; }
344 346
(...skipping 12 matching lines...) Expand all
357 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; 359 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer;
358 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; 360 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer;
359 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; 361 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer;
360 }; 362 };
361 363
362 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 364 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
363 365
364 } // namespace WebCore 366 } // namespace WebCore
365 367
366 #endif 368 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698