[Webkit-unassigned] [Bug 210041] Should find touch-action elements inside non-composited iframes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 7 14:18:42 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=210041

--- Comment #8 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 395714
  --> https://bugs.webkit.org/attachment.cgi?id=395714
First attempt

View in context: https://bugs.webkit.org/attachment.cgi?id=395714&action=review

> Source/WebCore/page/FrameView.cpp:1262
> +    auto& document = *frame().document();

RefPtr<>? Who knows what cache->postNotification() does.

> Source/WebCore/page/FrameView.cpp:1263
> +    if (!renderView()->isComposited()) {

This renderView()->isComposited() implies knowledge about how event regions are generated, which isn't great. It would be better to delegate this to the compositor() perhaps. It also warrants a comment.

> Source/WebCore/rendering/RenderBlock.cpp:1258
> +        bool needsTraverseDescendants = hasVisualOverflow() || containsFloats() || !paintInfo.eventRegionContext->contains(enclosingIntRect(borderRect)) || view().needsEventRegionUpdateForNonCompositedDescendant();

That's unfortunate and awkward. Not sure of a better way.

> Source/WebCore/rendering/RenderLayer.cpp:6447
> +void RenderLayer::eventRegionsChanged()

Why do we need both this and invalidateEventRegion()?

> Source/WebCore/rendering/RenderLayer.cpp:6452
> +        compositingLayer->renderer().view().setNeedsEventRegionUpdateForNonCompositedDescendant();

This part still bothers me.

> Source/WebCore/rendering/RenderLayer.cpp:6453
> +        compositingLayer->renderer().view().setNeedsRepaintAfterCompositingLayerUpdate();

I don't know why we'd need this.

> Source/WebCore/rendering/RenderLayer.cpp:-7006
> -    auto maintainsEventRegion = [&] {
> -        // UI side scroll overlap testing.
> -        if (!compositingLayer->isRenderViewLayer())
> -            return true;
> -        // UI side touch-action resolution.
> -        if (renderer().document().mayHaveElementsWithNonAutoTouchAction())
> -            return true;
> -        if (renderer().document().mayHaveEditableElements())
> -            return true;
> -        return false;
> -    };

Why remove this logic?

> Source/WebCore/rendering/RenderLayerBacking.cpp:1621
> +    bool needsEventRegionUpdateForNonCompositedDescendant = renderer().view().needsEventRegionUpdateForNonCompositedDescendant();

The "descendant" here needs to be explicit that it's about Frames.

> Source/WebCore/rendering/RenderLayerCompositor.cpp:862
> +        m_renderView.repaintRootContents();

Just to trigger event region generation? That's a huge perf hit.

> Source/WebCore/rendering/RenderWidget.cpp:252
> +        TransformationMatrix transform;

AffineTransform

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200407/d6501460/attachment-0001.htm>


More information about the webkit-unassigned mailing list