зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277131 : Part 3 - rename nsGkAtoms::tableOuterFrame and nsCSSAnonBoxes::tableOuter. r=heycam
MozReview-Commit-ID: 7GIjtUH9hdZ --HG-- extra : rebase_source : 818cead88e560effa402e183b4a642fd1a7b9191
This commit is contained in:
Родитель
4caee4596d
Коммит
5bcbb06586
|
@ -1679,12 +1679,12 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||
if (table) {
|
||||
nsIContent* parentContent = aContent->GetParent();
|
||||
nsIFrame* parentFrame = parentContent->GetPrimaryFrame();
|
||||
if (parentFrame->GetType() != nsGkAtoms::tableOuterFrame) {
|
||||
if (parentFrame->GetType() != nsGkAtoms::tableWrapperFrame) {
|
||||
parentContent = parentContent->GetParent();
|
||||
parentFrame = parentContent->GetPrimaryFrame();
|
||||
}
|
||||
|
||||
if (parentFrame->GetType() == nsGkAtoms::tableOuterFrame &&
|
||||
if (parentFrame->GetType() == nsGkAtoms::tableWrapperFrame &&
|
||||
table->GetContent() == parentContent) {
|
||||
newAcc = new HTMLTableRowAccessible(aContent, document);
|
||||
}
|
||||
|
|
|
@ -2015,7 +2015,7 @@ GK_ATOM(tableCellFrame, "TableCellFrame")
|
|||
GK_ATOM(tableColFrame, "TableColFrame")
|
||||
GK_ATOM(tableColGroupFrame, "TableColGroupFrame")
|
||||
GK_ATOM(tableFrame, "TableFrame")
|
||||
GK_ATOM(tableOuterFrame, "TableOuterFrame")
|
||||
GK_ATOM(tableWrapperFrame, "TableWrapperFrame")
|
||||
GK_ATOM(tableRowGroupFrame, "TableRowGroupFrame")
|
||||
GK_ATOM(tableRowFrame, "TableRowFrame")
|
||||
GK_ATOM(textInputFrame,"TextInputFrame")
|
||||
|
|
|
@ -338,7 +338,7 @@ nsGenericHTMLElement::GetOffsetRect(CSSIntRect& aRect)
|
|||
nsIFrame* parent = frame->GetParent();
|
||||
nsPoint origin(0, 0);
|
||||
|
||||
if (parent && parent->GetType() == nsGkAtoms::tableOuterFrame &&
|
||||
if (parent && parent->GetType() == nsGkAtoms::tableWrapperFrame &&
|
||||
frame->GetType() == nsGkAtoms::tableFrame) {
|
||||
origin = parent->GetPositionIgnoringScrolling();
|
||||
parent = parent->GetParent();
|
||||
|
|
|
@ -1940,7 +1940,7 @@ IsTablePseudo(nsIFrame* aFrame)
|
|||
(pseudoType == nsCSSAnonBoxes::cellContent &&
|
||||
aFrame->GetParent()->StyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::tableCell) ||
|
||||
(pseudoType == nsCSSAnonBoxes::tableOuter &&
|
||||
(pseudoType == nsCSSAnonBoxes::tableWrapper &&
|
||||
(aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo() ==
|
||||
nsCSSAnonBoxes::table ||
|
||||
aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo() ==
|
||||
|
@ -2072,7 +2072,7 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
|||
// create the pseudo SC for the table wrapper as a child of the inner SC
|
||||
RefPtr<nsStyleContext> outerStyleContext;
|
||||
outerStyleContext = mPresShell->StyleSet()->
|
||||
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableOuter, styleContext);
|
||||
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper, styleContext);
|
||||
|
||||
// Create the table wrapper frame which holds the caption and inner table frame
|
||||
nsContainerFrame* newFrame;
|
||||
|
@ -6659,7 +6659,7 @@ GetAdjustedParentFrame(nsContainerFrame* aParentFrame,
|
|||
nsIAtom* aParentFrameType,
|
||||
nsIContent* aChildContent)
|
||||
{
|
||||
NS_PRECONDITION(nsGkAtoms::tableOuterFrame != aParentFrameType,
|
||||
NS_PRECONDITION(nsGkAtoms::tableWrapperFrame != aParentFrameType,
|
||||
"Shouldn't be happening!");
|
||||
|
||||
nsContainerFrame* newParent = nullptr;
|
||||
|
@ -7955,7 +7955,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||
}
|
||||
|
||||
if (nsGkAtoms::tableFrame == frameType ||
|
||||
nsGkAtoms::tableOuterFrame == frameType) {
|
||||
nsGkAtoms::tableWrapperFrame == frameType) {
|
||||
PullOutCaptionFrames(frameItems, captionItems);
|
||||
}
|
||||
}
|
||||
|
@ -7986,8 +7986,8 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||
!IsFramePartOfIBSplit(frame2),
|
||||
"Neither should be ib-split");
|
||||
NS_ASSERTION((frame1->GetType() == nsGkAtoms::tableFrame &&
|
||||
frame2->GetType() == nsGkAtoms::tableOuterFrame) ||
|
||||
(frame1->GetType() == nsGkAtoms::tableOuterFrame &&
|
||||
frame2->GetType() == nsGkAtoms::tableWrapperFrame) ||
|
||||
(frame1->GetType() == nsGkAtoms::tableWrapperFrame &&
|
||||
frame2->GetType() == nsGkAtoms::tableFrame) ||
|
||||
frame1->GetType() == nsGkAtoms::fieldSetFrame ||
|
||||
(frame1->GetParent() &&
|
||||
|
@ -8025,7 +8025,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||
// table wrapper frame.
|
||||
if (captionItems.NotEmpty()) {
|
||||
NS_ASSERTION(nsGkAtoms::tableFrame == frameType ||
|
||||
nsGkAtoms::tableOuterFrame == frameType,
|
||||
nsGkAtoms::tableWrapperFrame == frameType,
|
||||
"parent for caption is not table?");
|
||||
// We need to determine where to put the caption items; start with the
|
||||
// the parent frame that has already been determined and get the insertion
|
||||
|
@ -8058,7 +8058,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||
// If the parent is not a table wrapper frame we will try to add frames
|
||||
// to a named child list that the parent does not honor and the frames
|
||||
// will get lost.
|
||||
NS_ASSERTION(nsGkAtoms::tableOuterFrame == outerTable->GetType(),
|
||||
NS_ASSERTION(nsGkAtoms::tableWrapperFrame == outerTable->GetType(),
|
||||
"Pseudo frame construction failure; "
|
||||
"a caption can be only a child of a table wrapper frame");
|
||||
|
||||
|
@ -8821,7 +8821,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
|||
} else if (nsGkAtoms::pageFrame == frameType) {
|
||||
nsContainerFrame* canvasFrame;
|
||||
newFrame = ConstructPageFrame(shell, aParentFrame, aFrame, canvasFrame);
|
||||
} else if (nsGkAtoms::tableOuterFrame == frameType) {
|
||||
} else if (nsGkAtoms::tableWrapperFrame == frameType) {
|
||||
newFrame =
|
||||
CreateContinuingOuterTableFrame(shell, aPresContext, aFrame, aParentFrame,
|
||||
content, styleContext);
|
||||
|
|
|
@ -1597,7 +1597,7 @@ nsLayoutUtils::GetClosestFrameOfType(nsIFrame* aFrame,
|
|||
nsIFrame*
|
||||
nsLayoutUtils::GetStyleFrame(nsIFrame* aFrame)
|
||||
{
|
||||
if (aFrame->GetType() == nsGkAtoms::tableOuterFrame) {
|
||||
if (aFrame->GetType() == nsGkAtoms::tableWrapperFrame) {
|
||||
nsIFrame* inner = aFrame->PrincipalChildList().FirstChild();
|
||||
// inner may be null, if aFrame is mid-destruction
|
||||
return inner;
|
||||
|
@ -3811,7 +3811,7 @@ AddBoxesForFrame(nsIFrame* aFrame,
|
|||
{
|
||||
nsIAtom* pseudoType = aFrame->StyleContext()->GetPseudo();
|
||||
|
||||
if (pseudoType == nsCSSAnonBoxes::tableOuter) {
|
||||
if (pseudoType == nsCSSAnonBoxes::tableWrapper) {
|
||||
AddBoxesForFrame(aFrame->PrincipalChildList().FirstChild(), aCallback);
|
||||
if (aCallback->mIncludeCaptionBoxForTable) {
|
||||
nsIFrame* kid = aFrame->GetChildList(nsIFrame::kCaptionList).FirstChild();
|
||||
|
@ -3846,7 +3846,7 @@ nsLayoutUtils::GetFirstNonAnonymousFrame(nsIFrame* aFrame)
|
|||
while (aFrame) {
|
||||
nsIAtom* pseudoType = aFrame->StyleContext()->GetPseudo();
|
||||
|
||||
if (pseudoType == nsCSSAnonBoxes::tableOuter) {
|
||||
if (pseudoType == nsCSSAnonBoxes::tableWrapper) {
|
||||
nsIFrame* f = GetFirstNonAnonymousFrame(aFrame->PrincipalChildList().FirstChild());
|
||||
if (f) {
|
||||
return f;
|
||||
|
@ -6169,7 +6169,7 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
|
|||
// For the first-line baseline we also have to check for a table, and if
|
||||
// so, use the baseline of its first row.
|
||||
nsIAtom* fType = aFrame->GetType();
|
||||
if (fType == nsGkAtoms::tableOuterFrame) {
|
||||
if (fType == nsGkAtoms::tableWrapperFrame) {
|
||||
aResult->mBStart = 0;
|
||||
aResult->mBaseline = aFrame->GetLogicalBaseline(aWM);
|
||||
// This is what we want for the list bullet caller; not sure if
|
||||
|
|
|
@ -348,7 +348,7 @@ public:
|
|||
* Given a frame which is the primary frame for an element,
|
||||
* return the frame that has the non-pseudoelement style context for
|
||||
* the content.
|
||||
* This is aPrimaryFrame itself except for tableOuter frames.
|
||||
* This is aPrimaryFrame itself except for tableWrapper frames.
|
||||
*
|
||||
* Given a non-null input, this will return null if and only if its
|
||||
* argument is a table wrapper frame that is mid-destruction (and its
|
||||
|
@ -360,7 +360,7 @@ public:
|
|||
* Given a content node,
|
||||
* return the frame that has the non-pseudoelement style context for
|
||||
* the content. May return null.
|
||||
* This is aContent->GetPrimaryFrame() except for tableOuter frames.
|
||||
* This is aContent->GetPrimaryFrame() except for tableWrapper frames.
|
||||
*/
|
||||
static nsIFrame* GetStyleFrame(const nsIContent* aContent);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ VP 00B97C30 r=1 a=9180,4470 c=9180,4470 cnt=863
|
|||
block 02D7B210 r=1 a=9180,UC c=8940,UC cnt=868
|
||||
text 02D7B3F8 r=0 a=8940,UC c=UC,UC cnt=869
|
||||
text 02D7B3F8 d=0,0
|
||||
tblO 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870
|
||||
tblW 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870
|
||||
tbl 02D7B7EC r=0 a=8940,UC c=1500,UC cnt=871
|
||||
rowG 00B984A4 r=0 a=UC,UC c=UC,UC cnt=872
|
||||
row 02D7BAF8 r=0 a=UC,UC c=UC,UC cnt=873
|
||||
|
@ -119,7 +119,7 @@ VP 00B97C30 r=1 a=9180,4470 c=9180,4470 cnt=863
|
|||
col 02D7C0D8 d=0,0
|
||||
colG 02D7BFB0 d=0,0
|
||||
tbl 02D7B7EC d=1500,390
|
||||
tblO 02D7B5F0 d=1500,390
|
||||
tblW 02D7B5F0 d=1500,390
|
||||
text 02D7C130 r=0 a=8940,UC c=UC,UC cnt=885
|
||||
text 02D7C130 d=0,0
|
||||
block 02D7B210 d=8940,390
|
||||
|
@ -141,7 +141,7 @@ The first line shows the reflow of the viewport (<code class="log">VP</code>). T
|
|||
|
||||
<p>The available width is 9180 twips. The available height is 4470 twips (<code class="log">a=9180,4470</code>). The computed width is 9180 twips. The computed height is 4470 twips (<code class="log">c=9180,4470</code>). The line count is 856 (<code class="log">cnt=856</code>).
|
||||
<p>
|
||||
Below this is a line that reads:<p><code class="log">tblO 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870</code></p><p> Here the <code class="log">UC</code> shows that on initial reflow the available height for the table wrapper frame is unconstrained.
|
||||
Below this is a line that reads:<p><code class="log">tblW 02D7B5F0 r=0 a=8940,UC c=0,0 cnt=870</code></p><p> Here the <code class="log">UC</code> shows that on initial reflow the available height for the table wrapper frame is unconstrained.
|
||||
<p>
|
||||
The table cell requires its children to compute the MES. It is reported back from the block as:
|
||||
<p><code class="log">block 02D7BCF8 d=300,300 me=300</code></p>
|
||||
|
@ -186,7 +186,7 @@ The entries in the reflow log can be controlled on a frame level. For instance
|
|||
<tr><td>col</td><td>tableCol</td></tr>
|
||||
<tr><td>colG</td><td>tableColGroup</td></tr>
|
||||
<tr><td> tbl</td><td>table</td></tr>
|
||||
<tr><td>tblO</td><td>tableOuter</td></tr>
|
||||
<tr><td>tblW</td><td>tableWrapper</td></tr>
|
||||
<tr><td>rowG</td><td>tableRowGroup</td></tr>
|
||||
<tr><td>row</td><td>tableRow</td></tr>
|
||||
<tr><td>textCtl</td><td>textInput</td></tr>
|
||||
|
|
|
@ -417,7 +417,7 @@
|
|||
<tr>
|
||||
<td width=100%>
|
||||
<pre style="font-size:.6em;">
|
||||
tblO 030176CC r=0 a=8940,UC c=0,0 cnt=429
|
||||
tblW 030176CC r=0 a=8940,UC c=0,0 cnt=429
|
||||
tbl 030178C4 r=0 a=8940,UC c=4470,UC cnt=430
|
||||
rowG 03017A7C r=0 a=UC,UC c=UC,UC cnt=431
|
||||
row 03017C08 r=0 a=UC,UC c=UC,UC cnt=432
|
||||
|
@ -444,7 +444,7 @@ tblO 030176CC r=0 a=8940,UC c=0,0 cnt=429
|
|||
row 03017C08 d=4470,360
|
||||
rowG 03017A7C d=4470,360
|
||||
tbl 030178C4 d=4500,450
|
||||
tblO 030176CC d=4500,450
|
||||
tblW 030176CC d=4500,450
|
||||
|
||||
<a href="frame_reflow_debug.html">frame reflow debugging</a> gives instructions
|
||||
for turning this on.
|
||||
|
|
|
@ -833,7 +833,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
|
|||
|
||||
if(prevFrame) {
|
||||
//get the frame type
|
||||
if (nsGkAtoms::tableOuterFrame == prevFrame->GetType()) {
|
||||
if (nsGkAtoms::tableWrapperFrame == prevFrame->GetType()) {
|
||||
//see if it has "align="
|
||||
// IE makes a difference between align and he float property
|
||||
nsIContent* content = prevFrame->GetContent();
|
||||
|
|
|
@ -1027,7 +1027,7 @@ GetFirstNonAnonBoxDescendant(nsIFrame* aFrame)
|
|||
// column, we'll always return the column. This is fine; we're really just
|
||||
// looking for a handle to *anything* with a meaningful content node inside
|
||||
// the table, for use in DOM comparisons to things outside of the table.)
|
||||
if (MOZ_UNLIKELY(aFrame->GetType() == nsGkAtoms::tableOuterFrame)) {
|
||||
if (MOZ_UNLIKELY(aFrame->GetType() == nsGkAtoms::tableWrapperFrame)) {
|
||||
nsIFrame* captionDescendant =
|
||||
GetFirstNonAnonBoxDescendant(aFrame->GetChildList(kCaptionList).FirstChild());
|
||||
if (captionDescendant) {
|
||||
|
|
|
@ -6779,7 +6779,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
|
|||
isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
|
||||
if ( isEditor )
|
||||
{
|
||||
if (resultFrame->GetType() == nsGkAtoms::tableOuterFrame)
|
||||
if (resultFrame->GetType() == nsGkAtoms::tableWrapperFrame)
|
||||
{
|
||||
if (((point.x - offset.x + tempRect.x)<0) || ((point.x - offset.x+ tempRect.x)>tempRect.width))//off left/right side
|
||||
{
|
||||
|
@ -7244,55 +7244,56 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
|
|||
NS_ASSERTION(iter, "GetLineNumber() succeeded but no block frame?");
|
||||
result = NS_OK;
|
||||
|
||||
int edgeCase = 0;//no edge case. this should look at thisLine
|
||||
int edgeCase = 0; // no edge case. this should look at thisLine
|
||||
|
||||
bool doneLooping = false;//tells us when no more block frames hit.
|
||||
//this part will find a frame or a block frame. if it's a block frame
|
||||
//it will "drill down" to find a viable frame or it will return an error.
|
||||
bool doneLooping = false; // tells us when no more block frames hit.
|
||||
// this part will find a frame or a block frame. if it's a block frame
|
||||
// it will "drill down" to find a viable frame or it will return an error.
|
||||
nsIFrame *lastFrame = this;
|
||||
do {
|
||||
result = nsFrame::GetNextPrevLineFromeBlockFrame(PresContext(),
|
||||
aPos,
|
||||
blockFrame,
|
||||
thisLine,
|
||||
edgeCase //start from thisLine
|
||||
);
|
||||
if (NS_SUCCEEDED(result) && (!aPos->mResultFrame || aPos->mResultFrame == lastFrame))//we came back to same spot! keep going
|
||||
{
|
||||
edgeCase); // start from thisLine
|
||||
|
||||
// we came back to same spot! keep going
|
||||
if (NS_SUCCEEDED(result) &&
|
||||
(!aPos->mResultFrame || aPos->mResultFrame == lastFrame)) {
|
||||
aPos->mResultFrame = nullptr;
|
||||
if (aPos->mDirection == eDirPrevious)
|
||||
thisLine--;
|
||||
else
|
||||
thisLine++;
|
||||
}
|
||||
else //if failure or success with different frame.
|
||||
doneLooping = true; //do not continue with while loop
|
||||
} else // if failure or success with different frame.
|
||||
doneLooping = true; // do not continue with while loop
|
||||
|
||||
lastFrame = aPos->mResultFrame; //set last frame
|
||||
lastFrame = aPos->mResultFrame; // set last frame
|
||||
|
||||
if (NS_SUCCEEDED(result) && aPos->mResultFrame
|
||||
&& blockFrame != aPos->mResultFrame)// make sure block element is not the same as the one we had before
|
||||
{
|
||||
/* SPECIAL CHECK FOR TABLE NAVIGATION
|
||||
tables need to navigate also and the frame that supports it is nsTableRowGroupFrame which is INSIDE
|
||||
nsTableWrapperFrame. if we have stumbled onto an nsTableOuter we need to drill into nsTableRowGroup
|
||||
if we hit a header or footer that's ok just go into them,
|
||||
*/
|
||||
// make sure block element is not the same as the one we had before
|
||||
if (NS_SUCCEEDED(result) &&
|
||||
aPos->mResultFrame &&
|
||||
blockFrame != aPos->mResultFrame) {
|
||||
/* SPECIAL CHECK FOR TABLE NAVIGATION
|
||||
tables need to navigate also and the frame that supports it is
|
||||
nsTableRowGroupFrame which is INSIDE nsTableWrapperFrame.
|
||||
If we have stumbled onto an nsTableWrapperFrame we need to drill
|
||||
into nsTableRowGroup if we hit a header or footer that's ok just
|
||||
go into them.
|
||||
*/
|
||||
bool searchTableBool = false;
|
||||
if (aPos->mResultFrame->GetType() == nsGkAtoms::tableOuterFrame ||
|
||||
aPos->mResultFrame->GetType() == nsGkAtoms::tableCellFrame)
|
||||
{
|
||||
nsIFrame *frame = aPos->mResultFrame->PrincipalChildList().FirstChild();
|
||||
//got the table frame now
|
||||
while(frame) //ok time to drill down to find iterator
|
||||
{
|
||||
if (aPos->mResultFrame->GetType() == nsGkAtoms::tableWrapperFrame ||
|
||||
aPos->mResultFrame->GetType() == nsGkAtoms::tableCellFrame) {
|
||||
nsIFrame* frame = aPos->mResultFrame->PrincipalChildList().FirstChild();
|
||||
// got the table frame now
|
||||
// ok time to drill down to find iterator
|
||||
while (frame) {
|
||||
iter = frame->GetLineIterator();
|
||||
if (iter)
|
||||
{
|
||||
if (iter) {
|
||||
aPos->mResultFrame = frame;
|
||||
searchTableBool = true;
|
||||
result = NS_OK;
|
||||
break; //while(frame)
|
||||
break; // while(frame)
|
||||
}
|
||||
result = NS_ERROR_FAILURE;
|
||||
frame = frame->PrincipalChildList().FirstChild();
|
||||
|
@ -7303,21 +7304,20 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
|
|||
iter = aPos->mResultFrame->GetLineIterator();
|
||||
result = iter ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
if (NS_SUCCEEDED(result) && iter)//we've struck another block element!
|
||||
{
|
||||
|
||||
// we've struck another block element!
|
||||
if (NS_SUCCEEDED(result) && iter) {
|
||||
doneLooping = false;
|
||||
if (aPos->mDirection == eDirPrevious)
|
||||
edgeCase = 1;//far edge, search from end backwards
|
||||
edgeCase = 1; // far edge, search from end backwards
|
||||
else
|
||||
edgeCase = -1;//near edge search from beginning onwards
|
||||
thisLine=0;//this line means nothing now.
|
||||
//everything else means something so keep looking "inside" the block
|
||||
edgeCase = -1; // near edge search from beginning onwards
|
||||
thisLine = 0; // this line means nothing now.
|
||||
// everything else means something so keep looking "inside" the block
|
||||
blockFrame = aPos->mResultFrame;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
result = NS_OK;//THIS is to mean that everything is ok to the containing while loop
|
||||
} else {
|
||||
// THIS is to mean that everything is ok to the containing while loop
|
||||
result = NS_OK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -8357,7 +8357,7 @@ GetCorrectedParent(const nsIFrame* aFrame)
|
|||
// table, that actually means its the _inner_ table that wants to
|
||||
// know its parent. So get the pseudo of the inner in that case.
|
||||
nsIAtom* pseudo = aFrame->StyleContext()->GetPseudo();
|
||||
if (pseudo == nsCSSAnonBoxes::tableOuter) {
|
||||
if (pseudo == nsCSSAnonBoxes::tableWrapper) {
|
||||
pseudo = aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo();
|
||||
}
|
||||
return nsFrame::CorrectStyleParentFrame(parent, pseudo);
|
||||
|
@ -8442,7 +8442,7 @@ nsFrame::DoGetParentStyleContext(nsIFrame** aProviderFrame) const
|
|||
mContent->GetPrimaryFrame() == this) ||
|
||||
/* if next is true then it's really a request for the table frame's
|
||||
parent context, see nsTable[Outer]Frame::GetParentStyleContext. */
|
||||
pseudo == nsCSSAnonBoxes::tableOuter) {
|
||||
pseudo == nsCSSAnonBoxes::tableWrapper) {
|
||||
nsStyleContext* sc = fm->GetDisplayContentsStyleFor(parentContent);
|
||||
if (MOZ_UNLIKELY(sc)) {
|
||||
return sc;
|
||||
|
@ -10118,7 +10118,7 @@ void DR_State::InitFrameTypeTable()
|
|||
AddFrameTypeInfo(nsGkAtoms::tableColFrame, "col", "tableCol");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableColGroupFrame, "colG", "tableColGroup");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableFrame, "tbl", "table");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableOuterFrame, "tblO", "tableOuter");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableWrapperFrame, "tblW", "tableWrapper");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableRowGroupFrame, "rowG", "tableRowGroup");
|
||||
AddFrameTypeInfo(nsGkAtoms::tableRowFrame, "row", "tableRow");
|
||||
AddFrameTypeInfo(nsGkAtoms::textInputFrame, "textCtl", "textInput");
|
||||
|
@ -10130,7 +10130,7 @@ void DR_State::InitFrameTypeTable()
|
|||
AddFrameTypeInfo(nsGkAtoms::sliderFrame, "Slider", "Slider");
|
||||
AddFrameTypeInfo(nsGkAtoms::popupSetFrame, "PopupSet", "PopupSet");
|
||||
#endif
|
||||
AddFrameTypeInfo(nullptr, "unknown", "unknown");
|
||||
AddFrameTypeInfo(nullptr, "unknown", "unknown");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2646,7 +2646,7 @@ nsHTMLReflowState::CalculateBlockSideMargins(nsIAtom* aFrameType)
|
|||
// First check if there is an HTML alignment that we should honor
|
||||
const nsHTMLReflowState* prs = mParentReflowState;
|
||||
if (aFrameType == nsGkAtoms::tableFrame) {
|
||||
NS_ASSERTION(prs->frame->GetType() == nsGkAtoms::tableOuterFrame,
|
||||
NS_ASSERTION(prs->frame->GetType() == nsGkAtoms::tableWrapperFrame,
|
||||
"table not inside table wrapper");
|
||||
// Center the table within the table wrapper based on the alignment
|
||||
// of the table wrapper's parent.
|
||||
|
|
|
@ -39,7 +39,7 @@ bool
|
|||
nsIFrame::IsTableCaption() const
|
||||
{
|
||||
return StyleDisplay()->mDisplay == NS_STYLE_DISPLAY_TABLE_CAPTION &&
|
||||
GetParent()->StyleContext()->GetPseudo() == nsCSSAnonBoxes::tableOuter;
|
||||
GetParent()->StyleContext()->GetPseudo() == nsCSSAnonBoxes::tableWrapper;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -45,7 +45,7 @@ nsMathMLmrowFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
nsIFrame* frame = mFrames.FirstChild();
|
||||
for ( ; frame; frame = frame->PrincipalChildList().FirstChild()) {
|
||||
// drill down to the real mtable
|
||||
if (frame->GetType() == nsGkAtoms::tableOuterFrame)
|
||||
if (frame->GetType() == nsGkAtoms::tableWrapperFrame)
|
||||
return frame->AttributeChanged(aNameSpaceID, aAttribute, aModType);
|
||||
}
|
||||
NS_NOTREACHED("mtable wrapper without the real table frame");
|
||||
|
|
|
@ -52,7 +52,7 @@ 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")
|
||||
CSS_ANON_BOX(tableOuter, ":-moz-table-outer")
|
||||
CSS_ANON_BOX(tableWrapper, ":-moz-table-outer")
|
||||
CSS_ANON_BOX(tableRowGroup, ":-moz-table-row-group")
|
||||
CSS_ANON_BOX(tableRow, ":-moz-table-row")
|
||||
|
||||
|
|
|
@ -221,12 +221,14 @@ nsComputedDOMStyle::nsComputedDOMStyle(dom::Element* aElement,
|
|||
const nsAString& aPseudoElt,
|
||||
nsIPresShell* aPresShell,
|
||||
StyleType aStyleType)
|
||||
: mDocumentWeak(nullptr), mOuterFrame(nullptr),
|
||||
mInnerFrame(nullptr), mPresShell(nullptr),
|
||||
mStyleType(aStyleType),
|
||||
mStyleContextGeneration(0),
|
||||
mExposeVisitedStyle(false),
|
||||
mResolvedStyleContext(false)
|
||||
: mDocumentWeak(nullptr)
|
||||
, mOuterFrame(nullptr)
|
||||
, mInnerFrame(nullptr)
|
||||
, mPresShell(nullptr)
|
||||
, mStyleType(aStyleType)
|
||||
, mStyleContextGeneration(0)
|
||||
, mExposeVisitedStyle(false)
|
||||
, mResolvedStyleContext(false)
|
||||
{
|
||||
MOZ_ASSERT(aElement && aPresShell);
|
||||
|
||||
|
@ -263,7 +265,6 @@ nsComputedDOMStyle::nsComputedDOMStyle(dom::Element* aElement,
|
|||
MOZ_ASSERT(aPresShell->GetPresContext());
|
||||
}
|
||||
|
||||
|
||||
nsComputedDOMStyle::~nsComputedDOMStyle()
|
||||
{
|
||||
ClearStyleContext();
|
||||
|
@ -325,7 +326,6 @@ nsComputedDOMStyle::SetPropertyValue(const nsCSSProperty aPropID,
|
|||
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::GetCssText(nsAString& aCssText)
|
||||
{
|
||||
|
@ -334,14 +334,12 @@ nsComputedDOMStyle::GetCssText(nsAString& aCssText)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::SetCssText(const nsAString& aCssText)
|
||||
{
|
||||
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::GetLength(uint32_t* aLength)
|
||||
{
|
||||
|
@ -363,7 +361,6 @@ nsComputedDOMStyle::GetLength(uint32_t* aLength)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::GetParentRule(nsIDOMCSSRule** aParentRule)
|
||||
{
|
||||
|
@ -372,7 +369,6 @@ nsComputedDOMStyle::GetParentRule(nsIDOMCSSRule** aParentRule)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::GetPropertyValue(const nsAString& aPropertyName,
|
||||
nsAString& aReturn)
|
||||
|
@ -676,7 +672,7 @@ nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush)
|
|||
mInnerFrame = mOuterFrame;
|
||||
if (mOuterFrame) {
|
||||
nsIAtom* type = mOuterFrame->GetType();
|
||||
if (type == nsGkAtoms::tableOuterFrame) {
|
||||
if (type == nsGkAtoms::tableWrapperFrame) {
|
||||
// If the frame is a table wrapper frame then we should get the style
|
||||
// from the inner table frame.
|
||||
mInnerFrame = mOuterFrame->PrincipalChildList().FirstChild();
|
||||
|
@ -824,7 +820,6 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAString& aPropertyName, ErrorRes
|
|||
return val.forget();
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::RemoveProperty(const nsAString& aPropertyName,
|
||||
nsAString& aReturn)
|
||||
|
@ -842,7 +837,6 @@ nsComputedDOMStyle::GetPropertyPriority(const nsAString& aPropertyName,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::SetProperty(const nsAString& aPropertyName,
|
||||
const nsAString& aValue,
|
||||
|
@ -851,7 +845,6 @@ nsComputedDOMStyle::SetProperty(const nsAString& aPropertyName,
|
|||
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsComputedDOMStyle::Item(uint32_t aIndex, nsAString& aReturn)
|
||||
{
|
||||
|
@ -859,7 +852,8 @@ nsComputedDOMStyle::Item(uint32_t aIndex, nsAString& aReturn)
|
|||
}
|
||||
|
||||
void
|
||||
nsComputedDOMStyle::IndexedGetter(uint32_t aIndex, bool& aFound,
|
||||
nsComputedDOMStyle::IndexedGetter(uint32_t aIndex,
|
||||
bool& aFound,
|
||||
nsAString& aPropName)
|
||||
{
|
||||
nsComputedStyleMap* map = GetComputedStyleMap();
|
||||
|
@ -1856,9 +1850,9 @@ nsComputedDOMStyle::DoGetBackgroundColor()
|
|||
return val.forget();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
SetValueToCalc(const nsStyleCoord::CalcValue *aCalc, nsROCSSPrimitiveValue *aValue)
|
||||
SetValueToCalc(const nsStyleCoord::CalcValue* aCalc,
|
||||
nsROCSSPrimitiveValue* aValue)
|
||||
{
|
||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||
nsAutoString tmp, result;
|
||||
|
@ -1883,9 +1877,9 @@ SetValueToCalc(const nsStyleCoord::CalcValue *aCalc, nsROCSSPrimitiveValue *aVal
|
|||
}
|
||||
|
||||
static void
|
||||
AppendCSSGradientLength(const nsStyleCoord& aValue,
|
||||
AppendCSSGradientLength(const nsStyleCoord& aValue,
|
||||
nsROCSSPrimitiveValue* aPrimitive,
|
||||
nsAString& aString)
|
||||
nsAString& aString)
|
||||
{
|
||||
nsAutoString tokenString;
|
||||
if (aValue.IsCalcUnit())
|
||||
|
@ -1900,8 +1894,8 @@ AppendCSSGradientLength(const nsStyleCoord& aValue,
|
|||
|
||||
static void
|
||||
AppendCSSGradientToBoxPosition(const nsStyleGradient* aGradient,
|
||||
nsAString& aString,
|
||||
bool& aNeedSep)
|
||||
nsAString& aString,
|
||||
bool& aNeedSep)
|
||||
{
|
||||
float xValue = aGradient->mBgPosX.GetPercentValue();
|
||||
float yValue = aGradient->mBgPosY.GetPercentValue();
|
||||
|
|
|
@ -180,7 +180,7 @@ nsTableCellFrame::NeedsToObserve(const nsHTMLReflowState& aReflowState)
|
|||
// instead of bsizes for orthogonal children.
|
||||
return rs->frame == this &&
|
||||
(PresContext()->CompatibilityMode() == eCompatibility_NavQuirks ||
|
||||
fType == nsGkAtoms::tableOuterFrame);
|
||||
fType == nsGkAtoms::tableWrapperFrame);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -1013,7 +1013,7 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
|
|||
nsIAtom*
|
||||
nsTableWrapperFrame::GetType() const
|
||||
{
|
||||
return nsGkAtoms::tableOuterFrame;
|
||||
return nsGkAtoms::tableWrapperFrame;
|
||||
}
|
||||
|
||||
/* ----- global methods ----- */
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
* @see nsGkAtoms::tableOuterFrame
|
||||
* @see nsGkAtoms::tableWrapperFrame
|
||||
*/
|
||||
virtual nsIAtom* GetType() const override;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче