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

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

Issue 1222693005: Self-collapsing block gets layout set during margin collapsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 5 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
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 m_rareData->m_discardMarginBefore = false; 459 m_rareData->m_discardMarginBefore = false;
460 m_rareData->m_discardMarginAfter = false; 460 m_rareData->m_discardMarginAfter = false;
461 } 461 }
462 } 462 }
463 463
464 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; 464 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
465 private: 465 private:
466 virtual LayoutUnit collapsedMarginBefore() const override final { return max PositiveMarginBefore() - maxNegativeMarginBefore(); } 466 virtual LayoutUnit collapsedMarginBefore() const override final { return max PositiveMarginBefore() - maxNegativeMarginBefore(); }
467 virtual LayoutUnit collapsedMarginAfter() const override final { return maxP ositiveMarginAfter() - maxNegativeMarginAfter(); } 467 virtual LayoutUnit collapsedMarginAfter() const override final { return maxP ositiveMarginAfter() - maxNegativeMarginAfter(); }
468 468
469 LayoutUnit collapseMargins(LayoutBox& child, MarginInfo&, bool childIsSelfCo llapsing); 469 LayoutUnit collapseMargins(LayoutBox& child, MarginInfo&, bool childIsSelfCo llapsing, bool childDiscardMarginBefore, bool childDiscardMarginAfter);
470 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, MarginInfo&, LayoutUnit old TopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos, bool childIsSelfColla psing); 470 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, MarginInfo&, LayoutUnit old TopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos, bool childIsSelfColla psing, bool childDiscardMargin);
471 LayoutUnit estimateLogicalTopPosition(LayoutBox& child, const MarginInfo&, L ayoutUnit& estimateWithoutPagination); 471 LayoutUnit estimateLogicalTopPosition(LayoutBox& child, const MarginInfo&, L ayoutUnit& estimateWithoutPagination);
472 void marginBeforeEstimateForChild(LayoutBox&, LayoutUnit&, LayoutUnit&, bool &) const; 472 void marginBeforeEstimateForChild(LayoutBox&, LayoutUnit&, LayoutUnit&, bool &) const;
473 void handleAfterSideOfBlock(LayoutBox* lastChild, LayoutUnit top, LayoutUnit bottom, MarginInfo&); 473 void handleAfterSideOfBlock(LayoutBox* lastChild, LayoutUnit top, LayoutUnit bottom, MarginInfo&);
474 void setCollapsedBottomMargin(const MarginInfo&); 474 void setCollapsedBottomMargin(const MarginInfo&);
475 475
476 LayoutUnit applyBeforeBreak(LayoutBox& child, LayoutUnit logicalOffset); // If the child has a before break, then return a new yPos that shifts to the top o f the next page/column. 476 LayoutUnit applyBeforeBreak(LayoutBox& child, LayoutUnit logicalOffset); // If the child has a before break, then return a new yPos that shifts to the top o f the next page/column.
477 LayoutUnit applyAfterBreak(LayoutBox& 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. 477 LayoutUnit applyAfterBreak(LayoutBox& 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.
478 478
479 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La youtUnit estimateWithoutPagination, LayoutBox& child, bool atBeforeSideOfBlock); 479 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La youtUnit estimateWithoutPagination, LayoutBox& child, bool atBeforeSideOfBlock);
480 // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page. 480 // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 537
538 // END METHODS DEFINED IN LayoutBlockFlowLine 538 // END METHODS DEFINED IN LayoutBlockFlowLine
539 539
540 }; 540 };
541 541
542 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 542 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
543 543
544 } // namespace blink 544 } // namespace blink
545 545
546 #endif // LayoutBlockFlow_h 546 #endif // LayoutBlockFlow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698