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

Side by Side Diff: third_party/WebKit/Source/web/tests/TouchActionTest.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 WebView* webView = 200 WebView* webView =
201 m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); 201 m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client);
202 202
203 // Set size to enable hit testing, and avoid line wrapping for consistency 203 // Set size to enable hit testing, and avoid line wrapping for consistency
204 // with browser. 204 // with browser.
205 webView->resize(WebSize(800, 1200)); 205 webView->resize(WebSize(800, 1200));
206 206
207 // Scroll to verify the code properly transforms windows to client co-ords. 207 // Scroll to verify the code properly transforms windows to client co-ords.
208 const int kScrollOffset = 100; 208 const int kScrollOffset = 100;
209 Document* document = static_cast<Document*>(webView->mainFrame()->document()); 209 Document* document = static_cast<Document*>(webView->mainFrame()->document());
210 document->frame()->view()->setScrollPosition(IntPoint(0, kScrollOffset), 210 document->frame()->view()->setScrollOffset(ScrollOffset(0, kScrollOffset),
211 ProgrammaticScroll); 211 ProgrammaticScroll);
212 212
213 return webView; 213 return webView;
214 } 214 }
215 215
216 IntRect windowClipRect(const FrameView& frameView) { 216 IntRect windowClipRect(const FrameView& frameView) {
217 LayoutRect clipRect( 217 LayoutRect clipRect(
218 LayoutPoint(), 218 LayoutPoint(),
219 LayoutSize(frameView.visibleContentSize(ExcludeScrollbars))); 219 LayoutSize(frameView.visibleContentSize(ExcludeScrollbars)));
220 frameView.layoutViewItem().mapToVisualRectInAncestorSpace( 220 frameView.layoutViewItem().mapToVisualRectInAncestorSpace(
221 &frameView.layoutView()->containerForPaintInvalidation(), clipRect); 221 &frameView.layoutView()->containerForPaintInvalidation(), clipRect);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 TEST_F(TouchActionTest, ShadowDOM) { 407 TEST_F(TouchActionTest, ShadowDOM) {
408 runShadowDOMTest("touch-action-shadow-dom.html"); 408 runShadowDOMTest("touch-action-shadow-dom.html");
409 } 409 }
410 410
411 TEST_F(TouchActionTest, Pan) { 411 TEST_F(TouchActionTest, Pan) {
412 runTouchActionTest("touch-action-pan.html"); 412 runTouchActionTest("touch-action-pan.html");
413 } 413 }
414 414
415 } // namespace blink 415 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/TopControlsTest.cpp ('k') | third_party/WebKit/Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698