Closed Bug 1354624 Opened 4 years ago Closed 4 years ago

Fix PrintTarget::GetReferenceDrawTarget to not use the cached refDT when recording

Categories

(Core :: Printing: Output, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(3 files, 1 obsolete file)

We call PrintTarget::GetReferenceDrawTarget early while setting up to print in order to do some measuring (or something like that) during Reflow of the print document. We cache the returned DT in mRefDT during this first GetReferenceDrawTarget call. This then causes that method to return that non-recording DT even when a DrawEventRecorder argument is passed to it later during the drawing stage.

If this bug hadn't existed then bug 1347646 would probably never have happened.
Assignee: nobody → jwatt
Attachment #8857454 - Flags: review?(bobowencode)
We don't need this member - it already exists in the base class.
Attachment #8857456 - Flags: review?(bobowencode)
I noticed this when trying to remove some of the code duplication (which I'll do properly with a bigger refactoring in another bug).
Attachment #8857457 - Flags: review?(bobowencode)
Attachment #8857454 - Attachment is obsolete: true
Attachment #8857454 - Flags: review?(bobowencode)
Attachment #8857462 - Flags: review?(bobowencode)
Comment on attachment 8857462 [details] [diff] [review]
Fix PrintTarget::GetReferenceDrawTarget and its overrides to honor aRecorder

Review of attachment 8857462 [details] [diff] [review]:
-----------------------------------------------------------------

Obviously there's a lot of duplication here, but it sound like you're going to pick that up in another bug.
Attachment #8857462 - Flags: review?(bobowencode) → review+
Attachment #8857456 - Flags: review?(bobowencode) → review+
Attachment #8857457 - Flags: review?(bobowencode) → review+
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e866a70f9eb6
Fix PrintTarget::GetReferenceDrawTarget and its overrides to honor aRecorder. r=bobowen
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0d866c0600a
Remove mRefDT member from PrintTargetSkPDF. r=bobowen
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a370d9f84a5
Make PrintTarget::CreateRecordingDrawTarget static. r=bobowen
Depends on: 1434762
You need to log in before you can comment on or make changes to this bug.