| OLD | NEW |
| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Note that JavaScript must be enabled for shadow DOM tests. | 197 // Note that JavaScript must be enabled for shadow DOM tests. |
| 198 WebView* webView = | 198 WebView* webView = |
| 199 m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); | 199 m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); |
| 200 | 200 |
| 201 // Set size to enable hit testing, and avoid line wrapping for consistency wit
h browser. | 201 // Set size to enable hit testing, and avoid line wrapping for consistency wit
h browser. |
| 202 webView->resize(WebSize(800, 1200)); | 202 webView->resize(WebSize(800, 1200)); |
| 203 | 203 |
| 204 // Scroll to verify the code properly transforms windows to client co-ords. | 204 // Scroll to verify the code properly transforms windows to client co-ords. |
| 205 const int kScrollOffset = 100; | 205 const int kScrollOffset = 100; |
| 206 Document* document = static_cast<Document*>(webView->mainFrame()->document()); | 206 Document* document = static_cast<Document*>(webView->mainFrame()->document()); |
| 207 document->frame()->view()->setScrollPosition(IntPoint(0, kScrollOffset), | 207 document->frame()->view()->setScrollOffset(ScrollOffset(0, kScrollOffset), |
| 208 ProgrammaticScroll); | 208 ProgrammaticScroll); |
| 209 | 209 |
| 210 return webView; | 210 return webView; |
| 211 } | 211 } |
| 212 | 212 |
| 213 IntRect windowClipRect(const FrameView& frameView) { | 213 IntRect windowClipRect(const FrameView& frameView) { |
| 214 LayoutRect clipRect( | 214 LayoutRect clipRect( |
| 215 LayoutPoint(), | 215 LayoutPoint(), |
| 216 LayoutSize(frameView.visibleContentSize(ExcludeScrollbars))); | 216 LayoutSize(frameView.visibleContentSize(ExcludeScrollbars))); |
| 217 frameView.layoutViewItem().mapToVisualRectInAncestorSpace( | 217 frameView.layoutViewItem().mapToVisualRectInAncestorSpace( |
| 218 &frameView.layoutView()->containerForPaintInvalidation(), clipRect); | 218 &frameView.layoutView()->containerForPaintInvalidation(), clipRect); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 401 |
| 402 TEST_F(TouchActionTest, ShadowDOM) { | 402 TEST_F(TouchActionTest, ShadowDOM) { |
| 403 runShadowDOMTest("touch-action-shadow-dom.html"); | 403 runShadowDOMTest("touch-action-shadow-dom.html"); |
| 404 } | 404 } |
| 405 | 405 |
| 406 TEST_F(TouchActionTest, Pan) { | 406 TEST_F(TouchActionTest, Pan) { |
| 407 runTouchActionTest("touch-action-pan.html"); | 407 runTouchActionTest("touch-action-pan.html"); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace blink | 410 } // namespace blink |
| OLD | NEW |