WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235970
Create PDFDocument stub
https://bugs.webkit.org/show_bug.cgi?id=235970
Summary
Create PDFDocument stub
Tim Nguyen (:ntim)
Reported
2022-02-01 12:48:02 PST
Empty stub
Attachments
Patch
(13.40 KB, patch)
2022-02-02 14:58 PST
,
Tim Nguyen (:ntim)
bfulgham
: review+
bfulgham
: commit-queue-
Details
Formatted Diff
Diff
[fast-cq] Patch
(13.40 KB, patch)
2022-02-03 00:11 PST
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-01 15:31:32 PST
<
rdar://problem/88351855
>
Tim Nguyen (:ntim)
Comment 2
2022-02-02 14:58:48 PST
Created
attachment 450700
[details]
Patch
Brent Fulgham
Comment 3
2022-02-02 16:30:04 PST
Comment on
attachment 450700
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450700&action=review
I think this looks fine as a first step, but needs a few adjustments before you land.
> Source/WebCore/dom/DOMImplementation.cpp:156 > + if (settings.pdfJSViewerEnabled() && MIMETypeRegistry::isPDFMIMEType(contentType))
You should check for nullptr frame, like we do for the image case.
> Source/WebCore/html/PDFDocument.cpp:97 > + // FIXME: add actual viewer URL
// FIXME: Replace about:blank with actual viewer URL
> Source/WebCore/html/PDFDocument.cpp:106 > + body->setAttribute(styleAttr, "margin: 0px;height: 100vh;");
body->setAttribute(styleAttr, AtomString("margin: 0px;height: 100vh;", AtomString::ConstructFromLiteral));
> Source/WebCore/html/PDFDocument.cpp:111 > + iframe->setAttribute(styleAttr, "width: 100%; height: 100%; border: 0; display: block;");
iframe->setAttribute(styleAttr, AtomString("width: 100%; height: 100%; border: 0; display: block;", AtomString::ConstructFromLiteral));
> Source/WebCore/html/PDFDocument.cpp:121 > + // FIXME: Collect bytes during parsing
We usually do: notImplemented();
> Source/WebCore/html/PDFDocument.cpp:127 > + // FIXME: Send bytes as a blob into the iframe, and ask it to render that blob
Ditto.
Tim Nguyen (:ntim)
Comment 4
2022-02-03 00:08:50 PST
(In reply to Brent Fulgham from
comment #3
)
> Comment on
attachment 450700
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=450700&action=review
> > I think this looks fine as a first step, but needs a few adjustments before > you land. > > > Source/WebCore/dom/DOMImplementation.cpp:156 > > + if (settings.pdfJSViewerEnabled() && MIMETypeRegistry::isPDFMIMEType(contentType)) > > You should check for nullptr frame, like we do for the image case. > > > Source/WebCore/html/PDFDocument.cpp:97 > > + // FIXME: add actual viewer URL > > // FIXME: Replace about:blank with actual viewer URL > > > Source/WebCore/html/PDFDocument.cpp:106 > > + body->setAttribute(styleAttr, "margin: 0px;height: 100vh;"); > > body->setAttribute(styleAttr, AtomString("margin: 0px;height: 100vh;", > AtomString::ConstructFromLiteral)); > > > Source/WebCore/html/PDFDocument.cpp:111 > > + iframe->setAttribute(styleAttr, "width: 100%; height: 100%; border: 0; display: block;"); > > iframe->setAttribute(styleAttr, AtomString("width: 100%; height: 100%; > border: 0; display: block;", AtomString::ConstructFromLiteral));
Done.
> > Source/WebCore/html/PDFDocument.cpp:121 > > + // FIXME: Collect bytes during parsing > > We usually do: > notImplemented(); > > > Source/WebCore/html/PDFDocument.cpp:127 > > + // FIXME: Send bytes as a blob into the iframe, and ask it to render that blob > > Ditto.
First iteration will be URL-based, so I'll remove those comments for now. I'll file an bug to change it from URL-based to blob-based.
Tim Nguyen (:ntim)
Comment 5
2022-02-03 00:11:56 PST
Created
attachment 450739
[details]
[fast-cq] Patch
EWS
Comment 6
2022-02-03 00:16:48 PST
Committed
r289031
(
246739@main
): <
https://commits.webkit.org/246739@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450739
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug