mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1174521 - Backout the second part of bug 1143570 to fix the regression; r=roc
This commit is contained in:
parent
1032351e6d
commit
5123d1990f
@ -5359,7 +5359,6 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
|
||||
if (line->Contains(child)) {
|
||||
*aFoundValidLine = true;
|
||||
mLine = line;
|
||||
aFrame->SetLineCursor(line.get());
|
||||
return;
|
||||
}
|
||||
++line;
|
||||
@ -5368,7 +5367,6 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
|
||||
if (rline->Contains(child)) {
|
||||
*aFoundValidLine = true;
|
||||
mLine = rline;
|
||||
aFrame->SetLineCursor(rline.get());
|
||||
return;
|
||||
}
|
||||
++rline;
|
||||
@ -6526,8 +6524,9 @@ void nsBlockFrame::SetupLineCursor()
|
||||
|| mLines.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetLineCursor(mLines.front());
|
||||
|
||||
Properties().Set(LineCursorProperty(), mLines.front());
|
||||
AddStateBits(NS_BLOCK_HAS_LINE_CURSOR);
|
||||
}
|
||||
|
||||
nsLineBox* nsBlockFrame::GetFirstLineContaining(nscoord y)
|
||||
@ -6555,7 +6554,7 @@ nsLineBox* nsBlockFrame::GetFirstLineContaining(nscoord y)
|
||||
}
|
||||
|
||||
if (cursor.get() != property) {
|
||||
SetLineCursor(cursor.get());
|
||||
props.Set(LineCursorProperty(), cursor.get());
|
||||
}
|
||||
|
||||
return cursor.get();
|
||||
|
@ -377,10 +377,6 @@ protected:
|
||||
return (GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR) ?
|
||||
static_cast<nsLineBox*>(Properties().Get(LineCursorProperty())) : nullptr;
|
||||
}
|
||||
void SetLineCursor(nsLineBox* aCursor) {
|
||||
Properties().Set(LineCursorProperty(), aCursor);
|
||||
AddStateBits(NS_BLOCK_HAS_LINE_CURSOR);
|
||||
}
|
||||
|
||||
nsLineBox* NewLineBox(nsIFrame* aFrame, bool aIsBlock) {
|
||||
return NS_NewLineBox(PresContext()->PresShell(), aFrame, aIsBlock);
|
||||
|
14
layout/generic/test/bug1174521.html
Normal file
14
layout/generic/test/bug1174521.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
<div style="float: left; padding-top: 20px">
|
||||
<a href="#" onclick="parent.postMessage({msg: 'DONE'}, '*'); return false;">test</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position: absolute">
|
||||
A
|
||||
</div>
|
||||
B
|
||||
</body>
|
||||
</html>
|
@ -14,6 +14,7 @@ support-files =
|
||||
file_Dolske.png
|
||||
file_IconTestServer.sjs
|
||||
file_LoadingImageReference.png
|
||||
bug1174521.html
|
||||
|
||||
[test_bug240933.html]
|
||||
[test_bug263683.html]
|
||||
@ -97,6 +98,7 @@ skip-if = buildapp == 'b2g' # b2g(Target should not have scrolled - got 114.1000
|
||||
[test_bug938772.html]
|
||||
[test_bug970363.html]
|
||||
[test_bug1062406.html]
|
||||
[test_bug1174521.html]
|
||||
[test_contained_plugin_transplant.html]
|
||||
skip-if = os=='win' || e10s
|
||||
[test_image_selection.html]
|
||||
|
39
layout/generic/test/test_bug1174521.html
Normal file
39
layout/generic/test/test_bug1174521.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1174521
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 1174521</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1174521">Mozilla Bug 1174521</a>
|
||||
<div id="content">
|
||||
<iframe src="bug1174521.html"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(function() {
|
||||
var iframe = document.querySelector("iframe");
|
||||
var win = iframe.contentWindow;
|
||||
var doc = iframe.contentDocument;
|
||||
var link = doc.querySelector("a");
|
||||
SimpleTest.waitForFocus(function() {
|
||||
synthesizeMouseAtCenter(link, {}, win);
|
||||
}, win);
|
||||
});
|
||||
|
||||
onmessage = function(e) {
|
||||
ok(e.data.msg, "DONE", "We should be able to click the link");
|
||||
SimpleTest.finish();
|
||||
};
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user