fix broken megabar-removal / urlbar

This commit is contained in:
ohfp 2020-06-08 23:13:03 +02:00
parent ac3d1cfbdb
commit 41f7ccd6ac
No known key found for this signature in database
GPG key ID: 2954CC8585E27A3F
3 changed files with 134 additions and 51 deletions

View file

@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project follows the official Firefox releases, but also uses This project follows the official Firefox releases, but also uses
[Arch Linux Package Versioning](https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_versioning) to mark individual releases in between versions. [Arch Linux Package Versioning](https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_versioning) to mark individual releases in between versions.
## [77.0.1-2] - 2020-06-08
### Fixed
- Fix somewhat broken urlbar (switch to proper megabar-removal code)
- Use correctly updated uBlock origin URL
## [77.0.1-1] - 2020-06-06 ## [77.0.1-1] - 2020-06-06
### Changed ### Changed

View file

@ -7,7 +7,7 @@ pkgname=librewolf
_pkgname=LibreWolf _pkgname=LibreWolf
# how to get ci vars instead? # how to get ci vars instead?
pkgver=77.0.1 pkgver=77.0.1
pkgrel=1 pkgrel=2
pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom." pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom."
arch=(x86_64 aarch64) arch=(x86_64 aarch64)
license=(MPL GPL LGPL) license=(MPL GPL LGPL)
@ -22,25 +22,35 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'speech-dispatcher: Text-to-Speech' 'speech-dispatcher: Text-to-Speech'
'hunspell-en_US: Spell checking, American English') 'hunspell-en_US: Spell checking, American English')
options=(!emptydirs !makeflags !strip) options=(!emptydirs !makeflags !strip)
source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz source_x86_64=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
$pkgname.desktop $pkgname.desktop
"git+https://gitlab.com/${pkgname}-community/browser/common.git" "git+https://gitlab.com/${pkgname}-community/browser/common.git"
"git+https://gitlab.com/${pkgname}-community/settings.git" "git+https://gitlab.com/${pkgname}-community/settings.git"
"megabar.patch" "megabar.patch"
"remove_addons.patch") "remove_addons.patch")
sha256sums=('54256fc5f8e9c2e8129ef84773fae31fcfdaf95da6d4d03151f3939e9f749640' source_aarch64=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2' $pkgname.desktop
'SKIP' "git+https://gitlab.com/${pkgname}-community/browser/common.git"
'SKIP' "git+https://gitlab.com/${pkgname}-community/settings.git"
'1130fb4c737ed7bb5f62e008133efe5d830b71e93af91f251dfeee68d190d27d' "megabar.patch"
'4425388d62cbb7ec3808926ae5e04021b17af8a0b6ba47c08a253ecfdcc264c0') "remove_addons.patch"
arm.patch
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch)
if [[ $CARCH == 'aarch64' ]]; then sha256sums_x86_64=('54256fc5f8e9c2e8129ef84773fae31fcfdaf95da6d4d03151f3939e9f749640'
source+=(arm.patch '0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch) 'SKIP'
sha256sums+=('6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7' 'SKIP'
'2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9') '305b3ac9b96430eb71035ddff558995268a88646d9b4ead50316b39af9da53c7'
fi '4425388d62cbb7ec3808926ae5e04021b17af8a0b6ba47c08a253ecfdcc264c0')
sha256sums_aarch64=('54256fc5f8e9c2e8129ef84773fae31fcfdaf95da6d4d03151f3939e9f749640'
'0b28ba4cc2538b7756cb38945230af52e8c4659b2006262da6f3352345a8bed2'
'SKIP'
'SKIP'
'305b3ac9b96430eb71035ddff558995268a88646d9b4ead50316b39af9da53c7'
'4425388d62cbb7ec3808926ae5e04021b17af8a0b6ba47c08a253ecfdcc264c0'
'6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7'
'2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9')
prepare() { prepare() {
mkdir mozbuild mkdir mozbuild

View file

@ -1,15 +1,8 @@
diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm
index c557a10..3f8f1d4 100644 index c557a10..e2c20af 100644
--- a/browser/components/urlbar/UrlbarInput.jsm --- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm +++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -1085,18 +1085,18 @@ class UrlbarInput { @@ -1090,13 +1090,13 @@ class UrlbarInput {
}
this.removeAttribute("breakout-extend-disabled");
- this._toolbar.setAttribute("urlbar-exceeds-toolbar-bounds", "true");
- this.setAttribute("breakout-extend", "true");
+ // this._toolbar.setAttribute("urlbar-exceeds-toolbar-bounds", "true");
+ // this.setAttribute("breakout-extend", "true");
// Enable the animation only after the first extend call to ensure it // Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window. // doesn't run when opening a new window.
@ -30,30 +23,103 @@ index c557a10..3f8f1d4 100644
} }
endLayoutExtend() { endLayoutExtend() {
@@ -1186,8 +1186,13 @@ class UrlbarInput { diff --git a/browser/themes/shared/urlbar-autocomplete.inc.css b/browser/themes/shared/urlbar-autocomplete.inc.css
let updateKey = {}; index 13a4595..eda7bdf 100644
this._layoutBreakoutUpdateKey = updateKey; --- a/browser/themes/shared/urlbar-autocomplete.inc.css
+++ b/browser/themes/shared/urlbar-autocomplete.inc.css
@@ -48,8 +48,8 @@
display: block;
text-shadow: none;
overflow: -moz-hidden-unscrollable;
- margin-inline: @urlbarViewMarginInline@;
- width: calc(100% - 2 * @urlbarViewMarginInline@);
+ margin-inline: 0;
+ width: 100%;
- this.removeAttribute("breakout"); /* Match urlbar-background's border. */
- this.textbox.parentNode.removeAttribute("breakout"); border-inline: 1px solid transparent;
+ if (this.hasAttribute("breakout")) { @@ -72,7 +72,7 @@
+ this.removeAttribute("breakout"); .urlbarView-row {
+ } fill: currentColor;
+ fill-opacity: .6;
+ if (this.textbox.parentNode.hasAttribute("breakout")) { - padding-block: 3px;
+ this.textbox.parentNode.removeAttribute("breakout"); + padding-block: 0;
+ } }
await this.window.promiseDocumentFlushed(() => {}); .urlbarView-row-inner {
await new Promise(resolve => { @@ -179,6 +179,7 @@
@@ -1209,8 +1214,8 @@ class UrlbarInput { background-repeat: no-repeat;
px(getBoundsWithoutFlushing(this._toolbar).height) background-size: contain;
); -moz-context-properties: fill, fill-opacity;
+ margin-inline-start: 20px;
}
- this.setAttribute("breakout", "true"); @media (min-resolution: 2dppx) {
- this.textbox.parentNode.setAttribute("breakout", "true"); @@ -200,10 +201,10 @@
+ // this.setAttribute("breakout", "true");
+ // this.textbox.parentNode.setAttribute("breakout", "true");
resolve(); .urlbarView-type-icon {
}); position: absolute;
- min-width: 12px;
- height: 12px;
- margin-bottom: -4px;
- margin-inline-start: 8px;
+ min-width: 16px;
+ height: 16px;
+ margin-bottom: 0;
+ margin-inline-start: 0;
background-repeat: no-repeat;
background-size: contain;
-moz-context-properties: fill, stroke;
diff --git a/browser/themes/shared/urlbar-searchbar.inc.css b/browser/themes/shared/urlbar-searchbar.inc.css
index 5d5a3d1..4e84a7f 100644
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -6,7 +6,7 @@
%define fieldBorderColor hsla(240,5%,5%,.25)
%define fieldHoverBorderColor hsla(240,5%,5%,.35)
-%define urlbarMarginInline 5px
+%define urlbarMarginInline 0px
%define urlbarSearchButtonWidth calc(16px + 2 * @identityBoxPaddingInline@)
:root {
@@ -196,13 +196,13 @@
}
#urlbar[breakout][breakout-extend] {
- top: -@urlbarBreakoutExtend@;
- left: calc(-@urlbarMarginInline@ - @urlbarBreakoutExtend@);
- width: calc(100% + 2 * @urlbarMarginInline@ + 2 * @urlbarBreakoutExtend@);
+ top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2);
+ left: 0;
+ width: 100%;
}
#urlbar[breakout][breakout-extend] > #urlbar-background {
- box-shadow: 0 3px 8px 0 rgba(0,0,0,.15)
+ box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
#urlbar[breakout][breakout-extend][open] > #urlbar-background {
@@ -210,9 +210,9 @@
}
#urlbar[breakout][breakout-extend] > #urlbar-input-container {
- height: calc(var(--urlbar-toolbar-height) + 2 * @urlbarBreakoutExtend@);
- padding-block: calc(@urlbarBreakoutExtend@ + (var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2);
- padding-inline: calc(@urlbarMarginInline@ + @urlbarBreakoutExtend@);
+ height: var(--urlbar-height);
+ padding-block: 0;
+ padding-inline: 0;
}
#urlbar.searchButton[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-button {
@@ -230,7 +230,7 @@
}
#urlbar[breakout][breakout-extend] > #urlbar-background {
- animation-name: urlbar-grow;
+ animation-name: none;
animation-duration: 0s;
animation-timing-function: var(--animation-easing-function);
}