New issue
Advanced search Search tips

Issue 901247 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[LayoutNG] LayoutText::StyleDidChange() should reset valid_ng_items_ only if needed

Project Member Reported by yosin@chromium.org, Nov 2

Issue description

We should reset valid_ng_items_ only if style changes that affect how text is rendered. Font, text-decoration, etc.

This prevents Element#innerText to utilize NGInlineItems.
In following sample script, Element#innerText produces empty string instead of "foo". Because, NGINlineItems is set at force layout step then removePropery set valid_ng_items_ to false, but we don't layout target again since visibility change doesn't require for this case.

<div id=target style="visibility: hidden"></div>
<script>
const target = document.getElementById('target');
target.append('foo');
document.body.offsetHeight; // force layout
target.style.removeProperty('visibility');
console.log(`innerText="${target.innerText}"`);
</script>

 

Sign in to add a comment