Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 CSSPropertyID propertyID, const String& value) 141 CSSPropertyID propertyID, const String& value)
142 { 142 {
143 if (!value.isEmpty()) 143 if (!value.isEmpty())
144 element.setInlineStyleProperty(propertyID, value); 144 element.setInlineStyleProperty(propertyID, value);
145 } 145 }
146 146
147 VTTCueBox::VTTCueBox(Document& document) 147 VTTCueBox::VTTCueBox(Document& document)
148 : HTMLDivElement(document) 148 : HTMLDivElement(document)
149 , m_snapToLinesPosition(std::numeric_limits<float>::quiet_NaN()) 149 , m_snapToLinesPosition(std::numeric_limits<float>::quiet_NaN())
150 { 150 {
151 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr ing::ConstructFromLiteral)); 151 setShadowPseudoId(AtomicString("-webkit-media-text-track-display"));
152 } 152 }
153 153
154 void VTTCueBox::applyCSSProperties(const VTTDisplayParameters& displayParameters ) 154 void VTTCueBox::applyCSSProperties(const VTTDisplayParameters& displayParameters )
155 { 155 {
156 // http://dev.w3.org/html5/webvtt/#applying-css-properties-to-webvtt-node-ob jects 156 // http://dev.w3.org/html5/webvtt/#applying-css-properties-to-webvtt-node-ob jects
157 157
158 // Initialize the (root) list of WebVTT Node Objects with the following CSS settings: 158 // Initialize the (root) list of WebVTT Node Objects with the following CSS settings:
159 159
160 // the 'position' property must be set to 'absolute' 160 // the 'position' property must be set to 'absolute'
161 setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute); 161 setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute);
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 1141
1142 DEFINE_TRACE(VTTCue) 1142 DEFINE_TRACE(VTTCue)
1143 { 1143 {
1144 visitor->trace(m_vttNodeTree); 1144 visitor->trace(m_vttNodeTree);
1145 visitor->trace(m_cueBackgroundBox); 1145 visitor->trace(m_cueBackgroundBox);
1146 visitor->trace(m_displayTree); 1146 visitor->trace(m_displayTree);
1147 TextTrackCue::trace(visitor); 1147 TextTrackCue::trace(visitor);
1148 } 1148 }
1149 1149
1150 } // namespace blink 1150 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698