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
  • ----- 2026 -----
  • February
  • January
  • ----- 2025 -----
  • December
  • 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
  • 20047 discussions
[tor-browser-bundle/master] Bug 20183: Only update OSX incremental mar files after adding code signing
by gk@torproject.org 04 Oct '16

04 Oct '16
commit ac9c992cae2078c866b67341d929c61fe54f5437 Author: Nicolas Vigier <boklm(a)torproject.org> Date: Tue Oct 4 01:51:30 2016 +0200 Bug 20183: Only update OSX incremental mar files after adding code signing Don't touch the incremental mar files for the other platforms when updating the OSX incremental mar files after adding code signing. We add a MAR_SKIP_EXISTING environment variable which indicates to the gen_incrementals script that existing incremental mar files should not be regenerated. The old incremental mar files for OSX are removed by the dmg2mar script. --- gitian/Makefile | 4 ++-- tools/update-responses/update_responses | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gitian/Makefile b/gitian/Makefile index 59efd0e..f008834 100644 --- a/gitian/Makefile +++ b/gitian/Makefile @@ -48,12 +48,12 @@ signmars-nightly: dmg2mars: cd $(shell ../tools/update-responses/get_channel_version release) && ../../tools/dmg2mar $(TORSOCKS) ../tools/update-responses/download_missing_versions release - ../tools/update-responses/gen_incrementals release + MAR_SKIP_EXISTING=1 ../tools/update-responses/gen_incrementals release dmg2mars-alpha: cd $(shell ../tools/update-responses/get_channel_version alpha) && ../../tools/dmg2mar $(TORSOCKS) ../tools/update-responses/download_missing_versions alpha - ../tools/update-responses/gen_incrementals alpha + MAR_SKIP_EXISTING=1 ../tools/update-responses/gen_incrementals alpha update_responses: ../tools/update-responses/update_responses release diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses index b83ac29..7962f69 100755 --- a/tools/update-responses/update_responses +++ b/tools/update-responses/update_responses @@ -175,8 +175,12 @@ sub mar_filename { sub create_incremental_mar { my ($config, $pm, $from_version, $new_version, $os, $lang) = @_; my $mar_file = "tor-browser-$os-${from_version}-${new_version}_$lang.incremental.mar"; - print "Starting $mar_file\n"; my $mar_file_path = "$releases_dir/$new_version/$mar_file"; + if ($ENV{MAR_SKIP_EXISTING} && -f $mar_file_path) { + print "Skipping $mar_file\n"; + return; + } + print "Starting $mar_file\n"; my $download_url = "$config->{download}{mars_url}/$new_version"; my $finished_file = sub { exit_error "Error creating $mar_file" unless $_[1] == 0;
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl
by gk@torproject.org 03 Oct '16

03 Oct '16
commit 4dc2922a3071f1789cb0078809e4b28c48fb3922 Author: Markus Stange <mstange(a)themasta.com> Date: Sat Jul 16 17:07:45 2016 -0400 Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl MozReview-Commit-ID: RrVzLcv27T --HG-- extra : amend_source : d14dc262bf300a81feaf03954d5783ea1c7451cb extra : histedit_source : aa39b53c122a719a5181b5a41d5351bbdf04cbd8 --- widget/cocoa/ViewRegion.h | 53 ++++++++++++++++++++++++++++++++ widget/cocoa/ViewRegion.mm | 70 +++++++++++++++++++++++++++++++++++++++++++ widget/cocoa/moz.build | 1 + widget/cocoa/nsScreenCocoa.mm | 4 +-- 4 files changed, 126 insertions(+), 2 deletions(-) diff --git a/widget/cocoa/ViewRegion.h b/widget/cocoa/ViewRegion.h new file mode 100644 index 0000000..a8efcca --- /dev/null +++ b/widget/cocoa/ViewRegion.h @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef ViewRegion_h +#define ViewRegion_h + +#include "Units.h" +#include "nsTArray.h" + +@class NSView; + +namespace mozilla { + +/** + * Manages a set of NSViews to cover a LayoutDeviceIntRegion. + */ +class ViewRegion { +public: + ~ViewRegion(); + + mozilla::LayoutDeviceIntRegion Region() { return mRegion; } + + /** + * Update the region. + * @param aRegion The new region. + * @param aCoordinateConverter The nsChildView to use for converting + * LayoutDeviceIntRect device pixel coordinates into Cocoa NSRect coordinates. + * @param aContainerView The view that's going to be the superview of the + * NSViews which will be created for this region. + * @param aViewCreationCallback A block that instantiates new NSViews. + * @return Whether or not the region changed. + */ + bool UpdateRegion(const mozilla::LayoutDeviceIntRegion& aRegion, + const nsChildView& aCoordinateConverter, + NSView* aContainerView, + NSView* (^aViewCreationCallback)()); + + /** + * Return an NSView from the region, if there is any. + */ + NSView* GetAnyView() { return mViews.Length() > 0 ? mViews[0] : nil; } + +private: + mozilla::LayoutDeviceIntRegion mRegion; + nsTArray<NSView*> mViews; +}; + +} // namespace mozilla + +#endif // ViewRegion_h diff --git a/widget/cocoa/ViewRegion.mm b/widget/cocoa/ViewRegion.mm new file mode 100644 index 0000000..3459849 --- /dev/null +++ b/widget/cocoa/ViewRegion.mm @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "ViewRegion.h" +#import <Cocoa/Cocoa.h> + +using namespace mozilla; + +ViewRegion::~ViewRegion() +{ + for (size_t i = 0; i < mViews.Length(); i++) { + [mViews[i] removeFromSuperview]; + } +} + +bool +ViewRegion::UpdateRegion(const LayoutDeviceIntRegion& aRegion, + const nsChildView& aCoordinateConverter, + NSView* aContainerView, + NSView* (^aViewCreationCallback)()) +{ + if (mRegion == aRegion) { + return false; + } + + // We need to construct the required region using as many EffectViews + // as necessary. We try to update the geometry of existing views if + // possible, or create new ones or remove old ones if the number of + // rects in the region has changed. + + nsTArray<NSView*> viewsToRecycle; + mViews.SwapElements(viewsToRecycle); + // The mViews array is now empty. + + LayoutDeviceIntRegion::RectIterator iter(aRegion); + const LayoutDeviceIntRect* iterRect = nullptr; + for (size_t i = 0; (iterRect = iter.Next()) || i < viewsToRecycle.Length(); ++i) { + if (iterRect) { + NSView* view = nil; + NSRect rect = aCoordinateConverter.DevPixelsToCocoaPoints(*iterRect); + if (i < viewsToRecycle.Length()) { + view = viewsToRecycle[i]; + } else { + view = aViewCreationCallback(); + [aContainerView addSubview:view]; + + // Now that the view is in the view hierarchy, it'll be kept alive by + // its superview, so we can drop our reference. + [view release]; + } + if (!NSEqualRects(rect, [view frame])) { + [view setFrame:rect]; + } + [view setNeedsDisplay:YES]; + mViews.AppendElement(view); + iter.Next(); + } else { + // Our new region is made of fewer rects than the old region, so we can + // remove this view. We only have a weak reference to it, so removing it + // from the view hierarchy will release it. + [viewsToRecycle[i] removeFromSuperview]; + } + } + + mRegion = aRegion; + return true; +} diff --git a/widget/cocoa/moz.build b/widget/cocoa/moz.build index aa8bfac..21b9369 100644 --- a/widget/cocoa/moz.build +++ b/widget/cocoa/moz.build @@ -58,6 +58,7 @@ UNIFIED_SOURCES += [ 'SwipeTracker.mm', 'TextInputHandler.mm', 'VibrancyManager.mm', + 'ViewRegion.mm', 'WidgetTraceEvent.mm', ] diff --git a/widget/cocoa/nsScreenCocoa.mm b/widget/cocoa/nsScreenCocoa.mm index 1b72bbf..bd3eef3 100644 --- a/widget/cocoa/nsScreenCocoa.mm +++ b/widget/cocoa/nsScreenCocoa.mm @@ -44,7 +44,7 @@ nsScreenCocoa::GetRect(int32_t *outX, int32_t *outY, int32_t *outWidth, int32_t { NSRect frame = [mScreen frame]; - LayoutDeviceIntRect r = + mozilla::LayoutDeviceIntRect r = nsCocoaUtils::CocoaRectToGeckoRectDevPix(frame, BackingScaleFactor()); *outX = r.x; @@ -60,7 +60,7 @@ nsScreenCocoa::GetAvailRect(int32_t *outX, int32_t *outY, int32_t *outWidth, int { NSRect frame = [mScreen visibleFrame]; - LayoutDeviceIntRect r = + mozilla::LayoutDeviceIntRect r = nsCocoaUtils::CocoaRectToGeckoRectDevPix(frame, BackingScaleFactor()); *outX = r.x;
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1070710 - Use ViewRegion for window dragging. r=spohl
by gk@torproject.org 03 Oct '16

03 Oct '16
commit 7298e8412e723ff90d74dd06124f8b1ae7e12980 Author: Markus Stange <mstange(a)themasta.com> Date: Mon Jul 11 16:15:07 2016 -0400 Bug 1070710 - Use ViewRegion for window dragging. r=spohl MozReview-Commit-ID: 5x2XHl20P6a --HG-- extra : histedit_source : 56b671bffe9e6cd497ade61ff9beed2e3bf98e14 --- widget/cocoa/nsChildView.h | 5 +- widget/cocoa/nsChildView.mm | 117 ++++++++++++++------------------------------ 2 files changed, 40 insertions(+), 82 deletions(-) diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 8f07c70..e7bd6b0 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -28,6 +28,7 @@ #include "nsString.h" #include "nsIDragService.h" +#include "ViewRegion.h" #import <Carbon/Carbon.h> #import <Cocoa/Cocoa.h> @@ -493,7 +494,7 @@ public: virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) override; virtual void UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) override; - const LayoutDeviceIntRegion& GetDraggableRegion() { return mDraggableRegion; } + LayoutDeviceIntRegion GetNonDraggableRegion() { return mNonDraggableRegion.Region(); } virtual void ReportSwipeStarted(uint64_t aInputBlockId, bool aStartSwipe) override; @@ -659,7 +660,7 @@ protected: // uploaded to to mTitlebarImage. Main thread only. nsIntRegion mDirtyTitlebarRegion; - LayoutDeviceIntRegion mDraggableRegion; + mozilla::ViewRegion mNonDraggableRegion; // Cached value of [mView backingScaleFactor], to avoid sending two obj-c // messages (respondsToSelector, backingScaleFactor) every time we need to diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 8dbeacc..1415664 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -2720,12 +2720,41 @@ nsChildView::DoRemoteComposition(const LayoutDeviceIntRect& aRenderRect) [(ChildView*)mView postRender:mGLPresenter->GetNSOpenGLContext()]; } +@interface NonDraggableView : NSView +@end + +@implementation NonDraggableView +- (BOOL)mouseDownCanMoveWindow { return NO; } +- (NSView*)hitTest:(NSPoint)aPoint { return nil; } +@end + void nsChildView::UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) { - if (mDraggableRegion != aRegion) { - mDraggableRegion = aRegion; - [(ChildView*)mView updateWindowDraggableState]; + // mView returns YES from mouseDownCanMoveWindow, so we need to put NSViews + // that return NO from mouseDownCanMoveWindow in the places that shouldn't + // be draggable. We can't do it the other way round because returning + // YES from mouseDownCanMoveWindow doesn't have any effect if there's a + // superview that returns NO. + LayoutDeviceIntRegion nonDraggable; + nonDraggable.Sub(LayoutDeviceIntRect(0, 0, mBounds.width, mBounds.height), aRegion); + + __block bool changed = false; + + // Suppress calls to setNeedsDisplay during NSView geometry changes. + ManipulateViewWithoutNeedingDisplay(mView, ^() { + changed = mNonDraggableRegion.UpdateRegion(nonDraggable, *this, mView, ^() { + return [[NonDraggableView alloc] initWithFrame:NSZeroRect]; + }); + }); + + if (changed) { + // Trigger an update to the window server. This will call + // mouseDownCanMoveWindow. + // Doing this manually is only necessary because we're suppressing + // setNeedsDisplay calls above. + [[mView window] setMovableByWindowBackground:NO]; + [[mView window] setMovableByWindowBackground:YES]; } } @@ -3566,8 +3595,10 @@ NSEvent* gLastDragMouseDownEvent = nil; - (BOOL)mouseDownCanMoveWindow { - // Return YES so that _regionForOpaqueDescendants gets called, where the - // actual draggable region will be assembled. + // Return YES so that parts of this view can be draggable. The non-draggable + // parts will be covered by NSViews that return NO from + // mouseDownCanMoveWindow and thus override draggability from the inside. + // These views are assembled in nsChildView::UpdateWindowDraggingRegion. return YES; } @@ -4572,7 +4603,7 @@ NSEvent* gLastDragMouseDownEvent = nil; CGFloat locationInTitlebar = [[self window] frame].size.height - [theEvent locationInWindow].y; LayoutDeviceIntPoint pos = geckoEvent.refPoint; if (!defaultPrevented && [theEvent clickCount] == 2 && - mGeckoChild->GetDraggableRegion().Contains(pos.x, pos.y) && + !mGeckoChild->GetNonDraggableRegion().Contains(pos.x, pos.y) && [[self window] isKindOfClass:[ToolbarWindow class]] && (locationInTitlebar < [(ToolbarWindow*)[self window] titlebarHeight] || locationInTitlebar < [(ToolbarWindow*)[self window] unifiedToolbarHeight])) { @@ -4607,80 +4638,6 @@ NSEvent* gLastDragMouseDownEvent = nil; mGeckoChild->DispatchEvent(&event, status); } -- (void)updateWindowDraggableState -{ - // Trigger update to the window server. - [[self window] setMovableByWindowBackground:NO]; - [[self window] setMovableByWindowBackground:YES]; -} - -// aRect is in view coordinates relative to this NSView. -- (CGRect)convertToFlippedWindowCoordinates:(NSRect)aRect -{ - // First, convert the rect to regular window coordinates... - NSRect inWindowCoords = [self convertRect:aRect toView:nil]; - // ... and then flip it again because window coordinates have their origin - // in the bottom left corner, and we need it to be in the top left corner. - inWindowCoords.origin.y = [[self window] frame].size.height - NSMaxY(inWindowCoords); - return NSRectToCGRect(inWindowCoords); -} - -static CGSRegionObj -NewCGSRegionFromRegion(const LayoutDeviceIntRegion& aRegion, - CGRect (^aRectConverter)(const LayoutDeviceIntRect&)) -{ - nsTArray<CGRect> rects; - LayoutDeviceIntRegion::RectIterator iter(aRegion); - for (;;) { - const LayoutDeviceIntRect* r = iter.Next(); - if (!r) { - break; - } - rects.AppendElement(aRectConverter(*r)); - } - - CGSRegionObj region; - CGSNewRegionWithRectList(rects.Elements(), rects.Length(), &region); - return region; -} - -// This function is called with forMove:YES to calculate the draggable region -// of the window which will be submitted to the window server. Window dragging -// is handled on the window server without calling back into our process, so it -// also works while our app is unresponsive. -- (CGSRegionObj)_regionForOpaqueDescendants:(NSRect)aRect forMove:(BOOL)aForMove -{ - if (!aForMove || !mGeckoChild) { - return [super _regionForOpaqueDescendants:aRect forMove:aForMove]; - } - - LayoutDeviceIntRect boundingRect = mGeckoChild->CocoaPointsToDevPixels(aRect); - - LayoutDeviceIntRegion opaqueRegion; - opaqueRegion.Sub(boundingRect, mGeckoChild->GetDraggableRegion()); - - return NewCGSRegionFromRegion(opaqueRegion, ^(const LayoutDeviceIntRect& r) { - return [self convertToFlippedWindowCoordinates:mGeckoChild->DevPixelsToCocoaPoints(r)]; - }); -} - -// Starting with 10.10, in addition to the traditional -// -[NSView _regionForOpaqueDescendants:forMove:] method, there's a new form with -// an additional forUnderTitlebar argument, which is sometimes called instead of -// the old form. We need to override the new variant as well. -- (CGSRegionObj)_regionForOpaqueDescendants:(NSRect)aRect - forMove:(BOOL)aForMove - forUnderTitlebar:(BOOL)aForUnderTitlebar -{ - if (!aForMove || !mGeckoChild) { - return [super _regionForOpaqueDescendants:aRect - forMove:aForMove - forUnderTitlebar:aForUnderTitlebar]; - } - - return [self _regionForOpaqueDescendants:aRect forMove:aForMove]; -} - - (void)handleMouseMoved:(NSEvent*)theEvent { NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1070710 - Use ViewRegion for vibrant areas in VibrancyManager. r=spohl
by gk@torproject.org 03 Oct '16

03 Oct '16
commit 037b95c9574e274274441a17d3f304d529417f7d Author: Markus Stange <mstange(a)themasta.com> Date: Mon Jul 11 14:47:05 2016 -0400 Bug 1070710 - Use ViewRegion for vibrant areas in VibrancyManager. r=spohl MozReview-Commit-ID: 5qVo59SV7QG --HG-- extra : histedit_source : 12980052172b2a858a52978fdd98dea28a9ea854 --- widget/cocoa/VibrancyManager.h | 14 +++------ widget/cocoa/VibrancyManager.mm | 70 +++++++++-------------------------------- 2 files changed, 18 insertions(+), 66 deletions(-) diff --git a/widget/cocoa/VibrancyManager.h b/widget/cocoa/VibrancyManager.h index 464a106..737fdc2 100644 --- a/widget/cocoa/VibrancyManager.h +++ b/widget/cocoa/VibrancyManager.h @@ -11,6 +11,7 @@ #include "nsClassHashtable.h" #include "nsRegion.h" #include "nsTArray.h" +#include "ViewRegion.h" #import <Foundation/NSGeometry.h> @@ -100,20 +101,13 @@ public: */ static bool SystemSupportsVibrancy(); - // The following are only public because otherwise ClearVibrantRegionFunc - // can't see them. - struct VibrantRegion { - LayoutDeviceIntRegion region; - nsTArray<NSView*> effectViews; - }; - void ClearVibrantRegion(const VibrantRegion& aVibrantRegion) const; - protected: - NSView* CreateEffectView(VibrancyType aType, NSRect aRect); + void ClearVibrantRegion(const LayoutDeviceIntRegion& aVibrantRegion) const; + NSView* CreateEffectView(VibrancyType aType); const nsChildView& mCoordinateConverter; NSView* mContainerView; - nsClassHashtable<nsUint32HashKey, VibrantRegion> mVibrantRegions; + nsClassHashtable<nsUint32HashKey, ViewRegion> mVibrantRegions; }; } // namespace mozilla diff --git a/widget/cocoa/VibrancyManager.mm b/widget/cocoa/VibrancyManager.mm index 26f9670..f12cac6 100644 --- a/widget/cocoa/VibrancyManager.mm +++ b/widget/cocoa/VibrancyManager.mm @@ -15,63 +15,25 @@ VibrancyManager::UpdateVibrantRegion(VibrancyType aType, const LayoutDeviceIntRegion& aRegion) { auto& vr = *mVibrantRegions.LookupOrAdd(uint32_t(aType)); - if (vr.region == aRegion) { - return; - } - - // We need to construct the required region using as many EffectViews - // as necessary. We try to update the geometry of existing views if - // possible, or create new ones or remove old ones if the number of - // rects in the region has changed. - - nsTArray<NSView*> viewsToRecycle; - vr.effectViews.SwapElements(viewsToRecycle); - // vr.effectViews is now empty. - - LayoutDeviceIntRegion::RectIterator iter(aRegion); - const LayoutDeviceIntRect* iterRect = nullptr; - for (size_t i = 0; (iterRect = iter.Next()) || i < viewsToRecycle.Length(); ++i) { - if (iterRect) { - NSView* view = nil; - NSRect rect = mCoordinateConverter.DevPixelsToCocoaPoints(*iterRect); - if (i < viewsToRecycle.Length()) { - view = viewsToRecycle[i]; - [view setFrame:rect]; - [view setNeedsDisplay:YES]; - } else { - view = CreateEffectView(aType, rect); - [mContainerView addSubview:view]; - - // Now that the view is in the view hierarchy, it'll be kept alive by - // its superview, so we can drop our reference. - [view release]; - } - vr.effectViews.AppendElement(view); - } else { - // Our new region is made of less rects than the old region, so we can - // remove this view. We only have a weak reference to it, so removing it - // from the view hierarchy will release it. - [viewsToRecycle[i] removeFromSuperview]; - } - } - - vr.region = aRegion; + vr.UpdateRegion(aRegion, mCoordinateConverter, mContainerView, ^() { + return this->CreateEffectView(aType); + }); } void VibrancyManager::ClearVibrantAreas() const { for (auto iter = mVibrantRegions.ConstIter(); !iter.Done(); iter.Next()) { - ClearVibrantRegion(*iter.UserData()); + ClearVibrantRegion(iter.UserData()->Region()); } } void -VibrancyManager::ClearVibrantRegion(const VibrantRegion& aVibrantRegion) const +VibrancyManager::ClearVibrantRegion(const LayoutDeviceIntRegion& aVibrantRegion) const { [[NSColor clearColor] set]; - LayoutDeviceIntRegion::RectIterator iter(aVibrantRegion.region); + LayoutDeviceIntRegion::RectIterator iter(aVibrantRegion); while (const LayoutDeviceIntRect* rect = iter.Next()) { NSRectFill(mCoordinateConverter.DevPixelsToCocoaPoints(*rect)); } @@ -97,15 +59,13 @@ AdjustedColor(NSColor* aFillColor, VibrancyType aType) NSColor* VibrancyManager::VibrancyFillColorForType(VibrancyType aType) { - const nsTArray<NSView*>& views = - mVibrantRegions.LookupOrAdd(uint32_t(aType))->effectViews; + NSView* view = mVibrantRegions.LookupOrAdd(uint32_t(aType))->GetAnyView(); - if (!views.IsEmpty() && - [views[0] respondsToSelector:@selector(_currentFillColor)]) { + if (view && [view respondsToSelector:@selector(_currentFillColor)]) { // -[NSVisualEffectView _currentFillColor] is the color that our view // would draw during its drawRect implementation, if we hadn't // disabled that. - return AdjustedColor([views[0] _currentFillColor], aType); + return AdjustedColor([view _currentFillColor], aType); } return [NSColor whiteColor]; } @@ -117,12 +77,10 @@ VibrancyManager::VibrancyFillColorForType(VibrancyType aType) NSColor* VibrancyManager::VibrancyFontSmoothingBackgroundColorForType(VibrancyType aType) { - const nsTArray<NSView*>& views = - mVibrantRegions.LookupOrAdd(uint32_t(aType))->effectViews; + NSView* view = mVibrantRegions.LookupOrAdd(uint32_t(aType))->GetAnyView(); - if (!views.IsEmpty() && - [views[0] respondsToSelector:@selector(fontSmoothingBackgroundColor)]) { - return [views[0] fontSmoothingBackgroundColor]; + if (view && [view respondsToSelector:@selector(fontSmoothingBackgroundColor)]) { + return [view fontSmoothingBackgroundColor]; } return [NSColor clearColor]; } @@ -250,14 +208,14 @@ enum { @end NSView* -VibrancyManager::CreateEffectView(VibrancyType aType, NSRect aRect) +VibrancyManager::CreateEffectView(VibrancyType aType) { static Class EffectViewClassWithoutForegroundVibrancy = CreateEffectViewClass(NO); static Class EffectViewClassWithForegroundVibrancy = CreateEffectViewClass(YES); Class EffectViewClass = HasVibrantForeground(aType) ? EffectViewClassWithForegroundVibrancy : EffectViewClassWithoutForegroundVibrancy; - NSView* effectView = [[EffectViewClass alloc] initWithFrame:aRect]; + NSView* effectView = [[EffectViewClass alloc] initWithFrame:NSZeroRect]; [effectView performSelector:@selector(setAppearance:) withObject:AppearanceForVibrancyType(aType)]; [effectView setState:VisualEffectStateForVibrancyType(aType)];
1 0
0 0
[tor-browser-bundle/master] Bug 20258: Make OS X Tor archive reproducible
by gk@torproject.org 03 Oct '16

03 Oct '16
commit bfecaab2a6585e958bfbad9cd70fc9dfb5d2aad7 Author: Georg Koppen <gk(a)torproject.org> Date: Thu Sep 29 12:34:53 2016 +0000 Bug 20258: Make OS X Tor archive reproducible --- gitian/descriptors/mac/gitian-tor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml index fdc6afa..f2f4b01 100644 --- a/gitian/descriptors/mac/gitian-tor.yml +++ b/gitian/descriptors/mac/gitian-tor.yml @@ -33,6 +33,7 @@ script: | fi export TZ=UTC export LC_ALL=C + export REFERENCE_DATETIME umask 0022 # mkdir -p $INSTDIR/bin/
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1291543 - [1.1] Accept partial information from VBR headers. r=jya
by gk@torproject.org 29 Sep '16

29 Sep '16
commit 6715852d4487a4b3176c70f34358f5894954bbe2 Author: Eugen Sawin <esawin(a)mozilla.com> Date: Wed Aug 3 15:34:30 2016 +0200 Bug 1291543 - [1.1] Accept partial information from VBR headers. r=jya This fixes our bug 20160. --- dom/media/MP3Demuxer.cpp | 16 ++++++++++------ dom/media/MP3Demuxer.h | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dom/media/MP3Demuxer.cpp b/dom/media/MP3Demuxer.cpp index 88a20dcb..773f996 100644 --- a/dom/media/MP3Demuxer.cpp +++ b/dom/media/MP3Demuxer.cpp @@ -347,7 +347,7 @@ MP3TrackDemuxer::Duration() const { int64_t numFrames = 0; const auto numAudioFrames = mParser.VBRInfo().NumAudioFrames(); - if (mParser.VBRInfo().IsValid()) { + if (mParser.VBRInfo().IsValid() && numAudioFrames.valueOr(0) + 1 > 1) { // VBR headers don't include the VBR header frame. numFrames = numAudioFrames.value() + 1; } else { @@ -513,7 +513,6 @@ MP3TrackDemuxer::GetNextFrame(const MediaByteRange& aRange) { if (mNumParsedFrames == 1) { // First frame parsed, let's read VBR info if available. - // TODO: read info that helps with seeking (bug 1163667). ByteReader reader(frame->Data(), frame->Size()); mParser.ParseVBRHeader(&reader); reader.DiscardRemaining(); @@ -534,7 +533,7 @@ MP3TrackDemuxer::OffsetFromFrameIndex(int64_t aFrameIndex) const { int64_t offset = 0; const auto& vbr = mParser.VBRInfo(); - if (vbr.IsValid()) { + if (vbr.IsComplete()) { offset = mFirstFrameOffset + aFrameIndex * vbr.NumBytes().value() / vbr.NumAudioFrames().value(); } else if (AverageFrameLength() > 0) { @@ -550,7 +549,7 @@ MP3TrackDemuxer::FrameIndexFromOffset(int64_t aOffset) const { int64_t frameIndex = 0; const auto& vbr = mParser.VBRInfo(); - if (vbr.IsValid()) { + if (vbr.IsComplete()) { frameIndex = static_cast<float>(aOffset - mFirstFrameOffset) / vbr.NumBytes().value() * vbr.NumAudioFrames().value(); frameIndex = std::min<int64_t>(vbr.NumAudioFrames().value(), frameIndex); @@ -626,7 +625,7 @@ MP3TrackDemuxer::AverageFrameLength() const { return static_cast<double>(mTotalFrameLen) / mNumParsedFrames; } const auto& vbr = mParser.VBRInfo(); - if (vbr.IsValid() && vbr.NumAudioFrames().value() + 1) { + if (vbr.IsComplete() && vbr.NumAudioFrames().value() + 1) { return static_cast<double>(vbr.NumBytes().value()) / (vbr.NumAudioFrames().value() + 1); } @@ -964,7 +963,12 @@ FrameParser::VBRHeader::IsTOCPresent() const { bool FrameParser::VBRHeader::IsValid() const { - return mType != NONE && + return mType != NONE; +} + +bool +FrameParser::VBRHeader::IsComplete() const { + return IsValid() && mNumAudioFrames.valueOr(0) > 0 && mNumBytes.valueOr(0) > 0 && // We don't care about the scale for any computations here. diff --git a/dom/media/MP3Demuxer.h b/dom/media/MP3Demuxer.h index d98cb73..54e380a 100644 --- a/dom/media/MP3Demuxer.h +++ b/dom/media/MP3Demuxer.h @@ -232,9 +232,12 @@ public: // Returns true iff Xing/Info TOC (table of contents) is present. bool IsTOCPresent() const; - // Returns whether the header is valid (containing reasonable field values). + // Returns whether the header is valid (type XING or VBRI). bool IsValid() const; + // Returns whether the header is valid and contains reasonable non-zero field values. + bool IsComplete() const; + // Returns the byte offset for the given duration percentage as a factor // (0: begin, 1.0: end). int64_t Offset(float aDurationFac) const;
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1236639 - [1.2] Avoid division by zero in MP3Demuxer. r=gerald
by gk@torproject.org 29 Sep '16

29 Sep '16
commit 57bdfc8fded25c4d6952208e7e2561509d57f7c5 Author: Eugen Sawin <esawin(a)mozilla.com> Date: Thu Jan 7 22:45:11 2016 +0100 Bug 1236639 - [1.2] Avoid division by zero in MP3Demuxer. r=gerald This fixes our bug 20160. --- dom/media/MP3Demuxer.cpp | 22 +++++++++++++++++----- dom/media/MP3Demuxer.h | 3 +++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dom/media/MP3Demuxer.cpp b/dom/media/MP3Demuxer.cpp index 2ec5099..7780e57 100644 --- a/dom/media/MP3Demuxer.cpp +++ b/dom/media/MP3Demuxer.cpp @@ -204,7 +204,7 @@ MP3TrackDemuxer::FastSeek(const TimeUnit& aTime) { if (!aTime.ToMicroseconds()) { // Quick seek to the beginning of the stream. mFrameIndex = 0; - } else if (vbr.IsTOCPresent()) { + } else if (vbr.IsTOCPresent() && Duration().ToMicroseconds() > 0) { // Use TOC for more precise seeking. const float durationFrac = static_cast<float>(aTime.ToMicroseconds()) / Duration().ToMicroseconds(); @@ -356,7 +356,9 @@ MP3TrackDemuxer::Duration() const { // Unknown length, we can't estimate duration. return TimeUnit::FromMicroseconds(-1); } - numFrames = (streamLen - mFirstFrameOffset) / AverageFrameLength(); + if (AverageFrameLength() > 0) { + numFrames = (streamLen - mFirstFrameOffset) / AverageFrameLength(); + } } return Duration(numFrames); } @@ -532,7 +534,7 @@ MP3TrackDemuxer::OffsetFromFrameIndex(int64_t aFrameIndex) const { int64_t offset = 0; const auto& vbr = mParser.VBRInfo(); - if (vbr.NumBytes() && vbr.NumAudioFrames()) { + if (vbr.IsValid()) { offset = mFirstFrameOffset + aFrameIndex * vbr.NumBytes().value() / vbr.NumAudioFrames().value(); } else if (AverageFrameLength() > 0) { @@ -548,7 +550,7 @@ MP3TrackDemuxer::FrameIndexFromOffset(int64_t aOffset) const { int64_t frameIndex = 0; const auto& vbr = mParser.VBRInfo(); - if (vbr.NumBytes() && vbr.NumAudioFrames()) { + if (vbr.IsValid()) { frameIndex = static_cast<float>(aOffset - mFirstFrameOffset) / vbr.NumBytes().value() * vbr.NumAudioFrames().value(); frameIndex = std::min<int64_t>(vbr.NumAudioFrames().value(), frameIndex); @@ -624,7 +626,7 @@ MP3TrackDemuxer::AverageFrameLength() const { return static_cast<double>(mTotalFrameLen) / mNumParsedFrames; } const auto& vbr = mParser.VBRInfo(); - if (vbr.NumBytes() && vbr.NumAudioFrames()) { + if (vbr.IsValid() && vbr.NumAudioFrames().value() + 1) { return static_cast<double>(vbr.NumBytes().value()) / (vbr.NumAudioFrames().value() + 1); } @@ -960,6 +962,16 @@ FrameParser::VBRHeader::IsTOCPresent() const { return mTOC.size() == vbr_header::TOC_SIZE; } +bool +FrameParser::VBRHeader::IsValid() const { + return mType != NONE && + mNumAudioFrames.valueOr(0) > 0 && + mNumBytes.valueOr(0) > 0 && + // We don't care about the scale for any computations here. + // mScale < 101 && + true; +} + int64_t FrameParser::VBRHeader::Offset(float aDurationFac) const { if (!IsTOCPresent()) { diff --git a/dom/media/MP3Demuxer.h b/dom/media/MP3Demuxer.h index f42126d..d98cb73 100644 --- a/dom/media/MP3Demuxer.h +++ b/dom/media/MP3Demuxer.h @@ -232,6 +232,9 @@ public: // Returns true iff Xing/Info TOC (table of contents) is present. bool IsTOCPresent() const; + // Returns whether the header is valid (containing reasonable field values). + bool IsValid() const; + // Returns the byte offset for the given duration percentage as a factor // (0: begin, 1.0: end). int64_t Offset(float aDurationFac) const;
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1263334 - Check VBR header is valid before using it for duration calculations. r=esawin
by gk@torproject.org 29 Sep '16

29 Sep '16
commit 2b459feaa5713f0b2c3d6595e677290cdcc8f9ca Author: Jan Henning <jh+bugzilla(a)buttercookie.de> Date: Sat Apr 9 20:38:45 2016 +0200 Bug 1263334 - Check VBR header is valid before using it for duration calculations. r=esawin MozReview-Commit-ID: KPrn5WeXUuF --HG-- extra : transplant_source : E%89%8Cs%1BG%28y%B82%3E%F8%CB%A8Q%B3%1F%EB%94%C2 This fixes our bug 20160. --- dom/media/MP3Demuxer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/media/MP3Demuxer.cpp b/dom/media/MP3Demuxer.cpp index 7780e57..88a20dcb 100644 --- a/dom/media/MP3Demuxer.cpp +++ b/dom/media/MP3Demuxer.cpp @@ -347,7 +347,7 @@ MP3TrackDemuxer::Duration() const { int64_t numFrames = 0; const auto numAudioFrames = mParser.VBRInfo().NumAudioFrames(); - if (numAudioFrames) { + if (mParser.VBRInfo().IsValid()) { // VBR headers don't include the VBR header frame. numFrames = numAudioFrames.value() + 1; } else {
1 0
0 0
[tor-launcher/master] Tagging is not enough, we need version bumps as well
by gk@torproject.org 28 Sep '16

28 Sep '16
commit 505321f54ced353ce3851baa2e65f81c6e9759a4 Author: Georg Koppen <gk(a)torproject.org> Date: Wed Sep 28 08:36:03 2016 +0000 Tagging is not enough, we need version bumps as well --- src/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.rdf b/src/install.rdf index 2eea493..48599a7 100644 --- a/src/install.rdf +++ b/src/install.rdf @@ -7,7 +7,7 @@ <em:creator>The Tor Project, Inc.</em:creator> <em:contributor>Pearl Crescent, LLC</em:contributor> <em:id>tor-launcher(a)torproject.org</em:id> - <em:version>0.2.8.5</em:version> + <em:version>0.2.11</em:version> <em:homepageURL>https://www.torproject.org/projects/torbrowser.html</em:homepageURL> <em:updateURL>data:text/plain,</em:updateURL> <em:updateKey>-</em:updateKey>
1 0
0 0
[tor-browser-bundle/hardened-builds] Don't hardcode mirror for py2exe
by gk@torproject.org 27 Sep '16

27 Sep '16
commit 833ad0f63bfef186b12c1232328457e5d1b8017b Author: Georg Koppen <gk(a)torproject.org> Date: Tue Sep 27 08:49:20 2016 +0000 Don't hardcode mirror for py2exe --- gitian/versions | 2 +- gitian/versions.alpha | 2 +- gitian/versions.beta | 2 +- gitian/versions.nightly | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gitian/versions b/gitian/versions index 46aad1b..6ab0f2d 100755 --- a/gitian/versions +++ b/gitian/versions @@ -140,7 +140,7 @@ ZOPEINTERFACE_URL=https://pypi.python.org/packages/source/z/zope.interface/… TWISTED_URL=https://pypi.python.org/packages/source/T/Twisted/${TWISTED_PAC… # TWISTED_URL=https://twistedmatrix.com/Releases/Twisted/$(echo ${TWISTED_VER} | awk -F. '{print $1"."$2}')/${TWISTED_PACKAGE} M2CRYPTO_URL=https://pypi.python.org/packages/source/M/M2Crypto/${M2CRYPTO_… -PY2EXE_URL=http://liquidtelecom.dl.sourceforge.net/project/py2exe/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} +PY2EXE_URL=http://downloads.sourceforge.net/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} SETUPTOOLS_URL=https://pypi.python.org/packages/source/s/setuptools/${SETUP… PARSLEY_URL=https://pypi.python.org/packages/source/P/Parsley/${PARSLEY_PAC… GO14_URL=https://golang.org/dl/${GO14_PACKAGE} diff --git a/gitian/versions.alpha b/gitian/versions.alpha index 421dd28..e12110e 100755 --- a/gitian/versions.alpha +++ b/gitian/versions.alpha @@ -148,7 +148,7 @@ PYYAML_URL=https://pypi.python.org/packages/source/P/PyYAML/${PYYAML_PACKAG… ZOPEINTERFACE_URL=https://pypi.python.org/packages/source/z/zope.interface/… TWISTED_URL=https://pypi.python.org/packages/source/T/Twisted/${TWISTED_PAC… # TWISTED_URL=https://twistedmatrix.com/Releases/Twisted/$(echo ${TWISTED_VER} | awk -F. '{print $1"."$2}')/${TWISTED_PACKAGE} -PY2EXE_URL=http://liquidtelecom.dl.sourceforge.net/project/py2exe/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} +PY2EXE_URL=http://downloads.sourceforge.net/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} SETUPTOOLS_URL=https://pypi.python.org/packages/source/s/setuptools/${SETUP… PARSLEY_URL=https://pypi.python.org/packages/source/P/Parsley/${PARSLEY_PAC… GO14_URL=https://golang.org/dl/${GO14_PACKAGE} diff --git a/gitian/versions.beta b/gitian/versions.beta index a686402..2a78a8c 100755 --- a/gitian/versions.beta +++ b/gitian/versions.beta @@ -127,7 +127,7 @@ ZOPEINTERFACE_URL=https://pypi.python.org/packages/source/z/zope.interface/… TWISTED_URL=https://pypi.python.org/packages/source/T/Twisted/${TWISTED_PAC… # TWISTED_URL=https://twistedmatrix.com/Releases/Twisted/$(echo ${TWISTED_VER} | awk -F. '{print $1"."$2}')/${TWISTED_PACKAGE} M2CRYPTO_URL=https://pypi.python.org/packages/source/M/M2Crypto/${M2CRYPTO_… -PY2EXE_URL=http://softlayer-dal.dl.sourceforge.net/project/py2exe/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} +PY2EXE_URL=http://downloads.sourceforge.net/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} SETUPTOOLS_URL=https://pypi.python.org/packages/source/s/setuptools/${SETUP… PARSLEY_URL=https://pypi.python.org/packages/source/P/Parsley/${PARSLEY_PAC… GO14_URL=https://golang.org/dl/${GO14_PACKAGE} diff --git a/gitian/versions.nightly b/gitian/versions.nightly index 1d598d4..99e476e 100755 --- a/gitian/versions.nightly +++ b/gitian/versions.nightly @@ -151,7 +151,7 @@ PYYAML_URL=https://pypi.python.org/packages/source/P/PyYAML/${PYYAML_PACKAG… ZOPEINTERFACE_URL=https://pypi.python.org/packages/source/z/zope.interface/… TWISTED_URL=https://pypi.python.org/packages/source/T/Twisted/${TWISTED_PAC… # TWISTED_URL=https://twistedmatrix.com/Releases/Twisted/$(echo ${TWISTED_VER} | awk -F. '{print $1"."$2}')/${TWISTED_PACKAGE} -PY2EXE_URL=http://liquidtelecom.dl.sourceforge.net/project/py2exe/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} +PY2EXE_URL=http://downloads.sourceforge.net/py2exe/${PY2EXE_VER}/${PY2EXE_PACKAGE} SETUPTOOLS_URL=https://pypi.python.org/packages/source/s/setuptools/${SETUP… PARSLEY_URL=https://pypi.python.org/packages/source/P/Parsley/${PARSLEY_PAC… GO14_URL=https://golang.org/dl/${GO14_PACKAGE}
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1777
  • 1778
  • 1779
  • 1780
  • 1781
  • 1782
  • 1783
  • ...
  • 2005
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.