Chromium Code Reviews| 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 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012 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 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2382 if (AXObjectCache* axObjectCache = element->document()->existingAXObjectCach e()) { | 2382 if (AXObjectCache* axObjectCache = element->document()->existingAXObjectCach e()) { |
| 2383 if (AccessibilityObject* obj = axObjectCache->getOrCreate(element)) { | 2383 if (AccessibilityObject* obj = axObjectCache->getOrCreate(element)) { |
| 2384 IntRect canvasRect = canvas()->renderer()->absoluteBoundingBoxRect() ; | 2384 IntRect canvasRect = canvas()->renderer()->absoluteBoundingBoxRect() ; |
| 2385 LayoutRect rect = LayoutRect(path.boundingRect()); | 2385 LayoutRect rect = LayoutRect(path.boundingRect()); |
| 2386 rect.moveBy(canvasRect.location()); | 2386 rect.moveBy(canvasRect.location()); |
| 2387 obj->setElementRect(rect); | 2387 obj->setElementRect(rect); |
| 2388 } | 2388 } |
| 2389 } | 2389 } |
| 2390 } | 2390 } |
| 2391 | 2391 |
| 2392 void CanvasRenderingContext2D::drawFocusRing(const Path& path, Element* element) | 2392 void CanvasRenderingContext2D::drawFocusRing(const Path& path, Element* element) |
|
Stephen White
2013/08/05 14:29:58
Not new to this patch, but "element" seems to be u
| |
| 2393 { | 2393 { |
| 2394 GraphicsContext* c = drawingContext(); | 2394 GraphicsContext* c = drawingContext(); |
| 2395 if (!c) | 2395 if (!c) |
| 2396 return; | 2396 return; |
| 2397 | 2397 |
| 2398 c->save(); | 2398 c->save(); |
| 2399 c->setAlpha(1.0); | 2399 c->setAlpha(1.0); |
| 2400 c->clearShadow(); | 2400 c->clearShadow(); |
| 2401 c->setCompositeOperation(CompositeSourceOver, BlendModeNormal); | 2401 c->setCompositeOperation(CompositeSourceOver, BlendModeNormal); |
| 2402 | 2402 |
| 2403 RefPtr<RenderStyle> style(RenderStyle::createDefaultStyle()); | 2403 // These should match the style defined in html.css. |
| 2404 Color focusRingColor = RenderTheme::focusRingColor(); | 2404 Color focusRingColor = RenderTheme::focusRingColor(); |
| 2405 c->drawFocusRing(path, style->outlineWidth(), style->outlineOffset(), focusR ingColor); | 2405 const int focusRingWidth = 5; |
| 2406 const int focusRingOutline = 0; | |
| 2407 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | |
| 2406 didDraw(path.boundingRect()); | 2408 didDraw(path.boundingRect()); |
| 2407 | 2409 |
| 2408 c->restore(); | 2410 c->restore(); |
| 2409 } | 2411 } |
| 2410 | 2412 |
| 2411 } // namespace WebCore | 2413 } // namespace WebCore |
| OLD | NEW |