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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2745 LayoutBlock* cb = containingBlock(); | 2745 LayoutBlock* cb = containingBlock(); |
| 2746 if (!cb) { | 2746 if (!cb) { |
| 2747 // We are evaluating align-self/justify-self, which default to 'normal' for | 2747 // We are evaluating align-self/justify-self, which default to 'normal' for |
| 2748 // the root element. The 'normal' value behaves like 'start' except for | 2748 // the root element. The 'normal' value behaves like 'start' except for |
| 2749 // Flexbox Items, which obviously should have a container. | 2749 // Flexbox Items, which obviously should have a container. |
| 2750 return false; | 2750 return false; |
| 2751 } | 2751 } |
| 2752 const ComputedStyle* parentStyle = isAnonymous() ? cb->style() : nullptr; | 2752 const ComputedStyle* parentStyle = isAnonymous() ? cb->style() : nullptr; |
| 2753 if (cb->isHorizontalWritingMode() != isHorizontalWritingMode()) | 2753 if (cb->isHorizontalWritingMode() != isHorizontalWritingMode()) |
| 2754 return style | 2754 return style |
| 2755 .resolvedAlignSelf(cb->selfAlignmentNormalBehavior(), | 2755 .resolvedAlignSelf(cb->selfAlignmentNormalBehavior(this), |
|
jfernandez
2017/03/01 12:46:49
Try to avoid the new 'child' argument.
Manuel Rego
2017/03/01 17:57:07
We need to pass the child in the case of "cb"
is a
| |
| 2756 parentStyle) | 2756 parentStyle) |
| 2757 .position() == ItemPositionStretch; | 2757 .position() == ItemPositionStretch; |
| 2758 return style | 2758 return style |
| 2759 .resolvedJustifySelf(cb->selfAlignmentNormalBehavior(), | 2759 .resolvedJustifySelf(cb->selfAlignmentNormalBehavior(this), |
| 2760 parentStyle) | 2760 parentStyle) |
| 2761 .position() == ItemPositionStretch; | 2761 .position() == ItemPositionStretch; |
| 2762 } | 2762 } |
| 2763 | 2763 |
| 2764 bool LayoutBox::sizesLogicalWidthToFitContent( | 2764 bool LayoutBox::sizesLogicalWidthToFitContent( |
| 2765 const Length& logicalWidth) const { | 2765 const Length& logicalWidth) const { |
| 2766 if (isFloating() || isInlineBlockOrInlineTable() || | 2766 if (isFloating() || isInlineBlockOrInlineTable() || |
| 2767 styleRef().hasOutOfFlowPosition()) | 2767 styleRef().hasOutOfFlowPosition()) |
| 2768 return true; | 2768 return true; |
| 2769 | 2769 |
| (...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5730 | 5730 |
| 5731 void LayoutBox::MutableForPainting:: | 5731 void LayoutBox::MutableForPainting:: |
| 5732 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5732 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5733 auto& rareData = layoutBox().ensureRareData(); | 5733 auto& rareData = layoutBox().ensureRareData(); |
| 5734 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5734 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5735 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5735 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5736 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5736 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5737 } | 5737 } |
| 5738 | 5738 |
| 5739 } // namespace blink | 5739 } // namespace blink |
| OLD | NEW |