MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / buildBoundingBox

Method buildBoundingBox

native/desc/reuse/ReuseState.cpp:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 void ReuseState::buildBoundingBox(const ElementPtr &element) {
31 if (element->getParent().expired() &&
32 !(element->getBounds() && element->getBounds()->isEmpty())) {
33 if (_sameRootBounds.get()->isEmpty() && element) {
34 _sameRootBounds = element->getBounds();
35 }
36 if (equals(_sameRootBounds, element->getBounds())) {
37 this->_rootBounds = _sameRootBounds;
38 } else
39 this->_rootBounds = element->getBounds();
40 }
41 }
42
43 void ReuseState::buildStateFromElement(WidgetPtr parentWidget, ElementPtr element) {
44 buildBoundingBox(element);

Callers

nothing calls this directly

Calls 5

equalsFunction · 0.85
getParentMethod · 0.45
getBoundsMethod · 0.45
isEmptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected