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

Unified Diff: content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using layouttest_support to instantiate WebLayer Created 6 years, 6 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
Index: content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
similarity index 92%
rename from webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
rename to content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
index ec6d743cda26e19b75f57804c9bc8d283d4fc161..f883839ddc7e52c96440c3e37d615a7bd6256713 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
+++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
+#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
#include "cc/layers/layer.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
@@ -11,7 +11,7 @@
using cc::Layer;
-namespace webkit {
+namespace content {
WebLayerImplFixedBounds::WebLayerImplFixedBounds() {
}
@@ -20,7 +20,6 @@ WebLayerImplFixedBounds::WebLayerImplFixedBounds(scoped_refptr<Layer> layer)
: WebLayerImpl(layer) {
}
-
WebLayerImplFixedBounds::~WebLayerImplFixedBounds() {
}
@@ -40,8 +39,8 @@ void WebLayerImplFixedBounds::setAnchorPoint(
void WebLayerImplFixedBounds::setBounds(const blink::WebSize& bounds) {
if (original_bounds_ != gfx::Size(bounds)) {
- original_bounds_ = bounds;
- UpdateLayerBoundsAndTransform();
+ original_bounds_ = bounds;
+ UpdateLayerBoundsAndTransform();
}
}
@@ -79,7 +78,8 @@ void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() {
fixed_bounds_ == original_bounds_ ||
// For now fall back to non-fixed bounds for non-zero anchor point.
// TODO(wangxianzhu): Support non-zero anchor point for fixed bounds.
- anchorPoint().x || anchorPoint().y) {
+ anchorPoint().x ||
+ anchorPoint().y) {
layer_->SetBounds(original_bounds_);
layer_->SetTransform(original_transform_);
return;
@@ -97,4 +97,4 @@ void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() {
layer_->SetTransform(transform_with_bounds_scale);
}
-} // namespace webkit
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698