Adding libhandy 1.0.X

This commit is contained in:
Gerardo J. Puerta
2020-12-11 14:09:30 +01:00
parent 982d2fe12f
commit ffff38ce07
24 changed files with 1006 additions and 355 deletions

View File

@ -0,0 +1,5 @@
{
"policies": {
"DisableAppUpdate": true
}
}

View File

@ -0,0 +1,56 @@
https://github.com/erikrose/blessings/pull/137
Fixes: https://bugs.gentoo.org/654316
From 5fefc65c306cf9ec492e7b422d6bb4842385afbc Mon Sep 17 00:00:00 2001
From: Jay Kamat <jaygkamat@gmail.com>
Date: Fri, 24 Aug 2018 11:11:57 -0700
Subject: [PATCH 1/2] Fix error when TERM is unset or improperly set
---
blessings/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/blessings/__init__.py b/blessings/__init__.py
index 98b75c3..3872b5f 100644
--- a/python/blessings/blessings/__init__.py
+++ b/python/blessings/blessings/__init__.py
@@ -94,8 +94,13 @@ def __init__(self, kind=None, stream=None, force_styling=False):
# init sequences to the stream if it has a file descriptor, and
# send them to stdout as a fallback, since they have to go
# somewhere.
- setupterm(kind or environ.get('TERM', 'unknown'),
- self._init_descriptor)
+ try:
+ setupterm(kind or environ.get('TERM', 'dumb') or 'dumb',
+ self._init_descriptor)
+ except:
+ # There was an error setting up the terminal, either curses is
+ # not supported or TERM is incorrectly set. Fall back to dumb.
+ self._does_styling = False
self.stream = stream
From d885df78c6f931abf3259343aaaa897e16c8cba1 Mon Sep 17 00:00:00 2001
From: Jay Kamat <jaygkamat@gmail.com>
Date: Sat, 1 Sep 2018 13:20:32 -0700
Subject: [PATCH 2/2] Explicitly catch curses.error
---
blessings/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blessings/__init__.py b/blessings/__init__.py
index 3872b5f..fdceb09 100644
--- a/python/blessings/blessings/__init__.py
+++ b/python/blessings/blessings/__init__.py
@@ -97,7 +97,7 @@ def __init__(self, kind=None, stream=None, force_styling=False):
try:
setupterm(kind or environ.get('TERM', 'dumb'),
self._init_descriptor)
- except:
+ except curses.error:
# There was an error setting up the terminal, either curses is
# not supported or TERM is incorrectly set. Fall back to dumb.
self._does_styling = False

View File

@ -0,0 +1,50 @@
From 2683aaa789cfeb8c31a2d94ed972642421768a4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
Date: Thu, 1 Jan 1970 00:00:00 +0000
Subject: [PATCH] Bug 1602358 - Fix older builds with newer cbindgen. r=jwatt,
a=jcristau
This should be fine to uplift so that downstream doesn't need multiple cbindgen
versions.
Differential Revision: https://phabricator.services.mozilla.com/D56346
---
layout/generic/WritingModes.h | 3 ++-
servo/ports/geckolib/cbindgen.toml | 10 ----------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/layout/generic/WritingModes.h b/layout/generic/WritingModes.h
index 1a8d08b191b..0671388902f 100644
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -518,7 +518,8 @@ class WritingMode {
*/
void SetDirectionFromBidiLevel(uint8_t level) {
if (IS_LEVEL_RTL(level) == IsBidiLTR()) {
- mWritingMode ^= StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED;
+ mWritingMode.bits ^= static_cast<uint8_t>(
+ (StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED).bits);
}
}
diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml
index bed86498ea1..8a7a9cd7998 100644
--- a/servo/ports/geckolib/cbindgen.toml
+++ b/servo/ports/geckolib/cbindgen.toml
@@ -616,13 +616,3 @@ renaming_overrides_prefixing = true
// Get the layout rect, replacing auto right / bottom values for aAutoSize.
inline nsRect ToLayoutRect(nscoord aAutoSize = NS_MAXSIZE) const;
"""
-
-"WritingMode" = """
- StyleWritingMode operator^(const StyleWritingMode& other) const {
- return {static_cast<decltype(bits)>(this->bits ^ other.bits)};
- }
- StyleWritingMode& operator^=(const StyleWritingMode& other) {
- *this = (*this ^ other);
- return *this;
- }
-"""
--
2.20.1

View File

@ -0,0 +1,40 @@
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
@@ -42,7 +42,7 @@ const char kRequestInterfaceName[] = "org.freedesktop.portal.Request";
const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast";
-static void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
struct dma_buf_sync sync = { 0 };
sync.flags = start_or_end | DMA_BUF_SYNC_READ;
@@ -386,21 +386,23 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
map = nullptr;
src = nullptr;
} else if (spaBuffer->datas[0].type == pw_core_type_->data.MemFd) {
- map = mmap(nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
- PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0);
+ map = static_cast<uint8_t*>(
+ mmap(nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
+ PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0));
src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
} else if (spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf) {
int fd;
fd = spaBuffer->datas[0].fd;
- map = mmap (nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
- PROT_READ, MAP_PRIVATE, fd, 0);
+ map = static_cast<uint8_t*>(
+ mmap (nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
+ PROT_READ, MAP_PRIVATE, fd, 0));
SyncDmaBuf(fd, DMA_BUF_SYNC_START);
src = SPA_MEMBER (map, spaBuffer->datas[0].mapoffset, uint8_t);
} else if (spaBuffer->datas[0].type == pw_core_type_->data.MemPtr) {
map = nullptr;
- src = spaBuffer->datas[0].data;
+ src = static_cast<uint8_t*>(spaBuffer->datas[0].data);
} else {
return;
}

View File

@ -0,0 +1,17 @@
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("browser.display.use_system_colors", true);
pref("browser.link.open_external", 3);
pref("general.smoothScroll", true);
pref("general.autoScroll", false);
pref("browser.tabs.tabMinWidth", 15);
pref("browser.backspace_action", 0);
pref("browser.urlbar.hideGoButton", true);
pref("accessibility.typeaheadfind", true);
pref("browser.shell.checkDefaultBrowser", false);
pref("browser.EULA.override", true);
pref("general.useragent.vendor", "Gentoo");
pref("intl.locale.matchOS", true);
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
pref("extensions.autoDisableScopes", 0);
pref("layout.css.dpi", 0);

View File

@ -0,0 +1,17 @@
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("browser.display.use_system_colors", true);
pref("browser.link.open_external", 3);
pref("general.smoothScroll", true);
pref("general.autoScroll", false);
pref("browser.tabs.tabMinWidth", 15);
pref("browser.backspace_action", 0);
pref("browser.urlbar.hideGoButton", true);
pref("accessibility.typeaheadfind", true);
pref("browser.shell.checkDefaultBrowser", false);
pref("browser.EULA.override", true);
pref("general.useragent.vendor", "Gentoo");
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
pref("intl.locale.requested", "");
pref("extensions.autoDisableScopes", 0);
pref("layout.css.dpi", 0);

View File

@ -0,0 +1,18 @@
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("browser.display.use_system_colors", true);
pref("browser.link.open_external", 3);
pref("general.smoothScroll", true);
pref("general.autoScroll", false);
pref("browser.tabs.tabMinWidth", 15);
pref("browser.backspace_action", 0);
pref("browser.urlbar.hideGoButton", true);
pref("accessibility.typeaheadfind", true);
pref("browser.shell.checkDefaultBrowser", false);
pref("browser.EULA.override", true);
pref("general.useragent.vendor", "Gentoo");
pref("general.useragent.locale", "chrome://global/locale/intl.properties");
pref("intl.locale.requested", "");
pref("extensions.autoDisableScopes", 0);
pref("layout.css.dpi", 0);
pref("network.trr.mode", 5);

View File

@ -0,0 +1,2 @@
pref("layers.acceleration.force-enabled", true);
pref("webgl.force-enabled", true);

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=@NAME@
Comment=Web Browser
Exec=firefox %u
Icon=@ICON@
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Categories=Network;WebBrowser;

View File

@ -0,0 +1,83 @@
# HG changeset patch
# User Simon Giesecke <sgiesecke@mozilla.com>
# Date 1576592608 0
# Node ID 810f85be6ba971bfad7fdacf1722e7c40b08be75
# Parent 230e7d093c196ddbe7430179321d236590936cfa
Bug 1601707 - Workaround for compilers that do not extend the lifetime of temporaries resulting from ?: expressions. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D56873
diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -24578,19 +24578,19 @@ nsresult ObjectStoreAddOrPutRequestOp::D
}
}
// The "|| keyUnset" here is mostly a debugging tool. If a key isn't
// specified we should never have a collision and so it shouldn't matter
// if we allow overwrite or not. By not allowing overwrite we raise
// detectable errors rather than corrupting data.
DatabaseConnection::CachedStatement stmt;
- const auto& optReplaceDirective = (!mOverwrite || keyUnset)
- ? NS_LITERAL_CSTRING("")
- : NS_LITERAL_CSTRING("OR REPLACE ");
+ const auto optReplaceDirective = (!mOverwrite || keyUnset)
+ ? NS_LITERAL_CSTRING("")
+ : NS_LITERAL_CSTRING("OR REPLACE ");
rv = aConnection->GetCachedStatement(
NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
NS_LITERAL_CSTRING("INTO object_data "
"(object_store_id, key, file_ids, data) "
"VALUES (:") +
kStmtParamNameObjectStoreId + NS_LITERAL_CSTRING(", :") +
kStmtParamNameKey + NS_LITERAL_CSTRING(", :") +
kStmtParamNameFileIds + NS_LITERAL_CSTRING(", :") +
@@ -26422,19 +26422,19 @@ nsresult Cursor::OpenOp::DoIndexDatabase
MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenCursorParams);
MOZ_ASSERT(mCursor->mObjectStoreId);
MOZ_ASSERT(mCursor->mIndexId);
AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexDatabaseWork", DOM);
const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& indexTable = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data");
+ const auto indexTable = mCursor->mUniqueIndex
+ ? NS_LITERAL_CSTRING("unique_index_data")
+ : NS_LITERAL_CSTRING("index_data");
// The result of MakeColumnPairSelectionList is stored in a local variable,
// since inlining it into the next statement causes a crash on some Mac OS X
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
const auto columnPairSelectionList = MakeColumnPairSelectionList(
NS_LITERAL_CSTRING("index_table.value"),
NS_LITERAL_CSTRING("index_table.value_locale"), kColumnNameAliasSortKey,
mCursor->IsLocaleAware());
@@ -26528,19 +26528,19 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
MOZ_ASSERT(mCursor->mType == OpenCursorParams::TIndexOpenKeyCursorParams);
MOZ_ASSERT(mCursor->mObjectStoreId);
MOZ_ASSERT(mCursor->mIndexId);
AUTO_PROFILER_LABEL("Cursor::OpenOp::DoIndexKeyDatabaseWork", DOM);
const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& table = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data");
+ const auto table = mCursor->mUniqueIndex
+ ? NS_LITERAL_CSTRING("unique_index_data")
+ : NS_LITERAL_CSTRING("index_data");
// The result of MakeColumnPairSelectionList is stored in a local variable,
// since inlining it into the next statement causes a crash on some Mac OS X
// builds (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168606#c110).
const auto columnPairSelectionList = MakeColumnPairSelectionList(
NS_LITERAL_CSTRING("value"), NS_LITERAL_CSTRING("value_locale"),
kColumnNameAliasSortKey, mCursor->IsLocaleAware());
const nsCString sortColumnAlias = NS_LITERAL_CSTRING("SELECT ") +

View File

@ -0,0 +1,114 @@
diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0/dom/indexedDB/ActorsParent.cpp
--- firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround 2019-12-02 13:22:58.000000000 +0100
+++ firefox-71.0/dom/indexedDB/ActorsParent.cpp 2019-12-08 21:52:54.449199120 +0100
@@ -24311,11 +24311,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D
// if we allow overwrite or not. By not allowing overwrite we raise
// detectable errors rather than corrupting data.
DatabaseConnection::CachedStatement stmt;
- const auto& optReplaceDirective = (!mOverwrite || keyUnset)
- ? NS_LITERAL_CSTRING("")
- : NS_LITERAL_CSTRING("OR REPLACE ");
rv = aConnection->GetCachedStatement(
- NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
+ NS_LITERAL_CSTRING("INSERT ") +
+ ((!mOverwrite || keyUnset)
+ ? NS_LITERAL_CSTRING("")
+ : NS_LITERAL_CSTRING("OR REPLACE ")) +
NS_LITERAL_CSTRING("INTO object_data "
"(object_store_id, key, file_ids, data) "
"VALUES (:") +
@@ -25869,11 +25869,8 @@ void Cursor::OpenOp::PrepareIndexKeyCond
}
}
- const auto& comparisonChar =
- isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<");
-
mCursor->mContinueToQuery =
- aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + comparisonChar +
+ aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
NS_LITERAL_CSTRING("= :") + kStmtParamNameCurrentKey;
switch (mCursor->mDirection) {
@@ -25881,11 +25878,11 @@ void Cursor::OpenOp::PrepareIndexKeyCond
case IDBCursor::PREV:
mCursor->mContinueQuery =
aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING("= :") +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ( sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
NS_LITERAL_CSTRING(" OR ") + aObjectDataKeyPrefix +
- NS_LITERAL_CSTRING("object_data_key ") + comparisonChar +
+ NS_LITERAL_CSTRING("object_data_key ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
NS_LITERAL_CSTRING(" :") + kStmtParamNameObjectStorePosition +
NS_LITERAL_CSTRING(" ) ");
@@ -25896,12 +25893,12 @@ void Cursor::OpenOp::PrepareIndexKeyCond
"(sort_column == :") +
kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ") +
aObjectDataKeyPrefix + NS_LITERAL_CSTRING("object_data_key ") +
- comparisonChar + NS_LITERAL_CSTRING("= :") +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
kStmtParamNameObjectStorePosition +
NS_LITERAL_CSTRING(
") OR "
"sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
NS_LITERAL_CSTRING(")");
break;
@@ -25909,7 +25906,7 @@ void Cursor::OpenOp::PrepareIndexKeyCond
case IDBCursor::PREV_UNIQUE:
mCursor->mContinueQuery =
aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
+ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
break;
default:
@@ -26076,9 +26073,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase
const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& indexTable = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data");
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
@@ -26099,7 +26093,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase
"object_data.file_ids, "
"object_data.data "
"FROM ") +
- indexTable +
+ (mCursor->mUniqueIndex
+ ? NS_LITERAL_CSTRING("unique_index_data")
+ : NS_LITERAL_CSTRING("index_data")) +
NS_LITERAL_CSTRING(
" AS index_table "
"JOIN object_data "
@@ -26198,9 +26194,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
const bool usingKeyRange = mOptionalKeyRange.isSome();
- const auto& table = mCursor->mUniqueIndex
- ? NS_LITERAL_CSTRING("unique_index_data")
- : NS_LITERAL_CSTRING("index_data");
NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
@@ -26218,7 +26211,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
NS_LITERAL_CSTRING(
"object_data_key "
" FROM ") +
- table + NS_LITERAL_CSTRING(" WHERE index_id = :") +
+ (mCursor->mUniqueIndex
+ ? NS_LITERAL_CSTRING("unique_index_data")
+ : NS_LITERAL_CSTRING("index_data")) +
+ NS_LITERAL_CSTRING(" WHERE index_id = :") +
kStmtParamNameId;
const auto keyRangeClause =