| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 24 matching lines...) Expand all Loading... |
| 35 #include "CSSPropertyNames.h" | 35 #include "CSSPropertyNames.h" |
| 36 #include "CSSValueKeywords.h" | 36 #include "CSSValueKeywords.h" |
| 37 #include "RuntimeEnabledFeatures.h" | 37 #include "RuntimeEnabledFeatures.h" |
| 38 #include "bindings/v8/ExceptionStatePlaceholder.h" | 38 #include "bindings/v8/ExceptionStatePlaceholder.h" |
| 39 #include "core/dom/DocumentFragment.h" | 39 #include "core/dom/DocumentFragment.h" |
| 40 #include "core/events/Event.h" | 40 #include "core/events/Event.h" |
| 41 #include "core/dom/NodeTraversal.h" | 41 #include "core/dom/NodeTraversal.h" |
| 42 #include "core/html/HTMLDivElement.h" | 42 #include "core/html/HTMLDivElement.h" |
| 43 #include "core/html/track/TextTrack.h" | 43 #include "core/html/track/TextTrack.h" |
| 44 #include "core/html/track/TextTrackCueList.h" | 44 #include "core/html/track/TextTrackCueList.h" |
| 45 #include "core/html/track/TextTrackRegionList.h" | 45 #include "core/html/track/VTTRegionList.h" |
| 46 #include "core/html/track/WebVTTElement.h" | 46 #include "core/html/track/WebVTTElement.h" |
| 47 #include "core/html/track/WebVTTParser.h" | 47 #include "core/html/track/WebVTTParser.h" |
| 48 #include "core/rendering/RenderTextTrackCue.h" | 48 #include "core/rendering/RenderTextTrackCue.h" |
| 49 #include "wtf/MathExtras.h" | 49 #include "wtf/MathExtras.h" |
| 50 #include "wtf/text/StringBuilder.h" | 50 #include "wtf/text/StringBuilder.h" |
| 51 | 51 |
| 52 namespace WebCore { | 52 namespace WebCore { |
| 53 | 53 |
| 54 static const int invalidCueIndex = -1; | 54 static const int invalidCueIndex = -1; |
| 55 static const int undefinedPosition = -1; | 55 static const int undefinedPosition = -1; |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 865 |
| 866 // 10.15. Let cue's text track cue display state have the CSS boxes in | 866 // 10.15. Let cue's text track cue display state have the CSS boxes in |
| 867 // boxes. | 867 // boxes. |
| 868 return displayTree; | 868 return displayTree; |
| 869 } | 869 } |
| 870 | 870 |
| 871 void TextTrackCue::removeDisplayTree() | 871 void TextTrackCue::removeDisplayTree() |
| 872 { | 872 { |
| 873 if (m_notifyRegion && m_track->regions()) { | 873 if (m_notifyRegion && m_track->regions()) { |
| 874 // The region needs to be informed about the cue removal. | 874 // The region needs to be informed about the cue removal. |
| 875 TextTrackRegion* region = m_track->regions()->getRegionById(m_regionId); | 875 VTTRegion* region = m_track->regions()->getRegionById(m_regionId); |
| 876 if (region) | 876 if (region) |
| 877 region->willRemoveTextTrackCueBox(m_displayTree.get()); | 877 region->willRemoveTextTrackCueBox(m_displayTree.get()); |
| 878 } | 878 } |
| 879 | 879 |
| 880 displayTreeInternal()->remove(ASSERT_NO_EXCEPTION); | 880 displayTreeInternal()->remove(ASSERT_NO_EXCEPTION); |
| 881 } | 881 } |
| 882 | 882 |
| 883 std::pair<double, double> TextTrackCue::getPositionCoordinates() const | 883 std::pair<double, double> TextTrackCue::getPositionCoordinates() const |
| 884 { | 884 { |
| 885 // This method is used for setting x and y when snap to lines is not set. | 885 // This method is used for setting x and y when snap to lines is not set. |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 return false; | 1227 return false; |
| 1228 if (m_cueSize != cue.size()) | 1228 if (m_cueSize != cue.size()) |
| 1229 return false; | 1229 return false; |
| 1230 if (align() != cue.align()) | 1230 if (align() != cue.align()) |
| 1231 return false; | 1231 return false; |
| 1232 | 1232 |
| 1233 return true; | 1233 return true; |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 } // namespace WebCore | 1236 } // namespace WebCore |
| OLD | NEW |