Bug 34914 - copy-pasted text with font-size and full-page-zoom gets too large
Summary: copy-pasted text with font-size and full-page-zoom gets too large
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-12 17:29 PST by Ojan Vafai
Modified: 2010-11-02 10:53 PDT (History)
3 users (show)

See Also:


Attachments
testcase (230 bytes, text/html)
2010-02-12 17:29 PST, Ojan Vafai
no flags Details
Patch (5.28 KB, patch)
2010-02-14 23:11 PST, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2010-02-12 17:29:47 PST
Created attachment 48683 [details]
testcase

See the test case. Also, chromium bug with repro inside of gmail: http://code.google.com/p/chromium/issues/detail?id=22804
Comment 1 Tony Chang 2010-02-14 21:09:10 PST
(In reply to comment #0)
> Created an attachment (id=48683) [details]
> testcase
> 
> See the test case. Also, chromium bug with repro inside of gmail:
> http://code.google.com/p/chromium/issues/detail?id=22804

There are some differences here with Firefox.  Here's an example using font-size rather than zoom:
http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20contenteditable%3Dtrue%3E%3Cdiv%20style%3D%22font-size%3A%20200%25%22%3Eheading%3C%2Fdiv%3E%3Cdiv%3Eregular%20text%3C%2Fdiv%3E%0A%3Cdiv%3Emore%20text%3C%2Fdiv%3E%0A%3C%2Fdiv%3E&ohh=1&ohj=1&jt=&ojh=1&ojj=1&ms=100&oth=0&otj=0&cex=1

In Firefox, if you copy a few letters from heading and paste it into the lines below it, it matches the font size of where you're pasting into.  In WebKit, it matches the font size of the copied text.  WebKit seems to match TextEdit here.

I guess in this case, we want the pasted text to be the exact same size as what we copied.  This would be consistent with what WebKit does in the case of the different font-sizes.
Comment 2 Tony Chang 2010-02-14 23:11:43 PST
Created attachment 48741 [details]
Patch
Comment 3 Eric Seidel (no email) 2010-02-17 16:20:36 PST
Comment on attachment 48741 [details]
Patch

LGTM.
Comment 4 WebKit Commit Bot 2010-02-17 22:44:53 PST
Comment on attachment 48741 [details]
Patch

Clearing flags on attachment: 48741

Committed r54932: <http://trac.webkit.org/changeset/54932>
Comment 5 WebKit Commit Bot 2010-02-17 22:44:57 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Tony Chang 2010-02-17 23:30:36 PST
Committed r54935: <http://trac.webkit.org/changeset/54935>