OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2005 Apple Computer, Inc. | 2 * Copyright (C) 2005 Apple Computer, Inc. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 { | 90 { |
91 ASSERT(innerStyle->refCount() == 1); | 91 ASSERT(innerStyle->refCount() == 1); |
92 // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is | 92 // RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is |
93 // safe to modify. | 93 // safe to modify. |
94 innerStyle->setFlexGrow(1.0f); | 94 innerStyle->setFlexGrow(1.0f); |
95 // Use margin:auto instead of align-items:center to get safe centering, i.e. | 95 // Use margin:auto instead of align-items:center to get safe centering, i.e. |
96 // when the content overflows, treat it the same as align-items: flex-start. | 96 // when the content overflows, treat it the same as align-items: flex-start. |
97 innerStyle->setMarginTop(Length()); | 97 innerStyle->setMarginTop(Length()); |
98 innerStyle->setMarginBottom(Length()); | 98 innerStyle->setMarginBottom(Length()); |
99 innerStyle->setFlexDirection(style()->flexDirection()); | 99 innerStyle->setFlexDirection(style()->flexDirection()); |
| 100 innerStyle->setJustifyContent(style()->justifyContent()); |
| 101 innerStyle->setFlexWrap(style()->flexWrap()); |
| 102 innerStyle->setAlignItems(style()->alignItems()); |
| 103 innerStyle->setAlignContent(style()->alignContent()); |
100 } | 104 } |
101 | 105 |
102 bool RenderButton::canHaveGeneratedChildren() const | 106 bool RenderButton::canHaveGeneratedChildren() const |
103 { | 107 { |
104 // Input elements can't have generated children, but button elements can. We
'll | 108 // Input elements can't have generated children, but button elements can. We
'll |
105 // write the code assuming any other button types that might emerge in the f
uture | 109 // write the code assuming any other button types that might emerge in the f
uture |
106 // can also have children. | 110 // can also have children. |
107 return !isHTMLInputElement(*node()); | 111 return !isHTMLInputElement(*node()); |
108 } | 112 } |
109 | 113 |
(...skipping 15 matching lines...) Expand all Loading... |
125 // baseline for the empty case manually here. | 129 // baseline for the empty case manually here. |
126 if (direction == HorizontalLine) | 130 if (direction == HorizontalLine) |
127 return marginTop() + borderTop() + paddingTop() + contentHeight(); | 131 return marginTop() + borderTop() + paddingTop() + contentHeight(); |
128 | 132 |
129 return marginRight() + borderRight() + paddingRight() + contentWidth(); | 133 return marginRight() + borderRight() + paddingRight() + contentWidth(); |
130 } | 134 } |
131 return RenderFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); | 135 return RenderFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); |
132 } | 136 } |
133 | 137 |
134 } // namespace WebCore | 138 } // namespace WebCore |
OLD | NEW |