OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 23 matching lines...) Expand all Loading... |
34 { | 34 { |
35 mFilters.clear(); | 35 mFilters.clear(); |
36 } | 36 } |
37 | 37 |
38 ElemHideEmulation_FilterList* ElemHideEmulation::GetRulesForDomain(const ElemHid
e& elemHide, DependentString& domain) | 38 ElemHideEmulation_FilterList* ElemHideEmulation::GetRulesForDomain(const ElemHid
e& elemHide, DependentString& domain) |
39 { | 39 { |
40 intrusive_ptr<ElemHideEmulation_FilterList> result(new ElemHideEmulation_Filte
rList()); | 40 intrusive_ptr<ElemHideEmulation_FilterList> result(new ElemHideEmulation_Filte
rList()); |
41 for (const auto& entry: mFilters) | 41 for (const auto& entry: mFilters) |
42 { | 42 { |
43 DependentString docDomain(domain); | 43 DependentString docDomain(domain); |
44 if (!(entry.is_deleted() || entry.is_invalid()) && | 44 if (entry.second->IsActiveOnDomain(docDomain) && |
45 entry.second->IsActiveOnDomain(docDomain) && | |
46 !elemHide.GetException(*entry.second, domain)) | 45 !elemHide.GetException(*entry.second, domain)) |
47 result->push_back(entry.second); | 46 result->push_back(entry.second); |
48 } | 47 } |
49 | 48 |
50 return result.release(); | 49 return result.release(); |
51 } | 50 } |
OLD | NEW |