| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 childStyle.setFlexGrow(1.0f); | 62 childStyle.setFlexGrow(1.0f); |
| 63 // min-width: 0; is needed for correct shrinking. | 63 // min-width: 0; is needed for correct shrinking. |
| 64 childStyle.setMinWidth(Length(0, Fixed)); | 64 childStyle.setMinWidth(Length(0, Fixed)); |
| 65 // Use margin:auto instead of align-items:center to get safe centering, i.e. | 65 // Use margin:auto instead of align-items:center to get safe centering, i.e. |
| 66 // when the content overflows, treat it the same as align-items: flex-start. | 66 // when the content overflows, treat it the same as align-items: flex-start. |
| 67 childStyle.setMarginTop(Length()); | 67 childStyle.setMarginTop(Length()); |
| 68 childStyle.setMarginBottom(Length()); | 68 childStyle.setMarginBottom(Length()); |
| 69 childStyle.setFlexDirection(style()->flexDirection()); | 69 childStyle.setFlexDirection(style()->flexDirection()); |
| 70 childStyle.setJustifyContent(style()->justifyContent()); | 70 childStyle.setJustifyContent(style()->justifyContent()); |
| 71 childStyle.setFlexWrap(style()->flexWrap()); | 71 childStyle.setFlexWrap(style()->flexWrap()); |
| 72 // TODO (lajava): An anonymous box must not be used to resolve children's auto
values. | 72 // TODO (lajava): An anonymous box must not be used to resolve children's auto |
| 73 // values. |
| 73 childStyle.setAlignItems(style()->alignItems()); | 74 childStyle.setAlignItems(style()->alignItems()); |
| 74 childStyle.setAlignContent(style()->alignContent()); | 75 childStyle.setAlignContent(style()->alignContent()); |
| 75 } | 76 } |
| 76 | 77 |
| 77 LayoutRect LayoutButton::controlClipRect( | 78 LayoutRect LayoutButton::controlClipRect( |
| 78 const LayoutPoint& additionalOffset) const { | 79 const LayoutPoint& additionalOffset) const { |
| 79 // Clip to the padding box to at least give content the extra padding space. | 80 // Clip to the padding box to at least give content the extra padding space. |
| 80 LayoutRect rect(additionalOffset, size()); | 81 LayoutRect rect(additionalOffset, size()); |
| 81 rect.expand(borderInsets()); | 82 rect.expand(borderInsets()); |
| 82 return rect; | 83 return rect; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 105 } | 106 } |
| 106 return LayoutFlexibleBox::baselinePosition(baseline, firstLine, direction, | 107 return LayoutFlexibleBox::baselinePosition(baseline, firstLine, direction, |
| 107 linePositionMode); | 108 linePositionMode); |
| 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 return !isHTMLButtonElement(node()); | 113 return !isHTMLButtonElement(node()); |
| 113 } | 114 } |
| 114 } // namespace blink | 115 } // namespace blink |
| OLD | NEW |