Changeset 88555 in webkit
- Timestamp:
- Jun 10, 2011 12:43:23 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88549 r88555 1 2011-06-10 Rob Buis <rbuis@rim.com> 2 3 Reviewed by Nikolas Zimmermann. 4 5 animation event handling broken: focusin 6 https://bugs.webkit.org/show_bug.cgi?id=12894 7 8 focusin, focusout, activate not implemented in SVG 9 https://bugs.webkit.org/show_bug.cgi?id=40545 10 11 Test whether focusin and focusout events are dispatched and seen in the focusin/focusout event handlers. 12 13 * platform/mac/svg/custom/focus-ring-expected.txt: 14 * svg/custom/focus-event-handling-expected.txt: Added. 15 * svg/custom/focus-event-handling-keyboard-expected.txt: Added. 16 * svg/custom/focus-event-handling-keyboard.xhtml: Added. 17 * svg/custom/focus-event-handling.xhtml: Added. 18 * svg/custom/resources/focus-event-handling-keyboard.js: Added. 19 (focusinHandler): 20 (focusoutHandler): 21 * svg/custom/resources/focus-event-handling.js: Added. 22 (clearFocusSeen): 23 (): 24 (focusoutHandler): 25 (clickAt): 26 1 27 2011-06-10 Abhishek Arya <inferno@chromium.org> 2 28 -
trunk/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
r69386 r88555 3 3 layer at (0,0) size 800x600 4 4 RenderSVGRoot {svg} at (10,10) size 437x527 5 RenderSVGPath {circle} at (1 5,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [cx=65.00] [cy=60.00] [r=50.00]6 RenderSVGPath {path} at (1 40,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [data="M 140 10 L 190 110 L 240 60 L 220 60 L 200 30 Z"]7 RenderSVGContainer {g} at (2 70,10) size 100x1008 RenderSVGPath {rect} at (2 70,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [x=270.00] [y=10.00] [width=100.00] [height=100.00]5 RenderSVGPath {circle} at (10,5) size 110x110 [fill={[type=SOLID] [color=#FFA500]}] [cx=65.00] [cy=60.00] [r=50.00] 6 RenderSVGPath {path} at (135,5) size 110x110 [fill={[type=SOLID] [color=#FFA500]}] [data="M 140 10 L 190 110 L 240 60 L 220 60 L 200 30 Z"] 7 RenderSVGContainer {g} at (265,5) size 110x110 8 RenderSVGPath {rect} at (265,5) size 110x110 [fill={[type=SOLID] [color=#FFA500]}] [x=270.00] [y=10.00] [width=100.00] [height=100.00] 9 9 RenderSVGContainer {g} at (10,140) size 137x137 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(60.00,140.00)}] 10 RenderSVGPath {rect} at ( 10,140) size 137x137[fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]11 RenderSVGPath {rect} at (1 50,140) size 137x137[transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,140.00)}] [fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]12 RenderSVGContainer {g} at (3 10,140) size 137x13713 RenderSVGPath {rect} at (3 10,140) size 137x137 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(360.00,140.00)}] [fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]10 RenderSVGPath {rect} at (3,133) size 151x151 [fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 11 RenderSVGPath {rect} at (143,133) size 151x151 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,140.00)}] [fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 12 RenderSVGContainer {g} at (305,135) size 147x147 13 RenderSVGPath {rect} at (305,135) size 147x147 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(360.00,140.00)}] [fill={[type=SOLID] [color=#FFA500]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 14 14 RenderSVGText {text} at (10,306) size 76x18 contains 1 chunk(s) 15 15 RenderSVGInlineText {#text} at (0,0) size 76x18 … … 18 18 RenderSVGInlineText {#text} at (0,0) size 76x18 19 19 chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 12 width 76.00: "focused text" 20 RenderSVGContainer {g} at (19 8,307) size 75x5520 RenderSVGContainer {g} at (193,302) size 85x65 21 21 RenderSVGText {text} at (0,-14) size 76x18 contains 1 chunk(s) 22 22 RenderSVGInlineText {#text} at (0,0) size 76x18 … … 24 24 RenderSVGResourceClipper {clipPath} [id="clip"] [clipPathUnits=userSpaceOnUse] 25 25 RenderSVGPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00] 26 RenderSVGImage {image} at (0,0) size 0x026 RenderSVGImage {image} at (0,0) size 5x5 27 27 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 28 RenderSVGImage {image} at (1 50,400) size 137x137[transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,400.00)}]28 RenderSVGImage {image} at (143,393) size 151x151 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(200.00,400.00)}] 29 29 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 30 RenderSVGContainer {g} at (3 10,400) size 137x137[transform={m=((0.87,0.50)(-0.50,0.87)) t=(360.00,400.00)}]31 RenderSVGImage {image} at (3 10,400) size 137x13730 RenderSVGContainer {g} at (303,393) size 151x151 [transform={m=((0.87,0.50)(-0.50,0.87)) t=(360.00,400.00)}] 31 RenderSVGImage {image} at (303,393) size 151x151 32 32 [clipPath="clip"] RenderSVGResourceClipper {clipPath} at (0,0) size 100x100 -
trunk/Source/WebCore/ChangeLog
r88553 r88555 1 2011-06-10 Rob Buis <rbuis@rim.com> 2 3 Reviewed by Nikolas Zimmermann. 4 5 amation event handling broken: focusin 6 https://bugs.webkit.org/show_bug.cgi?id=12894 7 8 focusin, focusout, activate not implemented in SVG 9 https://bugs.webkit.org/show_bug.cgi?id=40545 10 11 Make elements that should support GraphicalEventAttribute handle focussing, since focusin, focusout is part of that: 12 13 http://www.w3.org/TR/SVG11/intro.html#TermGraphicalEventAttribute 14 15 Match Opera behaviour ; elements that support GraphicalEventAttribute can receive visual mouse focus when having either a focusin or focusout event handler. Elements that support GraphicalEventAttribute can receive visual keyboard focus when having either a focusin or focusout event handler. Keyboard focus does not advance to SVG elements that are not focusable at the time. 16 17 Tests: svg/custom/focus-event-handling-keyboard.xhtml 18 svg/custom/focus-event-handling.xhtml 19 20 * rendering/svg/SVGRenderSupport.cpp: 21 (WebCore::SVGRenderSupport::computeRectForRepaint): 22 * svg/SVGCircleElement.h: 23 (WebCore::SVGCircleElement::supportsFocus): 24 * svg/SVGEllipseElement.h: 25 (WebCore::SVGEllipseElement::supportsFocus): 26 * svg/SVGGElement.h: 27 (WebCore::SVGGElement::supportsFocus): 28 * svg/SVGImageElement.h: 29 (WebCore::SVGImageElement::supportsFocus): 30 * svg/SVGLineElement.h: 31 (WebCore::SVGLineElement::supportsFocus): 32 * svg/SVGPathElement.h: 33 (WebCore::SVGPathElement::supportsFocus): 34 * svg/SVGPolyElement.h: 35 (WebCore::SVGPolyElement::supportsFocus): 36 * svg/SVGRectElement.h: 37 (WebCore::SVGRectElement::supportsFocus): 38 * svg/SVGSVGElement.h: 39 (WebCore::SVGSVGElement::supportsFocus): 40 * svg/SVGStyledElement.cpp: 41 (WebCore::SVGStyledElement::isMouseFocusable): 42 (WebCore::SVGStyledElement::isKeyboardFocusable): 43 * svg/SVGStyledElement.h: 44 * svg/SVGSwitchElement.h: 45 (WebCore::SVGSwitchElement::supportsFocus): 46 * svg/SVGSymbolElement.h: 47 (WebCore::SVGSymbolElement::supportsFocus): 48 * svg/SVGTextElement.h: 49 (WebCore::SVGTextElement::supportsFocus): 50 * svg/SVGUseElement.h: 51 (WebCore::SVGUseElement::supportsFocus): 52 1 53 2011-06-10 Luke Macpherson <macpherson@chromium.org> 2 54 -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r87310 r88555 64 64 if (const ShadowData* shadow = svgStyle->shadow()) 65 65 shadow->adjustRectForShadow(repaintRect); 66 repaintRect.inflate(object->style()->outlineWidth()); 66 67 67 68 // Translate to coords in our parent renderer, and then call computeRectForRepaint on our parent -
trunk/Source/WebCore/svg/SVGCircleElement.h
r87010 r88555 43 43 44 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 virtual bool supportsFocus() const { return true; } 45 46 46 47 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGEllipseElement.h
r87010 r88555 43 43 44 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 virtual bool supportsFocus() const { return true; } 45 46 46 47 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGGElement.h
r87125 r88555 47 47 private: 48 48 virtual bool isValid() const { return SVGTests::isValid(); } 49 virtual bool supportsFocus() const { return true; } 49 50 50 51 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGImageElement.h
r87010 r88555 47 47 48 48 virtual bool isValid() const { return SVGTests::isValid(); } 49 virtual bool supportsFocus() const { return true; } 49 50 50 51 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGLineElement.h
r87010 r88555 43 43 44 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 virtual bool supportsFocus() const { return true; } 45 46 46 47 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGPathElement.h
r87010 r88555 101 101 102 102 virtual bool isValid() const { return SVGTests::isValid(); } 103 virtual bool supportsFocus() const { return true; } 103 104 104 105 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGPolyElement.h
r87010 r88555 47 47 private: 48 48 virtual bool isValid() const { return SVGTests::isValid(); } 49 virtual bool supportsFocus() const { return true; } 49 50 50 51 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGRectElement.h
r87010 r88555 43 43 44 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 virtual bool supportsFocus() const { return true; } 45 46 46 47 bool isSupportedAttribute(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGSVGElement.h
r88007 r88555 53 53 54 54 virtual bool isValid() const { return SVGTests::isValid(); } 55 virtual bool supportsFocus() const { return true; } 55 56 56 57 // 'SVGSVGElement' functions -
trunk/Source/WebCore/svg/SVGStyledElement.cpp
r87125 r88555 27 27 #include "CSSParser.h" 28 28 #include "Document.h" 29 #include "EventNames.h" 29 30 #include "HTMLNames.h" 30 31 #include "PlatformString.h" … … 507 508 } 508 509 510 bool SVGStyledElement::isMouseFocusable() const 511 { 512 if (!isFocusable()) 513 return false; 514 Element* eventTarget = const_cast<SVGStyledElement *>(this); 515 return eventTarget->hasEventListeners(eventNames().focusinEvent) || eventTarget->hasEventListeners(eventNames().focusoutEvent); 516 } 517 518 bool SVGStyledElement::isKeyboardFocusable(KeyboardEvent*) const 519 { 520 return isMouseFocusable(); 521 } 522 509 523 } 510 524 -
trunk/Source/WebCore/svg/SVGStyledElement.h
r87125 r88555 88 88 virtual bool isStyled() const { return true; } 89 89 90 virtual bool isKeyboardFocusable(KeyboardEvent*) const; 91 virtual bool isMouseFocusable() const; 92 90 93 void buildPendingResourcesIfNeeded() const; 91 94 -
trunk/Source/WebCore/svg/SVGSwitchElement.h
r78249 r88555 42 42 43 43 virtual bool isValid() const { return SVGTests::isValid(); } 44 virtual bool supportsFocus() const { return true; } 44 45 45 46 virtual bool childShouldCreateRenderer(Node*) const; -
trunk/Source/WebCore/svg/SVGSymbolElement.h
r87125 r88555 43 43 SVGSymbolElement(const QualifiedName&, Document*); 44 44 45 virtual bool supportsFocus() const { return true; } 46 45 47 bool isSupportedAttribute(const QualifiedName&); 46 48 virtual void parseMappedAttribute(Attribute*); -
trunk/Source/WebCore/svg/SVGTextElement.h
r87010 r88555 45 45 SVGTextElement(const QualifiedName&, Document*); 46 46 47 virtual bool supportsFocus() const { return true; } 48 47 49 bool isSupportedAttribute(const QualifiedName&); 48 50 virtual void parseMappedAttribute(Attribute*); -
trunk/Source/WebCore/svg/SVGUseElement.h
r87010 r88555 55 55 56 56 virtual bool isValid() const { return SVGTests::isValid(); } 57 virtual bool supportsFocus() const { return true; } 57 58 58 59 virtual void insertedIntoDocument();
Note: See TracChangeset
for help on using the changeset viewer.