Closed Bug 1401069 Opened 8 years ago Closed 8 years ago

Fine tune WindowsEMF and PDFViaEMFPrintHelper

Categories

(Core :: Printing: Output, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: u459114, Assigned: u459114)

Details

Attachments

(8 files, 1 obsolete file)

59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
59 bytes, text/x-review-board-request
fatseng
: review+
Details
1. Change some member functions to const 2. Make WindowsEMF reusable 3. Fine tune implementation of some functions.
Attachment #8909580 - Flags: review?(fatseng)
Attachment #8909581 - Flags: review?(fatseng)
Attachment #8909582 - Flags: review?(fatseng)
Attachment #8909583 - Flags: review?(fatseng)
Attachment #8909584 - Flags: review?(fatseng)
Attachment #8909585 - Flags: review?(fatseng)
Attachment #8909586 - Flags: review?(fatseng)
Attachment #8909587 - Flags: review?(fatseng)
Attachment #8909588 - Flags: review?(fatseng)
Priority: -- → P3
Comment on attachment 8909580 [details] Bug 1401069 - Part 1. Release EMF handle before function exist. https://reviewboard.mozilla.org/r/181040/#review186890 ::: widget/windows/WindowsEMF.cpp:73 (Diff revision 3) > if (!FinishDocument()) { > return false; > } > > - return ::PlayEnhMetaFile(aDeviceContext, mEmf, aRect) != 0; > + bool result = ::PlayEnhMetaFile(aDeviceContext, mEmf, aRect) != 0; > + ReleaseEMFHandle(); Remind you, if calling ReleaseEMFHandle() here, you just could playback one time.
Attachment #8909580 - Flags: review?(fatseng) → review+
Comment on attachment 8909580 [details] Bug 1401069 - Part 1. Release EMF handle before function exist. https://reviewboard.mozilla.org/r/181040/#review186892
Attachment #8909580 - Flags: review+ → review-
Comment on attachment 8909581 [details] Bug 1401069 - Part 2. Implement ReleaseAllResource to make WindowsEMF::InitForDrawing reusable. https://reviewboard.mozilla.org/r/181042/#review186894
Attachment #8909581 - Flags: review?(fatseng) → review+
Comment on attachment 8909582 [details] Bug 1401069 - Part 3. Declare WindowsEMF::GetDC as const member function. https://reviewboard.mozilla.org/r/181044/#review186896
Attachment #8909582 - Flags: review?(fatseng) → review+
Comment on attachment 8909583 [details] Bug 1401069 - Part 4. Change argument type from 'const RECT *' to reference type in WindowsEMF::Playback. https://reviewboard.mozilla.org/r/181046/#review186898
Attachment #8909583 - Flags: review?(fatseng) → review+
Comment on attachment 8909584 [details] Bug 1401069 - Part 5. Remove two local variables since we do not need them. https://reviewboard.mozilla.org/r/181048/#review186900
Attachment #8909584 - Flags: review?(fatseng) → review+
Attachment #8909585 - Flags: review?(fatseng) → review+
Comment on attachment 8909586 [details] Bug 1401069 - Part 7. Declare GetPageCount as a const member function. https://reviewboard.mozilla.org/r/181052/#review186906
Attachment #8909586 - Flags: review?(fatseng) → review+
Comment on attachment 8909587 [details] Bug 1401069 - Part 8. Give a detailed comment to explain how to react when hitting this assertion in OpenDocument(). https://reviewboard.mozilla.org/r/181054/#review186908
Attachment #8909587 - Flags: review?(fatseng) → review+
Comment on attachment 8909588 [details] Bug 1401069 - Part 1. Check the value of mPDFDoc and early return if it's invalid in both RenderPageToDC and DrawPageToFile. https://reviewboard.mozilla.org/r/181056/#review186910
Attachment #8909588 - Flags: review?(fatseng) → review+
Attachment #8909580 - Attachment is obsolete: true
Pushed by cku@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/74f2aee990a9 Part 1. Check the value of mPDFDoc and early return if it's invalid in both RenderPageToDC and DrawPageToFile. r=fatseng https://hg.mozilla.org/integration/autoland/rev/44ec9e64a5e3 Part 2. Implement ReleaseAllResource to make WindowsEMF::InitForDrawing reusable. r=fatseng https://hg.mozilla.org/integration/autoland/rev/c5dfc2e657a4 Part 3. Declare WindowsEMF::GetDC as const member function. r=fatseng https://hg.mozilla.org/integration/autoland/rev/5ae21f43fbd3 Part 4. Change argument type from 'const RECT *' to reference type in WindowsEMF::Playback. r=fatseng https://hg.mozilla.org/integration/autoland/rev/66cbdf9b1df0 Part 5. Remove two local variables since we do not need them. r=fatseng https://hg.mozilla.org/integration/autoland/rev/f6ec11335d52 Part 6. Fine tune ComputeScaleFactor. r=fatseng https://hg.mozilla.org/integration/autoland/rev/5e23e6f7d6d5 Part 7. Declare GetPageCount as a const member function. r=fatseng https://hg.mozilla.org/integration/autoland/rev/3e576101b9d3 Part 8. Give a detailed comment to explain how to react when hitting this assertion in OpenDocument(). r=fatseng
I assumed you ran the tests.
Flags: needinfo?(cku)
(In reply to Farmer Tseng[:fatseng] from comment #57) > I assumed you ran the tests. https://treeherder.mozilla.org/#/jobs?repo=try&revision=e1a4fdf23f77
Flags: needinfo?(cku)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: