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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 LayoutRect rectToApply; | 1534 LayoutRect rectToApply; |
1535 if (isHorizontalWritingMode()) | 1535 if (isHorizontalWritingMode()) |
1536 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<Layo
utUnit>(0, oldClientAfterEdge - clientRect.y())); | 1536 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<Layo
utUnit>(0, oldClientAfterEdge - clientRect.y())); |
1537 else | 1537 else |
1538 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutU
nit>(0, oldClientAfterEdge - clientRect.x()), 1); | 1538 rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutU
nit>(0, oldClientAfterEdge - clientRect.x()), 1); |
1539 addLayoutOverflow(rectToApply); | 1539 addLayoutOverflow(rectToApply); |
1540 if (hasRenderOverflow()) | 1540 if (hasRenderOverflow()) |
1541 m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge); | 1541 m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge); |
1542 } | 1542 } |
1543 | 1543 |
1544 // Add visual overflow from box-shadow and border-image-outset. | |
1545 addVisualEffectOverflow(); | 1544 addVisualEffectOverflow(); |
1546 | 1545 |
1547 // Add visual overflow from theme. | |
1548 addVisualOverflowFromTheme(); | 1546 addVisualOverflowFromTheme(); |
1549 } | 1547 } |
1550 | 1548 |
1551 void RenderBlock::addOverflowFromBlockChildren() | 1549 void RenderBlock::addOverflowFromBlockChildren() |
1552 { | 1550 { |
1553 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo
x()) { | 1551 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo
x()) { |
1554 if (!child->isFloatingOrOutOfFlowPositioned()) | 1552 if (!child->isFloatingOrOutOfFlowPositioned()) |
1555 addOverflowFromChild(child); | 1553 addOverflowFromChild(child); |
1556 } | 1554 } |
1557 } | 1555 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 LayoutPoint adjustedPaintOffset = paintOffset + location(); | 1827 LayoutPoint adjustedPaintOffset = paintOffset + location(); |
1830 | 1828 |
1831 PaintPhase phase = paintInfo.phase; | 1829 PaintPhase phase = paintInfo.phase; |
1832 | 1830 |
1833 // Check if we need to do anything at all. | 1831 // Check if we need to do anything at all. |
1834 // FIXME: Could eliminate the isRoot() check if we fix background painting s
o that the RenderView | 1832 // FIXME: Could eliminate the isRoot() check if we fix background painting s
o that the RenderView |
1835 // paints the root's background. | 1833 // paints the root's background. |
1836 if (!isRoot()) { | 1834 if (!isRoot()) { |
1837 LayoutRect overflowBox = overflowRectForPaintRejection(); | 1835 LayoutRect overflowBox = overflowRectForPaintRejection(); |
1838 flipForWritingMode(overflowBox); | 1836 flipForWritingMode(overflowBox); |
1839 overflowBox.inflate(maximalOutlineSize(paintInfo.phase)); | |
1840 overflowBox.moveBy(adjustedPaintOffset); | 1837 overflowBox.moveBy(adjustedPaintOffset); |
1841 if (!overflowBox.intersects(paintInfo.rect)) | 1838 if (!overflowBox.intersects(paintInfo.rect)) |
1842 return; | 1839 return; |
1843 } | 1840 } |
1844 | 1841 |
1845 // There are some cases where not all clipped visual overflow is accounted f
or. | 1842 // There are some cases where not all clipped visual overflow is accounted f
or. |
1846 // FIXME: reduce the number of such cases. | 1843 // FIXME: reduce the number of such cases. |
1847 ContentsClipBehavior contentsClipBehavior = ForceContentsClip; | 1844 ContentsClipBehavior contentsClipBehavior = ForceContentsClip; |
1848 if (hasOverflowClip() && !hasControlClip() && !(shouldPaintSelectionGaps() &
& phase == PaintPhaseForeground) && !hasCaret()) | 1845 if (hasOverflowClip() && !hasControlClip() && !(shouldPaintSelectionGaps() &
& phase == PaintPhaseForeground) && !hasCaret()) |
1849 contentsClipBehavior = SkipContentsClipIfPossible; | 1846 contentsClipBehavior = SkipContentsClipIfPossible; |
(...skipping 3174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5024 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 5021 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
5025 { | 5022 { |
5026 showRenderObject(); | 5023 showRenderObject(); |
5027 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 5024 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
5028 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 5025 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
5029 } | 5026 } |
5030 | 5027 |
5031 #endif | 5028 #endif |
5032 | 5029 |
5033 } // namespace WebCore | 5030 } // namespace WebCore |
OLD | NEW |