| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 m_isPaginated = checkContainingBlockChainForPagination(renderer(), c
urr->renderBox()); | 514 m_isPaginated = checkContainingBlockChainForPagination(renderer(), c
urr->renderBox()); |
| 515 return; | 515 return; |
| 516 } | 516 } |
| 517 if (curr->stackingNode() == ancestorStackingContextNode) | 517 if (curr->stackingNode() == ancestorStackingContextNode) |
| 518 return; | 518 return; |
| 519 } | 519 } |
| 520 } | 520 } |
| 521 | 521 |
| 522 LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject
* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) | 522 LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject
* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) |
| 523 { | 523 { |
| 524 if (!paintInvalidationContainer || !paintInvalidationContainer->layer()->gro
upedMapping()) | 524 FloatPoint point = renderObject->localToContainerPoint(FloatPoint(), paintIn
validationContainer, 0, 0, paintInvalidationState); |
| 525 return renderObject->positionFromPaintInvalidationContainer(paintInvalid
ationContainer, paintInvalidationState); | |
| 526 | 525 |
| 527 RenderLayerModelObject* transformedAncestor = paintInvalidationContainer->la
yer()->enclosingTransformedAncestor()->renderer(); | 526 // FIXME: Eventually we are going to unify coordinates in GraphicsLayer spac
e. |
| 528 LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(pai
ntInvalidationContainer, paintInvalidationState); | 527 if (paintInvalidationContainer && paintInvalidationContainer->layer()->group
edMapping()) |
| 528 mapPointToPaintBackingCoordinates(paintInvalidationContainer, point); |
| 529 |
| 530 return LayoutPoint(point); |
| 531 } |
| 532 |
| 533 void RenderLayer::mapPointToPaintBackingCoordinates(const RenderLayerModelObject
* paintInvalidationContainer, FloatPoint& point) |
| 534 { |
| 535 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
| 536 if (!paintInvalidationLayer->groupedMapping()) { |
| 537 point.move(paintInvalidationLayer->compositedLayerMapping()->contentOffs
etInCompositingLayer()); |
| 538 return; |
| 539 } |
| 540 |
| 541 RenderLayerModelObject* transformedAncestor = paintInvalidationLayer->enclos
ingTransformedAncestor()->renderer(); |
| 529 if (!transformedAncestor) | 542 if (!transformedAncestor) |
| 530 return point; | 543 return; |
| 531 | 544 |
| 532 point = LayoutPoint(paintInvalidationContainer->localToContainerPoint(point,
transformedAncestor)); | 545 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the |
| 533 point.moveBy(-paintInvalidationContainer->layer()->groupedMapping()->squashi
ngOffsetFromTransformedAncestor()); | 546 // transformed ancestor. |
| 534 return point; | 547 point = paintInvalidationContainer->localToContainerPoint(point, transformed
Ancestor); |
| 548 |
| 549 point.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromT
ransformedAncestor()); |
| 535 } | 550 } |
| 536 | 551 |
| 537 void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect) | 552 void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect) |
| 538 { | 553 { |
| 539 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); | 554 RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
| 540 if (!paintInvalidationLayer->groupedMapping()) { | 555 if (!paintInvalidationLayer->groupedMapping()) { |
| 541 rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffse
tInCompositingLayer()); | 556 rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffse
tInCompositingLayer()); |
| 542 return; | 557 return; |
| 543 } | 558 } |
| 544 | 559 |
| (...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3678 } | 3693 } |
| 3679 } | 3694 } |
| 3680 | 3695 |
| 3681 void showLayerTree(const blink::RenderObject* renderer) | 3696 void showLayerTree(const blink::RenderObject* renderer) |
| 3682 { | 3697 { |
| 3683 if (!renderer) | 3698 if (!renderer) |
| 3684 return; | 3699 return; |
| 3685 showLayerTree(renderer->enclosingLayer()); | 3700 showLayerTree(renderer->enclosingLayer()); |
| 3686 } | 3701 } |
| 3687 #endif | 3702 #endif |
| OLD | NEW |