15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/*
25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Copyright (C) 1999 Lars Knoll (knoll@kde.org)
35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com)
55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Copyright (C) 2012 Motorola Mobility, Inc. All rights reserved.
75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    This library is free software; you can redistribute it and/or
95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    modify it under the terms of the GNU Library General Public
105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    License as published by the Free Software Foundation; either
115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    version 2 of the License, or (at your option) any later version.
125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    This library is distributed in the hope that it will be useful,
145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    but WITHOUT ANY WARRANTY; without even the implied warranty of
155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Library General Public License for more details.
175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    You should have received a copy of the GNU Library General Public License
195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    along with this library; see the file COPYING.LIB.  If not, write to
205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)    Boston, MA 02110-1301, USA.
225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)*/
235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef LengthFunctions_h
255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define LengthFunctions_h
265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
27bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)#include "platform/PlatformExport.h"
28bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)
29c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink {
305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
3109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class FloatSize;
325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class LayoutUnit;
33bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)class Length;
3409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class LengthSize;
35bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)
3609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)PLATFORM_EXPORT int intValueForLength(const Length&, LayoutUnit maximumValue);
37bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)PLATFORM_EXPORT float floatValueForLength(const Length&, float maximumValue);
3809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)PLATFORM_EXPORT LayoutUnit minimumValueForLength(const Length&, LayoutUnit maximumValue);
3909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)PLATFORM_EXPORT LayoutUnit roundedMinimumValueForLength(const Length&, LayoutUnit maximumValue);
4009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)PLATFORM_EXPORT LayoutUnit valueForLength(const Length&, LayoutUnit maximumValue);
4109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)PLATFORM_EXPORT FloatSize floatSizeForLengthSize(const LengthSize&, const FloatSize& boxSize);
425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
43c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink
445c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
455c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif // LengthFunctions_h
46