void
nsRubyTextContainerFrame::BeginRTCLineLayout(nsPresContext* aPresContext,
                                             const nsHTMLReflowState& aReflowState)
{
  // Construct block reflow state and line layout
  nscoord consumedBSize = GetConsumedBSize();

  ClearLineCursor();

  mISize = 0;

  nsBlockReflowState state(aReflowState, aPresContext, this, true, true,
                           false, consumedBSize);

  NS_ASSERTION(!mLines.empty(),
    "There should be at least one line in the ruby text container");
  line_iterator firstLine = begin_lines();
  mLineLayout = mozilla::MakeUnique<nsLineLayout>(
                           state.mPresContext,
                           state.mReflowState.mFloatManager,
                           &state.mReflowState, &firstLine);
  mLineLayout->Init(&state, state.mMinLineHeight, state.mLineNumber);

  mozilla::WritingMode lineWM = aReflowState.mLineLayout->GetWritingMode();
  mozilla::LogicalRect lineRect(state.mContentArea);
  nscoord iStart = lineRect.IStart(lineWM);
  nscoord availISize = lineRect.ISize(lineWM);
  nscoord availBSize = NS_UNCONSTRAINEDSIZE;

  mLineLayout->BeginLineReflow(iStart, state.mBCoord,
                              availISize, availBSize,
                              false,
                              false,
                              lineWM, state.mContainerWidth);
}
Пример #2
0
 void split(const String& s_, Container& out_)
 {
   std::copy(begin_lines(s_), end_lines(s_), std::back_inserter(out_));
 }
Пример #3
0
 std::vector<String> split(const String& s_)
 {
   return std::vector<String>(begin_lines(s_), end_lines(s_));
 }
Пример #4
0
 iterator begin() const
 {
   return begin_lines(*_string);
 }