Reviewed by Darin, landed by Adam.
Fixes part of bug 10743: Windows build busted.
* platform/win/FontCacheWin.cpp: Add missing #include, set svn:eol-style to native
(WebCore::FontCache::getFontLinkInterface):
(WebCore::FontCache::getFontDataForCharacters):
* platform/win/FontDataWin.cpp: Ditto.
(WebCore::FontData::platformWidthForGlyph):
* platform/win/FontWin.cpp: Add missing #include, band-aid over const problem with GlyphBufferGlyph
(WebCore::Font::drawGlyphs):
* platform/win/ResourceLoaderWin.cpp: Add missing #include, change .ascii() to .latin1()
(WebCore::ResourceLoaderWndProc):
(WebCore::ResourceLoader::start):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16264
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-09-07 MorganL <morlmor@yahoo.com>
+
+ Reviewed by Darin, landed by Adam.
+
+ Fixes part of bug 10743: Windows build busted.
+
+ * platform/win/FontCacheWin.cpp: Add missing #include, set svn:eol-style to native
+ (WebCore::FontCache::getFontLinkInterface):
+ (WebCore::FontCache::getFontDataForCharacters):
+ * platform/win/FontDataWin.cpp: Ditto.
+ (WebCore::FontData::platformWidthForGlyph):
+ * platform/win/FontWin.cpp: Add missing #include, band-aid over const problem with GlyphBufferGlyph
+ (WebCore::Font::drawGlyphs):
+ * platform/win/ResourceLoaderWin.cpp: Add missing #include, change .ascii() to .latin1()
+ (WebCore::ResourceLoaderWndProc):
+ (WebCore::ResourceLoader::start):
+
2006-09-07 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
#include "config.h"
#include "FontCache.h"
-#include "FontPlatformData.h"
+#include "FontData.h"
#include "Font.h"
#include <windows.h>
#include <mlang.h>
IMLangFontLink2* FontCache::getFontLinkInterface()
{
- static IMultiLanguage *multiLanguage;\r
- if (!multiLanguage) {\r
- if (CoCreateInstance(CLSID_CMultiLanguage, 0, CLSCTX_ALL, IID_IMultiLanguage, (void**)&multiLanguage) != S_OK)\r
- return 0;\r
- }\r
-\r
- static IMLangFontLink2* langFontLink;\r
- if (!langFontLink) {\r
- if (multiLanguage->QueryInterface(IID_IMLangFontLink2, (void**)&langFontLink) != S_OK)\r
- return 0;\r
+ static IMultiLanguage *multiLanguage;
+ if (!multiLanguage) {
+ if (CoCreateInstance(CLSID_CMultiLanguage, 0, CLSCTX_ALL, IID_IMultiLanguage, (void**)&multiLanguage) != S_OK)
+ return 0;
+ }
+
+ static IMLangFontLink2* langFontLink;
+ if (!langFontLink) {
+ if (multiLanguage->QueryInterface(IID_IMLangFontLink2, (void**)&langFontLink) != S_OK)
+ return 0;
}
return langFontLink;
const FontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
{
// IMLangFontLink::MapFont Method does what we want.
- IMLangFontLink2* langFontLink = getFontLinkInterface();\r
- if (!langFontLink)\r
- return 0;\r
-\r
- FontData* fontData = 0;\r
- HDC hdc = GetDC(0);\r
- DWORD fontCodePages;\r
- langFontLink->GetFontCodePages(hdc, font.primaryFont()->m_font.hfont(), &fontCodePages);\r
-\r
- DWORD actualCodePages;\r
- long cchActual;\r
- langFontLink->GetStrCodePages(characters, length, fontCodePages, &actualCodePages, &cchActual);\r
- if (cchActual) {\r
- HFONT result;\r
- if (langFontLink->MapFont(hdc, actualCodePages, characters[0], &result) == S_OK) {\r
- fontData = new FontData(FontPlatformData(result, font.fontDescription().computedPixelSize()));\r
- fontData->setIsMLangFont();\r
- }\r
- }\r
-\r
- ReleaseDC(0, hdc);\r
+ IMLangFontLink2* langFontLink = getFontLinkInterface();
+ if (!langFontLink)
+ return 0;
+
+ FontData* fontData = 0;
+ HDC hdc = GetDC(0);
+ DWORD fontCodePages;
+ langFontLink->GetFontCodePages(hdc, font.primaryFont()->m_font.hfont(), &fontCodePages);
+
+ DWORD actualCodePages;
+ long cchActual;
+ langFontLink->GetStrCodePages(characters, length, fontCodePages, &actualCodePages, &cchActual);
+ if (cchActual) {
+ HFONT result;
+ if (langFontLink->MapFont(hdc, actualCodePages, characters[0], &result) == S_OK) {
+ fontData = new FontData(FontPlatformData(result, font.fontDescription().computedPixelSize()));
+ fontData->setIsMLangFont();
+ }
+ }
+
+ ReleaseDC(0, hdc);
return fontData;
}
#include "Font.h"
#include "FontCache.h"
#include "FloatRect.h"
+#include "FontData.h"
#include "FontDescription.h"
#include <wtf/MathExtras.h>
#include <unicode/uchar.h>
cairo_win32_scaled_font_select_font(scaledFont, dc);
int width;
- GetCharWidthI(dc, glyph, 1, 0, &width);\r
-\r
+ GetCharWidthI(dc, glyph, 1, 0, &width);
+
cairo_win32_scaled_font_done_font(scaledFont);
RestoreDC(dc, -1);
#include <cairo-win32.h>
#include "FontData.h"
#include "FontFallbackList.h"
+#include "GlyphBuffer.h"
#include "GraphicsContext.h"
#include "IntRect.h"
// Restore the original transform.
SetWorldTransform(dc, &savedxform);
- GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
+ // FIXME: This const_cast seems really wrong
+ GlyphBufferGlyph* glyphs = const_cast<GlyphBufferGlyph*>(glyphBuffer.glyphs(from));
float offset = point.x();
#include "ResourceLoaderInternal.h"
#include "ResourceLoaderWin.h"
+#include "CString.h"
#include "DocLoader.h"
#include "Frame.h"
#include "Document.h"
urlStr = urlStr.left(fragmentIndex);
static LPCSTR accept[2]={"*/*", NULL};
HINTERNET urlHandle = HttpOpenRequestA(job->d->m_resourceHandle,
- "POST", urlStr.ascii(), 0, 0, accept,
+ "POST", urlStr.latin1(), 0, 0, accept,
INTERNET_FLAG_KEEP_CONNECTION |
INTERNET_FLAG_FORMS_SUBMIT |
INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE,
INTERNET_BUFFERSA buffers;
memset(&buffers, 0, sizeof(buffers));
buffers.dwStructSize = sizeof(INTERNET_BUFFERSA);
- buffers.lpcszHeader = headers.ascii();
+ buffers.lpcszHeader = headers.latin1();
buffers.dwHeadersLength = headers.length();
buffers.dwBufferTotal = formData.length();
job->d->m_bytesRemainingToWrite = formData.length();
job->d->m_formDataString = (char*)malloc(formData.length());
job->d->m_formDataLength = formData.length();
- strncpy(job->d->m_formDataString, formData.ascii(), formData.length());
+ strncpy(job->d->m_formDataString, formData.latin1(), formData.length());
job->d->m_writing = true;
HttpSendRequestExA(job->d->m_secondaryHandle, &buffers, 0, 0, (DWORD_PTR)job->d->m_jobId);
}
if (!referrer.isEmpty())
headers += String("Referer: ") + referrer + "\r\n";
- urlHandle = InternetOpenUrlA(internetHandle, urlStr.ascii(), headers.ascii(), headers.length(),
+ urlHandle = InternetOpenUrlA(internetHandle, urlStr.ascii(), headers.latin1(), headers.length(),
INTERNET_FLAG_KEEP_CONNECTION, (DWORD_PTR)d->m_jobId);
}