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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 computeQuads(*m_node, quads); | 254 computeQuads(*m_node, quads); |
255 DCHECK(quads.size()); | 255 DCHECK(quads.size()); |
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 FloatPoint scrollPosition = paintInvalidationContainer.layer() |
265 ->getScrollableArea() | 265 ->getScrollableArea() |
266 ->offsetFromOrigin(); | 266 ->absolutePosition(); |
267 absoluteQuad.move(adjustedScrollOffset.width(), | 267 absoluteQuad.move(toScrollOffset(scrollPosition)); |
268 adjustedScrollOffset.height()); | |
269 } | 268 } |
270 | 269 |
271 // Transform node quads in target absolute coords to local coordinates in th
e compositor layer. | 270 // Transform node quads in target absolute coords to local coordinates in th
e compositor layer. |
272 FloatQuad transformedQuad; | 271 FloatQuad transformedQuad; |
273 convertTargetSpaceQuadToCompositedLayer( | 272 convertTargetSpaceQuadToCompositedLayer( |
274 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer, | 273 absoluteQuad, m_node->layoutObject(), paintInvalidationContainer, |
275 transformedQuad); | 274 transformedQuad); |
276 | 275 |
277 // FIXME: for now, we'll only use rounded paths if we have a single node qua
d. The reason for this is that | 276 // FIXME: for now, we'll only use rounded paths if we have a single node qua
d. The reason for this is that |
278 // we may sometimes get a chain of adjacent boxes (e.g. for text nodes) whic
h end up looking like sausage | 277 // we may sometimes get a chain of adjacent boxes (e.g. for text nodes) whic
h end up looking like sausage |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 435 |
437 WebLayer* LinkHighlightImpl::layer() { | 436 WebLayer* LinkHighlightImpl::layer() { |
438 return clipLayer(); | 437 return clipLayer(); |
439 } | 438 } |
440 | 439 |
441 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { | 440 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { |
442 return m_compositorPlayer.get(); | 441 return m_compositorPlayer.get(); |
443 } | 442 } |
444 | 443 |
445 } // namespace blink | 444 } // namespace blink |
OLD | NEW |