[Webkit-unassigned] [Bug 156684] rem in media queries should be calculated using font-size:initial, not root element font-size
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 7 08:23:55 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=156684
David Humphrey (humphd) <david.humphrey at senecacollege.ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.humphrey at senecacolleg
| |e.ca
--- Comment #3 from David Humphrey (humphd) <david.humphrey at senecacollege.ca> ---
I spent some time looking at this, and was able to get the attached plnkr test case to pass with a hacky "fix".
// WebCore/css/CSSPrimitiveValue.cpp
double CSSPrimitiveValue::computeNonCalcLengthDouble(const CSSToLengthConversionData& conversionData, UnitType primitiveType, double value)
{
double factor;
bool applyZoom = true;
switch (primitiveType) {
...
case CSS_REMS:
// hack to force use of initial font vs. user specified root style
auto fontDescription = conversionData.style()->fontDescription();
fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
factor = fontDescription.specifiedSize();
break;
I realize this isn't the right way to do it, but I was curious to try and track it down. If someone with proper knowledge of the css code is willing to guide me a bit on a proper fix, and assuming it doesn't require massive changes I'm not equipped to make, I'd be willing to take this further.
Thanks for any guidance.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171207/92bf63cd/attachment.html>
More information about the webkit-unassigned
mailing list