VTT cue positioning algorithm should use floats instead of ints#69427
Open
danae404 wants to merge 1 commit into
Open
VTT cue positioning algorithm should use floats instead of ints#69427danae404 wants to merge 1 commit into
danae404 wants to merge 1 commit into
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 7a4e3f1) Details
|
7a4e3f1 to
32413eb
Compare
Collaborator
|
EWS run on previous version of this PR (hash 32413eb) Details
|
https://bugs.webkit.org/show_bug.cgi?id=319433 rdar://182250995 Reviewed by NOBODY (OOPS!). Currently, WebKit fails WebVTT WPT 2_cues_overlapping_partially_move_up.html and 2_cues_overlapping_partially_move_down.html. These tests check that when a VTT file uses the line setting to position cues such that they overlap, the browser moves the second cue as minimally as possible so that they do not overlap. The rendered cues' top and bottom edges should be flush with each other, since the spec expects the cue to be moved minimally and makes no indication that we should be rounding to the nearest integer. However, WebKit's rendering of these vtt files puts a gap between the two cues. This is caused by our use of integers in RenderVTTCue. We should instead use floats. No new test expectations due to bugs in the wpt tests that cause us to still fail them. One a future patch fixes the tests the expectations will be updated. * Source/WebCore/rendering/RenderVTTCue.cpp: (WebCore::RenderVTTCue::unroundedAbsoluteBoundingBoxRect): (WebCore::RenderVTTCue::isOutside const): (WebCore::RenderVTTCue::rectIsWithinContainer const): (WebCore::RenderVTTCue::overlappingObject const): (WebCore::RenderVTTCue::overlappingObjectForRect const): (WebCore::RenderVTTCue::moveIfNecessaryToKeepWithinContainer): (WebCore::RenderVTTCue::findNonOverlappingPosition const): (WebCore::RenderVTTCue::repositionCueSnapToLinesNotSet): * Source/WebCore/rendering/RenderVTTCue.h:
32413eb to
39c2c06
Compare
Collaborator
|
EWS run on current version of this PR (hash 39c2c06) Details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧪 api-ios
39c2c06
39c2c06