Changeset 147261 in webkit
- Timestamp:
- Mar 29, 2013 4:32:46 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147255 r147261 1 2013-03-29 Ojan Vafai <ojan@chromium.org> 2 3 Flexitems no longer default min-width to min-content 4 https://bugs.webkit.org/show_bug.cgi?id=111790 5 6 Reviewed by Tony Chang. 7 8 * css3/flexbox/content-height-with-scrollbars.html: 9 * css3/flexbox/cross-axis-scrollbar.html: 10 Set flex:none to avoid flex-shrinking. 11 12 * css3/flexbox/flex-item-min-size-expected.txt: Removed. 13 * css3/flexbox/flex-item-min-size.html: Removed. 14 These tests are now redundant with tests in fast/css-intrinsic-dimensions. 15 16 * css3/flexbox/flexbox-baseline.html: 17 Set flex:none to avoid flex-shrinking. 18 19 * css3/flexbox/line-wrapping.html: 20 Auto-size the flex items so that the column flexboxes have an auto-height. 21 22 * css3/flexbox/preferred-widths.html: 23 Set flex:none to avoid flex-shrinking. 24 25 * fast/css/auto-min-size-expected.txt: 26 * fast/css/auto-min-size.html: 27 Update to no longer allow parsing auto as a valid value for min-width/min-height. 28 29 2013-03-29 Aaron Colwell <acolwell@chromium.org> 30 31 Add LayoutTests that verify MediaSource.duration behavior. 32 https://bugs.webkit.org/show_bug.cgi?id=113438 33 34 Reviewed by Eric Carlson. 35 36 * http/tests/media/media-source/video-media-source-duration-boundaryconditions-expected.txt: Added. 37 * http/tests/media/media-source/video-media-source-duration-boundaryconditions.html: Added. 38 * http/tests/media/media-source/video-media-source-duration-expected.txt: Added. 39 * http/tests/media/media-source/video-media-source-duration.html: Added. 40 41 2013-03-29 Joshua Bell <jsbell@chromium.org> 42 43 [Chromium] IndexedDB: Update terminated worker connection test 44 https://bugs.webkit.org/show_bug.cgi?id=113608 45 46 Reviewed by Tony Chang. 47 48 Update layout test only run under Chromium's content_shell that ensures that 49 worker termination does not result in stuck connections. The test was using 50 the obsolete setVersion() API. 51 52 * storage/indexeddb/pending-version-change-stuck-works-with-terminate-expected.txt: 53 * storage/indexeddb/pending-version-change-stuck-works-with-terminate.html: 54 * storage/indexeddb/resources/pending-version-change-stuck.js: 55 (test.request.onblocked): 56 (test): 57 1 58 2013-03-29 Aaron Colwell <acolwell@chromium.org> 2 59 -
trunk/LayoutTests/css3/flexbox/content-height-with-scrollbars.html
r130457 r147261 7 7 height: 100px; 8 8 overflow: scroll; 9 } 10 .flexbox > div { 11 -webkit-flex: none; 12 flex: none; 9 13 } 10 14 .flexbox > :nth-child(1) { -
trunk/LayoutTests/css3/flexbox/cross-axis-scrollbar.html
r130457 r147261 21 21 22 22 .column > div { 23 -webkit-flex: none; 24 flex: none; 23 25 background-color: green; 24 26 width: 100px; … … 29 31 background-color: green; 30 32 -webkit-flex: 1; 31 -moz-flex: 1;33 flex: 1; 32 34 height: 50px; 33 35 min-height: 0; … … 35 37 36 38 .vertical-lr > .column > div { 39 -webkit-flex: none; 40 flex: none; 37 41 height: 50px; 38 42 width: 20px; … … 41 45 .vertical-lr > .row > div { 42 46 -webkit-flex: 1; 43 -moz-flex: 1;47 flex: 1; 44 48 width: 100px; 45 49 } -
trunk/LayoutTests/css3/flexbox/line-wrapping.html
r130979 r147261 48 48 49 49 .horizontal-tb.column > div { 50 -webkit-flex: 1 ;50 -webkit-flex: 1 auto; 51 51 } 52 52 .vertical-lr.column > div, .vertical-rl.column > div { 53 -webkit-flex: 1 ;53 -webkit-flex: 1 auto; 54 54 } 55 55 -
trunk/LayoutTests/css3/flexbox/preferred-widths.html
r130979 r147261 10 10 padding: 2px 13px 8px 17px; 11 11 margin: 2px 13px 8px 17px; 12 -webkit-flex: none; 13 flex: none; 12 14 } 13 15 .title { -
trunk/LayoutTests/fast/css/auto-min-size-expected.txt
r122264 r147261 1 1 PASS div.style.minWidth is "" 2 2 PASS getComputedStyle(div)["min-width"] is "0px" 3 PASS div.style.minWidth is "" 4 PASS div.style.maxWidth is "" 5 PASS getComputedStyle(div).minWidth is "0px" 3 6 PASS div.style.minWidth is "0px" 4 7 PASS getComputedStyle(div)["min-width"] is "0px" 5 PASS div.style.minWidth is "auto"6 PASS div.style.maxWidth is ""7 PASS getComputedStyle(div).minWidth is "0px"8 8 PASS div.style.minHeight is "" 9 9 PASS getComputedStyle(div)["min-height"] is "0px" 10 PASS div.style.minHeight is "" 11 PASS div.style.maxHeight is "" 12 PASS getComputedStyle(div).minHeight is "0px" 10 13 PASS div.style.minHeight is "0px" 11 14 PASS getComputedStyle(div)["min-height"] is "0px" 12 PASS div.style.minHeight is "auto"13 PASS div.style.maxHeight is ""14 PASS getComputedStyle(div).minHeight is "0px"15 15 PASS successfullyParsed is true 16 16 -
trunk/LayoutTests/fast/css/auto-min-size.html
r122264 r147261 7 7 shouldBe('getComputedStyle(div)["min-width"]', '"0px"'); 8 8 9 div.style.minWidth = 'auto'; 10 div.style.maxWidth = 'auto'; 11 shouldBe('div.style.minWidth', '""'); 12 shouldBe('div.style.maxWidth', '""'); 13 shouldBe('getComputedStyle(div).minWidth', '"0px"'); 14 9 15 div.style.minWidth = 0; 10 16 shouldBe('div.style.minWidth', '"0px"'); 11 17 shouldBe('getComputedStyle(div)["min-width"]', '"0px"'); 12 18 13 div.style.minWidth = 'auto';14 div.style.maxWidth = 'auto';15 shouldBe('div.style.minWidth', '"auto"');16 shouldBe('div.style.maxWidth', '""');17 shouldBe('getComputedStyle(div).minWidth', '"0px"');18 19 19 shouldBe('div.style.minHeight', '""'); 20 20 shouldBe('getComputedStyle(div)["min-height"]', '"0px"'); 21 22 div.style.minHeight = 'auto'; 23 div.style.maxHeight = 'auto'; 24 shouldBe('div.style.minHeight', '""'); 25 shouldBe('div.style.maxHeight', '""'); 26 shouldBe('getComputedStyle(div).minHeight', '"0px"'); 21 27 22 28 div.style.minHeight = 0; … … 24 30 shouldBe('getComputedStyle(div)["min-height"]', '"0px"'); 25 31 26 div.style.minHeight = 'auto';27 div.style.maxHeight = 'auto';28 shouldBe('div.style.minHeight', '"auto"');29 shouldBe('div.style.maxHeight', '""');30 shouldBe('getComputedStyle(div).minHeight', '"0px"');31 32 </script> 32 33 <script src='../js/resources/js-test-post.js'></script> -
trunk/Source/WebCore/ChangeLog
r147260 r147261 1 2013-03-29 Ojan Vafai <ojan@chromium.org> 2 3 Flexitems no longer default min-width to min-content 4 https://bugs.webkit.org/show_bug.cgi?id=111790 5 6 Reviewed by Tony Chang. 7 8 * css/CSSParser.cpp: 9 (WebCore::CSSParser::parseValue): 10 Disallow auto as a valid min-size value. 11 12 * css/html.css: 13 (input::-webkit-datetime-edit): 14 (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): 15 (input[type="range"]::-webkit-slider-runnable-track): 16 Remove now unnecessary min-width: 0's. 17 18 * css/mediaControlsChromium.css: 19 (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure): 20 (video::-webkit-media-controls-enclosure): 21 Set a flex-shrink: 0 to avoid shrinking these items below the designated height. 22 23 * rendering/RenderBox.cpp: 24 (WebCore::RenderBox::constrainLogicalHeightByMinMax): 25 (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax): 26 (WebCore::RenderBox::computeLogicalWidthInRegionUsing): 27 (WebCore::RenderBox::computeLogicalHeight): 28 (WebCore::RenderBox::computeLogicalHeightUsing): 29 (WebCore::RenderBox::computeContentLogicalHeight): 30 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing): 31 (WebCore::RenderBox::computeReplacedLogicalWidth): 32 (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): 33 (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 34 (WebCore::RenderBox::computeReplacedLogicalHeight): 35 (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): 36 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 37 (WebCore::RenderBox::availableLogicalHeightUsing): 38 (WebCore::RenderBox::computePositionedLogicalWidth): 39 (WebCore::RenderBox::computePositionedLogicalWidthUsing): 40 (WebCore::RenderBox::computePositionedLogicalHeight): 41 (WebCore::RenderBox::computePositionedLogicalHeightUsing): 42 Remove all the unneeded SizeType arguments now that we don't need to 43 specially handle MinSize in all these functions. 44 45 * rendering/RenderBox.h: 46 * rendering/RenderButton.cpp: 47 (WebCore::RenderButton::styleWillChange): 48 (WebCore::RenderButton::setupInnerStyle): 49 No longer need to explicitly set min-width:0. 50 51 * rendering/RenderFlexibleBox.cpp: 52 (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): 53 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): 54 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): 55 Remove the code for specially handling auto. 56 57 * rendering/RenderGrid.cpp: 58 (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength): 59 * rendering/RenderRegion.cpp: 60 (WebCore::RenderRegion::maxPageLogicalHeight): 61 * rendering/RenderReplaced.cpp: 62 (WebCore::RenderReplaced::computeReplacedLogicalWidth): 63 (WebCore::RenderReplaced::computeReplacedLogicalHeight): 64 Remove all the now unneeded SizeType arguments. 65 66 * rendering/style/RenderStyle.h: 67 Change the default min-size back to 0. 68 1 69 2013-03-29 Alexey Proskuryakov <ap@apple.com> 2 70 -
trunk/Source/WebCore/css/CSSParser.cpp
r147034 r147261 2215 2215 case CSSPropertyMinWidth: 2216 2216 case CSSPropertyWebkitMinLogicalWidth: 2217 validPrimitive = validWidth(value); 2218 break; 2219 2217 2220 case CSSPropertyWidth: 2218 2221 case CSSPropertyWebkitLogicalWidth: … … 2227 2230 case CSSPropertyMinHeight: 2228 2231 case CSSPropertyWebkitMinLogicalHeight: 2232 validPrimitive = validHeight(value); 2233 break; 2234 2229 2235 case CSSPropertyHeight: 2230 2236 case CSSPropertyWebkitLogicalHeight: -
trunk/Source/WebCore/css/html.css
r146847 r147261 565 565 -webkit-user-modify: read-only !important; 566 566 display: inline-block; 567 min-width: 0;568 567 overflow: hidden; 569 568 } … … 830 829 input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container { 831 830 -webkit-flex: 1; 832 min-width: 0;833 834 831 box-sizing: border-box; 835 832 -webkit-user-modify: read-only !important; … … 840 837 input[type="range"]::-webkit-slider-runnable-track { 841 838 -webkit-flex: 1; 842 min-width: 0;843 839 -webkit-align-self: center; 844 840 -
trunk/Source/WebCore/css/mediaControlsChromium.css
r146992 r147261 56 56 max-width: 800px; 57 57 height: 30px; 58 -webkit-flex-shrink: 0; 58 59 bottom: 0; 59 60 text-indent: 0; … … 65 66 padding: 0px 5px 5px 5px; 66 67 height: 35px; 68 -webkit-flex-shrink: 0; 67 69 } 68 70 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r147127 r147261 512 512 RenderStyle* styleToUse = style(); 513 513 if (!styleToUse->logicalMaxHeight().isUndefined()) { 514 LayoutUnit maxH = computeLogicalHeightUsing( MaxSize,styleToUse->logicalMaxHeight());514 LayoutUnit maxH = computeLogicalHeightUsing(styleToUse->logicalMaxHeight()); 515 515 if (maxH != -1) 516 516 logicalHeight = min(logicalHeight, maxH); 517 517 } 518 return max(logicalHeight, computeLogicalHeightUsing( MinSize,styleToUse->logicalMinHeight()));518 return max(logicalHeight, computeLogicalHeightUsing(styleToUse->logicalMinHeight())); 519 519 } 520 520 … … 523 523 RenderStyle* styleToUse = style(); 524 524 if (!styleToUse->logicalMaxHeight().isUndefined()) { 525 LayoutUnit maxH = computeContentLogicalHeight( MaxSize,styleToUse->logicalMaxHeight());525 LayoutUnit maxH = computeContentLogicalHeight(styleToUse->logicalMaxHeight()); 526 526 if (maxH != -1) 527 527 logicalHeight = min(logicalHeight, maxH); 528 528 } 529 return max(logicalHeight, computeContentLogicalHeight( MinSize,styleToUse->logicalMinHeight()));529 return max(logicalHeight, computeContentLogicalHeight(styleToUse->logicalMinHeight())); 530 530 } 531 531 … … 2202 2202 const RenderBlock* cb, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const 2203 2203 { 2204 if (widthType == MinSize && logicalWidth.isAuto())2205 return adjustBorderBoxLogicalWidthForBoxSizing(0);2206 2207 2204 if (!logicalWidth.isIntrinsicOrAuto()) { 2208 2205 // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead. … … 2514 2511 LayoutUnit heightResult; 2515 2512 if (checkMinMaxHeight) { 2516 heightResult = computeLogicalHeightUsing( MainOrPreferredSize,style()->logicalHeight());2513 heightResult = computeLogicalHeightUsing(style()->logicalHeight()); 2517 2514 if (heightResult == -1) 2518 2515 heightResult = computedValues.m_extent; … … 2561 2558 } 2562 2559 2563 LayoutUnit RenderBox::computeLogicalHeightUsing( SizeType heightType,const Length& height) const2564 { 2565 LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(height Type, height);2560 LayoutUnit RenderBox::computeLogicalHeightUsing(const Length& height) const 2561 { 2562 LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(height); 2566 2563 if (logicalHeight != -1) 2567 2564 logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight); … … 2569 2566 } 2570 2567 2571 LayoutUnit RenderBox::computeContentLogicalHeight( SizeType heightType,const Length& height) const2572 { 2573 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(height Type, height);2568 LayoutUnit RenderBox::computeContentLogicalHeight(const Length& height) const 2569 { 2570 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(height); 2574 2571 if (heightIncludingScrollbar == -1) 2575 2572 return -1; … … 2577 2574 } 2578 2575 2579 LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(SizeType heightType, const Length& height) const 2580 { 2581 if (height.isAuto()) 2582 return heightType == MinSize ? 0 : -1; 2576 LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(const Length& height) const 2577 { 2583 2578 if (height.isFixed()) 2584 2579 return height.value(); … … 2694 2689 LayoutUnit RenderBox::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const 2695 2690 { 2696 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing( MainOrPreferredSize,style()->logicalWidth()), shouldComputePreferred);2691 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing(style()->logicalWidth()), shouldComputePreferred); 2697 2692 } 2698 2693 2699 2694 LayoutUnit RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, ShouldComputePreferred shouldComputePreferred) const 2700 2695 { 2701 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMinWidth().isPercent()) || style()->logicalMinWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing( MinSize,style()->logicalMinWidth());2702 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMaxWidth().isPercent()) || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing( MaxSize,style()->logicalMaxWidth());2696 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMinWidth().isPercent()) || style()->logicalMinWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMinWidth()); 2697 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMaxWidth().isPercent()) || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth()); 2703 2698 return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth)); 2704 2699 } 2705 2700 2706 LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(SizeType sizeType, Length logicalWidth) const 2707 { 2708 if (sizeType == MinSize && logicalWidth.isAuto()) 2709 return adjustContentBoxLogicalWidthForBoxSizing(0); 2710 2701 LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(Length logicalWidth) const 2702 { 2711 2703 switch (logicalWidth.type()) { 2712 2704 case Fixed: … … 2754 2746 LayoutUnit RenderBox::computeReplacedLogicalHeight() const 2755 2747 { 2756 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing( MainOrPreferredSize,style()->logicalHeight()));2748 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing(style()->logicalHeight())); 2757 2749 } 2758 2750 2759 2751 LayoutUnit RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit logicalHeight) const 2760 2752 { 2761 LayoutUnit minLogicalHeight = computeReplacedLogicalHeightUsing( MinSize,style()->logicalMinHeight());2762 LayoutUnit maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing( MaxSize,style()->logicalMaxHeight());2753 LayoutUnit minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight()); 2754 LayoutUnit maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight()); 2763 2755 return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight)); 2764 2756 } 2765 2757 2766 LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType sizeType, Length logicalHeight) const 2767 { 2768 if (sizeType == MinSize && logicalHeight.isAuto()) 2769 return adjustContentBoxLogicalHeightForBoxSizing(0); 2770 2758 LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) const 2759 { 2771 2760 switch (logicalHeight.type()) { 2772 2761 case Fixed: … … 2854 2843 } 2855 2844 2856 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing( MainOrPreferredSize,h);2845 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(h); 2857 2846 if (heightIncludingScrollbar != -1) 2858 2847 return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight()); … … 3126 3115 3127 3116 // Calculate constraint equation values for 'width' case. 3128 computePositionedLogicalWidthUsing( MainOrPreferredSize,style()->logicalWidth(), containerBlock, containerDirection,3117 computePositionedLogicalWidthUsing(style()->logicalWidth(), containerBlock, containerDirection, 3129 3118 containerLogicalWidth, bordersPlusPadding, 3130 3119 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalRight, … … 3135 3124 LogicalExtentComputedValues maxValues; 3136 3125 3137 computePositionedLogicalWidthUsing( MaxSize,style()->logicalMaxWidth(), containerBlock, containerDirection,3126 computePositionedLogicalWidthUsing(style()->logicalMaxWidth(), containerBlock, containerDirection, 3138 3127 containerLogicalWidth, bordersPlusPadding, 3139 3128 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalRight, … … 3152 3141 LogicalExtentComputedValues minValues; 3153 3142 3154 computePositionedLogicalWidthUsing( MinSize,style()->logicalMinWidth(), containerBlock, containerDirection,3143 computePositionedLogicalWidthUsing(style()->logicalMinWidth(), containerBlock, containerDirection, 3155 3144 containerLogicalWidth, bordersPlusPadding, 3156 3145 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalRight, … … 3198 3187 } 3199 3188 3200 void RenderBox::computePositionedLogicalWidthUsing( SizeType widthSizeType,Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,3189 void RenderBox::computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection, 3201 3190 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding, 3202 3191 Length logicalLeft, Length logicalRight, Length marginLogicalLeft, Length marginLogicalRight, 3203 3192 LogicalExtentComputedValues& computedValues) const 3204 3193 { 3205 if (widthSizeType == MinSize && logicalWidth.isAuto()) 3206 logicalWidth = Length(0, Fixed); 3207 else if (logicalWidth.isIntrinsic()) 3194 if (logicalWidth.isIntrinsic()) 3208 3195 logicalWidth = Length(computeIntrinsicLogicalWidthUsing(logicalWidth, containerLogicalWidth, bordersPlusPadding) - bordersPlusPadding, Fixed); 3209 3196 … … 3446 3433 // Calculate constraint equation values for 'height' case. 3447 3434 LayoutUnit logicalHeight = computedValues.m_extent; 3448 computePositionedLogicalHeightUsing( MainOrPreferredSize,styleToUse->logicalHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,3435 computePositionedLogicalHeightUsing(styleToUse->logicalHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3449 3436 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3450 3437 computedValues); … … 3457 3444 LogicalExtentComputedValues maxValues; 3458 3445 3459 computePositionedLogicalHeightUsing( MaxSize,styleToUse->logicalMaxHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,3446 computePositionedLogicalHeightUsing(styleToUse->logicalMaxHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3460 3447 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3461 3448 maxValues); … … 3473 3460 LogicalExtentComputedValues minValues; 3474 3461 3475 computePositionedLogicalHeightUsing( MinSize,styleToUse->logicalMinHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,3462 computePositionedLogicalHeightUsing(styleToUse->logicalMinHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3476 3463 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3477 3464 minValues); … … 3530 3517 } 3531 3518 3532 void RenderBox::computePositionedLogicalHeightUsing( SizeType heightSizeType,Length logicalHeightLength, const RenderBoxModelObject* containerBlock,3519 void RenderBox::computePositionedLogicalHeightUsing(Length logicalHeightLength, const RenderBoxModelObject* containerBlock, 3533 3520 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, 3534 3521 Length logicalTop, Length logicalBottom, Length marginBefore, Length marginAfter, 3535 3522 LogicalExtentComputedValues& computedValues) const 3536 3523 { 3537 if (heightSizeType == MinSize && logicalHeightLength.isAuto())3538 logicalHeightLength = Length(0, Fixed);3539 3540 3524 // 'top' and 'bottom' cannot both be 'auto' because 'top would of been 3541 3525 // converted to the static position in computePositionedLogicalHeight() -
trunk/Source/WebCore/rendering/RenderBox.h
r146955 r147261 412 412 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; 413 413 414 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length , LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;415 LayoutUnit computeLogicalHeightUsing( SizeType,const Length& height) const;416 LayoutUnit computeContentLogicalHeight( SizeType,const Length& height) const;417 LayoutUnit computeContentAndScrollbarLogicalHeightUsing( SizeType,const Length& height) const;418 LayoutUnit computeReplacedLogicalWidthUsing( SizeType,Length width) const;414 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; 415 LayoutUnit computeLogicalHeightUsing(const Length& height) const; 416 LayoutUnit computeContentLogicalHeight(const Length& height) const; 417 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height) const; 418 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; 419 419 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, ShouldComputePreferred = ComputeActual) const; 420 LayoutUnit computeReplacedLogicalHeightUsing( SizeType,Length height) const;420 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; 421 421 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit logicalHeight) const; 422 422 … … 648 648 649 649 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; 650 void computePositionedLogicalWidthUsing( SizeType,Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection,650 void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection, 651 651 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding, 652 652 Length logicalLeft, Length logicalRight, Length marginLogicalLeft, Length marginLogicalRight, 653 653 LogicalExtentComputedValues&) const; 654 void computePositionedLogicalHeightUsing( SizeType,Length logicalHeightLength, const RenderBoxModelObject* containerBlock,654 void computePositionedLogicalHeightUsing(Length logicalHeightLength, const RenderBoxModelObject* containerBlock, 655 655 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, 656 656 Length logicalTop, Length logicalBottom, Length marginLogicalTop, Length marginLogicalBottom, -
trunk/Source/WebCore/rendering/RenderButton.cpp
r143643 r147261 81 81 // FIXME: Make this hack unnecessary. 82 82 m_inner->style()->setFlexGrow(newStyle->initialFlexGrow()); 83 m_inner->style()->setMinWidth(newStyle->initialMinSize());84 83 m_inner->style()->setMarginTop(newStyle->initialMargin()); 85 84 m_inner->style()->setMarginBottom(newStyle->initialMargin()); … … 114 113 // safe to modify. 115 114 innerStyle->setFlexGrow(1.0f); 116 // min-width: 0; is needed for correct shrinking.117 // FIXME: If and when the spec changes to not require this, we should118 // remove this line and the corresponding line in styleWillChange.119 // See: http://lists.w3.org/Archives/Public/www-style/2013Feb/0364.html120 innerStyle->setMinWidth(Length(0, Fixed));121 115 // Use margin:auto instead of align-items:center to get safe centering, i.e. 122 116 // when the content overflows, treat it the same as align-items: flex-start. -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r146684 r147261 535 535 // FIXME: This is wrong for orthogonal flows. It should use the flexbox's writing-mode, not the child's in order 536 536 // to figure out the logical height/width. 537 // FIXME: This is wrong if the height is set to an intrinsic keyword value. computeContentLogicalHeight will return -1. 538 // Instead, we need to layout the child an get the appropriate height value. 539 // https://bugs.webkit.org/show_bug.cgi?id=113610 537 540 if (isColumnFlow()) 538 return child->computeContentLogicalHeight(sizeType, size); 539 if (size.isAuto()) 540 return -1; 541 return child->computeContentLogicalHeight(size); 541 542 // FIXME: Figure out how this should work for regions and pass in the appropriate values. 542 543 LayoutUnit offsetFromLogicalTopOfFirstPage = 0; … … 907 908 908 909 // Only need to layout here if we will need to get the logicalHeight of the child in computeNextFlexLine. 909 Length childMainAxisMin = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight(); 910 if (hasOrthogonalFlow(child) && (flexBasisForChild(child).isAuto() || childMainAxisMin.isAuto())) { 910 if (hasOrthogonalFlow(child) && flexBasisForChild(child).isAuto()) { 911 911 child->setChildNeedsLayout(true, MarkOnlyThis); 912 912 child->layout(); … … 938 938 if (min.isSpecifiedOrIntrinsic()) 939 939 minExtent = computeMainAxisExtentForChild(child, MinSize, min); 940 else if (min.isAuto()) {941 if (hasOrthogonalFlow(child))942 minExtent = child->logicalHeight() - child->borderAndPaddingLogicalHeight();943 else944 minExtent = computeMainAxisExtentForChild(child, MinSize, Length(MinContent));945 }946 940 return std::max(childSize, minExtent); 947 941 } -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r147140 r147261 318 318 // FIXME: We still need to support calc() here (https://webkit.org/b/103761). 319 319 ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isViewportPercentage()); 320 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight( MainOrPreferredSize,style()->logicalHeight()), view());320 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight()), view()); 321 321 } 322 322 -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r147082 r147261 75 75 { 76 76 ASSERT(hasAutoLogicalHeight() && view()->normalLayoutPhase()); 77 return style()->logicalMaxHeight().isUndefined() ? LayoutUnit::max() / 2 : computeReplacedLogicalHeightUsing( MaxSize,style()->logicalMaxHeight());77 return style()->logicalMaxHeight().isUndefined() ? LayoutUnit::max() / 2 : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight()); 78 78 } 79 79 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r146279 r147261 322 322 { 323 323 if (style()->logicalWidth().isSpecified() || style()->logicalWidth().isIntrinsic()) 324 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing( MainOrPreferredSize,style()->logicalWidth()), shouldComputePreferred);324 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogicalWidthUsing(style()->logicalWidth()), shouldComputePreferred); 325 325 326 326 RenderBox* contentRenderer = embeddedContentBox(); … … 358 358 LayoutUnit logicalWidth; 359 359 if (RenderBlock* blockWithWidth = firstContainingBlockWithLogicalWidth(this)) 360 logicalWidth = blockWithWidth->computeReplacedLogicalWidthRespectingMinMaxWidth(blockWithWidth->computeReplacedLogicalWidthUsing( MainOrPreferredSize,blockWithWidth->style()->logicalWidth()), shouldComputePreferred);360 logicalWidth = blockWithWidth->computeReplacedLogicalWidthRespectingMinMaxWidth(blockWithWidth->computeReplacedLogicalWidthUsing(blockWithWidth->style()->logicalWidth()), shouldComputePreferred); 361 361 else 362 362 logicalWidth = containingBlock()->availableLogicalWidth(); … … 390 390 // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/visudet.html#propdef-height 391 391 if (hasReplacedLogicalHeight()) 392 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing( MainOrPreferredSize,style()->logicalHeight()));392 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLogicalHeightUsing(style()->logicalHeight())); 393 393 394 394 RenderBox* contentRenderer = embeddedContentBox(); -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r146408 r147261 1612 1612 static int initialLetterWordSpacing() { return 0; } 1613 1613 static Length initialSize() { return Length(); } 1614 static Length initialMinSize() { return Length( ); }1614 static Length initialMinSize() { return Length(Fixed); } 1615 1615 static Length initialMaxSize() { return Length(Undefined); } 1616 1616 static Length initialOffset() { return Length(); } -
trunk/Source/WebKit2/ChangeLog
r147260 r147261 1 2013-03-29 Brady Eidson <beidson@apple.com> 2 3 Crash when "willSendRequest" causes the ResourceLoader to be cancelled. 4 <rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616 5 6 Reviewed by Alexey Proskuryakov. 7 8 These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed. 9 A RefPtr<> protector fixes that. 10 11 Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess. 12 13 * WebProcess/Network/WebResourceLoadScheduler.cpp: 14 (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader. 15 16 * WebProcess/Network/WebResourceLoader.cpp: 17 (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer. 18 (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed. 19 (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto 20 (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore 21 ResourceLoader, and null check it before delivering the "didFinishLoader" call. 22 * WebProcess/Network/WebResourceLoader.h: 23 24 2013-03-29 Brady Eidson <beidson@apple.com> 25 26 Should never send events to plugins waiting on asynchronous initialization. 27 <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612 28 29 Reviewed by Anders Carlsson. 30 31 Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly. 32 33 A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return: 34 35 * WebProcess/Plugins/PluginProxy.cpp: 36 (WebKit::PluginProxy::handleMouseEvent): 37 (WebKit::PluginProxy::handleWheelEvent): 38 (WebKit::PluginProxy::handleMouseEnterEvent): 39 (WebKit::PluginProxy::handleMouseLeaveEvent): 40 (WebKit::PluginProxy::handleKeyboardEvent): 41 (WebKit::PluginProxy::handleEditingCommand): 42 (WebKit::PluginProxy::isEditingCommandEnabled): 43 (WebKit::PluginProxy::handlesPageScaleFactor): 44 45 2013-03-29 Brady Eidson <beidson@apple.com> 46 47 Should never send events to plugins waiting on asynchronous initialization. 48 <rdar://problem/13538945> and https://bugs.webkit.org/show_bug.cgi?id=113612 49 50 Reviewed by Anders Carlsson. 51 52 Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly. 53 54 A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return: 55 56 * WebProcess/Plugins/PluginProxy.cpp: 57 (WebKit::PluginProxy::handleMouseEvent): 58 (WebKit::PluginProxy::handleWheelEvent): 59 (WebKit::PluginProxy::handleMouseEnterEvent): 60 (WebKit::PluginProxy::handleMouseLeaveEvent): 61 (WebKit::PluginProxy::handleKeyboardEvent): 62 (WebKit::PluginProxy::handleEditingCommand): 63 (WebKit::PluginProxy::isEditingCommandEnabled): 64 (WebKit::PluginProxy::handlesPageScaleFactor): 65 1 66 2013-03-29 Alexey Proskuryakov <ap@apple.com> 2 67
Note: See TracChangeset
for help on using the changeset viewer.