1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/layers/layer_position_constraint.h"
9 LayerPositionConstraint::LayerPositionConstraint()
10 : is_fixed_position_(false),
11 is_fixed_to_right_edge_(false),
12 is_fixed_to_bottom_edge_(false) {
15 bool LayerPositionConstraint::operator==(
16 const LayerPositionConstraint
& other
) const {
17 if (!is_fixed_position_
&& !other
.is_fixed_position_
)
19 return is_fixed_position_
== other
.is_fixed_position_
&&
20 is_fixed_to_right_edge_
== other
.is_fixed_to_right_edge_
&&
21 is_fixed_to_bottom_edge_
== other
.is_fixed_to_bottom_edge_
;
24 bool LayerPositionConstraint::operator!=(
25 const LayerPositionConstraint
& other
) const {
26 return !(*this == other
);