Changeset 286542 in webkit
- Timestamp:
- Dec 6, 2021, 6:28:26 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 17 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/AXObjectCache.cpp (modified) (2 diffs)
-
accessibility/AccessibilityRenderObject.cpp (modified) (2 diffs)
-
dom/Element.cpp (modified) (1 diff)
-
inspector/InspectorOverlay.cpp (modified) (1 diff)
-
layout/integration/LayoutIntegrationCoverage.cpp (modified) (1 diff)
-
rendering/RenderGeometryMap.cpp (modified) (1 diff)
-
rendering/RenderLayer.cpp (modified) (2 diffs)
-
rendering/RenderLayer.h (modified) (1 diff)
-
rendering/RenderObject.cpp (modified) (1 diff)
-
rendering/RenderObject.h (modified) (2 diffs)
-
rendering/RenderReplaced.cpp (modified) (1 diff)
-
rendering/RenderView.cpp (modified) (1 diff)
-
rendering/svg/LegacyRenderSVGRoot.h (modified) (2 diffs)
-
rendering/svg/SVGRenderSupport.cpp (modified) (2 diffs)
-
rendering/svg/SVGRenderingContext.cpp (modified) (2 diffs)
-
rendering/updating/RenderTreeBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r286541 r286542 1 2021-12-06 Nikolas Zimmermann <nzimmermann@igalia.com> 2 3 [LBSE] Add RenderObject::isSVGRootOrLegacySVGRoot() helper 4 https://bugs.webkit.org/show_bug.cgi?id=233870 5 6 Reviewed by Rob Buis. 7 8 Preparations to begin a new RenderSVGRoot implementation for the 9 layer-based SVG engine (LBSE). 10 11 Add a helper function to identify either legacy SVG or LBSE root 12 render objects (LegacyRenderSVGRoot and the upcoming RenderSVGRoot). 13 14 Covered by existing tests, no change in behavior. 15 16 * accessibility/AXObjectCache.cpp: 17 (WebCore::createFromRenderer): 18 * accessibility/AccessibilityRenderObject.cpp: 19 (WebCore::AccessibilityRenderObject::boundingBoxRect const): 20 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 21 * dom/Element.cpp: 22 (WebCore::Element::boundingAbsoluteRectWithoutLayout): 23 * inspector/InspectorOverlay.cpp: 24 (WebCore::buildRendererHighlight): 25 * layout/integration/LayoutIntegrationCoverage.cpp: 26 (WebCore::LayoutIntegration::canUseForChild): 27 * rendering/RenderGeometryMap.cpp: 28 (WebCore::canMapBetweenRenderersViaLayers): 29 * rendering/RenderLayer.cpp: 30 (WebCore::RenderLayer::beginTransparencyLayers): 31 (WebCore::RenderLayer::calculateClipRects const): 32 * rendering/RenderLayer.h: 33 (WebCore::RenderLayer::canUseOffsetFromAncestor const): 34 * rendering/RenderObject.cpp: 35 (WebCore::objectIsRelayoutBoundary): 36 * rendering/RenderObject.h: 37 (WebCore::RenderObject::isLegacySVGRoot const): 38 (WebCore::RenderObject::isSVGRootOrLegacySVGRoot const): 39 * rendering/RenderReplaced.cpp: 40 (WebCore::hasIntrinsicSize): 41 * rendering/RenderView.cpp: 42 (WebCore::RenderView::layout): 43 * rendering/svg/LegacyRenderSVGRoot.h: 44 * rendering/svg/SVGRenderSupport.cpp: 45 (WebCore::layoutSizeOfNearestViewportChanged): 46 * rendering/svg/SVGRenderingContext.cpp: 47 (WebCore::SVGRenderingContext::prepareToRenderSVGContent): 48 (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem): 49 * rendering/updating/RenderTreeBuilder.cpp: 50 (WebCore::RenderTreeBuilder::reportVisuallyNonEmptyContent): 51 1 52 2021-12-06 Antti Koivisto <antti@apple.com> 2 53 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r286392 r286542 88 88 #include "HTMLTextFormControlElement.h" 89 89 #include "InlineRunAndOffset.h" 90 #include "LegacyRenderSVGRoot.h"91 90 #include "MathMLElement.h" 92 91 #include "Page.h" … … 548 547 #endif 549 548 550 if ( is<LegacyRenderSVGRoot>(*renderer))549 if (renderer->isSVGRootOrLegacySVGRoot()) 551 550 return AccessibilitySVGRoot::create(renderer); 552 551 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r286477 r286542 857 857 bool isSVGRoot = false; 858 858 859 if (obj->isSVGRoot ())859 if (obj->isSVGRootOrLegacySVGRoot()) 860 860 isSVGRoot = true; 861 861 … … 3012 3012 return AccessibilityRole::Heading; 3013 3013 3014 if (m_renderer->isSVGRoot ())3014 if (m_renderer->isSVGRootOrLegacySVGRoot()) 3015 3015 return AccessibilityRole::SVGRoot; 3016 3016 -
trunk/Source/WebCore/dom/Element.cpp
r286425 r286542 1715 1715 RenderObject* renderer = this->renderer(); 1716 1716 Vector<FloatQuad> quads; 1717 if (isSVGElement() && renderer && !renderer->isSVGRoot ()) {1717 if (isSVGElement() && renderer && !renderer->isSVGRootOrLegacySVGRoot()) { 1718 1718 // Get the bounding rectangle from the SVG model. 1719 1719 SVGElement& svgElement = downcast<SVGElement>(*this); -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r286392 r286542 144 144 FrameView* mainView = containingFrame->page()->mainFrame().view(); 145 145 146 // LegacyRenderSVGRoot should be highlighted through the isBox() code path, all other SVG elements should just dump their absoluteQuads().147 bool isSVGRenderer = renderer->node() && renderer->node()->isSVGElement() && !renderer->isSVGRoot ();146 // (Legacy)RenderSVGRoot should be highlighted through the isBox() code path, all other SVG elements should just dump their absoluteQuads(). 147 bool isSVGRenderer = renderer->node() && renderer->node()->isSVGElement() && !renderer->isSVGRootOrLegacySVGRoot(); 148 148 149 149 if (isSVGRenderer) { -
trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
r286147 r286542 534 534 SET_REASON_AND_RETURN_IF_NEEDED(ChildBoxIsFloatingOrPositioned, reasons, includeReasons) 535 535 536 if (replaced.isSVGRoot ())536 if (replaced.isSVGRootOrLegacySVGRoot()) 537 537 SET_REASON_AND_RETURN_IF_NEEDED(ContentIsSVG, reasons, includeReasons); 538 538 -
trunk/Source/WebCore/rendering/RenderGeometryMap.cpp
r284247 r286542 157 157 return false; 158 158 159 if (current->is SVGRoot())159 if (current->isLegacySVGRoot()) 160 160 return false; 161 161 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r286441 r286542 2206 2206 2207 2207 #if ENABLE(CSS_COMPOSITING) 2208 bool usesCompositeOperation = hasBlendMode() && !(renderer().is SVGRoot() && parent() && parent()->isRenderViewLayer());2208 bool usesCompositeOperation = hasBlendMode() && !(renderer().isLegacySVGRoot() && parent() && parent()->isRenderViewLayer()); 2209 2209 if (usesCompositeOperation) 2210 2210 context.setCompositeOperation(context.compositeOperation(), blendMode()); … … 5542 5542 // Add the filter as a client to this renderer, unless we are a RenderLayer accommodating 5543 5543 // an SVG. In that case it takes care of its own resource management for filters. 5544 if (renderer().style().filter().hasReferenceFilter() && !renderer().isSVGRoot ()) {5544 if (renderer().style().filter().hasReferenceFilter() && !renderer().isSVGRootOrLegacySVGRoot()) { 5545 5545 ensureLayerFilters(); 5546 5546 m_filters->updateReferenceFilterClients(renderer().style().filter()); -
trunk/Source/WebCore/rendering/RenderLayer.h
r284684 r286542 601 601 // FIXME: This really needs to know if there are transforms on this layer and any of the layers 602 602 // between it and the ancestor in question. 603 return !renderer().hasTransform() && !renderer().isSVGRoot ();603 return !renderer().hasTransform() && !renderer().isSVGRootOrLegacySVGRoot(); 604 604 } 605 605 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r286392 r286542 509 509 return true; 510 510 511 if (object->isSVGRoot ())511 if (object->isSVGRootOrLegacySVGRoot()) 512 512 return true; 513 513 -
trunk/Source/WebCore/rendering/RenderObject.h
r286085 r286542 327 327 virtual bool isRenderSVGModelObject() const { return false; } 328 328 virtual bool isRenderSVGBlock() const { return false; }; 329 virtual bool isLegacySVGRoot() const { return false; } 329 330 virtual bool isSVGRoot() const { return false; } 330 331 virtual bool isSVGContainer() const { return false; } … … 346 347 virtual bool isSVGResourceClipper() const { return false; } 347 348 virtual bool isSVGResourceFilterPrimitive() const { return false; } 349 bool isSVGRootOrLegacySVGRoot() const { return isSVGRoot() || isLegacySVGRoot(); } 348 350 349 351 // FIXME: Those belong into a SVG specific base-class for all renderers (see above) -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r286206 r286542 545 545 return true; 546 546 if (hasIntrinsicWidth || hasIntrinsicHeight) 547 return contentRenderer && contentRenderer->isSVGRoot ();547 return contentRenderer && contentRenderer->isSVGRootOrLegacySVGRoot(); 548 548 return false; 549 549 } -
trunk/Source/WebCore/rendering/RenderView.cpp
r285345 r286542 170 170 || box.style().logicalMinHeight().isPercentOrCalculated() 171 171 || box.style().logicalMaxHeight().isPercentOrCalculated() 172 || box.isSVGRoot ()172 || box.isSVGRootOrLegacySVGRoot() 173 173 ) 174 174 box.setChildNeedsLayout(MarkOnlyThis); -
trunk/Source/WebCore/rendering/svg/LegacyRenderSVGRoot.h
r286392 r286542 67 67 void element() const = delete; 68 68 69 bool is SVGRoot() const override { return true; }69 bool isLegacySVGRoot() const override { return true; } 70 70 71 71 // Intentially left 'RenderSVGRoot' instead of 'LegacyRenderSVGRoot', to avoid breaking layout tests. … … 124 124 } // namespace WebCore 125 125 126 SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(LegacyRenderSVGRoot, is SVGRoot())126 SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(LegacyRenderSVGRoot, isLegacySVGRoot()) -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r286392 r286542 205 205 { 206 206 const RenderElement* start = &renderer; 207 while (start && ! is<LegacyRenderSVGRoot>(*start) && !is<RenderSVGViewportContainer>(*start))207 while (start && !start->isSVGRootOrLegacySVGRoot() && !is<RenderSVGViewportContainer>(*start)) 208 208 start = start->parent(); 209 209 … … 217 217 bool SVGRenderSupport::transformToRootChanged(RenderElement* ancestor) 218 218 { 219 while (ancestor && ! is<LegacyRenderSVGRoot>(*ancestor)) {219 while (ancestor && !ancestor->isSVGRootOrLegacySVGRoot()) { 220 220 if (is<RenderSVGTransformableContainer>(*ancestor)) 221 221 return downcast<RenderSVGTransformableContainer>(*ancestor).didTransformToRootUpdate(); -
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
r286526 r286542 98 98 bool isRenderingMask = isRenderingMaskImage(*m_renderer); 99 99 // RenderLayer takes care of root opacity. 100 float opacity = (renderer.is SVGRoot() || isRenderingMask) ? 1 : style.opacity();100 float opacity = (renderer.isLegacySVGRoot() || isRenderingMask) ? 1 : style.opacity(); 101 101 bool hasBlendMode = style.hasBlendMode(); 102 102 bool hasIsolation = style.hasIsolation(); … … 207 207 while (ancestor) { 208 208 absoluteTransform = ancestor->localToParentTransform() * absoluteTransform; 209 if (ancestor->isSVGRoot ())209 if (ancestor->isSVGRootOrLegacySVGRoot()) 210 210 break; 211 211 ancestor = ancestor->parent(); -
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
r286392 r286542 996 996 return; 997 997 } 998 if ( is<LegacyRenderSVGRoot>(child)) {998 if (child.isSVGRootOrLegacySVGRoot()) { 999 999 auto fixedSize = [] (const auto& renderer) -> std::optional<IntSize> { 1000 1000 auto& style = renderer.style();
Note:
See TracChangeset
for help on using the changeset viewer.