mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1109860 - getBBox incorrect with bidirectional text character. r=heycam
This commit is contained in:
parent
7736642ce0
commit
8ca2cf34a7
@ -10,6 +10,9 @@
|
||||
<text id="tspan">
|
||||
<tspan x="20" y="20">b</tspan>
|
||||
</text>
|
||||
<text id="text" x="20" y="60">text</text>
|
||||
<!-- ‎ is the same as the HTML ‎ -->
|
||||
<text id="lrmText" x="20" y="60">‎text</text>
|
||||
<g id="v">
|
||||
<circle cx="100" cy="50" r="5"/>
|
||||
<path d="M 100,100 L 100,200"/>
|
||||
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 1.1 KiB |
@ -58,6 +58,7 @@ function run()
|
||||
compareBBoxHeight("a", "b");
|
||||
compareBBoxHeight("a", "y");
|
||||
compareBBox("b", "tspan");
|
||||
compareBBoxHeight("text", "lrmText");
|
||||
checkBBox("v", 95, 45, 10, 155, 0.001);
|
||||
checkBBox("h", 195, 45, 105, 55, 0.001);
|
||||
checkBBox("e", 95, 95, 10, 10, 0.001);
|
||||
|
@ -900,6 +900,9 @@ TextRenderedRun::GetRunUserSpaceRect(nsPresContext* aContext,
|
||||
uint32_t offset, length;
|
||||
ConvertOriginalToSkipped(it, mTextFrameContentOffset, mTextFrameContentLength,
|
||||
offset, length);
|
||||
if (length == 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
// Measure that range.
|
||||
gfxTextRun::Metrics metrics =
|
||||
@ -947,6 +950,7 @@ TextRenderedRun::GetRunUserSpaceRect(nsPresContext* aContext,
|
||||
|
||||
// Include the stroke if requested.
|
||||
if ((aFlags & eIncludeStroke) &&
|
||||
!fill.IsEmpty() &&
|
||||
nsSVGUtils::GetStrokeWidth(mFrame) > 0) {
|
||||
r.UnionEdges(nsSVGUtils::PathExtentsToMaxStrokeExtents(fill, mFrame,
|
||||
gfxMatrix()));
|
||||
|
Loading…
Reference in New Issue
Block a user