diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /editor/libeditor/HTMLEditor.cpp | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'editor/libeditor/HTMLEditor.cpp')
-rw-r--r-- | editor/libeditor/HTMLEditor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index e9ea8887b7..fc88c79477 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -3773,10 +3773,14 @@ nsresult HTMLEditor::InsertLinkAroundSelectionAsAction( return EditorBase::ToGenericNSResult(rv); } - nsAutoString href; - anchor->GetHref(href); - if (href.IsEmpty()) { - return NS_OK; + // XXX Is this ok? Does this just want to check that we're a link? If so + // there are faster ways to do this. + { + nsAutoCString href; + anchor->GetHref(href); + if (href.IsEmpty()) { + return NS_OK; + } } AutoPlaceholderBatch treatAsOneTransaction( |