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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 , m_needsToRecomputeBounds(true) | 129 , m_needsToRecomputeBounds(true) |
130 , m_renderer(renderer) | 130 , m_renderer(renderer) |
131 , m_parent(0) | 131 , m_parent(0) |
132 , m_previous(0) | 132 , m_previous(0) |
133 , m_next(0) | 133 , m_next(0) |
134 , m_first(0) | 134 , m_first(0) |
135 , m_last(0) | 135 , m_last(0) |
136 , m_staticInlinePosition(0) | 136 , m_staticInlinePosition(0) |
137 , m_staticBlockPosition(0) | 137 , m_staticBlockPosition(0) |
138 , m_enclosingPaginationLayer(0) | 138 , m_enclosingPaginationLayer(0) |
139 , m_3dRenderingContextRoot(0) | |
140 , m_groupedMapping(0) | 139 , m_groupedMapping(0) |
141 , m_repainter(renderer) | 140 , m_repainter(renderer) |
142 , m_clipper(renderer) | 141 , m_clipper(renderer) |
143 , m_blendInfo(renderer) | 142 , m_blendInfo(renderer) |
144 { | 143 { |
145 updateStackingNode(); | 144 updateStackingNode(); |
146 | 145 |
147 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); | 146 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); |
148 | 147 |
149 if (!renderer->firstChild() && renderer->style()) { | 148 if (!renderer->firstChild() && renderer->style()) { |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
555 ASSERT(box); | 554 ASSERT(box); |
556 m_transform->makeIdentity(); | 555 m_transform->makeIdentity(); |
557 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec t().size(), RenderStyle::IncludeTransformOrigin); | 556 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec t().size(), RenderStyle::IncludeTransformOrigin); |
558 makeMatrixRenderable(*m_transform, canRender3DTransforms()); | 557 makeMatrixRenderable(*m_transform, canRender3DTransforms()); |
559 } | 558 } |
560 | 559 |
561 if (had3DTransform != has3DTransform()) | 560 if (had3DTransform != has3DTransform()) |
562 dirty3DTransformedDescendantStatus(); | 561 dirty3DTransformedDescendantStatus(); |
563 } | 562 } |
564 | 563 |
565 // Note: this function assumes that all ancestors have an updated 3d rendering c ontext root. | 564 RenderLayer* RenderLayer::renderingContextRoot() |
566 void RenderLayer::update3dRenderingContext() | |
567 { | 565 { |
568 m_3dRenderingContextRoot = 0; | 566 if (!shouldFlattenTransform()) |
esprehn
2014/03/25 02:39:35
I don't think this is correct. The previous code w
abarth-chromium
2014/03/25 02:59:39
I see. Yes, I screwed this up. I'll work on a te
ojan
2014/03/25 04:16:27
Ick. Good catch. The next question is why this cod
Ian Vollick
2014/03/25 14:40:01
Some possibly-useful background: the code was set
| |
567 return this; | |
569 | 568 |
570 if (!shouldFlattenTransform()) | 569 // FIXME: Why doesn't this need to be a loop? |
Ian Vollick
2014/03/25 14:40:01
The 3d rendering context was meant to bubble down.
| |
571 m_3dRenderingContextRoot = this; | |
572 | |
573 if (RenderObject* containingBlock = renderer()->containingBlock()) { | 570 if (RenderObject* containingBlock = renderer()->containingBlock()) { |
574 if (RenderLayer* ancestorLayer = containingBlock->enclosingLayer()) { | 571 if (RenderLayer* ancestorLayer = containingBlock->enclosingLayer()) { |
575 if (!ancestorLayer->shouldFlattenTransform()) | 572 if (!ancestorLayer->shouldFlattenTransform()) |
576 m_3dRenderingContextRoot = ancestorLayer->renderingContextRoot() ; | 573 return ancestorLayer; |
577 } | 574 } |
578 } | 575 } |
576 | |
577 return 0; | |
579 } | 578 } |
580 | 579 |
581 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr igin applyOrigin) const | 580 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr igin applyOrigin) const |
582 { | 581 { |
583 if (!m_transform) | 582 if (!m_transform) |
584 return TransformationMatrix(); | 583 return TransformationMatrix(); |
585 | 584 |
586 // m_transform includes transform-origin, so we need to recompute the transf orm here. | 585 // m_transform includes transform-origin, so we need to recompute the transf orm here. |
587 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { | 586 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { |
588 RenderBox* box = renderBox(); | 587 RenderBox* box = renderBox(); |
(...skipping 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4180 } | 4179 } |
4181 } | 4180 } |
4182 | 4181 |
4183 void showLayerTree(const WebCore::RenderObject* renderer) | 4182 void showLayerTree(const WebCore::RenderObject* renderer) |
4184 { | 4183 { |
4185 if (!renderer) | 4184 if (!renderer) |
4186 return; | 4185 return; |
4187 showLayerTree(renderer->enclosingLayer()); | 4186 showLayerTree(renderer->enclosingLayer()); |
4188 } | 4187 } |
4189 #endif | 4188 #endif |
OLD | NEW |