Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
Rekonq
Commits
1dd5716b
Commit
1dd5716b
authored
Feb 10, 2012
by
Andrea Diamantini
Browse files
Consider option && ~option as null rules when option is not implemented
BUG: 246801
parent
f5c45173
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/adblock/adblockmanager.cpp
View file @
1dd5716b
...
...
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
* Copyright (C) 2010-201
1
by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2010-201
2
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockmanager.h
View file @
1dd5716b
...
...
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
* Copyright (C) 2010-201
1
by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2010-201
2
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockrule.cpp
View file @
1dd5716b
...
...
@@ -4,7 +4,7 @@
*
* Copyright (c) 2009 by Zsombor Gegesy <gzsombor@gmail.com>
* Copyright (c) 2009 by Benjamin C. Meyer <ben@meyerhome.net>
* Copyright (C) 2010-201
1
by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2010-201
2
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockrule.h
View file @
1dd5716b
...
...
@@ -2,7 +2,7 @@
* This file is a part of the rekonq project
*
* Copyright (c) 2009 by Benjamin C. Meyer <ben@meyerhome.net>
* Copyright (C) 2010-201
1
by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2010-201
2
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockrulefallbackimpl.cpp
View file @
1dd5716b
...
...
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Benjamin Poulain <ikipou at gmail dot com>
* Copyright (C) 2011-2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockrulefallbackimpl.h
View file @
1dd5716b
...
...
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Benjamin Poulain <ikipou at gmail dot com>
* Copyright (C) 2011-2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
src/adblock/adblockrulenullimpl.cpp
View file @
1dd5716b
...
...
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
* Copyright (C) 2011 by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2011
-2012
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
@@ -58,64 +58,68 @@ bool AdBlockRuleNullImpl::isNullFilter(const QString &filter)
Q_FOREACH
(
const
QString
&
option
,
options
)
{
// NOTE:
// I moved the check from option == QL1S to option.endsWith()
// to check option && ~option. Hope it will NOT be a problem...
// third_party: managed inside adblockrulefallbackimpl
if
(
option
==
QL1S
(
"third-party"
))
if
(
option
.
endsWith
(
QL1S
(
"third-party"
))
)
return
false
;
// script
if
(
option
==
QL1S
(
"script"
))
if
(
option
.
endsWith
(
QL1S
(
"script"
))
)
return
true
;
// image
if
(
option
==
QL1S
(
"image"
))
if
(
option
.
endsWith
(
QL1S
(
"image"
))
)
return
true
;
// background
if
(
option
==
QL1S
(
"background"
))
if
(
option
.
endsWith
(
QL1S
(
"background"
))
)
return
true
;
// stylesheet
if
(
option
==
QL1S
(
"stylesheet"
))
if
(
option
.
endsWith
(
QL1S
(
"stylesheet"
))
)
return
true
;
// object
if
(
option
==
QL1S
(
"object"
))
if
(
option
.
endsWith
(
QL1S
(
"object"
))
)
return
true
;
// xbl
if
(
option
==
QL1S
(
"xbl"
))
if
(
option
.
endsWith
(
QL1S
(
"xbl"
))
)
return
true
;
// ping
if
(
option
==
QL1S
(
"ping"
))
if
(
option
.
endsWith
(
QL1S
(
"ping"
))
)
return
true
;
// xmlhttprequest
if
(
option
==
QL1S
(
"xmlhttprequest"
))
if
(
option
.
endsWith
(
QL1S
(
"xmlhttprequest"
))
)
return
true
;
// object_subrequest
if
(
option
==
QL1S
(
"object-subrequest"
))
if
(
option
.
endsWith
(
QL1S
(
"object-subrequest"
))
)
return
true
;
// dtd
if
(
option
==
QL1S
(
"dtd"
))
if
(
option
.
endsWith
(
QL1S
(
"dtd"
))
)
return
true
;
// subdocument
if
(
option
==
QL1S
(
"subdocument"
))
if
(
option
.
endsWith
(
QL1S
(
"subdocument"
))
)
return
true
;
// document
if
(
option
==
QL1S
(
"document"
))
if
(
option
.
endsWith
(
QL1S
(
"document"
))
)
return
true
;
// other
if
(
option
==
QL1S
(
"other"
))
if
(
option
.
endsWith
(
QL1S
(
"other"
))
)
return
true
;
// collapse
if
(
option
==
QL1S
(
"collapse"
))
if
(
option
.
endsWith
(
QL1S
(
"collapse"
))
)
return
true
;
}
...
...
src/adblock/adblockrulenullimpl.h
View file @
1dd5716b
...
...
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
* Copyright (C) 2011 by Andrea Diamantini <adjam7 at gmail dot com>
* Copyright (C) 2011
-2012
by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment