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

Delta Between Two Patch Sets: compiled/CSSPropertyFilter.cpp

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Left Patch Set: How with CSS property filters Created Jan. 20, 2016, 1:12 p.m.
Right Patch Set: Addressed comments from Patch Set 28 Created March 21, 2017, 10:04 a.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 | « compiled/CSSPropertyFilter.h ('k') | compiled/CommentFilter.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 #include "CSSPropertyFilter.h" 1 #include "CSSPropertyFilter.h"
2 #include "RegExpFilter.h" 2 #include "RegExpFilter.h"
3 3
4 CSSPropertyFilter::CSSPropertyFilter(const std::u16string& text, 4 CSSPropertyFilter::CSSPropertyFilter(const String& text,
5 const std::u16string& domains, const std::u16string& selector, 5 const ElemHideData& data)
6 const std::u16string& regexpSource, const std::u16string& prefix, 6 : ElemHideBase(Type::CSSPROPERTY, text, data), mPropertyData(data)
7 const std::u16string& suffix)
8 : ElemHideBase(text, domains, selector), prefix(prefix), suffix(suffix),
9 regexp(RegExpFilter::RegExpFromSource(regexpSource))
10 { 7 {
11 if (IsGeneric())
12 throw std::u16string(u"No active domain specified for CSS property filter");
13 } 8 }
14 9
15 Filter::Type CSSPropertyFilter::GetType() const 10 OwnedString CSSPropertyFilter::GetRegExpString() const
16 { 11 {
17 return Type::CSSPROPERTY; 12 return RegExpFilter::RegExpFromSource(mPropertyData.GetRegExpSource(mText));
18 } 13 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld