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

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

Issue 15663005: Expand tap highlight to allow multiple highlights for touch disambiguation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/core/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/WebViewImpl.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 newGraphicsLayer = renderLayer->backing()->scrollingContentsLayer(); 135 newGraphicsLayer = renderLayer->backing()->scrollingContentsLayer();
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;
145 m_currentGraphicsLayer->setLinkHighlight(this); 145 m_currentGraphicsLayer->addLinkHighlight(this);
146 } 146 }
147 147
148 return renderLayer; 148 return renderLayer;
149 } 149 }
150 150
151 static void convertTargetSpaceQuadToCompositedLayer(const FloatQuad& targetSpace Quad, RenderObject* targetRenderer, RenderObject* compositedRenderer, FloatQuad& compositedSpaceQuad) 151 static void convertTargetSpaceQuadToCompositedLayer(const FloatQuad& targetSpace Quad, RenderObject* targetRenderer, RenderObject* compositedRenderer, FloatQuad& compositedSpaceQuad)
152 { 152 {
153 ASSERT(targetRenderer); 153 ASSERT(targetRenderer);
154 ASSERT(compositedRenderer); 154 ASSERT(compositedRenderer);
155 155
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 m_contentLayer->layer()->setDrawsContent(true); 276 m_contentLayer->layer()->setDrawsContent(true);
277 m_contentLayer->layer()->addAnimation(m_animation.get()); 277 m_contentLayer->layer()->addAnimation(m_animation.get());
278 278
279 invalidate(); 279 invalidate();
280 m_owningWebViewImpl->scheduleAnimation(); 280 m_owningWebViewImpl->scheduleAnimation();
281 } 281 }
282 282
283 void LinkHighlight::clearGraphicsLayerLinkHighlightPointer() 283 void LinkHighlight::clearGraphicsLayerLinkHighlightPointer()
284 { 284 {
285 if (m_currentGraphicsLayer) { 285 if (m_currentGraphicsLayer) {
286 m_currentGraphicsLayer->setLinkHighlight(0); 286 m_currentGraphicsLayer->removeLinkHighlight(this);
287 m_currentGraphicsLayer = 0; 287 m_currentGraphicsLayer = 0;
288 } 288 }
289 } 289 }
290 290
291 void LinkHighlight::notifyAnimationStarted(double) 291 void LinkHighlight::notifyAnimationStarted(double)
292 { 292 {
293 } 293 }
294 294
295 void LinkHighlight::notifyAnimationFinished(double) 295 void LinkHighlight::notifyAnimationFinished(double)
296 { 296 {
(...skipping 37 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/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698