Changeset 139216 in webkit
- Timestamp:
- Jan 9, 2013 11:41:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139214 r139216 1 2013-01-08 Ojan Vafai <ojan@chromium.org> 2 3 min-content gets the wrong value if min-width is set on some form controls 4 https://bugs.webkit.org/show_bug.cgi?id=106389 5 6 Reviewed by Tony Chang. 7 8 * fast/forms/min-content-form-controls-expected.txt: Added. 9 * fast/forms/min-content-form-controls.html: Added. 10 1 11 2013-01-09 Roger Fong <roger_fong@apple.com> 2 12 -
trunk/LayoutTests/platform/mac/TestExpectations
r139176 r139216 1245 1245 webkit.org/b/105932 [ MountainLion Debug ] http/tests/inspector/resource-har-pages.html [ Crash ] 1246 1246 1247 # Need to see this run on the bots to see what's wrong. The code change in 1248 # https://bugs.webkit.org/show_bug.cgi?id=106389 is only touching cross-platform code. 1249 Bug(ojan) fast/forms/min-content-form-controls.html [ Failure ] 1250 1247 1251 webkit.org/b/105986 [ Debug ] transitions/hang-with-bad-transition-list.html [ Pass Crash ] 1248 1252 webkit.org/b/105986 [ Debug ] svg/dynamic-updates/SVGFEMorphologyElement-dom-in-attr.html [ Pass Crash ] -
trunk/Source/WebCore/ChangeLog
r139213 r139216 1 2013-01-08 Ojan Vafai <ojan@chromium.org> 2 3 min-content gets the wrong value if min-width is set on some form controls 4 https://bugs.webkit.org/show_bug.cgi?id=106389 5 6 Reviewed by Tony Chang. 7 8 Simplify the logic. The only exposed change in behavior is that 9 m_minPreferredLogicalWidth gets set to m_maxPreferredLogicalWidth 10 instead of 0 when min-width is set. 11 12 Test: fast/forms/min-content-form-controls.html 13 14 * rendering/RenderFileUploadControl.cpp: 15 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): 16 * rendering/RenderListBox.cpp: 17 (WebCore::RenderListBox::computePreferredLogicalWidths): 18 * rendering/RenderMenuList.cpp: 19 (WebCore::RenderMenuList::computePreferredLogicalWidths): 20 * rendering/RenderSlider.cpp: 21 (WebCore::RenderSlider::computePreferredLogicalWidths): 22 * rendering/RenderTextControl.cpp: 23 (WebCore::RenderTextControl::computePreferredLogicalWidths): 24 1 25 2013-01-09 Abhishek Arya <inferno@chromium.org> 2 26 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r139089 r139216 191 191 defaultLabelWidth += buttonRenderer->maxPreferredLogicalWidth() + afterButtonSpacing; 192 192 m_maxPreferredLogicalWidth = static_cast<int>(ceilf(max(minDefaultLabelWidth, defaultLabelWidth))); 193 194 if (!style->width().isPercent()) 195 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 193 196 } 194 197 … … 196 199 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value())); 197 200 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value())); 198 } else if (style->width().isPercent()) 199 m_minPreferredLogicalWidth = 0; 200 else 201 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 201 } 202 202 203 203 if (style->maxWidth().isFixed()) { -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r139089 r139216 217 217 if (m_vBar) 218 218 m_maxPreferredLogicalWidth += m_vBar->width(); 219 220 if (!style()->width().isPercent()) 221 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 219 222 } 220 223 … … 222 225 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 223 226 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 224 } else if (style()->width().isPercent()) 225 m_minPreferredLogicalWidth = 0; 226 else 227 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 227 } 228 228 229 229 if (style()->maxWidth().isFixed()) { -
trunk/Source/WebCore/rendering/RenderMenuList.cpp
r139089 r139216 280 280 if (style()->width().isFixed() && style()->width().value() > 0) 281 281 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value()); 282 else 282 else { 283 283 m_maxPreferredLogicalWidth = max(m_optionsWidth, theme()->minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight(); 284 285 if (!style()->width().isPercent()) 286 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 287 } 284 288 285 289 if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { 286 290 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 287 291 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 288 } else if (style()->width().isPercent()) 289 m_minPreferredLogicalWidth = 0; 290 else 291 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 292 } 292 293 293 294 if (style()->maxWidth().isFixed()) { -
trunk/Source/WebCore/rendering/RenderSlider.cpp
r139089 r139216 78 78 if (style()->width().isFixed() && style()->width().value() > 0) 79 79 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value()); 80 else 80 else { 81 81 m_maxPreferredLogicalWidth = defaultTrackLength * style()->effectiveZoom(); 82 83 if (!style()->width().isPercent()) 84 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 85 } 82 86 83 87 if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { 84 88 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 85 89 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 86 } else if (style()->width().isPercent()) 87 m_minPreferredLogicalWidth = 0; 88 else 89 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 90 90 } 91 91 92 if (style()->maxWidth().isFixed()) { 92 93 m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value())); -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r139089 r139216 270 270 if (RenderBox* innerTextRenderBox = innerTextElement()->renderBox()) 271 271 m_maxPreferredLogicalWidth += innerTextRenderBox->paddingLeft() + innerTextRenderBox->paddingRight(); 272 273 if (!style()->width().isPercent()) 274 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 272 275 } 273 276 … … 275 278 m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 276 279 m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value())); 277 } else if (style()->width().isPercent()) 278 m_minPreferredLogicalWidth = 0; 279 else 280 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; 280 } 281 281 282 282 if (style()->maxWidth().isFixed()) {
Note: See TracChangeset
for help on using the changeset viewer.