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

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

Issue 2401753002: A forced break inside a break-inside:avoid object may make it fit where it is. (Closed)
Patch Set: Volvo lastvagnar Created 4 years, 2 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
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // page. That would waste space in the container for no good reason, and it 299 // page. That would waste space in the container for no good reason, and it
300 // would also be a spec violation, since there is no break opportunity defined 300 // would also be a spec violation, since there is no break opportunity defined
301 // between the content logical top of an object and its first child or line 301 // between the content logical top of an object and its first child or line
302 // (only *between* blocks or lines). 302 // (only *between* blocks or lines).
303 LayoutUnit paginationStrutPropagatedFromChild() const { 303 LayoutUnit paginationStrutPropagatedFromChild() const {
304 return m_rareData ? m_rareData->m_paginationStrutPropagatedFromChild 304 return m_rareData ? m_rareData->m_paginationStrutPropagatedFromChild
305 : LayoutUnit(); 305 : LayoutUnit();
306 } 306 }
307 void setPaginationStrutPropagatedFromChild(LayoutUnit); 307 void setPaginationStrutPropagatedFromChild(LayoutUnit);
308 308
309 LayoutUnit firstForcedBreakOffset() const {
310 if (!m_rareData)
311 return LayoutUnit();
312 return m_rareData->m_firstForcedBreakOffset;
313 }
314 void setFirstForcedBreakOffset(LayoutUnit);
315
309 void positionSpannerDescendant(LayoutMultiColumnSpannerPlaceholder& child); 316 void positionSpannerDescendant(LayoutMultiColumnSpannerPlaceholder& child);
310 317
311 bool avoidsFloats() const override; 318 bool avoidsFloats() const override;
312 319
313 using LayoutBoxModelObject::moveChildrenTo; 320 using LayoutBoxModelObject::moveChildrenTo;
314 void moveChildrenTo(LayoutBoxModelObject* toBoxModelObject, 321 void moveChildrenTo(LayoutBoxModelObject* toBoxModelObject,
315 LayoutObject* startChild, 322 LayoutObject* startChild,
316 LayoutObject* endChild, 323 LayoutObject* endChild,
317 LayoutObject* beforeChild, 324 LayoutObject* beforeChild,
318 bool fullRemoveInsert = false) override; 325 bool fullRemoveInsert = false) override;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 static LayoutUnit positiveMarginAfterDefault(const LayoutBlockFlow* block) { 679 static LayoutUnit positiveMarginAfterDefault(const LayoutBlockFlow* block) {
673 return block->marginAfter().clampNegativeToZero(); 680 return block->marginAfter().clampNegativeToZero();
674 } 681 }
675 static LayoutUnit negativeMarginAfterDefault(const LayoutBlockFlow* block) { 682 static LayoutUnit negativeMarginAfterDefault(const LayoutBlockFlow* block) {
676 return (-block->marginAfter()).clampNegativeToZero(); 683 return (-block->marginAfter()).clampNegativeToZero();
677 } 684 }
678 685
679 MarginValues m_margins; 686 MarginValues m_margins;
680 LayoutUnit m_paginationStrutPropagatedFromChild; 687 LayoutUnit m_paginationStrutPropagatedFromChild;
681 688
689 LayoutUnit m_firstForcedBreakOffset;
690
682 LayoutMultiColumnFlowThread* m_multiColumnFlowThread; 691 LayoutMultiColumnFlowThread* m_multiColumnFlowThread;
683 692
684 unsigned m_breakBefore : 4; 693 unsigned m_breakBefore : 4;
685 unsigned m_breakAfter : 4; 694 unsigned m_breakAfter : 4;
686 int m_lineBreakToAvoidWidow; 695 int m_lineBreakToAvoidWidow;
687 bool m_didBreakAtLineToAvoidWidow : 1; 696 bool m_didBreakAtLineToAvoidWidow : 1;
688 bool m_discardMarginBefore : 1; 697 bool m_discardMarginBefore : 1;
689 bool m_discardMarginAfter : 1; 698 bool m_discardMarginAfter : 1;
690 }; 699 };
691 700
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 void positionDialog(); 923 void positionDialog();
915 924
916 // END METHODS DEFINED IN LayoutBlockFlowLine 925 // END METHODS DEFINED IN LayoutBlockFlowLine
917 }; 926 };
918 927
919 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 928 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
920 929
921 } // namespace blink 930 } // namespace blink
922 931
923 #endif // LayoutBlockFlow_h 932 #endif // LayoutBlockFlow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698