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. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1631 { | 1631 { |
1632 return clippedOverflowRectForPaintInvalidation(view()); | 1632 return clippedOverflowRectForPaintInvalidation(view()); |
1633 } | 1633 } |
1634 | 1634 |
1635 LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox ModelObject*, const PaintInvalidationState*) const | 1635 LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox ModelObject*, const PaintInvalidationState*) const |
1636 { | 1636 { |
1637 ASSERT_NOT_REACHED(); | 1637 ASSERT_NOT_REACHED(); |
1638 return LayoutRect(); | 1638 return LayoutRect(); |
1639 } | 1639 } |
1640 | 1640 |
1641 void LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* a ncestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const | 1641 bool LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* a ncestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, VisibleRectFlags visibleRectFlags) const |
chrishtr
2016/03/24 21:18:43
"When this method is called, the coordinate space
szager1
2016/03/24 21:52:28
Done.
| |
1642 { | 1642 { |
1643 if (ancestor == this) | 1643 if (ancestor == this) |
1644 return; | 1644 return true; |
1645 | 1645 |
1646 if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ances tor)) { | 1646 if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ances tor)) |
1647 paintInvalidationState->mapObjectRectToAncestor(*this, ancestor, rect); | 1647 return paintInvalidationState->mapObjectRectToAncestor(*this, ancestor, rect, visibleRectFlags); |
1648 return; | |
1649 } | |
1650 | 1648 |
1651 if (LayoutObject* parent = this->parent()) { | 1649 if (LayoutObject* parent = this->parent()) { |
1652 if (parent->hasOverflowClip()) { | 1650 if (parent->hasOverflowClip()) { |
1653 LayoutBox* parentBox = toLayoutBox(parent); | 1651 LayoutBox* parentBox = toLayoutBox(parent); |
1654 parentBox->mapScrollingContentsRectToBoxSpace(rect); | 1652 parentBox->mapScrollingContentsRectToBoxSpace(rect); |
1655 if (parent != ancestor) | 1653 if (parent != ancestor && !parentBox->applyOverflowClip(rect, visibl eRectFlags)) |
1656 parentBox->applyOverflowClip(rect); | 1654 return false; |
1657 if (rect.isEmpty()) | |
1658 return; | |
1659 } | 1655 } |
1660 | 1656 |
1661 parent->mapToVisibleRectInAncestorSpace(ancestor, rect, nullptr); | 1657 return parent->mapToVisibleRectInAncestorSpace(ancestor, rect, nullptr, visibleRectFlags); |
1662 } | 1658 } |
1659 return true; | |
1663 } | 1660 } |
1664 | 1661 |
1665 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) | 1662 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) |
1666 { | 1663 { |
1667 } | 1664 } |
1668 | 1665 |
1669 #ifndef NDEBUG | 1666 #ifndef NDEBUG |
1670 | 1667 |
1671 void LayoutObject::showTreeForThis() const | 1668 void LayoutObject::showTreeForThis() const |
1672 { | 1669 { |
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3737 const blink::LayoutObject* root = object1; | 3734 const blink::LayoutObject* root = object1; |
3738 while (root->parent()) | 3735 while (root->parent()) |
3739 root = root->parent(); | 3736 root = root->parent(); |
3740 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3737 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3741 } else { | 3738 } else { |
3742 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3739 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3743 } | 3740 } |
3744 } | 3741 } |
3745 | 3742 |
3746 #endif | 3743 #endif |
OLD | NEW |