Bug 77745 - Shareable stylesheet data structures
Summary: Shareable stylesheet data structures
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 95219 76827 76848 76904 77299 77421 77460 77475 77545 77621 77700 77740 77779 78257 78406 78452 78589 78662 79092 79763 79910 82127 82149 82242 82332 82384 82490 82728 82774 82832 82847 83426 83612 83998 84632 84716 84752 84882 84956 84969 85004 85598 94926
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-03 09:26 PST by Antti Koivisto
Modified: 2012-08-28 11:08 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2012-02-03 09:26:53 PST
To improve performance and save memory we should make stylesheet data structures cacheable in the memory cache and shareable between documents.
Comment 1 Antti Koivisto 2012-02-03 09:41:00 PST
<rdar://problem/10217321>
Comment 2 Antti Koivisto 2012-02-03 09:43:01 PST
Related bunch of recent bugs towards this goal.
Comment 3 Eric Seidel (no email) 2012-04-15 21:03:49 PDT
Interesting.  I'm attempting to "share" stylesheets between documents for <iframe seamless>:
https://github.com/eseidel/webkit/compare/master...seamless#L61R423

I wonder if I'm getting myself in trouble. :)
Comment 4 Antti Koivisto 2012-04-16 09:59:00 PDT
(In reply to comment #3)
> Interesting.  I'm attempting to "share" stylesheets between documents for <iframe seamless>:
> https://github.com/eseidel/webkit/compare/master...seamless#L61R423
> 
> I wonder if I'm getting myself in trouble. :)

That is going to be bit tricky. Stylesheets can mutate, the style selectors in the sharing child frames will need to be reset too. They hold raw pointers so this must happen synchronously.

Should still be doable.
Comment 5 Eric Seidel (no email) 2012-04-16 14:06:02 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Interesting.  I'm attempting to "share" stylesheets between documents for <iframe seamless>:
> > https://github.com/eseidel/webkit/compare/master...seamless#L61R423
> > 
> > I wonder if I'm getting myself in trouble. :)
> 
> That is going to be bit tricky. Stylesheets can mutate, the style selectors in the sharing child frames will need to be reset too. They hold raw pointers so this must happen synchronously.
> 
> Should still be doable.

Yes, I need to find wherver the CSSStyleSelector is reset on the parent(s) and make sure all seamless iframe documents also recalc their selectors at that time.  If you have suggestions for specific methods I should hack into, I'm all ears (we can also discuss this on a different bug).