Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.
This repository was archived by the owner on May 6, 2025. It is now read-only.

Cocoa WebView rendering / interactivity issues (video/audio), setWantsLayer vs. CSS 3D trick #21

@danielweck

Description

@danielweck

Fixed layout issue only.

  1. Problem: without Cocoa-NSView-setWantsLayer and CSS-3D (-webkit-transform: translateZ(0)), OSX-WebView renders the iframe contents partially (top-left corner only, rectangular surface area equivalent to the percentage of the transform-scale applied to the "scaler" div (iframe parent element)). The HTML inspector reveals that the content actually exists (text can be selected with the mouse, etc.), but somehow it does not get composited by the WebView / Cocoa rendering pipeline.

  2. With setWantsLayer applied to the NSView control (either the WebView itself, or its superview), there are some improvements but not across the board (i.e. not with every FXL titles) For example, highly-graphical content that makes use of CSS animations (sprites, etc.) fails to render correctly. Sometimes, pages are blank (white empty background), yet the HTML/CSS inspector shows that the tree is rendered correctly in the backstore, just not flushed correctly in the display layer.

  3. With CSS-3D applied to the iframe or its parent element, there are no display issues (i.e. no "invisible" or cropped content), but unfortunately there are nasty side effects, such as broken HTML5 audio/video interactivity, lack of text selection, jagged font rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions