Changeset 140707 in webkit


Ignore:
Timestamp:
Jan 24, 2013, 12:24:56 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Implement :past pseudo class for the WebVTT ::cue pseudo element
https://bugs.webkit.org/show_bug.cgi?id=105482

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-24
Reviewed by Eric Carlson.

Source/WebCore:

It is good to have a designated pseudo class for this, though same could
be achieved by using a combination of ::cue and ::cue(:future).
Tests also check that nested timestamps work properly.

Test: media/track/track-css-matching-timestamps.html

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne):

LayoutTests:

  • media/track/captions-webvtt/styling-timestamps.vtt: Added.
  • media/track/track-css-matching-timestamps-expected.txt: Added.
  • media/track/track-css-matching-timestamps.html: Added.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140702 r140707  
     12013-01-24  Dima Gorbik  <dgorbik@apple.com>
     2
     3        Implement :past pseudo class for the WebVTT ::cue pseudo element
     4        https://bugs.webkit.org/show_bug.cgi?id=105482
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/track/captions-webvtt/styling-timestamps.vtt: Added.
     9        * media/track/track-css-matching-timestamps-expected.txt: Added.
     10        * media/track/track-css-matching-timestamps.html: Added.
     11
    1122013-01-24  Max Vujovic  <mvujovic@adobe.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r140706 r140707  
     12013-01-24  Dima Gorbik  <dgorbik@apple.com>
     2
     3        Implement :past pseudo class for the WebVTT ::cue pseudo element
     4        https://bugs.webkit.org/show_bug.cgi?id=105482
     5
     6        Reviewed by Eric Carlson.
     7
     8        It is good to have a designated pseudo class for this, though same could
     9        be achieved by using a combination of ::cue and ::cue(:future).
     10        Tests also check that nested timestamps work properly.
     11
     12        Test: media/track/track-css-matching-timestamps.html
     13
     14        * css/CSSSelector.cpp:
     15        (WebCore::CSSSelector::pseudoId):
     16        (WebCore::nameToPseudoTypeMap):
     17        (WebCore::CSSSelector::extractPseudoType):
     18        * css/CSSSelector.h:
     19        * css/SelectorChecker.cpp:
     20        (WebCore::SelectorChecker::checkOne):
     21
    1222013-01-23  Jer Noble  <jer.noble@apple.com>
    223
  • trunk/Source/WebCore/css/CSSSelector.cpp

    r140530 r140707  
    239239    case PseudoCue:
    240240    case PseudoFutureCue:
     241    case PseudoPastCue:
    241242#endif
    242243#if ENABLE(IFRAME_SEAMLESS)
     
    328329    DEFINE_STATIC_LOCAL(AtomicString, cue, ("cue(", AtomicString::ConstructFromLiteral));
    329330    DEFINE_STATIC_LOCAL(AtomicString, futureCue, ("future", AtomicString::ConstructFromLiteral));
     331    DEFINE_STATIC_LOCAL(AtomicString, pastCue, ("past", AtomicString::ConstructFromLiteral));
    330332#endif
    331333#if ENABLE(IFRAME_SEAMLESS)
     
    410412        nameToPseudoType->set(cue.impl(), CSSSelector::PseudoCue);
    411413        nameToPseudoType->set(futureCue.impl(), CSSSelector::PseudoFutureCue);
     414        nameToPseudoType->set(pastCue.impl(), CSSSelector::PseudoPastCue);
    412415#endif
    413416#if ENABLE(IFRAME_SEAMLESS)
     
    540543#if ENABLE(VIDEO_TRACK)
    541544    case PseudoFutureCue:
     545    case PseudoPastCue:
    542546#endif
    543547        break;
  • trunk/Source/WebCore/css/CSSSelector.h

    r140530 r140707  
    161161            PseudoCue,
    162162            PseudoFutureCue,
     163            PseudoPastCue,
    163164#endif
    164165#if ENABLE(IFRAME_SEAMLESS)
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r140531 r140707  
    871871        case CSSSelector::PseudoFutureCue:
    872872            return (element->isWebVTTElement() && toWebVTTElement(element)->webVTTNodeType() == WebVTTNodeTypeFuture);
     873        case CSSSelector::PseudoPastCue:
     874            return (element->isWebVTTElement() && toWebVTTElement(element)->webVTTNodeType() == WebVTTNodeTypePast);
    873875#endif
    874876
Note: See TracChangeset for help on using the changeset viewer.