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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp

Issue 1761633002: One accessibility tree per frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix is-richly-editable test Created 4 years, 9 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 dialog->document().clearFocusedElement(); 78 dialog->document().clearFocusedElement();
79 } 79 }
80 80
81 static void inertSubtreesChanged(Document& document) 81 static void inertSubtreesChanged(Document& document)
82 { 82 {
83 // When a modal dialog opens or closes, nodes all over the accessibility 83 // When a modal dialog opens or closes, nodes all over the accessibility
84 // tree can change inertness which means they must be added or removed from 84 // tree can change inertness which means they must be added or removed from
85 // the tree. The most foolproof way is to clear the entire tree and rebuild 85 // the tree. The most foolproof way is to clear the entire tree and rebuild
86 // it, though a more clever way is probably possible. 86 // it, though a more clever way is probably possible.
87 Document& topDocument = document.topDocument(); 87 document.clearAXObjectCache();
88 topDocument.clearAXObjectCache(); 88 if (AXObjectCache* cache = document.axObjectCache())
89 if (AXObjectCache* cache = topDocument.axObjectCache()) 89 cache->childrenChanged(&document);
90 cache->childrenChanged(&topDocument);
91 } 90 }
92 91
93 inline HTMLDialogElement::HTMLDialogElement(Document& document) 92 inline HTMLDialogElement::HTMLDialogElement(Document& document)
94 : HTMLElement(dialogTag, document) 93 : HTMLElement(dialogTag, document)
95 , m_centeringMode(NotCentered) 94 , m_centeringMode(NotCentered)
96 , m_centeredPosition(0) 95 , m_centeredPosition(0)
97 , m_returnValue("") 96 , m_returnValue("")
98 { 97 {
99 UseCounter::count(document, UseCounter::DialogElement); 98 UseCounter::count(document, UseCounter::DialogElement);
100 } 99 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 { 202 {
204 if (event->type() == EventTypeNames::cancel) { 203 if (event->type() == EventTypeNames::cancel) {
205 closeDialog(); 204 closeDialog();
206 event->setDefaultHandled(); 205 event->setDefaultHandled();
207 return; 206 return;
208 } 207 }
209 HTMLElement::defaultEventHandler(event); 208 HTMLElement::defaultEventHandler(event);
210 } 209 }
211 210
212 } // namespace blink 211 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698