Skip to content

Commit 3b650f2

Browse files
authored
Remove unused TreeBuilder option. Document scripting_enabled and iframe_srcdoc options (#631)
* Remove unused ignore_missing_rules TreeBuilder option Signed-off-by: Nico Burns <[email protected]> * Document scripting_enabled option Signed-off-by: Nico Burns <[email protected]> * Document iframe_srcdoc option Signed-off-by: Nico Burns <[email protected]> --------- Signed-off-by: Nico Burns <[email protected]>
1 parent 50e5d4c commit 3b650f2

File tree

1 file changed

+8
-6
lines changed
  • html5ever/src/tree_builder

1 file changed

+8
-6
lines changed

html5ever/src/tree_builder/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,24 @@ mod types;
4646
#[derive(Copy, Clone)]
4747
pub struct TreeBuilderOpts {
4848
/// Report all parse errors described in the spec, at some
49-
/// performance penalty? Default: false
49+
/// performance penalty? Default: false
5050
pub exact_errors: bool,
5151

5252
/// Is scripting enabled?
53+
///
54+
/// This affects how `<noscript>` elements are parsed:
55+
/// - If scripting **is** enabled then the contents of a `<noscript>` element are parsed as a single text node
56+
/// - If scriping is **not** enabled then the contents of a `<noscript>` element are parsed as a normal tree of nodes
5357
pub scripting_enabled: bool,
5458

55-
/// Is this an `iframe srcdoc` document?
59+
/// Is this document being parsed from the `srcdoc` attribute of an `<iframe>` element?
60+
///
61+
/// This affects heuristics that infer `QuirksMode` from `<!DOCTYPE>`.
5662
pub iframe_srcdoc: bool,
5763

5864
/// Should we drop the DOCTYPE (if any) from the tree?
5965
pub drop_doctype: bool,
6066

61-
/// Obsolete, ignored.
62-
pub ignore_missing_rules: bool,
63-
6467
/// Initial TreeBuilder quirks mode. Default: NoQuirks
6568
pub quirks_mode: QuirksMode,
6669
}
@@ -72,7 +75,6 @@ impl Default for TreeBuilderOpts {
7275
scripting_enabled: true,
7376
iframe_srcdoc: false,
7477
drop_doctype: false,
75-
ignore_missing_rules: false,
7678
quirks_mode: NoQuirks,
7779
}
7880
}

0 commit comments

Comments
 (0)