Bug 48890

Summary: Undo r54932 which inappropriately adjusts font sizes on zoomed pages
Product: WebKit Reporter: Tony Chang <tony>
Component: New BugsAssignee: Tony Chang <tony>
Status: RESOLVED FIXED    
Severity: Normal CC: arv, eric, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch ojan: review+

Description Tony Chang 2010-11-02 17:34:12 PDT
Undo r54932 which inappropriately adjusts font sizes on zoomed pages
Comment 1 Tony Chang 2010-11-02 17:37:01 PDT
Created attachment 72776 [details]
Patch
Comment 2 Erik Arvidsson 2010-11-02 22:09:30 PDT
Comment on attachment 72776 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72776&action=review

> LayoutTests/editing/pasteboard/page-zoom2.html:26
> +        document.getElementById("target").innerHTML.toString();

innerHTML is already a string
Comment 3 Ryosuke Niwa 2010-11-02 23:57:01 PDT
Comment on attachment 72776 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72776&action=review

> LayoutTests/editing/pasteboard/page-zoom2.html:23
> +    execPasteCommand();

Doesn't document.execCommand("insertHTML", false, "<span style="font-size: 16px" id="test">This font is size 16px.</span>") also work?
Comment 4 Ojan Vafai 2010-11-03 07:39:20 PDT
Comment on attachment 72776 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72776&action=review

Removing paste hacks is awesome! The copy-paste code is far too complicated.

> LayoutTests/editing/pasteboard/page-zoom2.html:15
> +        eventSender.zoomPageIn();

I think you can just set CSS zoom on the body element and get the same effect. That way, you don't need to zoom out at the end and this test is closer to being able to run in other browsers. It also simplifies running the test manualy.
Comment 5 Tony Chang 2010-11-03 11:30:14 PDT
Committed r71252: <http://trac.webkit.org/changeset/71252>
Comment 6 Tony Chang 2010-11-03 11:31:45 PDT
(In reply to comment #5)
> Committed r71252: <http://trac.webkit.org/changeset/71252>

Before landing I made the following test changes:
- Removed toString() calls and used local variables for nodes.
- Switched to insertHTML (had to fake an apple style span)
- Used css zoom instead.
- Moved the test to editing/inserting since it no longer involved pasting.