Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 } | 61 } |
| 62 | 62 |
| 63 LayoutRect AXInlineTextBox::elementRect() const | 63 LayoutRect AXInlineTextBox::elementRect() const |
| 64 { | 64 { |
| 65 if (!m_inlineTextBox) | 65 if (!m_inlineTextBox) |
| 66 return LayoutRect(); | 66 return LayoutRect(); |
| 67 | 67 |
| 68 return m_inlineTextBox->bounds(); | 68 return m_inlineTextBox->bounds(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void AXInlineTextBox::getRelativeBounds(AXObject** outContainer, FloatRect& outB oundsInContainer, SkMatrix44& outContainerTransform) const | |
| 72 { | |
| 73 *outContainer = nullptr; | |
| 74 outBoundsInContainer = FloatRect(); | |
| 75 outContainerTransform.setIdentity(); | |
| 76 | |
| 77 if (!m_inlineTextBox) | |
|
aboxhall
2016/07/28 18:40:43
Maybe a comment explaining the guarantees made by
dmazzoni
2016/07/28 21:43:16
I included a lot of documentation in AXObject.h, i
aboxhall
2016/07/28 22:13:10
It was more that I did a bit of a double take at r
| |
| 78 return; | |
| 79 | |
| 80 *outContainer = parentObject(); | |
| 81 outBoundsInContainer = FloatRect(m_inlineTextBox->bounds()); | |
| 82 } | |
| 83 | |
| 71 bool AXInlineTextBox::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReaso ns) const | 84 bool AXInlineTextBox::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReaso ns) const |
| 72 { | 85 { |
| 73 AXObject* parent = parentObject(); | 86 AXObject* parent = parentObject(); |
| 74 if (!parent) | 87 if (!parent) |
| 75 return false; | 88 return false; |
| 76 | 89 |
| 77 if (!parent->accessibilityIsIgnored()) | 90 if (!parent->accessibilityIsIgnored()) |
| 78 return false; | 91 return false; |
| 79 | 92 |
| 80 if (ignoredReasons) | 93 if (ignoredReasons) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 if (previousOnLine) | 184 if (previousOnLine) |
| 172 return m_axObjectCache->getOrCreate(previousOnLine.get()); | 185 return m_axObjectCache->getOrCreate(previousOnLine.get()); |
| 173 | 186 |
| 174 if (!m_inlineTextBox->isFirst()) | 187 if (!m_inlineTextBox->isFirst()) |
| 175 return 0; | 188 return 0; |
| 176 | 189 |
| 177 return parentObject()->previousOnLine(); | 190 return parentObject()->previousOnLine(); |
| 178 } | 191 } |
| 179 | 192 |
| 180 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |