Diff
Modified: trunk/LayoutTests/ChangeLog (199173 => 199174)
--- trunk/LayoutTests/ChangeLog 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/ChangeLog 2016-04-07 20:04:16 UTC (rev 199174)
@@ -1,3 +1,17 @@
+2016-04-06 Ada Chan <[email protected]>
+
+ Rename TextTrackRepresentationiOS to TextTrackRepresentationCocoa and enable on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=156245
+
+ Reviewed by Eric Carlson.
+
+ * platform/mac/TestExpectations:
+ Skip some tests with assertions after changes in MediaControlsApple.css.
+
+ * platform/mac/media/media-document-audio-repaint-expected.txt:
+ * platform/mac/media/video-zoom-controls-expected.txt:
+ Rebaseline some tests after changes in MediaControlsApple.css.
+
2016-04-07 Daniel Bates <[email protected]>
CSP: Remove tests for unimplemented directive referrer
Modified: trunk/LayoutTests/platform/mac/TestExpectations (199173 => 199174)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-04-07 20:04:16 UTC (rev 199174)
@@ -1326,3 +1326,13 @@
webkit.org/b/156112 [ ElCapitan ] media/controls-without-preload.html [ Pass Failure ]
webkit.org/b/156351 storage/indexeddb/modern/autoincrement-abort-private.html [ Pass Timeout ]
+
+webkit.org/b/156320 fast/regions/inline-block-inside-anonymous-overflow.html [ ImageOnlyFailure ]
+
+# Assertions in FrameView::scheduleRelayoutOfSubtree()
+webkit.org/b/156349 [ Debug ] http/tests/appcache/video.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/track-active-cues.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/track-in-band.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/video-track-alternate-groups.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/video-track.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/video-src-empty.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt (199173 => 199174)
--- trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt 2016-04-07 20:04:16 UTC (rev 199174)
@@ -21,38 +21,13 @@
RenderVideo {VIDEO} at (40,164) size 300x2
layer at (40,165) size 300x1
RenderFlexibleBox {DIV} at (0,0) size 300x1
- layer at (40,121) size 300x45
+ layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
RenderFlexibleBox {DIV} at (0,-44) size 300x45
- layer at (40,121) size 300x45 isolatesBlending
+ layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1 isolatesBlending
RenderBlock (positioned) {DIV} at (0,0) size 300x45
- layer at (40,121) size 300x45
+ layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
RenderBlock (positioned) {DIV} at (0,0) size 300x45 [bgcolor=#1E1E1E73]
- layer at (40,121) size 300x45 blendMode: lighten
+ layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1 blendMode: lighten
RenderBlock (positioned) {DIV} at (0,0) size 300x45 [bgcolor=#292929]
- layer at (48,146) size 12x15 blendMode: plus-lighter
- RenderButton {BUTTON} at (8,25) size 12x15 [color=#FFFFFF]
- layer at (76,145) size 16x15 blendMode: plus-lighter
- RenderButton {BUTTON} at (36,24) size 16x16 [color=#FFFFFF]
- layer at (100,145) size 210x17
- RenderFlexibleBox {DIV} at (60,24) size 210x17
- layer at (108,146) size 32x13 blendMode: plus-lighter
- RenderFlexibleBox {DIV} at (8,2) size 32x13 [color=#FFFFFF]
- RenderBlock (anonymous) at (2,0) size 30x13
- RenderText {#text} at (0,0) size 30x13
- text run at (0,0) width 30: "00:00"
- layer at (150,145) size 105x17
- RenderFlexibleBox {DIV} at (50,0) size 105x17
- layer at (150,145) size 105x17 blendMode: plus-lighter
- RenderSlider {INPUT} at (0,0) size 105x17 [color=#909090]
- RenderFlexibleBox {DIV} at (0,0) size 105x17
- RenderBlock {DIV} at (0,1) size 105x15
- RenderBlock {DIV} at (50,0) size 4x15
- layer at (265,146) size 37x13 blendMode: plus-lighter
- RenderFlexibleBox {DIV} at (165,2) size 37x13 [color=#FFFFFF]
- RenderBlock (anonymous) at (0,0) size 35x13
- RenderText {#text} at (0,0) size 35x13
- text run at (0,0) width 35: "-00:00"
- layer at (318,141) size 14x25
+ layer at (318,141) size 14x25 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
RenderFlexibleBox {DIV} at (278,20) size 14x25
- layer at (318,146) size 14x15 blendMode: plus-lighter
- RenderButton {BUTTON} at (0,5) size 14x15 [color=#FFFFFF]
Modified: trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt (199173 => 199174)
--- trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt 2016-04-07 20:04:16 UTC (rev 199174)
@@ -12,17 +12,17 @@
RenderFlexibleBox {DIV} at (0,0) size 240x180
layer at (57,198) size 240x67
RenderFlexibleBox {DIV} at (0,112) size 240x68
-layer at (57,198) size 240x68 isolatesBlending
+layer at (57,198) size 240x68 backgroundClip at (57,85) size 240x180 clip at (57,85) size 240x180 isolatesBlending
RenderBlock (positioned) {DIV} at (0,0) size 240x68
-layer at (57,198) size 240x68
+layer at (57,198) size 240x68 backgroundClip at (57,85) size 240x180 clip at (57,85) size 240x180
RenderBlock (positioned) {DIV} at (0,0) size 240x68 [bgcolor=#1E1E1E73]
-layer at (57,198) size 240x68 blendMode: lighten
+layer at (57,198) size 240x68 backgroundClip at (57,85) size 240x180 clip at (57,85) size 240x180 blendMode: lighten
RenderBlock (positioned) {DIV} at (0,0) size 240x68 [bgcolor=#292929]
layer at (69,235) size 18x22 blendMode: plus-lighter
RenderButton {BUTTON} at (12,37) size 18x23 [color=#FFFFFF]
layer at (111,234) size 24x22 blendMode: plus-lighter
RenderButton {BUTTON} at (54,36) size 24x24 [color=#FFFFFF]
-layer at (221,228) size 21x38
+layer at (221,228) size 21x38 backgroundClip at (57,85) size 240x180 clip at (57,85) size 240x180
RenderFlexibleBox {DIV} at (163,30) size 22x38
layer at (221,235) size 21x22 blendMode: plus-lighter
RenderButton {BUTTON} at (0,7) size 21x23 [color=#FFFFFF]
@@ -32,21 +32,21 @@
RenderVideo {VIDEO} at (45,298) size 240x180
layer at (57,310) size 240x180
RenderFlexibleBox {DIV} at (0,0) size 240x180
-layer at (57,423) size 240x67
+layer at (57,423) size 240x67 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180
RenderFlexibleBox {DIV} at (0,112) size 240x68
-layer at (57,423) size 240x68 isolatesBlending
+layer at (57,423) size 240x68 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 isolatesBlending
RenderBlock (positioned) {DIV} at (0,0) size 240x68
-layer at (57,423) size 240x68
+layer at (57,423) size 240x68 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180
RenderBlock (positioned) {DIV} at (0,0) size 240x68 [bgcolor=#1E1E1E73]
-layer at (57,423) size 240x68 blendMode: lighten
+layer at (57,423) size 240x68 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 blendMode: lighten
RenderBlock (positioned) {DIV} at (0,0) size 240x68 [bgcolor=#292929]
-layer at (69,460) size 18x22 blendMode: plus-lighter
+layer at (69,460) size 18x22 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 blendMode: plus-lighter
RenderButton {BUTTON} at (12,37) size 18x23 [color=#FFFFFF]
-layer at (111,459) size 24x22 blendMode: plus-lighter
+layer at (111,459) size 24x22 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 blendMode: plus-lighter
RenderButton {BUTTON} at (54,36) size 24x24 [color=#FFFFFF]
-layer at (221,453) size 21x38
+layer at (221,453) size 21x38 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180
RenderFlexibleBox {DIV} at (163,30) size 22x38
-layer at (221,460) size 21x22 blendMode: plus-lighter
+layer at (221,460) size 21x22 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 blendMode: plus-lighter
RenderButton {BUTTON} at (0,7) size 21x23 [color=#FFFFFF]
-layer at (266,460) size 21x22 blendMode: plus-lighter
+layer at (266,460) size 21x22 backgroundClip at (74,291) size 240x180 clip at (74,291) size 240x180 blendMode: plus-lighter
RenderButton {BUTTON} at (208,37) size 22x23 [color=#FFFFFF]
Modified: trunk/Source/WebCore/ChangeLog (199173 => 199174)
--- trunk/Source/WebCore/ChangeLog 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/ChangeLog 2016-04-07 20:04:16 UTC (rev 199174)
@@ -1,3 +1,35 @@
+2016-04-05 Ada Chan <[email protected]>
+
+ Rename TextTrackRepresentationiOS to TextTrackRepresentationCocoa and enable on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=156245
+
+ Reviewed by Eric Carlson.
+
+ * Modules/mediacontrols/mediaControlsApple.css:
+ (::-webkit-media-controls):
+ Match iOS and specify overflow: hidden on the -webkit-media-controls container.
+ (video::-webkit-media-text-track-container):
+ Match iOS and specify z-index: 0 on the text track container.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ TextTrackRepresentationiOS.h/mm have been renamed to TextTrackRepresentationCocoa.h/mm.
+
+ * platform/graphics/TextTrackRepresentation.cpp:
+ * platform/graphics/cocoa/TextTrackRepresentationCocoa.h: Renamed from Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h.
+ * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm.
+ (-[WebCoreTextTrackRepresentationCocoaHelper initWithParent:]):
+ (-[WebCoreTextTrackRepresentationCocoaHelper dealloc]):
+ (-[WebCoreTextTrackRepresentationCocoaHelper setParent:]):
+ (-[WebCoreTextTrackRepresentationCocoaHelper parent]):
+ (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
+ (-[WebCoreTextTrackRepresentationCocoaHelper actionForLayer:forKey:]):
+ (TextTrackRepresentation::create):
+ (TextTrackRepresentationCocoa::TextTrackRepresentationCocoa):
+ (TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa):
+ (TextTrackRepresentationCocoa::update):
+ (TextTrackRepresentationCocoa::setContentScale):
+ (TextTrackRepresentationCocoa::bounds):
+
2016-04-07 Brian Burg <[email protected]>
CookieJar should support adding synthetic cookies for developer tools
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (199173 => 199174)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-04-07 20:04:16 UTC (rev 199174)
@@ -59,6 +59,7 @@
font: -webkit-small-control;
white-space: nowrap;
-webkit-font-smoothing: subpixel-antialiased;
+ overflow: hidden;
}
video::-webkit-media-text-track-container,
@@ -870,6 +871,7 @@
width: 100%;
overflow: hidden;
padding-bottom: 5px;
+ z-index: 0;
text-align: center;
color: rgba(255, 255, 255, 1);
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (199173 => 199174)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-04-07 20:04:16 UTC (rev 199174)
@@ -2233,6 +2233,7 @@
52131E5B1C4F15760033F802 /* WebVideoFullscreenInterfaceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52131E5A1C4F15610033F802 /* WebVideoFullscreenInterfaceMac.mm */; };
521D46F611AEC98100514613 /* KillRingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 521D46F511AEC98100514613 /* KillRingMac.mm */; };
521D46F811AEC9B100514613 /* KillRing.h in Headers */ = {isa = PBXBuildFile; fileRef = 521D46F711AEC9B100514613 /* KillRing.h */; };
+ 526724F31CB2FEAD0075974D /* TextTrackRepresentationCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 526724F11CB2FDF60075974D /* TextTrackRepresentationCocoa.mm */; };
52B0D4BE1C57FD1E0077CE53 /* PlatformView.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4BD1C57FD1E0077CE53 /* PlatformView.h */; settings = {ATTRIBUTES = (Private, ); }; };
52B0D4C01C57FD660077CE53 /* WebVideoFullscreenChangeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4BF1C57FD660077CE53 /* WebVideoFullscreenChangeObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
52B0D4C21C57FF910077CE53 /* WebVideoFullscreenInterfaceMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4C11C57FF910077CE53 /* WebVideoFullscreenInterfaceMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6126,7 +6127,6 @@
CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */; };
CDC979F41C498C0900DB50D4 /* WebCoreNSErrorExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */; };
CDC979F51C498C0900DB50D4 /* WebCoreNSErrorExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */; };
- CDCA82961679100F00875714 /* TextTrackRepresentationIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA82941679100F00875714 /* TextTrackRepresentationIOS.mm */; };
CDCA98EB18B2C8EB00C12FF9 /* CDMPrivateMediaPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCA98EA18B2C8EB00C12FF9 /* CDMPrivateMediaPlayer.cpp */; };
CDCD41E71C3DDB0900965D99 /* ParsedContentRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCD41E51C3DDB0900965D99 /* ParsedContentRange.cpp */; };
CDCD41E81C3DDB0A00965D99 /* ParsedContentRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCD41E61C3DDB0900965D99 /* ParsedContentRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -9803,6 +9803,8 @@
52131E5A1C4F15610033F802 /* WebVideoFullscreenInterfaceMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebVideoFullscreenInterfaceMac.mm; sourceTree = "<group>"; };
521D46F511AEC98100514613 /* KillRingMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KillRingMac.mm; sourceTree = "<group>"; };
521D46F711AEC9B100514613 /* KillRing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KillRing.h; sourceTree = "<group>"; };
+ 526724F11CB2FDF60075974D /* TextTrackRepresentationCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextTrackRepresentationCocoa.mm; sourceTree = "<group>"; };
+ 526724F21CB2FDF60075974D /* TextTrackRepresentationCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentationCocoa.h; sourceTree = "<group>"; };
52B0D4BD1C57FD1E0077CE53 /* PlatformView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformView.h; sourceTree = "<group>"; };
52B0D4BF1C57FD660077CE53 /* WebVideoFullscreenChangeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenChangeObserver.h; sourceTree = "<group>"; };
52B0D4C11C57FF910077CE53 /* WebVideoFullscreenInterfaceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenInterfaceMac.h; sourceTree = "<group>"; };
@@ -14120,7 +14122,6 @@
CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferPrivateClient.h; sourceTree = "<group>"; };
CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSErrorExtras.mm; sourceTree = "<group>"; };
CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreNSErrorExtras.h; sourceTree = "<group>"; };
- CDCA82941679100F00875714 /* TextTrackRepresentationIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextTrackRepresentationIOS.mm; sourceTree = "<group>"; };
CDCA98E918B2C8D000C12FF9 /* CDMPrivateMediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMPrivateMediaPlayer.h; sourceTree = "<group>"; };
CDCA98EA18B2C8EB00C12FF9 /* CDMPrivateMediaPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDMPrivateMediaPlayer.cpp; sourceTree = "<group>"; };
CDCD41E51C3DDB0900965D99 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = "<group>"; };
@@ -14239,7 +14240,6 @@
CED06ACF1C77754800FDFAF1 /* JSSecurityPolicyViolationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSecurityPolicyViolationEvent.h; sourceTree = "<group>"; };
CEDA12D6152CA1CB00D9E08D /* AlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlternativeTextClient.h; sourceTree = "<group>"; };
CEE27ACA1BBB53A20072400A /* pthreadSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pthreadSPI.h; sourceTree = "<group>"; };
- CEEC6034187DD962003E43BB /* TextTrackRepresentationIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentationIOS.h; sourceTree = "<group>"; };
CEEFCD7719DB31F7003876D7 /* MediaResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaResourceLoader.cpp; sourceTree = "<group>"; };
CEEFCD7819DB31F7003876D7 /* MediaResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaResourceLoader.h; sourceTree = "<group>"; };
CEEFCD7B19DB33DC003876D7 /* PlatformMediaResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformMediaResourceLoader.h; sourceTree = "<group>"; };
@@ -16896,8 +16896,6 @@
C58361A81744523F00173511 /* FontServicesIOS.mm */,
31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */,
FED13D3F0CEA939400D89466 /* IconIOS.mm */,
- CEEC6034187DD962003E43BB /* TextTrackRepresentationIOS.h */,
- CDCA82941679100F00875714 /* TextTrackRepresentationIOS.mm */,
);
path = ios;
sourceTree = "<group>";
@@ -22174,6 +22172,8 @@
2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */,
2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */,
AD9FF6E01908391D003B61E0 /* IOSurfacePoolCocoa.mm */,
+ 526724F11CB2FDF60075974D /* TextTrackRepresentationCocoa.mm */,
+ 526724F21CB2FDF60075974D /* TextTrackRepresentationCocoa.h */,
2D3EF4441917915C00034184 /* WebActionDisablingCALayerDelegate.h */,
2D3EF4451917915C00034184 /* WebActionDisablingCALayerDelegate.mm */,
2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */,
@@ -31800,7 +31800,7 @@
076970861463AD8700F502CF /* TextTrackList.cpp in Sources */,
B1AD4E7313A12A4600846B27 /* TextTrackLoader.cpp in Sources */,
CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */,
- CDCA82961679100F00875714 /* TextTrackRepresentationIOS.mm in Sources */,
+ 526724F31CB2FEAD0075974D /* TextTrackRepresentationCocoa.mm in Sources */,
29498683195341940072D2BD /* TextUndoInsertionMarkupMac.mm in Sources */,
498770F01242C535002226BA /* Texture.cpp in Sources */,
CD9D82751C7AE535006FF066 /* TextureCacheCV.mm in Sources */,
Modified: trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp (199173 => 199174)
--- trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp 2016-04-07 20:04:16 UTC (rev 199174)
@@ -42,7 +42,7 @@
virtual IntRect bounds() const { return IntRect(); }
};
-#if !PLATFORM(IOS)
+#if !(PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)))
std::unique_ptr<TextTrackRepresentation> TextTrackRepresentation::create(TextTrackRepresentationClient&)
{
Copied: trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h (from rev 199173, trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h) (0 => 199174)
--- trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h 2016-04-07 20:04:16 UTC (rev 199174)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef TextTrackRepresentationCocoa_h
+#define TextTrackRepresentationCocoa_h
+
+#if (PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))) && ENABLE(VIDEO_TRACK)
+
+#import "TextTrackRepresentation.h"
+#import <QuartzCore/CALayer.h>
+#import <wtf/RetainPtr.h>
+
+@class WebCoreTextTrackRepresentationCocoaHelper;
+
+namespace WebCore {
+
+class TextTrackRepresentationCocoa final : public TextTrackRepresentation {
+public:
+ explicit TextTrackRepresentationCocoa(TextTrackRepresentationClient&);
+ virtual ~TextTrackRepresentationCocoa();
+
+ TextTrackRepresentationClient& client() const { return m_client; }
+
+ PlatformLayer* platformLayer() override { return m_layer.get(); }
+ IntRect bounds() const override;
+
+private:
+ void update() override;
+ void setContentScale(float) override;
+
+ TextTrackRepresentationClient& m_client;
+ RetainPtr<CALayer> m_layer;
+ RetainPtr<WebCoreTextTrackRepresentationCocoaHelper> m_delegate;
+};
+
+}
+
+#endif // (PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))) && ENABLE(VIDEO_TRACK)
+
+#endif // TextTrackRepresentationCocoa_h
Copied: trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm (from rev 199173, trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm) (0 => 199174)
--- trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm 2016-04-07 20:04:16 UTC (rev 199174)
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if (PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))) && ENABLE(VIDEO_TRACK)
+#include "TextTrackRepresentationCocoa.h"
+
+#include "FloatRect.h"
+#include "GraphicsContextCG.h"
+#include "IntRect.h"
+
+#if PLATFORM(IOS)
+#include "WebCoreThread.h"
+#include "WebCoreThreadRun.h"
+#endif
+
+using namespace WebCore;
+
+@interface WebCoreTextTrackRepresentationCocoaHelper : NSObject {
+ TextTrackRepresentationCocoa* _parent;
+}
+- (id)initWithParent:(TextTrackRepresentationCocoa*)parent;
+@property (assign) TextTrackRepresentationCocoa* parent;
+@end
+
+@implementation WebCoreTextTrackRepresentationCocoaHelper
+- (id)initWithParent:(TextTrackRepresentationCocoa*)parent
+{
+ if (!(self = [super init]))
+ return nil;
+
+ self.parent = parent;
+
+ return self;
+}
+
+- (void)dealloc
+{
+ self.parent = nullptr;
+ [super dealloc];
+}
+
+- (void)setParent:(TextTrackRepresentationCocoa*)parent
+{
+ if (_parent)
+ [_parent->platformLayer() removeObserver:self forKeyPath:@"bounds"];
+
+ _parent = parent;
+
+ if (_parent)
+ [_parent->platformLayer() addObserver:self forKeyPath:@"bounds" options:0 context:0];
+}
+
+- (TextTrackRepresentationCocoa*)parent
+{
+ return _parent;
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+ UNUSED_PARAM(change);
+ UNUSED_PARAM(context);
+#if PLATFORM(IOS)
+ WebThreadRun(^{
+ if (_parent && [keyPath isEqual:@"bounds"] && object == _parent->platformLayer())
+ _parent->client().textTrackRepresentationBoundsChanged(_parent->bounds());
+ });
+#else
+ if (_parent && [keyPath isEqual:@"bounds"] && object == _parent->platformLayer())
+ _parent->client().textTrackRepresentationBoundsChanged(_parent->bounds());
+#endif
+}
+
+- (id)actionForLayer:(CALayer *)layer forKey:(NSString *)event
+{
+ UNUSED_PARAM(layer);
+ UNUSED_PARAM(event);
+ // Returning a NSNull from this delegate method disables all implicit CALayer actions.
+ return [NSNull null];
+}
+
+@end
+
+std::unique_ptr<TextTrackRepresentation> TextTrackRepresentation::create(TextTrackRepresentationClient& client)
+{
+ return std::make_unique<TextTrackRepresentationCocoa>(client);
+}
+
+TextTrackRepresentationCocoa::TextTrackRepresentationCocoa(TextTrackRepresentationClient& client)
+ : m_client(client)
+ , m_layer(adoptNS([[CALayer alloc] init]))
+ , m_delegate(adoptNS([[WebCoreTextTrackRepresentationCocoaHelper alloc] initWithParent:this]))
+{
+ [m_layer.get() setDelegate:m_delegate.get()];
+ [m_layer.get() setContentsGravity:kCAGravityBottom];
+}
+
+TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa()
+{
+ [m_layer.get() setDelegate:nil];
+ [m_delegate.get() setParent:nullptr];
+}
+
+void TextTrackRepresentationCocoa::update()
+{
+ if (auto representation = m_client.createTextTrackRepresentationImage())
+ [m_layer.get() setContents:(id)representation->getCGImageRef()];
+}
+
+void TextTrackRepresentationCocoa::setContentScale(float scale)
+{
+ [m_layer.get() setContentsScale:scale];
+}
+
+IntRect TextTrackRepresentationCocoa::bounds() const
+{
+ return enclosingIntRect(FloatRect([m_layer.get() bounds]));
+}
+
+#endif // (PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))) && ENABLE(VIDEO_TRACK)
Deleted: trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h (199173 => 199174)
--- trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h 2016-04-07 20:04:16 UTC (rev 199174)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TextTrackRepresentationIOS_h
-#define TextTrackRepresentationIOS_h
-
-#if PLATFORM(IOS) && ENABLE(VIDEO_TRACK)
-
-#import "TextTrackRepresentation.h"
-#import <QuartzCore/CALayer.h>
-#import <wtf/RetainPtr.h>
-
-@class WebCoreTextTrackRepresentationIOSHelper;
-
-namespace WebCore {
-
-class TextTrackRepresentationIOS final : public TextTrackRepresentation {
-public:
- explicit TextTrackRepresentationIOS(TextTrackRepresentationClient&);
- virtual ~TextTrackRepresentationIOS();
-
- TextTrackRepresentationClient& client() const { return m_client; }
-
- PlatformLayer* platformLayer() override { return m_layer.get(); }
- IntRect bounds() const override;
-
-private:
- void update() override;
- void setContentScale(float) override;
-
- TextTrackRepresentationClient& m_client;
- RetainPtr<CALayer> m_layer;
- RetainPtr<WebCoreTextTrackRepresentationIOSHelper> m_delegate;
-};
-
-}
-
-#endif // PLATFORM(IOS) && ENABLE(VIDEO_TRACK)
-
-#endif // TextTrackRepresentationIOS_h
Deleted: trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm (199173 => 199174)
--- trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm 2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm 2016-04-07 20:04:16 UTC (rev 199174)
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if PLATFORM(IOS) && ENABLE(VIDEO_TRACK)
-
-#include "TextTrackRepresentationIOS.h"
-
-#include "FloatRect.h"
-#include "GraphicsContextCG.h"
-#include "IntRect.h"
-#include "WebCoreThread.h"
-#include "WebCoreThreadRun.h"
-
-using namespace WebCore;
-
-@interface WebCoreTextTrackRepresentationIOSHelper : NSObject {
- TextTrackRepresentationIOS* _parent;
-}
-- (id)initWithParent:(TextTrackRepresentationIOS*)parent;
-@property (assign) TextTrackRepresentationIOS* parent;
-@end
-
-@implementation WebCoreTextTrackRepresentationIOSHelper
-- (id)initWithParent:(TextTrackRepresentationIOS*)parent
-{
- if (!(self = [super init]))
- return nil;
-
- self.parent = parent;
-
- return self;
-}
-
-- (void)dealloc
-{
- self.parent = nullptr;
- [super dealloc];
-}
-
-- (void)setParent:(TextTrackRepresentationIOS*)parent
-{
- if (_parent)
- [_parent->platformLayer() removeObserver:self forKeyPath:@"bounds"];
-
- _parent = parent;
-
- if (_parent)
- [_parent->platformLayer() addObserver:self forKeyPath:@"bounds" options:0 context:0];
-}
-
-- (TextTrackRepresentationIOS*)parent
-{
- return _parent;
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- UNUSED_PARAM(change);
- UNUSED_PARAM(context);
- WebThreadRun(^{
- if (_parent && [keyPath isEqual:@"bounds"] && object == _parent->platformLayer())
- _parent->client().textTrackRepresentationBoundsChanged(_parent->bounds());
- });
-}
-
-- (id)actionForLayer:(CALayer *)layer forKey:(NSString *)event
-{
- UNUSED_PARAM(layer);
- UNUSED_PARAM(event);
- // Returning a NSNull from this delegate method disables all implicit CALayer actions.
- return [NSNull null];
-}
-
-@end
-
-std::unique_ptr<TextTrackRepresentation> TextTrackRepresentation::create(TextTrackRepresentationClient& client)
-{
- return std::make_unique<TextTrackRepresentationIOS>(client);
-}
-
-TextTrackRepresentationIOS::TextTrackRepresentationIOS(TextTrackRepresentationClient& client)
- : m_client(client)
- , m_layer(adoptNS([[CALayer alloc] init]))
- , m_delegate(adoptNS([[WebCoreTextTrackRepresentationIOSHelper alloc] initWithParent:this]))
-{
- [m_layer.get() setDelegate:m_delegate.get()];
- [m_layer.get() setContentsGravity:kCAGravityBottom];
-}
-
-TextTrackRepresentationIOS::~TextTrackRepresentationIOS()
-{
- [m_layer.get() setDelegate:nil];
- [m_delegate.get() setParent:nullptr];
-}
-
-void TextTrackRepresentationIOS::update()
-{
- if (auto representation = m_client.createTextTrackRepresentationImage())
- [m_layer.get() setContents:(id)representation->getCGImageRef()];
-}
-
-void TextTrackRepresentationIOS::setContentScale(float scale)
-{
- [m_layer.get() setContentsScale:scale];
-}
-
-IntRect TextTrackRepresentationIOS::bounds() const
-{
- return enclosingIntRect(FloatRect([m_layer.get() bounds]));
-}
-
-#endif // PLATFORM(IOS) && ENABLE(VIDEO_TRACK)