MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parse

Method parse

valdi/src/valdi/runtime/CSS/CSSDocument.cpp:145–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145Result<Ref<CSSDocument>> CSSDocument::parse(const ResourceId& resourceId,
146 const Byte* data,
147 size_t len,
148 AttributeIds& attributeIds) {
149 Valdi::StyleNode styleNodeRoot;
150
151 bool parsed = styleNodeRoot.ParseFromArray(data, static_cast<int>(len));
152 if (!parsed) {
153 return Error("Failed to parse CSS document");
154 }
155
156 return Valdi::makeShared<CSSDocument>(resourceId, styleNodeRoot, attributeIds);
157}
158
159VALDI_CLASS_IMPL(CSSDocument)
160

Callers 15

loadFromStringFunction · 0.45
loadFromBytesFunction · 0.45
precompileFunction · 0.45
imageInfoFunction · 0.45
imageConvertFunction · 0.45
pngquantFunction · 0.45
rewriteHeaderFunction · 0.45
rewriteImportFunction · 0.45
TESTFunction · 0.45
convertTypeReferencesFunction · 0.45
fetchUserMethod · 0.45

Calls 1

ErrorInterface · 0.50

Tested by 1

TESTFunction · 0.36