Get rid of Position::computedStyle
[WebKit-https.git] / Source / WebCore / editing / EditingStyle.cpp
index 3ffdd812f4d6ab5600acb6543b6da457d4f5ce3a..9747446e09a534fb06fc5f573d944f201d1ed29d 100644 (file)
@@ -1338,7 +1338,12 @@ StyleChange::StyleChange(EditingStyle* style, const Position& position)
     if (!style || !style->style() || !document || !document->frame())
         return;
 
-    RefPtr<CSSComputedStyleDeclaration> computedStyle = position.computedStyle();
+    Node* node = position.containerNode();
+    if (!node)
+        return;
+
+    RefPtr<CSSComputedStyleDeclaration> computedStyle = CSSComputedStyleDeclaration::create(node);
+
     // FIXME: take care of background-color in effect
     RefPtr<MutableStylePropertySet> mutableStyle = getPropertiesNotIn(style->style(), computedStyle.get());