<rdar://problem/
3856215> Cannot remove bold from the beginning of a message
Problem is that KHTMLPart::computeAndSetTypingStyle always looked upstream
for the existing style, but in this case (hitting cmd-B with caret at top of
file) there is nothing upstream. Changed this to use the VisiblePosition
deepEquivalent instead.
* khtml/khtml_part.cpp:
(KHTMLPart::computeAndSetTypingStyle):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-11-19 David Harrison <harrison@apple.com>
+
+ Reviewed by Ken and Darin.
+
+ <rdar://problem/3856215> Cannot remove bold from the beginning of a message
+
+ Problem is that KHTMLPart::computeAndSetTypingStyle always looked upstream
+ for the existing style, but in this case (hitting cmd-B with caret at top of
+ file) there is nothing upstream. Changed this to use the VisiblePosition
+ deepEquivalent instead.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::computeAndSetTypingStyle):
+
=== Safari-172 ===
2004-11-19 Maciej Stachowiak <mjs@apple.com>
mutableStyle = typingStyle();
mutableStyle->ref();
}
- CSSComputedStyleDeclarationImpl computedStyle(selection().start().upstream(StayInBlock).node());
+
+ NodeImpl *node = VisiblePosition(selection().start()).deepEquivalent().node();
+ CSSComputedStyleDeclarationImpl computedStyle(node);
computedStyle.diff(mutableStyle);
// Handle block styles, substracting these from the typing style.