зеркало из https://github.com/mozilla/gecko-dev.git
Bug 927734 - Loosen assertions about the contents of the style scope stack. r=dbaron
--HG-- extra : rebase_source : 6b9b7e4051bebeb7da640c7878229b1d014841dd
This commit is contained in:
Родитель
cccce8b04b
Коммит
8a7175ea9f
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<style scoped></style>
|
||||
<span></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<style>div {}</style>
|
|
@ -97,3 +97,4 @@ load 867487.html
|
|||
load 880862.html
|
||||
load 873222.html
|
||||
load 915440.html
|
||||
load 927734-1.html
|
||||
|
|
|
@ -3410,6 +3410,7 @@ TreeMatchContext::InitAncestors(Element *aElement)
|
|||
{
|
||||
MOZ_ASSERT(!mAncestorFilter.mFilter);
|
||||
MOZ_ASSERT(mAncestorFilter.mHashes.IsEmpty());
|
||||
MOZ_ASSERT(mStyleScopes.IsEmpty());
|
||||
|
||||
mAncestorFilter.mFilter = new AncestorFilter::Filter();
|
||||
|
||||
|
|
|
@ -176,20 +176,13 @@ struct MOZ_STACK_CLASS TreeMatchContext {
|
|||
#ifdef DEBUG
|
||||
void AssertHasAllStyleScopes(mozilla::dom::Element* aElement)
|
||||
{
|
||||
int32_t i = mStyleScopes.Length() - 1;
|
||||
nsINode* node = aElement->GetParentNode();
|
||||
while (node && i != -1) {
|
||||
if (node->IsScopedStyleRoot()) {
|
||||
MOZ_ASSERT(mStyleScopes[i] == node);
|
||||
--i;
|
||||
nsINode* cur = aElement->GetParentNode();
|
||||
while (cur) {
|
||||
if (cur->IsScopedStyleRoot()) {
|
||||
MOZ_ASSERT(mStyleScopes.Contains(cur));
|
||||
}
|
||||
node = node->GetParentNode();
|
||||
cur = cur->GetParentNode();
|
||||
}
|
||||
while (node) {
|
||||
MOZ_ASSERT(!node->IsScopedStyleRoot());
|
||||
node = node->GetParentNode();
|
||||
}
|
||||
MOZ_ASSERT(i == -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче