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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 } | 1545 } |
1546 | 1546 |
1547 LayoutUnit LayoutBlock::textIndentOffset() const | 1547 LayoutUnit LayoutBlock::textIndentOffset() const |
1548 { | 1548 { |
1549 LayoutUnit cw; | 1549 LayoutUnit cw; |
1550 if (style()->textIndent().hasPercent()) | 1550 if (style()->textIndent().hasPercent()) |
1551 cw = containingBlock()->availableLogicalWidth(); | 1551 cw = containingBlock()->availableLogicalWidth(); |
1552 return minimumValueForLength(style()->textIndent(), cw); | 1552 return minimumValueForLength(style()->textIndent(), cw); |
1553 } | 1553 } |
1554 | 1554 |
1555 void LayoutBlock::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit l
ogicalBottom, RootInlineBox* highest) | |
1556 { | |
1557 if (logicalTop >= logicalBottom) | |
1558 return; | |
1559 | |
1560 RootInlineBox* lowestDirtyLine = lastRootBox(); | |
1561 RootInlineBox* afterLowest = lowestDirtyLine; | |
1562 while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logica
lBottom && logicalBottom < LayoutUnit::max()) { | |
1563 afterLowest = lowestDirtyLine; | |
1564 lowestDirtyLine = lowestDirtyLine->prevRootBox(); | |
1565 } | |
1566 | |
1567 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < 0)) { | |
1568 afterLowest->markDirty(); | |
1569 afterLowest = afterLowest->prevRootBox(); | |
1570 } | |
1571 } | |
1572 | |
1573 bool LayoutBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) const | 1555 bool LayoutBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPo
int& locationInContainer, const LayoutPoint& accumulatedOffset) const |
1574 { | 1556 { |
1575 if (!scrollsOverflow()) | 1557 if (!scrollsOverflow()) |
1576 return false; | 1558 return false; |
1577 | 1559 |
1578 return layer()->getScrollableArea()->hitTestOverflowControls(result, rounded
IntPoint(locationInContainer - toLayoutSize(accumulatedOffset))); | 1560 return layer()->getScrollableArea()->hitTestOverflowControls(result, rounded
IntPoint(locationInContainer - toLayoutSize(accumulatedOffset))); |
1579 } | 1561 } |
1580 | 1562 |
1581 Node* LayoutBlock::nodeForHitTest() const | 1563 Node* LayoutBlock::nodeForHitTest() const |
1582 { | 1564 { |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2842 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2824 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2843 { | 2825 { |
2844 showLayoutObject(); | 2826 showLayoutObject(); |
2845 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2827 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2846 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2828 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2847 } | 2829 } |
2848 | 2830 |
2849 #endif | 2831 #endif |
2850 | 2832 |
2851 } // namespace blink | 2833 } // namespace blink |
OLD | NEW |