OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 if (trackLabel.isEmpty()) | 492 if (trackLabel.isEmpty()) |
493 trackLabel = String(mediaElement().locale().queryString(WebLocalizedStri
ng::TextTracksNoLabel)); | 493 trackLabel = String(mediaElement().locale().queryString(WebLocalizedStri
ng::TextTracksNoLabel)); |
494 | 494 |
495 return trackLabel; | 495 return trackLabel; |
496 } | 496 } |
497 | 497 |
498 // TextTrack parameter when passed in as a nullptr, creates the "Off" list item
in the track list. | 498 // TextTrack parameter when passed in as a nullptr, creates the "Off" list item
in the track list. |
499 Element* MediaControlTextTrackListElement::createTextTrackListItem(TextTrack* tr
ack) | 499 Element* MediaControlTextTrackListElement::createTextTrackListItem(TextTrack* tr
ack) |
500 { | 500 { |
501 int trackIndex = track ? track->trackIndex() : trackIndexOffValue; | 501 int trackIndex = track ? track->trackIndex() : trackIndexOffValue; |
502 HTMLLabelElement* trackItem = HTMLLabelElement::create(document(), nullptr); | 502 HTMLLabelElement* trackItem = HTMLLabelElement::create(document()); |
503 trackItem->setShadowPseudoId(AtomicString("-internal-media-controls-text-tra
ck-list-item")); | 503 trackItem->setShadowPseudoId(AtomicString("-internal-media-controls-text-tra
ck-list-item")); |
504 HTMLInputElement* trackItemInput = HTMLInputElement::create(document(), null
ptr, false); | 504 HTMLInputElement* trackItemInput = HTMLInputElement::create(document(), null
ptr, false); |
505 trackItemInput->setShadowPseudoId(AtomicString("-internal-media-controls-tex
t-track-list-item-input")); | 505 trackItemInput->setShadowPseudoId(AtomicString("-internal-media-controls-tex
t-track-list-item-input")); |
506 trackItemInput->setType(InputTypeNames::checkbox); | 506 trackItemInput->setType(InputTypeNames::checkbox); |
507 trackItemInput->setIntegralAttribute(trackIndexAttrName(), trackIndex); | 507 trackItemInput->setIntegralAttribute(trackIndexAttrName(), trackIndex); |
508 if (!mediaElement().textTracksVisible()) { | 508 if (!mediaElement().textTracksVisible()) { |
509 if (!track) | 509 if (!track) |
510 trackItemInput->setChecked(true); | 510 trackItemInput->setChecked(true); |
511 } else { | 511 } else { |
512 // If there are multiple text tracks set to showing, they must all have | 512 // If there are multiple text tracks set to showing, they must all have |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 } | 852 } |
853 | 853 |
854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr
eate(MediaControls& mediaControls) | 854 MediaControlCurrentTimeDisplayElement* MediaControlCurrentTimeDisplayElement::cr
eate(MediaControls& mediaControls) |
855 { | 855 { |
856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime
DisplayElement(mediaControls); | 856 MediaControlCurrentTimeDisplayElement* element = new MediaControlCurrentTime
DisplayElement(mediaControls); |
857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time
-display")); | 857 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time
-display")); |
858 return element; | 858 return element; |
859 } | 859 } |
860 | 860 |
861 } // namespace blink | 861 } // namespace blink |
OLD | NEW |