Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LayoutNG] Fix shape exclusion tracking. #16802

Merged
merged 1 commit into from May 14, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 13, 2019

The DerivedGeometry class gets moved from exclusion-space to
exclusion-space as a fast way of determining layout opportunities (where
lines, etc get placed).

For speed we only allocate "NGShapeExclusions" if we've seen any shapes
within the formatting context.

This crash was due to an inconsistent state of the:
NGExclusionSpaceInternal::track_shape_exclusions_ flag.

"other" NGExclusionSpaceInternal

  • derived_geometry_ = (non-null)
  • track_shape_exclusions_ = false
  • num_exclusions_ = 1u

"this" NGExclusionSpaceInternal

  • derived_geometry_ = null
  • track_shape_exclusions_ = true
  • num_exclusions_ = 2u (2nd exclusion has shape data).

Within the NGExclusionSpaceInternal::MoveAndUpdateDerivedGeometry method
we moved the derived geometry over to the "this" exclusion space.

However we didn't also move the track_shape_exclusions_ flag as a result
we'd try to add the 2nd shape exclusion, and a NPE was hit.

Bug: 962135, 962272, 962052
Change-Id: Id095bd2924f83ba6b2dbe90446d1f4613de09933
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610021
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659678}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1610021 branch 3 times, most recently from 4c74e27 to fc0d8d0 Compare May 14, 2019 20:04
The DerivedGeometry class gets moved from exclusion-space to
exclusion-space as a fast way of determining layout opportunities (where
lines, etc get placed).

For speed we only allocate "NGShapeExclusions" if we've seen any shapes
within the formatting context.

This crash was due to an inconsistent state of the:
NGExclusionSpaceInternal::track_shape_exclusions_ flag.

"other" NGExclusionSpaceInternal
 - derived_geometry_ = (non-null)
 - track_shape_exclusions_ = false
 - num_exclusions_ = 1u

"this" NGExclusionSpaceInternal
 - derived_geometry_ = null
 - track_shape_exclusions_ = true
 - num_exclusions_ = 2u (2nd exclusion has shape data).

Within the NGExclusionSpaceInternal::MoveAndUpdateDerivedGeometry method
we moved the derived geometry over to the "this" exclusion space.

However we didn't also move the track_shape_exclusions_ flag as a result
we'd try to add the 2nd shape exclusion, and a NPE was hit.

Bug: 962135, 962272, 962052
Change-Id: Id095bd2924f83ba6b2dbe90446d1f4613de09933
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610021
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659678}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants