Changeset 64160 in webkit


Ignore:
Timestamp:
Jul 27, 2010 2:30:36 PM (14 years ago)
Author:
brettw@chromium.org
Message:

2010-07-27 Brett Wilson <brettw@chromium.org>

Reviewed by Darin Fisher.

Add the ability to select fonts and do basic text drawing to the
Chromium WebKit API.
https://bugs.webkit.org/show_bug.cgi?id=42999

  • WebKit.gyp:
  • public/WebFloatPoint.h: Added. (WebKit::WebFloatPoint::WebFloatPoint): (WebKit::WebFloatPoint::operator=): (WebKit::WebFloatPoint::operator WebCore::FloatPoint): (WebKit::operator==): (WebKit::operator!=):
  • public/WebFloatRect.h: Added. (WebKit::WebFloatRect::isEmpty): (WebKit::WebFloatRect::WebFloatRect): (WebKit::WebFloatRect::operator=): (WebKit::WebFloatRect::operator WebCore::FloatRect): (WebKit::operator==): (WebKit::operator!=):
  • public/WebFont.h: Added.
  • public/WebFontDescription.h: Added. (WebKit::WebFontDescription::): (WebKit::WebFontDescription::WebFontDescription):
  • public/WebTextRun.h: Added. (WebKit::WebTextRun::WebTextRun):
  • src/AssertMatchingEnums.cpp:
  • src/WebFontDescription.cpp: Added. (WebKit::WebFontDescription::WebFontDescription): (WebKit::WebFontDescription::operator WebCore::FontDescription):
  • src/WebFontImpl.cpp: Added. (WebKit::WebFont::Create): (WebKit::WebFontImpl::WebFontImpl): (WebKit::WebFontImpl::fontDescription): (WebKit::WebFontImpl::ascent): (WebKit::WebFontImpl::descent): (WebKit::WebFontImpl::height): (WebKit::WebFontImpl::lineSpacing): (WebKit::WebFontImpl::xHeight): (WebKit::WebFontImpl::drawText): (WebKit::WebFontImpl::computeWidth): (WebKit::WebFontImpl::offsetForPosition): (WebKit::WebFontImpl::selectionRectForText):
  • src/WebFontImpl.h: Added.
  • src/WebTextRun.cpp: Added. (WebKit::WebTextRun::operator WebCore::TextRun):
Location:
trunk/WebKit/chromium
Files:
9 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r64151 r64160  
     12010-07-27  Brett Wilson  <brettw@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        Add the ability to select fonts and do basic text drawing to the
     6        Chromium WebKit API.
     7        https://bugs.webkit.org/show_bug.cgi?id=42999
     8
     9        * WebKit.gyp:
     10        * public/WebFloatPoint.h: Added.
     11        (WebKit::WebFloatPoint::WebFloatPoint):
     12        (WebKit::WebFloatPoint::operator=):
     13        (WebKit::WebFloatPoint::operator WebCore::FloatPoint):
     14        (WebKit::operator==):
     15        (WebKit::operator!=):
     16        * public/WebFloatRect.h: Added.
     17        (WebKit::WebFloatRect::isEmpty):
     18        (WebKit::WebFloatRect::WebFloatRect):
     19        (WebKit::WebFloatRect::operator=):
     20        (WebKit::WebFloatRect::operator WebCore::FloatRect):
     21        (WebKit::operator==):
     22        (WebKit::operator!=):
     23        * public/WebFont.h: Added.
     24        * public/WebFontDescription.h: Added.
     25        (WebKit::WebFontDescription::):
     26        (WebKit::WebFontDescription::WebFontDescription):
     27        * public/WebTextRun.h: Added.
     28        (WebKit::WebTextRun::WebTextRun):
     29        * src/AssertMatchingEnums.cpp:
     30        * src/WebFontDescription.cpp: Added.
     31        (WebKit::WebFontDescription::WebFontDescription):
     32        (WebKit::WebFontDescription::operator WebCore::FontDescription):
     33        * src/WebFontImpl.cpp: Added.
     34        (WebKit::WebFont::Create):
     35        (WebKit::WebFontImpl::WebFontImpl):
     36        (WebKit::WebFontImpl::fontDescription):
     37        (WebKit::WebFontImpl::ascent):
     38        (WebKit::WebFontImpl::descent):
     39        (WebKit::WebFontImpl::height):
     40        (WebKit::WebFontImpl::lineSpacing):
     41        (WebKit::WebFontImpl::xHeight):
     42        (WebKit::WebFontImpl::drawText):
     43        (WebKit::WebFontImpl::width):
     44        (WebKit::WebFontImpl::offsetForPosition):
     45        (WebKit::WebFontImpl::selectionRectForText):
     46        * src/WebFontImpl.h: Added.
     47        * src/WebTextRun.cpp: Added.
     48        (WebKit::WebTextRun::operator WebCore::TextRun):
     49
    1502010-07-27  Dumitru Daniliuc  <dumi@chromium.org>
    251
  • trunk/WebKit/chromium/WebKit.gyp

    r64112 r64160  
    157157                'public/WebFileSystem.h',
    158158                'public/WebFindOptions.h',
     159                'public/WebFloatPoint.h',
     160                'public/WebFloatRect.h',
     161                'public/WebFont.h',
     162                'public/WebFontDescription.h',
    159163                'public/WebFrame.h',
    160164                'public/WebFrameClient.h',
     
    248252                'public/WebTextDirection.h',
    249253                'public/WebTextInputType.h',
     254                'public/WebTextRun.h',
    250255                'public/WebThemeEngine.h',
    251256                'public/WebURL.h',
     
    392397                'src/WebFileChooserCompletionImpl.h',
    393398                'src/WebFontCache.cpp',
     399                'src/WebFontDescription.cpp',
     400                'src/WebFontImpl.cpp',
     401                'src/WebFontImpl.h',
    394402                'src/WebFormControlElement.cpp',
    395403                'src/WebFormElement.cpp',
     
    473481                'src/WebStorageNamespaceImpl.h',
    474482                'src/WebString.cpp',
     483                'src/WebTextRun.cpp',
    475484                'src/WebURL.cpp',
    476485                'src/WebURLLoadTiming.cpp',
  • trunk/WebKit/chromium/src/AssertMatchingEnums.cpp

    r63064 r64160  
    3737#include "ApplicationCacheHost.h"
    3838#include "EditorInsertAction.h"
     39#include "FontDescription.h"
     40#include "FontSmoothingMode.h"
    3941#include "HTMLInputElement.h"
    4042#include "IDBKey.h"
     
    5355#include "WebCursorInfo.h"
    5456#include "WebEditingAction.h"
     57#include "WebFontDescription.h"
    5558#include "WebIDBKey.h"
    5659#include "WebInputElement.h"
     
    236239COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionDropped, EditorInsertActionDropped);
    237240
     241COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyNone, FontDescription::NoFamily);
     242COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyStandard, FontDescription::StandardFamily);
     243COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySerif, FontDescription::SerifFamily);
     244COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySansSerif, FontDescription::SansSerifFamily);
     245COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyMonospace, FontDescription::MonospaceFamily);
     246COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyCursive, FontDescription::CursiveFamily);
     247COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyFantasy, FontDescription::FantasyFamily);
     248
     249COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingAuto, AutoSmoothing);
     250COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingNone, NoSmoothing);
     251COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingGrayscale, Antialiased);
     252COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingSubpixel, SubpixelAntialiased);
     253
     254COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight100, FontWeight100);
     255COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight200, FontWeight200);
     256COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight300, FontWeight300);
     257COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight400, FontWeight400);
     258COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight500, FontWeight500);
     259COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight600, FontWeight600);
     260COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight700, FontWeight700);
     261COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight800, FontWeight800);
     262COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight900, FontWeight900);
     263COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal);
     264COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold);
     265
    238266COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Text, HTMLInputElement::TEXT);
    239267COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Password, HTMLInputElement::PASSWORD);
     
    327355COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
    328356COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
     357
     358
Note: See TracChangeset for help on using the changeset viewer.