From owner-svn-ports-all@freebsd.org Mon Aug 24 07:10:17 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D52B33B21A1; Mon, 24 Aug 2020 07:10:17 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZjtx54HRz4Dn0; Mon, 24 Aug 2020 07:10:17 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90D2414BC4; Mon, 24 Aug 2020 07:10:17 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O7AHKC021203; Mon, 24 Aug 2020 07:10:17 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7AHIW021202; Mon, 24 Aug 2020 07:10:17 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <202008240710.07O7AHIW021202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Mon, 24 Aug 2020 07:10:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r546052 - head/www/webkit2-gtk3/files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/www/webkit2-gtk3/files X-SVN-Commit-Revision: 546052 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 07:10:17 -0000 Author: tcberner Date: Mon Aug 24 07:10:17 2020 New Revision: 546052 URL: https://svnweb.freebsd.org/changeset/ports/546052 Log: www/webkit2-gtk3: add partial upstream patch to fix build on current Obtained from: https://github.com/WebKit/webkit/commit/c3cf651016e4cdcb4350598d4a586821071f91bf Added: head/www/webkit2-gtk3/files/patch-git_c3cf651 (contents, props changed) Added: head/www/webkit2-gtk3/files/patch-git_c3cf651 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit2-gtk3/files/patch-git_c3cf651 Mon Aug 24 07:10:17 2020 (r546052) @@ -0,0 +1,77 @@ +Partial backport of: + +From c3cf651016e4cdcb4350598d4a586821071f91bf Mon Sep 17 00:00:00 2001 +From: "cturner@igalia.com" + +Date: Thu, 30 Apr 2020 15:12:36 +0000 +Subject: [PATCH] [clang 11] fix build errors due to -WWc++11-narrowing + https://bugs.webkit.org/show_bug.cgi?id=211193 + +Reviewed by Adrian Perez de Castro. + +Fixes the following errors, + +Source/WebCore/html/MediaElementSession.cpp:1059:9: error: type 'WebCore::RenderMedia *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] +m_element.renderer(), +^~~~~~~~~~~~~~~~~~~~ + +Source/WebCore/style/StyleResolver.cpp:106:55: error: type 'const char [4]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] +m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; + ^~~~~ +Source/WebCore/style/StyleResolver.cpp:106:55: note: insert an explicit cast to silence this issue +m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; + ^~~~~ + static_cast( ) + +* html/HTMLMediaElement.h: +(WebCore::HTMLMediaElement::hasRenderer const): +MediaElementSession was implicitly casting a pointer to a bool, +which is not allowed with modern Clang checks. Add a helper method +to encapsulate the now required static_cast. +* html/MediaElementSession.cpp: Use the new helper method to see +if the HTMLMediaElement has an associated renderer. +(WebCore::MediaElementSession::updateMediaUsageIfChanged): +* style/StyleResolver.cpp: This was calling MediaQueryEvaluator { +"all" }; and seemingly expecting to cast a const char[] to a bool, +or maybe String? It's confusing because of the MediaQueryEvaluator +API. If it was implicitly converting to bool then that could be +unintentional. Such casts are not allowed either now. The +MediaQueryEvaluator's default constructor says it returns true for +"all", which appears to be the original intent of this call, so I +replaced it with that. +(WebCore::Style::Resolver::Resolver): + + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260951 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Source/WebCore/ChangeLog | 39 +++++++++++++++++++++ + Source/WebCore/html/HTMLMediaElement.h | 1 + + Source/WebCore/html/MediaElementSession.cpp | 2 +- + Source/WebCore/style/StyleResolver.cpp | 2 +- + 4 files changed, 42 insertions(+), 2 deletions(-) + +diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h +index b466dfc139d7..444f349df87b 100644 +--- Source/WebCore/html/HTMLMediaElement.h ++++ Source/WebCore/html/HTMLMediaElement.h +@@ -155,6 +155,7 @@ class HTMLMediaElement + virtual bool isVideo() const { return false; } + bool hasVideo() const override { return false; } + bool hasAudio() const override; ++ bool hasRenderer() const { return static_cast(renderer()); } + + static HashSet& allMediaElements(); + +diff --git a/Source/WebCore/style/StyleResolver.cpp b/Source/WebCore/style/StyleResolver.cpp +index 651f8f1e2d78..9333b83913a4 100644 +--- Source/WebCore/style/StyleResolver.cpp ++++ Source/WebCore/style/StyleResolver.cpp +@@ -103,7 +103,7 @@ Resolver::Resolver(Document& document) + if (view) + m_mediaQueryEvaluator = MediaQueryEvaluator { view->mediaType() }; + else +- m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; ++ m_mediaQueryEvaluator = MediaQueryEvaluator { }; + + if (root) { + m_rootDefaultStyle = styleForElement(*root, m_document.renderStyle(), nullptr, RuleMatchingBehavior::MatchOnlyUserAgentRules).renderStyle;