Commit 9177ecfd authored by alp's avatar alp

2007-10-20 Alp Toker <alp@atoker.com>

        Reviewed by Eric.

        Support text boundary detection.
        Move TextBoundariesWin.cpp to platform/ since it's portable and useful.
        Split out and implement some TemporaryLinkStubs.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * platform/TextBoundariesICU.cpp: Copied from WebCore/platform/win/TextBoundariesWin.cpp.
        * platform/gtk/Language.cpp: Added.
        (WebCore::defaultLanguage):
        * platform/gtk/TemporaryLinkStubs.cpp:
        * platform/gtk/TextBreakIteratorInternalICUGtk.cpp: Added.
        (WebCore::currentTextBreakLocaleID):
        * platform/win/TextBoundariesWin.cpp: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c640e8ff
2007-10-20 Alp Toker <alp@atoker.com>
Reviewed by Eric.
Support text boundary detection.
Move TextBoundariesWin.cpp to platform/ since it's portable and useful.
Split out and implement some TemporaryLinkStubs.
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* platform/TextBoundariesICU.cpp: Copied from WebCore/platform/win/TextBoundariesWin.cpp.
* platform/gtk/Language.cpp: Added.
(WebCore::defaultLanguage):
* platform/gtk/TemporaryLinkStubs.cpp:
* platform/gtk/TextBreakIteratorInternalICUGtk.cpp: Added.
(WebCore::currentTextBreakLocaleID):
* platform/win/TextBoundariesWin.cpp: Removed.
2007-10-20 Mark Rowe <mrowe@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -911,6 +911,7 @@ gtk-port {
platform/gtk/FontPlatformDataGtk.cpp \
platform/gtk/GlyphPageTreeNodeGtk.cpp \
platform/gtk/KeyEventGtk.cpp \
platform/gtk/Language.cpp \
platform/gtk/LocalizedStringsGtk.cpp \
platform/gtk/LoggingGtk.cpp \
platform/gtk/MIMETypeRegistryGtk.cpp \
......@@ -926,6 +927,8 @@ gtk-port {
platform/gtk/SoundGtk.cpp \
platform/gtk/SystemTimeLinux.cpp \
platform/gtk/TemporaryLinkStubs.cpp \
platform/TextBoundariesICU.cpp \
platform/gtk/TextBreakIteratorInternalICUGtk.cpp \
platform/gtk/ThreadingGtk.cpp \
platform/gtk/WheelEventGtk.cpp \
platform/gtk/WidgetGtk.cpp \
......
......@@ -3354,6 +3354,10 @@
RelativePath="..\platform\TextBoundaries.h"
>
</File>
<File
RelativePath="..\platform\TextBoundariesICU.cpp"
>
</File>
<File
RelativePath="..\platform\TextBreakIterator.h"
>
......@@ -3689,10 +3693,6 @@
RelativePath="..\platform\win\TemporaryLinkStubs.cpp"
>
</File>
<File
RelativePath="..\platform\win\TextBoundariesWin.cpp"
>
</File>
<File
RelativePath="..\platform\win\TextBreakIteratorInternalICUWin.cpp"
>
......
/*
* Copyright (C) 2007 Alp Toker <alp@atoker.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 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 "Language.h"
#include "CString.h"
#include "PlatformString.h"
#include <pango/pango.h>
namespace WebCore {
String defaultLanguage()
{
static String defaultLanguage;
if (!defaultLanguage.isEmpty())
return defaultLanguage;
PangoLanguage* pangoLanguage = pango_language_get_default();
defaultLanguage = String(pango_language_to_string(pangoLanguage));
return defaultLanguage;
}
}
......@@ -34,11 +34,8 @@
#include "FrameView.h"
#include "FTPDirectoryDocument.h"
#include "GlobalHistory.h"
#include "Language.h"
#include "NotImplemented.h"
#include "PlugInInfoStore.h"
#include "TextBoundaries.h"
#include "TextBreakIteratorInternalICU.h"
using namespace WebCore;
......@@ -55,16 +52,8 @@ Vector<char> loadResourceIntoArray(const char* resourceName)
return resource;
}
namespace WebCore {
class Page;
}
void FrameView::updateBorder() { notImplemented(); }
int WebCore::findNextWordFromIndex(UChar const*, int, int, bool) { notImplemented(); return 0; }
void WebCore::findWordBoundary(UChar const* str, int len, int position, int* start, int* end) {*start = position; *end = position; }
const char* WebCore::currentTextBreakLocaleID() { notImplemented(); return "en_us"; }
/********************************************************/
/* Completely empty stubs (mostly to allow DRT to run): */
......@@ -73,8 +62,6 @@ bool AXObjectCache::gAccessibilityEnabled = false;
bool WebCore::historyContains(DeprecatedString const&) { return false; }
String WebCore::defaultLanguage() { return "en"; }
PluginInfo* PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;}
unsigned PlugInInfoStore::pluginCount() const { notImplemented(); return 0; }
bool WebCore::PlugInInfoStore::supportsMIMEType(const WebCore::String&) { notImplemented(); return false; }
......
/*
* Copyright (C) 2007 Alp Toker <alp@atoker.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 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 "TextBreakIteratorInternalICU.h"
namespace WebCore {
const char* currentTextBreakLocaleID()
{
return "en_us";
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment