Skip to content

Commit

Permalink
Make WebCore::WebVTTParser testable
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270526
<rdar://124077524>

Reviewed by Alex Christensen.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
- Make BufferedLineReader.h and WebVTTParser.h private headers.
* Source/WebCore/html/track/VTTRegion.h:
- Export WebCore::VTTRegion class.
* Source/WebCore/html/track/WebVTTParser.h:
- Export WebCore::WebVTTParser class.
(WebCore::WebVTTParser::WebVTTParser):
- Delete unused default constructor.

Canonical link: https://commits.webkit.org/275743@main
  • Loading branch information
David Kilzer authored and ddkilzer committed Mar 6, 2024
1 parent 8bdf938 commit 9c85c7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2515,7 +2515,7 @@
5CE19CF728D9020100A4571E /* WebCorePersistentCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE19CF328D8FB3700A4571E /* WebCorePersistentCoders.h */; settings = {ATTRIBUTES = (Private, ); }; };
5CEEE4361F5F8F210014A5F5 /* RectEdges.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C97A3361F5F7A6500105207 /* RectEdges.h */; settings = {ATTRIBUTES = (Private, ); }; };
5CFC9C842B71AE1800F8D289 /* SerializedPlatformDataCueValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CFC9C822B71ABF200F8D289 /* SerializedPlatformDataCueValue.mm */; };
5D21A80313ECE5DF00BB7064 /* WebVTTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */; };
5D21A80313ECE5DF00BB7064 /* WebVTTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
5D5975B319635F1100D00878 /* SystemVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D5975B119635F1100D00878 /* SystemVersion.h */; settings = {ATTRIBUTES = (Private, ); }; };
5DA5E0FD102B953800088CF9 /* JSWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA5E0FB102B953800088CF9 /* JSWebSocket.h */; };
5DB1BC6A10715A6400EFAA49 /* TransformSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB1BC6810715A6400EFAA49 /* TransformSource.h */; };
Expand Down Expand Up @@ -2885,7 +2885,7 @@
7A22732120C9FAFE00DB1DEF /* WebKitNSImageExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A22731F20C9F9DA00DB1DEF /* WebKitNSImageExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A293F5229945A430033D744 /* FontCustomPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A293F5129945A100033D744 /* FontCustomPlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A29F57218C69514004D0F81 /* OutOfBandTextTrackPrivateAVF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A29F57118C69514004D0F81 /* OutOfBandTextTrackPrivateAVF.h */; };
7A45033018DB717200377B34 /* BufferedLineReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A45032E18DB717200377B34 /* BufferedLineReader.h */; };
7A45033018DB717200377B34 /* BufferedLineReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A45032E18DB717200377B34 /* BufferedLineReader.h */; settings = {ATTRIBUTES = (Private, ); }; };
7A54858014E02D51006AE05A /* InspectorHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A54857E14E02D51006AE05A /* InspectorHistory.h */; };
7A54881714E432A1006AE05A /* DOMPatchSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A54881514E432A1006AE05A /* DOMPatchSupport.h */; };
7A5515F5191830A3009687D2 /* YouTubePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5515F3191830A3009687D2 /* YouTubePluginReplacement.h */; settings = {ATTRIBUTES = (Private, ); }; };
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/html/track/VTTRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class HTMLDivElement;
class VTTCueBox;
class VTTScanner;

class VTTRegion final : public RefCounted<VTTRegion>, public ContextDestructionObserver {
class WEBCORE_EXPORT VTTRegion final : public RefCounted<VTTRegion>, public ContextDestructionObserver {
public:
static Ref<VTTRegion> create(ScriptExecutionContext& context)
{
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/html/track/WebVTTParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class WebVTTCueData final : public RefCounted<WebVTTCueData> {
String m_settings;
};

class WebVTTParser final {
class WEBCORE_EXPORT WebVTTParser final {
WTF_MAKE_FAST_ALLOCATED;
public:
enum ParseState {
Expand All @@ -111,6 +111,7 @@ class WebVTTParser final {
Finished
};

WebVTTParser() = delete;
WebVTTParser(WebVTTParserClient&, Document&);

static inline bool isRecognizedTag(const AtomString& tagName)
Expand Down

0 comments on commit 9c85c7c

Please sign in to comment.