OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3575 | 3575 |
3576 LayoutRect LayoutObject::DebugRect() const { | 3576 LayoutRect LayoutObject::DebugRect() const { |
3577 LayoutRect rect; | 3577 LayoutRect rect; |
3578 LayoutBlock* block = ContainingBlock(); | 3578 LayoutBlock* block = ContainingBlock(); |
3579 if (block) | 3579 if (block) |
3580 block->AdjustChildDebugRect(rect); | 3580 block->AdjustChildDebugRect(rect); |
3581 | 3581 |
3582 return rect; | 3582 return rect; |
3583 } | 3583 } |
3584 | 3584 |
| 3585 FragmentData* LayoutObject::MutableForPainting::FirstFragment() { |
| 3586 if (auto* paint_data = layout_object_.GetRarePaintData()) |
| 3587 return paint_data->Fragment(); |
| 3588 return nullptr; |
| 3589 } |
| 3590 |
| 3591 FragmentData& LayoutObject::MutableForPainting::EnsureFirstFragment() { |
| 3592 return layout_object_.EnsureRarePaintData().EnsureFragment(); |
| 3593 } |
| 3594 |
3585 void LayoutObject::InvalidatePaintForSelection() { | 3595 void LayoutObject::InvalidatePaintForSelection() { |
3586 // setSelectionState() propagates the state up the containing block chain to | 3596 // setSelectionState() propagates the state up the containing block chain to |
3587 // tell if a block contains selected nodes or not. If this layout object is | 3597 // tell if a block contains selected nodes or not. If this layout object is |
3588 // not a block, we need to get the selection state from the containing block | 3598 // not a block, we need to get the selection state from the containing block |
3589 // to tell if we have any selected node children. | 3599 // to tell if we have any selected node children. |
3590 LayoutBlock* block = | 3600 LayoutBlock* block = |
3591 IsLayoutBlock() ? ToLayoutBlock(this) : ContainingBlock(); | 3601 IsLayoutBlock() ? ToLayoutBlock(this) : ContainingBlock(); |
3592 if (!block) | 3602 if (!block) |
3593 return; | 3603 return; |
3594 if (!block->HasSelectedChildren()) | 3604 if (!block->HasSelectedChildren()) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3635 const blink::LayoutObject* root = object1; | 3645 const blink::LayoutObject* root = object1; |
3636 while (root->Parent()) | 3646 while (root->Parent()) |
3637 root = root->Parent(); | 3647 root = root->Parent(); |
3638 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3648 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3639 } else { | 3649 } else { |
3640 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3650 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3641 } | 3651 } |
3642 } | 3652 } |
3643 | 3653 |
3644 #endif | 3654 #endif |
OLD | NEW |