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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) | 149 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) |
150 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; | 150 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; |
151 | 151 |
152 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 152 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
153 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; | 153 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; |
154 | 154 |
155 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; | 155 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; |
156 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; | 156 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; |
157 | 157 |
158 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; | 158 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; |
159 GapRects selectionGapRectsForPaintInvalidation(const RenderLayerModelObject*
paintInvalidationContainer); | 159 GapRects selectionGapRectsForPaintInvalidation(const RenderLayerModelObject*
paintInvalidationContainer) const; |
160 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 160 LayoutRect logicalLeftSelectionGap(const RenderBlock* rootBlock, const Layou
tPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
161 RenderObject* selObj, LayoutUnit logicalL
eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 161 const RenderObject* selObj, LayoutUnit lo
gicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*) co
nst; |
162 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin
t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 162 LayoutRect logicalRightSelectionGap(const RenderBlock* rootBlock, const Layo
utPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
163 RenderObject* selObj, LayoutUnit logical
Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 163 const RenderObject* selObj, LayoutUnit l
ogicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*)
const; |
164 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); | 164 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap) cons
t; |
165 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; | 165 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; |
166 | 166 |
167 virtual void setSelectionState(SelectionState) OVERRIDE; | 167 virtual void setSelectionState(SelectionState) OVERRIDE; |
168 | 168 |
169 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect); | 169 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect) const; |
170 | 170 |
171 // Helper methods for computing line counts and heights for line counts. | 171 // Helper methods for computing line counts and heights for line counts. |
172 RootInlineBox* lineAtIndex(int) const; | 172 RootInlineBox* lineAtIndex(int) const; |
173 int lineCount(const RootInlineBox* = 0, bool* = 0) const; | 173 int lineCount(const RootInlineBox* = 0, bool* = 0) const; |
174 int heightForLineCount(int); | 174 int heightForLineCount(int); |
175 void clearTruncation(); | 175 void clearTruncation(); |
176 | 176 |
177 void adjustRectForColumns(LayoutRect&) const; | 177 void adjustRectForColumns(LayoutRect&) const; |
178 virtual LayoutSize columnOffset(const LayoutPoint&) const OVERRIDE; | 178 virtual LayoutSize columnOffset(const LayoutPoint&) const OVERRIDE; |
179 void adjustForColumnRect(LayoutSize& offset, const LayoutPoint& locationInCo
ntainer) const; | 179 void adjustForColumnRect(LayoutSize& offset, const LayoutPoint& locationInCo
ntainer) const; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline | 386 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline |
387 // children. | 387 // children. |
388 virtual RenderBlock* firstLineBlock() const OVERRIDE; | 388 virtual RenderBlock* firstLineBlock() const OVERRIDE; |
389 | 389 |
390 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid
ationState* = 0) const OVERRIDE FINAL; | 390 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid
ationState* = 0) const OVERRIDE FINAL; |
391 | 391 |
392 virtual RenderObject* hoverAncestor() const OVERRIDE FINAL; | 392 virtual RenderObject* hoverAncestor() const OVERRIDE FINAL; |
393 virtual void updateDragState(bool dragOn) OVERRIDE FINAL; | 393 virtual void updateDragState(bool dragOn) OVERRIDE FINAL; |
394 virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL; | 394 virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL; |
395 | 395 |
396 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) OVERRIDE FINAL | 396 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) const OVERRIDE
FINAL |
397 { | 397 { |
398 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer)
; | 398 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer)
; |
399 } | 399 } |
400 bool isSelectionRoot() const; | 400 bool isSelectionRoot() const; |
401 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP
hysicalPosition, const LayoutSize& offsetFromRootBlock, | 401 GapRects selectionGaps(const RenderBlock* rootBlock, const LayoutPoint& root
BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
402 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe
ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0); | 402 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe
ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0) const; |
403 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB
lockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 403 GapRects blockSelectionGaps(const RenderBlock* rootBlock, const LayoutPoint&
rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
404 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi
calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); | 404 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi
calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*) const; |
405 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root
BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 405 LayoutRect blockSelectionGap(const RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
406 LayoutUnit lastLogicalTop, LayoutUnit lastLogic
alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*)
; | 406 LayoutUnit lastLogicalTop, LayoutUnit lastLogic
alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*)
const; |
407 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position); | 407 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock,
LayoutUnit position) const; |
408 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position); | 408 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock,
LayoutUnit position) const; |
409 | 409 |
410 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 410 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
411 virtual void clipOutFloatingObjects(RenderBlock*, const PaintInfo*, const La
youtPoint&, const LayoutSize&) { }; | 411 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co
nst LayoutPoint&, const LayoutSize&) const { }; |
412 | 412 |
413 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; | 413 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE; |
414 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; | 414 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID
E; |
415 | 415 |
416 LayoutUnit desiredColumnWidth() const; | 416 LayoutUnit desiredColumnWidth() const; |
417 | 417 |
418 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); | 418 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); |
419 | 419 |
420 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE FINAL; | 420 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE FINAL; |
421 | 421 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 // FIXME: This is temporary as we move code that accesses block flow | 504 // FIXME: This is temporary as we move code that accesses block flow |
505 // member variables out of RenderBlock and into RenderBlockFlow. | 505 // member variables out of RenderBlock and into RenderBlockFlow. |
506 friend class RenderBlockFlow; | 506 friend class RenderBlockFlow; |
507 }; | 507 }; |
508 | 508 |
509 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 509 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
510 | 510 |
511 } // namespace blink | 511 } // namespace blink |
512 | 512 |
513 #endif // RenderBlock_h | 513 #endif // RenderBlock_h |
OLD | NEW |