Previously we applied them ad-hoc when computing the style for the referenced element but we now apply it as part of the cascade. This fixes a couple bugs: - Computing the style for the pseudo-element (rather than the referenced element itself) as we do in the case we don't have a layout node in `get_direct_property` now includes the inline style. - Inline style is applied according to the cascade (i.e. it can be overriden by non-inline `!important` styles). - Properties go through the computation process.
18 lines
462 B
HTML
18 lines
462 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<style>
|
|
input {
|
|
font-size: 20px;
|
|
}
|
|
</style>
|
|
<input id="input" placeholder="placeholder" />
|
|
<script>
|
|
test(() => {
|
|
const container = internals.getShadowRoot(input).firstElementChild;
|
|
const placeholder = container.children[1];
|
|
|
|
input.setAttribute("placeholder", "updated");
|
|
|
|
println(placeholder.computedStyleMap().get("height").toString());
|
|
});
|
|
</script>
|