mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
1c34ad7112
nsColorControlFrame::UpdateColor() looks up the color value from the corresponding <input> element -- and it expects to receive a valid color string, regardless of what the user/author has done (or whether they've done anything), thanks to the HTMLInputElement sanitization code that gets run when the value is set. As a basic sanity-check, UpdateColor() has an assertion to verify that the value it receives is non-empty. However, if it happens to be called while the element is still being appended (e.g. due to greedy frame construction), then it *can* legitimately get an empty value. So, the assertion isn't entirely valid! Hence, this patch relaxes the assertion to only take effect after the frame has been reflowed, and it also makes UpdateColor() a no-op in that case. This is fine because we can expect that UpdateColor() will be called again (and will see a non-empty color value at that point) before the frame gets reflowed/painted. MozReview-Commit-ID: LOymuwy6gIM --HG-- extra : rebase_source : 57a2b58cc371ec82f1d2db0334b2236a33056e40
4 lines
62 B
HTML
4 lines
62 B
HTML
<cite contenteditable='true'>
|
|
<input type='color'/>
|
|
</cite>
|