diff --git a/mozilla/layout/inspector/src/inDOMUtils.cpp b/mozilla/layout/inspector/src/inDOMUtils.cpp index 002d1df8d46..f6ced0b3d30 100644 --- a/mozilla/layout/inspector/src/inDOMUtils.cpp +++ b/mozilla/layout/inspector/src/inDOMUtils.cpp @@ -86,12 +86,11 @@ inDOMUtils::GetStyleRules(nsIDOMElement *aElement, nsISupportsArray **_retval) // query to a content node nsCOMPtr content; content = do_QueryInterface(aElement); - - nsIFrame* frame = nsnull; nsCOMPtr styleContext; - nsresult rv = shell->GetPrimaryFrameFor(content, &frame); - if (NS_FAILED(rv) || !frame) return rv; - shell->GetStyleContextFor(frame, getter_AddRefs(styleContext)); + + nsresult rv = mCSSUtils->GetStyleContextForContent(shell, content, + getter_AddRefs(styleContext)); + if (NS_FAILED(rv) || !styleContext) return rv; // create a resource for all the style rules from the