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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. 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
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc b/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
index ec6d743cda26e19b75f57804c9bc8d283d4fc161..134ce406cca04f0d7eebf89828b4799e250ddfb2 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
@@ -30,10 +30,10 @@ void WebLayerImplFixedBounds::invalidateRect(const blink::WebFloatRect& rect) {
invalidate();
}
-void WebLayerImplFixedBounds::setAnchorPoint(
- const blink::WebFloatPoint& anchor_point) {
- if (anchor_point != this->anchorPoint()) {
- layer_->SetAnchorPoint(anchor_point);
+void WebLayerImplFixedBounds::setTransformOrigin(
+ const blink::WebFloatPoint3D& transform_origin) {
+ if (transform_origin != this->transformOrigin()) {
+ layer_->SetTransformOrigin(transform_origin);
UpdateLayerBoundsAndTransform();
}
}
@@ -77,9 +77,10 @@ void WebLayerImplFixedBounds::SetTransformInternal(
void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() {
if (fixed_bounds_.IsEmpty() || original_bounds_.IsEmpty() ||
fixed_bounds_ == original_bounds_ ||
- // For now fall back to non-fixed bounds for non-zero anchor point.
+ // For now fall back to non-fixed bounds for non-zero transform origin.
// TODO(wangxianzhu): Support non-zero anchor point for fixed bounds.
- anchorPoint().x || anchorPoint().y) {
+ transformOrigin().x ||
+ transformOrigin().y) {
layer_->SetBounds(original_bounds_);
layer_->SetTransform(original_transform_);
return;
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698