mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 637852. Part 13: Allow snapping of text baselines to occur when there's a scale in the current transform. r=tnikkel
This allows baselines to be snapped properly when drawing into high-resolution ThebesLayers.
This commit is contained in:
parent
8a76eeceb9
commit
55a9350095
@ -5131,7 +5131,7 @@ nsTextFrame::GetSnappedBaselineY(gfxContext* aContext, gfxFloat aY)
|
||||
gfxFloat appUnitsPerDevUnit = mTextRun->GetAppUnitsPerDevUnit();
|
||||
gfxFloat baseline = aY + mAscent;
|
||||
gfxRect putativeRect(0, baseline/appUnitsPerDevUnit, 1, 1);
|
||||
if (!aContext->UserToDevicePixelSnapped(putativeRect))
|
||||
if (!aContext->UserToDevicePixelSnapped(putativeRect, PR_TRUE))
|
||||
return baseline;
|
||||
return aContext->DeviceToUser(putativeRect.TopLeft()).y*appUnitsPerDevUnit;
|
||||
}
|
||||
|
16
layout/reftests/bugs/637852-1-ref.html
Normal file
16
layout/reftests/bugs/637852-1-ref.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body { margin-top:101px; }
|
||||
.outer {
|
||||
-moz-transform:scale(1.4);
|
||||
-moz-transform-origin:top left;
|
||||
line-height:40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="outer"><div class="inner">Hello Kitty</div></div>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/bugs/637852-1.html
Normal file
16
layout/reftests/bugs/637852-1.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body { margin-top:100.9px; }
|
||||
.outer {
|
||||
-moz-transform:scale(1.4);
|
||||
-moz-transform-origin:top left;
|
||||
line-height:40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="outer"><div class="inner">Hello Kitty</div></div>
|
||||
</body>
|
||||
</html>
|
@ -1629,6 +1629,7 @@ fails-if(Android) == 635302-1.html 635302-1-ref.html
|
||||
fails-if(http.platform=="X11"&&!layersGPUAccelerated) == 635373-3.html 635373-3-ref.html
|
||||
HTTP(..) == 635639-1.html 635639-1-ref.html
|
||||
HTTP(..) == 635639-2.html 635639-2-ref.html
|
||||
== 637852-1.html 637852-1-ref.html
|
||||
== 641770-1.html 641770-1-ref.html
|
||||
== 641856-1.html 641856-1-ref.html
|
||||
== 645491-1.html 645491-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user