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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2767213003: First Implementation of Snapped Points
Patch Set: Rebase and format Created 3 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: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 277189404bbc0c704de32ab896bbc3d1b7e13950..3565de0804192d0b09c1255036f4b3330c644f58 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -382,6 +382,22 @@ void GraphicsLayer::UpdateContentsRect() {
}
}
+void GraphicsLayer::SetSnapOffsets(const WebSnapPointList& offsets) {
+ layer_->Layer()->SetScrollSnapOffsets(offsets);
+}
+
+/*void GraphicsLayer::UpdateSnapOffsets() {
+ std::vector<double> horizontalOffsets, verticalOffsets;
+ for (double offset : m_snapOffsetsH) {
+ LOG(ERROR) << offset;
+ horizontalOffsets.push_back(offset);
+ }
+ for (double offset : m_snapOffsetsV) {
+ verticalOffsets.push_back(offset);
+ }
+ m_layer->layer()->setScrollSnapOffsets(horizontalOffsets, verticalOffsets);
+}*/
+
static HashSet<int>* g_registered_layer_set;
void GraphicsLayer::RegisterContentsLayer(WebLayer* layer) {

Powered by Google App Engine
This is Rietveld 408576698