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

Unified Diff: cc/layers/layer_impl.h

Issue 12552004: Support bottom-right anchored fixed-position elements during a pinch gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to save the comments. sorry. :( Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 49ff6dc79176ef8725d45a333a6d3ec458186cc7..83a2ffaf53ec05229093559f6d3bda601c160026 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -18,6 +18,7 @@
#include "cc/input/input_handler.h"
#include "cc/layers/draw_properties.h"
#include "cc/layers/layer_lists.h"
+#include "cc/layers/layer_position_constraint.h"
#include "cc/layers/render_surface_impl.h"
#include "cc/quads/render_pass.h"
#include "cc/quads/shared_quad_state.h"
@@ -157,14 +158,24 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
void SetIsContainerForFixedPositionLayers(bool container) {
is_container_for_fixed_position_layers_ = container;
}
- bool is_container_for_fixed_position_layers() const {
+ // This is a non-trivial function in Layer.
+ bool IsContainerForFixedPositionLayers() const {
return is_container_for_fixed_position_layers_;
}
- void SetFixedToContainerLayer(bool fixed) {
- fixed_to_container_layer_ = fixed;
+ void SetFixedContainerSizeDelta(const gfx::Vector2dF& delta) {
+ fixed_container_size_delta_ = delta;
+ }
+ const gfx::Vector2dF& fixed_container_size_delta() const {
+ return fixed_container_size_delta_;
+ }
+
+ void SetPositionConstraint(const LayerPositionConstraint& constraint) {
+ position_constraint_ = constraint;
+ }
+ const LayerPositionConstraint& position_constraint() const {
+ return position_constraint_;
}
- bool fixed_to_container_layer() const { return fixed_to_container_layer_; }
void SetPreserves3d(bool preserves_3d);
bool preserves_3d() const { return preserves_3d_; }
@@ -475,9 +486,11 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
// Set for the layer that other layers are fixed to.
bool is_container_for_fixed_position_layers_;
- // This is true if the layer should be fixed to the closest ancestor
- // container.
- bool fixed_to_container_layer_;
+ // This property is effective when
+ // is_container_for_fixed_position_layers_ == true,
+ gfx::Vector2dF fixed_container_size_delta_;
+
+ LayerPositionConstraint position_constraint_;
gfx::Vector2dF scroll_delta_;
gfx::Vector2d sent_scroll_delta_;
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698