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

Unified Diff: cc/test/layer_tree_json_parser.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_json_parser.cc
diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc
index 1514d83487797aa8294f705d97a148fdbf33350a..efe70a06c757448b1c9b34d5ba66498dbaddb914 100644
--- a/cc/test/layer_tree_json_parser.cc
+++ b/cc/test/layer_tree_json_parser.cc
@@ -149,6 +149,23 @@ scoped_refptr<Layer> ParseTreeFromValue(base::Value* val,
new_layer->SetTouchEventHandlerRegion(touch_region);
}
+ if (dict->HasKey("ScrollBlocksOn")) {
+ success &= dict->GetList("ScrollBlocksOn", &list);
+ ScrollBlocksOn blocks;
+ std::string str;
+ for (size_t i = 0; i < list->GetSize(); i++) {
+ success &= list->GetString(i, &str);
+ if (str == "StartTouch")
+ blocks |= ScrollBlocksOnStartTouch;
+ else if (str == "WheelEvent")
+ blocks |= ScrollBlocksOnWheelEvent;
+ else if (str == "ScrollEvent")
+ blocks |= ScrollBlocksOnScrollEvent;
+ else
+ success = false;
+ }
+ }
+
success &= dict->GetList("DrawTransform", &list);
double transform[16];
for (int i = 0; i < 16; ++i)
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698