Diff
Modified: trunk/Source/WebCore/ChangeLog (224582 => 224583)
--- trunk/Source/WebCore/ChangeLog 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/ChangeLog 2017-11-08 16:39:02 UTC (rev 224583)
@@ -1,3 +1,31 @@
+2017-11-08 Antti Koivisto <[email protected]>
+
+ Remove Element::isInlineElementContinuation
+ https://bugs.webkit.org/show_bug.cgi?id=179425
+
+ Reviewed by Zalan Bujtas.
+
+ It is really just isInline+isContinuation test and most callers know it is an inline already.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::firstChildConsideringContinuation):
+ (WebCore::startOfContinuations):
+ (WebCore::firstChildIsInlineContinuation):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
+ (WebCore::InlineFlowBox::paint):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addContinuationWithOutline):
+ * rendering/RenderElement.h:
+ (WebCore::RenderElement::setIsContinuation):
+ (WebCore::RenderElement::isElementContinuation const): Deleted.
+ (WebCore::RenderElement::isInlineElementContinuation const): Deleted.
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::willBeDestroyed):
+ (WebCore::RenderInline::updateHitTestResult):
+ * rendering/line/LineInlineHeaders.h:
+ (WebCore::hasInlineDirectionBordersPaddingOrMargin):
+
2017-11-08 David Hyatt <[email protected]>
[Experiment] Implement code to detect high frequency painting
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (224582 => 224583)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-11-08 16:39:02 UTC (rev 224583)
@@ -183,7 +183,7 @@
// We don't want to include the end of a continuation as the firstChild of the
// anonymous parent, because everything has already been linked up via continuation.
// CSS first-letter selector is an example of this case.
- if (renderer.isAnonymous() && is<RenderElement>(firstChild) && downcast<RenderElement>(*firstChild).isInlineElementContinuation())
+ if (renderer.isAnonymous() && is<RenderInline>(firstChild) && downcast<RenderInline>(*firstChild).isContinuation())
firstChild = nullptr;
if (!firstChild && isInlineWithContinuation(renderer))
@@ -251,7 +251,7 @@
if (!is<RenderElement>(renderer))
return nullptr;
auto& renderElement = downcast<RenderElement>(renderer);
- if (renderElement.isInlineElementContinuation() && is<RenderInline>(renderElement.element()->renderer()))
+ if (is<RenderInline>(renderElement) && renderElement.isContinuation() && is<RenderInline>(renderElement.element()->renderer()))
return downcast<RenderInline>(renderer.node()->renderer());
// Blocks with a previous continuation always have a next continuation
@@ -310,7 +310,7 @@
static inline bool firstChildIsInlineContinuation(RenderElement& renderer)
{
RenderObject* child = renderer.firstChild();
- return is<RenderElement>(child) && downcast<RenderElement>(*child).isInlineElementContinuation();
+ return is<RenderInline>(child) && downcast<RenderInline>(*child).isContinuation();
}
AccessibilityObject* AccessibilityRenderObject::previousSibling() const
Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (224582 => 224583)
--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp 2017-11-08 16:39:02 UTC (rev 224583)
@@ -308,7 +308,7 @@
// Check to see if all initial lines are unconstructed. If so, then
// we know the inline began on this line (unless we are a continuation).
const auto& lineBoxList = inlineFlow.lineBoxes();
- if (!lineBoxList.firstLineBox()->isConstructed() && !renderer().isInlineElementContinuation()) {
+ if (!lineBoxList.firstLineBox()->isConstructed() && !inlineFlow.isContinuation()) {
#if ENABLE(CSS_BOX_DECORATION_BREAK)
if (renderer().style().boxDecorationBreak() == DCLONE)
includeLeftEdge = includeRightEdge = true;
@@ -1155,7 +1155,7 @@
RenderInline& inlineFlow = downcast<RenderInline>(renderer());
RenderBlock* containingBlock = nullptr;
- bool containingBlockPaintsContinuationOutline = inlineFlow.continuation() || inlineFlow.isInlineElementContinuation();
+ bool containingBlockPaintsContinuationOutline = inlineFlow.continuation() || inlineFlow.isContinuation();
if (containingBlockPaintsContinuationOutline) {
// FIXME: See https://bugs.webkit.org/show_bug.cgi?id=54690. We currently don't reconnect inline continuations
// after a child removal. As a result, those merged inlines do not get seperated and hence not get enclosed by
@@ -1178,7 +1178,7 @@
// Add ourselves to the containing block of the entire continuation so that it can
// paint us atomically.
containingBlock->addContinuationWithOutline(downcast<RenderInline>(renderer().element()->renderer()));
- } else if (!inlineFlow.isInlineElementContinuation())
+ } else if (!inlineFlow.isContinuation())
paintInfo.outlineObjects->add(&inlineFlow);
}
} else if (paintInfo.phase == PaintPhaseMask)
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (224582 => 224583)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-08 16:39:02 UTC (rev 224583)
@@ -1746,7 +1746,7 @@
{
// We can't make this work if the inline is in a layer. We'll just rely on the broken
// way of painting.
- ASSERT(!flow->layer() && !flow->isInlineElementContinuation());
+ ASSERT(!flow->layer() && !flow->isContinuation());
ContinuationOutlineTableMap* table = continuationOutlineTable();
ListHashSet<RenderInline*>* continuations = table->get(this);
Modified: trunk/Source/WebCore/rendering/RenderElement.h (224582 => 224583)
--- trunk/Source/WebCore/rendering/RenderElement.h 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/rendering/RenderElement.h 2017-11-08 16:39:02 UTC (rev 224583)
@@ -227,8 +227,6 @@
bool hasContinuationChainNode() const { return m_hasContinuationChainNode; }
bool isContinuation() const { return m_isContinuation; }
void setIsContinuation() { m_isContinuation = true; }
- bool isElementContinuation() const { return isContinuation() && !isAnonymous(); }
- bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); }
bool isFirstLetter() const { return m_isFirstLetter; }
void setIsFirstLetter() { m_isFirstLetter = true; }
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (224582 => 224583)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-08 16:39:02 UTC (rev 224583)
@@ -74,7 +74,7 @@
#if !ASSERT_DISABLED
// Make sure we do not retain "this" in the continuation outline table map of our containing blocks.
if (parent() && style().visibility() == VISIBLE && hasOutline()) {
- bool containingBlockPaintsContinuationOutline = continuation() || isInlineElementContinuation();
+ bool containingBlockPaintsContinuationOutline = continuation() || isContinuation();
if (containingBlockPaintsContinuationOutline) {
if (RenderBlock* cb = containingBlock()) {
if (RenderBlock* cbCb = cb->containingBlock())
@@ -1394,7 +1394,7 @@
LayoutPoint localPoint(point);
if (Element* element = this->element()) {
- if (isInlineElementContinuation()) {
+ if (isContinuation()) {
// We're in the continuation of a split inline. Adjust our local point to be in the coordinate space
// of the principal renderer's containing block. This will end up being the innerNonSharedNode.
RenderBlock* firstBlock = element->renderer()->containingBlock();
Modified: trunk/Source/WebCore/rendering/line/LineInlineHeaders.h (224582 => 224583)
--- trunk/Source/WebCore/rendering/line/LineInlineHeaders.h 2017-11-08 16:11:55 UTC (rev 224582)
+++ trunk/Source/WebCore/rendering/line/LineInlineHeaders.h 2017-11-08 16:39:02 UTC (rev 224583)
@@ -34,11 +34,11 @@
{
// Where an empty inline is split across anonymous blocks we should only give lineboxes to the 'sides' of the
// inline that have borders, padding or margin.
- bool shouldApplyStartBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || !flow.isInlineElementContinuation();
+ bool shouldApplyStartBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || !flow.isContinuation();
if (shouldApplyStartBorderPaddingOrMargin && (flow.borderStart() || flow.marginStart() || flow.paddingStart()))
return true;
- bool shouldApplyEndBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || flow.isInlineElementContinuation() || !flow.inlineElementContinuation();
+ bool shouldApplyEndBorderPaddingOrMargin = !flow.parent()->isAnonymousBlock() || flow.isContinuation() || !flow.inlineElementContinuation();
return shouldApplyEndBorderPaddingOrMargin && (flow.borderEnd() || flow.marginEnd() || flow.paddingEnd());
}