Bug 127381 - REGRESSION (r161580): Some PDFs render outside their <img>
Summary: REGRESSION (r161580): Some PDFs render outside their <img>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-21 16:22 PST by Tim Horton
Modified: 2014-01-21 17:30 PST (History)
5 users (show)

See Also:


Attachments
patch (2.56 KB, patch)
2014-01-21 16:25 PST, Tim Horton
simon.fraser: review+
thorton: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-01-21 16:22:57 PST
In r161580, I made an adjustment to how we choose the final scale for PDF-in-<img>, to fix unexpected non-uniform scaling due to integer rounding at layout/paint time. Two issues with this:

1. It was happening for all PDFs, even if they had equal scale.
2. It was using the average of the endpoints of the intersection of the possible integer-rounded scale ranges, which is usually greater than the minimum original scale, which means that sometimes the scale we chose would cause the image to be painted outside of the bounds of the <img>.

This broke icons in the Web Inspector on a branch where we have r161580 but the Inspector icons are still PDF (not true on ToT).

<rdar://problem/15872168>
Comment 1 Tim Horton 2014-01-21 16:25:07 PST
Created attachment 221805 [details]
patch
Comment 2 Tim Horton 2014-01-21 17:29:23 PST
Comment on attachment 221805 [details]
patch

Gonna land it by hand.
Comment 3 Tim Horton 2014-01-21 17:30:01 PST
http://trac.webkit.org/changeset/162486