OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
10 * | 10 * |
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 | 2361 |
2362 updateFocusRingAccessibility(m_path, element); | 2362 updateFocusRingAccessibility(m_path, element); |
2363 | 2363 |
2364 // Return true if the application should draw the focus ring. The spec allow
s us to | 2364 // Return true if the application should draw the focus ring. The spec allow
s us to |
2365 // override this for accessibility, but currently Blink doesn't take advanta
ge of this. | 2365 // override this for accessibility, but currently Blink doesn't take advanta
ge of this. |
2366 return element->focused(); | 2366 return element->focused(); |
2367 } | 2367 } |
2368 | 2368 |
2369 bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* e
lement) | 2369 bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* e
lement) |
2370 { | 2370 { |
| 2371 ASSERT(element); |
2371 if (!state().m_invertibleCTM) | 2372 if (!state().m_invertibleCTM) |
2372 return false; | 2373 return false; |
2373 if (path.isEmpty()) | 2374 if (path.isEmpty()) |
2374 return false; | 2375 return false; |
2375 if (!element || !element->isDescendantOf(canvas())) | 2376 if (!element->isDescendantOf(canvas())) |
2376 return false; | 2377 return false; |
2377 | 2378 |
2378 return true; | 2379 return true; |
2379 } | 2380 } |
2380 | 2381 |
2381 void CanvasRenderingContext2D::updateFocusRingAccessibility(const Path& path, El
ement* element) | 2382 void CanvasRenderingContext2D::updateFocusRingAccessibility(const Path& path, El
ement* element) |
2382 { | 2383 { |
2383 if (!canvas()->renderer()) | 2384 if (!canvas()->renderer()) |
2384 return; | 2385 return; |
2385 | 2386 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2434 c->setAlphaAsFloat(1.0); | 2435 c->setAlphaAsFloat(1.0); |
2435 c->clearShadow(); | 2436 c->clearShadow(); |
2436 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); | 2437 c->setCompositeOperation(CompositeSourceOver, blink::WebBlendModeNormal); |
2437 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2438 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
2438 c->restore(); | 2439 c->restore(); |
2439 | 2440 |
2440 didDraw(dirtyRect); | 2441 didDraw(dirtyRect); |
2441 } | 2442 } |
2442 | 2443 |
2443 } // namespace WebCore | 2444 } // namespace WebCore |
OLD | NEW |