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

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

Issue 1177393002: Position adjustment for composited scrolling is not needed if the layer has box decorations. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « LayoutTests/TestExpectations ('k') | no next file » | 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 Vector<FloatQuad> quads; 204 Vector<FloatQuad> quads;
205 computeQuads(*m_node, quads); 205 computeQuads(*m_node, quads);
206 ASSERT(quads.size()); 206 ASSERT(quads.size());
207 Path newPath; 207 Path newPath;
208 208
209 FloatPoint positionAdjustForCompositedScrolling = IntPoint(m_currentGraphics Layer->offsetFromLayoutObject()); 209 FloatPoint positionAdjustForCompositedScrolling = IntPoint(m_currentGraphics Layer->offsetFromLayoutObject());
210 210
211 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) { 211 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) {
212 FloatQuad absoluteQuad = quads[quadIndex]; 212 FloatQuad absoluteQuad = quads[quadIndex];
213 213
214 // FIXME: this hack should not be necessary. It's a consequence of the f act that composited layers for scrolling are represented
215 // differently in Blink than other composited layers.
216 if (paintInvalidationContainer->layer()->needsCompositedScrolling() && m _node->layoutObject() != paintInvalidationContainer)
217 absoluteQuad.move(-positionAdjustForCompositedScrolling.x(), -positi onAdjustForCompositedScrolling.y());
218
219 // Transform node quads in target absolute coords to local coordinates i n the compositor layer. 214 // Transform node quads in target absolute coords to local coordinates i n the compositor layer.
220 FloatQuad transformedQuad; 215 FloatQuad transformedQuad;
221 convertTargetSpaceQuadToCompositedLayer(absoluteQuad, m_node->layoutObje ct(), paintInvalidationContainer, transformedQuad); 216 convertTargetSpaceQuadToCompositedLayer(absoluteQuad, m_node->layoutObje ct(), paintInvalidationContainer, transformedQuad);
222 217
223 // FIXME: for now, we'll only use rounded paths if we have a single node quad. The reason for this is that 218 // FIXME: for now, we'll only use rounded paths if we have a single node quad. The reason for this is that
224 // we may sometimes get a chain of adjacent boxes (e.g. for text nodes) which end up looking like sausage 219 // we may sometimes get a chain of adjacent boxes (e.g. for text nodes) which end up looking like sausage
225 // links: these should ideally be merged into a single rect before creat ing the path, but that's 220 // links: these should ideally be merged into a single rect before creat ing the path, but that's
226 // another CL. 221 // another CL.
227 if (quads.size() == 1 && transformedQuad.isRectilinear() 222 if (quads.size() == 1 && transformedQuad.isRectilinear()
228 && !m_owningWebViewImpl->settingsImpl()->mockGestureTapHighlightsEna bled()) { 223 && !m_owningWebViewImpl->settingsImpl()->mockGestureTapHighlightsEna bled()) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // Make sure we update geometry on the next callback from WebViewImpl::layou t(). 356 // Make sure we update geometry on the next callback from WebViewImpl::layou t().
362 m_geometryNeedsUpdate = true; 357 m_geometryNeedsUpdate = true;
363 } 358 }
364 359
365 WebLayer* LinkHighlight::layer() 360 WebLayer* LinkHighlight::layer()
366 { 361 {
367 return clipLayer(); 362 return clipLayer();
368 } 363 }
369 364
370 } // namespace blink 365 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698