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-2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003-2013 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 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions are | 10 * modification, are permitted provided that the following conditions are |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 183 GapRects inlineSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 184 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las tLogicalRight, const PaintInfo*); | 184 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& las tLogicalRight, const PaintInfo*); |
| 185 | 185 |
| 186 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); } | 186 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin ationStrut : LayoutUnit(); } |
| 187 void setPaginationStrut(LayoutUnit); | 187 void setPaginationStrut(LayoutUnit); |
| 188 | 188 |
| 189 virtual bool avoidsFloats() const OVERRIDE; | 189 virtual bool avoidsFloats() const OVERRIDE; |
| 190 | 190 |
| 191 protected: | 191 protected: |
| 192 void rebuildFloatsFromIntruding(); | 192 void rebuildFloatsFromIntruding(); |
| 193 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalT op, LayoutUnit& repaintLogicalBottom, LayoutUnit afterEdge); | 193 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); |
| 194 | 194 |
| 195 void createFloatingObjects(); | 195 void createFloatingObjects(); |
| 196 | 196 |
| 197 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; | 197 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; |
| 198 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; | 198 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; |
| 199 | 199 |
| 200 void addOverflowFromFloats(); | 200 void addOverflowFromFloats(); |
| 201 | 201 |
| 202 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 202 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
| 203 { | 203 { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 443 LayoutUnit applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, Margi nInfo&); // If the child has an after break, then return a new offset that shift s to the top of the next page/column. | 443 LayoutUnit applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, Margi nInfo&); // If the child has an after break, then return a new offset that shift s to the top of the next page/column. |
| 444 | 444 |
| 445 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); | 445 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); |
| 446 void adjustLinePositionForPagination(RootInlineBox*, LayoutUnit& deltaOffset , RenderFlowThread*); // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page. | 446 void adjustLinePositionForPagination(RootInlineBox*, LayoutUnit& deltaOffset , RenderFlowThread*); // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page. |
| 447 | 447 |
| 448 // Used to store state between styleWillChange and styleDidChange | 448 // Used to store state between styleWillChange and styleDidChange |
| 449 static bool s_canPropagateFloatIntoSibling; | 449 static bool s_canPropagateFloatIntoSibling; |
| 450 | 450 |
| 451 RenderBlockFlowRareData& ensureRareData(); | 451 RenderBlockFlowRareData& ensureRareData(); |
| 452 | 452 |
| 453 LayoutUnit m_repaintLogicalTop; | 453 LayoutUnit m_paintInvalidationLogicalTop; |
| 454 LayoutUnit m_repaintLogicalBottom; | 454 LayoutUnit m_paintInvalidationLogicalBottom; |
| 455 | 455 |
| 456 virtual bool isSelfCollapsingBlock() const OVERRIDE; | 456 virtual bool isSelfCollapsingBlock() const OVERRIDE; |
| 457 | 457 |
| 458 protected: | 458 protected: |
| 459 OwnPtrWillBeMember<RenderBlockFlowRareData> m_rareData; | 459 OwnPtrWillBeMember<RenderBlockFlowRareData> m_rareData; |
| 460 OwnPtr<FloatingObjects> m_floatingObjects; | 460 OwnPtr<FloatingObjects> m_floatingObjects; |
| 461 | 461 |
| 462 friend class BreakingContext; // FIXME: It uses insertFloatingObject and pos itionNewFloatOnLine, if we move those out from the private scope/add a helper to LineBreaker, we can remove this friend | 462 friend class BreakingContext; // FIXME: It uses insertFloatingObject and pos itionNewFloatOnLine, if we move those out from the private scope/add a helper to LineBreaker, we can remove this friend |
| 463 friend class MarginInfo; | 463 friend class MarginInfo; |
| 464 friend class LineBreaker; | 464 friend class LineBreaker; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 478 void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOv erflowAndFallbackFontsMap&, VerticalPositionCache&); | 478 void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOv erflowAndFallbackFontsMap&, VerticalPositionCache&); |
| 479 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); | 479 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); |
| 480 void appendFloatingObjectToLastLine(FloatingObject*); | 480 void appendFloatingObjectToLastLine(FloatingObject*); |
| 481 // Helper function for layoutInlineChildren() | 481 // Helper function for layoutInlineChildren() |
| 482 RootInlineBox* createLineBoxesFromBidiRuns(unsigned bidiLevel, BidiRunList<B idiRun>&, const InlineIterator& end, LineInfo&, VerticalPositionCache&, BidiRun* trailingSpaceRun, WordMeasurements&); | 482 RootInlineBox* createLineBoxesFromBidiRuns(unsigned bidiLevel, BidiRunList<B idiRun>&, const InlineIterator& end, LineInfo&, VerticalPositionCache&, BidiRun* trailingSpaceRun, WordMeasurements&); |
| 483 void layoutRunsAndFloats(LineLayoutState&); | 483 void layoutRunsAndFloats(LineLayoutState&); |
| 484 const InlineIterator& restartLayoutRunsAndFloatsInRange(LayoutUnit oldLogica lHeight, LayoutUnit newLogicalHeight, FloatingObject* lastFloatFromPreviousLine , InlineBidiResolver&, const InlineIterator&); | 484 const InlineIterator& restartLayoutRunsAndFloatsInRange(LayoutUnit oldLogica lHeight, LayoutUnit newLogicalHeight, FloatingObject* lastFloatFromPreviousLine , InlineBidiResolver&, const InlineIterator&); |
| 485 void layoutRunsAndFloatsInRange(LineLayoutState&, InlineBidiResolver&, | 485 void layoutRunsAndFloatsInRange(LineLayoutState&, InlineBidiResolver&, |
| 486 const InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiSta tus); | 486 const InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiSta tus); |
| 487 void linkToEndLineIfNeeded(LineLayoutState&); | 487 void linkToEndLineIfNeeded(LineLayoutState&); |
| 488 static void repaintDirtyFloats(Vector<FloatWithRect>& floats); | 488 static void paintInvalidationForDirtyFloats(Vector<FloatWithRect>& floats); |
|
leviw_travelin_and_unemployed
2014/08/15 18:45:48
markDirtyFloatsForPaintInvalidation?
dsinclair
2014/08/15 19:03:19
Done.
| |
| 489 void checkFloatsInCleanLine(RootInlineBox*, Vector<FloatWithRect>&, size_t& floatIndex, bool& encounteredNewFloat, bool& dirtiedByFloat); | 489 void checkFloatsInCleanLine(RootInlineBox*, Vector<FloatWithRect>&, size_t& floatIndex, bool& encounteredNewFloat, bool& dirtiedByFloat); |
| 490 RootInlineBox* determineStartPosition(LineLayoutState&, InlineBidiResolver&) ; | 490 RootInlineBox* determineStartPosition(LineLayoutState&, InlineBidiResolver&) ; |
| 491 void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineI terator& cleanLineStart, BidiStatus& cleanLineBidiStatus); | 491 void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineI terator& cleanLineStart, BidiStatus& cleanLineBidiStatus); |
| 492 bool checkPaginationAndFloatsAtEndLine(LineLayoutState&); | 492 bool checkPaginationAndFloatsAtEndLine(LineLayoutState&); |
| 493 bool matchedEndLine(LineLayoutState&, const InlineBidiResolver&, const Inlin eIterator& endLineStart, const BidiStatus& endLineStatus); | 493 bool matchedEndLine(LineLayoutState&, const InlineBidiResolver&, const Inlin eIterator& endLineStart, const BidiStatus& endLineStatus); |
| 494 void deleteEllipsisLineBoxes(); | 494 void deleteEllipsisLineBoxes(); |
| 495 void checkLinesForTextOverflow(); | 495 void checkLinesForTextOverflow(); |
| 496 // Positions new floats and also adjust all floats encountered on the line i f any of them | 496 // Positions new floats and also adjust all floats encountered on the line i f any of them |
| 497 // have to move to the next page/column. | 497 // have to move to the next page/column. |
| 498 bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFl oatFromPreviousLine, LineInfo&, LineWidth&); | 498 bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFl oatFromPreviousLine, LineInfo&, LineWidth&); |
| 499 | 499 |
| 500 | 500 |
| 501 // END METHODS DEFINED IN RenderBlockLineLayout | 501 // END METHODS DEFINED IN RenderBlockLineLayout |
| 502 | 502 |
| 503 }; | 503 }; |
| 504 | 504 |
| 505 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); | 505 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); |
| 506 | 506 |
| 507 } // namespace blink | 507 } // namespace blink |
| 508 | 508 |
| 509 #endif // RenderBlockFlow_h | 509 #endif // RenderBlockFlow_h |
| OLD | NEW |