| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 984 |
| 985 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->
windRule()); | 985 context->clipPath(clipPath->path(rootRelativeBounds), clipPath->
windRule()); |
| 986 } | 986 } |
| 987 } | 987 } |
| 988 } | 988 } |
| 989 | 989 |
| 990 LayerPaintingInfo localPaintingInfo(paintingInfo); | 990 LayerPaintingInfo localPaintingInfo(paintingInfo); |
| 991 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); | 991 FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilte
rs()); |
| 992 | 992 |
| 993 LayoutRect layerBounds; | 993 LayoutRect layerBounds; |
| 994 // FIXME(sky): Remove foregroundRect. It's unused. |
| 994 ClipRect backgroundRect, foregroundRect, outlineRect; | 995 ClipRect backgroundRect, foregroundRect, outlineRect; |
| 995 ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipR
ects, localPaintingInfo.subPixelAccumulation); | 996 ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipR
ects, localPaintingInfo.subPixelAccumulation); |
| 996 clipper().calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect, | 997 clipper().calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect, |
| 997 layerBounds, backgroundRect, foregroundRect, outlineRect, | 998 layerBounds, backgroundRect, foregroundRect, outlineRect, |
| 998 &offsetFromRoot); | 999 &offsetFromRoot); |
| 999 | 1000 |
| 1000 bool isPaintingOverlayScrollbars = paintFlags == PaintOverlayScrollbars; | 1001 bool isPaintingOverlayScrollbars = paintFlags == PaintOverlayScrollbars; |
| 1001 bool shouldPaintContent = isSelfPaintingLayer() && !isPaintingOverlayScrollb
ars | 1002 bool shouldPaintContent = isSelfPaintingLayer() && !isPaintingOverlayScrollb
ars |
| 1002 && intersectsDamageRect(layerBounds, backgroundRect.rect(), localPaintin
gInfo.rootLayer, &offsetFromRoot); | 1003 && intersectsDamageRect(layerBounds, backgroundRect.rect(), localPaintin
gInfo.rootLayer, &offsetFromRoot); |
| 1003 | 1004 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 // Else, our renderer tree may or may not contain the painting root, so we p
ass that root along | 1039 // Else, our renderer tree may or may not contain the painting root, so we p
ass that root along |
| 1039 // so it will be tested against as we descend through the renderers. | 1040 // so it will be tested against as we descend through the renderers. |
| 1040 RenderObject* paintingRootForRenderer = 0; | 1041 RenderObject* paintingRootForRenderer = 0; |
| 1041 if (localPaintingInfo.paintingRoot && !renderer()->isDescendantOf(localPaint
ingInfo.paintingRoot)) | 1042 if (localPaintingInfo.paintingRoot && !renderer()->isDescendantOf(localPaint
ingInfo.paintingRoot)) |
| 1042 paintingRootForRenderer = localPaintingInfo.paintingRoot; | 1043 paintingRootForRenderer = localPaintingInfo.paintingRoot; |
| 1043 | 1044 |
| 1044 LayoutPoint layerLocation = toPoint(layerBounds.location() - renderBoxLocati
on() + localPaintingInfo.subPixelAccumulation); | 1045 LayoutPoint layerLocation = toPoint(layerBounds.location() - renderBoxLocati
on() + localPaintingInfo.subPixelAccumulation); |
| 1045 | 1046 |
| 1046 if (shouldPaintContent) { | 1047 if (shouldPaintContent) { |
| 1047 paintForeground(context, transparencyLayerContext, paintingInfo.paintDir
tyRect, haveTransparency, | 1048 paintForeground(context, transparencyLayerContext, paintingInfo.paintDir
tyRect, haveTransparency, |
| 1048 localPaintingInfo, paintingRootForRenderer, layerLocation, foregroun
dRect); | 1049 localPaintingInfo, paintingRootForRenderer, layerLocation, backgroun
dRect); |
| 1049 } | 1050 } |
| 1050 | 1051 |
| 1051 paintOutline(context, localPaintingInfo, paintingRootForRenderer, layerLocat
ion, outlineRect); | 1052 paintOutline(context, localPaintingInfo, paintingRootForRenderer, layerLocat
ion, outlineRect); |
| 1052 paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, painting
Info, paintFlags); | 1053 paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, painting
Info, paintFlags); |
| 1053 | 1054 |
| 1054 if (isPaintingOverlayScrollbars) | 1055 if (isPaintingOverlayScrollbars) |
| 1055 paintOverflowControls(context, localPaintingInfo, layerLocation, backgro
undRect); | 1056 paintOverflowControls(context, localPaintingInfo, layerLocation, backgro
undRect); |
| 1056 | 1057 |
| 1057 if (filterPainter.hasStartedFilterEffect()) { | 1058 if (filterPainter.hasStartedFilterEffect()) { |
| 1058 context = filterPainter.applyFilterEffect(); | 1059 context = filterPainter.applyFilterEffect(); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 } | 1848 } |
| 1848 } | 1849 } |
| 1849 | 1850 |
| 1850 void showLayerTree(const blink::RenderObject* renderer) | 1851 void showLayerTree(const blink::RenderObject* renderer) |
| 1851 { | 1852 { |
| 1852 if (!renderer) | 1853 if (!renderer) |
| 1853 return; | 1854 return; |
| 1854 showLayerTree(renderer->enclosingLayer()); | 1855 showLayerTree(renderer->enclosingLayer()); |
| 1855 } | 1856 } |
| 1856 #endif | 1857 #endif |
| OLD | NEW |