Commit e365b2b8 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Make the Length(LengthType) constructor explicit

Per coding style:

https: //google.github.io/styleguide/cppguide.html#Implicit_Conversions
Change-Id: Ic7a05422e72b3e445236b054d887b5467f79ab6c
Reviewed-on: https://chromium-review.googlesource.com/809010Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521786}
parent 5e19a799
......@@ -1386,10 +1386,10 @@ class ComputedStyle : public ComputedStyleBase,
!PaddingTop().IsZero() || !PaddingBottom().IsZero();
}
void ResetPadding() {
SetPaddingTop(kFixed);
SetPaddingBottom(kFixed);
SetPaddingLeft(kFixed);
SetPaddingRight(kFixed);
SetPaddingTop(Length(kFixed));
SetPaddingBottom(Length(kFixed));
SetPaddingLeft(Length(kFixed));
SetPaddingRight(Length(kFixed));
}
void SetPadding(const LengthBox& b) {
SetPaddingTop(b.top_);
......
......@@ -64,7 +64,7 @@ class PLATFORM_EXPORT Length {
public:
Length() : int_value_(0), quirk_(false), type_(kAuto), is_float_(false) {}
Length(LengthType t)
explicit Length(LengthType t)
: int_value_(0), quirk_(false), type_(t), is_float_(false) {
DCHECK_NE(t, kCalculated);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment