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

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 24360004: Use shrink-to-fit for width for Button, input, select, textarea, and legend treat width value of 'a… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reftests added Created 7 years, 2 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
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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return document().inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !document().sho uldDisplaySeamlesslyWithParent() && !isInline(); 404 return document().inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !document().sho uldDisplaySeamlesslyWithParent() && !isInline();
405 } 405 }
406 406
407 virtual LayoutSize intrinsicSize() const { return LayoutSize(); } 407 virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
408 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); } 408 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); }
409 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); } 409 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); }
410 410
411 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width 411 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width
412 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this. 412 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this.
413 bool sizesLogicalWidthToFitContent(SizeType) const; 413 bool sizesLogicalWidthToFitContent(SizeType) const;
414 bool isElementWithIntrinsicWidth() const;
414 415
415 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*) const; 416 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*) const;
416 417
417 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, L ayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegio n*) const; 418 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, L ayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegio n*) const;
418 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrin sicContentHeight) const; 419 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrin sicContentHeight) const;
419 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intr insicContentHeight) const; 420 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intr insicContentHeight) const;
420 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height , LayoutUnit intrinsicContentHeight) const; 421 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height , LayoutUnit intrinsicContentHeight) const;
421 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; 422 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const;
422 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; 423 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const;
423 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; 424 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 if (UNLIKELY(m_inlineBoxWrapper != 0)) 758 if (UNLIKELY(m_inlineBoxWrapper != 0))
758 deleteLineBoxWrapper(); 759 deleteLineBoxWrapper();
759 } 760 }
760 761
761 m_inlineBoxWrapper = boxWrapper; 762 m_inlineBoxWrapper = boxWrapper;
762 } 763 }
763 764
764 } // namespace WebCore 765 } // namespace WebCore
765 766
766 #endif // RenderBox_h 767 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698