本文整理汇总了C++中InlineBox::isSVGInlineTextBox方法的典型用法代码示例。如果您正苦于以下问题:C++ InlineBox::isSVGInlineTextBox方法的具体用法?C++ InlineBox::isSVGInlineTextBox怎么用?C++ InlineBox::isSVGInlineTextBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InlineBox
的用法示例。
在下文中一共展示了InlineBox::isSVGInlineTextBox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paint
void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(!paintInfo.context->paintingDisabled());
bool isPrinting = renderSVGText().document().printing();
bool hasSelection = !isPrinting && selectionState() != RenderObject::SelectionNone;
PaintInfo childPaintInfo(paintInfo);
if (hasSelection) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo);
}
}
SVGRenderingContext renderingContext(renderSVGText(), paintInfo, SVGRenderingContext::SaveGraphicsContext);
if (renderingContext.isRenderingPrepared()) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(&toSVGInlineTextBox(child)->renderer());
child->paint(paintInfo, LayoutPoint(), 0, 0);
}
}
}
示例2: paint
void SVGRootInlineBox::paint(PaintInfo& paintInfo, int, int)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(!paintInfo.context->paintingDisabled());
RenderObject* boxRenderer = renderer();
ASSERT(boxRenderer);
bool isPrinting = renderer()->document()->printing();
bool hasSelection = !isPrinting && selectionState() != RenderObject::SelectionNone;
PaintInfo childPaintInfo(paintInfo);
if (hasSelection) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
static_cast<SVGInlineTextBox*>(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
}
}
childPaintInfo.context->save();
if (SVGRenderSupport::prepareToRenderSVGContent(boxRenderer, childPaintInfo)) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
child->paint(childPaintInfo, 0, 0);
}
}
SVGRenderSupport::finishRenderSVGContent(boxRenderer, childPaintInfo, paintInfo.context);
childPaintInfo.context->restore();
}
示例3: layoutCharactersInTextBoxes
void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGTextLayoutEngine& characterLayout)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox()) {
ASSERT(child->renderer().isSVGInlineText());
SVGInlineTextBox* textBox = toSVGInlineTextBox(child);
characterLayout.layoutInlineTextBox(textBox);
} else {
// Skip generated content.
Node* node = child->renderer().node();
if (!node)
continue;
ASSERT_WITH_SECURITY_IMPLICATION(child->isInlineFlowBox());
SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
bool isTextPath = node->hasTagName(SVGNames::textPathTag);
if (isTextPath) {
// Build text chunks for all <textPath> children, using the line layout algorithm.
// This is needeed as text-anchor is just an additional startOffset for text paths.
SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes());
layoutCharactersInTextBoxes(flowBox, lineLayout);
characterLayout.beginTextPathLayout(&child->renderer(), lineLayout);
}
layoutCharactersInTextBoxes(flowBox, characterLayout);
if (isTextPath)
characterLayout.endTextPathLayout();
}
}
}
示例4: layoutChildBoxes
void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, FloatRect* childRect)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
FloatRect boxRect;
if (child->isSVGInlineTextBox()) {
ASSERT(child->renderer().isSVGInlineText());
SVGInlineTextBox* textBox = toSVGInlineTextBox(child);
boxRect = textBox->calculateBoundaries();
textBox->setX(boxRect.x());
textBox->setY(boxRect.y());
textBox->setLogicalWidth(boxRect.width());
textBox->setLogicalHeight(boxRect.height());
} else {
// Skip generated content.
if (!child->renderer().node())
continue;
ASSERT_WITH_SECURITY_IMPLICATION(child->isInlineFlowBox());
SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
layoutChildBoxes(flowBox);
boxRect = flowBox->calculateBoundaries();
flowBox->setX(boxRect.x());
flowBox->setY(boxRect.y());
flowBox->setLogicalWidth(boxRect.width());
flowBox->setLogicalHeight(boxRect.height());
}
if (childRect)
childRect->unite(boxRect);
}
}
示例5: layoutChildBoxes
void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox()) {
ASSERT(child->renderer());
ASSERT(child->renderer()->isSVGInlineText());
SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(child);
IntRect boxRect = textBox->calculateBoundaries();
textBox->setX(boxRect.x());
textBox->setY(boxRect.y());
textBox->setLogicalWidth(boxRect.width());
textBox->setLogicalHeight(boxRect.height());
} else {
ASSERT(child->isInlineFlowBox());
// Skip generated content.
if (!child->renderer()->node())
continue;
SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
layoutChildBoxes(flowBox);
IntRect boxRect = flowBox->calculateBoundaries();
flowBox->setX(boxRect.x());
flowBox->setY(boxRect.y());
flowBox->setLogicalWidth(boxRect.width());
flowBox->setLogicalHeight(boxRect.height());
}
}
}
示例6: layoutCharactersInTextBoxes
void SVGTextLayoutEngine::layoutCharactersInTextBoxes(InlineFlowBox* start)
{
bool textLengthSpacingInEffect = m_textLengthSpacingInEffect || definesTextLengthWithSpacing(start);
TemporaryChange<bool> textLengthSpacingScope(m_textLengthSpacingInEffect, textLengthSpacingInEffect);
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox()) {
ASSERT(child->layoutObject().isSVGInlineText());
layoutInlineTextBox(toSVGInlineTextBox(child));
} else {
// Skip generated content.
Node* node = child->layoutObject().node();
if (!node)
continue;
SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
bool isTextPath = isSVGTextPathElement(*node);
if (isTextPath)
beginTextPathLayout(flowBox);
layoutCharactersInTextBoxes(flowBox);
if (isTextPath)
endTextPathLayout();
}
}
}
示例7: paint
void SVGRootInlineBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
bool hasSelection = !paintInfo.isPrinting() && m_svgRootInlineBox.selectionState() != SelectionNone;
PaintInfo paintInfoBeforeFiltering(paintInfo);
if (hasSelection && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfoBeforeFiltering.context, m_svgRootInlineBox.layoutObject(),
paintInfoBeforeFiltering.phase, paintOffset)) {
LayoutObjectDrawingRecorder recorder(*paintInfoBeforeFiltering.context, m_svgRootInlineBox.layoutObject(), paintInfoBeforeFiltering.phase,
paintInfoBeforeFiltering.cullRect().m_rect, paintOffset);
for (InlineBox* child = m_svgRootInlineBox.firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBackground(paintInfoBeforeFiltering);
else if (child->isSVGInlineFlowBox())
SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBackground(paintInfoBeforeFiltering);
}
}
SVGPaintContext paintContext(m_svgRootInlineBox.layoutObject(), paintInfoBeforeFiltering);
if (paintContext.applyClipMaskAndFilterIfNecessary()) {
for (InlineBox* child = m_svgRootInlineBox.firstChild(); child; child = child->nextOnLine())
child->paint(paintContext.paintInfo(), paintOffset, 0, 0);
}
}
示例8: calculateBoundaries
LayoutRect SVGInlineFlowBox::calculateBoundaries() const
{
LayoutRect childRect;
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox())
continue;
childRect.unite(child->calculateBoundaries());
}
return childRect;
}
示例9: nodeAtPoint
bool SVGRootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction hitTestAction)
{
for (InlineBox* leaf = firstLeafChild(); leaf; leaf = leaf->nextLeafChild()) {
if (!leaf->isSVGInlineTextBox())
continue;
if (leaf->nodeAtPoint(request, result, locationInContainer, accumulatedOffset, lineTop, lineBottom, hitTestAction))
return true;
}
return false;
}
示例10: paintSelectionBackground
void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
PaintInfo childPaintInfo(paintInfo);
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo);
}
}
示例11: paintSelectionBackground
void SVGInlineFlowBoxPainter::paintSelectionBackground(const PaintInfo& paintInfo)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
PaintInfo childPaintInfo(paintInfo);
for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBackground(childPaintInfo);
}
}
示例12: paintSelectionBackground
void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(!paintInfo.context->paintingDisabled());
PaintInfo childPaintInfo(paintInfo);
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
static_cast<SVGInlineTextBox*>(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
}
}
示例13: paint
void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUnit, LayoutUnit)
{
ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
ASSERT(!paintInfo.context->paintingDisabled());
RenderObject* boxRenderer = renderer();
ASSERT(boxRenderer);
SVGRenderingContext renderingContext(boxRenderer, paintInfo, SVGRenderingContext::SaveGraphicsContext);
if (renderingContext.isRenderingPrepared()) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
child->paint(paintInfo, LayoutPoint(), 0, 0);
}
}
}
示例14: collectTextBoxesInFlowBox
static void collectTextBoxesInFlowBox(InlineFlowBox* flowBox, Vector<SVGInlineTextBox*>& textBoxes)
{
if (!flowBox)
return;
for (InlineBox* child = flowBox->firstChild(); child; child = child->nextOnLine()) {
if (child->isInlineFlowBox()) {
// Skip generated content.
if (!child->layoutObject().node())
continue;
collectTextBoxesInFlowBox(toInlineFlowBox(child), textBoxes);
continue;
}
if (child->isSVGInlineTextBox())
textBoxes.append(toSVGInlineTextBox(child));
}
}
示例15: collectTextBoxesInFlowBox
void SVGTextQuery::collectTextBoxesInFlowBox(InlineFlowBox* flowBox)
{
if (!flowBox)
return;
for (InlineBox* child = flowBox->firstChild(); child; child = child->nextOnLine()) {
if (child->isInlineFlowBox()) {
// Skip generated content.
if (!child->renderer()->node())
continue;
collectTextBoxesInFlowBox(toInlineFlowBox(child));
continue;
}
if (child->isSVGInlineTextBox())
m_textBoxes.append(toSVGInlineTextBox(child));
}
}