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

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

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment for hasCompositedLayerMapping Created 7 years, 1 month 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 | Annotate | Revision Log
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 RenderLayer* renderLayer = repaintContainer->layer(); 124 RenderLayer* renderLayer = repaintContainer->layer();
125 125
126 if (!renderLayer || renderLayer->compositingState() == NotComposited) 126 if (!renderLayer || renderLayer->compositingState() == NotComposited)
127 return 0; 127 return 0;
128 128
129 GraphicsLayer* newGraphicsLayer = renderLayer->compositedLayerMapping()->mai nGraphicsLayer(); 129 GraphicsLayer* newGraphicsLayer = renderLayer->compositedLayerMapping()->mai nGraphicsLayer();
130 m_clipLayer->setSublayerTransform(SkMatrix44()); 130 m_clipLayer->setSublayerTransform(SkMatrix44());
131 131
132 if (!newGraphicsLayer->drawsContent()) { 132 if (!newGraphicsLayer->drawsContent()) {
133 if (renderLayer->scrollableArea()->usesCompositedScrolling()) { 133 if (renderLayer->scrollableArea()->usesCompositedScrolling()) {
134 ASSERT(renderLayer->compositedLayerMapping() && renderLayer->composi tedLayerMapping()->scrollingContentsLayer()); 134 ASSERT(renderLayer->hasCompositedLayerMapping() && renderLayer->comp ositedLayerMapping()->scrollingContentsLayer());
135 newGraphicsLayer = renderLayer->compositedLayerMapping()->scrollingC ontentsLayer(); 135 newGraphicsLayer = renderLayer->compositedLayerMapping()->scrollingC ontentsLayer();
136 } else 136 } else
137 ASSERT_NOT_REACHED(); 137 ASSERT_NOT_REACHED();
138 } 138 }
139 139
140 if (m_currentGraphicsLayer != newGraphicsLayer) { 140 if (m_currentGraphicsLayer != newGraphicsLayer) {
141 if (m_currentGraphicsLayer) 141 if (m_currentGraphicsLayer)
142 clearGraphicsLayerLinkHighlightPointer(); 142 clearGraphicsLayerLinkHighlightPointer();
143 143
144 m_currentGraphicsLayer = newGraphicsLayer; 144 m_currentGraphicsLayer = newGraphicsLayer;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // Make sure we update geometry on the next callback from WebViewImpl::layou t(). 334 // Make sure we update geometry on the next callback from WebViewImpl::layou t().
335 m_geometryNeedsUpdate = true; 335 m_geometryNeedsUpdate = true;
336 } 336 }
337 337
338 WebLayer* LinkHighlight::layer() 338 WebLayer* LinkHighlight::layer()
339 { 339 {
340 return clipLayer(); 340 return clipLayer();
341 } 341 }
342 342
343 } // namespace WeKit 343 } // namespace WeKit
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/web/tests/ScrollingCoordinatorChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698