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

Side by Side Diff: third_party/WebKit/Source/web/PageWidgetDelegate.cpp

Issue 2389633002: reflow comments in web/ (Closed)
Patch Set: . 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 LocalFrame& root, 65 LocalFrame& root,
66 const GlobalPaintFlags globalPaintFlags) { 66 const GlobalPaintFlags globalPaintFlags) {
67 if (rect.isEmpty()) 67 if (rect.isEmpty())
68 return; 68 return;
69 69
70 IntRect intRect(rect); 70 IntRect intRect(rect);
71 SkPictureBuilder pictureBuilder(intRect); 71 SkPictureBuilder pictureBuilder(intRect);
72 { 72 {
73 GraphicsContext& paintContext = pictureBuilder.context(); 73 GraphicsContext& paintContext = pictureBuilder.context();
74 74
75 // FIXME: device scale factor settings are layering violations and should no t 75 // FIXME: device scale factor settings are layering violations and should
76 // be used within Blink paint code. 76 // not be used within Blink paint code.
77 float scaleFactor = page.deviceScaleFactor(); 77 float scaleFactor = page.deviceScaleFactor();
78 paintContext.setDeviceScaleFactor(scaleFactor); 78 paintContext.setDeviceScaleFactor(scaleFactor);
79 79
80 AffineTransform scale; 80 AffineTransform scale;
81 scale.scale(scaleFactor); 81 scale.scale(scaleFactor);
82 TransformRecorder scaleRecorder(paintContext, pictureBuilder, scale); 82 TransformRecorder scaleRecorder(paintContext, pictureBuilder, scale);
83 83
84 IntRect dirtyRect(rect); 84 IntRect dirtyRect(rect);
85 FrameView* view = root.view(); 85 FrameView* view = root.view();
86 if (view) { 86 if (view) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 case WebInputEvent::TouchEnd: 199 case WebInputEvent::TouchEnd:
200 case WebInputEvent::TouchCancel: 200 case WebInputEvent::TouchCancel:
201 case WebInputEvent::TouchScrollStarted: 201 case WebInputEvent::TouchScrollStarted:
202 if (!root || !root->view()) 202 if (!root || !root->view())
203 return WebInputEventResult::NotHandled; 203 return WebInputEventResult::NotHandled;
204 return handler.handleTouchEvent(*root, 204 return handler.handleTouchEvent(*root,
205 static_cast<const WebTouchEvent&>(event)); 205 static_cast<const WebTouchEvent&>(event));
206 case WebInputEvent::GesturePinchBegin: 206 case WebInputEvent::GesturePinchBegin:
207 case WebInputEvent::GesturePinchEnd: 207 case WebInputEvent::GesturePinchEnd:
208 case WebInputEvent::GesturePinchUpdate: 208 case WebInputEvent::GesturePinchUpdate:
209 // Touchscreen pinch events are currently not handled in main thread. Once they are, 209 // Touchscreen pinch events are currently not handled in main thread.
210 // these should be passed to |handleGestureEvent| similar to gesture scrol l events. 210 // Once they are, these should be passed to |handleGestureEvent| similar
211 // to gesture scroll events.
211 return WebInputEventResult::NotHandled; 212 return WebInputEventResult::NotHandled;
212 default: 213 default:
213 return WebInputEventResult::NotHandled; 214 return WebInputEventResult::NotHandled;
214 } 215 }
215 } 216 }
216 217
217 // ---------------------------------------------------------------- 218 // ----------------------------------------------------------------
218 // Default handlers for PageWidgetEventHandler 219 // Default handlers for PageWidgetEventHandler
219 220
220 void PageWidgetEventHandler::handleMouseMove(LocalFrame& mainFrame, 221 void PageWidgetEventHandler::handleMouseMove(LocalFrame& mainFrame,
(...skipping 28 matching lines...) Expand all
249 } 250 }
250 251
251 WebInputEventResult PageWidgetEventHandler::handleTouchEvent( 252 WebInputEventResult PageWidgetEventHandler::handleTouchEvent(
252 LocalFrame& mainFrame, 253 LocalFrame& mainFrame,
253 const WebTouchEvent& event) { 254 const WebTouchEvent& event) {
254 return mainFrame.eventHandler().handleTouchEvent( 255 return mainFrame.eventHandler().handleTouchEvent(
255 PlatformTouchEventBuilder(mainFrame.view(), event)); 256 PlatformTouchEventBuilder(mainFrame.view(), event));
256 } 257 }
257 258
258 } // namespace blink 259 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.h ('k') | third_party/WebKit/Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698