예제 #1
0
void LayoutReplica::layout()
{
    setFrameRect(parentBox()->borderBoxRect());
    addVisualOverflow(parentBox()->visualOverflowRect());
    updateLayerTransformAfterLayout();
    clearNeedsLayout();
}
예제 #2
0
void RenderReplica::layout()
{
    StackStats::LayoutCheckPoint layoutCheckPoint;
    setFrameRect(parentBox()->borderBoxRect());
    updateLayerTransform();
    clearNeedsLayout();
}
예제 #3
0
void RenderMultiColumnSet::updateLogicalWidth()
{
    RenderBlockFlow* parentBlock = toRenderBlockFlow(parent());
    setComputedColumnWidthAndCount(parentBlock->multiColumnFlowThread()->columnWidth(), parentBlock->multiColumnFlowThread()->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
    
    // FIXME: When we add regions support, we'll start it off at the width of the multi-column
    // block in that particular region.
    setLogicalWidth(parentBox()->contentLogicalWidth());
}
void RenderMultiColumnSet::computeLogicalWidth()
{
    // Our logical width starts off matching the column block itself.
    // This width will be fixed up after the flow thread lays out once it is determined exactly how many
    // columns we ended up holding.
    // FIXME: When we add regions support, we'll start it off at the width of the multi-column
    // block in that particular region.
    setLogicalWidth(parentBox()->contentLogicalWidth());
    
    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
    setComputedColumnWidthAndCount(parentBlock->columnWidth(), parentBlock->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
}
예제 #5
0
void RenderMultiColumnSet::updateLogicalWidth()
{
    RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread();
    setComputedColumnWidthAndCount(flowThread->columnWidth(), flowThread->columnCount());

    // FIXME: When we add regions support, we'll start it off at the width of the multi-column
    // block in that particular region.
    setLogicalWidth(parentBox()->contentLogicalWidth());

    // If we overflow, increase our logical width.
    unsigned colCount = columnCount();
    LayoutUnit colGap = columnGap();
    LayoutUnit minimumContentLogicalWidth = colCount * computedColumnWidth() + (colCount - 1) * colGap;
    LayoutUnit currentContentLogicalWidth = contentLogicalWidth();
    LayoutUnit delta = max(LayoutUnit(), minimumContentLogicalWidth - currentContentLogicalWidth);
    if (!delta)
        return;

    // Increase our logical width by the delta.
    setLogicalWidth(logicalWidth() + delta);
}
예제 #6
0
void LayoutListMarker::layout() {
  ASSERT(needsLayout());
  LayoutAnalyzer::Scope analyzer(*this);

  LayoutUnit blockOffset;
  for (LayoutBox* o = parentBox(); o && o != listItem(); o = o->parentBox()) {
    blockOffset += o->logicalTop();
  }
  if (listItem()->style()->isLeftToRightDirection()) {
    m_lineOffset = listItem()->logicalLeftOffsetForLine(
        blockOffset, DoNotIndentText, LayoutUnit());
  } else {
    m_lineOffset = listItem()->logicalRightOffsetForLine(
        blockOffset, DoNotIndentText, LayoutUnit());
  }
  if (isImage()) {
    updateMarginsAndContent();
    LayoutSize imageSize(imageBulletSize());
    setWidth(imageSize.width());
    setHeight(imageSize.height());
  } else {
    const SimpleFontData* fontData = style()->font().primaryFont();
    DCHECK(fontData);
    setLogicalWidth(minPreferredLogicalWidth());
    setLogicalHeight(
        LayoutUnit(fontData ? fontData->getFontMetrics().height() : 0));
  }

  setMarginStart(LayoutUnit());
  setMarginEnd(LayoutUnit());

  Length startMargin = style()->marginStart();
  Length endMargin = style()->marginEnd();
  if (startMargin.isFixed())
    setMarginStart(LayoutUnit(startMargin.value()));
  if (endMargin.isFixed())
    setMarginEnd(LayoutUnit(endMargin.value()));

  clearNeedsLayout();
}
void RenderMultiColumnSet::updateLogicalWidth()
{
    RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
    setComputedColumnWidthAndCount(parentBlock->columnWidth(), parentBlock->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
    
    // FIXME: When we add regions support, we'll start it off at the width of the multi-column
    // block in that particular region.
    setLogicalWidth(parentBox()->contentLogicalWidth());

    // If we overflow, increase our logical width.
    unsigned colCount = columnCount();
    if (!colCount)
        return;
    
    LayoutUnit colGap = columnGap();
    LayoutUnit minimumContentLogicalWidth = colCount * computedColumnWidth() + (colCount - 1) * colGap;
    LayoutUnit currentContentLogicalWidth = contentLogicalWidth();
    LayoutUnit delta = max(LayoutUnit(), minimumContentLogicalWidth - currentContentLogicalWidth);
    if (!delta)
        return;

    // Increase our logical width by the delta.
    setLogicalWidth(logicalWidth() + delta);
}
예제 #8
0
void RenderReplica::computePreferredLogicalWidths()
{
    m_minPreferredLogicalWidth = parentBox()->width();
    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
    setPreferredLogicalWidthsDirty(false);
}
예제 #9
0
void RenderReplica::layout()
{
    setFrameRect(parentBox()->borderBoxRect());
    setNeedsLayout(false);
}
예제 #10
0
void LayoutReplica::computePreferredLogicalWidths()
{
    m_minPreferredLogicalWidth = parentBox()->size().width();
    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
    clearPreferredLogicalWidthsDirty();
}
예제 #11
0
void RenderReplica::layout()
{
    setFrameRect(parentBox()->borderBoxRect());
    updateLayerTransform();
    setNeedsLayout(false);
}