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

Method resolveFlexShrink

third-party/yoga/src/yoga/node/Node.cpp:440–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440float Node::resolveFlexShrink() const {
441 if (owner_ == nullptr) {
442 return 0.0;
443 }
444 if (style_.flexShrink().isDefined()) {
445 return style_.flexShrink().unwrap();
446 }
447 if (!config_->useWebDefaults() && style_.flex().isDefined() &&
448 style_.flex().unwrap() < 0.0f) {
449 return -style_.flex().unwrap();
450 }
451 return config_->useWebDefaults() ? Style::WebDefaultFlexShrink
452 : Style::DefaultFlexShrink;
453}
454
455bool Node::isNodeFlexible() {
456 return (

Callers 4

calculateFlexLineFunction · 0.80

Calls 3

useWebDefaultsMethod · 0.80
isDefinedMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected