Bug 1347411 part 4. Change the various anonymous boxes associated with framesets to be non-inheriting, since their styles aren't really used for anything. r?heycam draft
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 15 Mar 2017 11:48:29 -0400
changeset 499349 56d6685a2c636a75926155945a7d99ceffb636db
parent 499348 fca89ef3814a785b2e60b64dc4efc7914e8da8fe
child 499350 3488a0d4a37980d245bcb38683cb27eb6a42627d
push id49371
push userbzbarsky@mozilla.com
push dateWed, 15 Mar 2017 16:46:41 +0000
reviewersheycam
bugs1347411
milestone55.0a1
Bug 1347411 part 4. Change the various anonymous boxes associated with framesets to be non-inheriting, since their styles aren't really used for anything. r?heycam MozReview-Commit-ID: 1R3cLokbPwL
layout/generic/nsFrameSetFrame.cpp
layout/style/nsCSSAnonBoxList.h
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -330,18 +330,17 @@ nsHTMLFramesetFrame::Init(nsIContent*   
     }
   }
 
   mNonBlankChildCount = mChildCount;
   // add blank frames for frameset cells that had no content provided
   for (int blankX = mChildCount; blankX < numCells; blankX++) {
     RefPtr<nsStyleContext> pseudoStyleContext;
     pseudoStyleContext = shell->StyleSet()->
-      ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank,
-                                         mStyleContext);
+      ResolveNonInheritingAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank);
 
     // XXX the blank frame is using the content of its parent - at some point it
     // should just have null content, if we support that
     nsHTMLFramesetBlankFrame* blankFrame = new (shell) nsHTMLFramesetBlankFrame(pseudoStyleContext);
 
     blankFrame->Init(mContent, this, nullptr);
 
     mFrames.AppendFrame(nullptr, blankFrame);
@@ -907,18 +906,17 @@ nsHTMLFramesetFrame::Reflow(nsPresContex
 
     if (lastRow != cellIndex.y) {  // changed to next row
       offset.x = 0;
       offset.y += lastSize.height;
       if (firstTime) { // create horizontal border
 
         RefPtr<nsStyleContext> pseudoStyleContext;
         pseudoStyleContext = styleSet->
-          ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::horizontalFramesetBorder,
-                                             mStyleContext);
+          ResolveNonInheritingAnonymousBoxStyle(nsCSSAnonBoxes::horizontalFramesetBorder);
 
         borderFrame = new (shell) nsHTMLFramesetBorderFrame(pseudoStyleContext,
                                                             borderWidth,
                                                             false,
                                                             false);
         borderFrame->Init(mContent, this, nullptr);
         mChildCount++;
         mFrames.AppendFrame(nullptr, borderFrame);
@@ -937,18 +935,17 @@ nsHTMLFramesetFrame::Reflow(nsPresContex
       offset.y += borderWidth;
     } else {
       if (cellIndex.x > 0) {  // moved to next col in same row
         if (0 == cellIndex.y) { // in 1st row
           if (firstTime) { // create vertical border
 
             RefPtr<nsStyleContext> pseudoStyleContext;
             pseudoStyleContext = styleSet->
-              ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::verticalFramesetBorder,
-                                                 mStyleContext);
+              ResolveNonInheritingAnonymousBoxStyle(nsCSSAnonBoxes::verticalFramesetBorder);
 
             borderFrame = new (shell) nsHTMLFramesetBorderFrame(pseudoStyleContext,
                                                                 borderWidth,
                                                                 true,
                                                                 false);
             borderFrame->Init(mContent, this, nullptr);
             mChildCount++;
             mFrames.AppendFrame(nullptr, borderFrame);
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -43,26 +43,26 @@ CSS_NON_INHERITING_ANON_BOX(oofPlacehold
 CSS_ANON_BOX(firstLetterContinuation, ":-moz-first-letter-continuation")
 
 CSS_ANON_BOX(mozAnonymousBlock, ":-moz-anonymous-block")
 CSS_ANON_BOX(mozAnonymousPositionedBlock, ":-moz-anonymous-positioned-block")
 CSS_ANON_BOX(mozMathMLAnonymousBlock, ":-moz-mathml-anonymous-block")
 CSS_ANON_BOX(mozXULAnonymousBlock, ":-moz-xul-anonymous-block")
 
 // Framesets
-CSS_ANON_BOX(horizontalFramesetBorder, ":-moz-hframeset-border")
-CSS_ANON_BOX(verticalFramesetBorder, ":-moz-vframeset-border")
+CSS_NON_INHERITING_ANON_BOX(horizontalFramesetBorder, ":-moz-hframeset-border")
+CSS_NON_INHERITING_ANON_BOX(verticalFramesetBorder, ":-moz-vframeset-border")
 
 CSS_ANON_BOX(mozLineFrame, ":-moz-line-frame")
 
 CSS_ANON_BOX(buttonContent, ":-moz-button-content")
 CSS_ANON_BOX(cellContent, ":-moz-cell-content")
 CSS_ANON_BOX(dropDownList, ":-moz-dropdown-list")
 CSS_ANON_BOX(fieldsetContent, ":-moz-fieldset-content")
-CSS_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
+CSS_NON_INHERITING_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
 CSS_ANON_BOX(mozDisplayComboboxControlFrame, ":-moz-display-comboboxcontrol-frame")
 CSS_ANON_BOX(htmlCanvasContent, ":-moz-html-canvas-content")
 
 CSS_ANON_BOX(inlineTable, ":-moz-inline-table")
 CSS_ANON_BOX(table, ":-moz-table")
 CSS_ANON_BOX(tableCell, ":-moz-table-cell")
 CSS_ANON_BOX(tableColGroup, ":-moz-table-column-group")
 CSS_ANON_BOX(tableCol, ":-moz-table-column")