From c61ba654b0d90673d3a1422f91e345d2c8799e79 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 17 May 2006 02:33:57 +0000 Subject: [PATCH] Fix the "style rules" display for display:table elements. Bug 122557, r=caillon, sr=hewitt git-svn-id: svn://10.0.0.236/trunk@197455 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/inspector/src/inDOMUtils.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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