[Webkit-unassigned] [Bug 85062] Support CSS 3 Paged Media Margin Boxes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 16 11:25:23 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=85062
zzy8200 at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zzy8200 at gmail.com
--- Comment #12 from zzy8200 at gmail.com ---
I already see implementation here:
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/PrintContext.cpp
Is there specific reason this feature is still behind a flag?
FloatBoxExtent PrintContext::computedPageMargin(FloatBoxExtent printMargin)
{
if (!frame() || !frame()->document())
return printMargin;
if (!RuntimeEnabledFeatures::sharedFeatures().pageAtRuleSupportEnabled())
return printMargin;
// FIXME: Currently, no pseudo-class is supported.
auto style = frame()->document()->styleScope().resolver().styleForPage(0);
float pixelToPointScaleFactor = 1 / CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(CSSUnitType::CSS_PT).value();
return {
style->marginTop().isAuto() ? printMargin.top() : style->marginTop().value() * pixelToPointScaleFactor,
style->marginRight().isAuto() ? printMargin.right() : style->marginRight().value() * pixelToPointScaleFactor,
style->marginBottom().isAuto() ? printMargin.bottom() : style->marginBottom().value() * pixelToPointScaleFactor,
style->marginLeft().isAuto() ? printMargin.left() : style->marginLeft().value() * pixelToPointScaleFactor
};
}
--
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/20241016/f744aa4b/attachment.htm>
More information about the webkit-unassigned
mailing list