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

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: Merge with trunk 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
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 COMPILE_ASSERT(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnNone) ==
387 ScrollBlocksOnNone,
388 ScrollBlocksOn_enum_mismatch);
389 COMPILE_ASSERT(
390 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnStartTouch) ==
391 ScrollBlocksOnStartTouch,
392 ScrollBlocksOn_enum_mismatch);
393 COMPILE_ASSERT(
394 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnWheelEvent) ==
395 ScrollBlocksOnWheelEvent,
396 ScrollBlocksOn_enum_mismatch);
397 COMPILE_ASSERT(
398 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnScrollEvent) ==
399 ScrollBlocksOnScrollEvent,
400 ScrollBlocksOn_enum_mismatch);
401
402 void WebLayerImpl::setScrollBlocksOn(blink::WebScrollBlocksOn blocks) {
403 layer_->SetScrollBlocksOn(static_cast<ScrollBlocksOn>(blocks));
404 }
405
406 blink::WebScrollBlocksOn WebLayerImpl::scrollBlocksOn() const {
407 return static_cast<blink::WebScrollBlocksOn>(layer_->scroll_blocks_on());
408 }
409
386 void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) { 410 void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) {
387 layer_->SetIsContainerForFixedPositionLayers(enable); 411 layer_->SetIsContainerForFixedPositionLayers(enable);
388 } 412 }
389 413
390 bool WebLayerImpl::isContainerForFixedPositionLayers() const { 414 bool WebLayerImpl::isContainerForFixedPositionLayers() const {
391 return layer_->IsContainerForFixedPositionLayers(); 415 return layer_->IsContainerForFixedPositionLayers();
392 } 416 }
393 417
394 static blink::WebLayerPositionConstraint ToWebLayerPositionConstraint( 418 static blink::WebLayerPositionConstraint ToWebLayerPositionConstraint(
395 const cc::LayerPositionConstraint& constraint) { 419 const cc::LayerPositionConstraint& constraint) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 if (parent) 503 if (parent)
480 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); 504 clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
481 layer_->SetClipParent(clip_parent); 505 layer_->SetClipParent(clip_parent);
482 } 506 }
483 507
484 Layer* WebLayerImpl::layer() const { 508 Layer* WebLayerImpl::layer() const {
485 return layer_.get(); 509 return layer_.get();
486 } 510 }
487 511
488 } // namespace cc_blink 512 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/input/input_handler.h » ('j') | cc/input/input_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698