Fix up a comment that I forgot to fix when addressing review feedback for bug 1343771. r=me, DONTBUILD
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 03 Mar 2017 21:46:38 -0500
changeset 394896 28ac9c36b726dcd0868292b77328712a1d2b3813
parent 394895 ebbc4be47d0a11590992defeba79340bbc3a761c
child 394897 2f9561ccd777eab9e51ede75eb5513cc57281f50
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, DONTBUILD
bugs1343771
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix up a comment that I forgot to fix when addressing review feedback for bug 1343771. r=me, DONTBUILD MozReview-Commit-ID: 7PFBYVlcR7F
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10068,20 +10068,23 @@ nsFrame::UpdateStyleOfChildAnonBox(nsIFr
   nsIAtom* pseudo = aChildFrame->StyleContext()->GetPseudo();
   MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(pseudo), "Child is not an anon box?");
 
   // Anon boxes inherit from their parent; that's us.
   RefPtr<nsStyleContext> newContext =
     aStyleSet.ResolveAnonymousBoxStyle(pseudo, StyleContext());
 
   // Figure out whether we have an actual change.  It's important that we do
-  // this, even though all the child's changes are due to properties it inherits
-  // from us, because it's possible that no one ever asked us for those style
-  // structs and hence changes to them aren't reflected in aHintForThisFrame at
-  // all.
+  // this, for several reasons:
+  //
+  // 1) Even if all the child's changes are due to properties it inherits from
+  //    us, it's possible that no one ever asked us for those style structs and
+  //    hence changes to them aren't reflected in aHintForThisFrame at all.
+  // 2) Extensions can add/remove stylesheets that change the styles of
+  //    anonymous boxed directly.
   uint32_t equalStructs, samePointerStructs; // Not used, actually.
   nsChangeHint childHint = aChildFrame->StyleContext()->CalcStyleDifference(
     newContext,
     NS_HintsNotHandledForDescendantsIn(aHintForThisFrame),
     &equalStructs,
     &samePointerStructs);
   if (childHint) {
     aChangeList.AppendChange(aChildFrame, aChildFrame->GetContent(), childHint);