| 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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 void RenderBlock::addVisualOverflowFromTheme() | 1450 void RenderBlock::addVisualOverflowFromTheme() |
| 1451 { | 1451 { |
| 1452 if (!style()->hasAppearance()) | 1452 if (!style()->hasAppearance()) |
| 1453 return; | 1453 return; |
| 1454 | 1454 |
| 1455 IntRect inflatedRect = pixelSnappedBorderBoxRect(); | 1455 IntRect inflatedRect = pixelSnappedBorderBoxRect(); |
| 1456 RenderTheme::theme().adjustRepaintRect(this, inflatedRect); | 1456 RenderTheme::theme().adjustRepaintRect(this, inflatedRect); |
| 1457 addVisualOverflow(inflatedRect); | 1457 addVisualOverflow(inflatedRect); |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 bool RenderBlock::createsBlockFormattingContext() const |
| 1461 { |
| 1462 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() ||
hasOverflowClip() || isFlexItemIncludingDeprecated() |
| 1463 || style()->specifiesColumns() || isRenderFlowThread() || isTableCell()
|| isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElement(
) || style()->columnSpan(); |
| 1464 } |
| 1465 |
| 1460 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R
enderBox* child) | 1466 void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, R
enderBox* child) |
| 1461 { | 1467 { |
| 1462 // FIXME: Technically percentage height objects only need a relayout if thei
r percentage isn't going to be turned into | 1468 // FIXME: Technically percentage height objects only need a relayout if thei
r percentage isn't going to be turned into |
| 1463 // an auto value. Add a method to determine this, so that we can avoid the r
elayout. | 1469 // an auto value. Add a method to determine this, so that we can avoid the r
elayout. |
| 1464 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView(
))) | 1470 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView(
))) |
| 1465 child->setChildNeedsLayout(MarkOnlyThis); | 1471 child->setChildNeedsLayout(MarkOnlyThis); |
| 1466 | 1472 |
| 1467 // 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. | 1473 // 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. |
| 1468 if (relayoutChildren && child->needsPreferredWidthsRecalculation()) | 1474 if (relayoutChildren && child->needsPreferredWidthsRecalculation()) |
| 1469 child->setPreferredLogicalWidthsDirty(MarkOnlyThis); | 1475 child->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2692 afterLowest = lowestDirtyLine; | 2698 afterLowest = lowestDirtyLine; |
| 2693 lowestDirtyLine = lowestDirtyLine->prevRootBox(); | 2699 lowestDirtyLine = lowestDirtyLine->prevRootBox(); |
| 2694 } | 2700 } |
| 2695 | 2701 |
| 2696 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) { | 2702 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) { |
| 2697 afterLowest->markDirty(); | 2703 afterLowest->markDirty(); |
| 2698 afterLowest = afterLowest->prevRootBox(); | 2704 afterLowest = afterLowest->prevRootBox(); |
| 2699 } | 2705 } |
| 2700 } | 2706 } |
| 2701 | 2707 |
| 2708 bool RenderBlock::avoidsFloats() const |
| 2709 { |
| 2710 // Floats can't intrude into our box if we have a non-auto column count or w
idth. |
| 2711 return RenderBox::avoidsFloats() || !style()->hasAutoColumnCount() || !style
()->hasAutoColumnWidth(); |
| 2712 } |
| 2713 |
| 2702 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) | 2714 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) |
| 2703 { | 2715 { |
| 2704 if (!scrollsOverflow()) | 2716 if (!scrollsOverflow()) |
| 2705 return false; | 2717 return false; |
| 2706 | 2718 |
| 2707 return layer()->scrollableArea()->hitTestOverflowControls(result, roundedInt
Point(locationInContainer - toLayoutSize(accumulatedOffset))); | 2719 return layer()->scrollableArea()->hitTestOverflowControls(result, roundedInt
Point(locationInContainer - toLayoutSize(accumulatedOffset))); |
| 2708 } | 2720 } |
| 2709 | 2721 |
| 2710 Node* RenderBlock::nodeForHitTest() const | 2722 Node* RenderBlock::nodeForHitTest() const |
| 2711 { | 2723 { |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4961 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4973 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 4962 { | 4974 { |
| 4963 showRenderObject(); | 4975 showRenderObject(); |
| 4964 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4976 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 4965 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4977 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 4966 } | 4978 } |
| 4967 | 4979 |
| 4968 #endif | 4980 #endif |
| 4969 | 4981 |
| 4970 } // namespace WebCore | 4982 } // namespace WebCore |
| OLD | NEW |