@geastack/engine 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -425,8 +425,8 @@ void mountIfNeeded()
425
425
  // the parent's padding from our offsets — negative Left/Top
426
426
  // cancels the inset.
427
427
  const Node &parent = tree.node(tree.mountedRoot());
428
- const int padTop = parent.style.padding[0];
429
- const int padLeft = parent.style.padding[3];
428
+ const int padTop = parent.computedStyle().padding[0];
429
+ const int padLeft = parent.computedStyle().padding[3];
430
430
 
431
431
  const KbMetrics m = kbMetrics();
432
432
  // Float the keyboard above any reserved bottom overlay (home button)
@@ -702,16 +702,16 @@ void applyAppResize()
702
702
  gState.savedStyleCount = 0;
703
703
  // Snapshot every computed value we are about to overwrite before the
704
704
  // first setStyle lands, so none of them is read back post-mutation.
705
- const int prevHeight = n.style.height;
706
- const int prevFlex = n.style.flex;
705
+ const int prevHeight = n.computedStyle().height;
706
+ const int prevFlex = n.computedStyle().flex;
707
707
  #if GEA_CSS_OVERFLOW_AXES
708
- const int prevOverflowY = n.style.overflow_y;
708
+ const int prevOverflowY = n.computedStyle().overflow_y;
709
709
  #else
710
- const int prevOverflowY = n.style.overflow;
710
+ const int prevOverflowY = n.computedStyle().overflow;
711
711
  #endif
712
- const int prevPosition = n.style.position;
713
- const int prevTop = GEA_CSS_POSITION_PX_0(n.style);
714
- const int prevLeft = GEA_CSS_POSITION_PX_3(n.style);
712
+ const int prevPosition = n.computedStyle().position;
713
+ const int prevTop = GEA_CSS_POSITION_PX_0(n.computedStyle());
714
+ const int prevLeft = GEA_CSS_POSITION_PX_3(n.computedStyle());
715
715
  const int viewportH = tree.mountedHeight();
716
716
  // Available vertical space between the top of this node (set by
717
717
  // previous siblings' heights during the most recent layout pass)
@@ -728,8 +728,8 @@ void applyAppResize()
728
728
  // band of the old screen. Absolute takes it out of the parent's flow so
729
729
  // it cannot move; restore puts the original position styles back.
730
730
  const Node &parentNode = tree.node(n.parent >= 0 ? n.parent : target);
731
- const int pinTop = n.layout.y - parentNode.layout.y - parentNode.style.padding[0];
732
- const int pinLeft = n.layout.x - parentNode.layout.x - parentNode.style.padding[3];
731
+ const int pinTop = n.layout.y - parentNode.layout.y - parentNode.computedStyle().padding[0];
732
+ const int pinLeft = n.layout.x - parentNode.layout.x - parentNode.computedStyle().padding[3];
733
733
  pinStyle(tree, target, Property::Position, prevPosition, 1);
734
734
  pinStyle(tree, target, Property::Top, prevTop, pinTop);
735
735
  pinStyle(tree, target, Property::Left, prevLeft, pinLeft);