[Webkit-unassigned] [Bug 141877] Web Inspector: split out CSSAgent wrapper classes to fix protocol layering violation and cruft

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 24 13:50:10 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=141877

Brian Burg <burg at cs.washington.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #247080|0                           |1
        is obsolete|                            |

--- Comment #5 from Brian Burg <burg at cs.washington.edu> ---
Created attachment 247264
  --> https://bugs.webkit.org/attachment.cgi?id=247264&action=review
WIP 2

The latest WIP patch is pretty close to the design I wanted. The main difference from ToT is that the protocol builders do less work digging for values. Instead that code is put in wrapper classes (StyleRule, StyleProperty, RuleSelector, etc) that can be used by other parts of the inspector backend. 

They are called 'wrappers' because they don't really own any data. At the top level, CSSAgent owns InlineStyleRuleSet's and StylesheetRuleSet's, which contain parsed data and strong refs to the CSSStyleSheet or Element. All other wrappers (styles, rules, selectors) are facades on top of the RuleSet's parsed source data and the relevant CSSOM objects.

To minimize unnecessary refcounting and cycles, wrappers are noncopyable, stack allocated views only accessible through lambdas/functor interfaces. It's better to show what I mean with examples, so I'll highlight a few interesting lines.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150224/6d745fbd/attachment-0002.html>


More information about the webkit-unassigned mailing list