Closed Bug 1495323 Opened Last year Closed Last year
Input::Font Size Inflation List Margin Adjustment unnecessarily computes amount of font size inflation
Bug 1495323 - Don't retrieve font size inflation for margin calculation unless really required. r?dbaron
46 bytes, text/x-phabricator-request
|Details | Review|
... even when we don't do anything with that value because the condition in the line right below is false .  https://dxr.mozilla.org/mozilla-central/rev/3632445ae3db388e7b214b83acec5a042391a7bb/layout/generic/ReflowInput.cpp#131-132
Once again, calculating the amount of font size inflation isn't as expensive as it used to be, but there's still no need to do it unnecessarily. The current code does this unconditionally as part of computing a frame's margins Additionally, calculating the font size inflation for frames that we don't actually want to inflate also messes with the planned writing mode assertions from bug 1428670. In some special cases (e.g. the scroll bars), a frame might use a different writing mode (horizontal/vertical) than its parent without creating a new font inflation flow root at the boundary. As long as we never want to apply font size inflation for that frame this is okay, but if the margin computation then runs the font inflation calculation regardless, we have a problem.
Comment on attachment 9013408 [details] Bug 1495323 - Don't retrieve font size inflation for margin calculation unless really required. r?dbaron David Baron :dbaron: 🏴 ⌚UTC-7 has approved the revision.
Attachment #9013408 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/a080d82d994e Don't retrieve font size inflation for margin calculation unless really required. r=dbaron
You need to log in before you can comment on or make changes to this bug.