Bug 1287728 - part1: explicitly define default value for RestyleResult. r=heycam

After explicitly define default value for RestyleResult, we have a value
starting from 0 now. So, we can drop the explicity numbering.

MozReview-Commit-ID: 1UlpkUT6mAL

--HG--
extra : rebase_source : 441da4a5def8b9c8340cc3048d8dba5ddaae3b87
This commit is contained in:
Jeremy Chen 2016-07-19 21:10:59 +08:00
Родитель c8ba465303
Коммит 546697763f
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -3264,7 +3264,7 @@ ElementRestyler::Restyle(nsRestyleHint aRestyleHint)
// its descendants, yet RestyleSelf might return different RestyleResult
// values for the different same-style continuations. |result| is our
// overall decision.
RestyleResult result = RestyleResult(0);
RestyleResult result = eRestyleResult_None;
uint32_t swappedStructs = 0;
nsRestyleHint thisRestyleHint = aRestyleHint;
@ -5194,7 +5194,8 @@ ElementRestyler::RestyleResultToString(RestyleResult aRestyleResult)
result.AssignLiteral("eRestyleResult_ContinueAndForceDescendants");
break;
default:
result.AppendPrintf("RestyleResult(%d)", aRestyleResult);
MOZ_ASSERT(aRestyleResult == eRestyleResult_None,
"Unexpected RestyleResult");
}
return result;
}

Просмотреть файл

@ -671,9 +671,11 @@ private:
// These values must be ordered so that later values imply that all
// the work of the earlier values is also done.
enum RestyleResult {
// default initial value
eRestyleResult_None,
// we left the old style context on the frame; do not restyle children
eRestyleResult_Stop = 1,
eRestyleResult_Stop,
// we got a new style context on this frame, but we know that children
// do not depend on the changed values; do not restyle children