Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
02d9798b
Verified
Commit
02d9798b
authored
Jul 3, 2023
by
cypherpunks1
Committed by
Pier Angelo Vendrame
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug 41791: Omit the source URL when copying page contents to the clipboard
parent
2eff1716
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dom/base/nsCopySupport.cpp
+2
-0
2 additions, 0 deletions
dom/base/nsCopySupport.cpp
widget/windows/nsDataObj.cpp
+4
-0
4 additions, 0 deletions
widget/windows/nsDataObj.cpp
with
6 additions
and
0 deletions
dom/base/nsCopySupport.cpp
+
2
−
0
View file @
02d9798b
...
...
@@ -287,6 +287,7 @@ static nsresult CreateTransferable(
NS_ENSURE_SUCCESS
(
rv
,
rv
);
}
#if !defined(BASE_BROWSER_VERSION)
// Try and get source URI of the items that are being dragged
nsIURI
*
uri
=
aDocument
.
GetDocumentURI
();
if
(
uri
)
{
...
...
@@ -307,6 +308,7 @@ static nsresult CreateTransferable(
NS_ENSURE_SUCCESS
(
rv
,
rv
);
}
}
#endif
}
else
{
if
(
!
aEncodedDocumentWithContext
.
mSerializationForTextUnicode
.
IsEmpty
())
{
// Add the unicode DataFlavor to the transferable
...
...
This diff is collapsed.
Click to expand it.
widget/windows/nsDataObj.cpp
+
4
−
0
View file @
02d9798b
...
...
@@ -520,11 +520,13 @@ nsDataObj::nsDataObj(nsIURI* uri)
m_enumFE
=
new
CEnumFormatEtc
();
m_enumFE
->
AddRef
();
#if !defined(BASE_BROWSER_VERSION)
if
(
uri
)
{
// A URI was obtained, so pass this through to the DataObject
// so it can create a SourceURL for CF_HTML flavour
uri
->
GetSpec
(
mSourceURL
);
}
#endif
}
//-----------------------------------------------------
// destruction
...
...
@@ -1978,6 +1980,7 @@ nsresult nsDataObj ::BuildPlatformHTML(const char* inOurHTML,
*
outPlatformHTML
=
nullptr
;
nsDependentCString
inHTMLString
(
inOurHTML
);
#if !defined(BASE_BROWSER_VERSION)
// Do we already have mSourceURL from a drag?
if
(
mSourceURL
.
IsEmpty
())
{
nsAutoString
url
;
...
...
@@ -1985,6 +1988,7 @@ nsresult nsDataObj ::BuildPlatformHTML(const char* inOurHTML,
AppendUTF16toUTF8
(
url
,
mSourceURL
);
}
#endif
constexpr
auto
kStartHTMLPrefix
=
"Version:0.9
\r\n
StartHTML:"
_ns
;
constexpr
auto
kEndHTMLPrefix
=
"
\r\n
EndHTML:"
_ns
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment