Closed Bug 559319 Opened 15 years ago Closed 7 years ago

[HTML5] Can we avoid calling CanExecuteScripts during every fragment parsing?

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Unassigned)

References

(Blocks 1 open bug)

Details

Fragment parsing is used for example when .innerHTML is set. Of SetInnerHTML call CanExecuteScripts takes almost 6% when the parsed string is just simple text. Bug 517375 is similar bug for event handling. Perhaps the best would be to make CanExecuteScripts fast, if possible.
Priority: -- → P3
If we reduce the number of insane ways script can be disabled, then yes...
In most cases currently, we could optimize by making the fragment algorithm always assume scripts are enabled. However, with the iframe sandboxing features, I think scripts in Web content can set innerHTML on a document that itself has scripting disabled. OTOH, I'm not sure how much value is provided by supporting fragment parsing with the scripting disabled behavior as opposed to making fragment parsing always run the parsing algorithm in the scripting enabled mode. The scripts don't run anyway. It's only about how <noscript> gets treated.
> However, with the iframe sandboxing features Or with designmode, with chrome, etc. > It's only about how <noscript> gets treated. I would be interested in a spec change to fragment parsing, if current spec requires something interesting for <noscript>....
Blocks: 56596
Blocks: 565186
This was fixed sometime before January 20 2012.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.