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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 784463002: Add initial CC support for scroll-blocks-on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jdduke CR feedback Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/input/input_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/blink/web_layer_impl.h" 5 #include "cc/blink/web_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 size_t i = 0; 376 size_t i = 0;
377 for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region()); 377 for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region());
378 region_rects.has_rect(); 378 region_rects.has_rect();
379 region_rects.next()) { 379 region_rects.next()) {
380 result[i] = region_rects.rect(); 380 result[i] = region_rects.rect();
381 ++i; 381 ++i;
382 } 382 }
383 return result; 383 return result;
384 } 384 }
385 385
386 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnNone) ==
387 ScrollBlocksOnNone,
388 "ScrollBlocksOn and WebScrollBlocksOn enums must match");
389 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnStartTouch) ==
390 ScrollBlocksOnStartTouch,
391 "ScrollBlocksOn and WebScrollBlocksOn enums must match");
392 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnWheelEvent) ==
393 ScrollBlocksOnWheelEvent,
394 "ScrollBlocksOn and WebScrollBlocksOn enums must match");
395 static_assert(
396 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnScrollEvent) ==
397 ScrollBlocksOnScrollEvent,
398 "ScrollBlocksOn and WebScrollBlocksOn enums must match");
399
400 void WebLayerImpl::setScrollBlocksOn(blink::WebScrollBlocksOn blocks) {
401 layer_->SetScrollBlocksOn(static_cast<ScrollBlocksOn>(blocks));
402 }
403
404 blink::WebScrollBlocksOn WebLayerImpl::scrollBlocksOn() const {
405 return static_cast<blink::WebScrollBlocksOn>(layer_->scroll_blocks_on());
406 }
407
386 void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) { 408 void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) {
387 layer_->SetIsContainerForFixedPositionLayers(enable); 409 layer_->SetIsContainerForFixedPositionLayers(enable);
388 } 410 }
389 411
390 bool WebLayerImpl::isContainerForFixedPositionLayers() const { 412 bool WebLayerImpl::isContainerForFixedPositionLayers() const {
391 return layer_->IsContainerForFixedPositionLayers(); 413 return layer_->IsContainerForFixedPositionLayers();
392 } 414 }
393 415
394 static blink::WebLayerPositionConstraint ToWebLayerPositionConstraint( 416 static blink::WebLayerPositionConstraint ToWebLayerPositionConstraint(
395 const cc::LayerPositionConstraint& constraint) { 417 const cc::LayerPositionConstraint& constraint) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 if (parent) 501 if (parent)
480 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); 502 clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
481 layer_->SetClipParent(clip_parent); 503 layer_->SetClipParent(clip_parent);
482 } 504 }
483 505
484 Layer* WebLayerImpl::layer() const { 506 Layer* WebLayerImpl::layer() const {
485 return layer_.get(); 507 return layer_.get();
486 } 508 }
487 509
488 } // namespace cc_blink 510 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/input/input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698