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

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

Issue 1041463003: Remove methods of TextIterator that take Range objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add assertions Created 5 years, 8 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/page/EventHandler.cpp ('k') | Source/web/WebLocalFrameImpl.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 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 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 return 0; 1848 return 0;
1849 1849
1850 Position indexPosition = pos.deepEquivalent(); 1850 Position indexPosition = pos.deepEquivalent();
1851 if (indexPosition.isNull() || highestEditableRoot(indexPosition, HasEditable AXRole) != node) 1851 if (indexPosition.isNull() || highestEditableRoot(indexPosition, HasEditable AXRole) != node)
1852 return 0; 1852 return 0;
1853 1853
1854 RefPtrWillBeRawPtr<Range> range = Range::create(m_layoutObject->document()); 1854 RefPtrWillBeRawPtr<Range> range = Range::create(m_layoutObject->document());
1855 range->setStart(node, 0, IGNORE_EXCEPTION); 1855 range->setStart(node, 0, IGNORE_EXCEPTION);
1856 range->setEnd(indexPosition, IGNORE_EXCEPTION); 1856 range->setEnd(indexPosition, IGNORE_EXCEPTION);
1857 1857
1858 return TextIterator::rangeLength(range.get()); 1858 return TextIterator::rangeLength(range->startPosition(), range->endPosition( ));
1859 } 1859 }
1860 1860
1861 void AXLayoutObject::addInlineTextBoxChildren(bool force) 1861 void AXLayoutObject::addInlineTextBoxChildren(bool force)
1862 { 1862 {
1863 Settings* settings = document()->settings(); 1863 Settings* settings = document()->settings();
1864 if (!force && (!settings || !settings->inlineTextBoxAccessibilityEnabled())) 1864 if (!force && (!settings || !settings->inlineTextBoxAccessibilityEnabled()))
1865 return; 1865 return;
1866 1866
1867 if (!layoutObject() || !layoutObject()->isText()) 1867 if (!layoutObject() || !layoutObject()->isText())
1868 return; 1868 return;
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 if (label && label->layoutObject()) { 2367 if (label && label->layoutObject()) {
2368 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2368 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2369 result.unite(labelRect); 2369 result.unite(labelRect);
2370 } 2370 }
2371 } 2371 }
2372 2372
2373 return result; 2373 return result;
2374 } 2374 }
2375 2375
2376 } // namespace blink 2376 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698