This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge latest Servo-related changes (#927)
* Only show servo button for few websites (#632) * Make it obvious to which engine we're switching to (#659) * Less naive engine switch mechanism (#674) * Servo update * GeckoView API udpate * Servo version update
- Loading branch information
1 parent
a7a3472
commit ad0b9a1
Showing
13 changed files
with
135 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<vector android:height="24dp" android:viewportHeight="200.0" | ||
android:viewportWidth="200.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FFFFFFFF" android:pathData="M 142.905 94.201 C 145.538 94.201 147.722 95.068 149.455 96.801 C 151.188 98.541 152.055 100.784 152.055 103.531 L 152.055 146.411 C 152.055 149.278 151.098 151.491 149.185 153.051 C 136.632 163.451 121.982 168.651 105.235 168.651 C 92.435 168.651 80.745 165.484 70.165 159.151 C 59.578 152.811 51.235 144.138 45.135 133.131 C 39.035 122.131 35.985 109.991 35.985 96.711 C 35.985 83.558 39.035 71.511 45.135 60.571 C 51.235 49.624 59.578 40.951 70.165 34.551 C 80.745 28.151 92.435 24.951 105.235 24.951 C 114.322 24.951 122.185 26.148 128.825 28.541 C 135.465 30.934 142.192 34.881 149.005 40.381 C 150.445 41.461 151.402 42.568 151.875 43.701 C 152.355 44.841 152.595 46.188 152.595 47.741 C 152.595 50.134 151.728 52.108 149.995 53.661 C 148.262 55.214 146.198 55.991 143.805 55.991 C 141.652 55.991 139.618 55.214 137.705 53.661 C 132.805 49.474 128.022 46.454 123.355 44.601 C 118.688 42.748 112.648 41.821 105.235 41.821 C 95.908 41.821 87.328 44.271 79.495 49.171 C 71.662 54.078 65.442 60.748 60.835 69.181 C 56.228 77.608 53.925 86.784 53.925 96.711 C 53.925 106.758 56.228 115.968 60.835 124.341 C 65.442 132.714 71.662 139.354 79.495 144.261 C 87.328 149.161 95.908 151.611 105.235 151.611 C 115.282 151.611 124.908 148.621 134.115 142.641 L 134.115 110.711 L 109.365 110.711 C 106.612 110.711 104.368 109.934 102.635 108.381 C 100.902 106.821 100.035 104.848 100.035 102.461 C 100.035 100.068 100.902 98.094 102.635 96.541 C 104.368 94.981 106.612 94.201 109.365 94.201 L 142.905 94.201 Z"/> | ||
</vector> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<vector android:height="20dp" android:viewportHeight="200.0" | ||
android:viewportWidth="200.0" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FFFFFFFF" android:pathData="M 97.42 26.252 C 107.707 26.252 116.38 28.345 123.44 32.532 C 130.493 36.719 136.473 42.699 141.38 50.472 C 142.813 52.745 143.53 54.899 143.53 56.932 C 143.53 59.565 142.333 61.719 139.94 63.392 C 138.627 64.232 137.073 64.652 135.28 64.652 C 133.487 64.652 131.81 64.202 130.25 63.302 C 128.697 62.402 127.503 61.175 126.67 59.622 C 123.437 54.242 119.4 50.145 114.56 47.332 C 109.713 44.525 103.583 43.122 96.17 43.122 C 87.077 43.122 79.72 44.885 74.1 48.412 C 68.48 51.939 65.67 57.052 65.67 63.752 C 65.67 69.972 68.18 75.175 73.2 79.362 C 78.227 83.549 87.197 86.299 100.11 87.612 C 114.463 89.045 125.587 93.382 133.48 100.622 C 141.373 107.855 145.32 117.392 145.32 129.232 C 145.32 137.845 142.99 145.232 138.33 151.392 C 133.663 157.545 127.473 162.149 119.76 165.202 C 112.047 168.249 103.763 169.772 94.91 169.772 C 83.31 169.772 72.757 167.142 63.25 161.882 C 53.737 156.622 47.187 149.745 43.6 141.252 C 43.007 139.819 42.71 138.622 42.71 137.662 C 42.71 135.869 43.367 134.285 44.68 132.912 C 45.993 131.532 47.787 130.605 50.06 130.132 C 50.42 130.012 51.02 129.952 51.86 129.952 C 53.773 129.952 55.597 130.519 57.33 131.652 C 59.063 132.792 60.347 134.319 61.18 136.232 C 63.333 140.892 67.58 144.839 73.92 148.072 C 80.26 151.299 87.257 152.912 94.91 152.912 C 103.883 152.912 111.48 150.849 117.7 146.722 C 123.913 142.595 127.02 136.945 127.02 129.772 C 127.02 122.952 124.39 117.122 119.13 112.282 C 113.87 107.435 105.857 104.475 95.09 103.402 C 80.263 101.962 68.603 97.625 60.11 90.392 C 51.617 83.159 47.37 74.099 47.37 63.212 C 47.37 55.559 49.553 48.952 53.92 43.392 C 58.287 37.825 64.267 33.579 71.86 30.652 C 79.453 27.719 87.973 26.252 97.42 26.252 Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.mozilla.servo; | ||
|
||
import android.content.Context; | ||
import android.content.res.Resources; | ||
import android.util.Log; | ||
|
||
import java.util.Arrays; | ||
import java.util.regex.Pattern; | ||
import java.util.stream.Stream; | ||
|
||
public class ServoWhiteList { | ||
private final Pattern[] mRules; | ||
|
||
public ServoWhiteList(Context context) { | ||
Resources res = context.getResources(); | ||
Stream<String> rules = Stream.of(res.getStringArray(R.array.servo_white_list)); | ||
mRules = rules.map(Pattern::compile).toArray(Pattern[]::new); | ||
} | ||
|
||
public boolean isAllowed(String url) { | ||
return url != null && Stream.of(mRules).anyMatch(r -> r.matcher(url).matches()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string-array name="servo_white_list"> | ||
<!-- | ||
Matches: | ||
https://servo.org | ||
https://download.servo.org | ||
https://download.servo.org | ||
https://servo.org/ | ||
https://servo.org/ddd | ||
Doesn't match: | ||
https://.servo.org/ddd | ||
https://servo.orgd | ||
http://servo.org | ||
--> | ||
<item>https:\/\/(.+\.)?servo\.org(\/.*)?$</item> | ||
<!-- All examples hosted under threejs.org/examples/ --> | ||
<item>https:\/\/threejs\.org\/examples\/.*</item> | ||
</string-array> | ||
</resources> |