Diff
Modified: trunk/Source/WebCore/ChangeLog (176364 => 176365)
--- trunk/Source/WebCore/ChangeLog 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/ChangeLog 2014-11-20 00:17:41 UTC (rev 176365)
@@ -1,3 +1,50 @@
+2014-11-19 Andreas Kling <[email protected]>
+
+ Move pseudo-style code from RenderObject to RenderElement.
+ <https://webkit.org/b/138880>
+
+ Reviewed by Antti Koivisto.
+
+ Migrate get*PseudoStyle() to RenderElement, and the selection color
+ functions along with them. This gets rid of a DOM ancestor walk in
+ pseudo style lookup.
+
+ Narrow down some argument types to keep things building.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::logicalLeftSelectionGap):
+ (WebCore::RenderBlock::logicalRightSelectionGap):
+ (WebCore::styleForFirstLetter):
+ (WebCore::RenderBlock::updateFirstLetterStyle):
+ (WebCore::RenderBlock::createFirstLetterRenderer):
+ * rendering/RenderBlock.h:
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::getCachedPseudoStyle):
+ (WebCore::RenderElement::getUncachedPseudoStyle):
+ (WebCore::RenderElement::selectionColor):
+ (WebCore::RenderElement::selectionPseudoStyle):
+ (WebCore::RenderElement::selectionForegroundColor):
+ (WebCore::RenderElement::selectionEmphasisMarkColor):
+ (WebCore::RenderElement::selectionBackgroundColor):
+ * rendering/RenderElement.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::selectionBackgroundColor): Deleted.
+ (WebCore::RenderObject::selectionColor): Deleted.
+ (WebCore::RenderObject::selectionPseudoStyle): Deleted.
+ (WebCore::RenderObject::selectionForegroundColor): Deleted.
+ (WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
+ (WebCore::RenderObject::getCachedPseudoStyle): Deleted.
+ (WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
+ * rendering/RenderObject.h:
+ * rendering/RenderText.h:
+ (WebCore::RenderText::getCachedPseudoStyle):
+ (WebCore::RenderText::selectionBackgroundColor):
+ (WebCore::RenderText::selectionForegroundColor):
+ (WebCore::RenderText::selectionEmphasisMarkColor):
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintSelectionBackground):
+ (WebCore::SVGInlineTextBox::paint):
+
2014-11-19 Tim Horton <[email protected]>
Add an optional entry transition (from selection highlight) to TextIndicator
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-11-20 00:17:41 UTC (rev 176365)
@@ -1987,7 +1987,7 @@
}
LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock& rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
- RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
+ RenderBoxModelObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
{
LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop;
LayoutUnit rootBlockLogicalLeft = std::max(logicalLeftSelectionOffset(rootBlock, logicalTop, cache), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight, cache));
@@ -2004,7 +2004,7 @@
}
LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock& rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
- RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
+ RenderBoxModelObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
{
LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop;
LayoutUnit rootBlockLogicalLeft = std::max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + logicalRight,
@@ -2967,7 +2967,7 @@
return firstLineBlock;
}
-static RenderStyle& styleForFirstLetter(RenderObject* firstLetterBlock, RenderObject* firstLetterContainer)
+static RenderStyle& styleForFirstLetter(RenderElement* firstLetterBlock, RenderObject* firstLetterContainer)
{
RenderStyle* pseudoStyle = firstLetterBlock->getCachedPseudoStyle(FIRST_LETTER, &firstLetterContainer->firstLineStyle());
@@ -3048,7 +3048,7 @@
return nullptr;
}
-void RenderBlock::updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* currentChild)
+void RenderBlock::updateFirstLetterStyle(RenderElement* firstLetterBlock, RenderObject* currentChild)
{
RenderElement* firstLetter = currentChild->parent();
RenderElement* firstLetterContainer = firstLetter->parent();
@@ -3090,7 +3090,7 @@
firstLetter->setStyle(pseudoStyle);
}
-void RenderBlock::createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText* currentTextChild)
+void RenderBlock::createFirstLetterRenderer(RenderElement* firstLetterBlock, RenderText* currentTextChild)
{
RenderElement* firstLetterContainer = currentTextChild->parent();
RenderStyle& pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetterContainer);
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2014-11-20 00:17:41 UTC (rev 176365)
@@ -172,9 +172,9 @@
GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintContainer);
LayoutRect logicalLeftSelectionGap(RenderBlock& rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
- RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches&, const PaintInfo*);
+ RenderBoxModelObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches&, const PaintInfo*);
LayoutRect logicalRightSelectionGap(RenderBlock& rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
- RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches&, const PaintInfo*);
+ RenderBoxModelObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches&, const PaintInfo*);
void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap);
RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const;
@@ -421,8 +421,8 @@
void insertIntoTrackedRendererMaps(RenderBox& descendant, TrackedDescendantsMap*&, TrackedContainerMap*&);
static void removeFromTrackedRendererMaps(RenderBox& descendant, TrackedDescendantsMap*&, TrackedContainerMap*&);
- void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText* currentTextChild);
- void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* firstLetterContainer);
+ void createFirstLetterRenderer(RenderElement* firstLetterBlock, RenderText* currentTextChild);
+ void updateFirstLetterStyle(RenderElement* firstLetterBlock, RenderObject* firstLetterContainer);
Node* nodeForHitTest() const;
Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderElement.cpp 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp 2014-11-20 00:17:41 UTC (rev 176365)
@@ -58,6 +58,7 @@
#include "RenderView.h"
#include "SVGRenderSupport.h"
#include "Settings.h"
+#include "ShadowRoot.h"
#include "StyleResolver.h"
#include <wtf/MathExtras.h>
#include <wtf/StackStats.h>
@@ -1415,4 +1416,103 @@
controlStatesRendererMap().add(o, states);
}
+RenderStyle* RenderElement::getCachedPseudoStyle(PseudoId pseudo, RenderStyle* parentStyle) const
+{
+ if (pseudo < FIRST_INTERNAL_PSEUDOID && !style().hasPseudoStyle(pseudo))
+ return nullptr;
+
+ RenderStyle* cachedStyle = style().getCachedPseudoStyle(pseudo);
+ if (cachedStyle)
+ return cachedStyle;
+
+ RefPtr<RenderStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
+ if (result)
+ return style().addCachedPseudoStyle(result.release());
+ return nullptr;
}
+
+PassRefPtr<RenderStyle> RenderElement::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle, RenderStyle* ownStyle) const
+{
+ if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style().hasPseudoStyle(pseudoStyleRequest.pseudoId))
+ return nullptr;
+
+ if (!parentStyle) {
+ ASSERT(!ownStyle);
+ parentStyle = &style();
+ }
+
+ if (isAnonymous())
+ return nullptr;
+
+ if (pseudoStyleRequest.pseudoId == FIRST_LINE_INHERITED) {
+ RefPtr<RenderStyle> result = document().ensureStyleResolver().styleForElement(element(), parentStyle, DisallowStyleSharing);
+ result->setStyleType(FIRST_LINE_INHERITED);
+ return result.release();
+ }
+
+ return document().ensureStyleResolver().pseudoStyleForElement(element(), pseudoStyleRequest, parentStyle);
+}
+
+Color RenderElement::selectionColor(int colorProperty) const
+{
+ // If the element is unselectable, or we are only painting the selection,
+ // don't override the foreground color with the selection foreground color.
+ if (style().userSelect() == SELECT_NONE
+ || (view().frameView().paintBehavior() & PaintBehaviorSelectionOnly))
+ return Color();
+
+ if (RefPtr<RenderStyle> pseudoStyle = selectionPseudoStyle()) {
+ Color color = pseudoStyle->visitedDependentColor(colorProperty);
+ if (!color.isValid())
+ color = pseudoStyle->visitedDependentColor(CSSPropertyColor);
+ return color;
+ }
+
+ if (frame().selection().isFocusedAndActive())
+ return theme().activeSelectionForegroundColor();
+ return theme().inactiveSelectionForegroundColor();
+}
+
+PassRefPtr<RenderStyle> RenderElement::selectionPseudoStyle() const
+{
+ if (isAnonymous())
+ return nullptr;
+
+ if (ShadowRoot* root = element()->containingShadowRoot()) {
+ if (root->type() == ShadowRoot::UserAgentShadowRoot) {
+ if (Element* shadowHost = element()->shadowHost())
+ return shadowHost->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
+ }
+ }
+
+ return getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
+}
+
+Color RenderElement::selectionForegroundColor() const
+{
+ return selectionColor(CSSPropertyWebkitTextFillColor);
+}
+
+Color RenderElement::selectionEmphasisMarkColor() const
+{
+ return selectionColor(CSSPropertyWebkitTextEmphasisColor);
+}
+
+Color RenderElement::selectionBackgroundColor() const
+{
+ if (style().userSelect() == SELECT_NONE)
+ return Color();
+
+ if (frame().selection().shouldShowBlockCursor() && frame().selection().isCaret())
+ return style().visitedDependentColor(CSSPropertyColor).blendWithWhite();
+
+ RefPtr<RenderStyle> pseudoStyle = selectionPseudoStyle();
+ if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
+ return pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).blendWithWhite();
+
+ if (frame().selection().isFocusedAndActive())
+ return theme().activeSelectionBackgroundColor();
+ return theme().inactiveSelectionBackgroundColor();
+}
+
+}
Modified: trunk/Source/WebCore/rendering/RenderElement.h (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderElement.h 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderElement.h 2014-11-20 00:17:41 UTC (rev 176365)
@@ -47,6 +47,11 @@
// Called to update a style that is allowed to trigger animations.
void setAnimatableStyle(PassRef<RenderStyle>);
+ // The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect
+ // any pseudo classes (and therefore has no concept of changing state).
+ RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) const;
+ PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, RenderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const;
+
// This is null for anonymous renderers.
Element* element() const { return downcast<Element>(RenderObject::node()); }
Element* nonPseudoElement() const { return downcast<Element>(RenderObject::nonPseudoNode()); }
@@ -59,6 +64,14 @@
bool canContainFixedPositionObjects() const;
+ Color selectionColor(int colorProperty) const;
+ PassRefPtr<RenderStyle> selectionPseudoStyle() const;
+
+ // Obtains the selection colors that should be used when painting a selection.
+ Color selectionBackgroundColor() const;
+ Color selectionForegroundColor() const;
+ Color selectionEmphasisMarkColor() const;
+
// FIXME: Make these standalone and move to relevant files.
bool isRenderLayerModelObject() const;
bool isBoxModelObject() const;
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2014-11-20 00:17:41 UTC (rev 176365)
@@ -62,7 +62,6 @@
#include "RenderView.h"
#include "SVGRenderSupport.h"
#include "Settings.h"
-#include "ShadowRoot.h"
#include "StyleResolver.h"
#include "TransformState.h"
#include "htmlediting.h"
@@ -1562,68 +1561,6 @@
#endif // NDEBUG
-Color RenderObject::selectionBackgroundColor() const
-{
- Color color;
- if (style().userSelect() != SELECT_NONE) {
- if (frame().selection().shouldShowBlockCursor() && frame().selection().isCaret())
- color = style().visitedDependentColor(CSSPropertyColor).blendWithWhite();
- else {
- RefPtr<RenderStyle> pseudoStyle = selectionPseudoStyle();
- if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
- color = pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).blendWithWhite();
- else
- color = frame().selection().isFocusedAndActive() ? theme().activeSelectionBackgroundColor() : theme().inactiveSelectionBackgroundColor();
- }
- }
-
- return color;
-}
-
-Color RenderObject::selectionColor(int colorProperty) const
-{
- Color color;
- // If the element is unselectable, or we are only painting the selection,
- // don't override the foreground color with the selection foreground color.
- if (style().userSelect() == SELECT_NONE
- || (view().frameView().paintBehavior() & PaintBehaviorSelectionOnly))
- return color;
-
- if (RefPtr<RenderStyle> pseudoStyle = selectionPseudoStyle()) {
- color = pseudoStyle->visitedDependentColor(colorProperty);
- if (!color.isValid())
- color = pseudoStyle->visitedDependentColor(CSSPropertyColor);
- } else
- color = frame().selection().isFocusedAndActive() ? theme().activeSelectionForegroundColor() : theme().inactiveSelectionForegroundColor();
-
- return color;
-}
-
-PassRefPtr<RenderStyle> RenderObject::selectionPseudoStyle() const
-{
- if (isAnonymous())
- return nullptr;
-
- if (ShadowRoot* root = m_node.containingShadowRoot()) {
- if (root->type() == ShadowRoot::UserAgentShadowRoot) {
- if (Element* shadowHost = m_node.shadowHost())
- return shadowHost->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
- }
- }
-
- return getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
-}
-
-Color RenderObject::selectionForegroundColor() const
-{
- return selectionColor(CSSPropertyWebkitTextFillColor);
-}
-
-Color RenderObject::selectionEmphasisMarkColor() const
-{
- return selectionColor(CSSPropertyWebkitTextEmphasisColor);
-}
-
SelectionSubtreeRoot& RenderObject::selectionRoot() const
{
RenderFlowThread* flowThread = flowThreadContainingBlock();
@@ -2150,48 +2087,6 @@
return style().computedLineHeight();
}
-RenderStyle* RenderObject::getCachedPseudoStyle(PseudoId pseudo, RenderStyle* parentStyle) const
-{
- if (pseudo < FIRST_INTERNAL_PSEUDOID && !style().hasPseudoStyle(pseudo))
- return 0;
-
- RenderStyle* cachedStyle = style().getCachedPseudoStyle(pseudo);
- if (cachedStyle)
- return cachedStyle;
-
- RefPtr<RenderStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
- if (result)
- return style().addCachedPseudoStyle(result.release());
- return 0;
-}
-
-PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle, RenderStyle* ownStyle) const
-{
- if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style().hasPseudoStyle(pseudoStyleRequest.pseudoId))
- return nullptr;
-
- if (!parentStyle) {
- ASSERT(!ownStyle);
- parentStyle = &style();
- }
-
- // FIXME: This "find nearest element parent" should be a helper function.
- Node* node = this->node();
- while (node && !is<Element>(*node))
- node = node->parentNode();
- if (!node)
- return nullptr;
- Element& element = downcast<Element>(*node);
-
- if (pseudoStyleRequest.pseudoId == FIRST_LINE_INHERITED) {
- RefPtr<RenderStyle> result = document().ensureStyleResolver().styleForElement(&element, parentStyle, DisallowStyleSharing);
- result->setStyleType(FIRST_LINE_INHERITED);
- return result.release();
- }
-
- return document().ensureStyleResolver().pseudoStyleForElement(&element, pseudoStyleRequest, parentStyle);
-}
-
static Color decorationColor(RenderStyle* style)
{
Color result;
Modified: trunk/Source/WebCore/rendering/RenderObject.h (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderObject.h 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2014-11-20 00:17:41 UTC (rev 176365)
@@ -554,11 +554,6 @@
inline bool preservesNewline() const;
- // The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect
- // any pseudo classes (and therefore has no concept of changing state).
- RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) const;
- PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, RenderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const;
-
virtual void updateDragState(bool dragOn);
RenderView& view() const { return *document().renderView(); };
@@ -782,11 +777,6 @@
virtual bool canBeSelectionLeaf() const { return false; }
bool hasSelectedChildren() const { return selectionState() != SelectionNone; }
- // Obtains the selection colors that should be used when painting a selection.
- Color selectionBackgroundColor() const;
- Color selectionForegroundColor() const;
- Color selectionEmphasisMarkColor() const;
-
// Whether or not a given block needs to paint selection gaps.
virtual bool shouldPaintSelectionGaps() const { return false; }
@@ -883,9 +873,6 @@
void removeFromRenderFlowThread();
void removeFromRenderFlowThreadIncludingDescendants(bool);
- Color selectionColor(int colorProperty) const;
- PassRefPtr<RenderStyle> selectionPseudoStyle() const;
-
Node* generatingPseudoHostElement() const;
virtual bool isWBR() const { ASSERT_NOT_REACHED(); return false; }
Modified: trunk/Source/WebCore/rendering/RenderText.h (176364 => 176365)
--- trunk/Source/WebCore/rendering/RenderText.h 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/RenderText.h 2014-11-20 00:17:41 UTC (rev 176365)
@@ -48,7 +48,12 @@
RenderStyle& style() const;
RenderStyle& firstLineStyle() const;
+ RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = nullptr) const;
+ Color selectionBackgroundColor() const;
+ Color selectionForegroundColor() const;
+ Color selectionEmphasisMarkColor() const;
+
virtual String originalText() const;
void extractTextBox(InlineTextBox& box) { m_lineBoxes.extract(box); }
@@ -247,6 +252,26 @@
return parent()->firstLineStyle();
}
+inline RenderStyle* RenderText::getCachedPseudoStyle(PseudoId pseudoId, RenderStyle* parentStyle) const
+{
+ return parent()->getCachedPseudoStyle(pseudoId, parentStyle);
+}
+
+inline Color RenderText::selectionBackgroundColor() const
+{
+ return parent()->selectionBackgroundColor();
+}
+
+inline Color RenderText::selectionForegroundColor() const
+{
+ return parent()->selectionForegroundColor();
+}
+
+inline Color RenderText::selectionEmphasisMarkColor() const
+{
+ return parent()->selectionEmphasisMarkColor();
+}
+
void applyTextTransform(const RenderStyle&, String&, UChar);
void makeCapitalized(String*, UChar previous);
Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (176364 => 176365)
--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2014-11-20 00:14:13 UTC (rev 176364)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2014-11-20 00:17:41 UTC (rev 176365)
@@ -189,7 +189,7 @@
if (renderer().style().visibility() != VISIBLE)
return;
- RenderObject& parentRenderer = parent()->renderer();
+ auto& parentRenderer = parent()->renderer();
ASSERT(!parentRenderer.document().printing());
// Determine whether or not we're selected.
@@ -249,7 +249,7 @@
// Note: We're explicitely not supporting composition & custom underlines and custom highlighters - unlike InlineTextBox.
// If we ever need that for SVG, it's very easy to refactor and reuse the code.
- RenderObject& parentRenderer = parent()->renderer();
+ auto& parentRenderer = parent()->renderer();
bool paintSelectedTextOnly = paintInfo.phase == PaintPhaseSelection;
bool hasSelection = !parentRenderer.document().printing() && selectionState() != RenderObject::SelectionNone;