mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108277 - part 1 - Make Get{Min,Pref}ISize for the <canvas> element aware of vertical writing mode. r=smontagu
This commit is contained in:
parent
64b894a6b9
commit
2fdafce3a4
@ -185,7 +185,9 @@ nsHTMLCanvasFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
// XXX The caller doesn't account for constraints of the height,
|
||||
// min-height, and max-height properties.
|
||||
nscoord result = nsPresContext::CSSPixelsToAppUnits(GetCanvasSize().width);
|
||||
bool vertical = GetWritingMode().IsVertical();
|
||||
nscoord result = nsPresContext::CSSPixelsToAppUnits(
|
||||
vertical ? GetCanvasSize().height : GetCanvasSize().width);
|
||||
DISPLAY_MIN_WIDTH(this, result);
|
||||
return result;
|
||||
}
|
||||
@ -195,7 +197,9 @@ nsHTMLCanvasFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
// XXX The caller doesn't account for constraints of the height,
|
||||
// min-height, and max-height properties.
|
||||
nscoord result = nsPresContext::CSSPixelsToAppUnits(GetCanvasSize().width);
|
||||
bool vertical = GetWritingMode().IsVertical();
|
||||
nscoord result = nsPresContext::CSSPixelsToAppUnits(
|
||||
vertical ? GetCanvasSize().height : GetCanvasSize().width);
|
||||
DISPLAY_PREF_WIDTH(this, result);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user