Bug 85062
Summary: | Support CSS 3 Paged Media Margin Boxes | ||
---|---|---|---|
Product: | WebKit | Reporter: | Milian Wolff <milian.wolff> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Enhancement | CC: | amit.man, ap, bfulgham, brandroan, dahjelle.webkit.org, hyatt, j.tosovsky, karlcow, koivisto, kripper3, manojtm1008, marie.hanotte, mikelawther, monstion, nickshanks, office, sam, sebastianzartner, shanestephens, simon.fraser, syoichi, tiedye1, timing_fluff_0j, webkit-bug-importer, yummyfish, yuri.araujod, zalan, zzy8200 |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=196680 | ||
Bug Depends on: | |||
Bug Blocks: | 15548 |
Milian Wolff
WebKit is missing support for Paged Media margin boxes: http://www.w3.org/TR/css3-page/#margin-boxes
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Milian Wolff
This blocks bug 15548
Shane Stephens
Paged Media features are currently gated on a refactor being completed by Dave Hyatt (http://lists.webkit.org/pipermail/webkit-dev/2012-May/020668.html).
Christopher Pereira
What is the status?
This is blocking wkhtmltopdf to support in-doc headers/footers, and other important standard printing options.
See:
- https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2200
- https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2247
Daniel Whitney
+1 Need this, also only thing blocking bug 15548
amit
+1
Josh D
I know that there is a ton going on for your team. But there's a real opportunity here for the Open Source community. Right now most reporting solutions are proprietary and don't follow any standard. But with support of paged media and margin boxes the tools for reporting will flourish. We just need your help to make it a priority. Unfortunately I'm going to convert my project over to a Microsoft reporting solution in order to get it done, but I was really hoping I could use Chrome/Webkit to make this happen and get one more nail into the MS coffin.
KraakBal
Please please please make this work
Yuri
Is there any plan for this?
Manoj
we would love to have this feature
Fluff
Please, make it finally happen! It is most needed and long overdue!
Radar WebKit Bug Importer
<rdar://problem/96957669>
zzy8200
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
};
}