mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990340 - Use GetContentInsertionFrame() when searching for ::before/::after frames. r=bz
This commit is contained in:
parent
87c89c055f
commit
f7f777c391
@ -1027,7 +1027,8 @@ nsLayoutUtils::GetBeforeFrame(nsIFrame* aFrame)
|
||||
NS_ASSERTION(!aFrame->GetPrevContinuation(),
|
||||
"aFrame must be first continuation");
|
||||
|
||||
nsIFrame* firstFrame = GetFirstChildFrame(aFrame, aFrame->GetContent());
|
||||
nsIFrame* cif = aFrame->GetContentInsertionFrame();
|
||||
nsIFrame* firstFrame = GetFirstChildFrame(cif, aFrame->GetContent());
|
||||
|
||||
if (firstFrame && IsGeneratedContentFor(nullptr, firstFrame,
|
||||
nsCSSPseudoElements::before)) {
|
||||
@ -1043,7 +1044,8 @@ nsLayoutUtils::GetAfterFrame(nsIFrame* aFrame)
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "NULL frame pointer");
|
||||
|
||||
nsIFrame* lastFrame = GetLastChildFrame(aFrame, aFrame->GetContent());
|
||||
nsIFrame* cif = aFrame->GetContentInsertionFrame();
|
||||
nsIFrame* lastFrame = GetLastChildFrame(cif, aFrame->GetContent());
|
||||
|
||||
if (lastFrame && IsGeneratedContentFor(nullptr, lastFrame,
|
||||
nsCSSPseudoElements::after)) {
|
||||
|
@ -469,3 +469,4 @@ support-files =
|
||||
bug687297_a.html
|
||||
bug687297_b.html
|
||||
bug687297_c.html
|
||||
[test_bug990340.html]
|
||||
|
60
layout/base/tests/test_bug990340.html
Normal file
60
layout/base/tests/test_bug990340.html
Normal file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=990340
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 990340</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 990340 **/
|
||||
|
||||
function testbug990340() {
|
||||
ok(document.querySelector('#bug990340 span').clientHeight < 100,
|
||||
"'height' is in transition")
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=990340">Mozilla Bug 990340</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<style type="text/css">
|
||||
|
||||
#bug990340::before {
|
||||
content: ":before";
|
||||
}
|
||||
|
||||
#bug990340 span {
|
||||
display: inline-block;
|
||||
border:1px solid blue;
|
||||
height: 20px;
|
||||
transition: height 30s;
|
||||
}
|
||||
|
||||
#bug990340.s span {
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id="bug990340" style="overflow:scroll">
|
||||
<span>Transition height</span>
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
<script>
|
||||
document.body.offsetHeight;
|
||||
document.querySelector('#bug990340').className='s';
|
||||
testbug990340()
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user