mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Bug 1296516 - Cleanup a bit of code in layout/base
* Tidy RestyleManager::ContentStateChanged * Convert UndisplayedMap to a typed hashtable * Cleanup infallible or unchecked nsCSSFrameConstructor methods Tag #1375
This commit is contained in:
parent
c37b4d0c63
commit
e1195a86e0
13 changed files with 358 additions and 459 deletions
|
|
@ -246,14 +246,14 @@ ElementForStyleContext(nsIContent* aParentContent,
|
|||
|
||||
// Forwarded nsIDocumentObserver method, to handle restyling (and
|
||||
// passing the notification to the frame).
|
||||
nsresult
|
||||
void
|
||||
RestyleManager::ContentStateChanged(nsIContent* aContent,
|
||||
EventStates aStateMask)
|
||||
{
|
||||
// XXXbz it would be good if this function only took Elements, but
|
||||
// we'd have to make ESM guarantee that usefully.
|
||||
if (!aContent->IsElement()) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
Element* aElement = aContent->AsElement();
|
||||
|
|
@ -263,7 +263,6 @@ RestyleManager::ContentStateChanged(nsIContent* aContent,
|
|||
ContentStateChangedInternal(aElement, aStateMask, &changeHint, &restyleHint);
|
||||
|
||||
PostRestyleEvent(aElement, restyleHint, changeHint);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Forwarded nsIMutationObserver method, to handle restyling.
|
||||
|
|
@ -1830,7 +1829,7 @@ ElementRestyler::ConditionallyRestyleUndisplayedNodes(
|
|||
}
|
||||
|
||||
for (UndisplayedNode* undisplayed = aUndisplayed; undisplayed;
|
||||
undisplayed = undisplayed->mNext) {
|
||||
undisplayed = undisplayed->getNext()) {
|
||||
|
||||
if (!undisplayed->mContent->IsElement()) {
|
||||
continue;
|
||||
|
|
@ -3471,7 +3470,7 @@ ElementRestyler::RestyleUndisplayedNodes(nsRestyleHint aChildRestyleHint,
|
|||
if (undisplayed) {
|
||||
pusher.PushAncestorAndStyleScope(undisplayedParent);
|
||||
}
|
||||
for (; undisplayed; undisplayed = undisplayed->mNext) {
|
||||
for (; undisplayed; undisplayed = undisplayed->getNext()) {
|
||||
NS_ASSERTION(undisplayedParent ||
|
||||
undisplayed->mContent ==
|
||||
mPresContext->Document()->GetRootElement(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue