I should be possible to add different style depending on the platform.
Created attachment 453953 [details] Patch
Comment on attachment 453953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453953&action=review > Source/WebCore/html/PDFDocument.cpp:217 > +#if PLATFORM(COCOA) > + link->setAttribute(hrefAttr, "webkit-pdfjs-viewer://pdfjs/extras/cocoa/style.css"_s); > +#endif Do #if preprocessing conditions not work in the JS file? If they do, I'd rather see this logic in the JS file.
Comment on attachment 453953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453953&action=review >> Source/WebCore/html/PDFDocument.cpp:217 >> +#endif > > Do #if preprocessing conditions not work in the JS file? If they do, I'd rather see this logic in the JS file. I don't think so, the script is injected as is, without any preprocessing. I don't know how to make it platform dependent in a JS file, that's why I moved it to cpp.
Committed r290983 (248161@main): <https://commits.webkit.org/248161@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453953 [details].
<rdar://problem/89955906>