mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
script: servoparser line number pass to CSP (#40597)
takes over the initial work from @zazabap in PR #38675 (Thanks @zazabap!) Testing: `./mach test-wpt content-security-policy/securitypolicyviolation/blockeduri-inline.html` `./mach test-wpt /css/CSS2/abspos/abspos-containing-block-initial-001.xht` Fixes #38167 Closes #38675 Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com> Co-authored-by: zazabap <sweynan@icloud.com>
This commit is contained in:
@@ -2500,6 +2500,12 @@ impl Document {
|
||||
self.current_parser.get()
|
||||
}
|
||||
|
||||
pub(crate) fn get_current_parser_line(&self) -> u32 {
|
||||
self.get_current_parser()
|
||||
.map(|parser| parser.get_current_line())
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
/// A reference to the [`IFrameCollection`] of this [`Document`], holding information about
|
||||
/// `<iframe>`s found within it.
|
||||
pub(crate) fn iframes(&self) -> Ref<'_, IFrameCollection> {
|
||||
|
||||
Reference in New Issue
Block a user