Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #834

Open
wants to merge 161 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
51b8fbf
Add named arguments
anthonycr Sep 15, 2020
08f4251
Initial browser2 rewrite
anthonycr Sep 15, 2020
9ba9286
Add history recording
anthonycr Sep 15, 2020
6ce04ed
Extract TabModel
anthonycr Sep 15, 2020
bffb31f
inject dependencies and create new tabs using home page
anthonycr Sep 15, 2020
2721cd2
Handle url display
anthonycr Sep 15, 2020
a480079
Support custom search query
anthonycr Sep 15, 2020
bd832d2
Adding placeholder docs
anthonycr Sep 15, 2020
152f154
immediately display URL that will be loaded and set title
anthonycr Sep 15, 2020
ddda65c
Support loading favicons in tabs and bookmarks
anthonycr Sep 16, 2020
176ab38
Support menu clicks
anthonycr Sep 16, 2020
921519d
Adding text changed listener to handle style removal
anthonycr Sep 16, 2020
3f4fdad
Handle keyboard combos and handle menu clicks with the same style of …
anthonycr Sep 16, 2020
430f5bf
Rename Tab to more descriptive TabViewState
anthonycr Sep 16, 2020
e29ab82
Support share and copy link
anthonycr Sep 17, 2020
1f857a2
Handle focus issues in the search view
anthonycr Sep 17, 2020
e2f1106
Fixing search focus display of URL
anthonycr Sep 17, 2020
3ff5f8c
Create partial state class that allows the diff in the state to be re…
anthonycr Sep 17, 2020
bd9e624
Support adblocking
anthonycr Sep 18, 2020
1ba137b
Fixing bug where search sometimes just reloaded tab, caused by focus …
anthonycr Sep 18, 2020
455f968
Support enabling and disabling add bookmark icon, partial bookmark/un…
anthonycr Sep 18, 2020
5faf8f8
Add missing click bindings
anthonycr Sep 18, 2020
a94369e
Only handle key up scenarios
anthonycr Sep 19, 2020
d259398
Simplify key handling
anthonycr Sep 19, 2020
b6e5b80
Load homepage on home press
anthonycr Sep 19, 2020
6eabaea
Handle tab freezing and restoring
anthonycr Sep 20, 2020
4c9ff69
Handle tab updates that occur in the background
anthonycr Sep 20, 2020
d2f08cb
Remove unnecessary state render
anthonycr Sep 20, 2020
f1ad6c4
Support opening links
anthonycr Sep 22, 2020
29ff9bb
Support new deeplinks
anthonycr Sep 22, 2020
816743b
Fix issue where search didn't lose focus and the wrong text was set
anthonycr Sep 23, 2020
f8d869c
Simplifying subscriptions
anthonycr Sep 23, 2020
b3a8c8a
Simplify map
anthonycr Sep 23, 2020
72275e9
Support custom browser headers
anthonycr Sep 25, 2020
0283085
Support back press
anthonycr Sep 25, 2020
74e5671
Full support for adding bookmarks
anthonycr Sep 30, 2020
78260d0
Add support for editing bookmark and folder
anthonycr Oct 1, 2020
ea3fa16
Show root folder when back is pressed
anthonycr Oct 1, 2020
5b95d36
Handle bookmark back button display
anthonycr Oct 1, 2020
1006a9f
Add in long click function
anthonycr Oct 1, 2020
c01cad9
Support adding URL to home screen
anthonycr Oct 15, 2020
127b555
Handle back/forward menu items, handle opening tabs and bookmarks
anthonycr Nov 19, 2020
be47f8a
Updating gradle
anthonycr Nov 19, 2020
ef51569
Handle find in page
anthonycr Nov 20, 2020
1aca398
Show the ssl state when the icon is clicked
anthonycr Nov 20, 2020
982192f
desktop and drawer tab support
anthonycr Nov 20, 2020
c1bb0a3
Handle hiding toolbar while scrolling
anthonycr Nov 21, 2020
f335d2b
Updating gradle and dependencies
anthonycr Dec 23, 2020
d856a73
Creating browser scope that scopes browser instance
anthonycr Dec 23, 2020
9902a14
Cleaning up lambdas
anthonycr Dec 23, 2020
5a79d26
Removing unused imports
anthonycr Dec 23, 2020
76e19d7
Upgrading gradle tools
anthonycr Jan 26, 2021
3a29b1a
Handle long click partially
anthonycr Jan 26, 2021
3c4e7e1
Update gradle
anthonycr Mar 29, 2021
4bd31c1
Handle long presses on the webview
anthonycr Mar 29, 2021
321e1f1
Fix lint warnings
anthonycr Mar 29, 2021
dc5c7a4
Add todo for special URL long clicks
anthonycr Mar 29, 2021
11e265a
Fix bug where tab freezing wouldn't work due to freezing the state af…
anthonycr Apr 11, 2021
91b7097
Handle panic clean
anthonycr Apr 11, 2021
67c62d4
Open another app when navigating to URLs that can be handled outside …
anthonycr Apr 11, 2021
adc1230
Handling tab long press and tab closing dialog
anthonycr Apr 18, 2021
f7dfa1c
Moving enums to correct contract location
anthonycr Apr 19, 2021
2aa4137
Add option support to folders
anthonycr Apr 19, 2021
524c712
Formatting
anthonycr Jul 25, 2021
2798feb
Close bookmark and tab drawers after clicking on a tab or bookmark
anthonycr Jul 25, 2021
a62f5cf
Upgrade dependencies
anthonycr Jul 25, 2021
874e3c1
Properly display dialog for bookmark and folder page and reload the page
anthonycr Jul 25, 2021
d3918ce
Support deleting downloads on download page
anthonycr Jul 25, 2021
30e348b
Support showing long press options for history page
anthonycr Jul 25, 2021
e7757c1
Support downloads
anthonycr Jul 26, 2021
13c95c4
Upgrading gradle
anthonycr Jul 24, 2022
fdf68b3
Updating gradle
anthonycr Jul 26, 2022
a0499f4
Fixing issue where tab close can be triggered on tabs that are in the…
anthonycr Jul 26, 2022
04f430b
Properly adding subscription to disposable
anthonycr Jul 26, 2022
5272738
Disable overscroll on webviews since it causes distortion of the webp…
anthonycr Jul 26, 2022
e69fca0
Adjusting dark theme search bar background
anthonycr Jul 26, 2022
ef6c45f
Support the tools menu in the browser
anthonycr Jul 26, 2022
c6f218a
Fixe reading mode button not working
anthonycr Jul 26, 2022
e2ff9e5
Implementing incognito mode
anthonycr Jul 27, 2022
e1d3d58
Need to support going home in certain configurations
anthonycr Jul 27, 2022
853c3fc
Fix issue where new tabs would be opened before old tabs
anthonycr Jul 27, 2022
a00a9d5
Fix UI flashing when deleting a tab
anthonycr Jul 27, 2022
def1192
Properly handle the back button in the browser
anthonycr Jul 27, 2022
db494dc
Hide the keyboard when a search suggestion is clicked
anthonycr Jul 27, 2022
2fcc624
Close tab drawers whenever the current tab is changed
anthonycr Jul 27, 2022
a0236fd
Go home when the home button his hit in desktop configuration mode
anthonycr Jul 27, 2022
f6a7ef2
Hide keyboard when the webview is focused
anthonycr Jul 28, 2022
eb6368d
Properly show the toolbar when switching tabs and when the url changes
anthonycr Jul 28, 2022
96632f2
Properly handle the back button when the tab can no longer "go back"
anthonycr Jul 28, 2022
67e9f66
Fixing behavior issue where the favicon would be incorrect if the pag…
anthonycr Jul 28, 2022
7b960a8
Fixing issues with search bar focus and the URL displayed
anthonycr Jul 28, 2022
50667a6
Show the freeze icon as the tab icon when the tab is frozen
anthonycr Jul 28, 2022
c29f77a
Enable and disable menu items based on current URL
anthonycr Jul 28, 2022
f09d187
Properly cache favicons for use elsewhere
anthonycr Jul 28, 2022
ce44cdb
Avoid subscribing to the bookmark repo on the main thread
anthonycr Jul 28, 2022
2656cc0
Implementing most key combos
anthonycr Jul 28, 2022
f73d17c
Prevent local file URLs from being unilaterally loaded by the browser…
anthonycr Jul 28, 2022
7c731b3
Support create and close window requests
anthonycr Jul 29, 2022
04a69b7
Fixing issue where subscribing to the url changes from two different …
anthonycr Jul 31, 2022
8b81521
Theming the bookmark page
anthonycr Aug 1, 2022
188fb3d
Theming download and history pages
anthonycr Aug 1, 2022
d2b9bb0
Implementing theme aware homepage and fixing theme awareness with oth…
anthonycr Aug 1, 2022
8ce6119
Change default homepage to bookmarks
anthonycr Aug 1, 2022
de8db1a
Don't record history entries with blank URLs
anthonycr Aug 1, 2022
d91bdbc
Separating the tab list state from the view state since they are not …
anthonycr Aug 1, 2022
56d0de0
Go up to the root folder when deleting a folder
anthonycr Aug 1, 2022
131d4cd
Disable item animation for desktop tabs
anthonycr Aug 1, 2022
0eba931
Support color mode
anthonycr Aug 2, 2022
41145d1
Support reopening closed tabs
anthonycr Aug 2, 2022
f85b022
Reimplementing proxy in new tab impementation
anthonycr Aug 2, 2022
a22a7b6
Support proxying
anthonycr Aug 2, 2022
2b84ce2
Bump min sdk to 21, RIP kitkat
anthonycr Aug 3, 2022
259cf21
Support upload in the browser
anthonycr Aug 3, 2022
5e43942
Fixing lint errors
anthonycr Aug 3, 2022
3a49450
Fixing build
anthonycr Aug 3, 2022
662ecae
Support fullscreen video
anthonycr Aug 3, 2022
183e193
WebRtc support
anthonycr Aug 3, 2022
9b0f9f9
Supporting restoring lost tabs preference
anthonycr Aug 3, 2022
cb7a3ca
Moving class to appropriate package
anthonycr Aug 3, 2022
08df9a0
Removing old browser code
anthonycr Aug 3, 2022
df7a44c
Moving files out of temp package and into main package
anthonycr Aug 3, 2022
9abc8f7
Moving root activities to the root directory
anthonycr Aug 3, 2022
abcc020
Moving files to the correct package
anthonycr Aug 3, 2022
294da78
Reformatting code
anthonycr Aug 3, 2022
885e48a
Update documentation
anthonycr Aug 4, 2022
cb134e3
Adding interface documentation
anthonycr Aug 4, 2022
d95767b
Updating documentation
anthonycr Aug 4, 2022
479a93b
Cleaning up code to remove old SDK int checks
anthonycr Aug 4, 2022
ba7c641
Cleaning up unnecessary enums
anthonycr Aug 4, 2022
9cac8e5
Adding missing documentation and improving formatting
anthonycr Aug 4, 2022
78ec83d
Improving package structure
anthonycr Aug 4, 2022
a346570
Improving package structure
anthonycr Aug 4, 2022
cd4e12e
Fixing cursors
anthonycr Aug 4, 2022
c31181d
Replace star imports with direct imports
anthonycr Aug 4, 2022
c48e02b
Improving documentation
anthonycr Aug 4, 2022
383396c
Documenting browser apis
anthonycr Aug 4, 2022
4338fba
Improving documentation of tab classes
anthonycr Aug 4, 2022
fbbf90b
Fixing focus issue with search box
anthonycr Aug 4, 2022
30b4a89
Cleaning up code
anthonycr Aug 4, 2022
b70882b
Animate back button transition in bookmark tab
anthonycr Aug 5, 2022
c20796c
Executing exit cleanup when the browser closes
anthonycr Aug 5, 2022
194e833
Fixing formatting
anthonycr Aug 5, 2022
332fbd9
Adding missing documentation
anthonycr Aug 5, 2022
58c4417
Reducing visibility on unused functions
anthonycr Aug 5, 2022
c5202c0
Fixing problematic initialization sequence that mutated the tabs list…
anthonycr Aug 7, 2022
81e99cb
Revert "Fixing problematic initialization sequence that mutated the t…
anthonycr Aug 8, 2022
1aecff6
Internalize the initialization of the tabs to the repository to handl…
anthonycr Aug 8, 2022
8fe26e0
Removing unnecessary super calls
anthonycr Aug 8, 2022
6154fb5
Fixing search bar focus issues
anthonycr Aug 8, 2022
5ef4bf2
Support zoom scale changing
anthonycr Aug 9, 2022
1a55cbf
Implementing http auth request, ssl error, and form resubmission hand…
anthonycr Aug 9, 2022
300e461
Removing deprecated code that isn't needed
anthonycr Aug 9, 2022
c06b67b
Subscribe to whole upstream observable on the same thread
anthonycr Aug 10, 2022
902d2e1
Don't allow new tabs to be created before initialization is complete
anthonycr Aug 10, 2022
1938138
Remove legacy theme provider as it is no longer needed after removing…
anthonycr Aug 12, 2022
4ec162a
Removing unused and dead code
anthonycr Aug 12, 2022
149e279
Fixing lint warning
anthonycr Aug 12, 2022
b005d3a
Simplifying data source provider by injecting the data sources
anthonycr Aug 15, 2022
0dd9eb9
Ensure that repository functions operate on the correct scheduler
anthonycr Aug 18, 2022
0e8730e
Utilize a default title so that the tab title isn't ever blank
anthonycr Aug 26, 2022
57f2642
Create SECURITY.pv
damiasgr Sep 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions SECURITY.pv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

##not Supported Versions

#keep privare
57 changes: 26 additions & 31 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'jacoco'
apply plugin: 'com.github.ben-manes.versions'

android {
compileSdkVersion project.targetSdkVersion
buildToolsVersion project.buildToolsVersion

defaultConfig {
minSdkVersion project.minSdkVersion
Expand All @@ -22,6 +20,10 @@ android {
lightningLite.setRoot('src/LightningLite')
}

buildFeatures {
viewBinding true
}

buildTypes {
debug {
multiDexEnabled true
Expand Down Expand Up @@ -70,55 +72,49 @@ android {
versionCode 102
}
}

lintOptions {
abortOnError true
}

packagingOptions {
exclude '.readme'
resources {
excludes += ['.readme']
}
}


compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lint {
abortOnError true
}
}

jacoco {
toolVersion = '0.7.9' // See http://www.eclemma.org/jacoco/
}

dexcount {
includeClasses = false
includeFieldCount = false
format = "tree"
orderByMethodCount = true
verbose = false
}

dependencies {
// multidex debug
debugImplementation 'androidx.multidex:multidex:2.0.1'

// test dependencies
testImplementation 'junit:junit:4.13'
testImplementation 'org.assertj:assertj-core:3.17.2'
testImplementation 'org.mockito:mockito-core:3.5.10'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.assertj:assertj-core:3.20.2'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'com.nhaarman:mockito-kotlin:1.6.0', {
exclude group: 'org.jetbrains.kotlin'
}
testImplementation 'org.robolectric:robolectric:4.4'

// support libraries
implementation "androidx.palette:palette:1.0.0"
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.palette:palette-ktx:1.0.0"
implementation "androidx.annotation:annotation:1.2.0"
implementation "androidx.vectordrawable:vectordrawable-animated:1.1.0"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "com.google.android.material:material:1.2.1"
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.core:core:1.3.1"
implementation "androidx.constraintlayout:constraintlayout:2.0.1"
implementation "androidx.fragment:fragment:1.2.5"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "com.google.android.material:material:1.4.0"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'androidx.core:core-ktx:1.7.0-alpha01'
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
implementation "androidx.fragment:fragment-ktx:1.3.6"
implementation "androidx.drawerlayout:drawerlayout:1.1.1"

// html parsing for reading mode
Expand All @@ -130,13 +126,13 @@ dependencies {
kapt "com.anthonycr.mezzanine:mezzanine-compiler:$mezzanineVersion"

// dependency injection
final def daggerVersion = '2.29'
final def daggerVersion = '2.38'
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
compileOnly 'javax.annotation:jsr250-api:1.0'

// view binding
final def butterKnifeVersion = '10.2.1'
final def butterKnifeVersion = '10.2.3'
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

Expand All @@ -151,7 +147,7 @@ dependencies {

// rx
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'

// tor proxy
Expand All @@ -168,7 +164,6 @@ dependencies {

// kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.5.0-alpha02'
}

kapt {
Expand Down
8 changes: 3 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
android:value="2.1"/>

<activity
android:name=".MainActivity"
android:name="acr.browser.lightning.DefaultBrowserActivity"
android:alwaysRetainTaskState="true"
android:clearTaskOnLaunch="false"
android:colorMode="wideColorGamut"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/Theme.LightTheme"
android:windowSoftInputMode="stateHidden|adjustResize">
Expand Down Expand Up @@ -139,14 +138,13 @@
</intent-filter>
</activity>
<activity
android:name=".IncognitoActivity"
android:name="acr.browser.lightning.IncognitoBrowserActivity"
android:alwaysRetainTaskState="true"
android:colorMode="wideColorGamut"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:process=":incognito"
android:parentActivityName=".MainActivity"
android:parentActivityName="acr.browser.lightning.DefaultBrowserActivity"
android:theme="@style/Theme.DarkTheme"
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
Expand Down
25 changes: 15 additions & 10 deletions app/src/main/html/bookmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@
</title>
</head>
<style>
:root {
--body-bg: {COLOR}
--box-bg: {COLOR}
--box-txt: {COLOR}
}

body {
background: #E5E5E5;
background: var(--body-bg);
padding-top: 5px;
max-width: 100%;
min-height: 100%
}

#content {
width: 100%;
max-width: 800px;
Expand All @@ -34,16 +40,13 @@
width: 145px;
margin: 6px;
padding: 4px;
background-color: #fff;
border: 1px solid #d2d2d2;
border-top-width: 0;
border-bottom-width: 2px;
background-color: var(--box-bg);
font-family: Arial;
color: #444;
color: var(--box-txt);
font-size: 12px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px
}

.box-content {
Expand Down Expand Up @@ -86,6 +89,8 @@
.margin {
margin: 10px
}


</style>

<body>
Expand Down
87 changes: 40 additions & 47 deletions app/src/main/html/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta content="en-us" http-equiv="Content-Language"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>${TITLE}</title>
</head>
<style>
:root {
--body-bg: {COLOR}
--box-bg: {COLOR}
--box-txt: {COLOR}
}

body {
background: #f5f5f5;
background: var(--body-bg);
text-align: center;
margin: 0px;
}

input {
color: var(--box-txt);
}

#search_input {
height: 35px;
Expand All @@ -34,23 +45,22 @@
display: table;
vertical-align: middle;
width: 90%;
height: 35px;
height: 40px;
max-width: 500px;
margin: 0 auto;
background-color: #fff;
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.25);
background-color: var(--box-bg);
font-family: Arial;
color: #444;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
color: var(--box-txt);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}

#search_submit {
outline: none;
height: 37px;
float: right;
color: #404040;
color: var(--box-txt);
font-size: 16px;
font-weight: bold;
border: none;
Expand Down Expand Up @@ -80,55 +90,38 @@
width: 50%;
max-width: 300px;
}

.box {
vertical-align: middle;
position: relative;
display: block;
margin: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
background-color: #fff;
box-shadow: 0px 3px rgba(0, 0, 0, 0.1);
font-family: Arial;
color: #444;
font-size: 12px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
}


</style>

<body>
<div class="outer">
<div class="middle">
<div class="inner">
<img id="image_url" class="smaller" src="${IMAGE}">
</br>
</br>
<form onsubmit="return search()" class="search_bar" autocomplete="off">
<input type="submit" id="search_submit" value="Search">
<span>
<input class="search" type="text" value="" id="search_input" />
<div class="outer">
<div class="middle">
<div class="inner">
<img id="image_url" class="smaller" src="${IMAGE}">
</br>
</br>
<form onsubmit="return search()" class="search_bar" autocomplete="off">
<input type="submit" id="search_submit" value="Search">
<span>
<input class="search" type="text" value="" id="search_input"/>
</span>
</form>
</br>
</br>
</div>
</form>
</br>
</br>
</div>
</div>
<script type="text/javascript">
</div>
<script type="text/javascript">
function search() {
if (document.getElementById("search_input").value != "") {
window.location.href = "${BASE_URL}" + document.getElementById("search_input").value;
document.getElementById("search_input").value = "";
}
return false;
}
</script>

</script>
</body>

</html>
Loading