Summary: | PDFPlugin: <embed> and <object> PDFs affect their parent frame's page scale | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||
Component: | Assignee: | Tim Horton <thorton> | |||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, ap, mitz, sam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 103287 | ||||||||
Attachments: |
|
Description
Tim Horton
2012-11-26 13:34:19 PST
Created attachment 176083 [details]
patch
Thanks, Dan! http://trac.webkit.org/changeset/136316 Comment on attachment 176083 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=176083&action=review > Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm:664 > + Document* document = webFrame()->coreFrame()->document(); > + if (document->isPluginDocument()) > + return (static_cast<PluginDocument*>(document)->pluginWidget() == pluginView()); > + > + return false; Normally we do early return for the failure cases, not the main case, so it would be: if (!isPluginDocument) return false; return ......; Also, the patch has extra parentheses in the return statement that we don’t do. But I think this reads better with &&: return document->isPluginDocument() && static_cast<PluginDocument*>(document)->pluginWidget() == pluginView(); Created attachment 177290 [details]
followup style patch
Oooh, yes, much better. Posting a follow-up patch.
Followup style patch is http://trac.webkit.org/changeset/136422 |