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

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

Issue 2841353002: Split initial methods of (/max/min)(width/height) on ComputedStyle. (Closed)
Patch Set: gco rename-style-box && gut Created 3 years, 7 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 * (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. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 3499 matching lines...) Expand 10 before | Expand all | Expand 10 after
3510 return ComputeReplacedLogicalHeightRespectingMinMaxHeight( 3510 return ComputeReplacedLogicalHeightRespectingMinMaxHeight(
3511 ComputeReplacedLogicalHeightUsing(kMainOrPreferredSize, 3511 ComputeReplacedLogicalHeightUsing(kMainOrPreferredSize,
3512 Style()->LogicalHeight())); 3512 Style()->LogicalHeight()));
3513 } 3513 }
3514 3514
3515 bool LayoutBox::LogicalHeightComputesAsNone(SizeType size_type) const { 3515 bool LayoutBox::LogicalHeightComputesAsNone(SizeType size_type) const {
3516 DCHECK(size_type == kMinSize || size_type == kMaxSize); 3516 DCHECK(size_type == kMinSize || size_type == kMaxSize);
3517 Length logical_height = size_type == kMinSize ? Style()->LogicalMinHeight() 3517 Length logical_height = size_type == kMinSize ? Style()->LogicalMinHeight()
3518 : Style()->LogicalMaxHeight(); 3518 : Style()->LogicalMaxHeight();
3519 Length initial_logical_height = size_type == kMinSize 3519 Length initial_logical_height = size_type == kMinSize
3520 ? ComputedStyle::InitialMinSize() 3520 ? ComputedStyle::InitialMinHeight()
3521 : ComputedStyle::InitialMaxSize(); 3521 : ComputedStyle::InitialMaxHeight();
3522 3522
3523 if (logical_height == initial_logical_height) 3523 if (logical_height == initial_logical_height)
3524 return true; 3524 return true;
3525 3525
3526 if (LayoutBlock* cb = ContainingBlockForAutoHeightDetection(logical_height)) 3526 if (LayoutBlock* cb = ContainingBlockForAutoHeightDetection(logical_height))
3527 return cb->HasAutoHeightOrContainingBlockWithAutoHeight(); 3527 return cb->HasAutoHeightOrContainingBlockWithAutoHeight();
3528 return false; 3528 return false;
3529 } 3529 }
3530 3530
3531 LayoutUnit LayoutBox::ComputeReplacedLogicalHeightRespectingMinMaxHeight( 3531 LayoutUnit LayoutBox::ComputeReplacedLogicalHeightRespectingMinMaxHeight(
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after
5900 void LayoutBox::MutableForPainting:: 5900 void LayoutBox::MutableForPainting::
5901 SavePreviousContentBoxSizeAndLayoutOverflowRect() { 5901 SavePreviousContentBoxSizeAndLayoutOverflowRect() {
5902 auto& rare_data = GetLayoutBox().EnsureRareData(); 5902 auto& rare_data = GetLayoutBox().EnsureRareData();
5903 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; 5903 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true;
5904 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); 5904 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size();
5905 rare_data.previous_layout_overflow_rect_ = 5905 rare_data.previous_layout_overflow_rect_ =
5906 GetLayoutBox().LayoutOverflowRect(); 5906 GetLayoutBox().LayoutOverflowRect();
5907 } 5907 }
5908 5908
5909 } // namespace blink 5909 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698