Changeset 126372 in webkit


Ignore:
Timestamp:
Aug 22, 2012 6:00:10 PM (12 years ago)
Author:
victor@rosedu.org
Message:

Display a TextTrackCue when snap-to-lines flag is set
https://bugs.webkit.org/show_bug.cgi?id=79751

Reviewed by Tony Chang.

Source/WebCore:

This patch implements rendering functionality for a given text track,
following closer the exact WebVTT specification. There are two new classes
which have been added in order to succesfully cover rendering when of a text
track cue.

RenderTextTrackCue handles the specific rendering algorithm required,
by checking for overlaps with other boxes that are in the same
container (these can be any other boxes, not necessarily other cues,
the video controls, for example).

TextTrackCueBox extends HTMLDivElement and is an intermediate layer
between the renderer class and the actual cue object. Its purpose is
to instantiate the particular renderer and cover all the default CSS
styling that needs to be applied to the cue.

The layout is done in two steps:

  • Step 1: Layout the TextTrackCue with default CSS properties set (this is

the TextTrackCueBox decorated with the respective CSS elements)

  • Step 2: RenderTextTrackCue adjusts the box position depending on the

parameters of the TextTrackCue object and the overlaps that may occur with
previously positioned cues.

Tests: media/track/track-cue-rendering-horizontal.html

media/track/track-cue-rendering-vertical.html

  • CMakeLists.txt: Updated to include RenderTextTrackCue.
  • GNUmakefile.list.am: Updated to include RenderTextTrackCue.
  • Target.pri: Updated to include RenderTextTrackCue.
  • WebCore.gypi: Updated to include RenderTextTrackCue.
  • WebCore.vcproj/WebCore.vcproj: Updated to include RenderTextTrackCue.
  • WebCore.xcodeproj/project.pbxproj: Updated to include RenderTextTrackCue.
  • css/mediaControls.css: Removed unreliable CSS.

(video::-webkit-media-text-track-display): Removed properties.

  • html/shadow/MediaControlElements.cpp: Updated to not use the new class.

(RenderTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Simplified
the function by moving the check if track is rendered in TextTrack and used
the TextTrackCueBox for cues.

  • html/track/TextTrack.cpp: Added a new method.

(WebCore::TextTrack::isRendered): Method that returns whether the track should
be rendered or not.
(WebCore):

  • html/track/TextTrack.h: Added the isRendered method.

(TextTrack):

  • html/track/TextTrackCue.cpp: Added several helper methods and

the TextTrackCueBox.
(WebCore):
(WebCore::TextTrackCueBox::TextTrackCueBox): The TextTrackCueBox extends
the HTMLDivElement and represents a bridge class between RenderTextTrackCue
and TextTrackCue. This is required as the layout is done in two steps, as
explained on top of the ChangeLog entry.
(WebCore::TextTrackCueBox::getCue): Returns the associated TextTrackCue object.
(WebCore::TextTrackCueBox::applyCSSProperties): Applies a part of the default CSS
properties, as defined by section 3.5.1 of the WebVTT specification.
(WebCore::TextTrackCueBox::shadowPseudoId): Moved the shadow pseudo id.
(WebCore::TextTrackCueBox::createRenderer): Creates the particular renderer.
(WebCore::TextTrackCue::TextTrackCue): Corrected the internal writing mode map.
(WebCore::TextTrackCue::calculateComputedLinePosition): Updated the compute line
position algorithm. This requires, however, a method to consider only rendered
tracks (and therefore will be addressed completely in subsequent changeset).
(WebCore::TextTrackCue::calculateDisplayParameters): Updated and corrected the
computed display parameters to match the current specification.
(WebCore::TextTrackCue::getDisplayTree): Update to use the TextTrackCueBox class
and moved CSS application to the respective class.
(WebCore::TextTrackCue::getPositionCoordinates): Added comment to specify in which
situation this method is used and change visibility to private.
(WebCore::TextTrackCue::getCSSWritingMode): Returns the CSS writing mode corresponding
to the cue writing mode.
(WebCore::TextTrackCue::getCSSSize): Returns the cue width / height (depending on the
writing direction.
(WebCore::TextTrackCue::getCSSPosition): Returns the default display position, that is
used in the first layout step.

  • html/track/TextTrackCue.h:

(WebCore):
(TextTrackCueBox):
(WebCore::TextTrackCueBox::create): Initialization method.
(TextTrackCue):
(WebCore::TextTrackCue::getWritingDirection): Helper method to return the internal
values used to represent the writing direction.

  • rendering/RenderTextTrackCue.cpp: Added.

(WebCore):
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
(WebCore::RenderTextTrackCue::layout): The rendering steps, as mentioned in
the WebVTT rendering rules. Currently, this treats only the snap-to-lines set
case. It is implemented following closely the spec, and might be subject to
change as discussions on various bugs evolve.
(WebCore::RenderTextTrackCue::initializeLayoutParameters): Steps 1 - 7.
(WebCore::RenderTextTrackCue::placeBoxInDefaultPosition): Steps 8 - 10.
(WebCore::RenderTextTrackCue::isOutside): Inline method to check if the cue is outside.
(WebCore::RenderTextTrackCue::isOverlapping): Inline method to check if the cue overlaps other boxes.
(WebCore::RenderTextTrackCue::shouldSwitchDirection): Step 12.
(WebCore::RenderTextTrackCue::moveBoxesByStep): Step 13.
(WebCore::RenderTextTrackCue::switchDirection): Steps 15 - 18.
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Cue repositioning
for text track cue when the snap to lines flag is set.
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Cue repositioning
for text track cue when the snap to lines flag is not set. Not implemented yet.

  • rendering/RenderTextTrackCue.h: Added.

(WebCore):
(RenderTextTrackCue): Rendering class, handling the display of cues.

LayoutTests:

Test cases covering snap-to-lines horizontal and vertical positioning of cues.

  • media/track/captions-webvtt/captions-snap-to-lines-set.vtt: Added.
  • media/track/track-cue-rendering-horizontal.html: Added.
  • media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Updated.
  • media/track/track-cue-rendering-vertical.html: Added.
  • media/video-test.js: Updated to support pixel test dumps.
  • platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.png: Added.
  • platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.txt: Added.
  • platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.png: Added.
  • platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.txt: Added.
  • platform/chromium/TestExpectations: Marking these temporarily as IMAGE fail, as they will

anyway require new baselines.

  • platform/mac/media/track/track-cue-rendering-horizontal-expected.png: Added.
  • platform/mac/media/track/track-cue-rendering-horizontal-expected.txt: Added.
  • platform/mac/media/track/track-cue-rendering-vertical-expected.png: Added.
  • platform/mac/media/track/track-cue-rendering-vertical-expected.txt: Added.
Location:
trunk
Files:
13 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r126369 r126372  
     12012-08-22  Victor Carbune  <victor@rosedu.org>
     2
     3        Display a TextTrackCue when snap-to-lines flag is set
     4        https://bugs.webkit.org/show_bug.cgi?id=79751
     5
     6        Reviewed by Tony Chang.
     7
     8        Test cases covering snap-to-lines horizontal and vertical positioning of cues.
     9
     10        * media/track/captions-webvtt/captions-snap-to-lines-set.vtt: Added.
     11        * media/track/track-cue-rendering-horizontal.html: Added.
     12        * media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Updated.
     13        * media/track/track-cue-rendering-vertical.html: Added.
     14        * media/video-test.js: Updated to support pixel test dumps.
     15        * platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.png: Added.
     16        * platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.txt: Added.
     17        * platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.png: Added.
     18        * platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.txt: Added.
     19        * platform/chromium/TestExpectations: Marking these temporarily as IMAGE fail, as they will
     20        anyway require new baselines.
     21        * platform/mac/media/track/track-cue-rendering-horizontal-expected.png: Added.
     22        * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt: Added.
     23        * platform/mac/media/track/track-cue-rendering-vertical-expected.png: Added.
     24        * platform/mac/media/track/track-cue-rendering-vertical-expected.txt: Added.
     25
    1262012-08-22  Alejandro Piñeiro  <apinheiro@igalia.com>
    227
  • trunk/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt

    r126238 r126372  
    1313EXPECTED (cueDisplayElement.innerText == 'This is a demo track to illustrate positioning features of cues.') OK
    1414Cue left position (percentage): 0
    15 Cue top position (percentage): 100
     15Cue top position (percentage): 81
    1616
    1717** Center **
  • trunk/LayoutTests/media/video-test.js

    r126238 r126372  
    1515
    1616if (window.testRunner) {
    17     testRunner.dumpAsText();
     17    // Some track element rendering tests require text pixel dump.
     18    if (typeof requirePixelDump == "undefined")
     19        testRunner.dumpAsText();
     20
    1821    testRunner.waitUntilDone();
    1922}
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r126367 r126372  
    34493449BUGWK93488 SKIP : fast/notifications/notifications-permission.html = TEXT
    34503450
     3451BUGWK79751 : media/track/track-cue-rendering-horizontal.html = IMAGE
     3452BUGWK79751 : media/track/track-cue-rendering-vertical.html = IMAGE
     3453
    34513454// Flaky
    34523455BUGWK93799 MAC : fast/dom/HTMLMeterElement/meter-element-repaint-on-update-value.html = PASS IMAGE
  • trunk/Source/WebCore/CMakeLists.txt

    r126333 r126372  
    20912091    rendering/RenderTextControlSingleLine.cpp
    20922092    rendering/RenderTextFragment.cpp
     2093    rendering/RenderTextTrackCue.cpp
    20932094    rendering/RenderTheme.cpp
    20942095    rendering/RenderTreeAsText.cpp
  • trunk/Source/WebCore/ChangeLog

    r126370 r126372  
     12012-08-22  Victor Carbune  <victor@rosedu.org>
     2
     3        Display a TextTrackCue when snap-to-lines flag is set
     4        https://bugs.webkit.org/show_bug.cgi?id=79751
     5
     6        Reviewed by Tony Chang.
     7
     8        This patch implements rendering functionality for a given text track,
     9        following closer the exact WebVTT specification. There are two new classes
     10        which have been added in order to succesfully cover rendering when of a text
     11        track cue.
     12
     13        RenderTextTrackCue handles the specific rendering algorithm required,
     14        by checking for overlaps with other boxes that are in the same
     15        container (these can be any other boxes, not necessarily other cues,
     16        the video controls, for example).
     17
     18        TextTrackCueBox extends HTMLDivElement and is an intermediate layer
     19        between the renderer class and the actual cue object. Its purpose is
     20        to instantiate the particular renderer and cover all the default CSS
     21        styling that needs to be applied to the cue.
     22
     23        The layout is done in two steps:
     24          - Step 1: Layout the TextTrackCue with default CSS properties set (this is
     25        the TextTrackCueBox decorated with the respective CSS elements)
     26          - Step 2: RenderTextTrackCue adjusts the box position depending on the
     27        parameters of the TextTrackCue object and the overlaps that may occur with
     28        previously positioned cues.
     29
     30        Tests: media/track/track-cue-rendering-horizontal.html
     31               media/track/track-cue-rendering-vertical.html
     32
     33        * CMakeLists.txt: Updated to include RenderTextTrackCue.
     34        * GNUmakefile.list.am: Updated to include RenderTextTrackCue.
     35        * Target.pri: Updated to include RenderTextTrackCue.
     36        * WebCore.gypi: Updated to include RenderTextTrackCue.
     37        * WebCore.vcproj/WebCore.vcproj: Updated to include RenderTextTrackCue.
     38        * WebCore.xcodeproj/project.pbxproj: Updated to include RenderTextTrackCue.
     39        * css/mediaControls.css: Removed unreliable CSS.
     40        (video::-webkit-media-text-track-display): Removed properties.
     41        * html/shadow/MediaControlElements.cpp: Updated to not use the new class.
     42        (RenderTextTrackContainerElement):
     43        (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Simplified
     44        the function by moving the check if track is rendered in TextTrack and used
     45        the TextTrackCueBox for cues.
     46        * html/track/TextTrack.cpp: Added a new method.
     47        (WebCore::TextTrack::isRendered): Method that returns whether the track should
     48        be rendered or not.
     49        (WebCore):
     50        * html/track/TextTrack.h: Added the isRendered method.
     51        (TextTrack):
     52        * html/track/TextTrackCue.cpp: Added several helper methods and
     53        the TextTrackCueBox.
     54        (WebCore):
     55        (WebCore::TextTrackCueBox::TextTrackCueBox): The TextTrackCueBox extends
     56        the HTMLDivElement and represents a bridge class between RenderTextTrackCue
     57        and TextTrackCue. This is required as the layout is done in two steps, as
     58        explained on top of the ChangeLog entry.
     59        (WebCore::TextTrackCueBox::getCue): Returns the associated TextTrackCue object.
     60        (WebCore::TextTrackCueBox::applyCSSProperties): Applies a part of the default CSS
     61        properties, as defined by section 3.5.1 of the WebVTT specification.
     62        (WebCore::TextTrackCueBox::shadowPseudoId): Moved the shadow pseudo id.
     63        (WebCore::TextTrackCueBox::createRenderer): Creates the particular renderer.
     64        (WebCore::TextTrackCue::TextTrackCue): Corrected the internal writing mode map.
     65        (WebCore::TextTrackCue::calculateComputedLinePosition): Updated the compute line
     66        position algorithm. This requires, however, a method to consider only rendered
     67        tracks (and therefore will be addressed completely in subsequent changeset).
     68        (WebCore::TextTrackCue::calculateDisplayParameters): Updated and corrected the
     69        computed display parameters to match the current specification.
     70        (WebCore::TextTrackCue::getDisplayTree): Update to use the TextTrackCueBox class
     71        and moved CSS application to the respective class.
     72        (WebCore::TextTrackCue::getPositionCoordinates): Added comment to specify in which
     73        situation this method is used and change visibility to private.
     74        (WebCore::TextTrackCue::getCSSWritingMode): Returns the CSS writing mode corresponding
     75        to the cue writing mode.
     76        (WebCore::TextTrackCue::getCSSSize): Returns the cue width / height (depending on the
     77        writing direction.
     78        (WebCore::TextTrackCue::getCSSPosition): Returns the default display position, that is
     79        used in the first layout step.
     80        * html/track/TextTrackCue.h:
     81        (WebCore):
     82        (TextTrackCueBox):
     83        (WebCore::TextTrackCueBox::create): Initialization method.
     84        (TextTrackCue):
     85        (WebCore::TextTrackCue::getWritingDirection): Helper method to return the internal
     86        values used to represent the writing direction.
     87        * rendering/RenderTextTrackCue.cpp: Added.
     88        (WebCore):
     89        (WebCore::RenderTextTrackCue::RenderTextTrackCue):
     90        (WebCore::RenderTextTrackCue::layout): The rendering steps, as mentioned in
     91        the WebVTT rendering rules. Currently, this treats only the snap-to-lines set
     92        case. It is implemented following closely the spec, and might be subject to
     93        change as discussions on various bugs evolve.
     94        (WebCore::RenderTextTrackCue::initializeLayoutParameters): Steps 1 - 7.
     95        (WebCore::RenderTextTrackCue::placeBoxInDefaultPosition): Steps 8 - 10.
     96        (WebCore::RenderTextTrackCue::isOutside): Inline method to check if the cue is outside.
     97        (WebCore::RenderTextTrackCue::isOverlapping): Inline method to check if the cue overlaps other boxes.
     98        (WebCore::RenderTextTrackCue::shouldSwitchDirection): Step 12.
     99        (WebCore::RenderTextTrackCue::moveBoxesByStep): Step 13.
     100        (WebCore::RenderTextTrackCue::switchDirection): Steps 15 - 18.
     101        (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Cue repositioning
     102        for text track cue when the snap to lines flag is set.
     103        (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Cue repositioning
     104        for text track cue when the snap to lines flag is not set. Not implemented yet.
     105        * rendering/RenderTextTrackCue.h: Added.
     106        (WebCore):
     107        (RenderTextTrackCue): Rendering class, handling the display of cues.
     108
    11092012-08-21  Kentaro Hara  <haraken@chromium.org>
    2110
  • trunk/Source/WebCore/GNUmakefile.list.am

    r126343 r126372  
    42644264        Source/WebCore/rendering/RenderTextControlSingleLine.h \
    42654265        Source/WebCore/rendering/RenderText.cpp \
     4266        Source/WebCore/rendering/RenderTextTrackCue.cpp \
     4267        Source/WebCore/rendering/RenderTextTrackCue.h \
    42664268        Source/WebCore/rendering/RenderTextFragment.cpp \
    42674269        Source/WebCore/rendering/RenderTextFragment.h \
  • trunk/Source/WebCore/Target.pri

    r126343 r126372  
    11751175    rendering/RenderTextControlSingleLine.cpp \
    11761176    rendering/RenderTextFragment.cpp \
     1177    rendering/RenderTextTrackCue.cpp \
    11771178    rendering/RenderTheme.cpp \
    11781179    rendering/RenderTreeAsText.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r126345 r126372  
    48344834            'rendering/RenderTextFragment.cpp',
    48354835            'rendering/RenderTextFragment.h',
     4836            'rendering/RenderTextTrackCue.cpp',
     4837            'rendering/RenderTextTrackCue.h',
    48364838            'rendering/RenderTheme.cpp',
    48374839            'rendering/RenderTheme.h',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r126314 r126372  
    4377243772                        </File>
    4377343773                        <File
     43774                                RelativePath="..\rendering\RenderTextTrackCue.cpp"
     43775                                >
     43776                                <FileConfiguration
     43777                                        Name="Debug|Win32"
     43778                                        ExcludedFromBuild="true"
     43779                                        >
     43780                                        <Tool
     43781                                                Name="VCCLCompilerTool"
     43782                                        />
     43783                                </FileConfiguration>
     43784                                <FileConfiguration
     43785                                        Name="Release|Win32"
     43786                                        ExcludedFromBuild="true"
     43787                                        >
     43788                                        <Tool
     43789                                                Name="VCCLCompilerTool"
     43790                                        />
     43791                                </FileConfiguration>
     43792                                <FileConfiguration
     43793                                        Name="Debug_Cairo_CFLite|Win32"
     43794                                        ExcludedFromBuild="true"
     43795                                        >
     43796                                        <Tool
     43797                                                Name="VCCLCompilerTool"
     43798                                        />
     43799                                </FileConfiguration>
     43800                                <FileConfiguration
     43801                                        Name="Release_Cairo_CFLite|Win32"
     43802                                        ExcludedFromBuild="true"
     43803                                        >
     43804                                        <Tool
     43805                                                Name="VCCLCompilerTool"
     43806                                        />
     43807                                </FileConfiguration>
     43808                                <FileConfiguration
     43809                                        Name="Debug_All|Win32"
     43810                                        ExcludedFromBuild="true"
     43811                                        >
     43812                                        <Tool
     43813                                                Name="VCCLCompilerTool"
     43814                                        />
     43815                                </FileConfiguration>
     43816                                <FileConfiguration
     43817                                        Name="Production|Win32"
     43818                                        ExcludedFromBuild="true"
     43819                                        >
     43820                                        <Tool
     43821                                                Name="VCCLCompilerTool"
     43822                                        />
     43823                                </FileConfiguration>
     43824                        </File>
     43825                        <File
     43826                                RelativePath="..\rendering\RenderTextTrackCue.h"
     43827                                >
     43828                        </File>
     43829                        <File
    4377443830                                RelativePath="..\rendering\RenderTheme.cpp"
    4377543831                                >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r126343 r126372  
    29472947                86BE340415058CB200CE0FD8 /* PerformanceEntryList.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BE33FE15058CB200CE0FD8 /* PerformanceEntryList.h */; };
    29482948                86D982F7125C154000AD9E3D /* DocumentTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D982F6125C154000AD9E3D /* DocumentTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
     2949                86FF886115DE3D0700BD6B28 /* RenderTextTrackCue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86FF885E15DE3B8200BD6B28 /* RenderTextTrackCue.cpp */; };
     2950                86FF886215DE3D0700BD6B28 /* RenderTextTrackCue.h in Headers */ = {isa = PBXBuildFile; fileRef = 86FF885F15DE3B8200BD6B28 /* RenderTextTrackCue.h */; };
    29492951                890AE0E11256A07900F5968C /* DirectoryReaderBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 890AE0E01256A07900F5968C /* DirectoryReaderBase.h */; };
    29502952                8931DE5B14C44C44000DC9D2 /* JSBlobCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */; };
     
    1008610088                86BE33FF15058CB200CE0FD8 /* PerformanceEntryList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceEntryList.idl; sourceTree = "<group>"; };
    1008710089                86D982F6125C154000AD9E3D /* DocumentTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentTiming.h; sourceTree = "<group>"; };
     10090                86FF885E15DE3B8200BD6B28 /* RenderTextTrackCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextTrackCue.cpp; sourceTree = "<group>"; };
     10091                86FF885F15DE3B8200BD6B28 /* RenderTextTrackCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTextTrackCue.h; sourceTree = "<group>"; };
    1008810092                890AE0E01256A07900F5968C /* DirectoryReaderBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReaderBase.h; path = Modules/filesystem/DirectoryReaderBase.h; sourceTree = "<group>"; };
    1008910093                8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlobCustom.cpp; sourceTree = "<group>"; };
     
    2143221436                                BCEA484E097D93020094C9E4 /* RenderTextFragment.cpp */,
    2143321437                                BCEA484F097D93020094C9E4 /* RenderTextFragment.h */,
     21438                                86FF885E15DE3B8200BD6B28 /* RenderTextTrackCue.cpp */,
     21439                                86FF885F15DE3B8200BD6B28 /* RenderTextTrackCue.h */,
    2143421440                                BCEA484A097D93020094C9E4 /* RenderTheme.cpp */,
    2143521441                                BCEA484B097D93020094C9E4 /* RenderTheme.h */,
     
    2467624682                                083DAEA90F01A7FB00342754 /* RenderTextControlSingleLine.h in Headers */,
    2467724683                                BCEA488E097D93020094C9E4 /* RenderTextFragment.h in Headers */,
     24684                                86FF886215DE3D0700BD6B28 /* RenderTextTrackCue.h in Headers */,
    2467824685                                BCEA488A097D93020094C9E4 /* RenderTheme.h in Headers */,
    2467924686                                BCEA4887097D93020094C9E4 /* RenderThemeMac.h in Headers */,
     
    2788127888                                083DAEA80F01A7FB00342754 /* RenderTextControlSingleLine.cpp in Sources */,
    2788227889                                BCEA488D097D93020094C9E4 /* RenderTextFragment.cpp in Sources */,
     27890                                86FF886115DE3D0700BD6B28 /* RenderTextTrackCue.cpp in Sources */,
    2788327891                                BCEA4889097D93020094C9E4 /* RenderTheme.cpp in Sources */,
    2788427892                                BCEA4888097D93020094C9E4 /* RenderThemeMac.mm in Sources */,
  • trunk/Source/WebCore/css/mediaControls.css

    r126238 r126372  
    254254    position: absolute;
    255255    color: rgba(255, 255, 255, 1);
    256 
    257     top: 100%;
    258     -webkit-transform: translate(0%, -100%);
    259 }
     256}
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r126238 r126372  
    3333#include "MediaControlElements.h"
    3434
     35#include "CSSStyleDeclaration.h"
    3536#include "CSSValueKeywords.h"
    3637#include "DOMTokenList.h"
    3738#include "EventNames.h"
    3839#include "FloatConversion.h"
     40#include "FloatPoint.h"
    3941#include "Frame.h"
     42#include "HTMLDivElement.h"
    4043#include "HTMLMediaElement.h"
    4144#include "HTMLNames.h"
    4245#include "HTMLVideoElement.h"
     46#include "LayoutRepainter.h"
    4347#include "LocalizedStrings.h"
    4448#include "MediaControls.h"
     
    4650#include "Page.h"
    4751#include "RenderDeprecatedFlexibleBox.h"
     52#include "RenderInline.h"
    4853#include "RenderMedia.h"
    4954#include "RenderSlider.h"
     55#include "RenderText.h"
    5056#include "RenderTheme.h"
    5157#include "RenderVideo.h"
     
    12591265public:
    12601266    RenderTextTrackContainerElement(Node*);
    1261    
     1267
    12621268private:
    12631269    virtual void layout();
     
    13531359    // corresponding CSS boxes added to output, in text track cue order, run the
    13541360    // following substeps:
    1355 
    1356     // Simple renderer for now.
    13571361    for (size_t i = 0; i < activeCues.size(); ++i) {
    13581362        TextTrackCue* cue = activeCues[i].data();
    13591363
    13601364        ASSERT(cue->isActive());
    1361         if (cue->track()->kind() != TextTrack::captionsKeyword() && cue->track()->kind() != TextTrack::subtitlesKeyword())
     1365        if (!cue->track() || !cue->track()->isRendered())
    13621366            continue;
    13631367
    1364         if (!cue->track() || cue->track()->mode() != TextTrack::SHOWING)
    1365             continue;
    1366 
    1367         RefPtr<HTMLDivElement> displayTree = cue->getDisplayTree();
    1368 
    1369         // Append only new display trees.
    1370         if (displayTree->hasChildNodes() && !contains(displayTree.get()))
    1371             appendChild(displayTree, ASSERT_NO_EXCEPTION, true);
    1372 
    1373         // Note: the display tree of a cue is removed when the active flag of the cue is unset.
    1374 
    1375         // FIXME(BUG 79751): Render the TextTrackCue when snap-to-lines is set.
    1376 
    1377         // FIXME(BUG 84296): Implement overlapping detection for cue boxes when snap-to-lines is not set.
     1368        RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree();
     1369
     1370        if (displayBox->hasChildNodes() && !contains(static_cast<Node*>(displayBox.get())))
     1371            // Note: the display tree of a cue is removed when the active flag of the cue is unset.
     1372            appendChild(displayBox, ASSERT_NO_EXCEPTION, false);
    13781373    }
    13791374
  • trunk/Source/WebCore/html/track/TextTrack.cpp

    r126350 r126372  
    295295}
    296296
     297bool TextTrack::isRendered()
     298{
     299    if (m_kind != captionsKeyword() && m_kind != subtitlesKeyword())
     300        return false;
     301
     302    if (m_mode != SHOWING && !m_showingByDefault)
     303        return false;
     304
     305    return true;
     306}
     307
    297308TextTrackCueList* TextTrack::ensureTextTrackCueList()
    298309{
  • trunk/Source/WebCore/html/track/TextTrack.h

    r126238 r126372  
    111111    void invalidateTrackIndex();
    112112
     113    bool isRendered();
     114
    113115protected:
    114116    TextTrack(ScriptExecutionContext*, TextTrackClient*, const String& kind, const String& label, const String& language, TextTrackType);
  • trunk/Source/WebCore/html/track/TextTrackCue.cpp

    r126350 r126372  
    4242#include "HTMLDivElement.h"
    4343#include "HTMLMediaElement.h"
     44#include "RenderTextTrackCue.h"
    4445#include "Text.h"
    4546#include "TextTrack.h"
     
    8889    return verticallr;
    8990}
     91
     92// ----------------------------
     93
     94TextTrackCueBox::TextTrackCueBox(Document* document, TextTrackCue* cue)
     95    : HTMLElement(divTag, document)
     96    , m_cue(cue)
     97{
     98}
     99
     100TextTrackCue* TextTrackCueBox::getCue() const
     101{
     102    return m_cue;
     103}
     104
     105void TextTrackCueBox::applyCSSProperties()
     106{
     107    // FIXME: Apply all the initial CSS positioning properties. http://wkb.ug/79916
     108
     109    // 3.5.1 On the (root) List of WebVTT Node Objects:
     110
     111    // the 'position' property must be set to 'absolute'
     112    setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute);
     113
     114    //  the 'unicode-bidi' property must be set to 'plaintext'
     115    setInlineStyleProperty(CSSPropertyUnicodeBidi, CSSValueWebkitPlaintext);
     116
     117    // FIXME: Determine the text direction using the BIDI algorithm. http://wkb.ug/79749
     118    // the 'direction' property must be set to direction
     119    setInlineStyleProperty(CSSPropertyDirection, CSSValueLtr);
     120
     121    // the 'writing-mode' property must be set to writing-mode
     122    setInlineStyleProperty(CSSPropertyWebkitWritingMode, m_cue->getCSSWritingMode(), false);
     123
     124    std::pair<float, float> position = m_cue->getCSSPosition();
     125
     126    // the 'top' property must be set to top,
     127    setInlineStyleProperty(CSSPropertyTop, static_cast<double>(position.second), CSSPrimitiveValue::CSS_PERCENTAGE);
     128
     129    // the 'left' property must be set to left
     130    setInlineStyleProperty(CSSPropertyLeft, static_cast<double>(position.first), CSSPrimitiveValue::CSS_PERCENTAGE);
     131
     132    // the 'width' property must be set to width, and the 'height' property  must be set to height
     133    if (m_cue->vertical() == horizontalKeyword()) {
     134        setInlineStyleProperty(CSSPropertyWidth, static_cast<double>(m_cue->getCSSSize()), CSSPrimitiveValue::CSS_PERCENTAGE);
     135        setInlineStyleProperty(CSSPropertyHeight, CSSValueAuto);
     136    } else {
     137        setInlineStyleProperty(CSSPropertyWidth, CSSValueAuto);
     138        setInlineStyleProperty(CSSPropertyHeight, static_cast<double>(m_cue->getCSSSize()),  CSSPrimitiveValue::CSS_PERCENTAGE);
     139    }
     140
     141    // The 'text-align' property on the (root) List of WebVTT Node Objects must
     142    // be set to the value in the second cell of the row of the table below
     143    // whose first cell is the value of the corresponding cue's text track cue
     144    // alignment:
     145    if (m_cue->align() == startKeyword())
     146        setInlineStyleProperty(CSSPropertyTextAlign, CSSValueStart);
     147    else if (m_cue->align() == endKeyword())
     148        setInlineStyleProperty(CSSPropertyTextAlign, CSSValueEnd);
     149    else
     150        setInlineStyleProperty(CSSPropertyTextAlign, CSSValueCenter);
     151
     152    if (!m_cue->snapToLines()) {
     153        // 10.13.1 Set up x and y:
     154        // Note: x and y are set through the CSS left and top above.
     155
     156        // 10.13.2 Position the boxes in boxes such that the point x% along the
     157        // width of the bounding box of the boxes in boxes is x% of the way
     158        // across the width of the video's rendering area, and the point y%
     159        // along the height of the bounding box of the boxes in boxes is y%
     160        // of the way across the height of the video's rendering area, while
     161        // maintaining the relative positions of the boxes in boxes to each
     162        // other.
     163        setInlineStyleProperty(CSSPropertyWebkitTransform,
     164                String::format("translate(-%.2f%%, -%.2f%%)", position.first, position.second));
     165
     166        setInlineStyleProperty(CSSPropertyWhiteSpace, CSSValuePre);
     167    }
     168}
     169
     170const AtomicString& TextTrackCueBox::shadowPseudoId() const
     171{
     172    DEFINE_STATIC_LOCAL(const AtomicString, trackDisplayBoxShadowPseudoId, ("-webkit-media-text-track-display"));
     173    return trackDisplayBoxShadowPseudoId;
     174}
     175
     176RenderObject* TextTrackCueBox::createRenderer(RenderArena* arena, RenderStyle*)
     177{
     178    return new (arena) RenderTextTrackCue(this);
     179}
     180
     181// ----------------------------
    90182
    91183TextTrackCue::TextTrackCue(ScriptExecutionContext* context, double start, double end, const String& content)
     
    109201    , m_futureDocumentNodes(HTMLDivElement::create(static_cast<Document*>(context)))
    110202    , m_displayTreeShouldChange(true)
    111     , m_displayTree(HTMLDivElement::create(static_cast<Document*>(context)))
    112     , m_displayXPosition(undefinedPosition)
    113     , m_displayYPosition(undefinedPosition)
     203    , m_displayTree(TextTrackCueBox::create(static_cast<Document*>(m_scriptExecutionContext), this))
    114204{
    115205    ASSERT(m_scriptExecutionContext->isDocument());
    116206
    117     // The text track cue writing directions are directly relatd to the
    118     // block-flow element, which can be set through the CSS writing modes.
     207    // 4. If the text track cue writing direction is horizontal, then let
     208    // writing-mode be 'horizontal-tb'. Otherwise, if the text track cue writing
     209    // direction is vertical growing left, then let writing-mode be
     210    // 'vertical-rl'. Otherwise, the text track cue writing direction is
     211    // vertical growing right; let writing-mode be 'vertical-lr'.
    119212    m_displayWritingModeMap[Horizontal] = CSSValueHorizontalTb;
    120     m_displayWritingModeMap[VerticalGrowingLeft] = CSSValueVerticalLr;
    121     m_displayWritingModeMap[VerticalGrowingRight] = CSSValueVerticalRl;
     213    m_displayWritingModeMap[VerticalGrowingLeft] = CSSValueVerticalRl;
     214    m_displayWritingModeMap[VerticalGrowingRight] = CSSValueVerticalLr;
    122215
    123216    // A text track cue has a text track cue computed line position whose value
     
    441534    // Otherwise, it is the value returned by the following algorithm:
    442535
    443     // FIXME(BUG 79751): Complete determination algorithm when it is actually
    444     // used - when displaying a TextTrackCue having snap-to-lines flag set.
    445 
    446     return 100;
     536    // If cue is not associated with a text track, return -1 and abort these
     537    // steps.
     538    if (!track())
     539        return -1;
     540
     541    // Let n be the number of text tracks whose text track mode is showing or
     542    // showing by default and that are in the media element's list of text
     543    // tracks before track.
     544
     545    // FIXME: Add a method to cache the track index considering only
     546    // rendered tracks (that have showing or showing by default mode set).
     547    // http://wkb.ug/93779
     548    int n = track()->trackIndex();
     549
     550    // Increment n by one.
     551    n++;
     552
     553    // Negate n.
     554    n = -n;
     555
     556    return n;
    447557}
    448558
     
    458568    // track cue writing direction is vertical growing right; let block-flow be
    459569    // 'rl'.
    460 
    461570    m_displayWritingMode = m_displayWritingModeMap[m_writingDirection];
    462571
     
    467576            || (m_writingDirection == Horizontal && m_cueAlignment == End && m_displayDirection == CSSValueRtl)
    468577            || (m_writingDirection == VerticalGrowingLeft && m_cueAlignment == Start)
    469             || (m_writingDirection == VerticalGrowingRight && m_cueAlignment == End)) {
     578            || (m_writingDirection == VerticalGrowingRight && m_cueAlignment == Start)) {
    470579        maximumSize = 100 - m_textPosition;
    471580    } else if ((m_writingDirection == Horizontal && m_cueAlignment == End && m_displayDirection == CSSValueLtr)
     
    483592    m_displaySize = std::min(m_cueSize, maximumSize);
    484593
    485     // 10.7 If the text track cue writing direction is horizontal, then let
    486     // width be 'size vw' and height be 'auto'. Otherwise, let width be 'auto'
    487     // and height be 'size vh'. (These are CSS values used by the next section
    488     // to set CSS properties for the rendering; 'vw' and 'vh' are CSS units.)
    489     m_displayWidth = m_writingDirection == Horizontal ? m_displaySize : autoSize;
    490     m_displayHeight = m_writingDirection == Horizontal ? autoSize : m_displaySize;
    491 
    492594    // 10.8 Determine the value of x-position or y-position for cue as per the
    493595    // appropriate rules from the following list:
    494     if ((m_writingDirection == Horizontal && m_cueAlignment == Start && m_displayDirection == CSSValueLtr)
    495             || (m_writingDirection == Horizontal && m_cueAlignment == End && m_displayDirection == CSSValueRtl)) {
    496         m_displayXPosition = m_textPosition;
    497     } else if ((m_writingDirection == Horizontal && m_cueAlignment == End && m_displayDirection == CSSValueLtr)
    498             || (m_writingDirection == Horizontal && m_cueAlignment == Start && m_displayDirection == CSSValueRtl)) {
    499         m_displayXPosition = 100 - m_textPosition;
     596    if (m_writingDirection == Horizontal) {
     597        if (m_cueAlignment == Start) {
     598            if (m_displayDirection == CSSValueLtr)
     599                m_displayPosition.first = m_textPosition;
     600            else
     601                m_displayPosition.first = 100 - m_textPosition - m_displaySize;
     602        } else if (m_cueAlignment == End) {
     603            if (m_displayDirection == CSSValueRtl)
     604                m_displayPosition.first = 100 - m_textPosition;
     605            else
     606                m_displayPosition.first = m_textPosition - m_displaySize;
     607        }
    500608    }
    501609
    502610    if ((m_writingDirection == VerticalGrowingLeft && m_cueAlignment == Start)
    503611            || (m_writingDirection == VerticalGrowingRight && m_cueAlignment == Start)) {
    504         m_displayYPosition = m_textPosition;
     612        m_displayPosition.second = m_textPosition;
    505613    } else if ((m_writingDirection == VerticalGrowingLeft && m_cueAlignment == End)
    506614            || (m_writingDirection == VerticalGrowingRight && m_cueAlignment == End)) {
    507         m_displayYPosition = 100 - m_textPosition;
     615        m_displayPosition.second = 100 - m_textPosition;
    508616    }
    509617
    510618    if (m_writingDirection == Horizontal && m_cueAlignment == Middle) {
    511         m_displayXPosition = m_textPosition - m_displaySize / 2;
    512 
    513         if (m_displayDirection == CSSValueRtl)
    514            m_displayXPosition = 100 - m_displayXPosition;
     619        if (m_displayDirection == CSSValueLtr)
     620            m_displayPosition.first = m_textPosition - m_displaySize / 2;
     621        else
     622           m_displayPosition.first = 100 - m_textPosition - m_displaySize / 2;
    515623    }
    516624
    517625    if ((m_writingDirection == VerticalGrowingLeft && m_cueAlignment == Middle)
    518626        || (m_writingDirection == VerticalGrowingRight && m_cueAlignment == Middle))
    519         m_displayYPosition = m_textPosition - m_displaySize / 2;
     627        m_displayPosition.second = m_textPosition - m_displaySize / 2;
    520628
    521629    // 10.9 Determine the value of whichever of x-position or y-position is not
    522630    // yet calculated for cue as per the appropriate rules from the following
    523631    // list:
    524     if (m_snapToLines && m_displayYPosition == undefinedPosition && m_writingDirection == Horizontal)
    525         m_displayYPosition = 0;
    526 
    527     if (!m_snapToLines && m_writingDirection == Horizontal)
    528         m_displayYPosition = m_computedLinePosition;
    529 
    530     if (m_snapToLines && m_displayXPosition == undefinedPosition
     632    if (m_snapToLines && m_displayPosition.second == undefinedPosition && m_writingDirection == Horizontal)
     633        m_displayPosition.second = 0;
     634
     635    if (!m_snapToLines && m_displayPosition.second == undefinedPosition && m_writingDirection == Horizontal)
     636        m_displayPosition.second = m_computedLinePosition;
     637
     638    if (m_snapToLines && m_displayPosition.first == undefinedPosition
    531639            && (m_writingDirection == VerticalGrowingLeft || m_writingDirection == VerticalGrowingRight))
    532         m_displayXPosition = 0;
     640        m_displayPosition.first = 0;
    533641
    534642    if (!m_snapToLines && (m_writingDirection == VerticalGrowingLeft || m_writingDirection == VerticalGrowingRight))
    535         m_displayXPosition = m_computedLinePosition;
    536 
    537     // 10.10 Let left be 'x-position vw' and top be 'y-position vh'.
    538 
    539     // FIXME(Bug 79916): CSS top and left properties need to be applied.
     643        m_displayPosition.first = m_computedLinePosition;
    540644}
    541645
     
    585689}
    586690
    587 PassRefPtr<HTMLDivElement> TextTrackCue::getDisplayTree()
    588 {
    589     DEFINE_STATIC_LOCAL(const AtomicString, trackDisplayBoxShadowPseudoId, ("-webkit-media-text-track-display"));
    590 
     691PassRefPtr<TextTrackCueBox> TextTrackCue::getDisplayTree()
     692{
    591693    if (!m_displayTreeShouldChange)
    592694        return m_displayTree;
     
    598700    // following constraints, thus obtaining a set of CSS boxes positioned
    599701    // relative to an initial containing block:
    600     m_displayTree->setShadowPseudoId(trackDisplayBoxShadowPseudoId, ASSERT_NO_EXCEPTION);
    601702    m_displayTree->removeChildren();
    602703
     
    622723    // but if there is a particularly long word, it does not overflow as it
    623724    // normally would in CSS, it is instead forcibly wrapped at the box's edge.)
    624 
    625     // FIXME(BUG 79916): CSS width property should be set to 'size vw', when the
    626     // maximum cue size computation is corrected in the specification.
    627     if (m_snapToLines)
    628         m_displayTree->setInlineStyleProperty(CSSPropertyWidth, (double) m_cueSize, CSSPrimitiveValue::CSS_PERCENTAGE);
    629 
    630     // FIXME(BUG 79750, 79751): Steps 10.12 - 10.14
    631 
    632     if (!m_snapToLines) {
    633         std::pair<double, double> position = getPositionCoordinates();
    634 
    635         // 10.13.1 Set up x and y:
    636         m_displayTree->setInlineStyleProperty(CSSPropertyLeft, position.first, CSSPrimitiveValue::CSS_PERCENTAGE);
    637         m_displayTree->setInlineStyleProperty(CSSPropertyTop, position.second, CSSPrimitiveValue::CSS_PERCENTAGE);
    638 
    639         // 10.13.2 Position the boxes in boxes such that the point x% along the
    640         // width of the bounding box of the boxes in boxes is x% of the way
    641         // across the width of the video's rendering area, and the point y%
    642         // along the height of the bounding box of the boxes in boxes is y%
    643         // of the way across the height of the video's rendering area, while
    644         // maintaining the relative positions of the boxes in boxes to each
    645         // other.
    646         String translateX = "-" + String::number(position.first) + "%";
    647         String translateY = "-" + String::number(position.second) + "%";
    648         String webkitTransformTranslateValue = "translate(" + translateX + "," + translateY + ")";
    649 
    650         m_displayTree->setInlineStyleProperty(CSSPropertyWebkitTransform,
    651                                               webkitTransformTranslateValue);
    652 
    653         m_displayTree->setInlineStyleProperty(CSSPropertyWhiteSpace,
    654                                               CSSValuePre);
    655     }
     725    m_displayTree->applyCSSProperties();
    656726
    657727    if (m_hasInnerTimestamps)
     
    671741}
    672742
    673 std::pair<double, double> TextTrackCue::getPositionCoordinates()
    674 {
     743std::pair<double, double> TextTrackCue::getPositionCoordinates() const
     744{
     745    // This method is used for setting x and y when snap to lines is not set.
    675746    std::pair<double, double> coordinates;
    676747
     
    927998}
    928999
     1000int TextTrackCue::getCSSWritingMode() const
     1001{
     1002    return m_displayWritingMode;
     1003}
     1004
     1005int TextTrackCue::getCSSSize() const
     1006{
     1007    return m_displaySize;
     1008}
     1009
     1010std::pair<double, double> TextTrackCue::getCSSPosition() const
     1011{
     1012    if (!m_snapToLines)
     1013        return getPositionCoordinates();
     1014
     1015    return m_displayPosition;
     1016}
     1017
    9291018const AtomicString& TextTrackCue::interfaceName() const
    9301019{
  • trunk/Source/WebCore/html/track/TextTrackCue.h

    r126350 r126372  
    3535
    3636#include "EventTarget.h"
     37#include "HTMLElement.h"
    3738#include "TextTrack.h"
    3839#include <wtf/PassOwnPtr.h>
     
    4243
    4344class DocumentFragment;
     45class HTMLDivElement;
    4446class ScriptExecutionContext;
    4547class TextTrack;
    46 class HTMLDivElement;
     48class TextTrackCue;
     49
     50// ----------------------------
     51
     52class TextTrackCueBox : public HTMLElement {
     53public:
     54    static PassRefPtr<TextTrackCueBox> create(Document* document, TextTrackCue* cue)
     55    {
     56        return adoptRef(new TextTrackCueBox(document, cue));
     57    }
     58
     59    TextTrackCue* getCue() const;
     60    void applyCSSProperties();
     61
     62    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
     63
     64private:
     65    TextTrackCueBox(Document*, TextTrackCue*);
     66
     67    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
     68
     69    TextTrackCue* m_cue;
     70};
     71
     72// ----------------------------
    4773
    4874class TextTrackCue : public RefCounted<TextTrackCue>, public EventTarget {
     
    104130    void setIsActive(bool);
    105131
    106     PassRefPtr<HTMLDivElement> getDisplayTree();
     132    PassRefPtr<TextTrackCueBox> getDisplayTree();
    107133    void updateDisplayTree(float);
    108134    void removeDisplayTree();
    109135
     136    int calculateComputedLinePosition();
     137
    110138    virtual const AtomicString& interfaceName() const;
    111139    virtual ScriptExecutionContext* scriptExecutionContext() const;
     140
     141    std::pair<double, double> getCSSPosition() const;
     142    int getCSSSize() const;
     143    int getCSSWritingMode() const;
     144
     145    enum WritingDirection {
     146        Horizontal,
     147        VerticalGrowingLeft,
     148        VerticalGrowingRight,
     149        NumberOfWritingDirections
     150    };
     151    WritingDirection getWritingDirection() const { return m_writingDirection; }
    112152
    113153    DEFINE_ATTRIBUTE_EVENT_LISTENER(enter);
     
    124164    TextTrackCue(ScriptExecutionContext*, double start, double end, const String& content);
    125165
    126     int calculateComputedLinePosition();
     166    std::pair<double, double> getPositionCoordinates() const;
     167    void parseSettings(const String&);
     168
    127169    void calculateDisplayParameters();
    128 
    129     std::pair<double, double> getPositionCoordinates();
    130170
    131171    void cueWillChange();
     
    148188    int m_cueIndex;
    149189
    150     enum WritingDirection {
    151         Horizontal,
    152         VerticalGrowingLeft,
    153         VerticalGrowingRight,
    154         NumberOfWritingDirections
    155     };
    156190    WritingDirection m_writingDirection;
    157191
     
    174208
    175209    bool m_displayTreeShouldChange;
    176     RefPtr<HTMLDivElement> m_displayTree;
     210    RefPtr<TextTrackCueBox> m_displayTree;
    177211
    178212    int m_displayDirection;
     
    182216
    183217    int m_displaySize;
    184     int m_displayHeight;
    185     int m_displayWidth;
    186 
    187     double m_displayXPosition;
    188     double m_displayYPosition;
     218
     219    std::pair<float, float> m_displayPosition;
    189220};
    190221
Note: See TracChangeset for help on using the changeset viewer.