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

Side by Side Diff: third_party/WebKit/Source/core/style/NinePieceImage.h

Issue 1648573002: Transition to explicit constructors in LayoutUnit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove int constructors for size/point... they result in incorrect conversions until LayoutUnit is … Created 4 years, 10 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed.
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void setMaskDefaults() 116 void setMaskDefaults()
117 { 117 {
118 m_data.access()->imageSlices = LengthBox(0); 118 m_data.access()->imageSlices = LengthBox(0);
119 m_data.access()->fill = true; 119 m_data.access()->fill = true;
120 m_data.access()->borderSlices = BorderImageLengthBox(Length(Auto)); 120 m_data.access()->borderSlices = BorderImageLengthBox(Length(Auto));
121 } 121 }
122 122
123 static LayoutUnit computeOutset(const BorderImageLength& outsetSide, LayoutU nit borderSide) 123 static LayoutUnit computeOutset(const BorderImageLength& outsetSide, LayoutU nit borderSide)
124 { 124 {
125 if (outsetSide.isNumber()) 125 if (outsetSide.isNumber())
126 return outsetSide.number() * borderSide; 126 return LayoutUnit(outsetSide.number() * borderSide);
127 return outsetSide.length().value(); 127 return LayoutUnit(outsetSide.length().value());
128 } 128 }
129 129
130 private: 130 private:
131 DataRef<NinePieceImageData> m_data; 131 DataRef<NinePieceImageData> m_data;
132 }; 132 };
133 133
134 } // namespace blink 134 } // namespace blink
135 135
136 #endif // NinePieceImage_h 136 #endif // NinePieceImage_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/platform/LayoutUnit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698