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

Delta Between Two Patch Sets: compiled/CSSPropertyFilter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Left Patch Set: Replaced old filter classes unit tests completely Created Feb. 18, 2016, 4:40 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/BlockingFilter.cpp ('k') | compiled/CSSPropertyFilter.cpp » ('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 #pragma once 1 #pragma once
2 2
3 #include <cstddef> 3 #include <cstddef>
4 4
5 #include "Filter.h" 5 #include "Filter.h"
6 #include "ElemHideBase.h" 6 #include "ElemHideBase.h"
7 7
8 struct CSSPropertyFilterData 8 struct CSSPropertyFilterData
9 { 9 {
10 String::size_type mPrefixEnd; 10 String::size_type mPrefixEnd;
(...skipping 15 matching lines...) Expand all
26 const DependentString GetSelectorSuffix(const String& text) const 26 const DependentString GetSelectorSuffix(const String& text) const
27 { 27 {
28 return DependentString(text, mSuffixStart); 28 return DependentString(text, mSuffixStart);
29 } 29 }
30 }; 30 };
31 31
32 struct ElemHideData : ElemHideBaseData, CSSPropertyFilterData 32 struct ElemHideData : ElemHideBaseData, CSSPropertyFilterData
33 { 33 {
34 }; 34 };
35 35
36 class CSSPropertyFilter: public ElemHideBase, protected CSSPropertyFilterData 36 class CSSPropertyFilter: public ElemHideBase
37 { 37 {
38 protected:
39 CSSPropertyFilterData mPropertyData;
38 public: 40 public:
39 CSSPropertyFilter(const String& text, const ElemHideData& data); 41 explicit CSSPropertyFilter(const String& text, const ElemHideData& data);
40 Type GetType() const override;
41 EMSCRIPTEN_KEEPALIVE OwnedString GetRegExpString() const; 42 EMSCRIPTEN_KEEPALIVE OwnedString GetRegExpString() const;
42 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorPrefix() const 43 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorPrefix() const
43 { 44 {
44 return CSSPropertyFilterData::GetSelectorPrefix(mText, mSelectorStart); 45 return mPropertyData.GetSelectorPrefix(mText, mData.mSelectorStart);
45 } 46 }
46 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorSuffix() const 47 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorSuffix() const
47 { 48 {
48 return CSSPropertyFilterData::GetSelectorSuffix(mText); 49 return mPropertyData.GetSelectorSuffix(mText);
49 } 50 }
50 }; 51 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld