Iterating an array by a GList is considerably faster than
continuously retrieving items, however it is also a lot
more complicated. So the new macro takes care of that and
uses a new semi-private function to avoid copying the list.
Note that the macro can't be nested, which basically isn't
useful in practise anyway.
If Midori is compiled with full debug mode, and the environment
variable MIDORI_ADBLOCK is set, Adblock will output a lot of
debugging information.
This spares testers from editing code. grep is recommended.
We mark URIs as 'disabled' by replacing the : with a -. This
fails if there is an https:// URI and we want to restore it.
For clarity, the macros ADBLOCK_FILTER_SET and
ADBLOCK_FILTER_IS_SET are introduced to handle the details.
1. Less hungry and simpler blocked element hider
2. We are now also adding a context menuitem for uris in
preparation for creating rules from the web inspector
3. Removed old hack for blocked element hider
4. Element hider javascript fixes
5. Unit test for small sized rules
6. Removed unneeded WebKitWebView casts
1. Blacklist for pattern matching. 1 regexp has more than 1
signature. If the 1st match failed, there is no need to
match with the same regex a second time if the signature matched.
This gives us 20% speedup.
2. Cleanup for performance tests.
3. Tests reorganized. now we are checking pattern validation
plus performance timing. Simlifies testing.
4. Bump version to 0.5. The next patch will add option matching
so we will bump it to 1.0 once it is tested.
It is enough to see if g_fopen fails, thus we don't need g_access
to test file existence additionally.
katze_mkdir_with_parents is optimized for existing folders.
We need to check the status, to see if file downloads are finished.
For Windows, we need to use g_strndup instead of strndup.
The style is only added once. Match checks are simpler so they can
be a lot faster. And slow pattern matching is optional, albeit
it currently is hardcoded in the source.
element hiding is supported. And instead of creating a javascript
function for each rule, we generate one script for everything.
On my machine only 650 out of 4500 rules are skipped.