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

Side by Side Diff: third_party/WebKit/Source/platform/Length.h

Issue 2065243003: [css-sizing] Ensure positive available size on replaced elements Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined test. Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutReplaced.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com) 4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com)
5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 bool isCalculated() const { return type() == Calculated; } 242 bool isCalculated() const { return type() == Calculated; }
243 bool isCalculatedEqual(const Length&) const; 243 bool isCalculatedEqual(const Length&) const;
244 bool isMinContent() const { return type() == MinContent; } 244 bool isMinContent() const { return type() == MinContent; }
245 bool isMaxContent() const { return type() == MaxContent; } 245 bool isMaxContent() const { return type() == MaxContent; }
246 bool isFillAvailable() const { return type() == FillAvailable; } 246 bool isFillAvailable() const { return type() == FillAvailable; }
247 bool isFitContent() const { return type() == FitContent; } 247 bool isFitContent() const { return type() == FitContent; }
248 bool isPercent() const { return type() == Percent; } 248 bool isPercent() const { return type() == Percent; }
249 bool isPercentOrCalc() const { 249 bool isPercentOrCalc() const {
250 return type() == Percent || type() == Calculated; 250 return type() == Percent || type() == Calculated;
251 } 251 }
252 // This group of lengths require layout because they need the containing
253 // block's available size. There might be other reasons that could imply
254 // a Length requiring a layout, but in that case we should re-define the
255 // function that groups all these Lengths.
256 bool isLayoutDependent() const {
257 return isPercentOrCalc() || isFillAvailable() || isFitContent();
258 }
252 259
253 Length blend(const Length& from, double progress, ValueRange range) const { 260 Length blend(const Length& from, double progress, ValueRange range) const {
254 ASSERT(isSpecified() && from.isSpecified()); 261 ASSERT(isSpecified() && from.isSpecified());
255 262
256 if (progress == 0.0) 263 if (progress == 0.0)
257 return from; 264 return from;
258 265
259 if (progress == 1.0) 266 if (progress == 1.0)
260 return *this; 267 return *this;
261 268
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 float m_floatValue; 315 float m_floatValue;
309 }; 316 };
310 bool m_quirk; 317 bool m_quirk;
311 unsigned char m_type; 318 unsigned char m_type;
312 bool m_isFloat; 319 bool m_isFloat;
313 }; 320 };
314 321
315 } // namespace blink 322 } // namespace blink
316 323
317 #endif // Length_h 324 #endif // Length_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutReplaced.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698