@geastack/engine 0.1.6 → 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/README.md +70 -0
- package/canvas.cpp +105 -48
- package/css/declarative.h +6 -0
- package/css/engine.h +20 -0
- package/image_store.cpp +136 -33
- package/package.json +4 -3
- package/ui/CSS_FEATURES.md +261 -0
- package/ui/absolute_leaf_refresh.cpp +77 -62
- package/ui/core.cpp +26 -3
- package/ui/css_atom.cpp +6 -0
- package/ui/css_atom.h +2 -0
- package/ui/css_features.h +369 -0
- package/ui/document.cpp +11 -0
- package/ui/image_node.cpp +25 -24
- package/ui/input.cpp +46 -26
- package/ui/input_render.cpp +31 -27
- package/ui/internal.h +22 -0
- package/ui/layout.cpp +899 -613
- package/ui/layout_snapshot.cpp +29 -2
- package/ui/node_features.h +36 -0
- package/ui/node_lifecycle.cpp +358 -84
- package/ui/node_lifecycle.h +1 -0
- package/ui/node_model.h +816 -96
- package/ui/node_text.h +84 -0
- package/ui/refresh_perf.h +19 -17
- package/ui/render.cpp +341 -259
- package/ui/renderer_features.h +24 -0
- package/ui/root_scroll_refresh.cpp +86 -69
- package/ui/storage_usage.h +45 -0
- package/ui/style.cpp +1398 -349
- package/ui/style_values.h +2 -2
- package/ui/text.cpp +172 -154
- package/ui/tree_events.cpp +218 -92
- package/ui/tree_events.h +44 -20
- package/ui/tree_inspection.h +15 -0
- package/ui/tree_nodes.cpp +51 -19
- package/ui/tree_render.cpp +159 -126
- package/ui/tree_scroll_mirror.cpp +30 -4
- package/ui/tree_state.cpp +334 -115
- package/ui/tree_state.h +118 -22
- package/ui/tree_style.cpp +679 -303
- package/ui/view.cpp +268 -208
- package/ui/virtual_keyboard.cpp +18 -11
package/ui/virtual_keyboard.cpp
CHANGED
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
// handlers fire.
|
|
37
37
|
|
|
38
38
|
#include "virtual_keyboard.h"
|
|
39
|
+
#include "node_features.h"
|
|
39
40
|
|
|
40
41
|
#ifndef GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD
|
|
41
42
|
#define GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD 1
|
|
42
43
|
#endif
|
|
43
44
|
|
|
44
|
-
#if GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD
|
|
45
|
+
#if GEA_EMBEDDED_ENABLE_VIRTUAL_KEYBOARD && GEA_UI_INPUT_NODES
|
|
45
46
|
|
|
46
47
|
#include "display.h"
|
|
47
48
|
#include "internal.h"
|
|
@@ -424,8 +425,8 @@ void mountIfNeeded()
|
|
|
424
425
|
// the parent's padding from our offsets — negative Left/Top
|
|
425
426
|
// cancels the inset.
|
|
426
427
|
const Node &parent = tree.node(tree.mountedRoot());
|
|
427
|
-
const int padTop = parent.
|
|
428
|
-
const int padLeft = parent.
|
|
428
|
+
const int padTop = parent.computedStyle().padding[0];
|
|
429
|
+
const int padLeft = parent.computedStyle().padding[3];
|
|
429
430
|
|
|
430
431
|
const KbMetrics m = kbMetrics();
|
|
431
432
|
// Float the keyboard above any reserved bottom overlay (home button)
|
|
@@ -579,7 +580,9 @@ void applyKeyToActiveInput(int code)
|
|
|
579
580
|
Node &nn = tree.node(nodeId);
|
|
580
581
|
nn.render.dirty = 1;
|
|
581
582
|
nn.render.layout_dirty = 1;
|
|
583
|
+
#if GEA_CSS_SCROLLING
|
|
582
584
|
nn.render.non_scroll_dirty = 1;
|
|
585
|
+
#endif
|
|
583
586
|
};
|
|
584
587
|
|
|
585
588
|
if (code == kCodeBackspace) {
|
|
@@ -699,12 +702,16 @@ void applyAppResize()
|
|
|
699
702
|
gState.savedStyleCount = 0;
|
|
700
703
|
// Snapshot every computed value we are about to overwrite before the
|
|
701
704
|
// first setStyle lands, so none of them is read back post-mutation.
|
|
702
|
-
const int prevHeight = n.
|
|
703
|
-
const int prevFlex = n.
|
|
704
|
-
|
|
705
|
-
const int
|
|
706
|
-
|
|
707
|
-
const int
|
|
705
|
+
const int prevHeight = n.computedStyle().height;
|
|
706
|
+
const int prevFlex = n.computedStyle().flex;
|
|
707
|
+
#if GEA_CSS_OVERFLOW_AXES
|
|
708
|
+
const int prevOverflowY = n.computedStyle().overflow_y;
|
|
709
|
+
#else
|
|
710
|
+
const int prevOverflowY = n.computedStyle().overflow;
|
|
711
|
+
#endif
|
|
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());
|
|
708
715
|
const int viewportH = tree.mountedHeight();
|
|
709
716
|
// Available vertical space between the top of this node (set by
|
|
710
717
|
// previous siblings' heights during the most recent layout pass)
|
|
@@ -721,8 +728,8 @@ void applyAppResize()
|
|
|
721
728
|
// band of the old screen. Absolute takes it out of the parent's flow so
|
|
722
729
|
// it cannot move; restore puts the original position styles back.
|
|
723
730
|
const Node &parentNode = tree.node(n.parent >= 0 ? n.parent : target);
|
|
724
|
-
const int pinTop = n.layout.y - parentNode.layout.y - parentNode.
|
|
725
|
-
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];
|
|
726
733
|
pinStyle(tree, target, Property::Position, prevPosition, 1);
|
|
727
734
|
pinStyle(tree, target, Property::Top, prevTop, pinTop);
|
|
728
735
|
pinStyle(tree, target, Property::Left, prevLeft, pinLeft);
|