WebCore:
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3655241> setTypingStyle: does not set the real typing style, and typingStyle does not return it
* khtml/khtml_part.cpp:
(KHTMLPart::computeAndSetTypingStyle): New helper that does the work of reducing a passed-in style
declaration given the current selection, and then sets the minimum necessary style as the typing
style on the part.
(KHTMLPart::applyStyle): Call new computeAndSetTypingStyle. The guts of computeAndSetTypingStyle used
to be here in the selection-as-caret case. But now [WebCoreBridge setTypingStyle:] needs this code
as well.
* khtml/khtml_part.h: Declare new computeAndSetTypingStyle() function.
* kwq/WebCoreBridge.h: Declare new typingStyle and setTypingStyle: methods.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge typingStyle]): Calls through to the part to retrieve the typing style.
(-[WebCoreBridge setTypingStyle:]): Calls through to the part to set the typing style.
WebKit:
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3655241> setTypingStyle: does not set the real typing style, and typingStyle does not return it
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge respondToChangedContents]): No longer call through to WebKit to set the typing style. The call
was part of the misguided use of the setTypingStyle: and typingStyle as a cache of what was stored on
the WebCore side.
(-[WebBridge respondToChangedSelection]): Ditto.
* WebView.subproj/WebView.m:
(-[WebViewPrivate dealloc]): Object no longer has typingStyle ivar.
(-[WebView setTypingStyle:]): Call over the bridge to set typing style.
(-[WebView typingStyle]): Call over the bridge to retrieve typing style.
* WebView.subproj/WebViewInternal.h: Object no longer has typingStyle ivar.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8047
268f45cc-cd09-0410-ab3c-
d52691b4dbfc