LEFT | RIGHT |
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Any tag | 69 // Any tag |
70 filterSuffix = filterSuffix.substr(1); | 70 filterSuffix = filterSuffix.substr(1); |
71 } | 71 } |
72 else if (firstTag == '[' || firstTag == '.' || firstTag == '#') | 72 else if (firstTag == '[' || firstTag == '.' || firstTag == '#') |
73 { | 73 { |
74 // Any tag (implicitly) | 74 // Any tag (implicitly) |
75 } | 75 } |
76 else if (isalnum(firstTag)) | 76 else if (isalnum(firstTag)) |
77 { | 77 { |
78 // Real tag | 78 // Real tag |
79 //TODO: Add support for descendant selectors | 79 // TODO: Add support for descendant selectors |
80 auto pos = filterSuffix.find_first_of(L".#[("); | 80 auto pos = filterSuffix.find_first_of(L".#[("); |
81 if (pos == std::wstring::npos) | 81 if (pos == std::wstring::npos) |
82 { | 82 { |
83 pos = filterSuffix.length(); | 83 pos = filterSuffix.length(); |
84 } | 84 } |
85 m_tag = ToLowerString(filterSuffix.substr(0, pos)); | 85 m_tag = ToLowerString(filterSuffix.substr(0, pos)); |
86 filterSuffix = filterSuffix.substr(pos); | 86 filterSuffix = filterSuffix.substr(pos); |
87 } | 87 } |
88 else | 88 else |
89 { | 89 { |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 655 |
656 void CPluginFilter::ClearFilters() | 656 void CPluginFilter::ClearFilters() |
657 { | 657 { |
658 // Clear filter maps | 658 // Clear filter maps |
659 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); | 659 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); |
660 m_elementHideTags.clear(); | 660 m_elementHideTags.clear(); |
661 m_elementHideTagsId.clear(); | 661 m_elementHideTagsId.clear(); |
662 m_elementHideTagsClass.clear(); | 662 m_elementHideTagsClass.clear(); |
663 } | 663 } |
664 | 664 |
LEFT | RIGHT |