Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 95 |
| 96 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } | 96 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } |
| 97 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); } | 97 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); } |
| 98 | 98 |
| 99 const RenderObjectChildList* children() const { return &m_children; } | 99 const RenderObjectChildList* children() const { return &m_children; } |
| 100 RenderObjectChildList* children() { return &m_children; } | 100 RenderObjectChildList* children() { return &m_children; } |
| 101 | 101 |
| 102 bool beingDestroyed() const { return m_beingDestroyed; } | 102 bool beingDestroyed() const { return m_beingDestroyed; } |
| 103 | 103 |
| 104 // These two functions are overridden for inline-block. | 104 // These two functions are overridden for inline-block. |
| 105 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const; | 105 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const FINAL; |
| 106 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const; | 106 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const; |
| 107 | 107 |
| 108 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } | 108 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } |
| 109 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } | 109 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } |
| 110 | 110 |
| 111 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 111 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
| 112 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 112 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
| 113 | 113 |
| 114 void deleteLineBoxTree(); | 114 void deleteLineBoxTree(); |
| 115 | 115 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 bool hasMarginBeforeQuirk(const RenderBox* child) const; | 151 bool hasMarginBeforeQuirk(const RenderBox* child) const; |
| 152 bool hasMarginAfterQuirk(const RenderBox* child) const; | 152 bool hasMarginAfterQuirk(const RenderBox* child) const; |
| 153 | 153 |
| 154 RootInlineBox* createAndAppendRootInlineBox(); | 154 RootInlineBox* createAndAppendRootInlineBox(); |
| 155 | 155 |
| 156 bool generatesLineBoxesForInlineChild(RenderObject*); | 156 bool generatesLineBoxesForInlineChild(RenderObject*); |
| 157 | 157 |
| 158 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true); | 158 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true); |
| 159 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); | 159 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); |
| 160 void markPositionedObjectsForLayout(); | 160 void markPositionedObjectsForLayout(); |
| 161 virtual void markForPaginationRelayoutIfNeeded(); | 161 virtual void markForPaginationRelayoutIfNeeded() FINAL; |
| 162 | 162 |
| 163 bool containsFloats() const { return m_floatingObjects && !m_floatingObjects ->set().isEmpty(); } | 163 bool containsFloats() const { return m_floatingObjects && !m_floatingObjects ->set().isEmpty(); } |
| 164 bool containsFloat(RenderBox*) const; | 164 bool containsFloat(RenderBox*) const; |
| 165 | 165 |
| 166 // Versions that can compute line offsets with the region and page offset pa ssed in. Used for speed to avoid having to | 166 // Versions that can compute line offsets with the region and page offset pa ssed in. Used for speed to avoid having to |
| 167 // compute the region all over again when you already know it. | 167 // compute the region all over again when you already know it. |
| 168 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldInde ntText, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, Layout Unit logicalHeight = 0) const | 168 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldInde ntText, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, Layout Unit logicalHeight = 0) const |
| 169 { | 169 { |
| 170 return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldInde ntText, region, offsetFromLogicalTopOfFirstPage, logicalHeight) | 170 return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldInde ntText, region, offsetFromLogicalTopOfFirstPage, logicalHeight) |
| 171 - logicalLeftOffsetForLine(position, shouldIndentText, region, offse tFromLogicalTopOfFirstPage, logicalHeight)); | 171 - logicalLeftOffsetForLine(position, shouldIndentText, region, offse tFromLogicalTopOfFirstPage, logicalHeight)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos ition, shouldIndentText, logicalHeight) | 223 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos ition, shouldIndentText, logicalHeight) |
| 224 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight); | 224 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight); |
| 225 } | 225 } |
| 226 | 226 |
| 227 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentT ext); | 227 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentT ext); |
| 228 LayoutUnit textIndentOffset() const; | 228 LayoutUnit textIndentOffset() const; |
| 229 | 229 |
| 230 virtual VisiblePosition positionForPoint(const LayoutPoint&); | 230 virtual VisiblePosition positionForPoint(const LayoutPoint&); |
| 231 | 231 |
| 232 // Block flows subclass availableWidth to handle multi column layout (shrink ing the width available to children when laying out.) | 232 // Block flows subclass availableWidth to handle multi column layout (shrink ing the width available to children when laying out.) |
| 233 virtual LayoutUnit availableLogicalWidth() const; | 233 virtual LayoutUnit availableLogicalWidth() const FINAL; |
| 234 | 234 |
| 235 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 235 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
| 236 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; | 236 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; |
| 237 | 237 |
| 238 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } | 238 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } |
| 239 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); } | 239 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); } |
| 240 | 240 |
| 241 bool containsNonZeroBidiLevel() const; | 241 bool containsNonZeroBidiLevel() const; |
| 242 | 242 |
| 243 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo ntainer); | 243 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo ntainer); |
| 244 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint & rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 244 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint & rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 245 RenderObject* selObj, LayoutUnit logicalL eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 245 RenderObject* selObj, LayoutUnit logicalL eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
| 246 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 246 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 247 RenderObject* selObj, LayoutUnit logical Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 247 RenderObject* selObj, LayoutUnit logical Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
| 248 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); | 248 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); |
| 249 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; | 249 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; |
| 250 | 250 |
| 251 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co nst LayoutRect& logicalRect); | 251 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co nst LayoutRect& logicalRect); |
| 252 | 252 |
| 253 // Helper methods for computing line counts and heights for line counts. | 253 // Helper methods for computing line counts and heights for line counts. |
| 254 RootInlineBox* lineAtIndex(int) const; | 254 RootInlineBox* lineAtIndex(int) const; |
| 255 int lineCount(const RootInlineBox* = 0, bool* = 0) const; | 255 int lineCount(const RootInlineBox* = 0, bool* = 0) const; |
| 256 int heightForLineCount(int); | 256 int heightForLineCount(int); |
| 257 void clearTruncation(); | 257 void clearTruncation(); |
| 258 | 258 |
| 259 void adjustRectForColumns(LayoutRect&) const; | 259 void adjustRectForColumns(LayoutRect&) const; |
| 260 virtual void adjustForColumns(LayoutSize&, const LayoutPoint&) const; | 260 virtual void adjustForColumns(LayoutSize&, const LayoutPoint&) const FINAL; |
| 261 void adjustForColumnRect(LayoutSize& offset, const LayoutPoint& locationInCo ntainer) const; | 261 void adjustForColumnRect(LayoutSize& offset, const LayoutPoint& locationInCo ntainer) const; |
| 262 | 262 |
| 263 void addContinuationWithOutline(RenderInline*); | 263 void addContinuationWithOutline(RenderInline*); |
| 264 bool paintsContinuationOutline(RenderInline*); | 264 bool paintsContinuationOutline(RenderInline*); |
| 265 | 265 |
| 266 virtual RenderBoxModelObject* virtualContinuation() const { return continuat ion(); } | 266 virtual RenderBoxModelObject* virtualContinuation() const FINAL { return con tinuation(); } |
| 267 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); } | 267 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); } |
| 268 RenderInline* inlineElementContinuation() const; | 268 RenderInline* inlineElementContinuation() const; |
| 269 RenderBlock* blockElementContinuation() const; | 269 RenderBlock* blockElementContinuation() const; |
| 270 | 270 |
| 271 using RenderBoxModelObject::continuation; | 271 using RenderBoxModelObject::continuation; |
| 272 using RenderBoxModelObject::setContinuation; | 272 using RenderBoxModelObject::setContinuation; |
| 273 | 273 |
| 274 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render Object*, EDisplay = BLOCK); | 274 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render Object*, EDisplay = BLOCK); |
| 275 static RenderBlock* createAnonymousColumnsWithParentRenderer(const RenderObj ect*); | 275 static RenderBlock* createAnonymousColumnsWithParentRenderer(const RenderObj ect*); |
| 276 static RenderBlock* createAnonymousColumnSpanWithParentRenderer(const Render Object*); | 276 static RenderBlock* createAnonymousColumnSpanWithParentRenderer(const Render Object*); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 | 579 |
| 580 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* ); | 580 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* ); |
| 581 | 581 |
| 582 virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHe ight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); | 582 virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHe ight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); |
| 583 | 583 |
| 584 private: | 584 private: |
| 585 #if ENABLE(CSS_EXCLUSIONS) | 585 #if ENABLE(CSS_EXCLUSIONS) |
| 586 void computeExclusionShapeSize(); | 586 void computeExclusionShapeSize(); |
| 587 void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValu e*, const ExclusionShapeValue* oldExclusionShape); | 587 void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValu e*, const ExclusionShapeValue* oldExclusionShape); |
| 588 #endif | 588 #endif |
| 589 virtual RenderObjectChildList* virtualChildren() { return children(); } | 589 virtual RenderObjectChildList* virtualChildren() FINAL { return children(); } |
| 590 virtual const RenderObjectChildList* virtualChildren() const { return childr en(); } | 590 virtual const RenderObjectChildList* virtualChildren() const FINAL { return children(); } |
| 591 | 591 |
| 592 virtual const char* renderName() const; | 592 virtual const char* renderName() const; |
| 593 | 593 |
| 594 virtual bool isRenderBlock() const { return true; } | 594 virtual bool isRenderBlock() const FINAL { return true; } |
|
esprehn
2013/04/20 05:51:46
It would be nice if you could add OVERRIDE FINAL o
| |
| 595 virtual bool isBlockFlow() const { return (!isInline() || isReplaced()) && ! isTable(); } | 595 virtual bool isBlockFlow() const FINAL { return (!isInline() || isReplaced() ) && !isTable(); } |
| 596 virtual bool isInlineBlockOrInlineTable() const { return isInline() && isRep laced(); } | 596 virtual bool isInlineBlockOrInlineTable() const FINAL { return isInline() && isReplaced(); } |
| 597 | 597 |
| 598 void makeChildrenNonInline(RenderObject* insertionPoint = 0); | 598 void makeChildrenNonInline(RenderObject* insertionPoint = 0); |
| 599 virtual void removeLeftoverAnonymousBlock(RenderBlock* child); | 599 virtual void removeLeftoverAnonymousBlock(RenderBlock* child); |
| 600 | 600 |
| 601 static void collapseAnonymousBoxChild(RenderBlock* parent, RenderObject* chi ld); | 601 static void collapseAnonymousBoxChild(RenderBlock* parent, RenderObject* chi ld); |
| 602 | 602 |
| 603 virtual void dirtyLinesFromChangedChild(RenderObject* child) { m_lineBoxes.d irtyLinesFromChangedChild(this, child); } | 603 virtual void dirtyLinesFromChangedChild(RenderObject* child) FINAL { m_lineB oxes.dirtyLinesFromChangedChild(this, child); } |
| 604 | 604 |
| 605 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChil d); | 605 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChil d); |
| 606 void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* befo reChild); | 606 void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* befo reChild); |
| 607 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* b eforeChild); | 607 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* b eforeChild); |
| 608 | 608 |
| 609 virtual void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, R enderObject* beforeChild = 0); | 609 virtual void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, R enderObject* beforeChild = 0) FINAL; |
| 610 | 610 |
| 611 virtual bool isSelfCollapsingBlock() const; | 611 virtual bool isSelfCollapsingBlock() const FINAL; |
| 612 | 612 |
| 613 virtual LayoutUnit collapsedMarginBefore() const { return maxPositiveMarginB efore() - maxNegativeMarginBefore(); } | 613 virtual LayoutUnit collapsedMarginBefore() const FINAL { return maxPositiveM arginBefore() - maxNegativeMarginBefore(); } |
| 614 virtual LayoutUnit collapsedMarginAfter() const { return maxPositiveMarginAf ter() - maxNegativeMarginAfter(); } | 614 virtual LayoutUnit collapsedMarginAfter() const FINAL { return maxPositiveMa rginAfter() - maxNegativeMarginAfter(); } |
| 615 | 615 |
| 616 virtual void repaintOverhangingFloats(bool paintAllDescendants) OVERRIDE; | 616 virtual void repaintOverhangingFloats(bool paintAllDescendants) OVERRIDE FIN AL; |
| 617 | 617 |
| 618 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB ottom); | 618 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB ottom); |
| 619 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalT op, LayoutUnit& repaintLogicalBottom); | 619 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalT op, LayoutUnit& repaintLogicalBottom); |
| 620 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); | 620 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); |
| 621 | 621 |
| 622 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); | 622 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); |
| 623 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); | 623 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); |
| 624 | 624 |
| 625 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG and Ruby. | 625 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG and Ruby. |
| 626 | 626 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 887 virtual bool avoidsFloats() const; | 887 virtual bool avoidsFloats() const; |
| 888 | 888 |
| 889 bool hasOverhangingFloats() { return parent() && !hasColumns() && containsFl oats() && lowestFloatLogicalBottom() > logicalHeight(); } | 889 bool hasOverhangingFloats() { return parent() && !hasColumns() && containsFl oats() && lowestFloatLogicalBottom() > logicalHeight(); } |
| 890 bool hasOverhangingFloat(RenderBox*); | 890 bool hasOverhangingFloat(RenderBox*); |
| 891 void addIntrudingFloats(RenderBlock* prev, LayoutUnit xoffset, LayoutUnit yo ffset); | 891 void addIntrudingFloats(RenderBlock* prev, LayoutUnit xoffset, LayoutUnit yo ffset); |
| 892 LayoutUnit addOverhangingFloats(RenderBlock* child, bool makeChildPaintOther Floats); | 892 LayoutUnit addOverhangingFloats(RenderBlock* child, bool makeChildPaintOther Floats); |
| 893 | 893 |
| 894 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const; | 894 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F loatLeftRight) const; |
| 895 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit) const; | 895 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit) const; |
| 896 | 896 |
| 897 virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, const Hit TestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTest Action); | 897 virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, const Hit TestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTest Action) FINAL; |
| 898 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const Hi tTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTes tAction); | 898 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const Hi tTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTes tAction) FINAL; |
| 899 bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitTestLocat ion& locationInContainer, const LayoutPoint& accumulatedOffset); | 899 bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitTestLocat ion& locationInContainer, const LayoutPoint& accumulatedOffset); |
| 900 | 900 |
| 901 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); | 901 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); |
| 902 | 902 |
| 903 // FIXME: Make this method const so we can remove the const_cast in computeI ntrinsicLogicalWidths. | 903 // FIXME: Make this method const so we can remove the const_cast in computeI ntrinsicLogicalWidths. |
| 904 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout Unit& maxLogicalWidth); | 904 void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, Layout Unit& maxLogicalWidth); |
| 905 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; | 905 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; |
| 906 | 906 |
| 907 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline | 907 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline |
| 908 // children. | 908 // children. |
| 909 virtual RenderBlock* firstLineBlock() const; | 909 virtual RenderBlock* firstLineBlock() const; |
| 910 | 910 |
| 911 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const OVERRIDE; | 911 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const OVERRIDE FINAL; |
| 912 virtual RenderStyle* outlineStyleForRepaint() const; | 912 virtual RenderStyle* outlineStyleForRepaint() const FINAL; |
| 913 | 913 |
| 914 virtual RenderObject* hoverAncestor() const; | 914 virtual RenderObject* hoverAncestor() const FINAL; |
| 915 virtual void updateDragState(bool dragOn); | 915 virtual void updateDragState(bool dragOn) FINAL; |
| 916 virtual void childBecameNonInline(RenderObject* child); | 916 virtual void childBecameNonInline(RenderObject* child) FINAL; |
| 917 | 917 |
| 918 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep aintContainer, bool /*clipToVisibleContent*/) OVERRIDE | 918 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep aintContainer, bool /*clipToVisibleContent*/) OVERRIDE FINAL |
| 919 { | 919 { |
| 920 return selectionGapRectsForRepaint(repaintContainer); | 920 return selectionGapRectsForRepaint(repaintContainer); |
| 921 } | 921 } |
| 922 virtual bool shouldPaintSelectionGaps() const; | 922 virtual bool shouldPaintSelectionGaps() const FINAL; |
| 923 bool isSelectionRoot() const; | 923 bool isSelectionRoot() const; |
| 924 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock, | 924 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 925 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0); | 925 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0); |
| 926 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 926 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 927 LayoutUnit& lastLogicalTop, LayoutUnit& lastLog icalLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); | 927 LayoutUnit& lastLogicalTop, LayoutUnit& lastLog icalLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); |
| 928 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 928 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 929 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); | 929 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); |
| 930 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 930 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 931 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ; | 931 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ; |
| 932 LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, LayoutUnit pos ition); | 932 LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, LayoutUnit pos ition); |
| 933 LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit po sition); | 933 LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit po sition); |
| 934 | 934 |
| 935 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const; | 935 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const; |
| 936 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; | 936 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; |
| 937 | 937 |
| 938 LayoutUnit desiredColumnWidth() const; | 938 LayoutUnit desiredColumnWidth() const; |
| 939 unsigned desiredColumnCount() const; | 939 unsigned desiredColumnCount() const; |
| 940 | 940 |
| 941 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); | 941 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); |
| 942 | 942 |
| 943 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0); | 943 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) FINAL; |
| 944 | 944 |
| 945 void adjustPointToColumnContents(LayoutPoint&) const; | 945 void adjustPointToColumnContents(LayoutPoint&) const; |
| 946 | 946 |
| 947 void fitBorderToLinesIfNeeded(); // Shrink the box in which the border paint s if border-fit is set. | 947 void fitBorderToLinesIfNeeded(); // Shrink the box in which the border paint s if border-fit is set. |
| 948 void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) c onst; // Helper function for borderFitAdjust | 948 void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) c onst; // Helper function for borderFitAdjust |
| 949 | 949 |
| 950 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0); | 950 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0); |
| 951 | 951 |
| 952 void newLine(EClear); | 952 void newLine(EClear); |
| 953 | 953 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1325 static String string(const int value); | 1325 static String string(const int value); |
| 1326 }; | 1326 }; |
| 1327 template<> struct ValueToString<RenderBlock::FloatingObject*> { | 1327 template<> struct ValueToString<RenderBlock::FloatingObject*> { |
| 1328 static String string(const RenderBlock::FloatingObject*); | 1328 static String string(const RenderBlock::FloatingObject*); |
| 1329 }; | 1329 }; |
| 1330 #endif | 1330 #endif |
| 1331 | 1331 |
| 1332 } // namespace WebCore | 1332 } // namespace WebCore |
| 1333 | 1333 |
| 1334 #endif // RenderBlock_h | 1334 #endif // RenderBlock_h |
| OLD | NEW |