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

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

Issue 1005223002: Blink: Replace all "plug-in" with "plugin". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert netscape-dom-access tests. Created 5 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/paint/PartPainter.h" 6 #include "core/paint/PartPainter.h"
7 7
8 #include "core/layout/LayoutPart.h" 8 #include "core/layout/LayoutPart.h"
9 #include "core/layout/PaintInfo.h" 9 #include "core/layout/PaintInfo.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // Tell the widget to paint now. This is the only time the widget is allowed 83 // Tell the widget to paint now. This is the only time the widget is allowed
84 // to paint itself. That way it will composite properly with z-indexed layer s. 84 // to paint itself. That way it will composite properly with z-indexed layer s.
85 IntPoint widgetLocation = widget->frameRect().location(); 85 IntPoint widgetLocation = widget->frameRect().location();
86 IntPoint paintLocation(roundToInt(adjustedPaintOffset.x() + m_layoutPart.bor derLeft() + m_layoutPart.paddingLeft()), 86 IntPoint paintLocation(roundToInt(adjustedPaintOffset.x() + m_layoutPart.bor derLeft() + m_layoutPart.paddingLeft()),
87 roundToInt(adjustedPaintOffset.y() + m_layoutPart.borderTop() + m_layout Part.paddingTop())); 87 roundToInt(adjustedPaintOffset.y() + m_layoutPart.borderTop() + m_layout Part.paddingTop()));
88 IntRect paintRect = paintInfo.rect; 88 IntRect paintRect = paintInfo.rect;
89 89
90 IntSize widgetPaintOffset = paintLocation - widgetLocation; 90 IntSize widgetPaintOffset = paintLocation - widgetLocation;
91 // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer, 91 // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,
92 // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plug-in drawing. 92 // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plugin drawing.
93 TransformRecorder transform(*paintInfo.context, m_layoutPart.displayItemClie nt(), 93 TransformRecorder transform(*paintInfo.context, m_layoutPart.displayItemClie nt(),
94 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse t.height())); 94 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse t.height()));
95 paintRect.move(-widgetPaintOffset); 95 paintRect.move(-widgetPaintOffset);
96 widget->paint(paintInfo.context, paintRect); 96 widget->paint(paintInfo.context, paintRect);
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698