Changeset 79920 in webkit
- Timestamp:
- Feb 28, 2011 2:14:21 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79919 r79920 1 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r78789. 4 http://trac.webkit.org/changeset/78789 5 https://bugs.webkit.org/show_bug.cgi?id=55409 6 7 Incorrect canvas fallback implementation (Requested by 8 inferno-sec on #webkit). 9 10 * accessibility/canvas-fallback-content-expected.txt: Removed. 11 * accessibility/canvas-fallback-content.html: Removed. 12 * accessibility/canvas.html: 13 1 14 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 15 -
trunk/LayoutTests/accessibility/canvas.html
r78789 r79920 35 35 <body id="body" onload="_onload()"> 36 36 37 <!-- This test makes sure that a canvas element shows up as a grouping (because it can have fallback content) -->37 <html> 38 38 39 <canvas title="myCanvasTitle" id="myCanvas" style="width:300px;height:300px;" width='300' height='300' alt="canvas 1"></canvas> 39 <!-- This test makes sure that a canvas element shows up as an image --> 40 41 <canvas id="myCanvas" style="width:300px;height:300px;" width='300' height='300' alt="canvas 1"></canvas> 40 42 41 43 <div id="result"></div> … … 49 51 var canvasElement = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0); 50 52 51 var pattern = "AXRole: AXGroup"; 52 var pattern2 = "AXTitle: myCanvasTitle"; 53 if (canvasElement.allAttributes().indexOf(pattern) != -1 && canvasElement.allAttributes().indexOf(pattern2) != -1) { 53 var pattern = "AXRole: AXImage"; 54 if (canvasElement.allAttributes().indexOf(pattern) != -1) { 54 55 result.innerText += "Test passed\n"; 55 56 } -
trunk/Source/WebCore/ChangeLog
r79919 r79920 1 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r78789. 4 http://trac.webkit.org/changeset/78789 5 https://bugs.webkit.org/show_bug.cgi?id=55409 6 7 Incorrect canvas fallback implementation (Requested by 8 inferno-sec on #webkit). 9 10 * accessibility/AccessibilityObject.h: 11 * accessibility/AccessibilityRenderObject.cpp: 12 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 13 (WebCore::AccessibilityRenderObject::canHaveChildren): 14 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 15 (atkRole): 16 * accessibility/mac/AccessibilityObjectWrapper.mm: 17 * html/HTMLFormControlElement.cpp: 18 (WebCore::HTMLFormControlElement::isFocusable): 19 * rendering/RenderHTMLCanvas.cpp: 20 * rendering/RenderHTMLCanvas.h: 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::repaint): 23 * rendering/RenderTreeAsText.cpp: 24 (WebCore::write): 25 1 26 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 27 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r78789 r79920 143 143 ColumnHeaderRole, 144 144 RowHeaderRole, 145 CanvasRole,146 145 // AppKit includes SortButtonRole but it is misnamed and really a subrole of ButtonRole so we do not include it here. 147 146 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r79559 r79920 3022 3022 } 3023 3023 if (node && node->hasTagName(canvasTag)) 3024 return CanvasRole;3024 return ImageRole; 3025 3025 3026 3026 if (cssBox && cssBox->isRenderView()) … … 3289 3289 if (!m_renderer) 3290 3290 return false; 3291 3291 3292 3292 // Elements that should not have children 3293 3293 switch (roleValue()) { -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r79196 r79920 472 472 case ListBoxOptionRole: 473 473 return ATK_ROLE_LIST_ITEM; 474 case CanvasRole:475 return ATK_ROLE_PANEL;476 474 default: 477 475 return ATK_ROLE_UNKNOWN; -
trunk/Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
r78789 r79920 1287 1287 { TreeRole, NSAccessibilityOutlineRole }, 1288 1288 { TreeItemRole, NSAccessibilityRowRole }, 1289 { ListItemRole, NSAccessibilityGroupRole }, 1290 { CanvasRole, NSAccessibilityGroupRole } 1289 { ListItemRole, NSAccessibilityGroupRole } 1291 1290 }; 1292 1291 AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap; -
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
r78789 r79920 240 240 bool HTMLFormControlElement::isFocusable() const 241 241 { 242 if (!renderer() || !renderer()->isBox()) 242 if (!renderer() || 243 !renderer()->isBox() || toRenderBox(renderer())->size().isEmpty()) 243 244 return false; 244 245 if (toRenderBox(renderer())->size().isEmpty()) {246 // An empty render box shouldn't be focusable unless it's part of canvas fallback content.247 bool isCanvasFallbackContent = false;248 const Element* e = this;249 while (e) {250 if (e->hasLocalName(canvasTag)) {251 isCanvasFallbackContent = true;252 break;253 }254 e = e->parentElement();255 }256 if (!isCanvasFallbackContent)257 return false;258 }259 260 245 // HTMLElement::isFocusable handles visibility and calls suportsFocus which 261 246 // will cover the disabled case. -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp
r79919 r79920 31 31 #include "FrameView.h" 32 32 #include "GraphicsContext.h" 33 #include "HitTestResult.h"34 33 #include "HTMLCanvasElement.h" 35 34 #include "HTMLNames.h" … … 89 88 } 90 89 91 void RenderHTMLCanvas::recursiveSetNoNeedsLayout(RenderObject* obj)92 {93 obj->setNeedsLayout(false);94 for (RenderObject* child = obj->firstChild(); child; child = child->nextSibling())95 recursiveSetNoNeedsLayout(child);96 }97 98 void RenderHTMLCanvas::layout()99 {100 recursiveSetNoNeedsLayout(this);101 setNeedsLayout(true);102 RenderReplaced::layout();103 }104 105 bool RenderHTMLCanvas::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)106 {107 UNUSED_PARAM(request);108 UNUSED_PARAM(result);109 UNUSED_PARAM(x);110 UNUSED_PARAM(y);111 UNUSED_PARAM(tx);112 UNUSED_PARAM(ty);113 UNUSED_PARAM(action);114 return false;115 }116 117 90 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.h
r78789 r79920 40 40 virtual bool requiresLayer() const; 41 41 42 const RenderObjectChildList* children() const { return &m_children; }43 RenderObjectChildList* children() { return &m_children; }44 45 virtual bool canHaveChildren() const { return true; }46 virtual void layout();47 48 42 void canvasSizeChanged(); 49 43 … … 52 46 virtual void paintReplaced(PaintInfo&, int tx, int ty); 53 47 virtual void intrinsicSizeChanged() { canvasSizeChanged(); } 54 55 virtual RenderObjectChildList* virtualChildren() { return children(); }56 virtual const RenderObjectChildList* virtualChildren() const { return children(); }57 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);58 59 void recursiveSetNoNeedsLayout(RenderObject*);60 61 RenderObjectChildList m_children;62 48 }; 63 49 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r79196 r79920 1312 1312 return; // Don't repaint if we're printing. 1313 1313 1314 if (!containingBlock())1315 return; // Don't repaint if there's no containing block; currently this only happens for canvas fallback content.1316 1317 1314 RenderBoxModelObject* repaintContainer = containerForRepaint(); 1318 1315 repaintUsingContainer(repaintContainer ? repaintContainer : view, clippedOverflowRectForRepaint(repaintContainer), immediate); -
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
r79196 r79920 542 542 } 543 543 544 if (!o.isCanvas()) { 545 for (RenderObject* child = o.firstChild(); child; child = child->nextSibling()) { 546 if (child->hasLayer()) 547 continue; 548 write(ts, *child, indent + 1, behavior); 549 } 544 for (RenderObject* child = o.firstChild(); child; child = child->nextSibling()) { 545 if (child->hasLayer()) 546 continue; 547 write(ts, *child, indent + 1, behavior); 550 548 } 551 549 -
trunk/Source/WebKit/chromium/ChangeLog
r79917 r79920 1 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r78789. 4 http://trac.webkit.org/changeset/78789 5 https://bugs.webkit.org/show_bug.cgi?id=55409 6 7 Incorrect canvas fallback implementation (Requested by 8 inferno-sec on #webkit). 9 10 * public/WebAccessibilityRole.h: 11 * src/AssertMatchingEnums.cpp: 12 1 13 2011-02-28 Adam Klein <adamk@chromium.org> 2 14 -
trunk/Source/WebKit/chromium/public/WebAccessibilityRole.h
r78789 r79920 88 88 WebAccessibilityRoleColumnHeader, 89 89 WebAccessibilityRoleRowHeader, 90 WebAccessibilityRoleCanvas,91 90 92 91 WebAccessibilityRoleWebCoreLink, -
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
r78789 r79920 146 146 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleColumnHeader, ColumnHeaderRole); 147 147 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRowHeader, RowHeaderRole); 148 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCanvas, CanvasRole);149 148 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebCoreLink, WebCoreLinkRole); 150 149 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImageMapLink, ImageMapLinkRole); -
trunk/Source/WebKit/win/AccessibleBase.cpp
r78789 r79920 661 661 case WebCore::ImageRole: 662 662 return ROLE_SYSTEM_GRAPHIC; 663 case WebCore::CanvasRole:664 return ROLE_SYSTEM_GROUPING;665 663 case WebCore::MenuListOptionRole: 666 664 case WebCore::ListItemRole: -
trunk/Source/WebKit/win/ChangeLog
r79793 r79920 1 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r78789. 4 http://trac.webkit.org/changeset/78789 5 https://bugs.webkit.org/show_bug.cgi?id=55409 6 7 Incorrect canvas fallback implementation (Requested by 8 inferno-sec on #webkit). 9 10 * AccessibleBase.cpp: 11 (MSAARole): 12 1 13 2011-02-26 Vsevolod Vlasov <vsevik@chromium.org> 2 14
Note: See TracChangeset
for help on using the changeset viewer.