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 374946 28ac9c36b726dcd0868292b77328712a1d2b3813
parent 374945 ebbc4be47d0a11590992defeba79340bbc3a761c
child 374947 2f9561ccd777eab9e51ede75eb5513cc57281f50
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, DONTBUILD
bugs1343771
milestone54.0a1
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);