| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 if (hasNonCompositedScrollbars()) | 718 if (hasNonCompositedScrollbars()) |
| 719 return false; | 719 return false; |
| 720 | 720 |
| 721 // We can't detect whether a plugin has box effects, so disable this optimiz
ation for that case. | 721 // We can't detect whether a plugin has box effects, so disable this optimiz
ation for that case. |
| 722 if (isEmbeddedObject()) | 722 if (isEmbeddedObject()) |
| 723 return false; | 723 return false; |
| 724 | 724 |
| 725 return !hasBoxEffect(); | 725 return !hasBoxEffect(); |
| 726 } | 726 } |
| 727 | 727 |
| 728 LayoutBlock* LayoutObject::firstLineBlock() const | |
| 729 { | |
| 730 return nullptr; | |
| 731 } | |
| 732 | |
| 733 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) | 728 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) |
| 734 { | 729 { |
| 735 // FIXME: In future it may be possible to broaden these conditions in order
to improve performance. | 730 // FIXME: In future it may be possible to broaden these conditions in order
to improve performance. |
| 736 if (object->isTextControl()) | 731 if (object->isTextControl()) |
| 737 return true; | 732 return true; |
| 738 | 733 |
| 739 if (object->isSVGRoot()) | 734 if (object->isSVGRoot()) |
| 740 return true; | 735 return true; |
| 741 | 736 |
| 742 if (!object->hasOverflowClip()) | 737 if (!object->hasOverflowClip()) |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2815 Uncached | 2810 Uncached |
| 2816 }; | 2811 }; |
| 2817 | 2812 |
| 2818 static PassRefPtr<ComputedStyle> firstLineStyleForCachedUncachedType(StyleCacheS
tate type, const LayoutObject* layoutObject, ComputedStyle* style) | 2813 static PassRefPtr<ComputedStyle> firstLineStyleForCachedUncachedType(StyleCacheS
tate type, const LayoutObject* layoutObject, ComputedStyle* style) |
| 2819 { | 2814 { |
| 2820 const LayoutObject* layoutObjectForFirstLineStyle = layoutObject; | 2815 const LayoutObject* layoutObjectForFirstLineStyle = layoutObject; |
| 2821 if (layoutObject->isBeforeOrAfterContent()) | 2816 if (layoutObject->isBeforeOrAfterContent()) |
| 2822 layoutObjectForFirstLineStyle = layoutObject->parent(); | 2817 layoutObjectForFirstLineStyle = layoutObject->parent(); |
| 2823 | 2818 |
| 2824 if (layoutObjectForFirstLineStyle->isLayoutBlockFlow() || layoutObjectForFir
stLineStyle->isLayoutButton()) { | 2819 if (layoutObjectForFirstLineStyle->isLayoutBlockFlow() || layoutObjectForFir
stLineStyle->isLayoutButton()) { |
| 2825 if (LayoutBlock* firstLineBlock = layoutObjectForFirstLineStyle->firstLi
neBlock()) { | 2820 if (LayoutBlock* firstLineBlock = toLayoutBlock(layoutObjectForFirstLine
Style)->firstLineBlock()) { |
| 2826 if (type == Cached) | 2821 if (type == Cached) |
| 2827 return firstLineBlock->getCachedPseudoStyle(FIRST_LINE, style); | 2822 return firstLineBlock->getCachedPseudoStyle(FIRST_LINE, style); |
| 2828 return firstLineBlock->getUncachedPseudoStyle(PseudoStyleRequest(FIR
ST_LINE), style, firstLineBlock == layoutObject ? style : 0); | 2823 return firstLineBlock->getUncachedPseudoStyle(PseudoStyleRequest(FIR
ST_LINE), style, firstLineBlock == layoutObject ? style : 0); |
| 2829 } | 2824 } |
| 2830 } else if (!layoutObjectForFirstLineStyle->isAnonymous() && layoutObjectForF
irstLineStyle->isLayoutInline() | 2825 } else if (!layoutObjectForFirstLineStyle->isAnonymous() && layoutObjectForF
irstLineStyle->isLayoutInline() |
| 2831 && !layoutObjectForFirstLineStyle->node()->isFirstLetterPseudoElement())
{ | 2826 && !layoutObjectForFirstLineStyle->node()->isFirstLetterPseudoElement())
{ |
| 2832 const ComputedStyle* parentStyle = layoutObjectForFirstLineStyle->parent
()->firstLineStyle(); | 2827 const ComputedStyle* parentStyle = layoutObjectForFirstLineStyle->parent
()->firstLineStyle(); |
| 2833 if (parentStyle != layoutObjectForFirstLineStyle->parent()->style()) { | 2828 if (parentStyle != layoutObjectForFirstLineStyle->parent()->style()) { |
| 2834 if (type == Cached) { | 2829 if (type == Cached) { |
| 2835 // A first-line style is in effect. Cache a first-line style for
ourselves. | 2830 // A first-line style is in effect. Cache a first-line style for
ourselves. |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3518 const blink::LayoutObject* root = object1; | 3513 const blink::LayoutObject* root = object1; |
| 3519 while (root->parent()) | 3514 while (root->parent()) |
| 3520 root = root->parent(); | 3515 root = root->parent(); |
| 3521 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3516 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3522 } else { | 3517 } else { |
| 3523 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3518 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3524 } | 3519 } |
| 3525 } | 3520 } |
| 3526 | 3521 |
| 3527 #endif | 3522 #endif |
| OLD | NEW |