WebCore:
Fixed: <rdar://problem/
3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled
Reviewed by kocienda.
* khtml/editing/htmlediting.cpp:
(khtml::ApplyStyleCommand::addInlineStyleIfNeeded): don't set class on element returned by createStyleSpanElement since that's already done
(khtml::ReplacementFragment::ReplacementFragment): take matchStyle param, don't call computeStylesAndRemoveUnrendered() if !matchStyle
(khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take matchStyle param
(khtml::ReplaceSelectionCommand::doApply): if m_matchStyle, use selection.start() as the insertion position and don't call applyStyleToInsertedNodes()
* khtml/editing/htmlediting.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): take matchStyle param and pass it
(-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): pass NO for matchStyle
(-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): pass NO for matchStyle
(-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): pass YES for matchStyle
WebKit:
Fixed: <rdar://problem/
3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled
Reviewed by kocienda.
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for matchStyle to replaceSelection
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]): return new chosePlainText parameter
(-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass chosePlainText for matchStyle to replaceSelection
(-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8632
268f45cc-cd09-0410-ab3c-
d52691b4dbfc