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

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

Issue 2615953003: Rename IGNORE_EXCEPTION to IGNORE_EXCEPTION_FOR_TESTING (Closed)
Patch Set: temp Created 3 years, 11 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 1788
1789 VisibleSelection selection = 1789 VisibleSelection selection =
1790 getLayoutObject()->frame()->selection().selection(); 1790 getLayoutObject()->frame()->selection().selection();
1791 Range* selectionRange = firstRangeOf(selection); 1791 Range* selectionRange = firstRangeOf(selection);
1792 ContainerNode* parentNode = getNode()->parentNode(); 1792 ContainerNode* parentNode = getNode()->parentNode();
1793 int nodeIndex = getNode()->nodeIndex(); 1793 int nodeIndex = getNode()->nodeIndex();
1794 if (!selectionRange 1794 if (!selectionRange
1795 // Selection is contained in node. 1795 // Selection is contained in node.
1796 || 1796 ||
1797 !(parentNode && 1797 !(parentNode &&
1798 selectionRange->comparePoint(parentNode, nodeIndex, IGNORE_EXCEPTION) < 1798 selectionRange->comparePoint(parentNode, nodeIndex,
1799 0 && 1799 IGNORE_EXCEPTION_FOR_TESTING) < 0 &&
1800 selectionRange->comparePoint(parentNode, nodeIndex + 1, 1800 selectionRange->comparePoint(parentNode, nodeIndex + 1,
1801 IGNORE_EXCEPTION) > 0)) { 1801 IGNORE_EXCEPTION_FOR_TESTING) > 0)) {
1802 return AXRange(); 1802 return AXRange();
1803 } 1803 }
1804 1804
1805 int start = indexForVisiblePosition(selection.visibleStart()); 1805 int start = indexForVisiblePosition(selection.visibleStart());
1806 ASSERT(start >= 0); 1806 ASSERT(start >= 0);
1807 int end = indexForVisiblePosition(selection.visibleEnd()); 1807 int end = indexForVisiblePosition(selection.visibleEnd());
1808 ASSERT(end >= 0); 1808 ASSERT(end >= 0);
1809 1809
1810 return AXRange(start, end); 1810 return AXRange(start, end);
1811 } 1811 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 } 1851 }
1852 1852
1853 if (!getNode()) 1853 if (!getNode())
1854 return 0; 1854 return 0;
1855 1855
1856 Position indexPosition = position.deepEquivalent(); 1856 Position indexPosition = position.deepEquivalent();
1857 if (indexPosition.isNull()) 1857 if (indexPosition.isNull())
1858 return 0; 1858 return 0;
1859 1859
1860 Range* range = Range::create(*getDocument()); 1860 Range* range = Range::create(*getDocument());
1861 range->setStart(getNode(), 0, IGNORE_EXCEPTION); 1861 range->setStart(getNode(), 0, IGNORE_EXCEPTION_FOR_TESTING);
1862 range->setEnd(indexPosition, IGNORE_EXCEPTION); 1862 range->setEnd(indexPosition, IGNORE_EXCEPTION_FOR_TESTING);
1863 1863
1864 return TextIterator::rangeLength(range->startPosition(), 1864 return TextIterator::rangeLength(range->startPosition(),
1865 range->endPosition()); 1865 range->endPosition());
1866 } 1866 }
1867 1867
1868 AXLayoutObject* AXLayoutObject::getUnignoredObjectFromNode(Node& node) const { 1868 AXLayoutObject* AXLayoutObject::getUnignoredObjectFromNode(Node& node) const {
1869 if (isDetached()) 1869 if (isDetached())
1870 return nullptr; 1870 return nullptr;
1871 1871
1872 AXObject* axObject = axObjectCache().getOrCreate(&node); 1872 AXObject* axObject = axObjectCache().getOrCreate(&node);
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 2489
2490 bool AXLayoutObject::elementAttributeValue( 2490 bool AXLayoutObject::elementAttributeValue(
2491 const QualifiedName& attributeName) const { 2491 const QualifiedName& attributeName) const {
2492 if (!m_layoutObject) 2492 if (!m_layoutObject)
2493 return false; 2493 return false;
2494 2494
2495 return equalIgnoringCase(getAttribute(attributeName), "true"); 2495 return equalIgnoringCase(getAttribute(attributeName), "true");
2496 } 2496 }
2497 2497
2498 } // namespace blink 2498 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698