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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2923343005: Move printing-related methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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 aae2a4031d6f21285591bfc8cdc417d4cf06f115..0991b7dec3b878f7d492ff22faa92b702d286562 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -290,8 +290,9 @@ class ChromePrintContext : public PrintContext {
return scale;
}
- void SpoolAllPagesWithBoundaries(WebCanvas* canvas,
- const FloatSize& page_size_in_pixels) {
+ void SpoolAllPagesWithBoundariesForTesting(
+ WebCanvas* canvas,
+ const FloatSize& page_size_in_pixels) {
DispatchEventsForPrintingOnAllFrames();
if (!GetFrame()->GetDocument() ||
GetFrame()->GetDocument()->GetLayoutViewItem().IsNull())
@@ -332,8 +333,9 @@ class ChromePrintContext : public PrintContext {
AffineTransform transform;
transform.Translate(0, current_height);
#if OS(WIN) || OS(MACOSX)
- // Account for the disabling of scaling in spoolPage. In the context
- // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied.
+ // Account for the disabling of scaling in spoolPage. In the context of
+ // SpoolAllPagesWithBoundariesForTesting the scale HAS NOT been
+ // pre-applied.
float scale = GetPageShrink(page_index);
transform.Scale(scale, scale);
#endif
@@ -1476,16 +1478,16 @@ WebString WebLocalFrameImpl::PageProperty(const WebString& property_name,
page_index);
}
-void WebLocalFrameImpl::PrintPagesWithBoundaries(
+void WebLocalFrameImpl::PrintPagesForTesting(
WebCanvas* canvas,
const WebSize& page_size_in_pixels) {
DCHECK(print_context_);
- print_context_->SpoolAllPagesWithBoundaries(
+ print_context_->SpoolAllPagesWithBoundariesForTesting(
canvas, FloatSize(page_size_in_pixels.width, page_size_in_pixels.height));
}
-WebRect WebLocalFrameImpl::SelectionBoundsRect() const {
+WebRect WebLocalFrameImpl::GetSelectionBoundsRectForTesting() const {
return HasSelection() ? WebRect(IntRect(GetFrame()->Selection().Bounds()))
: WebRect();
}
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698