OLD | NEW |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 computeQuads(*m_node, quads); | 257 computeQuads(*m_node, quads); |
258 DCHECK(quads.size()); | 258 DCHECK(quads.size()); |
259 Path newPath; | 259 Path newPath; |
260 | 260 |
261 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) { | 261 for (size_t quadIndex = 0; quadIndex < quads.size(); ++quadIndex) { |
262 FloatQuad absoluteQuad = quads[quadIndex]; | 262 FloatQuad absoluteQuad = quads[quadIndex]; |
263 | 263 |
264 // Scrolling content layers have the same offset from layout object as the | 264 // Scrolling content layers have the same offset from layout object as the |
265 // non-scrolling layers. Thus we need to adjust for their scroll offset. | 265 // non-scrolling layers. Thus we need to adjust for their scroll offset. |
266 if (m_isScrollingGraphicsLayer) { | 266 if (m_isScrollingGraphicsLayer) { |
267 DoubleSize adjustedScrollOffset = paintInvalidationContainer.layer() | 267 FloatPoint scrollPosition = paintInvalidationContainer.layer() |
268 ->getScrollableArea() | 268 ->getScrollableArea() |
269 ->adjustedScrollOffset(); | 269 ->scrollPosition(); |
270 absoluteQuad.move(adjustedScrollOffset.width(), | 270 absoluteQuad.move(toScrollOffset(scrollPosition)); |
271 adjustedScrollOffset.height()); | |
272 } | 271 } |
273 | 272 |
274 // Transform node quads in target absolute coords to local coordinates in | 273 // Transform node quads in target absolute coords to local coordinates in |
275 // the compositor layer. | 274 // the compositor layer. |
276 FloatQuad transformedQuad; | 275 FloatQuad transformedQuad; |
277 convertTargetSpaceQuadToCompositedLayer( | 276 convertTargetSpaceQuadToCompositedLayer( |
278 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer, | 277 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer, |
279 transformedQuad); | 278 transformedQuad); |
280 | 279 |
281 // FIXME: for now, we'll only use rounded paths if we have a single node | 280 // FIXME: for now, we'll only use rounded paths if we have a single node |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 443 |
445 WebLayer* LinkHighlightImpl::layer() { | 444 WebLayer* LinkHighlightImpl::layer() { |
446 return clipLayer(); | 445 return clipLayer(); |
447 } | 446 } |
448 | 447 |
449 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { | 448 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { |
450 return m_compositorPlayer.get(); | 449 return m_compositorPlayer.get(); |
451 } | 450 } |
452 | 451 |
453 } // namespace blink | 452 } // namespace blink |
OLD | NEW |