aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/blockerrule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/blockerrule.h')
-rw-r--r--src/webengine/blockerrule.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/webengine/blockerrule.h b/src/webengine/blockerrule.h
index df09d10..810de6d 100644
--- a/src/webengine/blockerrule.h
+++ b/src/webengine/blockerrule.h
@@ -38,22 +38,22 @@ public:
};
enum RuleOption {
- script = 0,
- image = 1,
- stylesheet = 2,
- object = 4,
- xmlhttprequest = 8,
- objectsubrequest = 16,
- subdocument = 32,
- ping = 64,
- websocket = 128,
- document = 256,
-
- elemhide = 512,
- generichide = 1024,
- genericblock = 2048,
-
- other = 4096
+ script = 1,
+ image = 2,
+ stylesheet = 4,
+ object = 8,
+ xmlhttprequest = 16,
+ objectsubrequest = 32,
+ subdocument = 64,
+ ping = 128,
+ websocket = 256,
+ document = 512,
+
+ elemhide = 1024,
+ generichide = 2048,
+ genericblock = 4096,
+
+ other = 8192
};
Q_DECLARE_FLAGS(RuleOptions, RuleOption)
@@ -72,6 +72,7 @@ public slots:
private:
// TODO: subclass QRegularExpression and move this there
QString fromWildcardMatch(const QString &pattern);
+ bool matchOptions(const QWebEngineUrlRequestInfo &info, const RuleOptions &options);
QString m_rule;