Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Revert 0.15.4xx items
Browse files Browse the repository at this point in the history
Auditors: @bbondy, @alexwykoff

Revert "Remove addEditBookmark.less"
This reverts commit c1c4437.

Revert "Add padding around showAllWrap button"
This reverts commit 4a9e270.

Revert "Shows notification caret on pinned tabs"
This reverts commit f829362.

Revert "unhide bitwarden password manager"
This reverts commit fc52e8c.

Revert "Saving a document doesn't show correct origin Fix #8698. Auditors @bsclifton @diracdeltas"
This reverts commit 277074e.

Revert "noscript exceptions from private tabs should not apply to regular tabs"
This reverts commit d6516f7.
  • Loading branch information
bsclifton committed May 16, 2017
1 parent 591406c commit 133819a
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 69 deletions.
1 change: 0 additions & 1 deletion app/extensions/brave/locales/en-US/downloads.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ downloadInProgress=Downloading: {{downloadPercent}}
downloadInProgressUnknownTotal=Downloading…
downloadPaused=Paused: {{downloadPercent}}
downloadDeleteConfirmation=Delete?
downloadLocalFile=Local file

downloadPause.title=Pause Download
downloadResume.title=Resume Download
Expand Down
4 changes: 1 addition & 3 deletions app/renderer/components/downloadItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ class DownloadItem extends ImmutableComponent {
}
render () {
const origin = getOrigin(this.props.download.get('url'))
const localFileOrigins = ['file:', 'blob:', 'data:', 'chrome-extension:', 'chrome:']
const localFile = origin && localFileOrigins.some((localFileOrigin) => origin.startsWith(localFileOrigin))
const progressStyle = {
width: downloadUtil.getPercentageComplete(this.props.download)
}
Expand Down Expand Up @@ -162,7 +160,7 @@ class DownloadItem extends ImmutableComponent {
? <span className='fa fa-unlock isInsecure' />
: null
}
<span data-l10n-id={localFile ? 'downloadLocalFile' : null} title={origin}>{localFile ? null : origin}</span>
<span title={origin}>{origin}</span>
</div>
: null
}
Expand Down
7 changes: 4 additions & 3 deletions app/renderer/components/preferences/payment/ledgerTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class LedgerTable extends ImmutableComponent {
/>
{
(totalUnPinnedRows !== unPinnedRows.size && hideLower)
? <div className={css(styles.ledgerTable__showAllWrap)}>
? <div className={css(styles.showAllWrap)}>
<BrowserButton secondaryColor
l10nId={hideLower ? 'showAll' : 'hideLower'}
onClick={this.showAll.bind(this, !hideLower)}
Expand Down Expand Up @@ -464,9 +464,10 @@ const styles = StyleSheet.create({
right: '2px'
},

ledgerTable__showAllWrap: {
showAllWrap: {
textAlign: 'center',
marginTop: globalStyles.spacing.panelMargin
paddingBottom: '10px',
marginTop: '-20px'
}
})

Expand Down
3 changes: 1 addition & 2 deletions app/renderer/components/preferences/paymentsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ const styles = StyleSheet.create({
paymentsContainer: {
position: 'relative',
overflowX: 'hidden',
width: '805px',
paddingBottom: '40px' // cf: padding of .prefTabContainer
width: '805px'
},
paymentsSwitches: {
display: 'flex',
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/tabs/pinnedTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class PinnedTabs extends ImmutableComponent {
paintTabs={this.props.paintTabs}
previewTabs={this.props.previewTabs}
isActive={this.props.activeFrameKey === frame.get('key')}
notificationBarActive={this.props.notificationBarActive}
partOfFullPageSet={this.props.partOfFullPageSet} />)
}
</div>
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/tabs/tabsToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class TabsToolbar extends ImmutableComponent {
dragData={this.props.dragData}
tabPageIndex={this.props.tabPageIndex}
pinnedTabs={pinnedTabs}
notificationBarActive={this.props.notificationBarActive}
/>
: null
}
Expand Down
6 changes: 1 addition & 5 deletions app/renderer/lib/extensionsUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ const vimium = config.vimiumExtensionId
* Properties such as name and description are referenced like keys for proper l10n
*/
const dummyData = [
// { id: bitwarden, // TBD },
{
id: bitwarden,
name: 'bitwarden',
description: 'bitwardenDesc',
icon: 'img/extensions/bitwarden-128.png'
}, {
id: dashlane,
name: 'dashlane',
description: 'dashlaneDesc',
Expand Down
4 changes: 1 addition & 3 deletions docs/appActions.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ Dispatches a message when a tab is being cloned



### noScriptExceptionsAdded(hostPattern, origins, temporary)
### noScriptExceptionsAdded(hostPattern, origins)

Dispatches a message when noscript exceptions are added for an origin

Expand All @@ -757,8 +757,6 @@ Dispatches a message when noscript exceptions are added for an origin

**origins**: `Object.&lt;string, (boolean|number)&gt;`, Dispatches a message when noscript exceptions are added for an origin

**temporary**: `boolean`, Dispatches a message when noscript exceptions are added for an origin



### setObjectId(objectId, objectPath)
Expand Down
2 changes: 1 addition & 1 deletion js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ class SecurityTab extends ImmutableComponent {
<option data-l10n-id='onePassword' value={passwordManagers.ONE_PASSWORD} />
<option data-l10n-id='dashlane' value={passwordManagers.DASHLANE} />
<option data-l10n-id='lastPass' value={passwordManagers.LAST_PASS} />
<option data-l10n-id='bitwarden' value={passwordManagers.BITWARDEN} />
{ /* <option data-l10n-id='bitwarden' value={passwordManagers.BITWARDEN} /> */ }
{ /* <option data-l10n-id='enpass' value={passwordManagers.ENPASS} /> */ }
<option data-l10n-id='doNotManageMyPasswords' value={passwordManagers.UNMANAGED} />
</SettingDropdown>
Expand Down
6 changes: 2 additions & 4 deletions js/actions/appActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -927,14 +927,12 @@ const appActions = {
* Dispatches a message when noscript exceptions are added for an origin
* @param {string} hostPattern
* @param {Object.<string, (boolean|number)>} origins
* @param {boolean} temporary
*/
noScriptExceptionsAdded: function (hostPattern, origins, temporary) {
noScriptExceptionsAdded: function (hostPattern, origins) {
AppDispatcher.dispatch({
actionType: appConstants.APP_ADD_NOSCRIPT_EXCEPTIONS,
hostPattern,
origins,
temporary
origins
})
},

Expand Down
2 changes: 1 addition & 1 deletion js/components/noScriptInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class NoScriptInfo extends ImmutableComponent {
}
})
if (checkedOrigins.filter((value) => value !== false).size) {
appActions.noScriptExceptionsAdded(this.origin, checkedOrigins, this.isPrivate)
appActions.noScriptExceptionsAdded(this.origin, checkedOrigins)
this.reload()
this.props.onHide()
}
Expand Down
1 change: 1 addition & 0 deletions js/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require('../less/dialogs.less')
require('../less/downloadBar.less')
require('../less/bookmarksToolbar.less')
require('../less/notificationBar.less')
require('../less/addEditBookmark.less')
require('../node_modules/font-awesome/css/font-awesome.css')

const React = require('react')
Expand Down
21 changes: 9 additions & 12 deletions js/stores/appStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,18 +567,15 @@ const handleAppAction = (action) => {
break
}
case appConstants.APP_ADD_NOSCRIPT_EXCEPTIONS:
{
const propertyName = action.temporary ? 'temporarySiteSettings' : 'siteSettings'
// Note that this is always cleared on restart or reload, so should not
// be synced or persisted.
const key = 'noScriptExceptions'
if (!action.origins || !action.origins.size) {
// Clear the exceptions
appState = appState.setIn([propertyName, action.hostPattern, key], new Immutable.Map())
} else {
const currentExceptions = appState.getIn([propertyName, action.hostPattern, key]) || new Immutable.Map()
appState = appState.setIn([propertyName, action.hostPattern, key], currentExceptions.merge(action.origins))
}
// Note that this is always cleared on restart or reload, so should not
// be synced or persisted.
let key = 'noScriptExceptions'
if (!action.origins || !action.origins.size) {
// Clear the exceptions
appState = appState.setIn(['siteSettings', action.hostPattern, key], new Immutable.Map())
} else {
const currentExceptions = appState.getIn(['siteSettings', action.hostPattern, key]) || new Immutable.Map()
appState = appState.setIn(['siteSettings', action.hostPattern, key], currentExceptions.merge(action.origins))
}
break
case appConstants.APP_UPDATE_LEDGER_INFO:
Expand Down
7 changes: 7 additions & 0 deletions less/addEditBookmark.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* 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/. */

.removeBookmarkLink {
margin-right: auto;
}
32 changes: 0 additions & 32 deletions test/unit/app/renderer/downloadItemTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require('../../braveUnit')

const savePath = path.join(require('os').tmpdir(), 'mostHatedPrimes.txt')
const downloadUrl = 'http://www.bradrichter.com/mostHatedPrimes.txt'
const localFileDownloadUrl = 'file:///Users/foobar/Library/abc.txt'
const newDownload = (state) => Immutable.fromJS({
startTime: new Date().getTime(),
filename: 'mostHatedPrimes.txt',
Expand All @@ -29,16 +28,6 @@ const newDownload = (state) => Immutable.fromJS({
deleteConfirmationVisible: false,
state
})
const newDownloadLocalFile = (state) => Immutable.fromJS({
startTime: new Date().getTime(),
filename: 'abc.txt',
savePath,
url: localFileDownloadUrl,
totalBytes: 104729,
receivedBytes: 96931,
deleteConfirmationVisible: false,
state
})

describe('downloadItem component', function () {
before(function () {
Expand All @@ -57,27 +46,6 @@ describe('downloadItem component', function () {
})

Object.values(downloadStates).forEach(function (state) {
describe(`${state} download local item`, function () {
before(function () {
this.downloadId = uuid.v4()
this.download = newDownloadLocalFile(state)
this.result = mount(
<DownloadItem
downloadId={this.downloadId}
download={this.download}
deleteConfirmationVisible={this.download.get('deleteConfirmationVisible')} />
)
})

it('filename exists and matches download filename', function () {
assert.equal(this.result.find('.downloadFilename').text(), this.download.get('filename'))
})

it('has local origin i.e file: and matches to "Local file" origin', function () {
assert.equal(this.result.find('.downloadOrigin').text(), '')
})
})

describe(`${state} download item`, function () {
before(function () {
this.downloadId = uuid.v4()
Expand Down

0 comments on commit 133819a

Please sign in to comment.