fune/testing/web-platform/tests/editing/crashtests/designMode-on-of-lazy-loading-iframe.html
Masayuki Nakano 85697ec93c Bug 1870960 - Make IMEStateManager stop using nsPresContext::GetTextInputHandlingWidget() as far as possible r=smaug
If given `nsPresContext` is for a lazy loading `<iframe>` and the frame has not
been loaded yet, its `GetTextInputHandlingWidget()` may return `nullptr`.
However, `IMEStateManager::sTextInputHandlingWidget` may have already cache it.
Therefore, `IMEStateManager` should use:
* `sTextInputHandlingWidget` if it's available
* otherwise, `nsPresContext::GetTextInputHandlingWidget()`

Differential Revision: https://phabricator.services.mozilla.com/D197991
2024-01-16 00:09:35 +00:00

20 lines
375 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
*::first-letter {}
</style>
<script>
addEventListener("load", () => {
const iframe = document.querySelector("iframe");
iframe.contentWindow.focus();
document.styleSheets[0].deleteRule(0);
iframe.contentWindow.document.designMode = "on";
});
</script>
</head>
<body>
<iframe loading="lazy">
</body>
</html>