[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tony at chromium.org tony at chromium.org
Wed Dec 22 15:26:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ff101615da873c6acf5c553853f9c6147954e155
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 3 18:29:56 2010 +0000

    2010-11-03  Tony Chang  <tony at 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 at 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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71252 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a6b7532..951121f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-03  Tony Chang  <tony at 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  Adam Roben  <aroben at apple.com>
 
         Add a plugin test that evaluates JS after removing the plugin element
diff --git a/LayoutTests/editing/inserting/page-zoom-font-size-expected.txt b/LayoutTests/editing/inserting/page-zoom-font-size-expected.txt
new file mode 100644
index 0000000..32be72d
--- /dev/null
+++ b/LayoutTests/editing/inserting/page-zoom-font-size-expected.txt
@@ -0,0 +1,7 @@
+Test to make sure that pasting text with a font size into a quirks mode document that is zoomed does not alter the font size.
+
+Paste Here:This font is size 16px.
+Paste Here:<span style="font-size: 16px; " class="Apple-style-span">This font is size 16px.</span>
+document.compatMode: BackCompat
+PASS
+
diff --git a/LayoutTests/editing/inserting/page-zoom-font-size.html b/LayoutTests/editing/inserting/page-zoom-font-size.html
new file mode 100644
index 0000000..31371ec
--- /dev/null
+++ b/LayoutTests/editing/inserting/page-zoom-font-size.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML FORCE QUIRKSMODE>
+<body style="zoom: 200%">
+<p style="font-size:16px">Test to make sure that pasting text with a font size into a quirks mode
+document that is zoomed does not alter the font size.</p>
+<div contentEditable="true" id="test">Paste Here: </div>
+<div id="results"></div>
+</body>
+<script src="../editing.js"></script>
+<script>
+function editingTest()
+{
+    var target = document.getElementById("test");
+    var selection = window.getSelection();
+    selection.setPosition(target, 12);
+    document.execCommand("insertHTML", false, "<span style='font-size: 16px' class='Apple-style-span'>This font is size 16px.</span>");
+
+    var results = document.getElementById("results");
+
+    results.innerText = target.innerHTML;
+
+    results.innerHTML += "<br>document.compatMode: " + document.compatMode;
+    if (target.innerHTML.indexOf("font-size: 16px") == -1) {
+        results.innerHTML += "<br>FAIL";
+    } else
+        results.innerHTML += "<br>PASS";
+}
+
+runDumpAsTextEditingTest(false);
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0a1f2bb..f08d1e0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-03  Tony Chang  <tony at 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):
+
 2010-11-03  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Dave Hyatt.
diff --git a/WebCore/editing/ReplaceSelectionCommand.cpp b/WebCore/editing/ReplaceSelectionCommand.cpp
index 056ab70..53ab70f 100644
--- a/WebCore/editing/ReplaceSelectionCommand.cpp
+++ b/WebCore/editing/ReplaceSelectionCommand.cpp
@@ -484,17 +484,6 @@ void ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance()
                 e->getInlineStyleDecl()->setProperty(CSSPropertyDisplay, CSSValueInline);
             if (e->renderer() && e->renderer()->style()->floating() != FNONE)
                 e->getInlineStyleDecl()->setProperty(CSSPropertyFloat, CSSValueNone);
-
-            // Undo the effects of page zoom if we have an absolute font size.  When we copy, we
-            // compute the new font size as an absolute size so pasting will cause the zoom to be
-            // applied twice.
-            if (e->renderer() && e->renderer()->style() && e->renderer()->style()->effectiveZoom() != 1.0
-                && e->renderer()->style()->fontDescription().isAbsoluteSize()) {
-                float newSize = e->renderer()->style()->fontDescription().specifiedSize() / e->renderer()->style()->effectiveZoom();
-                ExceptionCode ec = 0;
-                e->style()->setProperty(CSSPropertyFontSize, String::number(newSize), false, ec);
-                ASSERT(!ec);
-            }
         }
         if (node == m_lastLeafInserted)
             break;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list