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

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

Issue 276193002: Add a use counter for VTTCue right-to-left rendering (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/frame/UseCounter.h ('k') | no next file » | 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return isLeftToRightDirection(textDirection) ? CSSValueLtr : CSSValueRtl; 548 return isLeftToRightDirection(textDirection) ? CSSValueLtr : CSSValueRtl;
549 } 549 }
550 550
551 void VTTCue::calculateDisplayParameters() 551 void VTTCue::calculateDisplayParameters()
552 { 552 {
553 createVTTNodeTree(); 553 createVTTNodeTree();
554 554
555 // Steps 10.2, 10.3 555 // Steps 10.2, 10.3
556 m_displayDirection = determineTextDirection(m_vttNodeTree.get()); 556 m_displayDirection = determineTextDirection(m_vttNodeTree.get());
557 557
558 if (m_displayDirection == CSSValueRtl)
559 UseCounter::count(document(), UseCounter::VTTCueRenderRtl);
560
558 // 10.4 If the text track cue writing direction is horizontal, then let 561 // 10.4 If the text track cue writing direction is horizontal, then let
559 // block-flow be 'tb'. Otherwise, if the text track cue writing direction is 562 // block-flow be 'tb'. Otherwise, if the text track cue writing direction is
560 // vertical growing left, then let block-flow be 'lr'. Otherwise, the text 563 // vertical growing left, then let block-flow be 'lr'. Otherwise, the text
561 // track cue writing direction is vertical growing right; let block-flow be 564 // track cue writing direction is vertical growing right; let block-flow be
562 // 'rl'. 565 // 'rl'.
563 566
564 // The above step is done through the writing direction static map. 567 // The above step is done through the writing direction static map.
565 568
566 // 10.5 Determine the value of maximum size for cue as per the appropriate 569 // 10.5 Determine the value of maximum size for cue as per the appropriate
567 // rules from the following list: 570 // rules from the following list:
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 1099
1097 void VTTCue::trace(Visitor* visitor) 1100 void VTTCue::trace(Visitor* visitor)
1098 { 1101 {
1099 visitor->trace(m_vttNodeTree); 1102 visitor->trace(m_vttNodeTree);
1100 visitor->trace(m_cueBackgroundBox); 1103 visitor->trace(m_cueBackgroundBox);
1101 visitor->trace(m_displayTree); 1104 visitor->trace(m_displayTree);
1102 TextTrackCue::trace(visitor); 1105 TextTrackCue::trace(visitor);
1103 } 1106 }
1104 1107
1105 } // namespace WebCore 1108 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698