MCPcopy Create free account
hub / github.com/beginner-jhj/mini_browser / create_cssom

Function create_cssom

src/css/css_parser.cpp:140–148  ·  view source on GitHub ↗

* \brief Creates a CSSOM (CSS Object Model) from parsed CSS rules. * * Parses a CSS string and creates a CSSOM object containing all CSS rules * for later matching against DOM nodes. * * \param css The CSS text to parse. * \return A CSSOM object containing the parsed CSS rules. */

Source from the content-addressed store, hash-verified

138 * \return A CSSOM object containing the parsed CSS rules.
139 */
140CSSOM create_cssom(const std::string &css)
141{
142 CSSOM cssom;
143 for (auto &rule : parse_css(css))
144 {
145 cssom.add_rule(rule);
146 }
147 return cssom;
148}
149
150/**
151 * \brief Parses CSS source text into an array of CSS rules.

Callers 1

renderMethod · 0.85

Calls 2

parse_cssFunction · 0.85
add_ruleMethod · 0.80

Tested by

no test coverage detected