| 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 | 1628 |
| 1629 return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRect
Flags); | 1629 return parent->mapToVisualRectInAncestorSpace(ancestor, rect, visualRect
Flags); |
| 1630 } | 1630 } |
| 1631 return true; | 1631 return true; |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) | 1634 void LayoutObject::dirtyLinesFromChangedChild(LayoutObject*) |
| 1635 { | 1635 { |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 #ifndef NDEBUG | 1638 //#ifndef NDEBUG |
| 1639 | 1639 |
| 1640 void LayoutObject::showTreeForThis() const | 1640 void LayoutObject::showTreeForThis() const |
| 1641 { | 1641 { |
| 1642 if (node()) | 1642 if (node()) |
| 1643 node()->showTreeForThis(); | 1643 node()->showTreeForThis(); |
| 1644 } | 1644 } |
| 1645 | 1645 |
| 1646 void LayoutObject::showLayoutTreeForThis() const | 1646 void LayoutObject::showLayoutTreeForThis() const |
| 1647 { | 1647 { |
| 1648 showLayoutTree(this, 0); | 1648 showLayoutTree(this, 0); |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 #ifndef NDEBUG |
| 1651 void LayoutObject::showLineTreeForThis() const | 1652 void LayoutObject::showLineTreeForThis() const |
| 1652 { | 1653 { |
| 1653 if (containingBlock()) | 1654 if (containingBlock()) |
| 1654 containingBlock()->showLineTreeAndMark(0, 0, 0, 0, this); | 1655 containingBlock()->showLineTreeAndMark(0, 0, 0, 0, this); |
| 1655 } | 1656 } |
| 1657 #endif |
| 1656 | 1658 |
| 1657 void LayoutObject::showLayoutObject() const | 1659 void LayoutObject::showLayoutObject() const |
| 1658 { | 1660 { |
| 1659 showLayoutObject(0); | 1661 showLayoutObject(0); |
| 1660 } | 1662 } |
| 1661 | 1663 |
| 1662 void LayoutObject::showLayoutObject(int printedCharacters) const | 1664 void LayoutObject::showLayoutObject(int printedCharacters) const |
| 1663 { | 1665 { |
| 1664 printedCharacters += fprintf(stderr, "%s %p", decoratedName().ascii().data()
, this); | 1666 printedCharacters += fprintf(stderr, "%s %p", decoratedName().ascii().data()
, this); |
| 1665 | 1667 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1689 printedCharacters += fprintf(stderr, "%s", markedLabel2); | 1691 printedCharacters += fprintf(stderr, "%s", markedLabel2); |
| 1690 for (; printedCharacters < depth * 2; printedCharacters++) | 1692 for (; printedCharacters < depth * 2; printedCharacters++) |
| 1691 fputc(' ', stderr); | 1693 fputc(' ', stderr); |
| 1692 | 1694 |
| 1693 showLayoutObject(printedCharacters); | 1695 showLayoutObject(printedCharacters); |
| 1694 | 1696 |
| 1695 for (const LayoutObject* child = slowFirstChild(); child; child = child->nex
tSibling()) | 1697 for (const LayoutObject* child = slowFirstChild(); child; child = child->nex
tSibling()) |
| 1696 child->showLayoutTreeAndMark(markedObject1, markedLabel1, markedObject2,
markedLabel2, depth + 1); | 1698 child->showLayoutTreeAndMark(markedObject1, markedLabel1, markedObject2,
markedLabel2, depth + 1); |
| 1697 } | 1699 } |
| 1698 | 1700 |
| 1699 #endif // NDEBUG | 1701 // #endif // NDEBUG |
| 1700 | 1702 |
| 1701 bool LayoutObject::isSelectable() const | 1703 bool LayoutObject::isSelectable() const |
| 1702 { | 1704 { |
| 1703 return !isInert() && !(style()->userSelect() == SELECT_NONE && style()->user
Modify() == READ_ONLY); | 1705 return !isInert() && !(style()->userSelect() == SELECT_NONE && style()->user
Modify() == READ_ONLY); |
| 1704 } | 1706 } |
| 1705 | 1707 |
| 1706 Color LayoutObject::selectionBackgroundColor() const | 1708 Color LayoutObject::selectionBackgroundColor() const |
| 1707 { | 1709 { |
| 1708 if (!isSelectable()) | 1710 if (!isSelectable()) |
| 1709 return Color::transparent; | 1711 return Color::transparent; |
| (...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 } | 3647 } |
| 3646 | 3648 |
| 3647 void LayoutObject::clearObjectPaintProperties() | 3649 void LayoutObject::clearObjectPaintProperties() |
| 3648 { | 3650 { |
| 3649 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 3651 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 3650 objectPaintPropertiesMap().remove(this); | 3652 objectPaintPropertiesMap().remove(this); |
| 3651 } | 3653 } |
| 3652 | 3654 |
| 3653 } // namespace blink | 3655 } // namespace blink |
| 3654 | 3656 |
| 3655 #ifndef NDEBUG | 3657 //#ifndef NDEBUG |
| 3656 | 3658 |
| 3657 void showTree(const blink::LayoutObject* object) | 3659 void showTree(const blink::LayoutObject* object) |
| 3658 { | 3660 { |
| 3659 if (object) | 3661 if (object) |
| 3660 object->showTreeForThis(); | 3662 object->showTreeForThis(); |
| 3661 else | 3663 else |
| 3662 fprintf(stderr, "Cannot showTree. Root is (nil)\n"); | 3664 fprintf(stderr, "Cannot showTree. Root is (nil)\n"); |
| 3663 } | 3665 } |
| 3664 | 3666 |
| 3665 void showLineTree(const blink::LayoutObject* object) | 3667 void showLineTree(const blink::LayoutObject* object) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3680 if (object1) { | 3682 if (object1) { |
| 3681 const blink::LayoutObject* root = object1; | 3683 const blink::LayoutObject* root = object1; |
| 3682 while (root->parent()) | 3684 while (root->parent()) |
| 3683 root = root->parent(); | 3685 root = root->parent(); |
| 3684 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3686 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3685 } else { | 3687 } else { |
| 3686 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3688 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3687 } | 3689 } |
| 3688 } | 3690 } |
| 3689 | 3691 |
| 3690 #endif | 3692 //#endif |
| OLD | NEW |