Inspector is using CSSStyleSelector to calculate the CSS rules matched by a given element and expects to be able to walk the parent chain. After 82728 the stylesheet object tree won't have parent pointers and we are going to need another mechanism to support this.
Created attachment 135012 [details] patch
Comment on attachment 135012 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=135012&action=review > Source/WebCore/ChangeLog:3 > + Add mechanism for mapping from StyleRules back to fully constructed CSSStyleRules NO BUG NUMBER R- BRO
Created attachment 135013 [details] with bug url
Attachment 135013 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/css/CSSStyleSelector.cpp:2927: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 135013 [details] with bug url View in context: https://bugs.webkit.org/attachment.cgi?id=135013&action=review > Source/WebCore/css/CSSStyleSelector.cpp:292 > +static CSSStyleSheet* fullscreenStyleSheet; fullScreenStylesheet; > Source/WebCore/css/CSSStyleSelector.h:495 > + HashMap<StyleRule*, RefPtr<CSSStyleRule> > m_styleRuleToCSSOMWrapperMap; Style: Two spaces after >.
Comment on attachment 135013 [details] with bug url TD;DR
Would it make sense to just switch the inspector to using the internal representation?
(In reply to comment #7) > Would it make sense to just switch the inspector to using the internal representation? Sure but that's a separate refactoring. It also doesn't solve this particular problem.
Comment on attachment 135013 [details] with bug url View in context: https://bugs.webkit.org/attachment.cgi?id=135013&action=review r=me. Let's do this thing. > Source/WebCore/css/CSSStyleSelector.cpp:2905 > + const Vector<RefPtr<StyleSheet> >& styleSheets = document->styleSheets()->vector(); > + for (unsigned i = 0; i < styleSheets.size(); ++i) { You could use the iteration helpers of StyleSheetList directly here instead of grabbing the Vector. NABD. > Source/WebCore/css/CSSStyleSelector.h:247 > + CSSStyleRule* ensureFullCSSOMWrapperForStyleRule(StyleRule*); As you mentioned, this could do with a scarier name, e.g ensureFullCSSOMWrapperForInspectorWhileUsingTerabytesOfMemory().
http://trac.webkit.org/changeset/112858