Title: [105908] trunk
Revision
105908
Author
[email protected]
Date
2012-01-25 12:07:55 -0800 (Wed, 25 Jan 2012)

Log Message

WebView should implement typingAttributes methods to work correctly with the Inspector bar in Mail.
https://bugs.webkit.org/show_bug.cgi?id=76951
<rdar://problem/9325158>

Reviewed by Alexey Proskuryakov.

Source/WebKit/mac: 

* WebView/WebHTMLView.mm: Removed typingAttributes implementation.
* WebView/WebView.mm:
(-[WebView typingAttributes]): Added.

Tools: 

* TestWebKitAPI/Tests/mac/InspectorBar.mm: Modified to reflect the changes to WebView
and WebHTMLView.
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (105907 => 105908)


--- trunk/Source/WebKit/mac/ChangeLog	2012-01-25 20:03:45 UTC (rev 105907)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-01-25 20:07:55 UTC (rev 105908)
@@ -1,3 +1,15 @@
+2012-01-25  Enrica Casucci  <[email protected]>
+
+        WebView should implement typingAttributes methods to work correctly with the Inspector bar in Mail.
+        https://bugs.webkit.org/show_bug.cgi?id=76951
+        <rdar://problem/9325158>
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebView/WebHTMLView.mm: Removed typingAttributes implementation.
+        * WebView/WebView.mm:
+        (-[WebView typingAttributes]): Added.
+
 2012-01-24  Enrica Casucci  <[email protected]>
 
         WebHTMLView should implement typingAttributes methods to work correctly with the Inspector bar in Mail.

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (105907 => 105908)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2012-01-25 20:03:45 UTC (rev 105907)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2012-01-25 20:07:55 UTC (rev 105908)
@@ -5686,15 +5686,6 @@
     return result;
 }
 
-- (NSDictionary *)typingAttributes
-{
-    Frame* coreFrame = core([self _frame]);
-    if (coreFrame)
-        return coreFrame->editor()->fontAttributesForSelectionStart();
-
-    return nil;
-}
-
 - (NSAttributedString *)attributedSubstringFromRange:(NSRange)nsRange
 {
     [self _executeSavedKeypressCommands];

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (105907 => 105908)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2012-01-25 20:03:45 UTC (rev 105907)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2012-01-25 20:07:55 UTC (rev 105908)
@@ -5537,6 +5537,16 @@
     [self _performResponderOperation:_cmd with:text];
 }
 
+- (NSDictionary *)typingAttributes
+{
+    Frame* coreFrame = core([self _selectedOrMainFrame]);
+    if (coreFrame)
+        return coreFrame->editor()->fontAttributesForSelectionStart();
+    
+    return nil;
+}
+
+
 @end
 
 @implementation WebView (WebViewEditingInMail)

Modified: trunk/Tools/ChangeLog (105907 => 105908)


--- trunk/Tools/ChangeLog	2012-01-25 20:03:45 UTC (rev 105907)
+++ trunk/Tools/ChangeLog	2012-01-25 20:07:55 UTC (rev 105908)
@@ -1,3 +1,15 @@
+2012-01-25  Enrica Casucci  <[email protected]>
+
+        WebView should implement typingAttributes methods to work correctly with the Inspector bar in Mail.
+        https://bugs.webkit.org/show_bug.cgi?id=76951
+        <rdar://problem/9325158>
+
+        Reviewed by Alexey Proskuryakov.
+
+        * TestWebKitAPI/Tests/mac/InspectorBar.mm: Modified to reflect the changes to WebView
+        and WebHTMLView.
+        (TestWebKitAPI::TEST):
+
 2012-01-23  MORITA Hajime  <[email protected]>
 
         [Refactoring][Internals] Should have InternalSettings

Modified: trunk/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm (105907 => 105908)


--- trunk/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm	2012-01-25 20:03:45 UTC (rev 105907)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm	2012-01-25 20:07:55 UTC (rev 105908)
@@ -63,8 +63,8 @@
     DOMDocument *document = webView.get().mainFrameDocument;
     [[document body] focus];
     
-    EXPECT_TRUE([[[[webView.get() mainFrame] frameView] documentView] respondsToSelector:@selector(typingAttributes)]);
-    NSDictionary *attributes = [(id)[[[webView.get() mainFrame] frameView] documentView] typingAttributes];
+    EXPECT_TRUE([webView.get() respondsToSelector:@selector(typingAttributes)]);
+    NSDictionary *attributes = [(id)webView.get() typingAttributes];
     [(id)[[[webView.get() mainFrame] frameView] documentView] doCommandBySelector:@selector(bold:)];
     EXPECT_FALSE([attributes isEqual:[(id)[[[webView.get() mainFrame] frameView] documentView] typingAttributes]]);
     
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to