WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159933
[iOS] REGRESSION(203378): PDFDocumentImage::updateCachedImageIfNeeded() uses the unscaled size when deciding whether to cache the PDF image
https://bugs.webkit.org/show_bug.cgi?id=159933
Summary
[iOS] REGRESSION(203378): PDFDocumentImage::updateCachedImageIfNeeded() uses ...
Said Abou-Hallawa
Reported
2016-07-19 11:49:46 PDT
The
r203378
did not actually fix the
https://bugs.webkit.org/show_bug.cgi?id=158715
because although we have the right steps to decide whether to cache the PDF image or not, we are using the unscaled size which is wrong. The image has to be created scaled with the context.scaleFactor(). This may lead to allowing caching a PDF image which will cause the WebKit to jetsam on iOS.
Attachments
Patch
(2.24 KB, patch)
2016-07-19 11:52 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(4.54 KB, patch)
2016-07-22 11:00 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Patch
(2.67 KB, patch)
2016-07-22 11:11 PDT
,
Said Abou-Hallawa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2016-07-19 11:52:00 PDT
Created
attachment 284026
[details]
Patch
Said Abou-Hallawa
Comment 2
2016-07-19 12:50:00 PDT
<
rdar://problem/27430450
>
Simon Fraser (smfr)
Comment 3
2016-07-22 10:37:26 PDT
Comment on
attachment 284026
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=284026&action=review
> Source/WebCore/ChangeLog:8 > + We need to use the scaled size when deciding whether to cache the PDF image or not.
Why?
> Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp:225 > #if PLATFORM(IOS) > m_cachedImageRect = cachedImageRect(context, dstRect); > +#else > + m_cachedImageRect = dstRect; > +#endif
It would be good to turn these #if PLATFORM(IOS) into something more descriptive, that explains why iOS needs special behavior.
Said Abou-Hallawa
Comment 4
2016-07-22 11:00:51 PDT
Created
attachment 284347
[details]
Patch
Said Abou-Hallawa
Comment 5
2016-07-22 11:11:16 PDT
Created
attachment 284348
[details]
Patch
WebKit Commit Bot
Comment 6
2016-07-22 11:46:40 PDT
Comment on
attachment 284348
[details]
Patch Clearing flags on attachment: 284348 Committed
r203606
: <
http://trac.webkit.org/changeset/203606
>
WebKit Commit Bot
Comment 7
2016-07-22 11:46:45 PDT
All reviewed patches have been landed. Closing bug.
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