Changeset 275557 in webkit


Ignore:
Timestamp:
Apr 6, 2021 2:45:45 PM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Build fails when video is disabled
https://bugs.webkit.org/show_bug.cgi?id=224198

Patch by Mike Gorse <mgorse@suse.com> on 2021-04-06
Reviewed by Adrian Perez de Castro.

Add #if ENABLE(VIDEO) where needed.

Source/WebCore:

  • editing/markup.cpp:

(WebCore::createPageForSanitizingWebContent):

  • page/Page.cpp:
  • page/Page.h:
  • platform/graphics/GraphicsContext.cpp:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsContextImpl.h:
  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:
  • platform/graphics/cairo/GraphicsContextImplCairo.h:
  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:
  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/win/GraphicsContextImplDirect2D.cpp:
  • platform/graphics/win/GraphicsContextImplDirect2D.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit:

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::decodeItem):

  • UIProcess/gtk/ClipboardGtk3.cpp:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::committedLoad):

Location:
trunk/Source
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275551 r275557  
     12021-04-06  Mike Gorse  <mgorse@suse.com>
     2
     3        Build fails when video is disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=224198
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Add #if ENABLE(VIDEO) where needed.
     9
     10        * editing/markup.cpp:
     11        (WebCore::createPageForSanitizingWebContent):
     12        * page/Page.cpp:
     13        * page/Page.h:
     14        * platform/graphics/GraphicsContext.cpp:
     15        * platform/graphics/GraphicsContext.h:
     16        * platform/graphics/GraphicsContextGL.h:
     17        * platform/graphics/GraphicsContextImpl.h:
     18        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
     19        * platform/graphics/cairo/GraphicsContextImplCairo.h:
     20        * platform/graphics/displaylists/DisplayList.cpp:
     21        (WebCore::DisplayList::DisplayList::append):
     22        * platform/graphics/displaylists/DisplayListItemBuffer.cpp:
     23        (WebCore::DisplayList::ItemHandle::apply):
     24        (WebCore::DisplayList::ItemHandle::destroy):
     25        (WebCore::DisplayList::ItemHandle::safeCopy const):
     26        * platform/graphics/displaylists/DisplayListItemType.cpp:
     27        (WebCore::DisplayList::sizeOfItemInBytes):
     28        (WebCore::DisplayList::isDrawingItem):
     29        (WebCore::DisplayList::isInlineItem):
     30        * platform/graphics/displaylists/DisplayListItemType.h:
     31        * platform/graphics/displaylists/DisplayListItems.cpp:
     32        (WebCore::DisplayList::operator<<):
     33        * platform/graphics/displaylists/DisplayListItems.h:
     34        * platform/graphics/displaylists/DisplayListRecorder.cpp:
     35        * platform/graphics/displaylists/DisplayListRecorder.h:
     36        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
     37        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
     38        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
     39        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
     40        * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
     41        * platform/graphics/win/GraphicsContextImplDirect2D.h:
     42        * svg/graphics/SVGImage.cpp:
     43        (WebCore::SVGImage::dataChanged):
     44
    1452021-04-06  Philippe Normand  <pnormand@igalia.com>
    246
  • trunk/Source/WebCore/editing/markup.cpp

    r273621 r275557  
    184184   
    185185    auto page = makeUnique<Page>(WTFMove(pageConfiguration));
     186#if ENABLE(VIDEO)
    186187    page->settings().setMediaEnabled(false);
     188#endif
    187189    page->settings().setScriptEnabled(false);
    188190    page->settings().setHTMLParserScriptingFlagPolicy(HTMLParserScriptingFlagPolicy::Enabled);
  • trunk/Source/WebCore/page/Page.cpp

    r275302 r275557  
    21422142}
    21432143
    2144 #endif
    2145 
    21462144void Page::playbackControlsMediaEngineChanged()
    21472145{
    21482146    chrome().client().playbackControlsMediaEngineChanged();
    21492147}
     2148
     2149#endif
    21502150
    21512151void Page::setMuted(MediaProducer::MutedStateFlags muted)
  • trunk/Source/WebCore/page/Page.h

    r275215 r275557  
    702702    bool isMediaCaptureMuted() const { return m_mutedState & MediaProducer::MediaStreamCaptureIsMuted; };
    703703    void schedulePlaybackControlsManagerUpdate();
     704#if ENABLE(VIDEO)
    704705    void playbackControlsMediaEngineChanged();
     706#endif
    705707    WEBCORE_EXPORT void setMuted(MediaProducer::MutedStateFlags);
    706708
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp

    r274057 r275557  
    13011301#endif
    13021302
     1303#if ENABLE(VIDEO)
    13031304void GraphicsContext::paintFrameForMedia(MediaPlayer& player, const FloatRect& destination)
    13041305{
     
    13131314    player.playerPrivate()->paintCurrentFrameInContext(*this, destination);
    13141315}
    1315 
    1316 }
     1316#endif
     1317
     1318}
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r274869 r275557  
    517517    bool contenfulPaintDetected() const { return m_contenfulPaintDetected; }
    518518
     519#if ENABLE(VIDEO)
    519520    WEBCORE_EXPORT void paintFrameForMedia(MediaPlayer&, const FloatRect& destination);
     521#endif
    520522
    521523#if OS(WINDOWS)
  • trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h

    r274704 r275557  
    13121312    virtual GraphicsContextGLCV* asCV() = 0;
    13131313#endif
     1314#if ENABLE(VIDEO)
    13141315    virtual bool copyTextureFromMedia(MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) = 0;
     1316#endif
    13151317
    13161318    IntSize getInternalFramebufferSize() const { return IntSize(m_currentWidth, m_currentHeight); }
  • trunk/Source/WebCore/platform/graphics/GraphicsContextImpl.h

    r273956 r275557  
    106106    virtual void clipToImageBuffer(ImageBuffer&, const FloatRect&) = 0;
    107107    virtual void clipToDrawingCommands(const FloatRect& destination, DestinationColorSpace, Function<void(GraphicsContext&)>&& drawingFunction) = 0;
     108#if ENABLE(VIDEO)
    108109    virtual void paintFrameForMedia(MediaPlayer&, const FloatRect& destination) = 0;
    109110    virtual bool canPaintFrameForMedia(const MediaPlayer&) const = 0;
     111#endif
    110112   
    111113    virtual void applyDeviceScaleFactor(float) = 0;
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp

    r272790 r275557  
    420420}
    421421
     422#if ENABLE(VIDEO)
    422423void GraphicsContextImplCairo::paintFrameForMedia(MediaPlayer&, const FloatRect&)
    423424{
    424425    // FIXME: Not implemented.
    425426}
     427#endif
    426428
    427429} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.h

    r272772 r275557  
    106106    void clipToImageBuffer(ImageBuffer&, const FloatRect&) override;
    107107    void clipToDrawingCommands(const FloatRect& destination, DestinationColorSpace, Function<void(GraphicsContext&)>&&) override;
     108#if ENABLE(VIDEO)
    108109    void paintFrameForMedia(MediaPlayer&, const FloatRect& destination) override;
    109110    bool canPaintFrameForMedia(const MediaPlayer&) const override { return false; }
     111#endif
    110112   
    111113    void applyDeviceScaleFactor(float) override;
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp

    r275459 r275557  
    292292    case ItemType::PutImageData:
    293293        return append<PutImageData>(item.get<PutImageData>());
     294#if ENABLE(VIDEO)
    294295    case ItemType::PaintFrameForMedia:
    295296        return append<PaintFrameForMedia>(item.get<PaintFrameForMedia>());
     297#endif
    296298    case ItemType::StrokeRect:
    297299        return append<StrokeRect>(item.get<StrokeRect>());
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp

    r275459 r275557  
    193193        ASSERT_NOT_REACHED();
    194194        return;
     195#if ENABLE(VIDEO)
    195196    case ItemType::PaintFrameForMedia:
    196197        get<PaintFrameForMedia>().apply(context);
    197198        return;
     199#endif
    198200    case ItemType::StrokeRect:
    199201        get<StrokeRect>().apply(context);
     
    375377        static_assert(std::is_trivially_destructible<MetaCommandChangeItemBuffer>::value);
    376378        return;
     379#if ENABLE(VIDEO)
    377380    case ItemType::PaintFrameForMedia:
    378381        static_assert(std::is_trivially_destructible<PaintFrameForMedia>::value);
    379382        return;
     383#endif
    380384    case ItemType::Restore:
    381385        static_assert(std::is_trivially_destructible<Restore>::value);
     
    549553    case ItemType::MetaCommandChangeItemBuffer:
    550554        return copyInto<MetaCommandChangeItemBuffer>(*this, itemOffset);
     555#if ENABLE(VIDEO)
    551556    case ItemType::PaintFrameForMedia:
    552557        return copyInto<PaintFrameForMedia>(*this, itemOffset);
     558#endif
    553559    case ItemType::Restore:
    554560        return copyInto<Restore>(*this, itemOffset);
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.cpp

    r274838 r275557  
    137137    case ItemType::PutImageData:
    138138        return sizeof(PutImageData);
     139#if ENABLE(VIDEO)
    139140    case ItemType::PaintFrameForMedia:
    140141        return sizeof(PaintFrameForMedia);
     142#endif
    141143    case ItemType::StrokeRect:
    142144        return sizeof(StrokeRect);
     
    236238    case ItemType::FillRectWithRoundedHole:
    237239    case ItemType::FillRoundedRect:
     240#if ENABLE(VIDEO)
    238241    case ItemType::PaintFrameForMedia:
     242#endif
    239243    case ItemType::PutImageData:
    240244    case ItemType::StrokeEllipse:
     
    311315    case ItemType::MetaCommandChangeDestinationImageBuffer:
    312316    case ItemType::MetaCommandChangeItemBuffer:
     317#if ENABLE(VIDEO)
    313318    case ItemType::PaintFrameForMedia:
     319#endif
    314320    case ItemType::Restore:
    315321    case ItemType::Rotate:
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h

    r274838 r275557  
    8282    GetImageData,
    8383    PutImageData,
     84#if ENABLE(VIDEO)
    8485    PaintFrameForMedia,
     86#endif
    8587    StrokeRect,
    8688    StrokeLine,
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp

    r274838 r275557  
    805805}
    806806
     807#if ENABLE(VIDEO)
    807808PaintFrameForMedia::PaintFrameForMedia(MediaPlayer& player, const FloatRect& destination)
    808809    : m_identifier(player.identifier())
     
    822823    return ts;
    823824}
     825#endif
    824826
    825827Optional<FloatRect> StrokeRect::localBounds(const GraphicsContext&) const
     
    10651067    case ItemType::GetImageData: ts << "get-image-data"; break;
    10661068    case ItemType::PutImageData: ts << "put-image-data"; break;
     1069#if ENABLE(VIDEO)
    10671070    case ItemType::PaintFrameForMedia: ts << "paint-frame-for-media"; break;
     1071#endif
    10681072    case ItemType::StrokeRect: ts << "stroke-rect"; break;
    10691073    case ItemType::StrokeLine: ts << "stroke-line"; break;
     
    12341238        ts << item.get<PutImageData>();
    12351239        break;
     1240#if ENABLE(VIDEO)
    12361241    case ItemType::PaintFrameForMedia:
    12371242        ts << item.get<PaintFrameForMedia>();
    12381243        break;
     1244#endif
    12391245    case ItemType::StrokeRect:
    12401246        ts << item.get<StrokeRect>();
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h

    r274839 r275557  
    19861986}
    19871987
     1988#if ENABLE(VIDEO)
    19881989class PaintFrameForMedia {
    19891990public:
     
    20082009    FloatRect m_destination;
    20092010};
     2011#endif
    20102012
    20112013class StrokeRect {
     
    23372339    WebCore::DisplayList::ItemType::GetImageData,
    23382340    WebCore::DisplayList::ItemType::PutImageData,
     2341#if ENABLE(VIDEO)
    23392342    WebCore::DisplayList::ItemType::PaintFrameForMedia,
     2343#endif
    23402344    WebCore::DisplayList::ItemType::StrokeRect,
    23412345    WebCore::DisplayList::ItemType::StrokeLine,
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp

    r275185 r275557  
    459459}
    460460
     461#if ENABLE(VIDEO)
    461462bool Recorder::canPaintFrameForMedia(const MediaPlayer& player) const
    462463{
     
    469470    append<PaintFrameForMedia>(player, destination);
    470471}
     472#endif
    471473
    472474void Recorder::applyDeviceScaleFactor(float deviceScaleFactor)
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h

    r275185 r275557  
    146146    void clipToImageBuffer(WebCore::ImageBuffer&, const FloatRect&) override;
    147147    void clipToDrawingCommands(const FloatRect& destination, DestinationColorSpace, Function<void(GraphicsContext&)>&&) override;
     148#if ENABLE(VIDEO)
    148149    void paintFrameForMedia(MediaPlayer&, const FloatRect& destination) override;
    149150    bool canPaintFrameForMedia(const MediaPlayer&) const override;
     151#endif
    150152
    151153    void applyDeviceScaleFactor(float) override;
  • trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp

    r272811 r275557  
    10821082}
    10831083
     1084#if ENABLE(VIDEO)
    10841085void CairoOperationRecorder::paintFrameForMedia(MediaPlayer&, const FloatRect&)
    10851086{
    10861087    // FIXME: Not implemented.
    10871088}
     1089#endif
    10881090
    10891091} // namespace Nicosia
  • trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h

    r272772 r275557  
    9999    void clipToImageBuffer(WebCore::ImageBuffer&, const WebCore::FloatRect&) override;
    100100    void clipToDrawingCommands(const WebCore::FloatRect& destination, WebCore::DestinationColorSpace, Function<void(WebCore::GraphicsContext&)>&&) override;
     101#if ENABLE(VIDEO)
    101102    void paintFrameForMedia(WebCore::MediaPlayer&, const WebCore::FloatRect& destination) override;
    102103    bool canPaintFrameForMedia(const WebCore::MediaPlayer&) const override { return false; }
     104#endif
    103105
    104106    void applyDeviceScaleFactor(float) override;
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp

    r273877 r275557  
    261261#endif
    262262
     263#if ENABLE(VIDEO)
    263264bool GraphicsContextGLOpenGL::copyTextureFromMedia(MediaPlayer& player, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)
    264265{
     
    279280#endif
    280281}
     282#endif
    281283
    282284} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h

    r275463 r275557  
    471471    RefPtr<ImageData> readCompositedResultsForPainting();
    472472
     473#if ENABLE(VIDEO)
    473474    bool copyTextureFromMedia(MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) final;
     475#endif
    474476
    475477#if USE(OPENGL) && ENABLE(WEBGL2)
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextImplDirect2D.cpp

    r272475 r275557  
    426426}
    427427
     428#if ENABLE(VIDEO)
    428429void GraphicsContextImplDirect2D::paintFrameForMedia(MediaPlayer&, const FloatRect&)
    429430{
    430431    // FIXME: Not implemented.
    431432}
     433#endif
    432434
    433435} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextImplDirect2D.h

    r272475 r275557  
    103103    void clipToImageBuffer(ImageBuffer&, const FloatRect&) override;
    104104    void clipToDrawingCommands(const FloatRect& destination, DestinationColorSpace, Function<void(GraphicsContext&)>&&) override;
     105#if ENABLE(VIDEO)
    105106    void paintFrameForMedia(MediaPlayer&, const FloatRect& destination) override;
    106107    bool canPaintFrameForMedia(const MediaPlayer&) const override { return false; }
     108#endif
    107109   
    108110    void applyDeviceScaleFactor(float) override;
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r272549 r275557  
    448448        // loaded by a top-level document.
    449449        m_page = makeUnique<Page>(WTFMove(pageConfiguration));
     450#if ENABLE(VIDEO)
    450451        m_page->settings().setMediaEnabled(false);
     452#endif
    451453        m_page->settings().setScriptEnabled(false);
    452454        m_page->settings().setPluginsEnabled(false);
  • trunk/Source/WebKit/ChangeLog

    r275553 r275557  
     12021-04-06  Mike Gorse  <mgorse@suse.com>
     2
     3        Build fails when video is disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=224198
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Add #if ENABLE(VIDEO) where needed.
     9
     10        * GPUProcess/graphics/RemoteRenderingBackend.cpp:
     11        (WebKit::RemoteRenderingBackend::decodeItem):
     12        * UIProcess/gtk/ClipboardGtk3.cpp:
     13        * WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
     14        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     15        (WebKit::WebFrameLoaderClient::committedLoad):
     16
    1172021-04-06  Fujii Hironori  <Hironori.Fujii@sony.com>
    218
  • trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp

    r275553 r275557  
    556556    case DisplayList::ItemType::MetaCommandChangeDestinationImageBuffer:
    557557    case DisplayList::ItemType::MetaCommandChangeItemBuffer:
     558#if ENABLE(VIDEO)
    558559    case DisplayList::ItemType::PaintFrameForMedia:
     560#endif
    559561    case DisplayList::ItemType::Restore:
    560562    case DisplayList::ItemType::Rotate:
  • trunk/Source/WebKit/UIProcess/gtk/ClipboardGtk3.cpp

    r261802 r275557  
    3636#include <gtk/gtk.h>
    3737#include <wtf/SetForScope.h>
     38#include <wtf/glib/GUniquePtr.h>
    3839
    3940namespace WebKit {
  • trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h

    r275459 r275557  
    392392        case WebCore::DisplayList::ItemType::MetaCommandChangeDestinationImageBuffer:
    393393        case WebCore::DisplayList::ItemType::MetaCommandChangeItemBuffer:
     394#if ENABLE(VIDEO)
    394395        case WebCore::DisplayList::ItemType::PaintFrameForMedia:
     396#endif
    395397        case WebCore::DisplayList::ItemType::Restore:
    396398        case WebCore::DisplayList::ItemType::Rotate:
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r274746 r275557  
    11491149    // If the document is a stand-alone media document, now is the right time to cancel the WebKit load.
    11501150    // FIXME: This code should be shared across all ports. <http://webkit.org/b/48762>.
     1151#if ENABLE(VIDEO)
    11511152    if (is<MediaDocument>(m_frame->coreFrame()->document()))
    11521153        loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
     1154#endif
    11531155
    11541156    // Calling commitData did not create the plug-in view.
Note: See TracChangeset for help on using the changeset viewer.