1. 30 Nov, 2007 1 commit
  2. 30 Oct, 2007 1 commit
  3. 12 Oct, 2007 3 commits
    • oliver's avatar
      Fix more SVG build bustage on Windows. Remove a deleted file from the... · 64d369e0
      oliver authored
      Fix more SVG build bustage on Windows.  Remove a deleted file from the project.  Remove a const from an unimplemented mask method.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d369e0
    • oliver's avatar
      Land support for the CSS @font-face rule. This patch allows custom fonts · d6ae4964
      oliver authored
              to be downloaded from the Web and rendered in Web pages.  Right now only
              TrueType fonts are supported.  Proprietary formats like .eot are not
              supported.
      
              Reviewed by Eric Seidel
      
              Many tests will be coming in a future landing.
      
              * WebCore.base.exp:
              Expose some more stuff for WebKit, caused by font restructuring.
      
              * WebCore.xcodeproj/project.pbxproj:
              Add all the new font face files.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              Make sure to ignore the 'src' property of @font-face rules.
      
              * css/CSSFontFace.cpp: Added.
              (WebCore::CSSFontFace::CSSFontFace):
              (WebCore::CSSFontFace::~CSSFontFace):
              (WebCore::CSSFontFace::isLoaded):
              (WebCore::CSSFontFace::isValid):
              (WebCore::CSSFontFace::addSource):
              (WebCore::CSSFontFace::fontLoaded):
              (WebCore::CSSFontFace::getFontData):
              * css/CSSFontFace.h: Added.
              A CSSFontFace is a composite object.  It consists of multiple font-face sources, where each source represents either a remote or local
              file in a @font-face rule's src list.
      
              * css/CSSFontFaceRule.cpp:
              (WebCore::CSSFontFaceRule::setDeclaration):
              (WebCore::CSSFontFaceRule::cssText):
              * css/CSSFontFaceRule.h:
              The implementation of the @font-face rule itself in the CSS sheet back end.
      
              * css/CSSFontFaceSource.cpp: Added.
              (WebCore::CSSFontFaceSource::CSSFontFaceSource):
              (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
              (WebCore::CSSFontFaceSource::pruneTable):
              (WebCore::CSSFontFaceSource::isLoaded):
              (WebCore::CSSFontFaceSource::isValid):
              (WebCore::CSSFontFaceSource::fontLoaded):
              (WebCore::CSSFontFaceSource::getFontData):
              * css/CSSFontFaceSource.h: Added.
              (WebCore::CSSFontFaceSource::string):
              (WebCore::CSSFontFaceSource::setFontFace):
              A font face source represents a single remote or local font.  If it represents a remote font than it wraps a CachedFont.
      
              * css/CSSFontFaceSrcValue.cpp: Added.
              (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
              (WebCore::CSSFontFaceSrcValue::cssText):
              * css/CSSFontFaceSrcValue.h: Added.
              (WebCore::CSSFontFaceSrcValue::m_isLocal):
              (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
              (WebCore::CSSFontFaceSrcValue::resource):
              (WebCore::CSSFontFaceSrcValue::format):
              (WebCore::CSSFontFaceSrcValue::isLocal):
              (WebCore::CSSFontFaceSrcValue::setFormat):
              Used in parsing.  Represents the parsed form of the src value that can then be used to build up a CSSFontFace.
      
              * css/CSSFontSelector.cpp: Added.
              (WebCore::CSSFontSelector::CSSFontSelector):
              (WebCore::CSSFontSelector::~CSSFontSelector):
              (WebCore::CSSFontSelector::isEmpty):
              (WebCore::CSSFontSelector::docLoader):
              (WebCore::hashForFont):
              (WebCore::CSSFontSelector::addFontFaceRule):
              (WebCore::CSSFontSelector::fontLoaded):
              (WebCore::CSSFontSelector::getFontData):
              * css/CSSFontSelector.h: Added.
              The CSS font selector is the object that selects the correct font given a specified font family.  It builds up a database of CSSFontFaces that can then be handed
              back.
      
              * css/CSSGrammar.y:
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              (WebCore::CSSParser::parseFontFaceSrc):
              (WebCore::CSSParser::createFontFaceRule):
              * css/CSSParser.h:
              Modify the CSS grammar to now understand @font-face rules.
      
              * css/CSSPropertyNames.in:
              Add the src property.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector):
              (WebCore::CSSStyleSelector::styleForElement):
              (WebCore::CSSStyleSelector::updateFont):
              (WebCore::CSSRuleSet::addRulesFromSheet):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::ensureFontSelector):
              * css/CSSStyleSelector.h:
              (WebCore::CSSStyleSelector::fontSelector):
              The style selector now creates a font selector object and feeds it the appropriate information when @font-face rules are encountered.
      
              * dom/Document.cpp:
              (WebCore::Document::recalcStyle):
              Patch the update method now that it takes a font selector argument.
      
              * loader/Cache.cpp:
              (WebCore::createResource):
              (WebCore::Cache::getStatistics):
              * loader/Cache.h:
              Teach the Cache about CachedFonts.
      
              * loader/CachedFont.cpp: Added.
              (WebCore::CachedFont::CachedFont):
              (WebCore::CachedFont::~CachedFont):
              (WebCore::CachedFont::ref):
              (WebCore::CachedFont::data):
              (WebCore::CachedFont::beginLoadIfNeeded):
              (WebCore::CachedFont::ensureCustomFontData):
              (WebCore::CachedFont::platformDataFromCustomData):
              (WebCore::CachedFont::allReferencesRemoved):
              (WebCore::CachedFont::checkNotify):
              (WebCore::CachedFont::error):
              * loader/CachedFont.h: Added.
              (WebCore::CachedFont::schedule):
              The implementation of CachedFont.  This represents the downloaded resource and has all the raw font data.
      
              * loader/CachedResource.h:
              (WebCore::CachedResource::):
              * loader/CachedResourceClient.h:
              (WebCore::CachedResourceClient::fontLoaded):
              Add a new fontLoaded method for clients of cached resources to track when fonts finish downloading.
      
              * loader/DocLoader.cpp:
              (WebCore::DocLoader::requestFont):
              * loader/DocLoader.h:
               Add the ability to request a font.
      
              * platform/Font.cpp:
              (WebCore::Font::operator==):
              (WebCore::Font::update):
              (WebCore::Font::drawText):
              * platform/Font.h:
              * platform/FontCache.cpp:
              (WebCore::FontCache::getFontData):
              * platform/FontCache.h:
              * platform/FontData.cpp:
              (WebCore::FontData::FontData):
              * platform/FontData.h:
              (WebCore::FontData::isCustomFont):
              (WebCore::FontData::isLoading):
              * platform/FontFallbackList.cpp:
              (WebCore::FontFallbackList::FontFallbackList):
              (WebCore::FontFallbackList::invalidate):
              (WebCore::FontFallbackList::fontDataAt):
              * platform/FontFallbackList.h:
              (WebCore::FontFallbackList::loadingCustomFonts):
              (WebCore::FontFallbackList::fontSelector):
              * platform/FontSelector.h: Added.
              (WebCore::FontSelector::~FontSelector):
              * platform/GlyphPageTreeNode.cpp:
              (WebCore::GlyphPageTreeNode::getRoot):
              (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
              (WebCore::GlyphPageTreeNode::~GlyphPageTreeNode):
              (WebCore::GlyphPageTreeNode::initializePage):
              (WebCore::GlyphPageTreeNode::getChild):
              (WebCore::GlyphPageTreeNode::pruneCustomFontData):
              * platform/GlyphPageTreeNode.h:
              (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
              (WebCore::GlyphPageTreeNode::page):
              * platform/PopupMenuClient.h:
              * platform/mac/FontCacheMac.mm:
              (WebCore::FontCache::getFontDataForCharacters):
              (WebCore::FontCache::getLastResortFallbackFont):
              (WebCore::FontCache::fontExists):
              (WebCore::FontCache::createFontPlatformData):
              * platform/mac/FontCustomPlatformData.cpp: Added.
              (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
              (WebCore::FontCustomPlatformData::fontPlatformData):
              (WebCore::createFontCustomPlatformData):
              * platform/mac/FontCustomPlatformData.h: Added.
              (WebCore::FontCustomPlatformData::FontCustomPlatformData):
              * platform/mac/FontDataMac.mm:
              (WebCore::initFontData):
              (WebCore::FontData::platformInit):
              (WebCore::FontData::smallCapsFontData):
              (WebCore::FontData::platformWidthForGlyph):
              (WebCore::FontData::checkShapesArabic):
              * platform/mac/FontMac.mm:
              (WebCore::initializeATSUStyle):
              (WebCore::Font::drawGlyphs):
              * platform/mac/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData):
              (WebCore::FontPlatformData::hash):
              (WebCore::FontPlatformData::operator==):
              * platform/mac/FontPlatformDataMac.mm: Added.
              (WebCore::FontPlatformData::FontPlatformData):
              (WebCore::~FontPlatformData):
              (WebCore::FontPlatformData::setFont):
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
              * platform/win/FontCacheWin.cpp:
              (WebCore::FontCache::getLastResortFallbackFont):
              (WebCore::FontCache::fontExists):
              * platform/win/FontCustomPlatformData.cpp: Added.
              (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
              (WebCore::FontCustomPlatformData::fontPlatformData):
              (WebCore::getData):
              (WebCore::releaseData):
              (WebCore::getBytesWithOffset):
              (WebCore::createFontCustomPlatformData):
              * platform/win/FontCustomPlatformData.h: Added.
              (WebCore::FontCustomPlatformData::FontCustomPlatformData):
              * platform/win/FontDataWin.cpp:
              (WebCore::FontData::platformInit):
              (WebCore::FontData::platformDestroy):
              (WebCore::FontData::smallCapsFontData):
              (WebCore::FontData::containsCharacters):
              (WebCore::FontData::determinePitch):
              * platform/win/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData):
              (WebCore::FontPlatformData::hash):
              (WebCore::FontPlatformData::operator==):
              * platform/win/FontPlatformDataWin.cpp:
              (WebCore::FontPlatformData::FontPlatformData):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::paint):
              Changes to platform to support rendering of custom fonts.  Too large to go into, but for ports, the relevant object to implement is
              FontCustomPlatformData (to get the data loaded into your native font format), and then you have to patch your other font objects to know
              how to use the font.
      
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::updateFromElement):
              (WebCore::RenderListBox::paintItemForeground):
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::fontSelector):
              * rendering/RenderMenuList.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::fontSelector):
              * rendering/RenderTextControl.h:
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::setFontFromControlSize):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::setFontFromControlSize):
              Patches for update now taking a font selector argument.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6ae4964
    • oliver's avatar
      Reviewed by Mitz. · 6b632bdc
      oliver authored
      Expose unitsPerEm() in Font classes.
      This is needed to implement SVG's advanced text decorations. We won't draw lines for text-decorations
      but fillable & strokable rectangles with a certain height, computed through unitsPerEm & font size.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b632bdc
  4. 17 Sep, 2007 1 commit
  5. 13 Sep, 2007 1 commit
  6. 11 Jul, 2007 1 commit
  7. 06 Jul, 2007 1 commit
  8. 29 Jun, 2007 1 commit
    • aroben's avatar
      Fix more signed/unsigned mismatches uncovered by MSVC /W3 · 6851a406
      aroben authored
      Reviewed by John.
      
      No regression tests possible.
      
      * platform/network/cf/ResourceResponseCFNet.cpp:
      (WebCore::filenameHasSaneExtension):
      * platform/win/FontDataWin.cpp:
      (WebCore::FontData::containsCharacters):
      * platform/win/PlatformScrollBarSafari.cpp:
      (WebCore::):
      * platform/win/UniscribeController.cpp:
      (WebCore::UniscribeController::advance):
      (WebCore::UniscribeController::shapeAndPlaceItem):
      * platform/win/WebCoreTextRenderer.cpp:
      (WebCore::doDrawTextAtPoint):
      * plugins/win/PluginDatabaseWin.cpp:
      (WebCore::parseVersionString):
      * plugins/win/PluginPackageWin.cpp:
      (WebCore::splitString):
      * plugins/win/PluginViewWin.cpp:
      (WebCore::freeStringArray):
      (WebCore::PluginViewWin::invalidateTimerFired):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6851a406
  9. 12 Jun, 2007 1 commit
  10. 07 Sep, 2006 1 commit
    • aroben's avatar
      2006-09-07 MorganL <morlmor@yahoo.com> · a55daed7
      aroben authored
              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: http://svn.webkit.org/repository/webkit/trunk@16264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a55daed7
  11. 29 Jul, 2006 1 commit
  12. 25 May, 2006 2 commits
  13. 24 May, 2006 2 commits
  14. 23 May, 2006 1 commit
  15. 22 May, 2006 2 commits
  16. 21 May, 2006 1 commit