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

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

Issue 1285233004: Get rid of a redundant argument DOWNSTREAM from VisiblePosition constructor call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T12:36:19 Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | 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 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 return toLayoutTextControl(m_layoutObject)->textFormControlElement()->vi siblePositionForIndex(index); 2169 return toLayoutTextControl(m_layoutObject)->textFormControlElement()->vi siblePositionForIndex(index);
2170 2170
2171 if (!allowsTextRanges() && !m_layoutObject->isText()) 2171 if (!allowsTextRanges() && !m_layoutObject->isText())
2172 return VisiblePosition(); 2172 return VisiblePosition();
2173 2173
2174 Node* node = m_layoutObject->node(); 2174 Node* node = m_layoutObject->node();
2175 if (!node) 2175 if (!node)
2176 return VisiblePosition(); 2176 return VisiblePosition();
2177 2177
2178 if (index <= 0) 2178 if (index <= 0)
2179 return VisiblePosition(firstPositionInOrBeforeNode(node), DOWNSTREAM); 2179 return VisiblePosition(firstPositionInOrBeforeNode(node));
2180 2180
2181 Position start, end; 2181 Position start, end;
2182 bool selected = Range::selectNodeContents(node, start, end); 2182 bool selected = Range::selectNodeContents(node, start, end);
2183 if (!selected) 2183 if (!selected)
2184 return VisiblePosition(); 2184 return VisiblePosition();
2185 2185
2186 CharacterIterator it(start, end); 2186 CharacterIterator it(start, end);
2187 it.advance(index - 1); 2187 it.advance(index - 1);
2188 return VisiblePosition(Position(it.currentContainer(), it.endOffset()), UPST REAM); 2188 return VisiblePosition(Position(it.currentContainer(), it.endOffset()), UPST REAM);
2189 } 2189 }
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 if (label && label->layoutObject()) { 2644 if (label && label->layoutObject()) {
2645 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2645 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2646 result.unite(labelRect); 2646 result.unite(labelRect);
2647 } 2647 }
2648 } 2648 }
2649 2649
2650 return result; 2650 return result;
2651 } 2651 }
2652 2652
2653 } // namespace blink 2653 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698