@geastack/engine 0.1.7 → 0.1.8
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.
- package/canvas.cpp +59 -24
- package/css/engine.h +1 -0
- package/package.json +4 -3
- package/ui/absolute_leaf_refresh.cpp +65 -52
- package/ui/core.cpp +4 -4
- package/ui/css_features.h +87 -0
- package/ui/document.cpp +11 -0
- package/ui/image_node.cpp +24 -24
- package/ui/input.cpp +24 -24
- package/ui/input_render.cpp +27 -27
- package/ui/internal.h +22 -0
- package/ui/layout.cpp +771 -573
- package/ui/layout_snapshot.cpp +1 -1
- package/ui/node_features.h +18 -0
- package/ui/node_lifecycle.cpp +167 -1
- package/ui/node_model.h +216 -56
- package/ui/node_text.h +2 -0
- package/ui/refresh_perf.h +19 -17
- package/ui/render.cpp +203 -189
- package/ui/renderer_features.h +5 -0
- package/ui/root_scroll_refresh.cpp +65 -65
- package/ui/storage_usage.h +45 -0
- package/ui/style.cpp +432 -146
- package/ui/style_values.h +2 -2
- package/ui/text.cpp +151 -153
- package/ui/tree_events.cpp +86 -0
- package/ui/tree_events.h +16 -0
- package/ui/tree_nodes.cpp +21 -17
- package/ui/tree_render.cpp +127 -123
- package/ui/tree_scroll_mirror.cpp +4 -4
- package/ui/tree_state.cpp +78 -6
- package/ui/tree_state.h +49 -4
- package/ui/tree_style.cpp +409 -300
- package/ui/view.cpp +207 -207
- package/ui/virtual_keyboard.cpp +11 -11
package/ui/virtual_keyboard.cpp
CHANGED
|
@@ -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.
|
|
429
|
-
const int padLeft = parent.
|
|
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.
|
|
706
|
-
const int prevFlex = n.
|
|
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.
|
|
708
|
+
const int prevOverflowY = n.computedStyle().overflow_y;
|
|
709
709
|
#else
|
|
710
|
-
const int prevOverflowY = n.
|
|
710
|
+
const int prevOverflowY = n.computedStyle().overflow;
|
|
711
711
|
#endif
|
|
712
|
-
const int prevPosition = n.
|
|
713
|
-
const int prevTop = GEA_CSS_POSITION_PX_0(n.
|
|
714
|
-
const int prevLeft = GEA_CSS_POSITION_PX_3(n.
|
|
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.
|
|
732
|
-
const int pinLeft = n.layout.x - parentNode.layout.x - parentNode.
|
|
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);
|