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

Side by Side Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 53423003: WIP: Update AXObjects when a modal dialog is opened/closed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update tree Created 7 years, 1 month 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
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 obj->notifyIfIgnoredValueChanged(); 643 obj->notifyIfIgnoredValueChanged();
644 } 644 }
645 645
646 void AXObjectCache::updateCacheAfterNodeIsAttached(Node* node) 646 void AXObjectCache::updateCacheAfterNodeIsAttached(Node* node)
647 { 647 {
648 // Calling get() will update the AX object if we had an AXNodeObject but now we need 648 // Calling get() will update the AX object if we had an AXNodeObject but now we need
649 // an AXRenderObject, because it was reparented to a location outside of a c anvas. 649 // an AXRenderObject, because it was reparented to a location outside of a c anvas.
650 get(node); 650 get(node);
651 } 651 }
652 652
653 static void updateAfterInertSubtreesChanged(AXObject* object)
654 {
655 if (object->notifyIfIgnoredValueChanged())
656 return;
657 AXObject::AccessibilityChildrenVector children = object->children();
658 size_t count = children.size();
659 for (size_t i = 0; i < count; ++i)
660 updateAfterInertSubtreesChanged(children[i].get());
661 }
662
663 void AXObjectCache::updateCacheAfterInertSubtreesChanged()
664 {
665 m_computedObjectAttributeCache->clear();
666 updateAfterInertSubtreesChanged(rootObject());
667 }
668
653 void AXObjectCache::childrenChanged(Node* node) 669 void AXObjectCache::childrenChanged(Node* node)
654 { 670 {
655 childrenChanged(get(node)); 671 childrenChanged(get(node));
656 } 672 }
657 673
658 void AXObjectCache::childrenChanged(RenderObject* renderer) 674 void AXObjectCache::childrenChanged(RenderObject* renderer)
659 { 675 {
660 childrenChanged(get(renderer)); 676 childrenChanged(get(renderer));
661 } 677 }
662 678
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } 1035 }
1020 1036
1021 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) 1037 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode)
1022 { 1038 {
1023 // The anchor node may not be accessible. Post the notification for the 1039 // The anchor node may not be accessible. Post the notification for the
1024 // first accessible object. 1040 // first accessible object.
1025 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode) , AXScrolledToAnchor); 1041 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode) , AXScrolledToAnchor);
1026 } 1042 }
1027 1043
1028 } // namespace WebCore 1044 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698