| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 m_isPaginated = checkContainingBlockChainForPagination(renderer(), c
urr->renderBox()); | 516 m_isPaginated = checkContainingBlockChainForPagination(renderer(), c
urr->renderBox()); |
| 517 return; | 517 return; |
| 518 } | 518 } |
| 519 if (curr->stackingNode() == ancestorStackingContextNode) | 519 if (curr->stackingNode() == ancestorStackingContextNode) |
| 520 return; | 520 return; |
| 521 } | 521 } |
| 522 } | 522 } |
| 523 | 523 |
| 524 LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject
* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) | 524 LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject
* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) |
| 525 { | 525 { |
| 526 if (!paintInvalidationContainer || !paintInvalidationContainer->layer()->gro
upedMapping()) | 526 FloatPoint point = renderObject->localToContainerPoint(FloatPoint(), paintIn
validationContainer, 0, 0, paintInvalidationState); |
| 527 return renderObject->positionFromPaintInvalidationContainer(paintInvalid
ationContainer, paintInvalidationState); | |
| 528 | 527 |
| 529 RenderLayerModelObject* transformedAncestor = paintInvalidationContainer->la
yer()->enclosingTransformedAncestor()->renderer(); | 528 // FIXME: Eventually we are going to unify coordinates in GraphicsLayer spac
e. |
| 530 LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(pai
ntInvalidationContainer, paintInvalidationState); | 529 if (paintInvalidationContainer && paintInvalidationContainer->layer()->group
edMapping()) |
| 530 mapPointToPaintBackingCoordinates(paintInvalidationContainer, point); |
| 531 |
| 532 return LayoutPoint(point); |
| 533 } |
| 534 |
| 535 void RenderLayer::mapPointToPaintBackingCoordinates(const RenderLayerModelObject
* paintInvalidationContainer, FloatPoint& point) |
| 536 { |
| 537 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
| 538 if (!paintInvalidationLayer->groupedMapping()) { |
| 539 point.move(paintInvalidationLayer->compositedLayerMapping()->contentOffs
etInCompositingLayer()); |
| 540 return; |
| 541 } |
| 542 |
| 543 RenderLayerModelObject* transformedAncestor = paintInvalidationLayer->enclos
ingTransformedAncestor()->renderer(); |
| 531 if (!transformedAncestor) | 544 if (!transformedAncestor) |
| 532 return point; | 545 return; |
| 533 | 546 |
| 534 point = LayoutPoint(paintInvalidationContainer->localToContainerPoint(point,
transformedAncestor)); | 547 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the |
| 535 point.moveBy(-paintInvalidationContainer->layer()->groupedMapping()->squashi
ngOffsetFromTransformedAncestor()); | 548 // transformed ancestor. |
| 536 return point; | 549 point = paintInvalidationContainer->localToContainerPoint(point, transformed
Ancestor); |
| 550 |
| 551 point.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromT
ransformedAncestor()); |
| 537 } | 552 } |
| 538 | 553 |
| 539 void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect) | 554 void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect) |
| 540 { | 555 { |
| 541 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); | 556 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
| 542 if (!paintInvalidationLayer->groupedMapping()) { | 557 if (!paintInvalidationLayer->groupedMapping()) { |
| 543 rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffse
tInCompositingLayer()); | 558 rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffse
tInCompositingLayer()); |
| 544 return; | 559 return; |
| 545 } | 560 } |
| 546 | 561 |
| (...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3680 } | 3695 } |
| 3681 } | 3696 } |
| 3682 | 3697 |
| 3683 void showLayerTree(const blink::RenderObject* renderer) | 3698 void showLayerTree(const blink::RenderObject* renderer) |
| 3684 { | 3699 { |
| 3685 if (!renderer) | 3700 if (!renderer) |
| 3686 return; | 3701 return; |
| 3687 showLayerTree(renderer->enclosingLayer()); | 3702 showLayerTree(renderer->enclosingLayer()); |
| 3688 } | 3703 } |
| 3689 #endif | 3704 #endif |
| OLD | NEW |