Bug 1325355 part 2 - Rename nsIFrame::GetWritingMode to WritingModeForLine to make its purpose clearer. r=jfkthame

This commit is contained in:
Mats Palmgren 2016-12-31 18:16:32 +01:00
Родитель ea21a73fc7
Коммит dfeed3a85d
4 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -3893,7 +3893,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
#endif
WritingMode outerWM = aState.mReflowInput.GetWritingMode();
WritingMode lineWM = GetWritingMode(outerWM, aLine->mFirstChild);
WritingMode lineWM = WritingModeForLine(outerWM, aLine->mFirstChild);
LogicalRect lineRect =
aFloatAvailableSpace.mRect.ConvertTo(lineWM, outerWM,
aState.ContainerSize());

Просмотреть файл

@ -195,7 +195,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
// When there is no lineLayout provided, we provide our own. The
// only time that the first-letter-frame is not reflowing in a
// line context is when its floating.
WritingMode kidWritingMode = GetWritingMode(wm, kid);
WritingMode kidWritingMode = WritingModeForLine(wm, kid);
LogicalSize kidAvailSize = availSize.ConvertTo(kidWritingMode, wm);
ReflowInput rs(aPresContext, aReflowInput, kid, kidAvailSize);
nsLineLayout ll(aPresContext, nullptr, &aReflowInput, nullptr, nullptr);

Просмотреть файл

@ -1116,7 +1116,8 @@ nsIFrame::GetPaddingRect() const
}
WritingMode
nsIFrame::GetWritingMode(WritingMode aSelfWM, nsIFrame* aSubFrame) const
nsIFrame::WritingModeForLine(WritingMode aSelfWM,
nsIFrame* aSubFrame) const
{
MOZ_ASSERT(aSelfWM == GetWritingMode());
WritingMode writingMode = aSelfWM;

Просмотреть файл

@ -765,15 +765,16 @@ public:
}
/**
* Get the writing mode of this frame, but if it is styled with
* unicode-bidi: plaintext, reset the direction to the resolved paragraph
* Construct a writing mode for line layout in this frame. This is
* the writing mode of this frame, except that if this frame is styled with
* unicode-bidi:plaintext, we reset the direction to the resolved paragraph
* level of the given subframe (typically the first frame on the line),
* not this frame's writing mode, because the container frame could be split
* by hard line breaks into multiple paragraphs with different base direction.
* because the container frame could be split by hard line breaks into
* multiple paragraphs with different base direction.
* @param aSelfWM the WM of 'this'
*/
mozilla::WritingMode GetWritingMode(mozilla::WritingMode aSelfWM,
nsIFrame* aSubFrame) const;
mozilla::WritingMode WritingModeForLine(mozilla::WritingMode aSelfWM,
nsIFrame* aSubFrame) const;
/**
* Bounding rect of the frame. The values are in app units, and the origin is