Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: Source/core/layout/LayoutBlockFlow.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36 #ifndef LayoutBlockFlow_h 36 #ifndef LayoutBlockFlow_h
37 #define LayoutBlockFlow_h 37 #define LayoutBlockFlow_h
38 38
39 #include "core/CoreExport.h" 39 #include "core/CoreExport.h"
40 #include "core/layout/FloatingObjects.h" 40 #include "core/layout/FloatingObjects.h"
41 #include "core/layout/LayoutBlock.h" 41 #include "core/layout/LayoutBlock.h"
42 #include "core/layout/line/TrailingObjects.h" 42 #include "core/layout/line/TrailingObjects.h"
43 #include "core/layout/style/LayoutStyleConstants.h" 43 #include "core/layout/style/ComputedStyleConstants.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class MarginInfo; 47 class MarginInfo;
48 class LineBreaker; 48 class LineBreaker;
49 class LineInfo; 49 class LineInfo;
50 class LineWidth; 50 class LineWidth;
51 class LayoutMultiColumnFlowThread; 51 class LayoutMultiColumnFlowThread;
52 class LayoutMultiColumnSpannerPlaceholder; 52 class LayoutMultiColumnSpannerPlaceholder;
53 class LayoutRubyRun; 53 class LayoutRubyRun;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay outPoint&) const; 236 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay outPoint&) const;
237 237
238 virtual const char* name() const override; 238 virtual const char* name() const override;
239 239
240 protected: 240 protected:
241 void rebuildFloatsFromIntruding(); 241 void rebuildFloatsFromIntruding();
242 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); 242 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge);
243 243
244 void createFloatingObjects(); 244 void createFloatingObjects();
245 245
246 virtual void styleWillChange(StyleDifference, const LayoutStyle& newStyle) o verride; 246 virtual void styleWillChange(StyleDifference, const ComputedStyle& newStyle) override;
247 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 247 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
248 248
249 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox& ); 249 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox& );
250 250
251 void addOverflowFromFloats(); 251 void addOverflowFromFloats();
252 252
253 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const 253 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
254 { 254 {
255 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, logicalHeight), applyTextIndent); 255 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, logicalHeight), applyTextIndent);
256 } 256 }
257 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const 257 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const; 307 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f ixedOffset, LayoutUnit logicalHeight) const;
308 308
309 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 309 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo utUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
310 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const; 310 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou tUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const;
311 311
312 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 312 LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
313 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; 313 LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const;
314 314
315 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG 315 virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG
316 316
317 bool isPagedOverflow(const LayoutStyle&); 317 bool isPagedOverflow(const ComputedStyle&);
318 318
319 enum FlowThreadType { 319 enum FlowThreadType {
320 NoFlowThread, 320 NoFlowThread,
321 MultiColumnFlowThread, 321 MultiColumnFlowThread,
322 PagedFlowThread 322 PagedFlowThread
323 }; 323 };
324 324
325 FlowThreadType flowThreadType(const LayoutStyle&); 325 FlowThreadType flowThreadType(const ComputedStyle&);
326 326
327 LayoutMultiColumnFlowThread* createMultiColumnFlowThread(FlowThreadType); 327 LayoutMultiColumnFlowThread* createMultiColumnFlowThread(FlowThreadType);
328 void createOrDestroyMultiColumnFlowThreadIfNeeded(const LayoutStyle* oldStyl e); 328 void createOrDestroyMultiColumnFlowThreadIfNeeded(const ComputedStyle* oldSt yle);
329 329
330 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, unsigned expansionOpportunityCount); 330 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, unsigned expansionOpportunityCount);
331 void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bo ol& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); 331 void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bo ol& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight);
332 bool shouldRelayoutForPagination(LayoutUnit& pageLogicalHeight, LayoutUnit l ayoutOverflowLogicalBottom) const; 332 bool shouldRelayoutForPagination(LayoutUnit& pageLogicalHeight, LayoutUnit l ayoutOverflowLogicalBottom) const;
333 void setColumnCountAndHeight(unsigned count, LayoutUnit pageLogicalHeight); 333 void setColumnCountAndHeight(unsigned count, LayoutUnit pageLogicalHeight);
334 334
335 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData ->m_lineBreakToAvoidWidow >= 0; } 335 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData ->m_lineBreakToAvoidWidow >= 0; }
336 void clearShouldBreakAtLineToAvoidWidow() const; 336 void clearShouldBreakAtLineToAvoidWidow() const;
337 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr eakToAvoidWidow : -1; } 337 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr eakToAvoidWidow : -1; }
338 void setBreakAtLineToAvoidWidow(int); 338 void setBreakAtLineToAvoidWidow(int);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 // END METHODS DEFINED IN LayoutBlockFlowLine 537 // END METHODS DEFINED IN LayoutBlockFlowLine
538 538
539 }; 539 };
540 540
541 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 541 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
542 542
543 } // namespace blink 543 } // namespace blink
544 544
545 #endif // LayoutBlockFlow_h 545 #endif // LayoutBlockFlow_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698