Note: the page-margins patch is NOT actually upstream in the snapshot that is currently imported. It is in the latest one though. I am respinning the package with the fixed tarball.epel9
parent
4dfda4a3a4
commit
42f1d9c8a1
@ -1,33 +0,0 @@
|
||||
From b12ffcd411d4776f7120ccecb3be34344d930d2b Mon Sep 17 00:00:00 2001
|
||||
From: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
|
||||
Date: Tue, 9 Aug 2016 16:21:29 +0200
|
||||
Subject: Do not depend on Linux 4.5
|
||||
|
||||
Avoid using MADV_FREE that was only recently added to Linux. It will fail when
|
||||
run on older Linux kernels.
|
||||
|
||||
Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0
|
||||
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
|
||||
---
|
||||
chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
|
||||
index 121b687..be7c3b9 100644
|
||||
--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
|
||||
+++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
|
||||
@@ -39,6 +39,11 @@
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
+#if OS(LINUX) && defined(MADV_FREE)
|
||||
+// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime
|
||||
+#undef MADV_FREE
|
||||
+#endif
|
||||
+
|
||||
#ifndef MADV_FREE
|
||||
#define MADV_FREE MADV_DONTNEED
|
||||
#endif
|
||||
--
|
||||
cgit v1.0-4-g1e03
|
||||
|
@ -1,40 +0,0 @@
|
||||
From fbf32f1208e6d6556779ac955825ff7b6bf6a807 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Kofler <kevin.kofler@chello.at>
|
||||
Date: Fri, 9 Sep 2016 03:20:17 +0200
|
||||
Subject: [PATCH] Apply the correct page margins from the QPageLayout to
|
||||
Chromium printing
|
||||
|
||||
If one passes a QPageLayout to printToPDF, surely one expects the margin
|
||||
settings contained in it to actually get applied.
|
||||
|
||||
This is a partial backport of the much larger 5.8 commit
|
||||
af2535018b1553e351198f3d9c21538de1c328a1 (by Michael Bruning), limited
|
||||
to only the margin fix.
|
||||
---
|
||||
src/core/print_view_manager_qt.cpp | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp
|
||||
index 4cb0e06..b773c24 100644
|
||||
--- a/src/core/print_view_manager_qt.cpp
|
||||
+++ b/src/core/print_view_manager_qt.cpp
|
||||
@@ -115,6 +115,16 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout& pageLayout,
|
||||
sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter);
|
||||
print_settings.Set(printing::kSettingMediaSize, std::move(sizeDict));
|
||||
|
||||
+ // Apply page margins
|
||||
+ QMargins pageMarginsInPoints = pageLayout.marginsPoints();
|
||||
+ scoped_ptr<base::DictionaryValue> marginsDict(new base::DictionaryValue);
|
||||
+ marginsDict->SetInteger(printing::kSettingMarginTop, pageMarginsInPoints.top());
|
||||
+ marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom());
|
||||
+ marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left());
|
||||
+ marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right());
|
||||
+ print_settings.Set(printing::kSettingMarginsCustom, std::move(marginsDict));
|
||||
+ print_settings.SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS);
|
||||
+
|
||||
print_settings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape);
|
||||
|
||||
// The following are standard settings that Chromium expects to be set.
|
||||
--
|
||||
2.1.0
|
||||
|
Loading…
Reference in new issue