diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2016-06-03 02:41:21 -0700 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2016-07-07 08:41:35 +0000 |
commit | 9bb9076c50048913075f11692f784ebb959d63cf (patch) | |
tree | 4a27e9eb3c7bd767963505f14ac0c703c811338c /src/core/common | |
parent | 800365f6faad962a4dd2e71173527d285a3f62b5 (diff) |
Parse metadata block in user scripts
This allows WebEngine to build up user script objects from the
metadata section of their source code. It also implements @include,
@exclude and @match rules for restricting script injection to given
URL patterns.
Change-Id: Ic7b3023c0143643bfbf71adbfa25a8022b223fcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/common')
-rw-r--r-- | src/core/common/qt_messages.h | 3 | ||||
-rw-r--r-- | src/core/common/user_script_data.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/common/qt_messages.h b/src/core/common/qt_messages.h index b8991a2b3..2c971aab2 100644 --- a/src/core/common/qt_messages.h +++ b/src/core/common/qt_messages.h @@ -16,6 +16,9 @@ IPC_STRUCT_TRAITS_BEGIN(UserScriptData) IPC_STRUCT_TRAITS_MEMBER(injectForSubframes) IPC_STRUCT_TRAITS_MEMBER(worldId) IPC_STRUCT_TRAITS_MEMBER(scriptId) + IPC_STRUCT_TRAITS_MEMBER(globs) + IPC_STRUCT_TRAITS_MEMBER(excludeGlobs) + IPC_STRUCT_TRAITS_MEMBER(urlPatterns) IPC_STRUCT_TRAITS_END() diff --git a/src/core/common/user_script_data.h b/src/core/common/user_script_data.h index 943d61798..8d98890e3 100644 --- a/src/core/common/user_script_data.h +++ b/src/core/common/user_script_data.h @@ -60,6 +60,9 @@ struct UserScriptData { bool injectForSubframes; uint worldId; uint64_t scriptId; + std::vector<std::string> globs; + std::vector<std::string> excludeGlobs; + std::vector<std::string> urlPatterns; }; QT_BEGIN_NAMESPACE |