| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| index 5a917d88d3f8e6dc534087a051f26899c2a9f089..f8ca51d914d3f17bf3c4819e11c7a7c430c26c1d 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -118,6 +118,7 @@
|
| #include "core/editing/iterators/TextIterator.h"
|
| #include "core/editing/serializers/Serialization.h"
|
| #include "core/editing/spellcheck/SpellChecker.h"
|
| +#include "core/frame/Frame.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| @@ -153,7 +154,10 @@
|
| #include "core/page/FrameTree.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/PrintContext.h"
|
| +#include "core/paint/PaintInfo.h"
|
| #include "core/paint/PaintLayer.h"
|
| +#include "core/paint/PaintLayerPainter.h"
|
| +#include "core/paint/PaintLayerPaintingInfo.h"
|
| #include "core/paint/TransformRecorder.h"
|
| #include "core/style/StyleInheritedData.h"
|
| #include "core/timing/DOMWindowPerformance.h"
|
| @@ -169,6 +173,7 @@
|
| #include "platform/graphics/GraphicsContext.h"
|
| #include "platform/graphics/GraphicsLayerClient.h"
|
| #include "platform/graphics/paint/ClipRecorder.h"
|
| +#include "platform/graphics/paint/CullRect.h"
|
| #include "platform/graphics/paint/DisplayItemCacheSkipper.h"
|
| #include "platform/graphics/paint/DrawingRecorder.h"
|
| #include "platform/graphics/paint/PaintRecordBuilder.h"
|
| @@ -220,6 +225,7 @@
|
| #include "skia/ext/platform_canvas.h"
|
| #include "web/CompositionUnderlineVectorBuilder.h"
|
| #include "web/FindInPageCoordinates.h"
|
| +#include "web/RemoteFrameClientImpl.h"
|
| #include "web/RemoteFrameOwner.h"
|
| #include "web/SharedWorkerRepositoryClientImpl.h"
|
| #include "web/SuspendableScriptExecutor.h"
|
| @@ -305,9 +311,10 @@ class ChromePrintContext : public PrintContext {
|
| IntRect pageRect = m_pageRects[pageNumber];
|
| PaintRecordBuilder builder(pageRect, &skia::GetMetaData(*canvas));
|
| builder.context().setPrinting(true);
|
| + builder.context().setPrintPageNumber(pageNumber);
|
|
|
| float scale = spoolPage(builder, pageNumber);
|
| - builder.endRecording()->playback(canvas);
|
| + canvas->drawDrawable(builder.endRecordingAsDrawable().get());
|
| return scale;
|
| }
|
|
|
| @@ -398,8 +405,12 @@ class ChromePrintContext : public PrintContext {
|
|
|
| ClipRecorder clipRecorder(context, builder, DisplayItem::kClipPrintedPage,
|
| pageRect);
|
| -
|
| - frame()->view()->paintContents(context, GlobalPaintNormalPhase, pageRect);
|
| + if (frame()->isCrossOriginSubframe()) {
|
| + frame()->view()->paint(context, GlobalPaintNormalPhase,
|
| + CullRect(pageRect));
|
| + } else {
|
| + frame()->view()->paintContents(context, GlobalPaintNormalPhase, pageRect);
|
| + }
|
|
|
| {
|
| DrawingRecorder lineBoundaryRecorder(
|
|
|