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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp

Issue 2169273004: Switch all LayoutTests to use new accessibility relative bounding box API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make two tests more robust Created 4 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
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return nullptr; 91 return nullptr;
92 92
93 return getOrCreate(m_lineLayoutItem, m_inlineTextBox->nextTextBox()); 93 return getOrCreate(m_lineLayoutItem, m_inlineTextBox->nextTextBox());
94 } 94 }
95 95
96 LayoutRect AbstractInlineTextBox::bounds() const 96 LayoutRect AbstractInlineTextBox::bounds() const
97 { 97 {
98 if (!m_inlineTextBox || !m_lineLayoutItem) 98 if (!m_inlineTextBox || !m_lineLayoutItem)
99 return LayoutRect(); 99 return LayoutRect();
100 100
101 FloatRect boundaries(m_inlineTextBox->calculateBoundaries()); 101 return m_inlineTextBox->calculateBoundaries();
102 return LayoutRect(m_lineLayoutItem.localToAbsoluteQuad(boundaries).enclosing BoundingBox());
103 } 102 }
104 103
105 unsigned AbstractInlineTextBox::len() const 104 unsigned AbstractInlineTextBox::len() const
106 { 105 {
107 if (!m_inlineTextBox) 106 if (!m_inlineTextBox)
108 return 0; 107 return 0;
109 108
110 return m_inlineTextBox->len(); 109 return m_inlineTextBox->len();
111 } 110 }
112 111
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return nullptr; 200 return nullptr;
202 201
203 InlineBox* previous = m_inlineTextBox->prevOnLine(); 202 InlineBox* previous = m_inlineTextBox->prevOnLine();
204 if (previous && previous->isInlineTextBox()) 203 if (previous && previous->isInlineTextBox())
205 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl ineTextBox(previous)); 204 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl ineTextBox(previous));
206 205
207 return nullptr; 206 return nullptr;
208 } 207 }
209 208
210 } // namespace blink 209 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698