| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 private: | 161 private: |
| 162 TestData m_testData; | 162 TestData m_testData; |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 class TapHandlingWebViewClient : public FrameTestHelpers::TestWebViewClient { | 165 class TapHandlingWebViewClient : public FrameTestHelpers::TestWebViewClient { |
| 166 public: | 166 public: |
| 167 // WebViewClient methods | 167 // WebViewClient methods |
| 168 void didHandleGestureEvent(const WebGestureEvent& event, | 168 void didHandleGestureEvent(const WebGestureEvent& event, |
| 169 bool eventCancelled) override { | 169 bool eventCancelled) override { |
| 170 if (event.type == WebInputEvent::GestureTap) { | 170 if (event.type() == WebInputEvent::GestureTap) { |
| 171 m_tapX = event.x; | 171 m_tapX = event.x; |
| 172 m_tapY = event.y; | 172 m_tapY = event.y; |
| 173 } else if (event.type == WebInputEvent::GestureLongPress) { | 173 } else if (event.type() == WebInputEvent::GestureLongPress) { |
| 174 m_longpressX = event.x; | 174 m_longpressX = event.x; |
| 175 m_longpressY = event.y; | 175 m_longpressY = event.y; |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 // Local methods | 179 // Local methods |
| 180 void reset() { | 180 void reset() { |
| 181 m_tapX = -1; | 181 m_tapX = -1; |
| 182 m_tapY = -1; | 182 m_tapY = -1; |
| 183 m_longpressX = -1; | 183 m_longpressX = -1; |
| (...skipping 4077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4261 .translate(50, 55) | 4261 .translate(50, 55) |
| 4262 .scale(1. / 2.f); | 4262 .scale(1. / 2.f); |
| 4263 EXPECT_EQ(expectedMatrix, | 4263 EXPECT_EQ(expectedMatrix, |
| 4264 webViewImpl->getDeviceEmulationTransformForTesting()); | 4264 webViewImpl->getDeviceEmulationTransformForTesting()); |
| 4265 // visibleContentRect doesn't change. | 4265 // visibleContentRect doesn't change. |
| 4266 EXPECT_EQ(IntRect(50, 55, 50, 75), | 4266 EXPECT_EQ(IntRect(50, 55, 50, 75), |
| 4267 *devToolsEmulator->visibleContentRectForPainting()); | 4267 *devToolsEmulator->visibleContentRectForPainting()); |
| 4268 } | 4268 } |
| 4269 | 4269 |
| 4270 } // namespace blink | 4270 } // namespace blink |
| OLD | NEW |