Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/plugin/PluginFilter.cpp

Issue 29331055: Issue #1234 - Remove 'CString' from PluginFilter.* (Closed)
Left Patch Set: remove TokenSequence Created Feb. 4, 2016, 7:48 p.m.
Right Patch Set: fix whitespace nit Created May 17, 2016, 6:40 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginFilter.h ('k') | src/shared/Utils.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
sergei 2016/05/02 14:33:48 Redundant space is added to the end of the line.
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
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
LEFTRIGHT

Powered by Google App Engine
This is Rietveld