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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 containingBlock()->showLineTreeAndMark(0, 0, 0, 0, this); | 1539 containingBlock()->showLineTreeAndMark(0, 0, 0, 0, this); |
1540 } | 1540 } |
1541 | 1541 |
1542 void LayoutObject::showLayoutObject() const | 1542 void LayoutObject::showLayoutObject() const |
1543 { | 1543 { |
1544 showLayoutObject(0); | 1544 showLayoutObject(0); |
1545 } | 1545 } |
1546 | 1546 |
1547 void LayoutObject::showLayoutObject(int printedCharacters) const | 1547 void LayoutObject::showLayoutObject(int printedCharacters) const |
1548 { | 1548 { |
1549 printedCharacters += fprintf(stderr, "%s %p", decoratedName().ascii().data()
, this); | 1549 IntRect size = absoluteBoundingBoxRect(); |
| 1550 printedCharacters += fprintf(stderr, "%s %p (%d,%d %dx%d)", decoratedName().
ascii().data(), this, size.x(), size.y(), size.width(), size.height()); |
1550 | 1551 |
1551 if (isText() && toLayoutText(this)->isTextFragment()) | 1552 if (isText() && toLayoutText(this)->isTextFragment()) |
1552 printedCharacters += fprintf(stderr, " \"%s\" ", toLayoutText(this)->tex
t().ascii().data()); | 1553 printedCharacters += fprintf(stderr, " \"%s\" ", toLayoutText(this)->tex
t().ascii().data()); |
1553 | 1554 |
1554 if (node()) { | 1555 if (node()) { |
1555 if (printedCharacters) | 1556 if (printedCharacters) |
1556 for (; printedCharacters < showTreeCharacterOffset; printedCharacter
s++) | 1557 for (; printedCharacters < showTreeCharacterOffset; printedCharacter
s++) |
1557 fputc(' ', stderr); | 1558 fputc(' ', stderr); |
1558 fputc('\t', stderr); | 1559 fputc('\t', stderr); |
| 1560 fputc('\t', stderr); |
1559 node()->showNode(); | 1561 node()->showNode(); |
1560 } else { | 1562 } else { |
1561 fputc('\n', stderr); | 1563 fputc('\n', stderr); |
1562 } | 1564 } |
1563 } | 1565 } |
1564 | 1566 |
1565 void LayoutObject::showLayoutTreeAndMark(const LayoutObject* markedObject1, cons
t char* markedLabel1, const LayoutObject* markedObject2, const char* markedLabel
2, int depth) const | 1567 void LayoutObject::showLayoutTreeAndMark(const LayoutObject* markedObject1, cons
t char* markedLabel1, const LayoutObject* markedObject2, const char* markedLabel
2, int depth) const |
1566 { | 1568 { |
1567 int printedCharacters = 0; | 1569 int printedCharacters = 0; |
1568 if (markedObject1 == this && markedLabel1) | 1570 if (markedObject1 == this && markedLabel1) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1696 if (diff.needsPaintInvalidationLayer() && !hasLayer()) { | 1698 if (diff.needsPaintInvalidationLayer() && !hasLayer()) { |
1697 diff.clearNeedsPaintInvalidation(); | 1699 diff.clearNeedsPaintInvalidation(); |
1698 diff.setNeedsPaintInvalidationObject(); | 1700 diff.setNeedsPaintInvalidationObject(); |
1699 } | 1701 } |
1700 | 1702 |
1701 return diff; | 1703 return diff; |
1702 } | 1704 } |
1703 | 1705 |
1704 void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle) | 1706 void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle) |
1705 { | 1707 { |
1706 ASSERT(pseudoStyle->styleType() == BEFORE || pseudoStyle->styleType() == AFT
ER || pseudoStyle->styleType() == FIRST_LETTER); | 1708 ASSERT(pseudoStyle->styleType() == BEFORE || pseudoStyle->styleType() == AFT
ER || pseudoStyle->styleType() == FIRST_LETTER |
| 1709 || (RuntimeEnabledFeatures::listMarkerPseudoElementEnabled() && pseudoSt
yle->styleType() == MARKER)); |
1707 | 1710 |
1708 // FIXME: We should consider just making all pseudo items use an inherited s
tyle. | 1711 // FIXME: We should consider just making all pseudo items use an inherited s
tyle. |
1709 | 1712 |
1710 // Images are special and must inherit the pseudoStyle so the width and heig
ht of | 1713 // Images are special and must inherit the pseudoStyle so the width and heig
ht of |
1711 // the pseudo element doesn't change the size of the image. In all other cas
es we | 1714 // the pseudo element doesn't change the size of the image. In all other cas
es we |
1712 // can just share the style. | 1715 // can just share the style. |
1713 // | 1716 // |
1714 // Quotes are also LayoutInline, so we need to create an inherited style to
avoid | 1717 // Quotes are also LayoutInline, so we need to create an inherited style to
avoid |
1715 // getting an inline with positioning or an invalid display. | 1718 // getting an inline with positioning or an invalid display. |
1716 // | 1719 // |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3310 { | 3313 { |
3311 if (object1) { | 3314 if (object1) { |
3312 const blink::LayoutObject* root = object1; | 3315 const blink::LayoutObject* root = object1; |
3313 while (root->parent()) | 3316 while (root->parent()) |
3314 root = root->parent(); | 3317 root = root->parent(); |
3315 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3318 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3316 } | 3319 } |
3317 } | 3320 } |
3318 | 3321 |
3319 #endif | 3322 #endif |
OLD | NEW |