Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: Source/WebCore/rendering/RenderLayer.cpp

Issue 12545020: Revert 145087 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3736 matching lines...) Expand 10 before | Expand all | Expand 10 after
3747 if (haveTransparency) 3747 if (haveTransparency)
3748 beginTransparencyLayers(transparencyLayerContext, localPaintingI nfo.rootLayer, paintingInfo.paintDirtyRect, localPaintingInfo.paintBehavior); 3748 beginTransparencyLayers(transparencyLayerContext, localPaintingI nfo.rootLayer, paintingInfo.paintDirtyRect, localPaintingInfo.paintBehavior);
3749 3749
3750 if (useClipRect) { 3750 if (useClipRect) {
3751 // Paint our background first, before painting any child layers. 3751 // Paint our background first, before painting any child layers.
3752 // Establish the clip used to paint our background. 3752 // Establish the clip used to paint our background.
3753 clipToRect(localPaintingInfo.rootLayer, context, localPaintingIn fo.paintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Background p ainting will handle clipping to self. 3753 clipToRect(localPaintingInfo.rootLayer, context, localPaintingIn fo.paintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Background p ainting will handle clipping to self.
3754 } 3754 }
3755 3755
3756 // Paint the background. 3756 // Paint the background.
3757 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintin gInfo.region, 0, 0, localPaintInfo.rootLayer->renderer()); 3757 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintin gInfo.region);
3758 renderer()->paint(paintInfo, paintOffset); 3758 renderer()->paint(paintInfo, paintOffset);
3759 3759
3760 if (useClipRect) { 3760 if (useClipRect) {
3761 // Restore the clip. 3761 // Restore the clip.
3762 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRec t); 3762 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRec t);
3763 } 3763 }
3764 } 3764 }
3765 3765
3766 // Now walk the sorted list of children with negative z-indices. 3766 // Now walk the sorted list of children with negative z-indices.
3767 paintList(negZOrderList(), context, localPaintingInfo, localPaintFlags); 3767 paintList(negZOrderList(), context, localPaintingInfo, localPaintFlags);
3768 } 3768 }
3769 3769
3770 if (localPaintFlags & PaintLayerPaintingCompositingForegroundPhase) { 3770 if (localPaintFlags & PaintLayerPaintingCompositingForegroundPhase) {
3771 // Now establish the appropriate clip and paint our child RenderObjects. 3771 // Now establish the appropriate clip and paint our child RenderObjects.
3772 if (shouldPaintContent && !clipRectToApply.isEmpty()) { 3772 if (shouldPaintContent && !clipRectToApply.isEmpty()) {
3773 // Begin transparency layers lazily now that we know we have to pain t something. 3773 // Begin transparency layers lazily now that we know we have to pain t something.
3774 if (haveTransparency) 3774 if (haveTransparency)
3775 beginTransparencyLayers(transparencyLayerContext, localPaintingI nfo.rootLayer, paintingInfo.paintDirtyRect, localPaintingInfo.paintBehavior); 3775 beginTransparencyLayers(transparencyLayerContext, localPaintingI nfo.rootLayer, paintingInfo.paintDirtyRect, localPaintingInfo.paintBehavior);
3776 3776
3777 if (useClipRect) { 3777 if (useClipRect) {
3778 // Set up the clip used when painting our children. 3778 // Set up the clip used when painting our children.
3779 clipToRect(localPaintingInfo.rootLayer, context, localPaintingIn fo.paintDirtyRect, clipRectToApply); 3779 clipToRect(localPaintingInfo.rootLayer, context, localPaintingIn fo.paintDirtyRect, clipRectToApply);
3780 } 3780 }
3781 3781
3782 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRectToApply.rec t()), 3782 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRectToApply.rec t()),
3783 selectionOnly ? PaintPhaseSelection : PaintPhase ChildBlockBackgrounds, 3783 selectionOnly ? PaintPhaseSelection : PaintPhase ChildBlockBackgrounds,
3784 forceBlackText ? (PaintBehavior)PaintBehaviorFor ceBlackText : paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 3784 forceBlackText ? (PaintBehavior)PaintBehaviorFor ceBlackText : paintBehavior, paintingRootForRenderer, localPaintingInfo.region);
3785 0, 0, localPaintInfo.rootLayer->renderer());
3786 renderer()->paint(paintInfo, paintOffset); 3785 renderer()->paint(paintInfo, paintOffset);
3787 if (!selectionOnly) { 3786 if (!selectionOnly) {
3788 paintInfo.phase = PaintPhaseFloat; 3787 paintInfo.phase = PaintPhaseFloat;
3789 renderer()->paint(paintInfo, paintOffset); 3788 renderer()->paint(paintInfo, paintOffset);
3790 paintInfo.phase = PaintPhaseForeground; 3789 paintInfo.phase = PaintPhaseForeground;
3791 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestReq uests; 3790 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestReq uests;
3792 renderer()->paint(paintInfo, paintOffset); 3791 renderer()->paint(paintInfo, paintOffset);
3793 paintInfo.phase = PaintPhaseChildOutlines; 3792 paintInfo.phase = PaintPhaseChildOutlines;
3794 renderer()->paint(paintInfo, paintOffset); 3793 renderer()->paint(paintInfo, paintOffset);
3795 } 3794 }
3796 3795
3797 if (useClipRect) { 3796 if (useClipRect) {
3798 // Now restore our clip. 3797 // Now restore our clip.
3799 restoreClip(context, localPaintingInfo.paintDirtyRect, clipRectT oApply); 3798 restoreClip(context, localPaintingInfo.paintDirtyRect, clipRectT oApply);
3800 } 3799 }
3801 } 3800 }
3802 3801
3803 if (shouldPaintOutline && !outlineRect.isEmpty()) { 3802 if (shouldPaintOutline && !outlineRect.isEmpty()) {
3804 // Paint our own outline 3803 // Paint our own outline
3805 PaintInfo paintInfo(context, pixelSnappedIntRect(outlineRect.rect()) , PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingIn fo.region, 0, 0, localPaintInfo.rootLayer->renderer()); 3804 PaintInfo paintInfo(context, pixelSnappedIntRect(outlineRect.rect()) , PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingIn fo.region);
3806 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius); 3805 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius);
3807 renderer()->paint(paintInfo, paintOffset); 3806 renderer()->paint(paintInfo, paintOffset);
3808 restoreClip(context, localPaintingInfo.paintDirtyRect, outlineRect); 3807 restoreClip(context, localPaintingInfo.paintDirtyRect, outlineRect);
3809 } 3808 }
3810 3809
3811 // Paint any child layers that have overflow. 3810 // Paint any child layers that have overflow.
3812 paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaint Flags); 3811 paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaint Flags);
3813 3812
3814 // Now walk the sorted list of children with positive z-indices. 3813 // Now walk the sorted list of children with positive z-indices.
3815 paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags); 3814 paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags);
(...skipping 15 matching lines...) Expand all
3831 #endif 3830 #endif
3832 3831
3833 // Make sure that we now use the original transparency context. 3832 // Make sure that we now use the original transparency context.
3834 ASSERT(transparencyLayerContext == context); 3833 ASSERT(transparencyLayerContext == context);
3835 3834
3836 if ((localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPain tContent && renderer()->hasMask() && !selectionOnly) { 3835 if ((localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPain tContent && renderer()->hasMask() && !selectionOnly) {
3837 if (useClipRect) 3836 if (useClipRect)
3838 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Mask painting wi ll handle clipping to self. 3837 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Mask painting wi ll handle clipping to self.
3839 3838
3840 // Paint the mask. 3839 // Paint the mask.
3841 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), Pai ntPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.reg ion, 0, 0, localPaintInfo.rootLayer->renderer()); 3840 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), Pai ntPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.reg ion);
3842 renderer()->paint(paintInfo, paintOffset); 3841 renderer()->paint(paintInfo, paintOffset);
3843 3842
3844 if (useClipRect) { 3843 if (useClipRect) {
3845 // Restore the clip. 3844 // Restore the clip.
3846 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRect); 3845 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRect);
3847 } 3846 }
3848 } 3847 }
3849 3848
3850 // End our transparency layer 3849 // End our transparency layer
3851 if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) { 3850 if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) {
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5930 } 5929 }
5931 } 5930 }
5932 5931
5933 void showLayerTree(const WebCore::RenderObject* renderer) 5932 void showLayerTree(const WebCore::RenderObject* renderer)
5934 { 5933 {
5935 if (!renderer) 5934 if (!renderer)
5936 return; 5935 return;
5937 showLayerTree(renderer->enclosingLayer()); 5936 showLayerTree(renderer->enclosingLayer());
5938 } 5937 }
5939 #endif 5938 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderInline.cpp ('k') | Source/WebCore/rendering/RenderLineBoxList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698