Skip to content

Commit c4d78c1

Browse files
Googleramaltas
authored andcommitted
Internal Code Change
PiperOrigin-RevId: 540325424
1 parent 6a610ba commit c4d78c1

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

validator/cpp/engine/validator-internal.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ class ParsedAttrSpec {
595595
return value_property_by_name_;
596596
}
597597

598-
const unordered_map<std::string, const CssDeclaration*>&
598+
const absl::flat_hash_map<std::string, const CssDeclaration*>&
599599
css_declaration_by_name() const {
600600
return css_declaration_by_name_;
601601
}
@@ -620,7 +620,8 @@ class ParsedAttrSpec {
620620
// Name lookup for spec().value_properties().properties().
621621
unordered_map<std::string, const PropertySpec*> value_property_by_name_;
622622
// Name lookup for spec().css_declaration().
623-
unordered_map<std::string, const CssDeclaration*> css_declaration_by_name_;
623+
absl::flat_hash_map<std::string, const CssDeclaration*>
624+
css_declaration_by_name_;
624625
// The mandatory spec().value_properties().properties().
625626
vector<const PropertySpec*> mandatory_value_properties_;
626627
vector<TypeIdentifier> disabled_by_;
@@ -4323,7 +4324,7 @@ void ValidateAttrDeclaration(const ParsedAttrSpec& parsed_attr_spec,
43234324
// If there were errors parsing, exit from validating further.
43244325
if (!css_errors.empty()) return;
43254326

4326-
const unordered_map<std::string, const CssDeclaration*>&
4327+
const absl::flat_hash_map<std::string, const CssDeclaration*>&
43274328
css_declaration_by_name = parsed_attr_spec.css_declaration_by_name();
43284329

43294330
for (auto& declaration : declarations) {

validator/cpp/htmlparser/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This is an HTML5 compliant parser written in C++.
44

5+
## Maintainers
6+
7+
This parser is maintained by [Amaltas Bohra](http://who/amaltas) and [Erwin Mombay](http://who/erwinm)
8+
9+
## Current Status
10+
11+
This parser is stable and is being used by several projects at Google.
12+
513
## Building and Testing with Bazel
614

715
This code requires C++17. When building with [Bazel](https://bazel.build/)

0 commit comments

Comments
 (0)