Skip to content

Revert: "amp-layout: extract buildDOM #compiler (#34770)"#35146

Merged
samouri merged 1 commit intoampproject:mainfrom
samouri:revert-build-dom
Jul 7, 2021
Merged

Revert: "amp-layout: extract buildDOM #compiler (#34770)"#35146
samouri merged 1 commit intoampproject:mainfrom
samouri:revert-build-dom

Conversation

@samouri
Copy link
Copy Markdown
Member

@samouri samouri commented Jul 7, 2021

summary
Reverts the meaningful changes from #34770.
The root cause of the issue was that parseLayout is not equivalent to this.getLayout().

  • parseLayout() just ensures the input layout type is valid and returns a Layout
  • this.getLayout() would use the "effective layout" calculated by calling applyStaticLayout.

@processprocess
Copy link
Copy Markdown
Contributor

cc @jridgewell for OWNERS

@processprocess processprocess requested a review from jridgewell July 7, 2021 20:54
@samouri samouri merged commit f3b1875 into ampproject:main Jul 7, 2021
@samouri samouri deleted the revert-build-dom branch July 7, 2021 21:06
@processprocess
Copy link
Copy Markdown
Contributor

Fixes #35154 (Filed this for tracking the CP)

samouri added a commit that referenced this pull request Jul 13, 2021
…Dom extraction (#35148)

* static-layout: extract getEffectiveLayout

* Revert "Revert: "amp-layout: extract buildDOM #compiler (#34770)" (#35146)"

This reverts commit f3b1875.

* amp-layout should use getEffectiveLayout

* lint

* Update src/builtins/amp-layout/amp-layout.js

Co-authored-by: Ryan Cebulko <ryan@cebulko.com>

* extract typedef for EffectiveLayout

* make wrapper func with smaller API return

* move cached return

* empty commit

Co-authored-by: Ryan Cebulko <ryan@cebulko.com>
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.

5 participants