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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 childStyle.setFlexGrow(1.0f); | 69 childStyle.setFlexGrow(1.0f); |
70 // min-width: 0; is needed for correct shrinking. | 70 // min-width: 0; is needed for correct shrinking. |
71 childStyle.setMinWidth(Length(0, Fixed)); | 71 childStyle.setMinWidth(Length(0, Fixed)); |
72 // Use margin:auto instead of align-items:center to get safe centering, i.e. | 72 // Use margin:auto instead of align-items:center to get safe centering, i.e. |
73 // when the content overflows, treat it the same as align-items: flex-start. | 73 // when the content overflows, treat it the same as align-items: flex-start. |
74 childStyle.setMarginTop(Length()); | 74 childStyle.setMarginTop(Length()); |
75 childStyle.setMarginBottom(Length()); | 75 childStyle.setMarginBottom(Length()); |
76 childStyle.setFlexDirection(style()->flexDirection()); | 76 childStyle.setFlexDirection(style()->flexDirection()); |
77 childStyle.setJustifyContent(style()->justifyContent()); | 77 childStyle.setJustifyContent(style()->justifyContent()); |
78 childStyle.setFlexWrap(style()->flexWrap()); | 78 childStyle.setFlexWrap(style()->flexWrap()); |
| 79 // TODO (lajava): An anonymous box must not be used to resolve children's au
to values. |
79 childStyle.setAlignItems(style()->alignItems()); | 80 childStyle.setAlignItems(style()->alignItems()); |
80 childStyle.setAlignContent(style()->alignContent()); | 81 childStyle.setAlignContent(style()->alignContent()); |
81 } | 82 } |
82 | 83 |
83 LayoutRect LayoutButton::controlClipRect(const LayoutPoint& additionalOffset) co
nst | 84 LayoutRect LayoutButton::controlClipRect(const LayoutPoint& additionalOffset) co
nst |
84 { | 85 { |
85 // Clip to the padding box to at least give content the extra padding space. | 86 // Clip to the padding box to at least give content the extra padding space. |
86 LayoutRect rect(additionalOffset, size()); | 87 LayoutRect rect(additionalOffset, size()); |
87 rect.expand(borderInsets()); | 88 rect.expand(borderInsets()); |
88 return rect; | 89 return rect; |
(...skipping 17 matching lines...) Expand all Loading... |
106 return LayoutFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); | 107 return LayoutFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); |
107 } | 108 } |
108 | 109 |
109 | 110 |
110 // For compatibility with IE/FF we only clip overflow on input elements. | 111 // For compatibility with IE/FF we only clip overflow on input elements. |
111 bool LayoutButton::hasControlClip() const | 112 bool LayoutButton::hasControlClip() const |
112 { | 113 { |
113 return !isHTMLButtonElement(node()); | 114 return !isHTMLButtonElement(node()); |
114 } | 115 } |
115 } // namespace blink | 116 } // namespace blink |
OLD | NEW |