Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Boris Chiou 361f923f82 Bug 1683424 - Add UseBoxSizing for AspectRatio class, and fix non-replaced element usage. r=TYLin
Based on the spec, if the aspect-ratio property value is:
1) auto: we should always use content-box dimensions.
2) <ratio>: the aspect-ratio works with box sizing dimensions.
3) auto && <ratio>: we use content-box dimensions in all cases.

So we need an extra flag to address that we should use box-sizing or
always use content-box dimensions while computing the size in
ratio-dependent axis.

This also updates some wpts for non-replaced elements because we should
use content-box if aspect-ratio is 'auto && <ratio>'.

Differential Revision: https://phabricator.services.mozilla.com/D100072
2020-12-23 22:42:55 +00:00
Boris Chiou d494534798 Bug 1651776 - Move Compute{Inline|Block}SizeFromAspectRatio() into AspectRatio struct. r=TYLin
We add a new file, AspectRatio.cpp, to definte the method,
ComputeRatioDependentSize. So we don't have to move this function to
WritingModes.h

Besides, we miss the forward declaration of IPC::ParamTraits, so add it
into AspectRatio.h.

Differential Revision: https://phabricator.services.mozilla.com/D95822
2020-11-20 22:38:36 +00:00