mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't split inline ancestors of bidi frames if we don't have any child frames after the split. Bug 779003, r=roc
This commit is contained in:
parent
613f8f933c
commit
3c9b427025
@ -421,14 +421,15 @@ SplitInlineAncestors(nsIFrame* aParent,
|
||||
nsIFrame* grandparent = parent->GetParent();
|
||||
NS_ASSERTION(grandparent, "Couldn't get parent's parent in nsBidiPresUtils::SplitInlineAncestors");
|
||||
|
||||
nsresult rv = presShell->FrameConstructor()->
|
||||
CreateContinuingFrame(presContext, parent, grandparent, &newParent, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
// Split the child list after |frame|, unless it is the last child.
|
||||
if (!frame || frame->GetNextSibling()) {
|
||||
|
||||
nsresult rv = presShell->FrameConstructor()->
|
||||
CreateContinuingFrame(presContext, parent, grandparent, &newParent, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsContainerFrame* container = do_QueryFrame(parent);
|
||||
nsFrameList tail = container->StealFramesAfter(frame);
|
||||
|
||||
@ -443,13 +444,13 @@ SplitInlineAncestors(nsIFrame* aParent,
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
// The list name kNoReflowPrincipalList would indicate we don't want reflow
|
||||
nsFrameList temp(newParent, newParent);
|
||||
rv = grandparent->InsertFrames(nsIFrame::kNoReflowPrincipalList, parent, temp);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
// The list name kNoReflowPrincipalList would indicate we don't want reflow
|
||||
nsFrameList temp(newParent, newParent);
|
||||
rv = grandparent->InsertFrames(nsIFrame::kNoReflowPrincipalList, parent, temp);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
frame = parent;
|
||||
|
47
layout/reftests/bidi/779003-1-ref.html
Normal file
47
layout/reftests/bidi/779003-1-ref.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
#searchPaginationFooter {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.backLink {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.nextLink {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pagination,
|
||||
.pagination li {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p { margin: 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div id="searchPaginationFooter">
|
||||
<p class="backLink"> < <span class="gray">السابق</span></p>
|
||||
<ul class="pagination">
|
||||
<li><span class="select">1</span></li>
|
||||
<li><a href="#page=2">2</a></li>
|
||||
<li><a href="#page=3">3</a></li>
|
||||
<li><a href="#page=4">4</a></li>
|
||||
<li><a href="#page=5">5</a></li>
|
||||
<li><a href="#page=6">6</a></li>
|
||||
<li><a href="#page=7">7</a></li>
|
||||
<li><a href="#page=8">8</a></li>
|
||||
<li>...</li>
|
||||
<li><a href="#page=325">325</a></li>
|
||||
</ul>
|
||||
<p class="nextLink"><a href="#page=2">التالي</a> > </p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
44
layout/reftests/bidi/779003-1.html
Normal file
44
layout/reftests/bidi/779003-1.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
#searchPaginationFooter {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.backLink {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.nextLink {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.pagination,
|
||||
.pagination li {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div id="searchPaginationFooter">
|
||||
<p class="backLink"> < <span class="gray">السابق</span></p>
|
||||
<ul class="pagination">
|
||||
<li><span class="select">1</span></li>
|
||||
<li><a href="#page=2">2</a></li>
|
||||
<li><a href="#page=3">3</a></li>
|
||||
<li><a href="#page=4">4</a></li>
|
||||
<li><a href="#page=5">5</a></li>
|
||||
<li><a href="#page=6">6</a></li>
|
||||
<li><a href="#page=7">7</a></li>
|
||||
<li><a href="#page=8">8</a></li>
|
||||
<li>...</li>
|
||||
<li><a href="#page=325">325</a></li>
|
||||
</ul>
|
||||
<p class="nextLink"><a href="#page=2">التالي</a> > </p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -123,3 +123,4 @@ fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
|
||||
== 746987-2.html 746987-2-ref.html
|
||||
== 746987-3.html 746987-3-ref.html
|
||||
== 746987-4.html 746987-4-ref.html
|
||||
== 779003-1.html 779003-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user