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

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

Issue 2287433003: Get rid of remaining uses of AXObject::elementRect (Closed)
Patch Set: Rebase Created 4 years, 3 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 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void AXInlineTextBox::init() 53 void AXInlineTextBox::init()
54 { 54 {
55 } 55 }
56 56
57 void AXInlineTextBox::detach() 57 void AXInlineTextBox::detach()
58 { 58 {
59 AXObject::detach(); 59 AXObject::detach();
60 m_inlineTextBox = nullptr; 60 m_inlineTextBox = nullptr;
61 } 61 }
62 62
63 LayoutRect AXInlineTextBox::elementRect() const
64 {
65 if (!m_inlineTextBox)
66 return LayoutRect();
67
68 return m_inlineTextBox->absoluteBounds();
69 }
70
71 void AXInlineTextBox::getRelativeBounds(AXObject** outContainer, FloatRect& outB oundsInContainer, SkMatrix44& outContainerTransform) const 63 void AXInlineTextBox::getRelativeBounds(AXObject** outContainer, FloatRect& outB oundsInContainer, SkMatrix44& outContainerTransform) const
72 { 64 {
73 *outContainer = nullptr; 65 *outContainer = nullptr;
74 outBoundsInContainer = FloatRect(); 66 outBoundsInContainer = FloatRect();
75 outContainerTransform.setIdentity(); 67 outContainerTransform.setIdentity();
76 68
77 if (!m_inlineTextBox) 69 if (!m_inlineTextBox)
78 return; 70 return;
79 71
80 *outContainer = parentObject(); 72 *outContainer = parentObject();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (previousOnLine) 176 if (previousOnLine)
185 return m_axObjectCache->getOrCreate(previousOnLine.get()); 177 return m_axObjectCache->getOrCreate(previousOnLine.get());
186 178
187 if (!m_inlineTextBox->isFirst()) 179 if (!m_inlineTextBox->isFirst())
188 return 0; 180 return 0;
189 181
190 return parentObject()->previousOnLine(); 182 return parentObject()->previousOnLine();
191 } 183 }
192 184
193 } // namespace blink 185 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698