summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/wince
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/platform/wince
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/platform/wince')
-rw-r--r--Source/WebCore/platform/wince/FileChooserWinCE.cpp60
-rw-r--r--Source/WebCore/platform/wince/KeygenWinCE.cpp98
-rw-r--r--Source/WebCore/platform/wince/TemporaryLinkStubs.cpp37
3 files changed, 0 insertions, 195 deletions
diff --git a/Source/WebCore/platform/wince/FileChooserWinCE.cpp b/Source/WebCore/platform/wince/FileChooserWinCE.cpp
deleted file mode 100644
index 955e68a..0000000
--- a/Source/WebCore/platform/wince/FileChooserWinCE.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * Copyright (C) 2007-2009 Torch Mobile, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "FileChooser.h"
-
-#include "Chrome.h"
-#include "ChromeClient.h"
-#include "Document.h"
-#include "Frame.h"
-#include "Icon.h"
-#include "LocalizedStrings.h"
-#include "Page.h"
-#include "StringTruncator.h"
-
-namespace WebCore {
-
-String pathGetFileName(const String& path);
-
-String FileChooser::basenameForWidth(const Font& font, int width) const
-{
- if (width <= 0)
- return String();
-
- String string;
- if (m_filenames.isEmpty())
- string = fileButtonNoFileSelectedLabel();
- else if (m_filenames.size() == 1) {
- String tmpFilename = m_filenames[0];
- string = pathGetFileName(tmpFilename);
- } else
- return StringTruncator::rightTruncate(String::number(m_filenames.size()) + " files", width, font, false);
-
- return StringTruncator::centerTruncate(string, width, font, false);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/wince/KeygenWinCE.cpp b/Source/WebCore/platform/wince/KeygenWinCE.cpp
deleted file mode 100644
index 8537f44..0000000
--- a/Source/WebCore/platform/wince/KeygenWinCE.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2008-2009 Torch Mobile Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SSLKeyGenerator.h"
-
-#include "Base64.h"
-#include <wtf/text/CString.h>
-
-#include <windows.h>
-#include <wincrypt.h>
-
-namespace WebCore {
-
-void WebCore::getSupportedKeySizes(Vector<String>& v)
-{
- v.append("High Grade");
- v.append("Medium Grade");
-}
-
-String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL& url)
-{
- String keyString;
-
- HCRYPTPROV hContext = 0;
- HCRYPTKEY hKey = 0;
- PCERT_PUBLIC_KEY_INFO pPubInfo = 0;
-
- // Try to delete it if it exists already
- CryptAcquireContext(&hContext, _T("keygen_container"), MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
-
- do {
- if (!CryptAcquireContext(&hContext, _T("keygen_container"), MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET))
- break;
-
- DWORD dwPubInfoLength = 0;
- if (!CryptGenKey(hContext, AT_KEYEXCHANGE, 0, &hKey) || !CryptExportPublicKeyInfo(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, 0, &dwPubInfoLength))
- break;
-
- // Use malloc instead of new, because malloc guarantees to return a pointer aligned for all data types.
- pPubInfo = reinterpret_cast<PCERT_PUBLIC_KEY_INFO>(fastMalloc(dwPubInfoLength));
-
- if (!CryptExportPublicKeyInfo(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, pPubInfo, &dwPubInfoLength))
- break;
-
- CERT_KEYGEN_REQUEST_INFO requestInfo = { 0 };
- requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1;
- requestInfo.pwszChallengeString = L"";
- requestInfo.SubjectPublicKeyInfo = *pPubInfo;
-
- String localChallenge = challenge;
-
- // Windows API won't write to our buffer, although it's not declared with const.
- requestInfo.pwszChallengeString = const_cast<wchar_t*>(localChallenge.charactersWithNullTermination());
-
- CRYPT_ALGORITHM_IDENTIFIER signAlgo = { 0 };
- signAlgo.pszObjId = szOID_RSA_SHA1RSA;
-
- DWORD dwEncodedLength;
- if (!CryptSignAndEncodeCertificate(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, X509_KEYGEN_REQUEST_TO_BE_SIGNED, &requestInfo, &signAlgo, 0, 0, &dwEncodedLength))
- break;
-
- Vector<char> binary(dwEncodedLength);
- if (!CryptSignAndEncodeCertificate(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, X509_KEYGEN_REQUEST_TO_BE_SIGNED, &requestInfo, &signAlgo, 0, reinterpret_cast<LPBYTE>(binary.data()), &dwEncodedLength))
- break;
-
- keyString = base64Encode(binary);
- } while(0);
-
- if (pPubInfo)
- fastFree(pPubInfo);
-
- if (hKey)
- CryptDestroyKey(hKey);
-
- if (hContext)
- CryptReleaseContext(hContext, 0);
-
- return keyString;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/wince/TemporaryLinkStubs.cpp b/Source/WebCore/platform/wince/TemporaryLinkStubs.cpp
deleted file mode 100644
index dbd62dc..0000000
--- a/Source/WebCore/platform/wince/TemporaryLinkStubs.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "CookieStorage.h"
-#include "NotImplemented.h"
-
-namespace WebCore {
-
-void setCookieStoragePrivateBrowsingEnabled(bool)
-{
- notImplemented();
-}
-
-} // namespace WebCore