| Summary: | PDFDocumentImage can be very slow to do the initial paint | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||
| Component: | Assignee: | Tim Horton <thorton> | |||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | andersca, commit-queue, sam, simon.fraser, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Tim Horton
2014-01-08 02:25:59 PST
I guess we have to decide whether PDF-in-<img> should behave like an image (and stretch if width and height are both specified) or like an SVG (and fit inside the box). Created attachment 220617 [details]
patch
If we decide it should behave like SVG and fit inside the box, this patch will do.
Attachment 220617 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp:139: Use std::min() or std::min<type>() instead of the MIN() macro. [runtime/max_min_macros] [4]
Total errors found: 1 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 220619 [details]
style
Comment on attachment 220619 [details]
style
Nice find!
This is really an "aspect-ratio fit" right? Do we have other code for that?
Created attachment 220754 [details]
new approach
Layout test in http://trac.webkit.org/changeset/161581 |