Closed
Bug 1376640
Opened 9 years ago
Closed 9 years ago
stylo: first-letter dynamic changes are still not quite right
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
Testcase:
<!DOCTYPE html>
<style>
span.x { color: green; }
div::first-letter { font-size: 100px; }
</style>
<div style="color: red">
<span>C</span>
</div>
<script>
onload = function() {
setTimeout(function() {
document.body.offsetWidth;
document.querySelector("span").className = 'x'
}, 500);
};
</script>
The problem is that the first-letter should be restyled from the <div> but we're restyling from the <span>.
| Assignee | ||
Comment 1•9 years ago
|
||
MozReview-Commit-ID: 8osMUpYVRvR
Attachment #8881675 -
Flags: review?(cam)
Updated•9 years ago
|
Attachment #8881675 -
Flags: review?(cam) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2992d5af6251
Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
Comment 3•9 years ago
|
||
sorry Boris, had to back this out for causing assertion failures like https://treeherder.mozilla.org/logviewer.html#?job_id=110663297&repo=autoland
Flags: needinfo?(bzbarsky)
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa87c2519486
Backed out changeset 2992d5af6251 for assertion failures like Assertion failure: mOwner == ExpectedOwnerForChild(aFrame) (Missed some frame in the hierarchy?)
| Assignee | ||
Comment 5•9 years ago
|
||
Hmm. This was green on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5d1192b260e40053ab6c0f5c7cbbe606046595d
I guess that assert got added between then and now. :(
| Assignee | ||
Comment 6•9 years ago
|
||
Ah, I expect the problem is that ExpectedOwnerForChild looks for the blockframe when aFrame is a first-letter frame, but the changes in this bug make us restyle the first-letter when restyling its parent (which might be an inline inside the blockframe).
Emilio, should that chunk of ExpectedOwnerForChild just get changed accordingly, or is there a reason it's looking for the block?
Flags: needinfo?(bzbarsky) → needinfo?(emilio+bugs)
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(bzbarsky)
Comment 7•9 years ago
|
||
Changing it to just look at the parent frame it's fine. The point of those assertions is to be aware of such changes to ensure nothing dumb starts happening. r=me on changing it to just return the parent frame.
Flags: needinfo?(emilio+bugs)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf11951d30a6
Fix dynamic updates when an inline that sits between a first-letter and its block changes style. r=heycam
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(bzbarsky)
Comment 9•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•