Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some introductory paragraphs to the Data model section. #409

Merged
merged 12 commits into from
Dec 21, 2017

Conversation

silviapfeiffer
Copy link
Member

This is to explain the box model and how settings work on cues and regions.

closes issue #383

@silviapfeiffer
Copy link
Member Author

@dwsinger please review

Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed rewording for easier parsing.

index.bs Outdated
group cues together. Cues are positioned either inside the video viewport directly or inside a
region, which is positioned inside the video viewport.</p>

<p class=note>A set of cue settings position cues inside the video viewport. A set of region
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A set of cue settings position cues inside the video viewport.

is really hard to parse. How about:

The positions of cues inside the video viewport are defined by a set of cue settings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks.

index.bs Outdated

<p class=note>A set of cue settings position cues inside the video viewport. A set of region
settings position regions inside the video viewport. Cues that are inside regions can only use a
limited set of their cue settings. Specifically, if the cue has a "vertical", "line" or "size"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise:

The positions of regions inside the video viewport are defined by a set of region settings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

index.bs Outdated
settings position regions inside the video viewport. Cues that are inside regions can only use a
limited set of their cue settings. Specifically, if the cue has a "vertical", "line" or "size"
setting, the cue drops out of the region. Otherwise, the cue's width is calculated to be relative to
the region width rather than the viewport. </p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see an extra sentence in here clarifying if regions act as clipping area for the cues within them or if they are only positioning constructs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Clipping" is not the right word: if a cue text is longer than the region width allows, it will be broken into another line - that's what CSS does for us.

The definition of region width already states that a cue is to be rendered within the region's width: https://www.w3.org/TR/webvtt1/#webvtt-region-width

A width
A number giving the width of the box within which the text of each line of the containing cues is to be rendered, to be interpreted as a percentage of the video width. Defaults to 100.

You'll notice that if the cue has an explicit "size" setting, it drops out of the region. A cue's default size is 100%. For regions this is relative to the region width. Therefore, the cue's width is the same as the region's width.

How would you like me to say this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gosh, right, there are lots of things to unpack here.

Firstly, in terms of clipping behaviour I think you're saying that there is a combination of wrapping and clipping, so that the clipping only ever occurs in the block progression direction, by means of losing whole lines. The consequence is that no cue text is ever displayed outside the region that the cue is in. However if the text size is such that the whole cue does not fit within the region, there may be some lines of text that are never visible. The general rule is that lines that do not fit in their cue's region are not displayed. Those points are worth stating.

Secondly, I can't see in the parsing and processing models why cues with a "size" setting drop out of the region. If they drop out, where do they go? Are they dropped on the floor, or displayed somewhere else outside the region?

The same is true for the "vertical" and "line" settings: in all three cases I could not find algorithmic steps switched on the presence or absence of those settings that modify the position to be either region-based or viewport-based. Please could you point me to where that happens?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Dropping out of a region" merely means that they are not rendered within the region, but rendered in their own right with the settings given.

Looks like there are some things missing in the parsing algorithm. I'll add some text. Thanks for noticing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome. By the way, this is exactly the kind of thing that's in my mind when I grump about algorithmic specifications and the ability for the WG to test that they do what they're supposed to do.

@silviapfeiffer
Copy link
Member Author

Please check the last comment - first two comments have been addressed.

index.bs Outdated
setting, the cue drops out of the region. Otherwise, the cue's width is calculated to be relative to
the region width rather than the viewport. </p>
<p class=note>The position of a cue inside the video viewport is defined by a set of cue settings.
The position of a region inside the video viewport is defined through a set of region settings. Cues
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we should be consistent about the use of "by" or "through". I'd go for "by" in both places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK :-)

@silviapfeiffer
Copy link
Member Author

@nigelmegitt ready for re-review


To format the index.bs file, run:

$ ./format.py index.bs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it has nothing to do with #383, but whatever, no big deal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's just for future editors - had to come in somewhere. ;-)

@silviapfeiffer silviapfeiffer merged commit 3dc9cad into w3c:gh-pages Dec 21, 2017
@silviapfeiffer silviapfeiffer deleted the boxmodel-issue383 branch December 21, 2017 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants