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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 { | 1630 { |
1631 return clippedOverflowRectForPaintInvalidation(view()); | 1631 return clippedOverflowRectForPaintInvalidation(view()); |
1632 } | 1632 } |
1633 | 1633 |
1634 LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox
ModelObject*, const PaintInvalidationState*) const | 1634 LayoutRect LayoutObject::clippedOverflowRectForPaintInvalidation(const LayoutBox
ModelObject*, const PaintInvalidationState*) const |
1635 { | 1635 { |
1636 ASSERT_NOT_REACHED(); | 1636 ASSERT_NOT_REACHED(); |
1637 return LayoutRect(); | 1637 return LayoutRect(); |
1638 } | 1638 } |
1639 | 1639 |
1640 void LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* a
ncestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState)
const | 1640 bool LayoutObject::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* a
ncestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState,
int flags) const |
1641 { | 1641 { |
1642 if (ancestor == this) | 1642 if (ancestor == this) |
1643 return; | 1643 return true; |
1644 | 1644 |
1645 if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ances
tor)) { | 1645 if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ances
tor)) |
1646 paintInvalidationState->mapObjectRectToAncestor(*this, ancestor, rect); | 1646 return paintInvalidationState->mapObjectRectToAncestor(*this, ancestor,
rect, flags); |
1647 return; | |
1648 } | |
1649 | 1647 |
1650 if (LayoutObject* parent = this->parent()) { | 1648 if (LayoutObject* parent = this->parent()) { |
1651 if (parent->hasOverflowClip()) { | 1649 if (parent->hasOverflowClip()) { |
1652 LayoutBox* parentBox = toLayoutBox(parent); | 1650 LayoutBox* parentBox = toLayoutBox(parent); |
1653 parentBox->mapScrollingContentsRectToBoxSpace(rect); | 1651 parentBox->mapScrollingContentsRectToBoxSpace(rect); |
1654 if (parent != ancestor) | 1652 if (parent != ancestor && !parentBox->applyOverflowClip(rect, flags)
) |
1655 parentBox->applyOverflowClip(rect); | 1653 return false; |
1656 if (rect.isEmpty()) | |
1657 return; | |
1658 } | 1654 } |
1659 | 1655 |
1660 parent->mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidatio
nState); | 1656 return parent->mapToVisibleRectInAncestorSpace(ancestor, rect, paintInva
lidationState, flags); |
1661 } | 1657 } |
| 1658 return true; |
1662 } | 1659 } |
1663 | 1660 |
1664 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) | 1661 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) |
1665 { | 1662 { |
1666 } | 1663 } |
1667 | 1664 |
1668 #ifndef NDEBUG | 1665 #ifndef NDEBUG |
1669 | 1666 |
1670 void LayoutObject::showTreeForThis() const | 1667 void LayoutObject::showTreeForThis() const |
1671 { | 1668 { |
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3727 const blink::LayoutObject* root = object1; | 3724 const blink::LayoutObject* root = object1; |
3728 while (root->parent()) | 3725 while (root->parent()) |
3729 root = root->parent(); | 3726 root = root->parent(); |
3730 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3727 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3731 } else { | 3728 } else { |
3732 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3729 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3733 } | 3730 } |
3734 } | 3731 } |
3735 | 3732 |
3736 #endif | 3733 #endif |
OLD | NEW |