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

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

Issue 2383113003: Refactor ScrollableArea::setScrollPosition. (Closed)
Patch Set: Created 4 years, 2 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
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 Path newPath; 256 Path newPath;
257 257
258 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) { 258 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) {
259 FloatQuad absoluteQuad = quads[quadIndex]; 259 FloatQuad absoluteQuad = quads[quadIndex];
260 260
261 // Scrolling content layers have the same offset from layout object as the n on-scrolling layers. Thus we need 261 // Scrolling content layers have the same offset from layout object as the n on-scrolling layers. Thus we need
262 // to adjust for their scroll offset. 262 // to adjust for their scroll offset.
263 if (m_isScrollingGraphicsLayer) { 263 if (m_isScrollingGraphicsLayer) {
264 DoubleSize adjustedScrollOffset = paintInvalidationContainer.layer() 264 DoubleSize adjustedScrollOffset = paintInvalidationContainer.layer()
265 ->getScrollableArea() 265 ->getScrollableArea()
266 ->adjustedScrollOffset(); 266 ->offsetFromOrigin();
267 absoluteQuad.move(adjustedScrollOffset.width(), 267 absoluteQuad.move(adjustedScrollOffset.width(),
268 adjustedScrollOffset.height()); 268 adjustedScrollOffset.height());
269 } 269 }
270 270
271 // Transform node quads in target absolute coords to local coordinates in th e compositor layer. 271 // Transform node quads in target absolute coords to local coordinates in th e compositor layer.
272 FloatQuad transformedQuad; 272 FloatQuad transformedQuad;
273 convertTargetSpaceQuadToCompositedLayer( 273 convertTargetSpaceQuadToCompositedLayer(
274 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer, 274 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer,
275 transformedQuad); 275 transformedQuad);
276 276
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 436
437 WebLayer* LinkHighlightImpl::layer() { 437 WebLayer* LinkHighlightImpl::layer() {
438 return clipLayer(); 438 return clipLayer();
439 } 439 }
440 440
441 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { 441 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const {
442 return m_compositorPlayer.get(); 442 return m_compositorPlayer.get();
443 } 443 }
444 444
445 } // namespace blink 445 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698