| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 result = renderer->overflowClipRect(LayoutPoint()); | 534 result = renderer->overflowClipRect(LayoutPoint()); |
| 535 | 535 |
| 536 if (renderer->hasClip()) | 536 if (renderer->hasClip()) |
| 537 result.intersect(renderer->clipRect(LayoutPoint())); | 537 result.intersect(renderer->clipRect(LayoutPoint())); |
| 538 | 538 |
| 539 return pixelSnappedIntRect(result); | 539 return pixelSnappedIntRect(result); |
| 540 } | 540 } |
| 541 | 541 |
| 542 static LayoutPoint computeOffsetFromCompositedAncestor(const RenderLayer* layer,
const RenderLayer* compositedAncestor) | 542 static LayoutPoint computeOffsetFromCompositedAncestor(const RenderLayer* layer,
const RenderLayer* compositedAncestor) |
| 543 { | 543 { |
| 544 LayoutPoint offset; | 544 LayoutPoint offset = layer->visualOffsetFromAncestor(compositedAncestor); |
| 545 layer->convertToLayerCoords(compositedAncestor, offset); | |
| 546 if (compositedAncestor) | 545 if (compositedAncestor) |
| 547 offset.move(compositedAncestor->compositedLayerMapping()->owningLayer().
subpixelAccumulation()); | 546 offset.move(compositedAncestor->compositedLayerMapping()->owningLayer().
subpixelAccumulation()); |
| 548 return offset; | 547 return offset; |
| 549 } | 548 } |
| 550 | 549 |
| 551 void CompositedLayerMapping::computeBoundsOfOwningLayer(const RenderLayer* compo
sitedAncestor, IntRect& localBounds, IntRect& compositingBoundsRelativeToComposi
tedAncestor, LayoutPoint& offsetFromCompositedAncestor, | 550 void CompositedLayerMapping::computeBoundsOfOwningLayer(const RenderLayer* compo
sitedAncestor, IntRect& localBounds, IntRect& compositingBoundsRelativeToComposi
tedAncestor, LayoutPoint& offsetFromCompositedAncestor, |
| 552 IntPoint& snappedOffsetFromCompositedAncestor) | 551 IntPoint& snappedOffsetFromCompositedAncestor) |
| 553 { | 552 { |
| 554 LayoutRect localRawCompositingBounds = compositedBounds(); | 553 LayoutRect localRawCompositingBounds = compositedBounds(); |
| 555 offsetFromCompositedAncestor = computeOffsetFromCompositedAncestor(&m_owning
Layer, compositedAncestor); | 554 offsetFromCompositedAncestor = computeOffsetFromCompositedAncestor(&m_owning
Layer, compositedAncestor); |
| (...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2318 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2317 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2319 name = "Scrolling Block Selection Layer"; | 2318 name = "Scrolling Block Selection Layer"; |
| 2320 } else { | 2319 } else { |
| 2321 ASSERT_NOT_REACHED(); | 2320 ASSERT_NOT_REACHED(); |
| 2322 } | 2321 } |
| 2323 | 2322 |
| 2324 return name; | 2323 return name; |
| 2325 } | 2324 } |
| 2326 | 2325 |
| 2327 } // namespace blink | 2326 } // namespace blink |
| OLD | NEW |