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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/TextTrack.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 VTTCue::VTTCue(Document& document, double startTime, double endTime, const Strin g& text) 204 VTTCue::VTTCue(Document& document, double startTime, double endTime, const Strin g& text)
205 : TextTrackCue(startTime, endTime) 205 : TextTrackCue(startTime, endTime)
206 , m_text(text) 206 , m_text(text)
207 , m_linePosition(undefinedPosition) 207 , m_linePosition(undefinedPosition)
208 , m_computedLinePosition(undefinedPosition) 208 , m_computedLinePosition(undefinedPosition)
209 , m_textPosition(50) 209 , m_textPosition(50)
210 , m_cueSize(100) 210 , m_cueSize(100)
211 , m_writingDirection(Horizontal) 211 , m_writingDirection(Horizontal)
212 , m_cueAlignment(Middle) 212 , m_cueAlignment(Middle)
213 , m_vttNodeTree(0) 213 , m_vttNodeTree(nullptr)
214 , m_cueBackgroundBox(HTMLDivElement::create(document)) 214 , m_cueBackgroundBox(HTMLDivElement::create(document))
215 , m_displayDirection(CSSValueLtr) 215 , m_displayDirection(CSSValueLtr)
216 , m_displaySize(undefinedSize) 216 , m_displaySize(undefinedSize)
217 , m_snapToLines(true) 217 , m_snapToLines(true)
218 , m_displayTreeShouldChange(true) 218 , m_displayTreeShouldChange(true)
219 , m_notifyRegion(true) 219 , m_notifyRegion(true)
220 { 220 {
221 ScriptWrappable::init(this); 221 ScriptWrappable::init(this);
222 } 222 }
223 223
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 402
403 void VTTCue::setText(const String& text) 403 void VTTCue::setText(const String& text)
404 { 404 {
405 if (m_text == text) 405 if (m_text == text)
406 return; 406 return;
407 407
408 cueWillChange(); 408 cueWillChange();
409 // Clear the document fragment but don't bother to create it again just yet as we can do that 409 // Clear the document fragment but don't bother to create it again just yet as we can do that
410 // when it is requested. 410 // when it is requested.
411 m_vttNodeTree = 0; 411 m_vttNodeTree = nullptr;
412 m_text = text; 412 m_text = text;
413 cueDidChange(); 413 cueDidChange();
414 } 414 }
415 415
416 void VTTCue::createVTTNodeTree() 416 void VTTCue::createVTTNodeTree()
417 { 417 {
418 if (!m_vttNodeTree) 418 if (!m_vttNodeTree)
419 m_vttNodeTree = VTTParser::createDocumentFragmentFromCueText(document(), m_text); 419 m_vttNodeTree = VTTParser::createDocumentFragmentFromCueText(document(), m_text);
420 } 420 }
421 421
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 return m_cueBackgroundBox->executionContext(); 1065 return m_cueBackgroundBox->executionContext();
1066 } 1066 }
1067 1067
1068 Document& VTTCue::document() const 1068 Document& VTTCue::document() const
1069 { 1069 {
1070 ASSERT(m_cueBackgroundBox); 1070 ASSERT(m_cueBackgroundBox);
1071 return m_cueBackgroundBox->document(); 1071 return m_cueBackgroundBox->document();
1072 } 1072 }
1073 1073
1074 } // namespace WebCore 1074 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrack.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698