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 #include "core/layout/LayoutText.h" | 10 #include "core/layout/LayoutText.h" |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 void setShouldDoFullPaintInvalidation() | 439 void setShouldDoFullPaintInvalidation() |
440 { | 440 { |
441 m_layoutObject->setShouldDoFullPaintInvalidation(); | 441 m_layoutObject->setShouldDoFullPaintInvalidation(); |
442 } | 442 } |
443 | 443 |
444 void slowSetPaintingLayerNeedsRepaint() | 444 void slowSetPaintingLayerNeedsRepaint() |
445 { | 445 { |
446 ObjectPaintInvalidator(*m_layoutObject).slowSetPaintingLayerNeedsRepaint
(); | 446 ObjectPaintInvalidator(*m_layoutObject).slowSetPaintingLayerNeedsRepaint
(); |
447 } | 447 } |
448 | 448 |
| 449 bool needToRestoreCollapsedSpace() |
| 450 { |
| 451 return isText() && toLayoutText(m_layoutObject)->needToRestoreCollapsedS
pace(); |
| 452 } |
| 453 |
| 454 void setNeedToRestoreCollapsedSpace(bool needToRestoreCollapsedSpace) |
| 455 { |
| 456 if (isText()) |
| 457 toLayoutText(m_layoutObject)->setNeedToRestoreCollapsedSpace(needToR
estoreCollapsedSpace); |
| 458 } |
| 459 |
449 struct LineLayoutItemHash { | 460 struct LineLayoutItemHash { |
450 STATIC_ONLY(LineLayoutItemHash); | 461 STATIC_ONLY(LineLayoutItemHash); |
451 static unsigned hash(const LineLayoutItem& key) { return WTF::PtrHash<La
youtObject>::hash(key.m_layoutObject); } | 462 static unsigned hash(const LineLayoutItem& key) { return WTF::PtrHash<La
youtObject>::hash(key.m_layoutObject); } |
452 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b) | 463 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b) |
453 { | 464 { |
454 return WTF::PtrHash<LayoutObject>::equal(a.m_layoutObject, b.m_layou
tObject); | 465 return WTF::PtrHash<LayoutObject>::equal(a.m_layoutObject, b.m_layou
tObject); |
455 } | 466 } |
456 static const bool safeToCompareToEmptyOrDeleted = true; | 467 static const bool safeToCompareToEmptyOrDeleted = true; |
457 }; | 468 }; |
458 | 469 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 518 |
508 template <> | 519 template <> |
509 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo
utItem> { | 520 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo
utItem> { |
510 STATIC_ONLY(HashTraits); | 521 STATIC_ONLY(HashTraits); |
511 }; | 522 }; |
512 | 523 |
513 } // namespace WTF | 524 } // namespace WTF |
514 | 525 |
515 | 526 |
516 #endif // LineLayoutItem_h | 527 #endif // LineLayoutItem_h |
OLD | NEW |