[webkit-reviews] review granted: [Bug 233901] [VTT] Fix various issues with complicated rendering of VTT cues : [Attachment 446176] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 7 09:24:34 PST 2021


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 233901: [VTT] Fix various issues with complicated rendering of VTT cues
https://bugs.webkit.org/show_bug.cgi?id=233901

Attachment 446176: Patch

https://bugs.webkit.org/attachment.cgi?id=446176&action=review




--- Comment #5 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 446176
  --> https://bugs.webkit.org/attachment.cgi?id=446176
Patch

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

r=me

> Source/WebCore/rendering/RenderVTTCue.cpp:157
> +    return !rectIsWithinContainer(backdropBox().absoluteBoundingBoxRect());

It would be nice to have a convenience method on RenderVTTCue to replace all of
the  `backdropBox().absoluteBoundingBoxRect()`.

> LayoutTests/media/track/track-webvtt-no-snap-to-lines-overlap.html:36
> +	<title>track-webvtt-no-snap-to-lines-overlap</title>
> +	<style>
> +		html { overflow:hidden }
> +		body { margin:0 }
> +		::cue {
> +		    font-family: Ahem, sans-serif;
> +		    font-size: 12px;
> +		    background-color: black;
> +		    color: green;
> +		}
> +	</style>
> +	<script>var requirePixelDump = true;</script>
> +	<script src="../video-test.js"></script>
> +	<script src="../media-file.js"></script>
> +	<script>
> +	window.addEventListener('load', async event => {
> +		findMediaElement();
> +
> +		run(`video.querySelector("track").src =
"captions-webvtt/no-snap-to-lines-overlap.vtt"`);
> +		run(`video.textTracks[0].mode = "showing"`);
> +		await waitFor(video.querySelector('track'), 'load');
> +
> +		run(`video.src = findMediaFile("video",
"w3c/track/webvtt/media/white")`);
> +		await waitFor(video, 'canplaythrough');
> +
> +		endTest();
> +	});
> +	</script>
> +</head>
> +<body>
> +	<video>
> +	   <track id="testTrack" kind="captions" default>
> +	</video>

Mixed tabs and spaces!


More information about the webkit-reviews mailing list