git: f73bc57ac903 - main - www/webkit2-gtk3: unbreak GSTREAMER=off after 895bc805a
Baptiste Daroussin
bapt at FreeBSD.org
Tue Sep 28 07:18:34 UTC 2021
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f73bc57ac903f6c6b69c2b9bf59d0b5598b56ead
commit f73bc57ac903f6c6b69c2b9bf59d0b5598b56ead
Author: Evgeniy Khramtsov <evgeniy at khramtsov.org>
AuthorDate: 2021-09-27 18:36:05 +0000
Commit: Baptiste Daroussin <bapt at FreeBSD.org>
CommitDate: 2021-09-28 07:17:43 +0000
www/webkit2-gtk3: unbreak GSTREAMER=off after 895bc805a
PR: 258750
Reported by: madpilot@ (via mailing list)
Tested by: bapt
---
www/webkit2-gtk3/Makefile | 2 +
www/webkit2-gtk3/files/extra-patch-guard-video | 33 ++
.../files/extra-patch-revert-7c0f13f37ec5 | 342 +++++++++++++++++++++
3 files changed, 377 insertions(+)
diff --git a/www/webkit2-gtk3/Makefile b/www/webkit2-gtk3/Makefile
index 324174735da9..9b17caf2dcf8 100644
--- a/www/webkit2-gtk3/Makefile
+++ b/www/webkit2-gtk3/Makefile
@@ -89,6 +89,8 @@ GEOIP_CMAKE_BOOL= ENABLE_GEOLOCATION
GEOIP_BUILD_DEPENDS= geoclue>=2.4.3:net/geoclue
GEOIP_RUN_DEPENDS= geoclue>=2.4.3:net/geoclue
+GSTREAMER_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-revert-7c0f13f37ec5 \
+ ${PATCHDIR}/extra-patch-guard-video
GSTREAMER_USE= GSTREAMER1=bad,gl
GSTREAMER_CMAKE_BOOL= ENABLE_VIDEO ENABLE_WEB_AUDIO
diff --git a/www/webkit2-gtk3/files/extra-patch-guard-video b/www/webkit2-gtk3/files/extra-patch-guard-video
new file mode 100644
index 000000000000..c5c57f89deaa
--- /dev/null
+++ b/www/webkit2-gtk3/files/extra-patch-guard-video
@@ -0,0 +1,33 @@
+Regressed by: https://github.com/WebKit/WebKit/commit/b87d5003f832
+
+In file included from /wrkdirs/usr/ports/www/webkit2-gtk3/work/.build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-19.cpp:6:
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:272:33: error: out-of-line definition of 'paintFrameForMedia' does not match any declaration in 'WebCore::BifurcatedGraphicsContext'
+void BifurcatedGraphicsContext::paintFrameForMedia(MediaPlayer& player, const FloatRect& destination)
+ ^~~~~~~~~~~~~~~~~~
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:274:22: error: no member named 'paintFrameForMedia' in 'WebCore::GraphicsContext'
+ m_primaryContext.paintFrameForMedia(player, destination);
+ ~~~~~~~~~~~~~~~~ ^
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:275:24: error: no member named 'paintFrameForMedia' in 'WebCore::
+GraphicsContext'
+ m_secondaryContext.paintFrameForMedia(player, destination);
+ ~~~~~~~~~~~~~~~~~~ ^
+3 errors generated.
+
+diff --git Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
+index c0ce72c..a2a58df 100644
+--- Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
++++ Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
+@@ -269,11 +269,13 @@ void BifurcatedGraphicsContext::drawPattern(NativeImage& nativeImage, const Floa
+ m_secondaryContext.drawPattern(nativeImage, imageSize, destRect, tileRect, patternTransform, phase, spacing, options);
+ }
+
++#if ENABLE(VIDEO)
+ void BifurcatedGraphicsContext::paintFrameForMedia(MediaPlayer& player, const FloatRect& destination)
+ {
+ m_primaryContext.paintFrameForMedia(player, destination);
+ m_secondaryContext.paintFrameForMedia(player, destination);
+ }
++#endif
+
+ void BifurcatedGraphicsContext::scale(const FloatSize& scale)
+ {
diff --git a/www/webkit2-gtk3/files/extra-patch-revert-7c0f13f37ec5 b/www/webkit2-gtk3/files/extra-patch-revert-7c0f13f37ec5
new file mode 100644
index 000000000000..3edc984616c5
--- /dev/null
+++ b/www/webkit2-gtk3/files/extra-patch-revert-7c0f13f37ec5
@@ -0,0 +1,342 @@
+GSTREAMER=off regressed by: https://github.com/WebKit/WebKit/commit/7c0f13f37ec:
++ partly revert https://github.com/WebKit/WebKit/commit/eb3ebb4849987
+(Source/WebCore/accessibility/AXObjectCache.cpp: remove #include "AXImage.h")
+
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/.build/WTF/Headers/wtf/TypeCasts.h:41:9: error: static_assert failed due to requirement 'std::is_void_v<const WebCore::HTMLMediaElement>' "Missing TypeCastTraits specialization"
+ static_assert(std::is_void_v<ExpectedType>, "Missing TypeCastTraits specialization");
+ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/.build/WTF/Headers/wtf/TypeCasts.h:65:73: note: in instantiation of member function 'WTF::TypeCastTraits<const WebCore::HTMLMediaElement, const WebCore::Node, false>::isOfType' requested here
+ return source && TypeCastTraits<const ExpectedType, const ArgType>::isOfType(*source);
+ ^
+/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.0/Source/WebCore/accessibility/AXObjectCache.cpp:532:9: note: in instantiation of function template specialization 'WTF::is<WebCore::HTMLMediaElement, WebCore::Node>' requested here
+ if (is<HTMLMediaElement>(node))
+
+diff --git Source/WebCore/Sources.txt Source/WebCore/Sources.txt
+index 24c515c..043f534 100644
+--- Source/WebCore/Sources.txt
++++ Source/WebCore/Sources.txt
+@@ -364,7 +364,6 @@ Modules/webxr/XRInputSourceEvent.cpp @no-unify
+ Modules/webxr/XRInputSourcesChangeEvent.cpp @no-unify
+ Modules/webxr/XRReferenceSpaceEvent.cpp @no-unify
+ Modules/webxr/XRSessionEvent.cpp @no-unify
+-accessibility/AXImage.cpp
+ accessibility/AXLogger.cpp
+ accessibility/AXObjectCache.cpp
+ accessibility/AccessibilityARIAGrid.cpp
+diff --git Source/WebCore/accessibility/AXImage.cpp Source/WebCore/accessibility/AXImage.cpp
+deleted file mode 100644
+index d7226f2..0000000
+--- Source/WebCore/accessibility/AXImage.cpp
++++ /dev/null
+@@ -1,86 +0,0 @@
+-/*
+- * Copyright (C) 2021 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.
+- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+- * its contributors may be used to endorse or promote products derived
+- * from this software without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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"
+-#include "AXImage.h"
+-
+-#include "AXLogger.h"
+-#include "Chrome.h"
+-#include "ChromeClient.h"
+-
+-namespace WebCore {
+-
+-AXImage::AXImage(RenderImage* renderer)
+- : AccessibilityRenderObject(renderer)
+-{
+-}
+-
+-Ref<AXImage> AXImage::create(RenderImage* renderer)
+-{
+- return adoptRef(*new AXImage(renderer));
+-}
+-
+-AccessibilityRole AXImage::roleValue() const
+-{
+- auto ariaRole = ariaRoleAttribute();
+- if (ariaRole != AccessibilityRole::Unknown)
+- return ariaRole;
+-
+- return AccessibilityRole::Image;
+-}
+-
+-std::optional<AXCoreObject::AccessibilityChildrenVector> AXImage::imageOverlayElements()
+-{
+- AXTRACE("AXImage::imageOverlayElements");
+-
+- auto& children = this->children();
+- if (children.size())
+- return children;
+-
+-#if ENABLE(IMAGE_ANALYSIS)
+- auto* page = this->page();
+- if (!page)
+- return std::nullopt;
+-
+- auto* element = this->element();
+- if (!element)
+- return std::nullopt;
+-
+- page->chrome().client().requestTextRecognition(*element, [] (RefPtr<Element>&& imageOverlayHost) {
+- if (!imageOverlayHost)
+- return;
+-
+- if (auto* axObjectCache = imageOverlayHost->document().existingAXObjectCache())
+- axObjectCache->postNotification(imageOverlayHost.get(), AXObjectCache::AXImageOverlayChanged);
+- });
+-#endif
+-
+- return std::nullopt;
+-}
+-
+-} // namespace WebCore
+diff --git Source/WebCore/accessibility/AXImage.h Source/WebCore/accessibility/AXImage.h
+deleted file mode 100644
+index c2034d0..0000000
+--- Source/WebCore/accessibility/AXImage.h
++++ /dev/null
+@@ -1,51 +0,0 @@
+-/*
+- * Copyright (C) 2021 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.
+- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+- * its contributors may be used to endorse or promote products derived
+- * from this software without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
+- */
+-
+-#pragma once
+-
+-#include "AccessibilityRenderObject.h"
+-#include "RenderImage.h"
+-
+-namespace WebCore {
+-
+-class AXImage : public AccessibilityRenderObject {
+-public:
+- static Ref<AXImage> create(RenderImage*);
+- virtual ~AXImage() = default;
+-
+-private:
+- explicit AXImage(RenderImage*);
+- bool isAXImageInstance() const override { return true; }
+-
+- AccessibilityRole roleValue() const override;
+- std::optional<AccessibilityChildrenVector> imageOverlayElements() override;
+-};
+-
+-} // namespace WebCore
+-
+-SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY(AXImage, isAXImageInstance())
+diff --git Source/WebCore/accessibility/AXLogger.cpp Source/WebCore/accessibility/AXLogger.cpp
+index 3036666..7f26003 100644
+--- Source/WebCore/accessibility/AXLogger.cpp
++++ Source/WebCore/accessibility/AXLogger.cpp
+@@ -373,9 +373,6 @@ TextStream& operator<<(TextStream& stream, AXObjectCache::AXNotification notific
+ case AXObjectCache::AXNotification::AXIdAttributeChanged:
+ stream << "AXIdAttributeChanged";
+ break;
+- case AXObjectCache::AXNotification::AXImageOverlayChanged:
+- stream << "AXImageOverlayChanged";
+- break;
+ case AXObjectCache::AXNotification::AXLanguageChanged:
+ stream << "AXLanguageChanged";
+ break;
+diff --git Source/WebCore/accessibility/AXObjectCache.cpp Source/WebCore/accessibility/AXObjectCache.cpp
+index f245110..2066db7 100644
+--- Source/WebCore/accessibility/AXObjectCache.cpp
++++ Source/WebCore/accessibility/AXObjectCache.cpp
+@@ -32,7 +32,6 @@
+
+ #include "AXObjectCache.h"
+
+-#include "AXImage.h"
+ #include "AXIsolatedObject.h"
+ #include "AXIsolatedTree.h"
+ #include "AXLogger.h"
+@@ -513,28 +512,6 @@ bool nodeHasRole(Node* node, const String& role)
+ return SpaceSplitString(roleValue, true).contains(role);
+ }
+
+-static bool isSimpleImage(const RenderObject& renderer)
+-{
+- if (!is<RenderImage>(renderer))
+- return false;
+-
+- // Exclude ImageButtons because they are treated as buttons, not as images.
+- auto* node = renderer.node();
+- if (is<HTMLInputElement>(node))
+- return false;
+-
+- // ImageMaps are not simple images.
+- if (downcast<RenderImage>(renderer).imageMap()
+- || (is<HTMLImageElement>(node) && downcast<HTMLImageElement>(node)->hasAttributeWithoutSynchronization(usemapAttr)))
+- return false;
+-
+- // Exclude video and audio elements.
+- if (is<HTMLMediaElement>(node))
+- return false;
+-
+- return true;
+-}
+-
+ static Ref<AccessibilityObject> createFromRenderer(RenderObject* renderer)
+ {
+ // FIXME: How could renderer->node() ever not be an Element?
+@@ -574,9 +551,6 @@ static Ref<AccessibilityObject> createFromRenderer(RenderObject* renderer)
+ if (is<SVGElement>(node))
+ return AccessibilitySVGElement::create(renderer);
+
+- if (isSimpleImage(*renderer))
+- return AXImage::create(downcast<RenderImage>(renderer));
+-
+ #if ENABLE(MATHML)
+ // The mfenced element creates anonymous RenderMathMLOperators which should be treated
+ // as MathML elements and assigned the MathElementRole so that platform logic regarding
+diff --git Source/WebCore/accessibility/AXObjectCache.h Source/WebCore/accessibility/AXObjectCache.h
+index 1dca4ca..fe3d86d 100644
+--- Source/WebCore/accessibility/AXObjectCache.h
++++ Source/WebCore/accessibility/AXObjectCache.h
+@@ -284,7 +284,6 @@ public:
+ AXFocusedUIElementChanged,
+ AXFrameLoadComplete,
+ AXIdAttributeChanged,
+- AXImageOverlayChanged,
+ AXLanguageChanged,
+ AXLayoutComplete,
+ AXLoadComplete,
+diff --git Source/WebCore/accessibility/AccessibilityNodeObject.cpp Source/WebCore/accessibility/AccessibilityNodeObject.cpp
+index 270bbd9..7902660 100644
+--- Source/WebCore/accessibility/AccessibilityNodeObject.cpp
++++ Source/WebCore/accessibility/AccessibilityNodeObject.cpp
+@@ -378,6 +378,7 @@ bool AccessibilityNodeObject::canHaveChildren() const
+
+ // Elements that should not have children
+ switch (roleValue()) {
++ case AccessibilityRole::Image:
+ case AccessibilityRole::Button:
+ case AccessibilityRole::PopUpButton:
+ case AccessibilityRole::CheckBox:
+diff --git Source/WebCore/accessibility/AccessibilityObject.h Source/WebCore/accessibility/AccessibilityObject.h
+index 2839da8..868f213 100644
+--- Source/WebCore/accessibility/AccessibilityObject.h
++++ Source/WebCore/accessibility/AccessibilityObject.h
+@@ -93,7 +93,6 @@ public:
+ bool isAccessibilityRenderObject() const override { return false; }
+ bool isAccessibilityScrollbar() const override { return false; }
+ bool isAccessibilityScrollViewInstance() const override { return false; }
+- bool isAXImageInstance() const override { return false; }
+ bool isAccessibilitySVGRoot() const override { return false; }
+ bool isAccessibilitySVGElement() const override { return false; }
+ bool isAccessibilityTableInstance() const override { return false; }
+@@ -400,7 +399,6 @@ public:
+ String brailleLabel() const override { return getAttribute(HTMLNames::aria_braillelabelAttr); }
+ String brailleRoleDescription() const override { return getAttribute(HTMLNames::aria_brailleroledescriptionAttr); }
+ String embeddedImageDescription() const override;
+- std::optional<AccessibilityChildrenVector> imageOverlayElements() override { return std::nullopt; }
+
+ // Abbreviations
+ String expandedTextValue() const override { return String(); }
+diff --git Source/WebCore/accessibility/AccessibilityObjectInterface.h Source/WebCore/accessibility/AccessibilityObjectInterface.h
+index 2168454..4b51bdf 100644
+--- Source/WebCore/accessibility/AccessibilityObjectInterface.h
++++ Source/WebCore/accessibility/AccessibilityObjectInterface.h
+@@ -794,7 +794,6 @@ public:
+ virtual bool isAccessibilityRenderObject() const = 0;
+ virtual bool isAccessibilityScrollbar() const = 0;
+ virtual bool isAccessibilityScrollViewInstance() const = 0;
+- virtual bool isAXImageInstance() const = 0;
+ virtual bool isAccessibilitySVGRoot() const = 0;
+ virtual bool isAccessibilitySVGElement() const = 0;
+ virtual bool isAccessibilityTableInstance() const = 0;
+@@ -1018,7 +1017,6 @@ public:
+ virtual String brailleLabel() const = 0;
+ virtual String brailleRoleDescription() const = 0;
+ virtual String embeddedImageDescription() const = 0;
+- virtual std::optional<AccessibilityChildrenVector> imageOverlayElements() = 0;
+
+ virtual bool supportsARIAOwns() const = 0;
+ virtual bool isActiveDescendantOfFocusedContainer() const = 0;
+diff --git Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
+index b0bcf55..1f48485 100644
+--- Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
++++ Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
+@@ -1258,12 +1258,6 @@ bool AXIsolatedObject::isAccessibilityScrollViewInstance() const
+ return false;
+ }
+
+-bool AXIsolatedObject::isAXImageInstance() const
+-{
+- ASSERT_NOT_REACHED();
+- return false;
+-}
+-
+ bool AXIsolatedObject::isAccessibilitySVGRoot() const
+ {
+ ASSERT_NOT_REACHED();
+diff --git Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
+index 6fb1ada..d177a22 100644
+--- Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
++++ Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
+@@ -272,7 +272,6 @@ private:
+ String brailleLabel() const override { return stringAttributeValue(AXPropertyName::BrailleLabel); }
+ String brailleRoleDescription() const override { return stringAttributeValue(AXPropertyName::BrailleRoleDescription); }
+ String embeddedImageDescription() const override { return stringAttributeValue(AXPropertyName::EmbeddedImageDescription); }
+- std::optional<AccessibilityChildrenVector> imageOverlayElements() override { return std::nullopt; }
+
+ String computedRoleString() const override { return stringAttributeValue(AXPropertyName::ComputedRoleString); }
+ bool isValueAutofilled() const override { return boolAttributeValue(AXPropertyName::IsValueAutofilled); }
+@@ -467,7 +466,6 @@ private:
+ bool isAccessibilityRenderObject() const override;
+ bool isAccessibilityScrollbar() const override;
+ bool isAccessibilityScrollViewInstance() const override;
+- bool isAXImageInstance() const override;
+ bool isAccessibilitySVGRoot() const override;
+ bool isAccessibilitySVGElement() const override;
+ bool isAccessibilityTableInstance() const override;
+
+
More information about the dev-commits-ports-all
mailing list