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

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

Issue 1433253003: [Line Layout API] Convert AbstractInlineTextBox to new line layout API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove layoutObject() method Created 5 years 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 | « third_party/WebKit/Source/core/layout/line/InlineTextBox.h ('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) 2013, Google Inc. All rights reserved. 2 * Copyright (C) 2013, 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 nameFrom = AXNameFromContents; 121 nameFrom = AXNameFromContents;
122 return m_inlineTextBox->text(); 122 return m_inlineTextBox->text();
123 } 123 }
124 124
125 AXObject* AXInlineTextBox::computeParent() const 125 AXObject* AXInlineTextBox::computeParent() const
126 { 126 {
127 ASSERT(!isDetached()); 127 ASSERT(!isDetached());
128 if (!m_inlineTextBox || !m_axObjectCache) 128 if (!m_inlineTextBox || !m_axObjectCache)
129 return 0; 129 return 0;
130 130
131 LayoutText* layoutText = m_inlineTextBox->layoutText(); 131 LineLayoutText lineLayoutText = m_inlineTextBox->lineLayoutItem();
132 return m_axObjectCache->getOrCreate(layoutText); 132 return m_axObjectCache->getOrCreate(lineLayoutText);
133 } 133 }
134 134
135 // In addition to LTR and RTL direction, edit fields also support 135 // In addition to LTR and RTL direction, edit fields also support
136 // top to bottom and bottom to top via the CSS writing-mode property. 136 // top to bottom and bottom to top via the CSS writing-mode property.
137 AccessibilityTextDirection AXInlineTextBox::textDirection() const 137 AccessibilityTextDirection AXInlineTextBox::textDirection() const
138 { 138 {
139 if (!m_inlineTextBox) 139 if (!m_inlineTextBox)
140 return AXObject::textDirection(); 140 return AXObject::textDirection();
141 141
142 switch (m_inlineTextBox->direction()) { 142 switch (m_inlineTextBox->direction()) {
(...skipping 28 matching lines...) Expand all
171 if (previousOnLine) 171 if (previousOnLine)
172 return m_axObjectCache->getOrCreate(previousOnLine.get()); 172 return m_axObjectCache->getOrCreate(previousOnLine.get());
173 173
174 if (!m_inlineTextBox->isFirst()) 174 if (!m_inlineTextBox->isFirst())
175 return 0; 175 return 0;
176 176
177 return parentObject()->previousOnLine(); 177 return parentObject()->previousOnLine();
178 } 178 }
179 179
180 } // namespace blink 180 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineTextBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698