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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 495763005: Switch to using accessibilityEnabled and inlineTextBoxAccessibilityEnabled from settings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/editing/Editor.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 bool Node::isEditableToAccessibility(EditableLevel editableLevel) const 581 bool Node::isEditableToAccessibility(EditableLevel editableLevel) const
582 { 582 {
583 if (hasEditableStyle(editableLevel)) 583 if (hasEditableStyle(editableLevel))
584 return true; 584 return true;
585 585
586 // FIXME: Respect editableLevel for ARIA editable elements. 586 // FIXME: Respect editableLevel for ARIA editable elements.
587 if (editableLevel == RichlyEditable) 587 if (editableLevel == RichlyEditable)
588 return false; 588 return false;
589 589
590 ASSERT(AXObjectCache::accessibilityEnabled()); 590 ASSERT(document().settings() && document().settings()->accessibilityEnabled( ));
591 ASSERT(document().existingAXObjectCache()); 591 ASSERT(document().existingAXObjectCache());
592 592
593 if (AXObjectCache* cache = document().existingAXObjectCache()) 593 if (AXObjectCache* cache = document().existingAXObjectCache())
594 return cache->rootAXEditableElement(this); 594 return cache->rootAXEditableElement(this);
595 595
596 return false; 596 return false;
597 } 597 }
598 598
599 RenderBox* Node::renderBox() const 599 RenderBox* Node::renderBox() const
600 { 600 {
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 1841
1842 if (const EventTargetData* eventTargetData = this->eventTargetData()) { 1842 if (const EventTargetData* eventTargetData = this->eventTargetData()) {
1843 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap; 1843 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap;
1844 if (!listenerMap.isEmpty()) { 1844 if (!listenerMap.isEmpty()) {
1845 Vector<AtomicString> types = listenerMap.eventTypes(); 1845 Vector<AtomicString> types = listenerMap.eventTypes();
1846 for (unsigned i = 0; i < types.size(); ++i) 1846 for (unsigned i = 0; i < types.size(); ++i)
1847 document().addListenerTypeIfNeeded(types[i]); 1847 document().addListenerTypeIfNeeded(types[i]);
1848 } 1848 }
1849 } 1849 }
1850 1850
1851 if (AXObjectCache::accessibilityEnabled()) { 1851 Settings* settings = document().settings();
1852 if (settings && settings->accessibilityEnabled()) {
1852 if (AXObjectCache* cache = oldDocument.existingAXObjectCache()) 1853 if (AXObjectCache* cache = oldDocument.existingAXObjectCache())
1853 cache->remove(this); 1854 cache->remove(this);
1854 } 1855 }
1855 1856
1856 oldDocument.markers().removeMarkers(this); 1857 oldDocument.markers().removeMarkers(this);
1857 oldDocument.updateRangesAfterNodeMovedToAnotherDocument(*this); 1858 oldDocument.updateRangesAfterNodeMovedToAnotherDocument(*this);
1858 if (oldDocument.frameHost() && !document().frameHost()) 1859 if (oldDocument.frameHost() && !document().frameHost())
1859 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his); 1860 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his);
1860 else if (document().frameHost() && !oldDocument.frameHost()) 1861 else if (document().frameHost() && !oldDocument.frameHost())
1861 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s); 1862 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 node->showTreeForThis(); 2483 node->showTreeForThis();
2483 } 2484 }
2484 2485
2485 void showNodePath(const blink::Node* node) 2486 void showNodePath(const blink::Node* node)
2486 { 2487 {
2487 if (node) 2488 if (node)
2488 node->showNodePathForThis(); 2489 node->showNodePathForThis();
2489 } 2490 }
2490 2491
2491 #endif 2492 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698