зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 2d12737168b1 (bug 1472421) for mochitest failures on test_range_bounds
This commit is contained in:
Родитель
33704bae93
Коммит
a56e695e87
|
@ -3030,14 +3030,14 @@ nsRange::CollectClientRectsAndText(nsLayoutUtils::RectCallback* aCollector,
|
|||
nsCOMPtr<nsINode> endContainer = aEndContainer;
|
||||
|
||||
// Flush out layout so our frames are up to date.
|
||||
if (!aStartContainer->IsInComposedDoc()) {
|
||||
if (!aStartContainer->IsInUncomposedDoc()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aFlushLayout) {
|
||||
aStartContainer->OwnerDoc()->FlushPendingNotifications(FlushType::Layout);
|
||||
// Recheck whether we're still in the document
|
||||
if (!aStartContainer->IsInComposedDoc()) {
|
||||
if (!aStartContainer->IsInUncomposedDoc()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3170,7 +3170,7 @@ nsRange::GetUsedFontFaces(nsTArray<nsAutoPtr<InspectorFontFace>>& aResult,
|
|||
doc->FlushPendingNotifications(FlushType::Frames);
|
||||
|
||||
// Recheck whether we're still in the document
|
||||
NS_ENSURE_TRUE(mStart.Container()->IsInComposedDoc(), NS_ERROR_UNEXPECTED);
|
||||
NS_ENSURE_TRUE(mStart.Container()->IsInUncomposedDoc(), NS_ERROR_UNEXPECTED);
|
||||
|
||||
// A table to map gfxFontEntry objects to InspectorFontFace objects.
|
||||
// (We hold on to the InspectorFontFaces strongly due to the nsAutoPtrs
|
||||
|
|
|
@ -255,22 +255,6 @@ function testMixedDir(){
|
|||
bdoRect.top, bdoRect.bottom,
|
||||
7*widthPerChar, bdoRect.height]]});
|
||||
}
|
||||
|
||||
function testShadowDOM() {
|
||||
var ifr = document.createElement("iframe");
|
||||
document.body.appendChild(ifr);
|
||||
var doc = ifr.contentDocument;
|
||||
var d = doc.createElement("div");
|
||||
var sr = d.attachShadow({mode: "open"});
|
||||
sr.innerHTML = "<div>inside shadow DOM</div>";
|
||||
doc.body.appendChild(d);
|
||||
var r = new ifr.contentWindow.Range();
|
||||
r.selectNode(sr.firstChild);
|
||||
var rect = r.getBoundingClientRect();
|
||||
isnot(rect.width, 0, "Div element inside shadow shouldn't have zero size.");
|
||||
isnot(rect.height, 0, "Div element inside shadow shouldn't have zero size.");
|
||||
}
|
||||
|
||||
function test(){
|
||||
//test ltr
|
||||
doTest();
|
||||
|
@ -290,9 +274,6 @@ function test(){
|
|||
root.style.transform = "translate(30px,50px)";
|
||||
doTest();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set":[["dom.webcomponents.shadowdom.enabled", true]]},
|
||||
testShadowDOM);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче