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

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

Issue 12616003: Merge 144350 (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); 3757 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintin gInfo.region, 0, 0, localPaintInfo.rootLayer->renderer());
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());
3785 renderer()->paint(paintInfo, paintOffset); 3786 renderer()->paint(paintInfo, paintOffset);
3786 if (!selectionOnly) { 3787 if (!selectionOnly) {
3787 paintInfo.phase = PaintPhaseFloat; 3788 paintInfo.phase = PaintPhaseFloat;
3788 renderer()->paint(paintInfo, paintOffset); 3789 renderer()->paint(paintInfo, paintOffset);
3789 paintInfo.phase = PaintPhaseForeground; 3790 paintInfo.phase = PaintPhaseForeground;
3790 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestReq uests; 3791 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestReq uests;
3791 renderer()->paint(paintInfo, paintOffset); 3792 renderer()->paint(paintInfo, paintOffset);
3792 paintInfo.phase = PaintPhaseChildOutlines; 3793 paintInfo.phase = PaintPhaseChildOutlines;
3793 renderer()->paint(paintInfo, paintOffset); 3794 renderer()->paint(paintInfo, paintOffset);
3794 } 3795 }
3795 3796
3796 if (useClipRect) { 3797 if (useClipRect) {
3797 // Now restore our clip. 3798 // Now restore our clip.
3798 restoreClip(context, localPaintingInfo.paintDirtyRect, clipRectT oApply); 3799 restoreClip(context, localPaintingInfo.paintDirtyRect, clipRectT oApply);
3799 } 3800 }
3800 } 3801 }
3801 3802
3802 if (shouldPaintOutline && !outlineRect.isEmpty()) { 3803 if (shouldPaintOutline && !outlineRect.isEmpty()) {
3803 // Paint our own outline 3804 // Paint our own outline
3804 PaintInfo paintInfo(context, pixelSnappedIntRect(outlineRect.rect()) , PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingIn fo.region); 3805 PaintInfo paintInfo(context, pixelSnappedIntRect(outlineRect.rect()) , PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingIn fo.region, 0, 0, localPaintInfo.rootLayer->renderer());
3805 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius); 3806 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, outlineRect, DoNotIncludeSelfForBorderRadius);
3806 renderer()->paint(paintInfo, paintOffset); 3807 renderer()->paint(paintInfo, paintOffset);
3807 restoreClip(context, localPaintingInfo.paintDirtyRect, outlineRect); 3808 restoreClip(context, localPaintingInfo.paintDirtyRect, outlineRect);
3808 } 3809 }
3809 3810
3810 // Paint any child layers that have overflow. 3811 // Paint any child layers that have overflow.
3811 paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaint Flags); 3812 paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaint Flags);
3812 3813
3813 // Now walk the sorted list of children with positive z-indices. 3814 // Now walk the sorted list of children with positive z-indices.
3814 paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags); 3815 paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags);
(...skipping 15 matching lines...) Expand all
3830 #endif 3831 #endif
3831 3832
3832 // Make sure that we now use the original transparency context. 3833 // Make sure that we now use the original transparency context.
3833 ASSERT(transparencyLayerContext == context); 3834 ASSERT(transparencyLayerContext == context);
3834 3835
3835 if ((localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPain tContent && renderer()->hasMask() && !selectionOnly) { 3836 if ((localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPain tContent && renderer()->hasMask() && !selectionOnly) {
3836 if (useClipRect) 3837 if (useClipRect)
3837 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Mask painting wi ll handle clipping to self. 3838 clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.p aintDirtyRect, damageRect, DoNotIncludeSelfForBorderRadius); // Mask painting wi ll handle clipping to self.
3838 3839
3839 // Paint the mask. 3840 // Paint the mask.
3840 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), Pai ntPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.reg ion); 3841 PaintInfo paintInfo(context, pixelSnappedIntRect(damageRect.rect()), Pai ntPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.reg ion, 0, 0, localPaintInfo.rootLayer->renderer());
3841 renderer()->paint(paintInfo, paintOffset); 3842 renderer()->paint(paintInfo, paintOffset);
3842 3843
3843 if (useClipRect) { 3844 if (useClipRect) {
3844 // Restore the clip. 3845 // Restore the clip.
3845 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRect); 3846 restoreClip(context, localPaintingInfo.paintDirtyRect, damageRect);
3846 } 3847 }
3847 } 3848 }
3848 3849
3849 // End our transparency layer 3850 // End our transparency layer
3850 if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) { 3851 if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) {
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5929 } 5930 }
5930 } 5931 }
5931 5932
5932 void showLayerTree(const WebCore::RenderObject* renderer) 5933 void showLayerTree(const WebCore::RenderObject* renderer)
5933 { 5934 {
5934 if (!renderer) 5935 if (!renderer)
5935 return; 5936 return;
5936 showLayerTree(renderer->enclosingLayer()); 5937 showLayerTree(renderer->enclosingLayer());
5937 } 5938 }
5938 #endif 5939 #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