layoutNode doesn't always skip layout when it could #155

Closed
opened 2015-12-03 01:30:52 -08:00 by waywardmonkeys · 0 comments
waywardmonkeys commented 2015-12-03 01:30:52 -08:00 (Migrated from github.com)

(This was found while I was reading the code, not by running it or anything.)

In 36a46673f9 (from @lucasr), support for reverse layout and rtl was added.

At that time, the check for whether or not to skip layout in layoutNode was augmented and became this:

  bool skipLayout =
    !node->is_dirty(node->context) &&
    eq(layout->last_requested_dimensions[CSS_WIDTH], layout->dimensions[CSS_WIDTH]) &&
    eq(layout->last_requested_dimensions[CSS_HEIGHT], layout->dimensions[CSS_HEIGHT]) &&
    eq(layout->last_parent_max_width, parentMaxWidth);
    eq(layout->last_direction, direction);

I'm pretty sure that the 2nd to last line should be a && so that the check to see if direction has changed would be included.

(This was found while I was reading the code, not by running it or anything.) In 36a46673f9479f94f83277464c5c43766989c417 (from @lucasr), support for reverse layout and rtl was added. At that time, the check for whether or not to skip layout in `layoutNode` was augmented and became this: ``` c bool skipLayout = !node->is_dirty(node->context) && eq(layout->last_requested_dimensions[CSS_WIDTH], layout->dimensions[CSS_WIDTH]) && eq(layout->last_requested_dimensions[CSS_HEIGHT], layout->dimensions[CSS_HEIGHT]) && eq(layout->last_parent_max_width, parentMaxWidth); eq(layout->last_direction, direction); ``` I'm pretty sure that the 2nd to last line should be a `&&` so that the check to see if `direction` has changed would be included.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#155
No description provided.