richard pushed to branch base-browser-115.0esrbase-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
53c25feb by cypherpunks1 at 2023-07-12T22:21:16+00:00
Bug 33955: When copying an image only copy the image contents to the clipboard
- - - - -
2 changed files:
- browser/base/content/browser-context.inc
- dom/base/nsCopySupport.cpp
Changes:
=====================================
browser/base/content/browser-context.inc
=====================================
@@ -219,7 +219,7 @@
#ifdef CONTEXT_COPY_IMAGE_CONTENTS
<menuitem id="context-copyimage-contents"
data-l10n-id="main-context-menu-image-copy"
- oncommand="goDoCommand('cmd_copyImage');"/>
+ oncommand="goDoCommand('cmd_copyImageContents');"/>
#endif
<menuitem id="context-copyimage"
data-l10n-id="main-context-menu-image-copy-link"
=====================================
dom/base/nsCopySupport.cpp
=====================================
@@ -503,7 +503,7 @@ nsresult nsCopySupport::ImageCopy(nsIImageLoadingContent* aImageElement,
trans->SetReferrerInfo(referrerInfo);
}
-#ifdef XP_WIN
+#if defined(XP_WIN) && !defined(BASE_BROWSER_VERSION)
rv = AppendImagePromise(trans, imgRequest, aImageElement);
NS_ENSURE_SUCCESS(rv, rv);
#endif
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/53c25fe…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/53c25fe…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch tor-browser-115.0esrbase-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
1fde2e0f by cypherpunks1 at 2023-07-12T22:20:31+00:00
Bug 33955: When copying an image only copy the image contents to the clipboard
- - - - -
2 changed files:
- browser/base/content/browser-context.inc
- dom/base/nsCopySupport.cpp
Changes:
=====================================
browser/base/content/browser-context.inc
=====================================
@@ -219,7 +219,7 @@
#ifdef CONTEXT_COPY_IMAGE_CONTENTS
<menuitem id="context-copyimage-contents"
data-l10n-id="main-context-menu-image-copy"
- oncommand="goDoCommand('cmd_copyImage');"/>
+ oncommand="goDoCommand('cmd_copyImageContents');"/>
#endif
<menuitem id="context-copyimage"
data-l10n-id="main-context-menu-image-copy-link"
=====================================
dom/base/nsCopySupport.cpp
=====================================
@@ -503,7 +503,7 @@ nsresult nsCopySupport::ImageCopy(nsIImageLoadingContent* aImageElement,
trans->SetReferrerInfo(referrerInfo);
}
-#ifdef XP_WIN
+#if defined(XP_WIN) && !defined(BASE_BROWSER_VERSION)
rv = AppendImagePromise(trans, imgRequest, aImageElement);
NS_ENSURE_SUCCESS(rv, rv);
#endif
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1fde2e0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1fde2e0…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch base-browser-115.0esrbase-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
6c9e419d by cypherpunks1 at 2023-07-12T14:29:21+00:00
Bug 41791: Omit the source URL when copying page contents to the clipboard
- - - - -
2 changed files:
- dom/base/nsCopySupport.cpp
- widget/windows/nsDataObj.cpp
Changes:
=====================================
dom/base/nsCopySupport.cpp
=====================================
@@ -284,6 +284,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) {
@@ -304,6 +305,7 @@ static nsresult CreateTransferable(
NS_ENSURE_SUCCESS(rv, rv);
}
}
+#endif
} else {
if (!aEncodedDocumentWithContext.mSerializationForTextUnicode.IsEmpty()) {
// Add the unicode DataFlavor to the transferable
=====================================
widget/windows/nsDataObj.cpp
=====================================
@@ -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\nStartHTML:"_ns;
constexpr auto kEndHTMLPrefix = "\r\nEndHTML:"_ns;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6c9e419…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/6c9e419…
You're receiving this email because of your account on gitlab.torproject.org.
richard pushed to branch tor-browser-115.0esrbase-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
5b4fa6e2 by cypherpunks1 at 2023-07-12T14:27:48+00:00
Bug 41791: Omit the source URL when copying page contents to the clipboard
- - - - -
2 changed files:
- dom/base/nsCopySupport.cpp
- widget/windows/nsDataObj.cpp
Changes:
=====================================
dom/base/nsCopySupport.cpp
=====================================
@@ -284,6 +284,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) {
@@ -304,6 +305,7 @@ static nsresult CreateTransferable(
NS_ENSURE_SUCCESS(rv, rv);
}
}
+#endif
} else {
if (!aEncodedDocumentWithContext.mSerializationForTextUnicode.IsEmpty()) {
// Add the unicode DataFlavor to the transferable
=====================================
widget/windows/nsDataObj.cpp
=====================================
@@ -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\nStartHTML:"_ns;
constexpr auto kEndHTMLPrefix = "\r\nEndHTML:"_ns;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5b4fa6e…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5b4fa6e…
You're receiving this email because of your account on gitlab.torproject.org.