OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2012 Apple Inc. All rights reserved. |
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 if (!style()->width().isPercent()) | 109 if (!style()->width().isPercent()) |
110 minLogicalWidth = maxLogicalWidth; | 110 minLogicalWidth = maxLogicalWidth; |
111 } | 111 } |
112 | 112 |
113 void LayoutFileUploadControl::computePreferredLogicalWidths() | 113 void LayoutFileUploadControl::computePreferredLogicalWidths() |
114 { | 114 { |
115 ASSERT(preferredLogicalWidthsDirty()); | 115 ASSERT(preferredLogicalWidthsDirty()); |
116 | 116 |
117 m_minPreferredLogicalWidth = 0; | 117 m_minPreferredLogicalWidth = 0; |
118 m_maxPreferredLogicalWidth = 0; | 118 m_maxPreferredLogicalWidth = 0; |
119 const LayoutStyle& styleToUse = styleRef(); | 119 const ComputedStyle& styleToUse = styleRef(); |
120 | 120 |
121 if (styleToUse.width().isFixed() && styleToUse.width().value() > 0) | 121 if (styleToUse.width().isFixed() && styleToUse.width().value() > 0) |
122 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentB
oxLogicalWidthForBoxSizing(styleToUse.width().value()); | 122 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentB
oxLogicalWidthForBoxSizing(styleToUse.width().value()); |
123 else | 123 else |
124 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferred
LogicalWidth); | 124 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferred
LogicalWidth); |
125 | 125 |
126 if (styleToUse.minWidth().isFixed() && styleToUse.minWidth().value() > 0) { | 126 if (styleToUse.minWidth().isFixed() && styleToUse.minWidth().value() > 0) { |
127 m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjust
ContentBoxLogicalWidthForBoxSizing(styleToUse.minWidth().value())); | 127 m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjust
ContentBoxLogicalWidthForBoxSizing(styleToUse.minWidth().value())); |
128 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjust
ContentBoxLogicalWidthForBoxSizing(styleToUse.minWidth().value())); | 128 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjust
ContentBoxLogicalWidthForBoxSizing(styleToUse.minWidth().value())); |
129 } | 129 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 162 } |
163 | 163 |
164 String LayoutFileUploadControl::fileTextValue() const | 164 String LayoutFileUploadControl::fileTextValue() const |
165 { | 165 { |
166 HTMLInputElement* input = toHTMLInputElement(node()); | 166 HTMLInputElement* input = toHTMLInputElement(node()); |
167 ASSERT(input->files()); | 167 ASSERT(input->files()); |
168 return LayoutTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); | 168 return LayoutTheme::theme().fileListNameForWidth(input->locale(), input->fil
es(), style()->font(), maxFilenameWidth()); |
169 } | 169 } |
170 | 170 |
171 } // namespace blink | 171 } // namespace blink |
OLD | NEW |