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: Changed API as discussed and addressed feedback Created July 12, 2015, 1:55 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') | no next file with comments »
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..26e4578d0eef0fd18a74e1da1661039492c4b6d0 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.typeMap[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.typeMap[item.typeDescr], item.docDomain, item.thirdParty);
}
let anchorStartCheckbox = E("anchorStart");
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld