| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef LineLayoutItem_h | 5 #ifndef LineLayoutItem_h |
| 6 #define LineLayoutItem_h | 6 #define LineLayoutItem_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutObject.h" | 8 #include "core/layout/LayoutObject.h" |
| 9 #include "core/layout/LayoutObjectInlines.h" | 9 #include "core/layout/LayoutObjectInlines.h" |
| 10 | 10 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 PositionWithAffinity positionForPoint(const LayoutPoint& point) | 307 PositionWithAffinity positionForPoint(const LayoutPoint& point) |
| 308 { | 308 { |
| 309 return m_layoutObject->positionForPoint(point); | 309 return m_layoutObject->positionForPoint(point); |
| 310 } | 310 } |
| 311 | 311 |
| 312 PositionWithAffinity createPositionWithAffinity(int offset, TextAffinity aff
inity) | 312 PositionWithAffinity createPositionWithAffinity(int offset, TextAffinity aff
inity) |
| 313 { | 313 { |
| 314 return m_layoutObject->createPositionWithAffinity(offset, affinity); | 314 return m_layoutObject->createPositionWithAffinity(offset, affinity); |
| 315 } | 315 } |
| 316 | 316 |
| 317 LineLayoutItem previousInPreOrder(const LayoutObject* stayWithin) const |
| 318 { |
| 319 return LineLayoutItem(m_layoutObject->previousInPreOrder(stayWithin)); |
| 320 } |
| 321 |
| 317 #ifndef NDEBUG | 322 #ifndef NDEBUG |
| 318 | 323 |
| 319 const char* name() const | 324 const char* name() const |
| 320 { | 325 { |
| 321 return m_layoutObject->name(); | 326 return m_layoutObject->name(); |
| 322 } | 327 } |
| 323 | 328 |
| 324 // Intentionally returns a void* to avoid exposing LayoutObject* to the line | 329 // Intentionally returns a void* to avoid exposing LayoutObject* to the line |
| 325 // layout code. | 330 // layout code. |
| 326 void* debugPointer() const | 331 void* debugPointer() const |
| 327 { | 332 { |
| 328 return m_layoutObject; | 333 return m_layoutObject; |
| 329 } | 334 } |
| 330 | 335 |
| 331 #endif | 336 #endif |
| 332 | 337 |
| 333 protected: | 338 protected: |
| 334 LayoutObject* layoutObject() { return m_layoutObject; } | 339 LayoutObject* layoutObject() { return m_layoutObject; } |
| 335 const LayoutObject* layoutObject() const { return m_layoutObject; } | 340 const LayoutObject* layoutObject() const { return m_layoutObject; } |
| 336 | 341 |
| 337 private: | 342 private: |
| 338 LayoutObject* m_layoutObject; | 343 LayoutObject* m_layoutObject; |
| 339 | 344 |
| 340 friend class LineLayoutPaintShim; | 345 friend class LineLayoutPaintShim; |
| 341 }; | 346 }; |
| 342 | 347 |
| 343 } // namespace blink | 348 } // namespace blink |
| 344 | 349 |
| 345 #endif // LineLayoutItem_h | 350 #endif // LineLayoutItem_h |
| OLD | NEW |