Changeset 168476 in webkit
- Timestamp:
- May 8, 2014 10:57:09 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168472 r168476 1 2014-05-08 Rik Cabanier <cabanier@adobe.com> 2 3 Add support for drawFocusIfNeeded 4 https://bugs.webkit.org/show_bug.cgi?id=132584 5 6 Reviewed by Dirk Schulze. 7 8 * fast/canvas/draw-focus-if-needed-expected.txt: Added. 9 * fast/canvas/draw-focus-if-needed.html: Added. 10 1 11 2014-05-08 Ion Rosca <rosca@adobe.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r168473 r168476 1 2014-05-08 Rik Cabanier <cabanier@adobe.com> 2 3 Add support for drawFocusIfNeeded 4 https://bugs.webkit.org/show_bug.cgi?id=132584 5 6 Reviewed by Dirk Schulze. 7 8 The drawFocusIfNeeded API will draw a focus ring if the element that is passed 9 in is focused and a child element of the canvas. 10 11 Test: fast/canvas/draw-focus-if-needed.html 12 13 * html/canvas/CanvasRenderingContext2D.cpp: 14 (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded): 15 * html/canvas/CanvasRenderingContext2D.h: 16 * html/canvas/CanvasRenderingContext2D.idl: 17 1 18 2014-05-08 Antti Koivisto <antti@apple.com> 2 19 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r168457 r168476 51 51 #include "RenderImage.h" 52 52 #include "RenderLayer.h" 53 #include "RenderTheme.h" 53 54 #include "SecurityOrigin.h" 54 55 #include "StrokeStyleApplier.h" … … 1971 1972 } 1972 1973 1974 void CanvasRenderingContext2D::drawFocusIfNeeded(Element* element) 1975 { 1976 GraphicsContext* context = drawingContext(); 1977 1978 if (!element || !element->focused() || !state().m_hasInvertibleTransform || m_path.isEmpty() 1979 || !element->isDescendantOf(canvas()) || !context) 1980 return; 1981 1982 context->drawFocusRing(m_path, 1, 1, RenderTheme::focusRingColor()); 1983 } 1984 1973 1985 void CanvasRenderingContext2D::putImageData(ImageData* data, ImageBuffer::CoordinateSystem coordinateSystem, float dx, float dy, float dirtyX, float dirtyY, 1974 1986 float dirtyWidth, float dirtyHeight, ExceptionCode& ec) -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
r167451 r168476 197 197 void webkitPutImageDataHD(ImageData*, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionCode&); 198 198 199 void drawFocusIfNeeded(Element*); 200 199 201 float webkitBackingStorePixelRatio() const { return canvas()->deviceScaleFactor(); } 200 202 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
r168302 r168476 178 178 179 179 [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh); 180 181 // Focus rings 182 void drawFocusIfNeeded(Element element); 180 183 181 184 readonly attribute float webkitBackingStorePixelRatio;
Note: See TracChangeset
for help on using the changeset viewer.