lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2025 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 19538 discussions
[tor-browser/tor-browser-60.6.1esr-8.5-1] fixup! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens
by gk@torproject.org 11 Apr '19

11 Apr '19
commit 8b16afa5b647078a22a862360f4764bce82760ca Author: Matthew Finkel <Matthew.Finkel(a)gmail.com> Date: Fri Mar 22 13:43:30 2019 +0000 fixup! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens Bug 29858 - Load onboarding panels after bootstrapping is completed. --- mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index f8af42f09b5f..dce3dc1548c2 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -1363,10 +1363,10 @@ public class BrowserApp extends GeckoApp if (!IntentUtils.getIsInAutomationFromEnvironment(intent)) { if (mTorNeedsStart) { showTorBootstrapPager(); + } else { + // We can't show the first run experience until Gecko has finished initialization (bug 1077583). + checkFirstrun(this, intent); } - - // We can't show the first run experience until Gecko has finished initialization (bug 1077583). - checkFirstrun(this, intent); } } @@ -3138,6 +3138,11 @@ public class BrowserApp extends GeckoApp // If we finished, then Tor bootstrapped 100% mTorNeedsStart = false; + + // When bootstrapping completes, check if the Firstrun (onboarding) screens + // should be shown. + final SafeIntent intent = new SafeIntent(getIntent()); + checkFirstrun(BrowserApp.this, intent); } }); }
1 0
0 0
[tor-browser/tor-browser-60.6.1esr-8.5-1] fixup! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens
by gk@torproject.org 11 Apr '19

11 Apr '19
commit 7b5f5ee887cd6fd865e86784ad536b4c0136ce83 Author: Matthew Finkel <Matthew.Finkel(a)gmail.com> Date: Tue Apr 9 17:52:28 2019 +0000 fixup! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens --- .../app/src/main/res/layout/tor_bootstrap.xml | 9 +- .../base/java/org/mozilla/gecko/BrowserApp.java | 2 +- .../gecko/torbootstrap/TorBootstrapPanel.java | 203 +++++++++++++++++---- .../mozilla/gecko/torbootstrap/TorPreferences.java | 13 +- 4 files changed, 176 insertions(+), 51 deletions(-) diff --git a/mobile/android/app/src/main/res/layout/tor_bootstrap.xml b/mobile/android/app/src/main/res/layout/tor_bootstrap.xml index ce2b1c910a44..af9c7d11d3f2 100644 --- a/mobile/android/app/src/main/res/layout/tor_bootstrap.xml +++ b/mobile/android/app/src/main/res/layout/tor_bootstrap.xml @@ -74,13 +74,10 @@ android:tint="#ffffffff" android:layout_height="wrap_content" android:layout_width="match_parent" - android:layout_marginTop="130dp" android:layout_marginBottom="37dp" - android:layout_marginRight="95dp" - android:layout_marginLeft="95dp" + android:layout_marginRight="10dp" + android:layout_marginLeft="10dp" android:layout_centerHorizontal="true" android:layout_below="@id/tor_bootstrap_settings_gear" - android:layout_above="@id/tor_bootstrap_last_status_message" - android:paddingLeft="20dp" - android:paddingRight="20dp"/> + android:layout_above="@id/tor_bootstrap_last_status_message" /> </RelativeLayout> diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index dce3dc1548c2..006d5c11f210 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -3134,7 +3134,7 @@ public class BrowserApp extends GeckoApp // When the content loaded in the background (such as about:tor), // it was loaded while mBrowserChrome was GONE. We should refresh the // height now so the page is rendered correctly. - Tabs.getInstance().getSelectedTab().doReload(false); + Tabs.getInstance().getSelectedTab().doReload(true); // If we finished, then Tor bootstrapped 100% mTorNeedsStart = false; diff --git a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorBootstrapPanel.java b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorBootstrapPanel.java index 8d42b13a2a8e..2ee4c2528691 100644 --- a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorBootstrapPanel.java +++ b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorBootstrapPanel.java @@ -7,7 +7,6 @@ package org.mozilla.gecko.torbootstrap; import android.app.Activity; import android.content.Intent; -import android.graphics.drawable.Animatable2; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; @@ -16,6 +15,7 @@ import android.support.v4.content.LocalBroadcastManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.ViewTreeObserver; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; @@ -44,6 +44,8 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg protected Activity mActContext; protected TorBootstrapPager.TorBootstrapController mBootstrapController; + private ViewTreeLayoutListener mViewTreeLayoutListener; + // These are used by the background AlphaChanging thread for dynamically changing // the alpha value of the Onion during bootstrap. private int mOnionCurrentAlpha = 255; @@ -85,6 +87,155 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg } } + // Android tries scaling the image as a square. Create a modified ViewPort via padding + // top, left, right, and bottom such that the image aspect ratio is correct. + private void setOnionImgLayout() { + if (mRoot == null) { + Log.i(LOGTAG, "setOnionImgLayout: mRoot is null"); + return; + } + + ImageView onionImg = (ImageView) mRoot.findViewById(R.id.tor_bootstrap_onion); + if (onionImg == null) { + Log.i(LOGTAG, "setOnionImgLayout: onionImg is null"); + return; + } + + // Dimensions of the SVG. If the image is ever changed, update these values. The + // SVG viewport is 2dp wider due to clipping. + final double imgHeight = 289.; + final double imgWidth = 247.; + + // Dimensions of the current ImageView + final int currentHeight = onionImg.getHeight(); + final int currentWidth = onionImg.getWidth(); + + // If we only consider one dimension of the image, calculate the expected value + // of the other dimension (width vs. height). + final int expectedHeight = (int) (currentWidth*imgHeight/imgWidth); + final int expectedWidth = (int) (currentHeight*imgWidth/imgHeight); + + // Set current values as default. + int newWidth = currentWidth; + int newHeight = currentHeight; + + Log.d(LOGTAG, "Current Top=" + onionImg.getTop()); + Log.d(LOGTAG, "Current Height=" + currentHeight); + Log.d(LOGTAG, "Current Width=" + currentWidth); + Log.d(LOGTAG, "Expected height=" + expectedHeight); + Log.d(LOGTAG, "Expected width=" + expectedWidth); + + // Configure the width or height based on its expected value. This is based on + // the intuition that: + // - If the device is in portrait mode, then the device's height is (likely) + // greater than its width. When this is the case, then: + // - The image's View object is likely using all available vertical area + // (but the image is bounded by the width of the device due to + // maintaining the scaling factor). + // - However, the height and width of the graphic are equal (because + // Android enforces this). + // - The width should be less than the height (this is a property of + // the image itself). + // - The width should be proportional to the imgHeight and imgWidth + // defined above. + // Adjust the height when the current width is less than the expected width. + // The width is the limiting-factor, therefore choose the height proportional + // to the current width. + // + // - The opposite is likely true when the device is in landscape mode with + // respect to the height and width. Adjust the width when the height is less + // than the expected height. The height is the limiting-factor, therefore + // choose the width proportional to the current height. + // + // Subtract 1 from the expected value as a way of accounting for rounding + // error. + if (currentWidth < (expectedWidth - 1)) { + newHeight = expectedHeight; + } else if (currentHeight < (expectedHeight - 1)) { + newWidth = expectedWidth; + } + + Log.d(LOGTAG, "New height=" + newHeight); + Log.d(LOGTAG, "New width=" + newWidth); + + // Define the padding as the available space between the current height (as it + // is displayed to the user) and the new height (as it was calculated above). + int verticalPadding = currentHeight - newHeight; + int sidePadding = currentWidth - newWidth; + int leftPadding = 0; + int topPadding = 0; + int bottomPadding = 0; + int rightPadding = 0; + + // If the width of the image is greater than 600dp, then cap it at 702x600 (HxW). + // Furthermore, if the width is "near" 600dp (within 100dp), then decrease the + // dimensions to 468x400 dp. This should "look" better on lower-resolution + // devices. + final int MAXIMUM_WIDTH = 600; + final int distanceFromMaxWidth = newWidth - MAXIMUM_WIDTH; + final boolean isNearMaxWidth = Math.abs(distanceFromMaxWidth) < 100; + if ((newWidth > MAXIMUM_WIDTH) || isNearMaxWidth) { + if (isNearMaxWidth) { + // If newWidth is near MAX_WIDTH, then add additional padding (therefore + // decreasing the width by an additional 200dp). + sidePadding += 200; + } + + final int paddingSpaceAvailable = (distanceFromMaxWidth > 0) ? distanceFromMaxWidth : 0; + sidePadding += paddingSpaceAvailable; + + final int newWidthWithoutPadding = currentWidth - sidePadding; + + final int newHeightWithoutPadding = (int) (newWidthWithoutPadding*imgHeight/imgWidth); + + Log.d(LOGTAG, "New width without padding=" + newWidthWithoutPadding); + Log.d(LOGTAG, "New height without padding=" + newHeightWithoutPadding); + + verticalPadding = currentHeight - newHeightWithoutPadding; + } + + Log.d(LOGTAG, "New top padding=" + verticalPadding); + Log.d(LOGTAG, "New side padding=" + sidePadding); + + if (verticalPadding < 0) { + Log.i(LOGTAG, "vertical padding is " + verticalPadding); + verticalPadding = 0; + } else { + // Place 4/5 of padding at top, and 1/5 of padding at bottom. + topPadding = (int) (verticalPadding*4)/5; + bottomPadding = (int) verticalPadding/5; + } + + if (sidePadding < 0) { + Log.i(LOGTAG, "side padding is " + sidePadding); + leftPadding = 0; + rightPadding = 0; + } else { + // Divide the padding equally on the left and right side. + leftPadding = (int) sidePadding/2; + rightPadding = leftPadding; + } + + // Create a padding-box around the image and let Android fill the box with + // the image. Android will scale the width and height independently, so the + // end result should be a correctly-sized graphic. + onionImg.setPadding(leftPadding, topPadding, rightPadding, bottomPadding); + + // Separately scale x- and y-dimension. + onionImg.setScaleType(ImageView.ScaleType.FIT_XY); + + // Invalidate the view because the image disappears (is not redrawn) sometimes when + // the screen is rotated. + onionImg.invalidate(); + } + + private class ViewTreeLayoutListener implements ViewTreeObserver.OnGlobalLayoutListener { + @Override + public void onGlobalLayout() { + TorBootstrapPanel.this.setOnionImgLayout(); + } + } + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) { mRoot = (ViewGroup) inflater.inflate(R.layout.tor_bootstrap, container, false); @@ -121,6 +272,12 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg TorLogEventListener.addLogger(this); + // Add a callback for notification when the layout is complete and all components + // are measured. Waiting until the layout is complete is necessary before we correctly + // set the size of the onion. Cache the listener so we may remove it later. + mViewTreeLayoutListener = new ViewTreeLayoutListener(); + mRoot.getViewTreeObserver().addOnGlobalLayoutListener(mViewTreeLayoutListener); + return mRoot; } @@ -193,6 +350,9 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg mOnionAlphaChangerRunning = false; } close(); + + // Remove the listener when we're done + mRoot.getViewTreeObserver().removeOnGlobalLayoutListener(mViewTreeLayoutListener); } } @@ -281,9 +441,9 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg Log.i(LOGTAG, "mChangeOnionAlphaThread.getState(): is terminated"); mChangeOnionAlphaThread = null; } else { - // Don't null the reference in this case because then we'll start another - // background thread. We are currently in an unknown state, simply set - // the Running flag as false. + // The reference is not nulled in this case because another + // background thread would start otherwise. The thread is currently in + // an unknown state, simply set the Running flag as false. Log.w(LOGTAG, "We're in an unexpected state. mChangeOnionAlphaThread.getState(): " + mChangeOnionAlphaThread.getState()); synchronized(mOnionAlphaChangerLock) { @@ -302,7 +462,7 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg // Synchronization across threads should not be necessary because there // shouldn't be any other threads relying on mOnionAlphaChangerRunning. - // We do this purely for safety. + // Do this purely for safety. synchronized(mOnionAlphaChangerLock) { mOnionAlphaChangerRunning = true; } @@ -317,7 +477,7 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg Log.w(LOGTAG, "startBootstrapping: mRoot is null?"); return; } - // We're starting bootstrap, transition into the bootstrapping-tor-panel + // Start bootstrap process and transition into the bootstrapping-tor-panel Button connectButton = mRoot.findViewById(R.id.tor_bootstrap_connect); if (connectButton == null) { Log.w(LOGTAG, "startBootstrapping: connectButton is null?"); @@ -326,17 +486,7 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg ImageView onionImg = (ImageView) mRoot.findViewById(R.id.tor_bootstrap_onion); - // Replace the current non-animated image with the animation - onionImg.setImageResource(R.drawable.tor_spinning_onion); - Drawable drawableOnion = onionImg.getDrawable(); - if (Build.VERSION.SDK_INT >= 23 && drawableOnion instanceof Animatable2) { - Animatable2 spinningOnion = (Animatable2) drawableOnion; - // Begin spinning - spinningOnion.start(); - } else { - Log.i(LOGTAG, "Animatable2 is not supported (or bad inheritance), version: " + Build.VERSION.SDK_INT); - } mOnionCurrentAlpha = 255; // The onion should have 100% alpha, begin decreasing it. @@ -388,27 +538,6 @@ public class TorBootstrapPanel extends FirstrunPanel implements TorBootstrapLogg Drawable drawableOnion = onionImg.getDrawable(); - // If the connect button wasn't pressed previously, then this object is - // not an animation (it is most likely a BitmapDrawable). Only manipulate - // it when it is an Animatable2. - if (Build.VERSION.SDK_INT >= 23 && drawableOnion instanceof Animatable2) { - Animatable2 spinningOnion = (Animatable2) drawableOnion; - // spinningOnion is null if we didn't previously call startBootstrapping. - // If we reach here and spinningOnion is null, then there is likely a bug - // because stopBootstrapping() is called only when the user selects the - // gear button and we should only reach this block if the user pressed the - // connect button (thus creating and enabling the animation) and then - // pressing the gear button. Therefore, if the drawableOnion is an - // Animatable2, then spinningOnion should be non-null. - if (spinningOnion != null) { - spinningOnion.stop(); - - onionImg.setImageResource(R.drawable.tor_spinning_onion); - } - } else { - Log.i(LOGTAG, "Animatable2 is not supported (or bad inheritance), version: " + Build.VERSION.SDK_INT); - } - // Reset the onion's alpha value. onionImg.setImageAlpha(255); diff --git a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java index 9a8468292e7d..87ce1ec4bec6 100644 --- a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java +++ b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java @@ -342,7 +342,7 @@ public class TorPreferences extends AppCompatPreferenceActivity { Log.i(LOGTAG, "disableBridges: bridgesProvide is not null"); pref = bridgesProvide; } else { - Log.w(LOGTAG, "disableBridges: all the expected preferences are is null?"); + Log.w(LOGTAG, "disableBridges: all of the expected preferences are null?"); return; } @@ -396,7 +396,7 @@ public class TorPreferences extends AppCompatPreferenceActivity { // such that it is synchronized with the widget. final SwitchPreference bridgesEnabled = (SwitchPreference) TorNetworkBridgesEnabledPreference.this.findPreference(PREFS_BRIDGES_ENABLED); if (bridgesEnabled == null) { - Log.w(LOGTAG, "onCreate: bridgesEnabled is null?"); + Log.w(LOGTAG, "onClick: bridgesEnabled is null?"); return; } @@ -422,11 +422,10 @@ public class TorPreferences extends AppCompatPreferenceActivity { @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - setTitle(R.string.pref_tor_network_title); final SwitchPreference bridgesEnabled = (SwitchPreference) findPreference(PREFS_BRIDGES_ENABLED); if (bridgesEnabled == null) { - Log.w(LOGTAG, "onCreate: bridgesEnabled is null?"); + Log.w(LOGTAG, "onViewCreated: bridgesEnabled is null?"); return; } @@ -927,9 +926,9 @@ public class TorPreferences extends AppCompatPreferenceActivity { } if (bridgesLine2 != null) { - // If bridgesLine1 was not null, then append a newline. Log.i(LOGTAG, "bridgesLine2 is not null."); if (bridgesLines != null) { + // If bridgesLine1 was not null, then append a newline. bridgesLines += "\n" + bridgesLine2; } else { bridgesLines = bridgesLine2; @@ -937,9 +936,9 @@ public class TorPreferences extends AppCompatPreferenceActivity { } if (bridgesLine3 != null) { - // If bridgesLine1 was not null, then append a newline. Log.i(LOGTAG, "bridgesLine3 is not null."); if (bridgesLines != null) { + // If bridgesLine1 or bridgesLine2 were not null, then append a newline. bridgesLines += "\n" + bridgesLine3; } else { bridgesLines = bridgesLine3; @@ -954,11 +953,11 @@ public class TorPreferences extends AppCompatPreferenceActivity { } if (bridgesLines == null) { - Log.i(LOGTAG, "provideBridge is empty. Disabling."); // If provided bridges are null/empty, then only disable all bridges if // the user did not select a built-in bridge String configuredBuiltinBridges = getBridges(bridgesProvide.getSharedPreferences(), PREFS_BRIDGES_TYPE); if (configuredBuiltinBridges == null) { + Log.i(LOGTAG, "Custom bridges are empty. Disabling."); disableBridges(this); } return;
1 0
0 0
[tor-browser/tor-browser-60.6.1esr-8.5-1] fixup! Bug 29768: Introduce new features to users
by gk@torproject.org 11 Apr '19

11 Apr '19
commit d8163c5fe45122f4e7fa98b77e37a5736421edb9 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Wed Apr 10 14:57:02 2019 -0400 fixup! Bug 29768: Introduce new features to users Fixes #30104. --- .../content/img/figure_tor-security-level.png | Bin 12185 -> 10888 bytes .../extensions/onboarding/content/onboarding.css | 6 ------ 2 files changed, 6 deletions(-) diff --git a/browser/extensions/onboarding/content/img/figure_tor-security-level.png b/browser/extensions/onboarding/content/img/figure_tor-security-level.png index 5c7b8c5635fe..4f940ea008ef 100644 Binary files a/browser/extensions/onboarding/content/img/figure_tor-security-level.png and b/browser/extensions/onboarding/content/img/figure_tor-security-level.png differ diff --git a/browser/extensions/onboarding/content/onboarding.css b/browser/extensions/onboarding/content/onboarding.css index ed7ef9e2add8..3bd1b4df7017 100644 --- a/browser/extensions/onboarding/content/onboarding.css +++ b/browser/extensions/onboarding/content/onboarding.css @@ -396,12 +396,6 @@ transform: scaleX(-1); } -/* The image contained in figure_tor-security-level.png contains English text; - * therefore it should not be flipped when the document direction is RTL. */ -#onboarding-tour-tor-security-update-8-5-page > .onboarding-tour-content > img:dir(rtl) { - transform: scaleX(1); -} - .onboarding-tour-content > iframe { width: 100%; height: 100%;
1 0
0 0
[tor-browser/tor-browser-60.6.1esr-8.5-1] fixup! Bug 29768: Introduce new features to users
by gk@torproject.org 11 Apr '19

11 Apr '19
commit f29aef752c7bb1a6215bc537fff1d742ea0961fe Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Wed Apr 10 09:45:57 2019 -0400 fixup! Bug 29768: Introduce new features to users --- browser/extensions/onboarding/content/onboarding.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/extensions/onboarding/content/onboarding.css b/browser/extensions/onboarding/content/onboarding.css index 939721677c4f..ed7ef9e2add8 100644 --- a/browser/extensions/onboarding/content/onboarding.css +++ b/browser/extensions/onboarding/content/onboarding.css @@ -27,6 +27,7 @@ padding: 16px 0 0 0; position: fixed; top: 4px; + offset-inline-start: 12px; } /* @@ -61,7 +62,6 @@ #onboarding-overlay-button { cursor: pointer; - offset-inline-start: 12px; border: none; /* Set to none so no grey contrast background in the high-contrast mode */ background: none;
1 0
0 0
[tor-browser-build/master] Merge remote-tracking branch 'gk/bug_30016_v2'
by boklm@torproject.org 10 Apr '19

10 Apr '19
commit 516887a876b9ed5ebb020e8e3723fc09ac2fe3ec Merge: c141452 a901b95 Author: Nicolas Vigier <boklm(a)torproject.org> Date: Thu Apr 11 01:23:00 2019 +0200 Merge remote-tracking branch 'gk/bug_30016_v2' projects/firefox/build | 5 ++++- projects/firefox/config | 3 +++ projects/tba-translation/build | 8 ++++++++ projects/tba-translation/config | 7 +++++++ 4 files changed, 22 insertions(+), 1 deletion(-)
1 0
0 0
[tor-browser-build/master] Bug 30016: Localize bootstrap-/bridge-related strings for mobile
by boklm@torproject.org 10 Apr '19

10 Apr '19
commit a901b95e48702cba67a5838244a5773a6843e5ba Author: Georg Koppen <gk(a)torproject.org> Date: Sun Apr 7 06:30:08 2019 +0000 Bug 30016: Localize bootstrap-/bridge-related strings for mobile --- projects/firefox/build | 5 ++++- projects/firefox/config | 3 +++ projects/tba-translation/build | 8 ++++++++ projects/tba-translation/config | 7 +++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/projects/firefox/build b/projects/firefox/build index 9bc025a..1d9faac 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -108,9 +108,10 @@ mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig cp -r $gradle_repo/guardianproject/gpmaven/master/* $gradle_repo # Move orbot files so they will be included in the apk during the build cp $rootdir/[% c('input_files_by_name/orbot') %]/* mobile/android/app - # Prepare building the multi-locale .apk + # Prepare building the multi-locale .apk including our own strings mkdir -p /var/tmp/dist/locales tar -C /var/tmp/dist/locales -xf $rootdir/[% c('input_files_by_name/firefox-locale-bundle') %] + tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/tba-translation') %] [% END %] eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %]) @@ -163,6 +164,8 @@ rm -f js/src/configure # Building a multi-locale .apk [% FOREACH lang = c('var/locales') %] [% SET lang = tmpl(lang) %] + # Copy our torbrowser_strings.dtd at the right place + cp /var/tmp/dist/tba-translation/[% lang %]/torbrowser_strings.dtd /var/tmp/dist/locales/[% lang %]/mobile/android/base/ ./mach build chrome-[% lang %]; [% END %] export MOZ_CHROME_MULTILOCALE='[% tmpl(c('var/locales').join(' ')) %]' diff --git a/projects/firefox/config b/projects/firefox/config index 679aaee..9eabf05 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -166,3 +166,6 @@ input_files: - project: firefox-locale-bundle name: firefox-locale-bundle enable: '[% c("var/android") %]' + - project: tba-translation + name: tba-translation + enable: '[% c("var/android") %]' diff --git a/projects/tba-translation/build b/projects/tba-translation/build new file mode 100644 index 0000000..ac0f21b --- /dev/null +++ b/projects/tba-translation/build @@ -0,0 +1,8 @@ +#!/bin/bash +[% c("var/set_default_env") -%] +tar xf [% project %]-[% c("version") %].tar.gz +mv [% project %]-[% c("version") %] [% project %] +[% c('tar', { + tar_src => [ project ], + tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'), + }) %] diff --git a/projects/tba-translation/config b/projects/tba-translation/config new file mode 100644 index 0000000..fd31b01 --- /dev/null +++ b/projects/tba-translation/config @@ -0,0 +1,7 @@ +# vim: filetype=yaml sw=2 +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' +git_url: https://git.torproject.org/translation.git +# We need to bump the commit before releasing but just pointing to a branch +# might cause too much rebuidling of the Firefox part. +git_hash: 8da59b784ec6a8492805379903696647adbcfb97 +version: '[% c("abbrev") %]'
1 0
0 0
[tor-browser-build/master] Bug 30089: Use apksigner instead of jarsigner
by gk@torproject.org 10 Apr '19

10 Apr '19
commit 99b49adf8e049ff5d5c091485fb3a45b6e6e359c Author: Nicolas Vigier <boklm(a)torproject.org> Date: Wed Apr 10 12:28:03 2019 +0200 Bug 30089: Use apksigner instead of jarsigner --- projects/android-toolchain/build | 4 +--- projects/debootstrap-image/config | 8 -------- projects/tor-browser/build.android | 2 +- projects/tor-browser/config | 6 +----- rbm.conf | 2 ++ 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/projects/android-toolchain/build b/projects/android-toolchain/build index ff899d2..9fe40f7 100644 --- a/projects/android-toolchain/build +++ b/projects/android-toolchain/build @@ -21,9 +21,7 @@ rm -fR android-ndk-r15c # The architectures we support archs="arm x86" for arch in $archs; do - # API 16 is the minimum we currently support for Tor Browser on Android for - # 32bit. - ./build/tools/make_standalone_toolchain.py --api 16 --arch $arch --install-dir=./$arch + ./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api") %] --arch $arch --install-dir=./$arch done # Tool Archives diff --git a/projects/debootstrap-image/config b/projects/debootstrap-image/config index 7d535ec..7fa3551 100644 --- a/projects/debootstrap-image/config +++ b/projects/debootstrap-image/config @@ -94,14 +94,6 @@ targets: suite: jessie arch: i386 - # Still needed to fix faketime issues in tor-browser for Android, see: #29453 - buster-amd64: - var: - minimal_apt_version: '1.8.0~alpha3.1' - container: - suite: buster - arch: amd64 - stretch-amd64: var: minimal_apt_version: 1.4.9 diff --git a/projects/tor-browser/build.android b/projects/tor-browser/build.android index 2de8d36..ffaf93d 100644 --- a/projects/tor-browser/build.android +++ b/projects/tor-browser/build.android @@ -25,4 +25,4 @@ zip -d $apk lib/armeabi/tor.so [% END %] # Sign a QA build. This apk is not a debug version and doesn't contain a debug flag in the manifest -[% c("var/faketime") %] jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore $rootdir/android-qa.keystore -signedjar $qa_apk $apk androidqakey -storepass android -keypass android +java -jar /usr/share/apksigner/apksigner.jar sign --verbose --min-sdk-version [% c("var/android_min_api") %] --ks $rootdir/android-qa.keystore --out $qa_apk --in $apk --ks-key-alias androidqakey --key-pass pass:android --ks-pass pass:android diff --git a/projects/tor-browser/config b/projects/tor-browser/config index 0a82092..c14b9d7 100644 --- a/projects/tor-browser/config +++ b/projects/tor-browser/config @@ -52,11 +52,7 @@ targets: var: arch_deps: - openjdk-8-jdk - - faketime - # On some machines using faketime with Stretch to make the debug signature - # leads to a stalled build. Work around this by switching to Buster. - container: - suite: buster + - apksigner input_files: - project: container-image diff --git a/rbm.conf b/rbm.conf index 1a0c6ca..7be1106 100644 --- a/rbm.conf +++ b/rbm.conf @@ -191,6 +191,8 @@ targets: var: android: 1 compiler: android-toolchain + # API 16 is the minimum we currently support for Tor Browser on Android + android_min_api: 16 snowflake: 0 fteproxy: 0 container:
1 0
0 0
[tor-browser-build/master] Merge remote-tracking branch 'boklm/bug_30089_v4'
by gk@torproject.org 10 Apr '19

10 Apr '19
commit c14145264cd1f8eaff3a465d0014d5bf1d061e8a Merge: ed424fd 99b49ad Author: Georg Koppen <gk(a)torproject.org> Date: Wed Apr 10 13:46:27 2019 +0000 Merge remote-tracking branch 'boklm/bug_30089_v4' projects/android-toolchain/build | 4 +--- projects/debootstrap-image/config | 8 -------- projects/tor-browser/build.android | 2 +- projects/tor-browser/config | 6 +----- rbm.conf | 2 ++ 5 files changed, 5 insertions(+), 17 deletions(-)
1 0
0 0
[tor-browser-build/master] Bug 30039: Use the target_prepend option in https-everywhere
by gk@torproject.org 10 Apr '19

10 Apr '19
commit ed424fd45a740f1b62857456fbcf616976012986 Author: Nicolas Vigier <boklm(a)torproject.org> Date: Mon Apr 8 13:38:36 2019 +0200 Bug 30039: Use the target_prepend option in https-everywhere Update rbm for #30039, adding support for the target_prepend and target_append options in input_files. In projects/https-everywhere/config we now use the target_prepend option instead of the target option for the python input file. This does not change the output of the build. However this makes it possible in the future to check the channel or platform we build for in the python project (which was not possible before as we were using the target option, replacing all the initial targets). --- projects/https-everywhere/config | 2 +- rbm | 2 +- rbm.conf | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/https-everywhere/config b/projects/https-everywhere/config index a9409cd..d84cdf6 100644 --- a/projects/https-everywhere/config +++ b/projects/https-everywhere/config @@ -32,5 +32,5 @@ input_files: - project: container-image - project: python name: python - target: + target_prepend: - common-stretch diff --git a/rbm b/rbm index 70d1ff3..87adfb7 160000 --- a/rbm +++ b/rbm @@ -1 +1 @@ -Subproject commit 70d1ff3e7c1c5c69a1b4cdb61ee1b6b9e2a9bc4a +Subproject commit 87adfb7b7be7e7e0f437020dbf8a119673133412 diff --git a/rbm.conf b/rbm.conf index 1a0c6ca..64192b4 100644 --- a/rbm.conf +++ b/rbm.conf @@ -162,6 +162,7 @@ targets: container: suite: stretch arch: amd64 + pre_pkginst: '' deps: - build-essential - python
1 0
0 0
[tor-browser/tor-browser-60.6.1esr-8.5-1] fixup! Bug 29768: Introduce new features to users
by gk@torproject.org 10 Apr '19

10 Apr '19
commit 7706b044c9a013ae205168038ae8a734b2249741 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Tue Apr 9 14:38:35 2019 -0400 fixup! Bug 29768: Introduce new features to users --- .../extensions/onboarding/content/onboarding.css | 21 +++++++++---- .../extensions/onboarding/content/onboarding.js | 34 +++++++++++++--------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/browser/extensions/onboarding/content/onboarding.css b/browser/extensions/onboarding/content/onboarding.css index 4804c4fbadc6..939721677c4f 100644 --- a/browser/extensions/onboarding/content/onboarding.css +++ b/browser/extensions/onboarding/content/onboarding.css @@ -341,14 +341,13 @@ grid-template-columns: [tour-page-start] 368px [tour-content-start] 1fr [tour-page-end]; } -.onboarding-tour-description-prefix { +.onboarding-tour-description-highlight { display: inline-block; - margin-bottom: -8px; /* reduce vertical space below */ - padding: 2px 10px; - vertical-align: center; + margin-inline-start: 8px; + padding: 6px 8px; + vertical-align: middle; background-color: #F1F1F3; border-radius: 4px; - min-height: 25px; font-size: 10px; font-weight: 600; text-transform: uppercase; @@ -373,6 +372,12 @@ color: #420c5d; } +.onboarding-tour-description-suffix { + margin-top: 6px; + font-size: 13px; + line-height: 16px; +} + .onboarding-tour-content { grid-row: tour-page-start / tour-button-start; grid-column: tour-content-start / tour-page-end; @@ -391,6 +396,12 @@ transform: scaleX(-1); } +/* The image contained in figure_tor-security-level.png contains English text; + * therefore it should not be flipped when the document direction is RTL. */ +#onboarding-tour-tor-security-update-8-5-page > .onboarding-tour-content > img:dir(rtl) { + transform: scaleX(1); +} + .onboarding-tour-content > iframe { width: 100%; height: 100%; diff --git a/browser/extensions/onboarding/content/onboarding.js b/browser/extensions/onboarding/content/onboarding.js index acfcd93c5cef..1326aebc9bcf 100644 --- a/browser/extensions/onboarding/content/onboarding.js +++ b/browser/extensions/onboarding/content/onboarding.js @@ -51,17 +51,6 @@ function createOnboardingTourDescription(div, title, description) { } /** - * Helper function to insert a prefix above the tour description. - */ -function addOnboardingTourPrefix(section, l10nId) { - let doc = section.ownerDocument; - let div = doc.createElement("div"); - div.className = "onboarding-tour-description-prefix"; - div.setAttribute("data-l10n-id", l10nId); - section.insertBefore(div, section.firstChild); // Insert as first child. -} - -/** * Helper function to create the tour content UI element. */ function createOnboardingTourContent(div, imageSrc) { @@ -189,11 +178,18 @@ var onboardingTourset = { "security": { id: "onboarding-tour-tor-security", tourNameId: "onboarding.tour-tor-security", + highlightId: "onboarding.tour-tor-update.prefix-new", getPage(win) { let div = win.document.createElement("div"); - createOnboardingTourDescription(div, + let desc = createOnboardingTourDescription(div, "onboarding.tour-tor-security.title", "onboarding.tour-tor-security.description"); + let additionalDesc = win.document.createElement("p"); + additionalDesc.className = "onboarding-tour-description-suffix"; + additionalDesc.setAttribute("data-l10n-id", + "onboarding.tour-tor-security.description-suffix"); + desc.appendChild(additionalDesc); + createOnboardingTourContent(div, "resource://onboarding/img/figure_tor-security.png"); let btnContainer = createOnboardingTourButton(div, "onboarding-tour-tor-security-button", "onboarding.tour-tor-security-level.button"); @@ -244,13 +240,13 @@ var onboardingTourset = { "toolbar-update-8.5": { id: "onboarding-tour-tor-toolbar-update-8-5", tourNameId: "onboarding.tour-tor-toolbar", + highlightId: "onboarding.tour-tor-update.prefix-updated", instantComplete: true, getPage(win) { let div = win.document.createElement("div"); let desc = createOnboardingTourDescription(div, "onboarding.tour-tor-toolbar-update-8.5.title", "onboarding.tour-tor-toolbar-update-8.5.description"); - addOnboardingTourPrefix(desc, "onboarding.tour-tor-update.prefix-updated"); createOnboardingTourContent(div, "resource://onboarding/img/figure_tor-toolbar-layout.png"); createOnboardingTourButton(div, @@ -262,12 +258,12 @@ var onboardingTourset = { "security-update-8.5": { id: "onboarding-tour-tor-security-update-8-5", tourNameId: "onboarding.tour-tor-security", + highlightId: "onboarding.tour-tor-update.prefix-new", getPage(win) { let div = win.document.createElement("div"); let desc = createOnboardingTourDescription(div, "onboarding.tour-tor-security-update-8.5.title", "onboarding.tour-tor-security-update-8.5.description"); - addOnboardingTourPrefix(desc, "onboarding.tour-tor-update.prefix-new"); createOnboardingTourContent(div, "resource://onboarding/img/figure_tor-security-level.png"); let btnContainer = createOnboardingTourButton(div, @@ -1777,7 +1773,17 @@ class Onboarding { let tourPanelId = `${tour.id}-page`; tab.setAttribute("aria-controls", tourPanelId); + if (tour.highlightId) { + // Add [New] or [Updated] text after this navigation item to draw + // attention to it. + let highlight = this._window.document.createElement("span"); + highlight.className = "onboarding-tour-description-highlight"; + highlight.textContent = this._bundle.GetStringFromName(tour.highlightId); + tab.appendChild(highlight); + } + li.appendChild(tab); + itemsFrag.appendChild(li); // Dynamically create tour pages let div = tour.getPage(this._window, this._bundle);
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1495
  • 1496
  • 1497
  • 1498
  • 1499
  • 1500
  • 1501
  • ...
  • 1954
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.