mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-04 14:27:30 +09:00
parent
7161ba5ce9
commit
d07bf4bba2
13 changed files with 55 additions and 43 deletions
2
CLOBBER
2
CLOBBER
|
|
@ -22,4 +22,4 @@
|
||||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||||
# don't change CLOBBER for WebIDL changes any more.
|
# don't change CLOBBER for WebIDL changes any more.
|
||||||
|
|
||||||
Merge day clobber
|
Clobber for un-folding browsercomps
|
||||||
|
|
@ -12,8 +12,7 @@ SOURCES += [
|
||||||
'nsModule.cpp',
|
'nsModule.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
Library('browsercomps')
|
XPCOMBinaryComponent('browsercomps')
|
||||||
FINAL_LIBRARY = 'xul'
|
|
||||||
|
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
'../about',
|
'../about',
|
||||||
|
|
@ -22,3 +21,22 @@ LOCAL_INCLUDES += [
|
||||||
'../migration',
|
'../migration',
|
||||||
'../shell',
|
'../shell',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
|
OS_LIBS += [
|
||||||
|
'esent',
|
||||||
|
'netapi32',
|
||||||
|
'ole32',
|
||||||
|
'shell32',
|
||||||
|
'shlwapi',
|
||||||
|
'version',
|
||||||
|
]
|
||||||
|
DELAYLOAD_DLLS += [
|
||||||
|
'esent.dll',
|
||||||
|
'netapi32.dll',
|
||||||
|
]
|
||||||
|
|
||||||
|
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
|
||||||
|
# GTK2: Need to link with glib for GNOME shell service
|
||||||
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'gtk2', 'gtk3'):
|
||||||
|
OS_LIBS += CONFIG['TK_LIBS']
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "nsDirectoryServiceUtils.h"
|
#include "nsDirectoryServiceUtils.h"
|
||||||
#include "mozilla/ModuleUtils.h"
|
#include "mozilla/ModuleUtils.h"
|
||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
#include "nsIPrefLocalizedString.h"
|
#include "nsIPrefLocalizedString.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,15 +185,9 @@ IsDocumentElement(const char *start, const char* end)
|
||||||
static bool
|
static bool
|
||||||
ContainsTopLevelSubstring(nsACString& dataString, const char *substring)
|
ContainsTopLevelSubstring(nsACString& dataString, const char *substring)
|
||||||
{
|
{
|
||||||
nsACString::const_iterator start, end;
|
int32_t offset = dataString.Find(substring);
|
||||||
dataString.BeginReading(start);
|
if (offset == -1)
|
||||||
dataString.EndReading(end);
|
|
||||||
|
|
||||||
if (!FindInReadable(nsCString(substring), start, end)){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
auto offset = start.get() - dataString.Data();
|
|
||||||
|
|
||||||
const char *begin = dataString.BeginReading();
|
const char *begin = dataString.BeginReading();
|
||||||
|
|
||||||
|
|
@ -318,10 +312,9 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
|
||||||
|
|
||||||
// RSS 1.0
|
// RSS 1.0
|
||||||
if (!isFeed) {
|
if (!isFeed) {
|
||||||
bool foundNS_RDF = FindInReadable(NS_LITERAL_CSTRING(NS_RDF), dataString);
|
|
||||||
bool foundNS_RSS = FindInReadable(NS_LITERAL_CSTRING(NS_RSS), dataString);
|
|
||||||
isFeed = ContainsTopLevelSubstring(dataString, "<rdf:RDF") &&
|
isFeed = ContainsTopLevelSubstring(dataString, "<rdf:RDF") &&
|
||||||
foundNS_RDF && foundNS_RSS;
|
dataString.Find(NS_RDF) != -1 &&
|
||||||
|
dataString.Find(NS_RSS) != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we sniffed a feed, coerce our internal type
|
// If we sniffed a feed, coerce our internal type
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include "nsIContentSniffer.h"
|
#include "nsIContentSniffer.h"
|
||||||
#include "nsIStreamListener.h"
|
#include "nsIStreamListener.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsFeedSniffer final : public nsIContentSniffer,
|
class nsFeedSniffer final : public nsIContentSniffer,
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,9 @@
|
||||||
|
|
||||||
#include "nsArrayEnumerator.h"
|
#include "nsArrayEnumerator.h"
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsIURI.h"
|
|
||||||
#include "nsIVariant.h"
|
#include "nsIVariant.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsWindowsMigrationUtils.h"
|
#include "nsWindowsMigrationUtils.h"
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
#include "nsDirectoryServiceDefs.h"
|
#include "nsDirectoryServiceDefs.h"
|
||||||
#include "nsIPrefService.h"
|
#include "nsIPrefService.h"
|
||||||
#include "prenv.h"
|
#include "prenv.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsIGConfService.h"
|
#include "nsIGConfService.h"
|
||||||
#include "nsIGIOService.h"
|
#include "nsIGIOService.h"
|
||||||
#include "nsIGSettingsService.h"
|
#include "nsIGSettingsService.h"
|
||||||
|
|
@ -70,16 +70,16 @@ static const MimeTypeAssociation appTypes[] = {
|
||||||
// GConf registry key constants
|
// GConf registry key constants
|
||||||
#define DG_BACKGROUND "/desktop/gnome/background"
|
#define DG_BACKGROUND "/desktop/gnome/background"
|
||||||
|
|
||||||
#define kDesktopImageKey DG_BACKGROUND "/picture_filename"
|
static const char kDesktopImageKey[] = DG_BACKGROUND "/picture_filename";
|
||||||
#define kDesktopOptionsKey DG_BACKGROUND "/picture_options"
|
static const char kDesktopOptionsKey[] = DG_BACKGROUND "/picture_options";
|
||||||
#define kDesktopDrawBGKey DG_BACKGROUND "/draw_background"
|
static const char kDesktopDrawBGKey[] = DG_BACKGROUND "/draw_background";
|
||||||
#define kDesktopColorKey DG_BACKGROUND "/primary_color"
|
static const char kDesktopColorKey[] = DG_BACKGROUND "/primary_color";
|
||||||
|
|
||||||
#define kDesktopBGSchema "org.gnome.desktop.background"
|
static const char kDesktopBGSchema[] = "org.gnome.desktop.background";
|
||||||
#define kDesktopImageGSKey "picture-uri"
|
static const char kDesktopImageGSKey[] = "picture-uri";
|
||||||
#define kDesktopOptionGSKey "picture-options"
|
static const char kDesktopOptionGSKey[] = "picture-options";
|
||||||
#define kDesktopDrawBGGSKey "draw-background"
|
static const char kDesktopDrawBGGSKey[] = "draw-background";
|
||||||
#define kDesktopColorGSKey "primary-color"
|
static const char kDesktopColorGSKey[] = "primary-color";
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsGNOMEShellService::Init()
|
nsGNOMEShellService::Init()
|
||||||
|
|
@ -508,8 +508,7 @@ static void
|
||||||
ColorToCString(uint32_t aColor, nsCString& aResult)
|
ColorToCString(uint32_t aColor, nsCString& aResult)
|
||||||
{
|
{
|
||||||
// The #rrrrggggbbbb format is used to match gdk_color_to_string()
|
// The #rrrrggggbbbb format is used to match gdk_color_to_string()
|
||||||
aResult.SetLength(13);
|
char *buf = aResult.BeginWriting(13);
|
||||||
char *buf = aResult.BeginWriting();
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#define nsgnomeshellservice_h____
|
#define nsgnomeshellservice_h____
|
||||||
|
|
||||||
#include "nsIGNOMEShellService.h"
|
#include "nsIGNOMEShellService.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsGNOMEShellService final : public nsIGNOMEShellService
|
class nsGNOMEShellService final : public nsIGNOMEShellService
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include "nsIProperties.h"
|
#include "nsIProperties.h"
|
||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsShellService.h"
|
#include "nsShellService.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "nsILoadContext.h"
|
#include "nsILoadContext.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
#include "nsIDOMElement.h"
|
#include "nsIDOMElement.h"
|
||||||
#include "nsIDOMHTMLImageElement.h"
|
#include "nsIDOMHTMLImageElement.h"
|
||||||
#include "nsIImageLoadingContent.h"
|
#include "nsIImageLoadingContent.h"
|
||||||
#include "nsIOutputStream.h"
|
|
||||||
#include "nsIPrefService.h"
|
#include "nsIPrefService.h"
|
||||||
#include "nsIPrefLocalizedString.h"
|
#include "nsIPrefLocalizedString.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
|
@ -466,7 +465,7 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = ::RegOpenKeyExW(HKEY_CLASSES_ROOT, keyName.get(),
|
res = ::RegOpenKeyExW(HKEY_CLASSES_ROOT, PromiseFlatString(keyName).get(),
|
||||||
0, KEY_SET_VALUE, &theKey);
|
0, KEY_SET_VALUE, &theKey);
|
||||||
if (REG_FAILED(res)) {
|
if (REG_FAILED(res)) {
|
||||||
// If updating the open command fails try to update it using the helper
|
// If updating the open command fails try to update it using the helper
|
||||||
|
|
@ -475,9 +474,10 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const nsString &flatValue = PromiseFlatString(valueData);
|
||||||
res = ::RegSetValueExW(theKey, L"", 0, REG_SZ,
|
res = ::RegSetValueExW(theKey, L"", 0, REG_SZ,
|
||||||
(const BYTE *) valueData.get(),
|
(const BYTE *) flatValue.get(),
|
||||||
(valueData.Length() + 1) * sizeof(char16_t));
|
(flatValue.Length() + 1) * sizeof(char16_t));
|
||||||
// Close the key that was created.
|
// Close the key that was created.
|
||||||
::RegCloseKey(theKey);
|
::RegCloseKey(theKey);
|
||||||
if (REG_FAILED(res)) {
|
if (REG_FAILED(res)) {
|
||||||
|
|
@ -529,8 +529,9 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||||
if (REG_FAILED(res) || char16_t('\0') != *currValue) {
|
if (REG_FAILED(res) || char16_t('\0') != *currValue) {
|
||||||
// Key wasn't set or was set to something other than our registry entry.
|
// Key wasn't set or was set to something other than our registry entry.
|
||||||
// Delete the key along with all of its childrean and then recreate it.
|
// Delete the key along with all of its childrean and then recreate it.
|
||||||
::SHDeleteKeyW(HKEY_CURRENT_USER, keyName.get());
|
const nsString &flatName = PromiseFlatString(keyName);
|
||||||
res = ::RegCreateKeyExW(HKEY_CURRENT_USER, keyName.get(), 0, nullptr,
|
::SHDeleteKeyW(HKEY_CURRENT_USER, flatName.get());
|
||||||
|
res = ::RegCreateKeyExW(HKEY_CURRENT_USER, flatName.get(), 0, nullptr,
|
||||||
REG_OPTION_NON_VOLATILE, KEY_SET_VALUE,
|
REG_OPTION_NON_VOLATILE, KEY_SET_VALUE,
|
||||||
nullptr, &theKey, nullptr);
|
nullptr, &theKey, nullptr);
|
||||||
if (REG_FAILED(res)) {
|
if (REG_FAILED(res)) {
|
||||||
|
|
@ -582,9 +583,10 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||||
|
|
||||||
NS_ConvertUTF8toUTF16 valueData(VAL_OPEN);
|
NS_ConvertUTF8toUTF16 valueData(VAL_OPEN);
|
||||||
valueData.Replace(offset, 9, appLongPath);
|
valueData.Replace(offset, 9, appLongPath);
|
||||||
|
const nsString &flatValue = PromiseFlatString(valueData);
|
||||||
res = ::RegSetValueExW(theKey, L"", 0, REG_SZ,
|
res = ::RegSetValueExW(theKey, L"", 0, REG_SZ,
|
||||||
(const BYTE *) valueData.get(),
|
(const BYTE *) flatValue.get(),
|
||||||
(valueData.Length() + 1) * sizeof(char16_t));
|
(flatValue.Length() + 1) * sizeof(char16_t));
|
||||||
// Close the key that was created.
|
// Close the key that was created.
|
||||||
::RegCloseKey(theKey);
|
::RegCloseKey(theKey);
|
||||||
// If updating the FTP protocol handlers shell open command fails try to
|
// If updating the FTP protocol handlers shell open command fails try to
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#define nswindowsshellservice_h____
|
#define nswindowsshellservice_h____
|
||||||
|
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "nsString.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsIWindowsShellService.h"
|
#include "nsIWindowsShellService.h"
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@
|
||||||
@RESPATH@/browser/components/prebuilt-interfaces.manifest
|
@RESPATH@/browser/components/prebuilt-interfaces.manifest
|
||||||
@RESPATH@/browser/components/interfaces.xpt
|
@RESPATH@/browser/components/interfaces.xpt
|
||||||
#endif
|
#endif
|
||||||
|
@RESPATH@/browser/components/components.manifest
|
||||||
@RESPATH@/components/alerts.xpt
|
@RESPATH@/components/alerts.xpt
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
#ifdef XP_WIN32
|
#ifdef XP_WIN32
|
||||||
|
|
@ -441,6 +442,7 @@
|
||||||
@RESPATH@/browser/components/nsSessionStore.js
|
@RESPATH@/browser/components/nsSessionStore.js
|
||||||
@RESPATH@/components/nsURLFormatter.manifest
|
@RESPATH@/components/nsURLFormatter.manifest
|
||||||
@RESPATH@/components/nsURLFormatter.js
|
@RESPATH@/components/nsURLFormatter.js
|
||||||
|
@RESPATH@/browser/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@
|
||||||
@RESPATH@/components/txEXSLTRegExFunctions.manifest
|
@RESPATH@/components/txEXSLTRegExFunctions.manifest
|
||||||
@RESPATH@/components/txEXSLTRegExFunctions.js
|
@RESPATH@/components/txEXSLTRegExFunctions.js
|
||||||
@RESPATH@/components/toolkitplaces.manifest
|
@RESPATH@/components/toolkitplaces.manifest
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ STUB(gdk_atom_name)
|
||||||
STUB(gdk_beep)
|
STUB(gdk_beep)
|
||||||
STUB(gdk_cairo_create)
|
STUB(gdk_cairo_create)
|
||||||
STUB(gdk_color_free)
|
STUB(gdk_color_free)
|
||||||
STUB(gdk_color_parse)
|
|
||||||
STUB(gdk_cursor_new_for_display)
|
STUB(gdk_cursor_new_for_display)
|
||||||
STUB(gdk_cursor_new_from_name)
|
STUB(gdk_cursor_new_from_name)
|
||||||
STUB(gdk_cursor_new_from_pixbuf)
|
STUB(gdk_cursor_new_from_pixbuf)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue