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

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

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 AffineTransform scale; 87 AffineTransform scale;
88 scale.scale(scaleFactor); 88 scale.scale(scaleFactor);
89 TransformRecorder scaleRecorder(paintContext, root, scale); 89 TransformRecorder scaleRecorder(paintContext, root, scale);
90 90
91 IntRect dirtyRect(rect); 91 IntRect dirtyRect(rect);
92 FrameView* view = root.view(); 92 FrameView* view = root.view();
93 if (view) { 93 if (view) {
94 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge tDelegateClip, LayoutRect(dirtyRect)); 94 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge tDelegateClip, LayoutRect(dirtyRect));
95 95
96 view->paint(&paintContext, globalPaintFlags, CullRect(dirtyRect)); 96 view->paint(paintContext, globalPaintFlags, CullRect(dirtyRect));
97 } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, ro ot, DisplayItem::PageWidgetDelegateBackgroundFallback)) { 97 } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, ro ot, DisplayItem::PageWidgetDelegateBackgroundFallback)) {
98 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag eWidgetDelegateBackgroundFallback, dirtyRect); 98 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag eWidgetDelegateBackgroundFallback, dirtyRect);
99 paintContext.fillRect(dirtyRect, Color::white); 99 paintContext.fillRect(dirtyRect, Color::white);
100 } 100 }
101 } 101 }
102 pictureBuilder.endRecording()->playback(canvas); 102 pictureBuilder.endRecording()->playback(canvas);
103 } 103 }
104 104
105 void PageWidgetDelegate::paint(Page& page, WebCanvas* canvas, 105 void PageWidgetDelegate::paint(Page& page, WebCanvas* canvas,
106 const WebRect& rect, LocalFrame& root) 106 const WebRect& rect, LocalFrame& root)
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 WEBINPUT_EVENT_CASE(TouchMove) 259 WEBINPUT_EVENT_CASE(TouchMove)
260 WEBINPUT_EVENT_CASE(TouchEnd) 260 WEBINPUT_EVENT_CASE(TouchEnd)
261 WEBINPUT_EVENT_CASE(TouchCancel) 261 WEBINPUT_EVENT_CASE(TouchCancel)
262 default: 262 default:
263 ASSERT_NOT_REACHED(); 263 ASSERT_NOT_REACHED();
264 return ""; 264 return "";
265 } 265 }
266 } 266 }
267 267
268 } // namespace blink 268 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LinkHighlightImplTest.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698