зеркало из https://github.com/mozilla/pjs.git
Reposition HasAttributeDependentStyle() to follow AttributeChanged() to give a chance to the latter to do something that gets picked up by the former, b=350002, r=bzbarsky, sr=dbaron
This commit is contained in:
Родитель
c2efc04510
Коммит
9e4c40e7a0
|
@ -10699,8 +10699,8 @@ nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
|||
|
||||
#endif // MOZ_XUL
|
||||
|
||||
// See if we have appearance information for a theme.
|
||||
if (primaryFrame) {
|
||||
// See if we have appearance information for a theme.
|
||||
const nsStyleDisplay* disp = primaryFrame->GetStyleDisplay();
|
||||
if (disp->mAppearance) {
|
||||
nsPresContext* presContext = mPresShell->GetPresContext();
|
||||
|
@ -10712,16 +10712,8 @@ nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
|||
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsFrameManager *frameManager = shell->FrameManager();
|
||||
nsReStyleHint rshint = frameManager->HasAttributeDependentStyle(aContent,
|
||||
aAttribute,
|
||||
aModType);
|
||||
|
||||
|
||||
// let the frame deal with it now, so we don't have to deal later
|
||||
if (primaryFrame) {
|
||||
|
||||
// let the frame deal with it now, so we don't have to deal later
|
||||
result = primaryFrame->AttributeChanged(aNameSpaceID, aAttribute,
|
||||
aModType);
|
||||
// XXXwaterson should probably check for special IB siblings
|
||||
|
@ -10730,6 +10722,13 @@ nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
|||
// this notification, so it's not that big a deal.
|
||||
}
|
||||
|
||||
// See if we can optimize away the style re-resolution -- must be called after
|
||||
// the frame's AttributeChanged() in case it does something that affects the style
|
||||
nsFrameManager *frameManager = shell->FrameManager();
|
||||
nsReStyleHint rshint = frameManager->HasAttributeDependentStyle(aContent,
|
||||
aAttribute,
|
||||
aModType);
|
||||
|
||||
// Menus and such can't deal with asynchronous changes of display
|
||||
// when the menugenerated or menuactive attribute changes, so make
|
||||
// sure to process that immediately
|
||||
|
|
Загрузка…
Ссылка в новой задаче