Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 07:03:55 +0000 (07:03 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 07:03:55 +0000 (07:03 +0000)
        - fixed <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectionStartFontAttributesAsRTF]): Changed to call new bridge method
        named fontAttributesForSelectionStart, deleted the method this used to use, and renamed
        this to have the word "start" in it.
        (-[WebHTMLView copyFont:]): Updated for name change.

        * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7760 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/English.lproj/StringsNotToBeLocalized.txt
WebKit/WebView.subproj/WebHTMLView.m

index 0eb9548253c50aa9e221a5e2bd093e4d0247edd7..b3a30f06159e57dc979e5f93d7a12da403570171 100644 (file)
@@ -1,3 +1,17 @@
+2004-10-04  Darin Adler  <darin@apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView _selectionStartFontAttributesAsRTF]): Changed to call new bridge method
+        named fontAttributesForSelectionStart, deleted the method this used to use, and renamed
+        this to have the word "start" in it.
+        (-[WebHTMLView copyFont:]): Updated for name change.
+
+        * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
+
 2004-10-04  Chris Blumenberg  <cblu@apple.com>
 
         * WebView.subproj/WebFrameInternal.h: removed constant declarations that I committed by mistake
index 9eabbc487190f2b4d2894dac5d4cd9a2d52ea9e8..5c92cdd5e871ae0033b8909d9842846e709c0a91 100644 (file)
@@ -73,7 +73,6 @@
 "AppleKeyboardUIMode"
 "BP_CreatePluginMIMETypesPreferences"
 "BufferTextDrawing"
-"CFBundleVersion"
 "Cache-Control"
 "Content-Length"
 "Courier"
 "JoiningOther"
 "JoiningRight"
 "Joy!peff"
+"KWQScrollBar"
 "Library/Internet Plug-Ins"
 "List count: %d items\n"
 "List total size: %d bytes\n"
 "WebActionOriginalURLKey"
 "WebAuthenticationPanel"
 "WebBackForwardList:\n"
-"WebCurrentFrameState"
 "WebDataRequest"
 "WebElementDOMNode"
 "WebElementFrame"
 "WebElementLinkTitle"
 "WebElementLinkURL"
 "WebElementTargetFrame"
-"WebFrameStateChangedNotification"
 "WebFrameStateCommittedPage"
 "WebFrameStateComplete"
 "WebFrameStateLayoutAcceptable"
 "WebPluginTypeDescription"
 "WebPluginTypeEnabled"
 "WebPreferencesChangedNotification"
-"WebPreviousFrameState"
 "WebProgressEstimateChangedNotification"
 "WebProgressFinishedNotification"
 "WebProgressStartedNotification"
 "com.apple.QuickTime Plugin.plugin"
 "com.apple.WebKit"
 "com.apple.hiview"
+"com.apple.qtcocoaplugin"
 "com.apple.universalaccess"
 "com.microsoft.WMP.defaultplugin"
 "destination-atop"
@@ -379,6 +377,7 @@ Plugins.subproj/WebBasePluginPackage.m:"name: %@\npath: %@\nmimeTypes:\n%@\nplug
 Plugins.subproj/WebNetscapePluginPackage.m:"RealPlayer Plugin"
 Plugins.subproj/WebNetscapePluginPackage.m:"main"
 Plugins.subproj/WebPluginDatabase.m:"Java Applet Plugin Enabler"
+Plugins.subproj/WebPluginDocumentView.m:"type"
 WebCoreSupport.subproj/WebBridge.m:"height"
 WebCoreSupport.subproj/WebBridge.m:"width"
 WebCoreSupport.subproj/WebCookieAdapter.m:"Cookie"
@@ -422,3 +421,4 @@ WebView.subproj/WebPreferences.m:"Values"
 WebView.subproj/WebPreferences.m:"WebPreferences%d"
 WebView.subproj/WebRenderNode.m
 WebView.subproj/WebView.m:"Preferences"
+WebView.subproj/WebView.m:"control"
index 75571856e3e10e306ee0229d5f53a35ff89492a2..cb51b9a56238b8f6e5f5acad37bce98b47a21d92 100644 (file)
@@ -2980,18 +2980,10 @@ static WebHTMLView *lastHitView = nil;
     [self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES];
 }
 
-- (NSDictionary *)_selectionFontAttributes
+- (NSData *)_selectionStartFontAttributesAsRTF
 {
-    NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
-    NSFont *font = [[self _bridge] fontForSelection:NULL];
-    if (font != nil)
-        [dictionary setObject:font forKey:NSFontAttributeName];
-    return dictionary;
-}
-
-- (NSData *)_selectionFontAttributesAsRTF
-{
-    NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"x" attributes:[self _selectionFontAttributes]];
+    NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"x"
+        attributes:[[self _bridge] fontAttributesForSelectionStart]];
     NSData *data = [string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:nil];
     [string release];
     return data;
@@ -3172,7 +3164,7 @@ static WebHTMLView *lastHitView = nil;
     // Maybe later we should add a pasteboard type that contains CSS text for "native" copy and paste font.
     NSPasteboard *fontPasteboard = [NSPasteboard pasteboardWithName:NSFontPboard];
     [fontPasteboard declareTypes:[NSArray arrayWithObject:NSFontPboardType] owner:nil];
-    [fontPasteboard setData:[self _selectionFontAttributesAsRTF] forType:NSFontPboardType];
+    [fontPasteboard setData:[self _selectionStartFontAttributesAsRTF] forType:NSFontPboardType];
 }
 
 - (void)pasteFont:(id)sender