Changeset 51540 in webkit


Ignore:
Timestamp:
Dec 1, 2009 8:46:38 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-01 Steve Block <steveblock@google.com>

Reviewed by Dimitri Glazkov.

Adds V8 bindings for Geolocation.
https://bugs.webkit.org/show_bug.cgi?id=30206

Also adds Geolocation files to Chrome build files.

  • WebCore.gyp/WebCore.gyp: Modified. Corrects list of Geolocation IDL files.
  • WebCore.gypi: Modified. Adds Geolocation files.
  • bindings/v8/DOMObjectsInclude.h: Modified. Adds Geolocation includes.
  • bindings/v8/DerivedSourcesAllInOne.cpp: Modified. Adds Geolocation files.
  • bindings/v8/V8Index.cpp: Modified. Includes Geolocation generated headers.
  • bindings/v8/V8Index.h: Modified. Adds Geolocation types to DOM_OBJECT_TYPES.
  • bindings/v8/custom/V8CoordinatesCustom.cpp: Added. Handles optional properties.
  • bindings/v8/custom/V8CustomBinding.h: Modified. Declares callbacks and getters.
  • bindings/v8/custom/V8CustomPositionCallback.cpp: Added. (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): Added. Constructor. (WebCore::V8CustomPositionCallback::~V8CustomPositionCallback): Added. Destructor. (WebCore::V8CustomPositionCallback::handleEvent): Added. Invokes callback.
  • bindings/v8/custom/V8CustomPositionCallback.h: Added. (WebCore::V8CustomPositionCallback::create): Added. Factory method.
  • bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Added. (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): Added. Constructor. (WebCore::V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback): Added. Destructor. (WebCore::V8CustomPositionErrorCallback::handleEvent): Added. Invokes callback.
  • bindings/v8/custom/V8CustomPositionErrorCallback.h: Added. (WebCore::V8CustomPositionErrorCallback::create): Added. Factory method.
  • bindings/v8/custom/V8GeolocationCustom.cpp: Added. (WebCore::throwTypeMismatchException): Added. Throws a type mismatch error. (WebCore::createPositionCallback): Added. Handles type checking for successCallback argument. (WebCore::createPositionErrorCallback): Added. Handles type checking for errorCallback argument. (WebCore::createPositionOptions): Added. Handles type checking for positionOptions argument.
Location:
trunk/WebCore
Files:
6 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51538 r51540  
     12009-12-01  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Adds V8 bindings for Geolocation.
     6        https://bugs.webkit.org/show_bug.cgi?id=30206
     7
     8        Also adds Geolocation files to Chrome build files.
     9
     10        * WebCore.gyp/WebCore.gyp: Modified. Corrects list of Geolocation IDL files.
     11        * WebCore.gypi: Modified. Adds Geolocation files.
     12        * bindings/v8/DOMObjectsInclude.h: Modified. Adds Geolocation includes.
     13        * bindings/v8/DerivedSourcesAllInOne.cpp: Modified. Adds Geolocation files.
     14        * bindings/v8/V8Index.cpp: Modified. Includes Geolocation generated headers.
     15        * bindings/v8/V8Index.h: Modified. Adds Geolocation types to DOM_OBJECT_TYPES.
     16        * bindings/v8/custom/V8CoordinatesCustom.cpp: Added. Handles optional properties.
     17        * bindings/v8/custom/V8CustomBinding.h: Modified. Declares callbacks and getters.
     18        * bindings/v8/custom/V8CustomPositionCallback.cpp: Added.
     19        (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): Added. Constructor.
     20        (WebCore::V8CustomPositionCallback::~V8CustomPositionCallback): Added. Destructor.
     21        (WebCore::V8CustomPositionCallback::handleEvent): Added. Invokes callback.
     22        * bindings/v8/custom/V8CustomPositionCallback.h: Added.
     23        (WebCore::V8CustomPositionCallback::create): Added. Factory method.
     24        * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Added.
     25        (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): Added. Constructor.
     26        (WebCore::V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback): Added. Destructor.
     27        (WebCore::V8CustomPositionErrorCallback::handleEvent): Added. Invokes callback.
     28        * bindings/v8/custom/V8CustomPositionErrorCallback.h: Added.
     29        (WebCore::V8CustomPositionErrorCallback::create): Added. Factory method.
     30        * bindings/v8/custom/V8GeolocationCustom.cpp: Added.
     31        (WebCore::throwTypeMismatchException): Added. Throws a type mismatch error.
     32        (WebCore::createPositionCallback): Added. Handles type checking for successCallback argument.
     33        (WebCore::createPositionErrorCallback): Added. Handles type checking for errorCallback argument.
     34        (WebCore::createPositionOptions): Added. Handles type checking for positionOptions argument.
     35
    1362009-12-01  Yury Semikhatsky  <yurys@chromium.org>
    237
  • trunk/WebCore/WebCore.gyp/WebCore.gyp

    r50961 r51540  
    229229        '../inspector/JavaScriptCallFrame.idl',
    230230
    231         # ENABLE_GEOLOCATION only.
    232         '../page/Geolocation.idl',
    233         '../page/Geoposition.idl',
    234         '../page/PositionCallback.idl',
    235         '../page/PositionError.idl',
    236         '../page/PositionErrorCallback.idl',
    237 
    238231        # Bindings with custom Objective-C implementations.
    239232        '../page/AbstractView.idl',
  • trunk/WebCore/WebCore.gypi

    r51528 r51540  
    190190            'page/BarInfo.idl',
    191191            'page/Console.idl',
     192            'page/Coordinates.idl',
    192193            'page/DOMSelection.idl',
    193194            'page/DOMWindow.idl',
     
    652653            'bindings/v8/custom/V8ClientRectListCustom.cpp',
    653654            'bindings/v8/custom/V8ClipboardCustom.cpp',
     655            'bindings/v8/custom/V8CoordinatesCustom.cpp',
    654656            'bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp',
    655657            'bindings/v8/custom/V8ConsoleCustom.cpp',
     
    658660            'bindings/v8/custom/V8CustomEventListener.cpp',
    659661            'bindings/v8/custom/V8CustomEventListener.h',
     662            'bindings/v8/custom/V8CustomPositionCallback.cpp',
     663            'bindings/v8/custom/V8CustomPositionCallback.h',
     664            'bindings/v8/custom/V8CustomPositionErrorCallback.cpp',
     665            'bindings/v8/custom/V8CustomPositionErrorCallback.h',
    660666            'bindings/v8/custom/V8CustomSQLStatementCallback.cpp',
    661667            'bindings/v8/custom/V8CustomSQLStatementCallback.h',
     
    681687            'bindings/v8/custom/V8EventCustom.cpp',
    682688            'bindings/v8/custom/V8FileListCustom.cpp',
     689            'bindings/v8/custom/V8GeolocationCustom.cpp',
    683690            'bindings/v8/custom/V8HTMLAudioElementConstructor.cpp',
    684691            'bindings/v8/custom/V8HTMLAudioElementConstructor.h',
  • trunk/WebCore/bindings/v8/DOMObjectsInclude.h

    r51528 r51540  
    186186#endif // DOM_STORAGE
    187187
     188// GEOLOCATION
     189#include "Coordinates.h"
     190#include "Geolocation.h"
     191#include "Geoposition.h"
     192#include "PositionError.h"
     193
    188194#if ENABLE(SVG)
    189195#include "SVGAngle.h"
  • trunk/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp

    r51528 r51540  
    6969#include "bindings/V8CompositionEvent.cpp"
    7070#include "bindings/V8Console.cpp"
     71#include "bindings/V8Coordinates.cpp"
    7172#include "bindings/V8Counter.cpp"
    7273#include "bindings/V8CSSCharsetRule.cpp"
     
    103104#include "bindings/V8File.cpp"
    104105#include "bindings/V8FileList.cpp"
     106#include "bindings/V8Geolocation.cpp"
     107#include "bindings/V8Geoposition.cpp"
    105108#include "bindings/V8History.cpp"
    106109#include "bindings/V8HTMLAllCollection.cpp"
     
    199202#include "bindings/V8Plugin.cpp"
    200203#include "bindings/V8PluginArray.cpp"
     204#include "bindings/V8PositionError.cpp"
    201205#include "bindings/V8ProcessingInstruction.cpp"
    202206#include "bindings/V8ProgressEvent.cpp"
  • trunk/WebCore/bindings/v8/V8Index.cpp

    r51528 r51540  
    439439#endif
    440440
     441// Geolocation
     442#include "V8Coordinates.h"
     443#include "V8Geolocation.h"
     444#include "V8Geoposition.h"
     445#include "V8PositionError.h"
     446
    441447namespace WebCore {
    442448
  • trunk/WebCore/bindings/v8/V8Index.h

    r51528 r51540  
    495495#endif
    496496
     497#define DOM_OBJECT_GEOLOCATION_TYPES(V)                                 \
     498    V(COORDINATES, Coordinates)                                         \
     499    V(GEOLOCATION, Geolocation)                                         \
     500    V(GEOPOSITION, Geoposition)                                         \
     501    V(POSITIONERROR, PositionError)
     502
    497503#define DOM_OBJECT_TYPES(V)                                             \
    498504    DOM_OBJECT_TYPES_1(V)                                               \
     
    504510    DOM_OBJECT_XPATH_TYPES(V)                                           \
    505511    DOM_OBJECT_XSLT_TYPES(V)                                            \
    506     DOM_OBJECT_INSPECTOR_TYPES(V)
     512    DOM_OBJECT_INSPECTOR_TYPES(V)                                       \
     513    DOM_OBJECT_GEOLOCATION_TYPES(V)
    507514
    508515#if ENABLE(SVG)
  • trunk/WebCore/bindings/v8/custom/V8CustomBinding.h

    r51528 r51540  
    687687#endif
    688688
     689        DECLARE_CALLBACK(GeolocationGetCurrentPosition);
     690        DECLARE_CALLBACK(GeolocationWatchPosition);
     691        DECLARE_PROPERTY_ACCESSOR_GETTER(CoordinatesAltitude);
     692        DECLARE_PROPERTY_ACCESSOR_GETTER(CoordinatesAltitudeAccuracy);
     693        DECLARE_PROPERTY_ACCESSOR_GETTER(CoordinatesHeading);
     694        DECLARE_PROPERTY_ACCESSOR_GETTER(CoordinatesSpeed);
     695
    689696#undef DECLARE_INDEXED_ACCESS_CHECK
    690697#undef DECLARE_NAMED_ACCESS_CHECK
Note: See TracChangeset for help on using the changeset viewer.