void RenderedPosition::positionInGraphicsLayerBacking(CompositedSelectionBound& bound) const { bound.layer = nullptr; bound.edgeTopInLayer = bound.edgeBottomInLayer = FloatPoint(); if (isNull()) return; LayoutRect rect = m_layoutObject->localCaretRect(m_inlineBox, m_offset); DeprecatedPaintLayer* layer = nullptr; bound.edgeTopInLayer = m_layoutObject->localToInvalidationBackingPoint(rect.minXMinYCorner(), &layer); bound.edgeBottomInLayer = m_layoutObject->localToInvalidationBackingPoint(rect.minXMaxYCorner(), nullptr); bound.layer = layer ? layer->graphicsLayerBacking() : nullptr; }
void MultiColumnFragmentainerGroup::columnIntervalForVisualRect(const LayoutRect& rect, unsigned& firstColumn, unsigned& lastColumn) const { bool isColumnProgressionInline = m_columnSet.multiColumnFlowThread()->progressionIsInline(); bool isFlippedColumnProgression = !m_columnSet.style()->isLeftToRightDirection() && isColumnProgressionInline; if (m_columnSet.isHorizontalWritingMode() == isColumnProgressionInline) { if (isFlippedColumnProgression) { firstColumn = columnIndexAtVisualPoint(rect.maxXMinYCorner()); lastColumn = columnIndexAtVisualPoint(rect.minXMinYCorner()); } else { firstColumn = columnIndexAtVisualPoint(rect.minXMinYCorner()); lastColumn = columnIndexAtVisualPoint(rect.maxXMinYCorner()); } } else { if (isFlippedColumnProgression) { firstColumn = columnIndexAtVisualPoint(rect.minXMaxYCorner()); lastColumn = columnIndexAtVisualPoint(rect.minXMinYCorner()); } else { firstColumn = columnIndexAtVisualPoint(rect.minXMinYCorner()); lastColumn = columnIndexAtVisualPoint(rect.minXMaxYCorner()); } } ASSERT(firstColumn <= lastColumn); }