Unstanding StyleSheet

63 views
Skip to first unread message

kalyani Shinde

unread,
Oct 4, 2023, 11:28:00 AM10/4/23
to blink-dev
Hi Team,

I am new to blink and I want to understand how and when css computation is done for every node and how to serialize that computed values. By computation I mean, after applying all possible rules apply to that node(own style, external style, insert rule, parent style, Pseudo element styles, Css Pseudo Elements etc).


I am trying to find one point in code from where I can pick final style for any node. also want to capture the updates of style for that node may be from same point in code or different. 

And if there is no single point from where I can get it, then can I have one point(class) from where I get all css_rules as vector for any document (Initial after parsing and all updates through various ways like insertRule, innerHtml change for style node etc)

Things I have already referred are as follows but couldn't identify linking after FrameLoader::FinishedParsing().

uazo

unread,
Oct 5, 2023, 11:51:02 AM10/5/23
to blink-dev, kalyani Shinde
I'll join the request, if possible and if I am not in the way, it's something I'm also interested in.

>  I am trying to find one point in code from where I can pick final style for any node.

As far as I understood from reading the code, the correct point should be StyleAdjuster::AdjustComputedStyle.

if I may, I would also like to understand the difference between GetComputedStyle() and GetLayoutObject()->Style().

Thanks
Reply all
Reply to author
Forward
0 new messages