diff --git a/widget/windows/PDFViaEMFPrintHelper.cpp b/widget/windows/PDFViaEMFPrintHelper.cpp index 62579108694b..a3686226e065 100644 --- a/widget/windows/PDFViaEMFPrintHelper.cpp +++ b/widget/windows/PDFViaEMFPrintHelper.cpp @@ -183,7 +183,7 @@ PDFViaEMFPrintHelper::DrawPage(HDC aPrinterDC, unsigned int aPageIndex, } bool -PDFViaEMFPrintHelper::DrawPageToFile(const wchar_t* aFilePath, +PDFViaEMFPrintHelper::SavePageToFile(const wchar_t* aFilePath, unsigned int aPageIndex, int aPageWidth, int aPageHeight) { diff --git a/widget/windows/PDFViaEMFPrintHelper.h b/widget/windows/PDFViaEMFPrintHelper.h index beaddde646f4..d5d845c489f6 100644 --- a/widget/windows/PDFViaEMFPrintHelper.h +++ b/widget/windows/PDFViaEMFPrintHelper.h @@ -55,7 +55,7 @@ public: int aPageWidth, int aPageHeight); /** Convert a specified PDF page to EMF and save it to file. */ - bool DrawPageToFile(const wchar_t* aFilePath, unsigned int aPageIndex, + bool SavePageToFile(const wchar_t* aFilePath, unsigned int aPageIndex, int aPageWidth, int aPageHeight); /** Create a share memory and serialize the EMF content into it. */ diff --git a/widget/windows/gtest/TestEMFConversion.cpp b/widget/windows/gtest/TestEMFConversion.cpp index 99eb4ce1e33d..fdf97337bbb4 100755 --- a/widget/windows/gtest/TestEMFConversion.cpp +++ b/widget/windows/gtest/TestEMFConversion.cpp @@ -152,7 +152,7 @@ TEST(TestEMFConversion, CompareEMFWithReference) ASSERT_TRUE(NS_SUCCEEDED(GetFilePathViaSpecialDirectory(NS_OS_TEMP_DIR, "gtest.emf", emfPath))); - ASSERT_TRUE(PDFHelper->DrawPageToFile(emfPath.get(), 0, + ASSERT_TRUE(PDFHelper->SavePageToFile(emfPath.get(), 0, pageWidth, pageHeight)); PDFHelper->CloseDocument(); #ifdef _WIN64 @@ -166,7 +166,7 @@ TEST(TestEMFConversion, CompareEMFWithReference) "gtestRef.emf", emfPathRef))); - ASSERT_TRUE(ExtHelper->DrawPageToFile(emfPathRef.get(), 0, + ASSERT_TRUE(ExtHelper->SavePageToFile(emfPathRef.get(), 0, pageWidth, pageHeight)); ExtHelper->CloseDocument(); @@ -194,8 +194,8 @@ TEST(TestEMFConversion, TestInsufficientWidthAndHeight) "gtest.emf", emfPath))); - ASSERT_FALSE(PDFHelper->DrawPageToFile(emfPath.get(), 0, 0, 0)); - ASSERT_FALSE(PDFHelper->PageToFile(emfPath.get(), 0, 100, -1)); + ASSERT_FALSE(PDFHelper->SavePageToFile(emfPath.get(), 0, 0, 0)); + ASSERT_FALSE(PDFHelper->SavePageToFile(emfPath.get(), 0, 100, -1)); PDFHelper->CloseDocument(); }