Changeset 72628 in webkit
- Timestamp:
- Nov 23, 2010 2:33:49 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r72627 r72628 1 2010-11-23 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Include the FrameView widget of a RenderWidget in the accessibility tree. 6 https://bugs.webkit.org/show_bug.cgi?id=49106 7 8 * accessibility/iframe-has-document-expected.txt: Added. 9 * accessibility/iframe-has-document.html: Added. 10 * platform/win/Skipped: 11 1 12 2010-11-23 Tony Chang <tony@chromium.org> 2 13 -
trunk/LayoutTests/platform/win/Skipped
r72553 r72628 380 380 # Sometimes fails http://webkit.org/b/49182 381 381 animations/stop-animation-on-suspend.html 382 383 # Crashing in AccessibilityUIElement::parentElement http://webkit.org/b/49379384 accessibility/iframe-bastardization.html385 382 386 383 ################################################################################ -
trunk/WebCore/ChangeLog
r72626 r72628 1 2010-11-23 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Include the FrameView widget of a RenderWidget in the accessibility tree. 6 https://bugs.webkit.org/show_bug.cgi?id=49106 7 8 Include render widget children in the accessibility tree for not mac webkit ports. 9 10 Test: accessibility/iframe-has-document.html 11 12 * accessibility/AccessibilityRenderObject.cpp: 13 (WebCore::AccessibilityRenderObject::renderParentObject): 14 (WebCore::AccessibilityRenderObject::addChildren): 15 (WebCore::AccessibilityRenderObject::addRenderWidgetChildren): 16 * accessibility/AccessibilityRenderObject.h: 17 * accessibility/chromium/AccessibilityObjectChromium.cpp: 18 (WebCore::AccessibilityObject::accessibilityIgnoreAttachment): 19 1 20 2010-11-23 Chris Rogers <crogers@google.com> 2 21 -
trunk/WebCore/accessibility/AccessibilityRenderObject.cpp
r72259 r72628 391 391 RenderObject* firstChild = 0; 392 392 if (m_renderer->isRenderBlock() && (startOfConts = startOfContinuations(m_renderer))) 393 parent =startOfConts;393 return startOfConts; 394 394 395 395 // Case 2: node's parent is an inline which is some node's continuation; parent is 396 396 // the earliest node in the continuation chain. 397 elseif (parent && parent->isRenderInline() && (startOfConts = startOfContinuations(parent)))398 parent =startOfConts;397 if (parent && parent->isRenderInline() && (startOfConts = startOfContinuations(parent))) 398 return startOfConts; 399 399 400 400 // Case 3: The first sibling is the beginning of a continuation chain. Find the origin of that continuation. 401 elseif (parent && (firstChild = parent->firstChild()) && firstChild->node()) {401 if (parent && (firstChild = parent->firstChild()) && firstChild->node()) { 402 402 // Get the node's renderer and follow that continuation chain until the first child is found 403 403 RenderObject* nodeRenderFirstChild = firstChild->node()->renderer(); 404 404 if (nodeRenderFirstChild != firstChild) { 405 405 for (RenderObject* contsTest = nodeRenderFirstChild; contsTest; contsTest = nextContinuation(contsTest)) { 406 if (contsTest == firstChild) { 407 parent = nodeRenderFirstChild->parent(); 408 break; 409 } 406 if (contsTest == firstChild) 407 return nodeRenderFirstChild->parent(); 410 408 } 411 409 } 412 410 } 411 412 #if !PLATFORM(MAC) 413 // Case 4: The node is a RenderView whose FrameView has an associated RenderWidget. 414 // The parent is the associated RenderWidget. 415 // On the mac port this parent logic is in AccessibilityObjectWrapper.mm. 416 RenderWidget* renderWidget = 0; 417 if (!parent && (renderWidget = RenderWidget::find(frameViewIfRenderView()))) 418 return renderWidget; 419 #endif 413 420 414 421 return parent; … … 3359 3366 } 3360 3367 } 3368 3369 addRenderWidgetChildren(); 3370 } 3371 3372 void AccessibilityRenderObject::addRenderWidgetChildren() 3373 { 3374 #if !PLATFORM(MAC) 3375 // For RenderWidget, add frame's content renderer if the widget is a FrameView. 3376 // On the mac port this children logic is in AccessibilityObjectWrapper.mm. 3377 Widget* widget = widgetForAttachmentView(); 3378 if (!widget || !widget->isFrameView()) 3379 return; 3380 Frame* frame = static_cast<FrameView*>(widget)->frame(); 3381 if (!frame) 3382 return; 3383 RenderView* renderView = frame->contentRenderer(); 3384 if (!renderView) 3385 return; 3386 ASSERT(!m_children.size()); 3387 m_children.append(axObjectCache()->getOrCreate(renderView)); 3388 #endif 3361 3389 } 3362 3390 -
trunk/WebCore/accessibility/AccessibilityRenderObject.h
r70256 r72628 270 270 271 271 private: 272 void addRenderWidgetChildren(); 272 273 void ariaListboxSelectedChildren(AccessibilityChildrenVector&); 273 274 void ariaListboxVisibleChildren(AccessibilityChildrenVector&); -
trunk/WebCore/accessibility/chromium/AccessibilityObjectChromium.cpp
r55855 r72628 27 27 #include "config.h" 28 28 #include "AccessibilityObject.h" 29 #include "Frame.h" 30 #include "FrameView.h" 31 #include "Widget.h" 29 32 30 33 namespace WebCore { … … 32 35 bool AccessibilityObject::accessibilityIgnoreAttachment() const 33 36 { 37 // Ignore render widgets with an attached RenderView because they have 38 // no role and are not useful in the accessibility tree. 39 // On the mac port, these render widgets are ignored by forwarding 40 // calls the to the attached widget. 41 Widget* widget = widgetForAttachmentView(); 42 if (widget && widget->isFrameView()) { 43 Frame* frame = static_cast<FrameView*>(widget)->frame(); 44 if (frame && frame->contentRenderer()) 45 return true; 46 } 47 34 48 return false; 35 49 } -
trunk/WebKit/chromium/ChangeLog
r72624 r72628 1 2010-11-23 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Include the FrameView widget of a RenderWidget in the accessibility tree. 6 https://bugs.webkit.org/show_bug.cgi?id=49106 7 8 * public/WebAccessibilityObject.h: 9 * src/WebAccessibilityObject.cpp: 10 (WebKit::WebAccessibilityObject::equals): 11 (WebKit::WebAccessibilityObject::parentObject): 12 1 13 2010-11-23 John Knottenbelt <jknotten@chromium.org> 2 14 -
trunk/WebKit/chromium/public/WebAccessibilityObject.h
r67418 r72628 64 64 WEBKIT_API void reset(); 65 65 WEBKIT_API void assign(const WebAccessibilityObject&); 66 WEBKIT_API bool equals(const WebAccessibilityObject&) const; 66 67 67 68 bool isNull() const { return !m_private; } -
trunk/WebKit/chromium/src/WebAccessibilityObject.cpp
r71198 r72628 66 66 } 67 67 68 bool WebAccessibilityObject::equals(const WebKit::WebAccessibilityObject& other) const 69 { 70 return (m_private == other.m_private); 71 } 72 68 73 WebString WebAccessibilityObject::accessibilityDescription() const 69 74 { … … 179 184 180 185 m_private->updateBackingStore(); 181 return WebAccessibilityObject(m_private->parentObject ());186 return WebAccessibilityObject(m_private->parentObjectUnignored()); 182 187 } 183 188 -
trunk/WebKitTools/ChangeLog
r72617 r72628 1 2010-11-23 Chris Guillory <chris.guillory@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 Include the FrameView widget of a RenderWidget in the accessibility tree. 6 https://bugs.webkit.org/show_bug.cgi?id=49106 7 8 * DumpRenderTree/chromium/AccessibilityUIElement.cpp: 9 (AccessibilityUIElement::AccessibilityUIElement): 10 (AccessibilityUIElement::parentElementCallback): 11 (AccessibilityUIElement::isEqualCallback): 12 * DumpRenderTree/chromium/AccessibilityUIElement.h: 13 * DumpRenderTree/chromium/CppBoundClass.cpp: 14 (CppBoundClass::getFromCppVariant): 15 * DumpRenderTree/chromium/CppBoundClass.h: 16 1 17 2010-11-23 Alex Grilo <abgrilo@profusion.mobi> 2 18 -
trunk/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp
r70064 r72628 305 305 bindMethod("increment", &AccessibilityUIElement::incrementCallback); 306 306 bindMethod("decrement", &AccessibilityUIElement::decrementCallback); 307 bindMethod("isEqual", &AccessibilityUIElement::isEqualCallback); 307 308 308 309 bindProperty("role", &AccessibilityUIElement::roleGetterCallback); … … 491 492 void AccessibilityUIElement::parentElementCallback(const CppArgumentList&, CppVariant* result) 492 493 { 493 result->setNull(); 494 AccessibilityUIElement* parent = m_factory->create(accessibilityObject().parentObject()); 495 if (parent) 496 result->set(*(parent->getAsCppVariant())); 497 else 498 result->setNull(); 494 499 } 495 500 … … 502 507 { 503 508 result->setNull(); 509 } 510 511 void AccessibilityUIElement::isEqualCallback(const CppArgumentList& arguments, CppVariant* result) 512 { 513 bool equal = false; 514 AccessibilityUIElement* element = static_cast<AccessibilityUIElement*>(CppBoundClass::getFromCppVariant(arguments[0])); 515 if (element) 516 equal = accessibilityObject().equals(element->accessibilityObject()); 517 result->set(equal); 504 518 } 505 519 -
trunk/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h
r70064 r72628 83 83 void incrementCallback(const CppArgumentList&, CppVariant*); 84 84 void decrementCallback(const CppArgumentList&, CppVariant*); 85 void isEqualCallback(const CppArgumentList&, CppVariant*); 85 86 void fallbackCallback(const CppArgumentList&, CppVariant*); 86 87 -
trunk/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp
r70064 r72628 325 325 } 326 326 327 // static 328 CppBoundClass* CppBoundClass::getFromCppVariant(const CppVariant& value) 329 { 330 if (!value.isObject()) 331 return 0; 332 NPObject* npObj = NPVARIANT_TO_OBJECT(value); 333 if (!npObj || npObj->_class != &CppNPObject::npClass) 334 return 0; 335 CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj); 336 return obj->boundClass; 337 } 338 327 339 CppVariant* CppBoundClass::getAsCppVariant() 328 340 { -
trunk/WebKitTools/DumpRenderTree/chromium/CppBoundClass.h
r55563 r72628 86 86 virtual ~CppBoundClass(); 87 87 88 // Return the CppBoundClass bound to a CppVariant if it exists. Returns null 89 // otherwise. 90 static CppBoundClass* getFromCppVariant(const CppVariant&); 91 88 92 // Return a CppVariant representing this class, for use with BindProperty(). 89 93 // The variant type is guaranteed to be NPVariantType_Object.
Note: See TracChangeset
for help on using the changeset viewer.