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

Side by Side Diff: third_party/WebKit/Source/core/paint/PartPainter.cpp

Issue 2713673005: client-goodbye
Patch Set: Created 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PartPainter.h" 5 #include "core/paint/PartPainter.h"
6 6
7 #include "core/layout/LayoutPart.h" 7 #include "core/layout/LayoutPart.h"
8 #include "core/paint/BoxPainter.h" 8 #include "core/paint/BoxPainter.h"
9 #include "core/paint/LayoutObjectDrawingRecorder.h" 9 #include "core/paint/LayoutObjectDrawingRecorder.h"
10 #include "core/paint/ObjectPainter.h" 10 #include "core/paint/ObjectPainter.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 IntPoint paintLocation(roundedIntPoint( 124 IntPoint paintLocation(roundedIntPoint(
125 adjustedPaintOffset + m_layoutPart.replacedContentRect().location())); 125 adjustedPaintOffset + m_layoutPart.replacedContentRect().location()));
126 126
127 // Widgets don't support painting with a paint offset, but instead offset 127 // Widgets don't support painting with a paint offset, but instead offset
128 // themselves using the frame rect location. To paint widgets at our desired 128 // themselves using the frame rect location. To paint widgets at our desired
129 // location, we need to apply paint offset as a transform, with the frame rect 129 // location, we need to apply paint offset as a transform, with the frame rect
130 // neutralized. 130 // neutralized.
131 IntSize widgetPaintOffset = paintLocation - widget->frameRect().location(); 131 IntSize widgetPaintOffset = paintLocation - widget->frameRect().location();
132 TransformRecorder transform( 132 TransformRecorder transform(
133 paintInfo.context, m_layoutPart, 133 paintInfo.context,
134 AffineTransform::translation(widgetPaintOffset.width(), 134 AffineTransform::translation(widgetPaintOffset.width(),
135 widgetPaintOffset.height())); 135 widgetPaintOffset.height()),
136 m_layoutPart.visualRect(), m_layoutPart.debugName(),
137 m_layoutPart.paintedOutputOfObjectHasNoEffectRegardlessOfSize());
136 CullRect adjustedCullRect(paintInfo.cullRect(), -widgetPaintOffset); 138 CullRect adjustedCullRect(paintInfo.cullRect(), -widgetPaintOffset);
137 widget->paint(paintInfo.context, adjustedCullRect); 139 widget->paint(paintInfo.context, adjustedCullRect);
138 } 140 }
139 141
140 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGClipPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698