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

Unified Diff: chrome/content/ui/composer.js

Issue 29321478: Issue 2738 - Make RegExpFilter.matches() take a bit mask instead of content type string (Closed)
Patch Set: Created July 9, 2015, 1:45 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.js » ('j') | lib/contentPolicy.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/composer.js
diff --git a/chrome/content/ui/composer.js b/chrome/content/ui/composer.js
index d4e1f1633894671f562b4945e8d2243680c2f8ba..7e212504f2760c05b3a0d7f6ef15be33afc91fe9 100644
--- a/chrome/content/ui/composer.js
+++ b/chrome/content/ui/composer.js
@@ -279,7 +279,7 @@ function updateFilter()
}
E("shortpatternWarning").hidden = !isSlow;
- E("matchWarning").hidden = compiledFilter instanceof RegExpFilter && compiledFilter.matches(item.location, item.typeDescr, item.docDomain, item.thirdParty);
+ E("matchWarning").hidden = compiledFilter instanceof RegExpFilter && compiledFilter.matches(item.location, RegExpFilter.toTypeMask(item.typeDescr), item.docDomain, item.thirdParty);
E("filter").value = filter;
}
@@ -318,7 +318,7 @@ function updatePatternSelection()
function testFilter(/**String*/ filter) /**Boolean*/
{
- return RegExpFilter.fromText(filter + "$" + item.typeDescr).matches(item.location, item.typeDescr, item.docDomain, item.thirdParty);
+ return RegExpFilter.fromText(filter + "$" + item.typeDescr).matches(item.location, RegExpFilter.toTypeMask(item.typeDescr), item.docDomain, item.thirdParty);
}
let anchorStartCheckbox = E("anchorStart");
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.js » ('j') | lib/contentPolicy.js » ('J')

Powered by Google App Engine
This is Rietveld