Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: Source/core/layout/LayoutBox.cpp

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 const ComputedStyle& styleToUse = styleRef(); 581 const ComputedStyle& styleToUse = styleRef();
582 if (!styleToUse.logicalMaxWidth().isMaxSizeNone()) 582 if (!styleToUse.logicalMaxWidth().isMaxSizeNone())
583 logicalWidth = std::min(logicalWidth, computeLogicalWidthUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb)); 583 logicalWidth = std::min(logicalWidth, computeLogicalWidthUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb));
584 return std::max(logicalWidth, computeLogicalWidthUsing(MinSize, styleToUse.l ogicalMinWidth(), availableWidth, cb)); 584 return std::max(logicalWidth, computeLogicalWidthUsing(MinSize, styleToUse.l ogicalMinWidth(), availableWidth, cb));
585 } 585 }
586 586
587 LayoutUnit LayoutBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, L ayoutUnit intrinsicContentHeight) const 587 LayoutUnit LayoutBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, L ayoutUnit intrinsicContentHeight) const
588 { 588 {
589 const ComputedStyle& styleToUse = styleRef(); 589 const ComputedStyle& styleToUse = styleRef();
590 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) { 590 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) {
591 LayoutUnit maxH = computeLogicalHeightUsing(styleToUse.logicalMaxHeight( ), intrinsicContentHeight); 591 LayoutUnit maxH = computeLogicalHeightUsing(MaxSize, styleToUse.logicalM axHeight(), intrinsicContentHeight);
592 if (maxH != -1) 592 if (maxH != -1)
593 logicalHeight = std::min(logicalHeight, maxH); 593 logicalHeight = std::min(logicalHeight, maxH);
594 } 594 }
595 return std::max(logicalHeight, computeLogicalHeightUsing(styleToUse.logicalM inHeight(), intrinsicContentHeight)); 595 return std::max(logicalHeight, computeLogicalHeightUsing(MinSize, styleToUse .logicalMinHeight(), intrinsicContentHeight));
596 } 596 }
597 597
598 LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica lHeight, LayoutUnit intrinsicContentHeight) const 598 LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica lHeight, LayoutUnit intrinsicContentHeight) const
599 { 599 {
600 const ComputedStyle& styleToUse = styleRef(); 600 const ComputedStyle& styleToUse = styleRef();
601 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) { 601 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) {
602 LayoutUnit maxH = computeContentLogicalHeight(styleToUse.logicalMaxHeigh t(), intrinsicContentHeight); 602 LayoutUnit maxH = computeContentLogicalHeight(MaxSize, styleToUse.logica lMaxHeight(), intrinsicContentHeight);
603 if (maxH != -1) 603 if (maxH != -1)
604 logicalHeight = std::min(logicalHeight, maxH); 604 logicalHeight = std::min(logicalHeight, maxH);
605 } 605 }
606 return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logica lMinHeight(), intrinsicContentHeight)); 606 return std::max(logicalHeight, computeContentLogicalHeight(MinSize, styleToU se.logicalMinHeight(), intrinsicContentHeight));
607 } 607 }
608 608
609 void LayoutBox::setLocationAndUpdateOverflowControlsIfNeeded(const LayoutPoint& location) 609 void LayoutBox::setLocationAndUpdateOverflowControlsIfNeeded(const LayoutPoint& location)
610 { 610 {
611 if (hasOverflowClip()) { 611 if (hasOverflowClip()) {
612 IntSize oldPixelSnappedBorderRectSize = pixelSnappedBorderBoxRect().size (); 612 IntSize oldPixelSnappedBorderRectSize = pixelSnappedBorderBoxRect().size ();
613 setLocation(location); 613 setLocation(location);
614 if (pixelSnappedBorderBoxRect().size() != oldPixelSnappedBorderRectSize) 614 if (pixelSnappedBorderBoxRect().size() != oldPixelSnappedBorderRectSize)
615 scrollableArea()->updateAfterLayout(); 615 scrollableArea()->updateAfterLayout();
616 return; 616 return;
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 maxLogicalWidth += borderAndPadding; 2074 maxLogicalWidth += borderAndPadding;
2075 return std::max(minLogicalWidth, std::min(maxLogicalWidth, fillAvailable Measure(availableLogicalWidth))); 2075 return std::max(minLogicalWidth, std::min(maxLogicalWidth, fillAvailable Measure(availableLogicalWidth)));
2076 } 2076 }
2077 2077
2078 ASSERT_NOT_REACHED(); 2078 ASSERT_NOT_REACHED();
2079 return 0; 2079 return 0;
2080 } 2080 }
2081 2081
2082 LayoutUnit LayoutBox::computeLogicalWidthUsing(SizeType widthType, const Length& logicalWidth, LayoutUnit availableLogicalWidth, const LayoutBlock* cb) const 2082 LayoutUnit LayoutBox::computeLogicalWidthUsing(SizeType widthType, const Length& logicalWidth, LayoutUnit availableLogicalWidth, const LayoutBlock* cb) const
2083 { 2083 {
2084 if (widthType == MinSize && logicalWidth.isAuto()) {
leviw_travelin_and_unemployed 2015/04/02 22:14:36 Nit: no braces necessary.
cbiesinger 2015/04/03 18:49:17 Done.
2085 return adjustBorderBoxLogicalWidthForBoxSizing(0);
2086 }
2087
2084 if (!logicalWidth.isIntrinsicOrAuto()) { 2088 if (!logicalWidth.isIntrinsicOrAuto()) {
2085 // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead. 2089 // FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead.
2086 return adjustBorderBoxLogicalWidthForBoxSizing(valueForLength(logicalWid th, availableLogicalWidth)); 2090 return adjustBorderBoxLogicalWidthForBoxSizing(valueForLength(logicalWid th, availableLogicalWidth));
2087 } 2091 }
2088 2092
2089 if (logicalWidth.isIntrinsic()) 2093 if (logicalWidth.isIntrinsic())
2090 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalW idth, borderAndPaddingLogicalWidth()); 2094 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalW idth, borderAndPaddingLogicalWidth());
2091 2095
2092 LayoutUnit marginStart = 0; 2096 LayoutUnit marginStart = 0;
2093 LayoutUnit marginEnd = 0; 2097 LayoutUnit marginEnd = 0;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 // Block children of horizontal flexible boxes fill the height of the bo x. 2328 // Block children of horizontal flexible boxes fill the height of the bo x.
2325 // FIXME: Account for writing-mode in flexible boxes. 2329 // FIXME: Account for writing-mode in flexible boxes.
2326 // https://bugs.webkit.org/show_bug.cgi?id=46418 2330 // https://bugs.webkit.org/show_bug.cgi?id=46418
2327 if (h.isAuto() && inHorizontalBox && toLayoutDeprecatedFlexibleBox(paren t())->isStretchingChildren()) { 2331 if (h.isAuto() && inHorizontalBox && toLayoutDeprecatedFlexibleBox(paren t())->isStretchingChildren()) {
2328 h = Length(parentBox()->contentLogicalHeight() - marginBefore() - ma rginAfter() - borderAndPaddingLogicalHeight(), Fixed); 2332 h = Length(parentBox()->contentLogicalHeight() - marginBefore() - ma rginAfter() - borderAndPaddingLogicalHeight(), Fixed);
2329 checkMinMaxHeight = false; 2333 checkMinMaxHeight = false;
2330 } 2334 }
2331 2335
2332 LayoutUnit heightResult; 2336 LayoutUnit heightResult;
2333 if (checkMinMaxHeight) { 2337 if (checkMinMaxHeight) {
2334 heightResult = computeLogicalHeightUsing(style()->logicalHeight(), c omputedValues.m_extent - borderAndPaddingLogicalHeight()); 2338 heightResult = computeLogicalHeightUsing(MainOrPreferredSize, style( )->logicalHeight(), computedValues.m_extent - borderAndPaddingLogicalHeight());
2335 if (heightResult == -1) 2339 if (heightResult == -1)
2336 heightResult = computedValues.m_extent; 2340 heightResult = computedValues.m_extent;
2337 heightResult = constrainLogicalHeightByMinMax(heightResult, computed Values.m_extent - borderAndPaddingLogicalHeight()); 2341 heightResult = constrainLogicalHeightByMinMax(heightResult, computed Values.m_extent - borderAndPaddingLogicalHeight());
2338 } else { 2342 } else {
2339 // The only times we don't check min/max height are when a fixed len gth has 2343 // The only times we don't check min/max height are when a fixed len gth has
2340 // been given as an override. Just use that. The value has already been adjusted 2344 // been given as an override. Just use that. The value has already been adjusted
2341 // for box-sizing. 2345 // for box-sizing.
2342 ASSERT(h.isFixed()); 2346 ASSERT(h.isFixed());
2343 heightResult = h.value() + borderAndPaddingLogicalHeight(); 2347 heightResult = h.value() + borderAndPaddingLogicalHeight();
2344 } 2348 }
(...skipping 15 matching lines...) Expand all
2360 LayoutUnit visibleHeight = view()->viewLogicalHeightForPercentages(); 2364 LayoutUnit visibleHeight = view()->viewLogicalHeightForPercentages();
2361 if (isDocumentElement()) { 2365 if (isDocumentElement()) {
2362 computedValues.m_extent = std::max(computedValues.m_extent, visibleH eight - margins); 2366 computedValues.m_extent = std::max(computedValues.m_extent, visibleH eight - margins);
2363 } else { 2367 } else {
2364 LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefo re() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight() ; 2368 LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefo re() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight() ;
2365 computedValues.m_extent = std::max(computedValues.m_extent, visibleH eight - marginsBordersPadding); 2369 computedValues.m_extent = std::max(computedValues.m_extent, visibleH eight - marginsBordersPadding);
2366 } 2370 }
2367 } 2371 }
2368 } 2372 }
2369 2373
2370 LayoutUnit LayoutBox::computeLogicalHeightUsing(const Length& height, LayoutUnit intrinsicContentHeight) const 2374 LayoutUnit LayoutBox::computeLogicalHeightUsing(SizeType heightType, const Lengt h& height, LayoutUnit intrinsicContentHeight) const
2371 { 2375 {
2372 LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(heig ht, intrinsicContentHeight); 2376 LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(heig htType, height, intrinsicContentHeight);
2373 if (logicalHeight != -1) 2377 if (logicalHeight != -1)
2374 logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight); 2378 logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight);
2375 return logicalHeight; 2379 return logicalHeight;
2376 } 2380 }
2377 2381
2378 LayoutUnit LayoutBox::computeContentLogicalHeight(const Length& height, LayoutUn it intrinsicContentHeight) const 2382 LayoutUnit LayoutBox::computeContentLogicalHeight(SizeType heightType, const Len gth& height, LayoutUnit intrinsicContentHeight) const
2379 { 2383 {
2380 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh tUsing(height, intrinsicContentHeight); 2384 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh tUsing(heightType, height, intrinsicContentHeight);
2381 if (heightIncludingScrollbar == -1) 2385 if (heightIncludingScrollbar == -1)
2382 return -1; 2386 return -1;
2383 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(heig htIncludingScrollbar) - scrollbarLogicalHeight()); 2387 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(heig htIncludingScrollbar) - scrollbarLogicalHeight());
2384 } 2388 }
2385 2389
2386 LayoutUnit LayoutBox::computeIntrinsicLogicalContentHeightUsing(const Length& lo gicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPaddin g) const 2390 LayoutUnit LayoutBox::computeIntrinsicLogicalContentHeightUsing(const Length& lo gicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPaddin g) const
2387 { 2391 {
2388 // FIXME(cbiesinger): The css-sizing spec is considering changing what min-c ontent/max-content should resolve to. 2392 // FIXME(cbiesinger): The css-sizing spec is considering changing what min-c ontent/max-content should resolve to.
2389 // If that happens, this code will have to change. 2393 // If that happens, this code will have to change.
2390 if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent()) { 2394 if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent()) {
2391 if (isReplaced()) 2395 if (isReplaced())
2392 return intrinsicSize().height(); 2396 return intrinsicSize().height();
2393 if (m_intrinsicContentLogicalHeight != -1) 2397 if (m_intrinsicContentLogicalHeight != -1)
2394 return m_intrinsicContentLogicalHeight; 2398 return m_intrinsicContentLogicalHeight;
2395 return intrinsicContentHeight; 2399 return intrinsicContentHeight;
2396 } 2400 }
2397 if (logicalHeightLength.isFillAvailable()) 2401 if (logicalHeightLength.isFillAvailable())
2398 return containingBlock()->availableLogicalHeight(ExcludeMarginBorderPadd ing) - borderAndPadding; 2402 return containingBlock()->availableLogicalHeight(ExcludeMarginBorderPadd ing) - borderAndPadding;
2399 ASSERT_NOT_REACHED(); 2403 ASSERT_NOT_REACHED();
2400 return 0; 2404 return 0;
2401 } 2405 }
2402 2406
2403 LayoutUnit LayoutBox::computeContentAndScrollbarLogicalHeightUsing(const Length& height, LayoutUnit intrinsicContentHeight) const 2407 LayoutUnit LayoutBox::computeContentAndScrollbarLogicalHeightUsing(SizeType heig htType, const Length& height, LayoutUnit intrinsicContentHeight) const
2404 { 2408 {
2409 if (height.isAuto())
2410 return heightType == MinSize ? 0 : -1;
2405 // FIXME(cbiesinger): The css-sizing spec is considering changing what min-c ontent/max-content should resolve to. 2411 // FIXME(cbiesinger): The css-sizing spec is considering changing what min-c ontent/max-content should resolve to.
2406 // If that happens, this code will have to change. 2412 // If that happens, this code will have to change.
2407 if (height.isIntrinsic()) { 2413 if (height.isIntrinsic()) {
2408 if (intrinsicContentHeight == -1) 2414 if (intrinsicContentHeight == -1)
2409 return -1; // Intrinsic height isn't available. 2415 return -1; // Intrinsic height isn't available.
2410 return computeIntrinsicLogicalContentHeightUsing(height, intrinsicConten tHeight, borderAndPaddingLogicalHeight()); 2416 return computeIntrinsicLogicalContentHeightUsing(height, intrinsicConten tHeight, borderAndPaddingLogicalHeight());
2411 } 2417 }
2412 if (height.isFixed()) 2418 if (height.isFixed())
2413 return height.value(); 2419 return height.value();
2414 if (height.isPercent()) 2420 if (height.isPercent())
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 // box model. This is essential for sizing inside 2532 // box model. This is essential for sizing inside
2527 // table cells using percentage heights. 2533 // table cells using percentage heights.
2528 result -= borderAndPaddingLogicalHeight(); 2534 result -= borderAndPaddingLogicalHeight();
2529 return std::max(LayoutUnit(), result); 2535 return std::max(LayoutUnit(), result);
2530 } 2536 }
2531 return result; 2537 return result;
2532 } 2538 }
2533 2539
2534 LayoutUnit LayoutBox::computeReplacedLogicalWidth(ShouldComputePreferred shouldC omputePreferred) const 2540 LayoutUnit LayoutBox::computeReplacedLogicalWidth(ShouldComputePreferred shouldC omputePreferred) const
2535 { 2541 {
2536 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogic alWidthUsing(style()->logicalWidth()), shouldComputePreferred); 2542 return computeReplacedLogicalWidthRespectingMinMaxWidth(computeReplacedLogic alWidthUsing(MainOrPreferredSize, style()->logicalWidth()), shouldComputePreferr ed);
2537 } 2543 }
2538 2544
2539 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni t logicalWidth, ShouldComputePreferred shouldComputePreferred) const 2545 LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni t logicalWidth, ShouldComputePreferred shouldComputePreferred) const
2540 { 2546 {
2541 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMinWidth().isPercent()) || style()->logicalMinWidth().isMaxSizeN one() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMinWidth ()); 2547 LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMinWidth().isPercent()) || style()->logicalMinWidth().isMaxSizeN one() ? logicalWidth : computeReplacedLogicalWidthUsing(MinSize, style()->logica lMinWidth());
2542 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMaxWidth().isPercent()) || style()->logicalMaxWidth().isMaxSizeN one() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth ()); 2548 LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style()->logicalMaxWidth().isPercent()) || style()->logicalMaxWidth().isMaxSizeN one() ? logicalWidth : computeReplacedLogicalWidthUsing(MaxSize, style()->logica lMaxWidth());
2543 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth)); 2549 return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth));
2544 } 2550 }
2545 2551
2546 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing(const Length& logicalWidt h) const 2552 LayoutUnit LayoutBox::computeReplacedLogicalWidthUsing(SizeType sizeType, const Length& logicalWidth) const
2547 { 2553 {
2554 if (sizeType == MinSize && logicalWidth.isAuto())
2555 return adjustContentBoxLogicalWidthForBoxSizing(0);
2556
2548 switch (logicalWidth.type()) { 2557 switch (logicalWidth.type()) {
2549 case Fixed: 2558 case Fixed:
2550 return adjustContentBoxLogicalWidthForBoxSizing(logicalWidth.value()); 2559 return adjustContentBoxLogicalWidthForBoxSizing(logicalWidth.value());
2551 case MinContent: 2560 case MinContent:
2552 case MaxContent: { 2561 case MaxContent: {
2553 // MinContent/MaxContent don't need the availableLogicalWidth argument. 2562 // MinContent/MaxContent don't need the availableLogicalWidth argument.
2554 LayoutUnit availableLogicalWidth = 0; 2563 LayoutUnit availableLogicalWidth = 0;
2555 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalW idth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth(); 2564 return computeIntrinsicLogicalWidthUsing(logicalWidth, availableLogicalW idth, borderAndPaddingLogicalWidth()) - borderAndPaddingLogicalWidth();
2556 } 2565 }
2557 case FitContent: 2566 case FitContent:
(...skipping 23 matching lines...) Expand all
2581 case DeviceHeight: 2590 case DeviceHeight:
2582 break; 2591 break;
2583 } 2592 }
2584 2593
2585 ASSERT_NOT_REACHED(); 2594 ASSERT_NOT_REACHED();
2586 return 0; 2595 return 0;
2587 } 2596 }
2588 2597
2589 LayoutUnit LayoutBox::computeReplacedLogicalHeight() const 2598 LayoutUnit LayoutBox::computeReplacedLogicalHeight() const
2590 { 2599 {
2591 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLog icalHeightUsing(style()->logicalHeight())); 2600 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplacedLog icalHeightUsing(MainOrPreferredSize, style()->logicalHeight()));
2592 } 2601 }
2593 2602
2594 bool LayoutBox::logicalHeightComputesAsNone(SizeType sizeType) const 2603 bool LayoutBox::logicalHeightComputesAsNone(SizeType sizeType) const
2595 { 2604 {
2596 ASSERT(sizeType == MinSize || sizeType == MaxSize); 2605 ASSERT(sizeType == MinSize || sizeType == MaxSize);
2597 Length logicalHeight = sizeType == MinSize ? style()->logicalMinHeight() : s tyle()->logicalMaxHeight(); 2606 Length logicalHeight = sizeType == MinSize ? style()->logicalMinHeight() : s tyle()->logicalMaxHeight();
2598 Length initialLogicalHeight = sizeType == MinSize ? ComputedStyle::initialMi nSize() : ComputedStyle::initialMaxSize(); 2607 Length initialLogicalHeight = sizeType == MinSize ? ComputedStyle::initialMi nSize() : ComputedStyle::initialMaxSize();
2599 2608
2600 if (logicalHeight == initialLogicalHeight) 2609 if (logicalHeight == initialLogicalHeight)
2601 return true; 2610 return true;
2602 2611
2603 if (LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeight)) 2612 if (LayoutBlock* cb = containingBlockForAutoHeightDetection(logicalHeight))
2604 return cb->hasAutoHeightOrContainingBlockWithAutoHeight(); 2613 return cb->hasAutoHeightOrContainingBlockWithAutoHeight();
2605 return false; 2614 return false;
2606 } 2615 }
2607 2616
2608 LayoutUnit LayoutBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutU nit logicalHeight) const 2617 LayoutUnit LayoutBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutU nit logicalHeight) const
2609 { 2618 {
2610 // If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, 2619 // If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned,
2611 // the percentage value is treated as '0' (for 'min-height') or 'none' (for 'max-height'). 2620 // the percentage value is treated as '0' (for 'min-height') or 'none' (for 'max-height').
2612 LayoutUnit minLogicalHeight; 2621 LayoutUnit minLogicalHeight;
2613 if (!logicalHeightComputesAsNone(MinSize)) 2622 if (!logicalHeightComputesAsNone(MinSize))
2614 minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMin Height()); 2623 minLogicalHeight = computeReplacedLogicalHeightUsing(MinSize, style()->l ogicalMinHeight());
2615 LayoutUnit maxLogicalHeight = logicalHeight; 2624 LayoutUnit maxLogicalHeight = logicalHeight;
2616 if (!logicalHeightComputesAsNone(MaxSize)) 2625 if (!logicalHeightComputesAsNone(MaxSize))
2617 maxLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMa xHeight()); 2626 maxLogicalHeight = computeReplacedLogicalHeightUsing(MaxSize, style()-> logicalMaxHeight());
2618 return std::max(minLogicalHeight, std::min(logicalHeight, maxLogicalHeight)) ; 2627 return std::max(minLogicalHeight, std::min(logicalHeight, maxLogicalHeight)) ;
2619 } 2628 }
2620 2629
2621 LayoutUnit LayoutBox::computeReplacedLogicalHeightUsing(const Length& logicalHei ght) const 2630 LayoutUnit LayoutBox::computeReplacedLogicalHeightUsing(SizeType sizeType, const Length& logicalHeight) const
2622 { 2631 {
2632 if (sizeType == MinSize && logicalHeight.isAuto())
2633 return adjustContentBoxLogicalHeightForBoxSizing(0);
2634
2623 switch (logicalHeight.type()) { 2635 switch (logicalHeight.type()) {
2624 case Fixed: 2636 case Fixed:
2625 return adjustContentBoxLogicalHeightForBoxSizing(logicalHeight.value()); 2637 return adjustContentBoxLogicalHeightForBoxSizing(logicalHeight.value());
2626 case Percent: 2638 case Percent:
2627 case Calculated: 2639 case Calculated:
2628 { 2640 {
2629 LayoutObject* cb = isOutOfFlowPositioned() ? container() : containingBlo ck(); 2641 LayoutObject* cb = isOutOfFlowPositioned() ? container() : containingBlo ck();
2630 while (cb->isAnonymous()) 2642 while (cb->isAnonymous())
2631 cb = cb->containingBlock(); 2643 cb = cb->containingBlock();
2632 if (cb->isLayoutBlock()) 2644 if (cb->isLayoutBlock())
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 return overrideLogicalContentHeight(); 2709 return overrideLogicalContentHeight();
2698 return logicalHeight() - borderAndPaddingLogicalHeight(); 2710 return logicalHeight() - borderAndPaddingLogicalHeight();
2699 } 2711 }
2700 2712
2701 if (h.isPercent() && isOutOfFlowPositioned()) { 2713 if (h.isPercent() && isOutOfFlowPositioned()) {
2702 // FIXME: This is wrong if the containingBlock has a perpendicular writi ng mode. 2714 // FIXME: This is wrong if the containingBlock has a perpendicular writi ng mode.
2703 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c ontainingBlock()); 2715 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c ontainingBlock());
2704 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail ableHeight)); 2716 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail ableHeight));
2705 } 2717 }
2706 2718
2707 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh tUsing(h, -1); 2719 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh tUsing(MainOrPreferredSize, h, -1);
2708 if (heightIncludingScrollbar != -1) 2720 if (heightIncludingScrollbar != -1)
2709 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing( heightIncludingScrollbar) - scrollbarLogicalHeight()); 2721 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing( heightIncludingScrollbar) - scrollbarLogicalHeight());
2710 2722
2711 // FIXME: Check logicalTop/logicalBottom here to correctly handle vertical w riting-mode. 2723 // FIXME: Check logicalTop/logicalBottom here to correctly handle vertical w riting-mode.
2712 // https://bugs.webkit.org/show_bug.cgi?id=46500 2724 // https://bugs.webkit.org/show_bug.cgi?id=46500
2713 if (isLayoutBlock() && isOutOfFlowPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) { 2725 if (isLayoutBlock() && isOutOfFlowPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) {
2714 LayoutBlock* block = const_cast<LayoutBlock*>(toLayoutBlock(this)); 2726 LayoutBlock* block = const_cast<LayoutBlock*>(toLayoutBlock(this));
2715 LogicalExtentComputedValues computedValues; 2727 LogicalExtentComputedValues computedValues;
2716 block->computeLogicalHeight(block->logicalHeight(), 0, computedValues); 2728 block->computeLogicalHeight(block->logicalHeight(), 0, computedValues);
2717 LayoutUnit newContentHeight = computedValues.m_extent - block->borderAnd PaddingLogicalHeight() - block->scrollbarLogicalHeight(); 2729 LayoutUnit newContentHeight = computedValues.m_extent - block->borderAnd PaddingLogicalHeight() - block->scrollbarLogicalHeight();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2940 * fixed positioned elements is the initial containing block instead of the 2952 * fixed positioned elements is the initial containing block instead of the
2941 * viewport, and all scrollable boxes should be assumed to be scrolled to th eir 2953 * viewport, and all scrollable boxes should be assumed to be scrolled to th eir
2942 * origin. 2954 * origin.
2943 \*-------------------------------------------------------------------------- -*/ 2955 \*-------------------------------------------------------------------------- -*/
2944 2956
2945 // see FIXME 1 2957 // see FIXME 1
2946 // Calculate the static distance if needed. 2958 // Calculate the static distance if needed.
2947 computeInlineStaticDistance(logicalLeftLength, logicalRightLength, this, con tainerBlock, containerLogicalWidth); 2959 computeInlineStaticDistance(logicalLeftLength, logicalRightLength, this, con tainerBlock, containerLogicalWidth);
2948 2960
2949 // Calculate constraint equation values for 'width' case. 2961 // Calculate constraint equation values for 'width' case.
2950 computePositionedLogicalWidthUsing(style()->logicalWidth(), containerBlock, containerDirection, 2962 computePositionedLogicalWidthUsing(MainOrPreferredSize, style()->logicalWidt h(), containerBlock, containerDirection,
2951 containerLogicalWidth, bordersPlusPadding, 2963 containerLogicalWidth, bordersPlusPadding,
2952 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalR ight, 2964 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogicalR ight,
2953 computedValues); 2965 computedValues);
2954 2966
2955 // Calculate constraint equation values for 'max-width' case. 2967 // Calculate constraint equation values for 'max-width' case.
2956 if (!style()->logicalMaxWidth().isMaxSizeNone()) { 2968 if (!style()->logicalMaxWidth().isMaxSizeNone()) {
2957 LogicalExtentComputedValues maxValues; 2969 LogicalExtentComputedValues maxValues;
2958 2970
2959 computePositionedLogicalWidthUsing(style()->logicalMaxWidth(), container Block, containerDirection, 2971 computePositionedLogicalWidthUsing(MaxSize, style()->logicalMaxWidth(), containerBlock, containerDirection,
2960 containerLogicalWidth, bordersPlusPadding, 2972 containerLogicalWidth, bordersPlusPadding,
2961 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogi calRight, 2973 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogi calRight,
2962 maxValues); 2974 maxValues);
2963 2975
2964 if (computedValues.m_extent > maxValues.m_extent) { 2976 if (computedValues.m_extent > maxValues.m_extent) {
2965 computedValues.m_extent = maxValues.m_extent; 2977 computedValues.m_extent = maxValues.m_extent;
2966 computedValues.m_position = maxValues.m_position; 2978 computedValues.m_position = maxValues.m_position;
2967 computedValues.m_margins.m_start = maxValues.m_margins.m_start; 2979 computedValues.m_margins.m_start = maxValues.m_margins.m_start;
2968 computedValues.m_margins.m_end = maxValues.m_margins.m_end; 2980 computedValues.m_margins.m_end = maxValues.m_margins.m_end;
2969 } 2981 }
2970 } 2982 }
2971 2983
2972 // Calculate constraint equation values for 'min-width' case. 2984 // Calculate constraint equation values for 'min-width' case.
2973 if (!style()->logicalMinWidth().isZero() || style()->logicalMinWidth().isInt rinsic()) { 2985 if (!style()->logicalMinWidth().isZero() || style()->logicalMinWidth().isInt rinsic()) {
2974 LogicalExtentComputedValues minValues; 2986 LogicalExtentComputedValues minValues;
2975 2987
2976 computePositionedLogicalWidthUsing(style()->logicalMinWidth(), container Block, containerDirection, 2988 computePositionedLogicalWidthUsing(MinSize, style()->logicalMinWidth(), containerBlock, containerDirection,
2977 containerLogicalWidth, bordersPlusPadding, 2989 containerLogicalWidth, bordersPlusPadding,
2978 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogi calRight, 2990 logicalLeftLength, logicalRightLength, marginLogicalLeft, marginLogi calRight,
2979 minValues); 2991 minValues);
2980 2992
2981 if (computedValues.m_extent < minValues.m_extent) { 2993 if (computedValues.m_extent < minValues.m_extent) {
2982 computedValues.m_extent = minValues.m_extent; 2994 computedValues.m_extent = minValues.m_extent;
2983 computedValues.m_position = minValues.m_position; 2995 computedValues.m_position = minValues.m_position;
2984 computedValues.m_margins.m_start = minValues.m_margins.m_start; 2996 computedValues.m_margins.m_start = minValues.m_margins.m_start;
2985 computedValues.m_margins.m_end = minValues.m_margins.m_end; 2997 computedValues.m_margins.m_end = minValues.m_margins.m_end;
2986 } 2998 }
(...skipping 17 matching lines...) Expand all
3004 } 3016 }
3005 } 3017 }
3006 3018
3007 LayoutUnit LayoutBox::shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutUnit bordersPlusPadding) const 3019 LayoutUnit LayoutBox::shrinkToFitLogicalWidth(LayoutUnit availableLogicalWidth, LayoutUnit bordersPlusPadding) const
3008 { 3020 {
3009 LayoutUnit preferredLogicalWidth = maxPreferredLogicalWidth() - bordersPlusP adding; 3021 LayoutUnit preferredLogicalWidth = maxPreferredLogicalWidth() - bordersPlusP adding;
3010 LayoutUnit preferredMinLogicalWidth = minPreferredLogicalWidth() - bordersPl usPadding; 3022 LayoutUnit preferredMinLogicalWidth = minPreferredLogicalWidth() - bordersPl usPadding;
3011 return std::min(std::max(preferredMinLogicalWidth, availableLogicalWidth), p referredLogicalWidth); 3023 return std::min(std::max(preferredMinLogicalWidth, availableLogicalWidth), p referredLogicalWidth);
3012 } 3024 }
3013 3025
3014 void LayoutBox::computePositionedLogicalWidthUsing(Length logicalWidth, const La youtBoxModelObject* containerBlock, TextDirection containerDirection, 3026 void LayoutBox::computePositionedLogicalWidthUsing(SizeType widthSizeType, Lengt h logicalWidth, const LayoutBoxModelObject* containerBlock, TextDirection contai nerDirection,
3015 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding, 3027 LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding,
3016 const Length& logicalLeft, const Length& logicalRight, const Length& marginL ogicalLeft, 3028 const Length& logicalLeft, const Length& logicalRight, const Length& marginL ogicalLeft,
3017 const Length& marginLogicalRight, LogicalExtentComputedValues& computedValue s) const 3029 const Length& marginLogicalRight, LogicalExtentComputedValues& computedValue s) const
3018 { 3030 {
3019 if (logicalWidth.isIntrinsic()) 3031 if (widthSizeType == MinSize && logicalWidth.isAuto())
3032 logicalWidth = Length(0, Fixed);
3033 else if (logicalWidth.isIntrinsic())
3020 logicalWidth = Length(computeIntrinsicLogicalWidthUsing(logicalWidth, co ntainerLogicalWidth, bordersPlusPadding) - bordersPlusPadding, Fixed); 3034 logicalWidth = Length(computeIntrinsicLogicalWidthUsing(logicalWidth, co ntainerLogicalWidth, bordersPlusPadding) - bordersPlusPadding, Fixed);
3021 3035
3022 // 'left' and 'right' cannot both be 'auto' because one would of been 3036 // 'left' and 'right' cannot both be 'auto' because one would of been
3023 // converted to the static position already 3037 // converted to the static position already
3024 ASSERT(!(logicalLeft.isAuto() && logicalRight.isAuto())); 3038 ASSERT(!(logicalLeft.isAuto() && logicalRight.isAuto()));
3025 3039
3026 // minimumValueForLength will convert 'auto' to 0 so that it doesn't impact the available space computation below. 3040 // minimumValueForLength will convert 'auto' to 0 so that it doesn't impact the available space computation below.
3027 LayoutUnit logicalLeftValue = minimumValueForLength(logicalLeft, containerLo gicalWidth); 3041 LayoutUnit logicalLeftValue = minimumValueForLength(logicalLeft, containerLo gicalWidth);
3028 LayoutUnit logicalRightValue = minimumValueForLength(logicalRight, container LogicalWidth); 3042 LayoutUnit logicalRightValue = minimumValueForLength(logicalRight, container LogicalWidth);
3029 3043
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3242 * of fixed positioned elements is the initial containing block instead of 3256 * of fixed positioned elements is the initial containing block instead of
3243 * the viewport. 3257 * the viewport.
3244 \*-------------------------------------------------------------------------- -*/ 3258 \*-------------------------------------------------------------------------- -*/
3245 3259
3246 // see FIXME 1 3260 // see FIXME 1
3247 // Calculate the static distance if needed. 3261 // Calculate the static distance if needed.
3248 computeBlockStaticDistance(logicalTopLength, logicalBottomLength, this, cont ainerBlock); 3262 computeBlockStaticDistance(logicalTopLength, logicalBottomLength, this, cont ainerBlock);
3249 3263
3250 // Calculate constraint equation values for 'height' case. 3264 // Calculate constraint equation values for 'height' case.
3251 LayoutUnit logicalHeight = computedValues.m_extent; 3265 LayoutUnit logicalHeight = computedValues.m_extent;
3252 computePositionedLogicalHeightUsing(styleToUse.logicalHeight(), containerBlo ck, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3266 computePositionedLogicalHeightUsing(MainOrPreferredSize, styleToUse.logicalH eight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeig ht,
3253 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3267 logicalTopLength, logicalBottomLength, marginBefore, marginAfter,
3254 computedValues); 3268 computedValues);
3255 3269
3256 // Avoid doing any work in the common case (where the values of min-height a nd max-height are their defaults). 3270 // Avoid doing any work in the common case (where the values of min-height a nd max-height are their defaults).
3257 // see FIXME 2 3271 // see FIXME 2
3258 3272
3259 // Calculate constraint equation values for 'max-height' case. 3273 // Calculate constraint equation values for 'max-height' case.
3260 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) { 3274 if (!styleToUse.logicalMaxHeight().isMaxSizeNone()) {
3261 LogicalExtentComputedValues maxValues; 3275 LogicalExtentComputedValues maxValues;
3262 3276
3263 computePositionedLogicalHeightUsing(styleToUse.logicalMaxHeight(), conta inerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3277 computePositionedLogicalHeightUsing(MaxSize, styleToUse.logicalMaxHeight (), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,
3264 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3278 logicalTopLength, logicalBottomLength, marginBefore, marginAfter,
3265 maxValues); 3279 maxValues);
3266 3280
3267 if (computedValues.m_extent > maxValues.m_extent) { 3281 if (computedValues.m_extent > maxValues.m_extent) {
3268 computedValues.m_extent = maxValues.m_extent; 3282 computedValues.m_extent = maxValues.m_extent;
3269 computedValues.m_position = maxValues.m_position; 3283 computedValues.m_position = maxValues.m_position;
3270 computedValues.m_margins.m_before = maxValues.m_margins.m_before; 3284 computedValues.m_margins.m_before = maxValues.m_margins.m_before;
3271 computedValues.m_margins.m_after = maxValues.m_margins.m_after; 3285 computedValues.m_margins.m_after = maxValues.m_margins.m_after;
3272 } 3286 }
3273 } 3287 }
3274 3288
3275 // Calculate constraint equation values for 'min-height' case. 3289 // Calculate constraint equation values for 'min-height' case.
3276 if (!styleToUse.logicalMinHeight().isZero() || styleToUse.logicalMinHeight() .isIntrinsic()) { 3290 if (!styleToUse.logicalMinHeight().isZero() || styleToUse.logicalMinHeight() .isIntrinsic()) {
3277 LogicalExtentComputedValues minValues; 3291 LogicalExtentComputedValues minValues;
3278 3292
3279 computePositionedLogicalHeightUsing(styleToUse.logicalMinHeight(), conta inerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight, 3293 computePositionedLogicalHeightUsing(MinSize, styleToUse.logicalMinHeight (), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,
3280 logicalTopLength, logicalBottomLength, marginBefore, marginAfter, 3294 logicalTopLength, logicalBottomLength, marginBefore, marginAfter,
3281 minValues); 3295 minValues);
3282 3296
3283 if (computedValues.m_extent < minValues.m_extent) { 3297 if (computedValues.m_extent < minValues.m_extent) {
3284 computedValues.m_extent = minValues.m_extent; 3298 computedValues.m_extent = minValues.m_extent;
3285 computedValues.m_position = minValues.m_position; 3299 computedValues.m_position = minValues.m_position;
3286 computedValues.m_margins.m_before = minValues.m_margins.m_before; 3300 computedValues.m_margins.m_before = minValues.m_margins.m_before;
3287 computedValues.m_margins.m_after = minValues.m_margins.m_after; 3301 computedValues.m_margins.m_after = minValues.m_margins.m_after;
3288 } 3302 }
3289 } 3303 }
(...skipping 20 matching lines...) Expand all
3310 else 3324 else
3311 logicalTopPos += containerBlock->borderRight(); 3325 logicalTopPos += containerBlock->borderRight();
3312 } else { 3326 } else {
3313 if (child->isHorizontalWritingMode()) 3327 if (child->isHorizontalWritingMode())
3314 logicalTopPos += containerBlock->borderTop(); 3328 logicalTopPos += containerBlock->borderTop();
3315 else 3329 else
3316 logicalTopPos += containerBlock->borderLeft(); 3330 logicalTopPos += containerBlock->borderLeft();
3317 } 3331 }
3318 } 3332 }
3319 3333
3320 void LayoutBox::computePositionedLogicalHeightUsing(Length logicalHeightLength, const LayoutBoxModelObject* containerBlock, 3334 void LayoutBox::computePositionedLogicalHeightUsing(SizeType heightSizeType, Len gth logicalHeightLength, const LayoutBoxModelObject* containerBlock,
3321 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, 3335 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight,
3322 const Length& logicalTop, const Length& logicalBottom, const Length& marginB efore, 3336 const Length& logicalTop, const Length& logicalBottom, const Length& marginB efore,
3323 const Length& marginAfter, LogicalExtentComputedValues& computedValues) cons t 3337 const Length& marginAfter, LogicalExtentComputedValues& computedValues) cons t
3324 { 3338 {
3339 if (heightSizeType == MinSize && logicalHeightLength.isAuto())
3340 logicalHeightLength = Length(0, Fixed);
3341
3325 // 'top' and 'bottom' cannot both be 'auto' because 'top would of been 3342 // 'top' and 'bottom' cannot both be 'auto' because 'top would of been
3326 // converted to the static position in computePositionedLogicalHeight() 3343 // converted to the static position in computePositionedLogicalHeight()
3327 ASSERT(!(logicalTop.isAuto() && logicalBottom.isAuto())); 3344 ASSERT(!(logicalTop.isAuto() && logicalBottom.isAuto()));
3328 3345
3329 LayoutUnit logicalHeightValue; 3346 LayoutUnit logicalHeightValue;
3330 LayoutUnit contentLogicalHeight = logicalHeight - bordersPlusPadding; 3347 LayoutUnit contentLogicalHeight = logicalHeight - bordersPlusPadding;
3331 3348
3332 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock, false); 3349 const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidth ForPositioned(containerBlock, false);
3333 3350
3334 LayoutUnit logicalTopValue = 0; 3351 LayoutUnit logicalTopValue = 0;
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
4645 computedValues.m_margins.m_end = marginEnd(); 4662 computedValues.m_margins.m_end = marginEnd();
4646 4663
4647 setLogicalTop(oldLogicalTop); 4664 setLogicalTop(oldLogicalTop);
4648 setLogicalWidth(oldLogicalWidth); 4665 setLogicalWidth(oldLogicalWidth);
4649 setLogicalLeft(oldLogicalLeft); 4666 setLogicalLeft(oldLogicalLeft);
4650 setMarginLeft(oldMarginLeft); 4667 setMarginLeft(oldMarginLeft);
4651 setMarginRight(oldMarginRight); 4668 setMarginRight(oldMarginRight);
4652 } 4669 }
4653 4670
4654 } // namespace blink 4671 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698