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

Side by Side Diff: Source/web/LinkHighlight.cpp

Issue 880653004: Blink side of changes to enable cache clearing without a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better use of enum. Created 5 years, 10 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
« no previous file with comments | « Source/web/LinkHighlight.h ('k') | Source/web/WebPopupMenuImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 if (pathHasChanged) { 230 if (pathHasChanged) {
231 m_path = newPath; 231 m_path = newPath;
232 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size() ); 232 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size() );
233 } 233 }
234 234
235 m_contentLayer->layer()->setPosition(boundingRect.location()); 235 m_contentLayer->layer()->setPosition(boundingRect.location());
236 236
237 return pathHasChanged; 237 return pathHasChanged;
238 } 238 }
239 239
240 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, WebContentLayerClient::GraphicsContextStatus contextStatus) 240 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, WebContentLayerClient::PaintingControlSetting paintingControl)
241 { 241 {
242 if (!m_node || !m_node->renderer()) 242 if (!m_node || !m_node->renderer())
243 return; 243 return;
244 244
245 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable d; 245 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable d;
246 if (contextStatus != WebContentLayerClient::GraphicsContextEnabled) 246 if (paintingControl == WebContentLayerClient::DisplayListConstructionDisable d)
247 disabledMode = GraphicsContext::FullyDisabled; 247 disabledMode = GraphicsContext::FullyDisabled;
248 248
249 OwnPtr<GraphicsContext> graphicsContext; 249 OwnPtr<GraphicsContext> graphicsContext;
250 OwnPtr<DisplayItemList> displayItemList; 250 OwnPtr<DisplayItemList> displayItemList;
251 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 251 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
252 displayItemList = DisplayItemList::create(); 252 displayItemList = DisplayItemList::create();
253 graphicsContext = adoptPtr(new GraphicsContext(nullptr, displayItemList. get(), disabledMode)); 253 graphicsContext = adoptPtr(new GraphicsContext(nullptr, displayItemList. get(), disabledMode));
254 } else { 254 } else {
255 graphicsContext = adoptPtr(new GraphicsContext(canvas, nullptr, disabled Mode)); 255 graphicsContext = adoptPtr(new GraphicsContext(canvas, nullptr, disabled Mode));
256 } 256 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // Make sure we update geometry on the next callback from WebViewImpl::layou t(). 361 // Make sure we update geometry on the next callback from WebViewImpl::layou t().
362 m_geometryNeedsUpdate = true; 362 m_geometryNeedsUpdate = true;
363 } 363 }
364 364
365 WebLayer* LinkHighlight::layer() 365 WebLayer* LinkHighlight::layer()
366 { 366 {
367 return clipLayer(); 367 return clipLayer();
368 } 368 }
369 369
370 } // namespace blink 370 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/LinkHighlight.h ('k') | Source/web/WebPopupMenuImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698