- fix build
* rendering/render_style.cpp: (WebCore::RenderStyle::getPseudoStyle):
Fix a typo.
- attempt to fix Windows build
* css/maketokenizer: Use UChar instead of unsigned short.
* platform/win/FontWin.cpp:
(WebCore::getFontData): Removed cast to QChar.
(WebCore::hackishExtentForString): Use UChar.
(WebCore::Font::floatWidth): Use UChar.
(WebCore::Font::drawText): Use UChar.
(WebCore::Font::drawHighlightForText): Use UChar.
(WebCore::Font::selectionRectForText): Use UChar.
(WebCore::Font::checkSelectionPoint): Use UChar.
* platform/win/KeyEventWin.cpp:
(WebCore::singleCharacterString): Added.
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Use above function.
* platform/win/TemporaryLinkStubs.cpp:
(WebCore::findNextSentenceFromIndex): Use UChar.
(WebCore::findSentenceBoundary): Use UChar.
(WebCore::findNextWordFromIndex): Use UChar.
(WebCore::findWordBoundary): Use UChar.
* platform/win/TransferJobWin.cpp:
(WebCore::TransferJob::start): Use a different String constructor.
* rendering/RenderTable.h: Added an include of DeprecatedArray.h.
* rendering/RenderText.cpp: Added an include of DeprecatedString.h.
* rendering/render_list.h: Ditto.
WebKitWin:
- attempt to fix the Windows build
* WebView.cpp: (WebKit::WebViewWndProc): Convert to String explicitly via UChar instead of
implicitly via QChar.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14274
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-05-09 Darin Adler <darin@apple.com>
+
+ - fix build
+
+ * rendering/render_style.cpp: (WebCore::RenderStyle::getPseudoStyle):
+ Fix a typo.
+
+ - attempt to fix Windows build
+
+ * css/maketokenizer: Use UChar instead of unsigned short.
+ * platform/win/FontWin.cpp:
+ (WebCore::getFontData): Removed cast to QChar.
+ (WebCore::hackishExtentForString): Use UChar.
+ (WebCore::Font::floatWidth): Use UChar.
+ (WebCore::Font::drawText): Use UChar.
+ (WebCore::Font::drawHighlightForText): Use UChar.
+ (WebCore::Font::selectionRectForText): Use UChar.
+ (WebCore::Font::checkSelectionPoint): Use UChar.
+ * platform/win/KeyEventWin.cpp:
+ (WebCore::singleCharacterString): Added.
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Use above function.
+ * platform/win/TemporaryLinkStubs.cpp:
+ (WebCore::findNextSentenceFromIndex): Use UChar.
+ (WebCore::findSentenceBoundary): Use UChar.
+ (WebCore::findNextWordFromIndex): Use UChar.
+ (WebCore::findWordBoundary): Use UChar.
+ * platform/win/TransferJobWin.cpp:
+ (WebCore::TransferJob::start): Use a different String constructor.
+ * rendering/RenderTable.h: Added an include of DeprecatedArray.h.
+ * rendering/RenderText.cpp: Added an include of DeprecatedString.h.
+ * rendering/render_list.h: Ditto.
+
2006-05-09 Darin Adler <darin@apple.com>
Rubber stamped by Hyatt.
print;
while (<>) {
- s/char/unsigned short/;
+ s/char/UChar/;
print;
last if /yy_act/;
}
RestoreDC(dc, -1);
ReleaseDC(0, dc);
dc = 0;
- if (!equalIgnoringCase(fontFace, String((QChar*)name, resultLength))) {
+ if (!equalIgnoringCase(fontFace, String(name, resultLength))) {
DeleteObject(font);
return 0;
}
return defaultFont;
}
-static IntSize hackishExtentForString(HDC dc, FontData* font, const QChar* str, int slen, int pos, int len, int tabWidth, int xpos)
+static IntSize hackishExtentForString(HDC dc, FontData* font, const UChar* str, int slen, int pos, int len, int tabWidth, int xpos)
{
SaveDC(dc);
return s;
}
-float Font::floatWidth(const QChar* str, int slen, int pos, int len,
+float Font::floatWidth(const UChar* str, int slen, int pos, int len,
int tabWidth, int xpos, bool runRounding) const
{
FontData* font = m_fontList->primaryFont(fontDescription());
}
void Font::drawText(GraphicsContext* context, const IntPoint& point, int tabWidth, int xpos,
- const QChar* str, int len, int from, int to,
+ const UChar* str, int len, int from, int to,
int toAdd, TextDirection d, bool visuallyOrdered) const
{
FontData* font = m_fontList->primaryFont(fontDescription());
}
void Font::drawHighlightForText(GraphicsContext* context, const IntPoint& point, int h, int tabWidth, int xpos,
- const QChar* str, int len, int from, int to, int toAdd,
+ const UChar* str, int len, int from, int to, int toAdd,
TextDirection d, bool visuallyOrdered, const Color& backgroundColor) const
{
if (!backgroundColor.isValid())
const_cast<GraphicsContext*>(context)->fillRect(IntRect(point, runSize), backgroundColor);
}
-IntRect Font::selectionRectForText(const IntPoint& point, int h, int tabWidth, int xpos, const QChar* str, int slen,
+IntRect Font::selectionRectForText(const IntPoint& point, int h, int tabWidth, int xpos, const UChar* str, int slen,
int pos, int len, int toAdd, bool rtl, bool visuallyOrdered, int from, int to) const
{
FontData* font = m_fontList->primaryFont(fontDescription());
return IntRect(point, runSize);
}
-int Font::checkSelectionPoint(const QChar* str, int slen, int offset, int len, int toAdd, int tabWidth, int xpos, int x,
+int Font::checkSelectionPoint(const UChar* str, int slen, int offset, int len, int toAdd, int tabWidth, int xpos, int x,
TextDirection, bool visuallyOrdered, bool includePartialGlyphs) const
{
FontData* font = m_fontList->primaryFont(fontDescription());
}
}
+static String singleCharacterString(UChar c) { return String(&c, 1); }
+
PlatformKeyboardEvent::PlatformKeyboardEvent(HWND hWnd, WPARAM wParam, LPARAM lParam)
- : m_text(QChar(wParam))
- , m_unmodifiedText(QChar(wParam))
+ : m_text(singleCharacterString(wParam))
+ , m_unmodifiedText(singleCharacterString(wParam))
, m_keyIdentifier(keyIdentifierForWindowsKeyCode(wParam))
, m_isKeyUp((lParam & NEW_RELEASE_STATE_MASK))
, m_autoRepeat(lParam & REPEAT_COUNT_MASK)
, m_metaKey(lParam & ALT_KEY_DOWN_MASK) // FIXME: Is this right?
{
if (!m_shiftKey)
- m_text = String(QChar(tolower(wParam)));
+ m_text = String(singleCharacterString(tolower(wParam)));
}
}
bool PlatformMouseEvent::isMouseButtonDown(MouseButton) { notImplemented(); return false; }
String WebCore::searchableIndexIntroduction() { notImplemented(); return String(); }
-int WebCore::findNextSentenceFromIndex(QChar const*,int,int,bool) { notImplemented(); return 0; }
-void WebCore::findSentenceBoundary(QChar const*,int,int,int*,int*) { notImplemented(); }
-int WebCore::findNextWordFromIndex(QChar const*,int,int,bool) { notImplemented(); return 0; }
+int WebCore::findNextSentenceFromIndex(UChar const*,int,int,bool) { notImplemented(); return 0; }
+void WebCore::findSentenceBoundary(UChar const*,int,int,int*,int*) { notImplemented(); }
+int WebCore::findNextWordFromIndex(UChar const*,int,int,bool) { notImplemented(); return 0; }
DeprecatedArray<char> KWQServeSynchronousRequest(Loader*,DocLoader*,TransferJob*,KURL&,DeprecatedString&) { notImplemented(); return 0; }
String WebCore::resetButtonDefaultLabel() { return "Reset"; }
String WebCore::defaultLanguage() { return "en"; }
-void WebCore::findWordBoundary(QChar const* str,int len,int position,int* start, int* end) {*start=position; *end=position; }
+void WebCore::findWordBoundary(UChar const* str,int len,int position,int* start, int* end) {*start=position; *end=position; }
void WebCore::setCookies(KURL const&,KURL const&,String const&) { }
String WebCore::cookies(KURL const&) { return String(); }
} else {
static HINTERNET internetHandle = 0;
if (!internetHandle) {
- String userAgentStr = docLoader->frame()->userAgent() + QChar('\0');
- LPCWSTR userAgent = reinterpret_cast<const WCHAR*>(userAgentStr.unicode());
+ String userAgentStr = docLoader->frame()->userAgent() + String("", 1);
+ LPCWSTR userAgent = reinterpret_cast<const WCHAR*>(userAgentStr.characters());
// leak the Internet for now
internetHandle = InternetOpen(userAgent, INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, INTERNET_FLAG_ASYNC);
}
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
#ifndef RenderTable_H
#define RenderTable_H
+#include "DeprecatedArray.h"
#include "RenderBlock.h"
namespace WebCore {
#include "config.h"
#include "RenderText.h"
+#include "DeprecatedString.h"
#include "InlineTextBox.h"
#include "Pen.h"
-#include "RenderBlock.h"
-#include "break_lines.h"
#include "Range.h"
#include "RenderArena.h"
-#include <wtf/AlwaysInline.h>
+#include "RenderBlock.h"
+#include "break_lines.h"
#include <unicode/ubrk.h>
+#include <wtf/AlwaysInline.h>
using namespace std;
* Boston, MA 02111-1307, USA.
*
*/
+
#ifndef RENDER_LIST_H
#define RENDER_LIST_H
+#include "DeprecatedString.h"
#include "RenderBlock.h"
// ### list-style-position, list-style-image is still missing
{
RenderStyle* ps = 0;
if (noninherited_flags._styleType == NOPSEUDO)
- for (ps = pseudoStyle; ps; ps = ps->psuedoStyle)
+ for (ps = pseudoStyle; ps; ps = ps->pseudoStyle)
if (ps->styleType() == pid)
break;
return ps;
+2006-05-09 Darin Adler <darin@apple.com>
+
+ - attempt to fix the Windows build
+
+ * WebView.cpp: (WebKit::WebViewWndProc): Convert to String explicitly via UChar instead of
+ implicitly via QChar.
+
2006-05-09 Steve Falkenburg <sfalken@apple.com>
Add host calback so caller can determine success/failure of a page load.
case WM_CHAR: {
// FIXME: We need to use WM_UNICHAR to support international text.
if (nextCharIsInputText) {
- TypingCommand::insertText(webview->mainFrame()->toPrivate()->impl()->document(), QChar(wParam), false);
+ UChar c = wParam;
+ TypingCommand::insertText(webview->mainFrame()->toPrivate()->impl()->document(), String(&c, 1), false);
nextCharIsInputText = false;
}
break;