Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 1667623002: Make sure Document::updateLayoutTree*() is called before Element::isFocusable(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole) 511 if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole)
512 return m_ariaRole; 512 return m_ariaRole;
513 if (node()->isTextNode()) 513 if (node()->isTextNode())
514 return StaticTextRole; 514 return StaticTextRole;
515 515
516 AccessibilityRole role = nativeAccessibilityRoleIgnoringAria(); 516 AccessibilityRole role = nativeAccessibilityRoleIgnoringAria();
517 if (role != UnknownRole) 517 if (role != UnknownRole)
518 return role; 518 return role;
519 if (node()->isElementNode()) { 519 if (node()->isElementNode()) {
520 Element* element = toElement(node()); 520 Element* element = toElement(node());
521 if (element->isInCanvasSubtree() && element->isFocusable()) 521 if (element->isInCanvasSubtree()) {
522 return GroupRole; 522 document()->updateLayoutTreeIgnorePendingStylesheets();
dmazzoni 2016/02/04 04:10:56 I'm worried that this could trigger bugs - this co
tkent 2016/02/04 05:47:32 I think this is safe. - It seems AXLayoutObject d
523 if (element->isFocusable())
524 return GroupRole;
525 }
523 } 526 }
524 return UnknownRole; 527 return UnknownRole;
525 } 528 }
526 529
527 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const 530 AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const
528 { 531 {
529 const AtomicString& ariaRole = getAttribute(roleAttr); 532 const AtomicString& ariaRole = getAttribute(roleAttr);
530 if (ariaRole.isNull() || ariaRole.isEmpty()) 533 if (ariaRole.isNull() || ariaRole.isEmpty())
531 return UnknownRole; 534 return UnknownRole;
532 535
(...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2748 return placeholder; 2751 return placeholder;
2749 } 2752 }
2750 2753
2751 DEFINE_TRACE(AXNodeObject) 2754 DEFINE_TRACE(AXNodeObject)
2752 { 2755 {
2753 visitor->trace(m_node); 2756 visitor->trace(m_node);
2754 AXObject::trace(visitor); 2757 AXObject::trace(visitor);
2755 } 2758 }
2756 2759
2757 } // namespace blink 2760 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698