[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:58:22 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit c852ef6debd2edf53bfb4d175e917ba52f06e79e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 27 05:46:06 2009 +0000

    2009-11-26  Kinuko Yasuda  <kinuko at chromium.com>
    
            Reviewed by Eric Seidel.
    
            Remove the special charset meta tag in the clipboard so that
            copy-and-paste with interchange breaklines/spaces works correctly
            within WebKit.
    
            No new tests.  Layout tests that involve copy-and-paste with
            interchange breaklines (like editing/pasteboard/paste-line-endings-00?)
            should pass on Mac/Chromium with this fix.
    
            * platform/chromium/ClipboardChromium.cpp:
            * platform/chromium/PasteboardChromium.cpp:
            (WebCore::Pasteboard::documentFragment):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51426 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6175499..3903f76 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-26  Kinuko Yasuda  <kinuko at chromium.com>
+
+        Reviewed by Eric Seidel.
+
+        Remove the special charset meta tag in the clipboard so that
+        copy-and-paste with interchange breaklines/spaces works correctly
+        within WebKit.
+
+        No new tests.  Layout tests that involve copy-and-paste with
+        interchange breaklines (like editing/pasteboard/paste-line-endings-00?)
+        should pass on Mac/Chromium with this fix.
+
+        * platform/chromium/ClipboardChromium.cpp:
+        * platform/chromium/PasteboardChromium.cpp:
+        (WebCore::Pasteboard::documentFragment):
+
 2009-11-26  İsmail Dönmez  <ismail at namtrac.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp
index d330d3b..1a2caa4 100644
--- a/WebCore/platform/chromium/ClipboardChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardChromium.cpp
@@ -354,7 +354,7 @@ void ClipboardChromium::writeRange(Range* selectedRange, Frame* frame)
     m_dataObject->textHtml = createMarkup(selectedRange, 0,
         AnnotateForInterchange);
 #if PLATFORM(DARWIN)
-    m_dataObject->textHtml = String("<meta charset='utf-8'>") + m_dataObject->textHtml;
+    m_dataObject->textHtml = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + m_dataObject->textHtml;
 #endif
     m_dataObject->htmlBaseUrl = frame->document()->url();
 
diff --git a/WebCore/platform/chromium/PasteboardChromium.cpp b/WebCore/platform/chromium/PasteboardChromium.cpp
index 4929eb8..ce06e55 100644
--- a/WebCore/platform/chromium/PasteboardChromium.cpp
+++ b/WebCore/platform/chromium/PasteboardChromium.cpp
@@ -83,7 +83,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
 {
     String html = createMarkup(selectedRange, 0, AnnotateForInterchange);
 #if PLATFORM(DARWIN)
-    html = String("<meta charset='utf-8'>") + html;
+    html = String("<meta charset='utf-8' id='webkit-interchange-charset'>") + html;
 #endif
     ExceptionCode ec = 0;
     KURL url = selectedRange->startContainer(ec)->document()->url();
@@ -170,6 +170,11 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
         String markup;
         KURL srcURL;
         ChromiumBridge::clipboardReadHTML(buffer, &markup, &srcURL);
+#if PLATFORM(DARWIN)
+        DEFINE_STATIC_LOCAL(const String, forceUtf8String, ("<meta charset='utf-8' id='webkit-interchange-charset'>"));
+        if (markup.startsWith(forceUtf8String))
+            markup = markup.substring(forceUtf8String.length());
+#endif
 
         RefPtr<DocumentFragment> fragment =
             createFragmentFromMarkup(frame->document(), markup, srcURL);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list