| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 void RenderBlock::addVisualOverflowFromTheme() | 1505 void RenderBlock::addVisualOverflowFromTheme() |
| 1506 { | 1506 { |
| 1507 if (!style()->hasAppearance()) | 1507 if (!style()->hasAppearance()) |
| 1508 return; | 1508 return; |
| 1509 | 1509 |
| 1510 IntRect inflatedRect = pixelSnappedBorderBoxRect(); | 1510 IntRect inflatedRect = pixelSnappedBorderBoxRect(); |
| 1511 RenderTheme::theme().adjustRepaintRect(this, inflatedRect); | 1511 RenderTheme::theme().adjustRepaintRect(this, inflatedRect); |
| 1512 addVisualOverflow(inflatedRect); | 1512 addVisualOverflow(inflatedRect); |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 bool RenderBlock::createsBlockFormattingContext() const |
| 1516 { |
| 1517 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() ||
hasOverflowClip() || isFlexItemIncludingDeprecated() |
| 1518 || style()->specifiesColumns() || isRenderFlowThread() || isTableCell()
|| isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElement(
) || style()->columnSpan(); |
| 1519 } |
| 1520 |
| 1515 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R
enderBox* child) | 1521 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R
enderBox* child) |
| 1516 { | 1522 { |
| 1517 // FIXME: Technically percentage height objects only need a relayout if thei
r percentage isn't going to be turned into | 1523 // FIXME: Technically percentage height objects only need a relayout if thei
r percentage isn't going to be turned into |
| 1518 // an auto value. Add a method to determine this, so that we can avoid the r
elayout. | 1524 // an auto value. Add a method to determine this, so that we can avoid the r
elayout. |
| 1519 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView(
))) | 1525 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView(
))) |
| 1520 child->setChildNeedsLayout(MarkOnlyThis); | 1526 child->setChildNeedsLayout(MarkOnlyThis); |
| 1521 | 1527 |
| 1522 // If relayoutChildren is set and the child has percentage padding or an emb
edded content box, we also need to invalidate the childs pref widths. | 1528 // If relayoutChildren is set and the child has percentage padding or an emb
edded content box, we also need to invalidate the childs pref widths. |
| 1523 if (relayoutChildren && child->needsPreferredWidthsRecalculation()) | 1529 if (relayoutChildren && child->needsPreferredWidthsRecalculation()) |
| 1524 child->setPreferredLogicalWidthsDirty(MarkOnlyThis); | 1530 child->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 afterLowest = lowestDirtyLine; | 2758 afterLowest = lowestDirtyLine; |
| 2753 lowestDirtyLine = lowestDirtyLine->prevRootBox(); | 2759 lowestDirtyLine = lowestDirtyLine->prevRootBox(); |
| 2754 } | 2760 } |
| 2755 | 2761 |
| 2756 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) { | 2762 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) { |
| 2757 afterLowest->markDirty(); | 2763 afterLowest->markDirty(); |
| 2758 afterLowest = afterLowest->prevRootBox(); | 2764 afterLowest = afterLowest->prevRootBox(); |
| 2759 } | 2765 } |
| 2760 } | 2766 } |
| 2761 | 2767 |
| 2768 bool RenderBlock::avoidsFloats() const |
| 2769 { |
| 2770 // Floats can't intrude into our box if we have a non-auto column count or w
idth. |
| 2771 return RenderBox::avoidsFloats() || !style()->hasAutoColumnCount() || !style
()->hasAutoColumnWidth(); |
| 2772 } |
| 2773 |
| 2762 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) | 2774 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) |
| 2763 { | 2775 { |
| 2764 if (!scrollsOverflow()) | 2776 if (!scrollsOverflow()) |
| 2765 return false; | 2777 return false; |
| 2766 | 2778 |
| 2767 return layer()->scrollableArea()->hitTestOverflowControls(result, roundedInt
Point(locationInContainer - toLayoutSize(accumulatedOffset))); | 2779 return layer()->scrollableArea()->hitTestOverflowControls(result, roundedInt
Point(locationInContainer - toLayoutSize(accumulatedOffset))); |
| 2768 } | 2780 } |
| 2769 | 2781 |
| 2770 Node* RenderBlock::nodeForHitTest() const | 2782 Node* RenderBlock::nodeForHitTest() const |
| 2771 { | 2783 { |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5025 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 5037 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 5026 { | 5038 { |
| 5027 showRenderObject(); | 5039 showRenderObject(); |
| 5028 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 5040 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 5029 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 5041 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 5030 } | 5042 } |
| 5031 | 5043 |
| 5032 #endif | 5044 #endif |
| 5033 | 5045 |
| 5034 } // namespace WebCore | 5046 } // namespace WebCore |
| OLD | NEW |