Bug 189506 - Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
Summary: Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-11 10:48 PDT by Pablo Saavedra
Modified: 2018-09-11 11:43 PDT (History)
7 users (show)

See Also:


Attachments
patch (1.82 KB, patch)
2018-09-11 10:59 PDT, Pablo Saavedra
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Saavedra 2018-09-11 10:48:24 PDT
the use of `m_pipStandbyElement` must be guarded with ENABLE(VIDEO), otherwise a compilation error occurs with the VIDEO feature turned off


m_pipStandbyElement is only defined in Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h when ENABLE(VIDEO):


```
#if ENABLE(VIDEO)
    RefPtr<WebCore::HTMLVideoElement> m_pipStandbyElement;
#endif
```
Comment 1 Pablo Saavedra 2018-09-11 10:59:31 PDT
Created attachment 349412 [details]
patch
Comment 2 Tim Horton 2018-09-11 11:00:29 PDT
Comment on attachment 349412 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=349412&action=review

> Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:102
> +#if ENABLE(VIDEO)

!ENABLE(VIDEO) knows what HTMLVideoElement is, though??
Comment 3 Pablo Saavedra 2018-09-11 11:03:25 PDT
Related with https://bugs.webkit.org/show_bug.cgi?id=181338
Comment 4 WebKit Commit Bot 2018-09-11 11:38:36 PDT
Comment on attachment 349412 [details]
patch

Clearing flags on attachment: 349412

Committed r235906: <https://trac.webkit.org/changeset/235906>
Comment 5 WebKit Commit Bot 2018-09-11 11:38:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-09-11 11:39:22 PDT
<rdar://problem/44350074>
Comment 7 Pablo Saavedra 2018-09-11 11:43:05 PDT
(In reply to Tim Horton from comment #2)
> Comment on attachment 349412 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=349412&action=review
> 
> > Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:102
> > +#if ENABLE(VIDEO)
> 
> !ENABLE(VIDEO) knows what HTMLVideoElement is, though??

(In reply to Tim Horton from comment #2)
> Comment on attachment 349412 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=349412&action=review
> 
> > Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:102
> > +#if ENABLE(VIDEO)
> 
> !ENABLE(VIDEO) knows what HTMLVideoElement is, though??

WebCore/html/HTMLVideoElement.h

Yes, it seems HTMLVideoElement is declared in the Webcore namespace in the top `WebKit/WebProcess/FullScreen/WebFullScreenManager.h`

namespace WebCore {
class IntRect;
class Element;
class GraphicsLayer;
class HTMLVideoElement;
}

Since HTMLVideoElement is not actually used in a statement but in a declaration in the signature of the function is the reason why is valid.