@geastack/engine 0.1.5 → 0.1.6

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.
@@ -33,26 +33,29 @@ namespace {
33
33
 
34
34
  bool hasTransformState(const Node &node)
35
35
  {
36
- return rstyle(node.style).transform_rotate != 0 ||
36
+ return hasIndividualLinearTransform(rstyle(node.style)) || hadIndividualLinearTransform(node.render) ||
37
+ rstyle(node.style).transform_rotate != 0 ||
37
38
  node.render.previous_transform_rotate != 0 ||
38
39
  rstyle(node.style).transform_rotate_x != 0 ||
39
40
  node.render.previous_transform_rotate_x != 0 ||
40
41
  rstyle(node.style).transform_rotate_y != 0 ||
41
42
  node.render.previous_transform_rotate_y != 0 ||
42
- rstyle(node.style).transform_translate_x != 0 ||
43
+ composedTranslateX(rstyle(node.style)) != 0 ||
43
44
  node.render.previous_transform_translate_x != 0 ||
44
- rstyle(node.style).transform_translate_y != 0 ||
45
+ composedTranslateY(rstyle(node.style)) != 0 ||
45
46
  node.render.previous_transform_translate_y != 0 ||
46
- rstyle(node.style).transform_translate_z != 0 ||
47
+ composedTranslateZ(rstyle(node.style)) != 0 ||
47
48
  node.render.previous_transform_translate_z != 0 ||
48
- rstyle(node.style).transform_translate_x_percent != 0 ||
49
+ composedTranslateXPercent(rstyle(node.style)) != 0 ||
49
50
  node.render.previous_transform_translate_x_percent != 0 ||
50
- rstyle(node.style).transform_translate_y_percent != 0 ||
51
+ composedTranslateYPercent(rstyle(node.style)) != 0 ||
51
52
  node.render.previous_transform_translate_y_percent != 0 ||
52
53
  rstyle(node.style).transform_scale_x != 1000 ||
53
54
  node.render.previous_transform_scale_x != 1000 ||
54
55
  rstyle(node.style).transform_scale_y != 1000 ||
56
+ rstyle(node.style).transform_scale_z != 1000 ||
55
57
  node.render.previous_transform_scale_y != 1000 ||
58
+ node.render.previous_transform_scale_z != 1000 ||
56
59
  rstyle(node.style).perspective > 0 ||
57
60
  node.render.previous_perspective > 0;
58
61
  }
@@ -168,7 +171,7 @@ bool flowsChildrenAsRow(const TreeState &state, const Node &p)
168
171
  bool anyInFlow = false;
169
172
  for (int c = p.first_child; c >= 0; c = state.nodes[c].next_sibling) {
170
173
  const Node &child = state.nodes[c];
171
- if (child.style.display == kDisplayNone || child.style.position == 1) continue;
174
+ if (child.style.display == kDisplayNone || isOutOfFlowPosition(child.style.position)) continue;
172
175
  if (!LayoutEngine::isInlineLevelNode(child)) return false;
173
176
  anyInFlow = true;
174
177
  }
@@ -198,13 +201,13 @@ void shiftSiblingsForRemeasuredText(TreeState &state, int id, int oldWidth, int
198
201
  int totalFlex = 0;
199
202
  for (int c = p.first_child; c >= 0; c = state.nodes[c].next_sibling) {
200
203
  const Node &child = state.nodes[c];
201
- if (child.style.display == kDisplayNone || child.style.position == 1) continue;
204
+ if (child.style.display == kDisplayNone || isOutOfFlowPosition(child.style.position)) continue;
202
205
  totalFlex += child.style.flex;
203
206
  }
204
207
  if (totalFlex > 0) return;
205
208
  for (int c = n.next_sibling; c >= 0; c = state.nodes[c].next_sibling) {
206
209
  Node &sib = state.nodes[c];
207
- if (sib.style.display == kDisplayNone || sib.style.position == 1) continue;
210
+ if (sib.style.display == kDisplayNone || isOutOfFlowPosition(sib.style.position)) continue;
208
211
  if (row) sib.layout.x += delta;
209
212
  else sib.layout.y += delta;
210
213
  translateSlotDescendants(state, c, row ? delta : 0, row ? 0 : delta);
@@ -299,11 +302,13 @@ int RootScrollOnlyRefresh::refreshNode(int root,
299
302
  int width,
300
303
  int height)
301
304
  {
302
- (void)root;
303
305
  auto &state = treeState();
304
306
  int foundNode = -1;
305
307
  *extraDirtyCount = 0;
306
308
  *slotCount = 0;
309
+ // A scroll blit would move fixed pixels along with the scrolling content.
310
+ // Fall back to layout and repaint until the blit path can exclude them.
311
+ if (LayoutEngine::containsViewportFixed(root)) return -1;
307
312
 
308
313
  // Pass 1: exactly one pure-scroll node.
309
314
  for (int i = 0; i < state.nodeCount; i++) {