Changeset 71252 in webkit


Ignore:
Timestamp:
Nov 3, 2010 11:29:56 AM (13 years ago)
Author:
tony@chromium.org
Message:

2010-11-03 Tony Chang <tony@chromium.org>

Reviewed by Ojan Vafai.

Undo r54932 which inappropriately adjusts font sizes on zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=48890

When copying zoomed text, we used to write to the clipboard the zoomed
font size. r54932 worked around this at paste time by scaling the
font size based on the zoom.

In r67568, Erik fixed getComputedStyle to return the original value
rather than the zoomed font size. This makes the work around added
by r54932 unnecessary.

The code in r54932 was busted in the first place since it only worked
when in quirks mode since it didn't add units to the font size.

  • editing/inserting/page-zoom-font-size-expected.txt: Added.
  • editing/inserting/page-zoom-font-size.html: Added.

2010-11-03 Tony Chang <tony@chromium.org>

Reviewed by Ojan Vafai.

Undo r54932 which inappropriately adjusts font sizes on zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=48890

Test: editing/inserting/page-zoom-font-size.html

  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r71249 r71252  
     12010-11-03  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Undo r54932 which inappropriately adjusts font sizes on zoomed pages
     6        https://bugs.webkit.org/show_bug.cgi?id=48890
     7
     8        When copying zoomed text, we used to write to the clipboard the zoomed
     9        font size.  r54932 worked around this at paste time by scaling the
     10        font size based on the zoom.
     11
     12        In r67568, Erik fixed getComputedStyle to return the original value
     13        rather than the zoomed font size.  This makes the work around added
     14        by r54932 unnecessary.
     15
     16        The code in r54932 was busted in the first place since it only worked
     17        when in quirks mode since it didn't add units to the font size.
     18
     19        * editing/inserting/page-zoom-font-size-expected.txt: Added.
     20        * editing/inserting/page-zoom-font-size.html: Added.
     21
    1222010-11-03  Adam Roben  <aroben@apple.com>
    223
  • trunk/WebCore/ChangeLog

    r71251 r71252  
     12010-11-03  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Undo r54932 which inappropriately adjusts font sizes on zoomed pages
     6        https://bugs.webkit.org/show_bug.cgi?id=48890
     7
     8        Test: editing/inserting/page-zoom-font-size.html
     9
     10        * editing/ReplaceSelectionCommand.cpp:
     11        (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
     12
    1132010-11-03  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/WebCore/editing/ReplaceSelectionCommand.cpp

    r69987 r71252  
    485485            if (e->renderer() && e->renderer()->style()->floating() != FNONE)
    486486                e->getInlineStyleDecl()->setProperty(CSSPropertyFloat, CSSValueNone);
    487 
    488             // Undo the effects of page zoom if we have an absolute font size.  When we copy, we
    489             // compute the new font size as an absolute size so pasting will cause the zoom to be
    490             // applied twice.
    491             if (e->renderer() && e->renderer()->style() && e->renderer()->style()->effectiveZoom() != 1.0
    492                 && e->renderer()->style()->fontDescription().isAbsoluteSize()) {
    493                 float newSize = e->renderer()->style()->fontDescription().specifiedSize() / e->renderer()->style()->effectiveZoom();
    494                 ExceptionCode ec = 0;
    495                 e->style()->setProperty(CSSPropertyFontSize, String::number(newSize), false, ec);
    496                 ASSERT(!ec);
    497             }
    498487        }
    499488        if (node == m_lastLeafInserted)
Note: See TracChangeset for help on using the changeset viewer.