1. 02 May, 2008 1 commit
  2. 01 May, 2008 4 commits
    • weinig@apple.com's avatar
      2008-05-01 Sam Weinig <sam@webkit.org> · 9ee4418c
      weinig@apple.com authored
              Reviewed by Mark Rowe (in his infinite wisdom).
      
              Auto-generate the JSXSLTProcessor binding.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getValueProperty):
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::):
              * bindings/js/JSXSLTProcessor.cpp: Removed.
              * bindings/js/JSXSLTProcessor.h: Removed.
              * xml/XSLTProcessor.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ee4418c
    • weinig@apple.com's avatar
      WebCore: · 796309ca
      weinig@apple.com authored
      2008-05-01  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              Fixes:
                - https://bugs.webkit.org/show_bug.cgi?id=17249
                  Incorrect lexical scope after navigation leads to UXSS
                  <rdar://problem/5738497>
      
                - https://bugs.webkit.org/show_bug.cgi?id=16824
                  Script authorization should follow lexical (not dynamic) scope
                  <rdar://problem/5683032>
      
              This patch changes us to perform same-origin checks based on the lexical global object) 
              rather than dynamic global object, which is now possible we don't re-use the window on 
              navigations, but rather switch in a new one and re-use the outer shell.  This is both
              more secure and conforms with the HTML5 specification.  Now that all the checks are
              done based on the lexical global object, we can remove the SecurityOrigin::Reason
              concept, as it was only around to work around an ebay.com bug that required the check to
              be done that way.
      
              An important thing to note is that we currently implement a stricter than necessary policy
              and perform the same-origin check based on the currently active global object to avoid leaking
              the document in cases when the target frame is navigated before access.  This will be fixed in
              an upcoming patch.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::allowsAccessFrom):
              (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
              (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
              (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
              (WebCore::JSDOMWindowBase::printErrorMessage):
              (WebCore::asJSDOMWindow):
              * bindings/js/JSDOMWindowBase.h:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::checkOrigin):
              (WebCore::CanvasRenderingContext2D::createPattern):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::begin):
              (WebCore::FrameLoader::write):
              (WebCore::FrameLoader::setOpener):
              (WebCore::FrameLoader::shouldAllowNavigation):
              * page/DOMWindow.h:
              (WebCore::DOMWindow::setSecurityOrigin):
              (WebCore::DOMWindow::securityOrigin):
              (WebCore::DOMWindow::setURL):
              (WebCore::DOMWindow::url):
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::canAccess):
              (WebCore::SecurityOrigin::isSecureTransitionTo):
              * platform/SecurityOrigin.h:
      
      LayoutTests:
      
      2008-05-01  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              * http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
              * http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
              * http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
              * http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
              * http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
              * http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
              * http/tests/security/xss-eval-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      796309ca
    • mjs@apple.com's avatar
      2008-05-01 Maciej Stachowiak <mjs@apple.com> · e7c7f73a
      mjs@apple.com authored
              Reviewed by Oliver (a while ago)
      
              - just a wee bit more bindings speedup
              
              Store the per-document Node --> JS wrapper cache in the document
              instead of an external hashtable.
      
              * bindings/js/kjs_binding.cpp:
              (WebCore::ScriptInterpreter::getDOMNodeForDocument):
              (WebCore::ScriptInterpreter::forgetDOMNodeForDocument):
              (WebCore::ScriptInterpreter::putDOMNodeForDocument):
              (WebCore::ScriptInterpreter::forgetAllDOMNodesForDocument):
              (WebCore::ScriptInterpreter::markDOMNodesForDocument):
              * dom/Document.h:
              (WebCore::Document::wrapperCache):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7c7f73a
    • weinig@apple.com's avatar
      2008-05-01 Sam Weinig <sam@webkit.org> · d90896de
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Rename toJSDOMWindow(KJS::JSGlobalObject) to asJSDOMWindow, as all it does is
              cast.
      
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::toVoidCallback):
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::create):
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::add):
              (WebCore::JSDOMApplicationCache::remove):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::allowPopUp):
              (WebCore::createWindow):
              (WebCore::windowProtoFuncOpen):
              (WebCore::asJSDOMWindow):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              (WebCore::JSDOMWindow::postMessage):
              * bindings/js/JSDatabaseCustom.cpp:
              (WebCore::JSDatabase::changeVersion):
              (WebCore::JSDatabase::transaction):
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::setLocation):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::navigateIfAllowed):
              (WebCore::JSLocation::setHref):
              (WebCore::JSLocation::replace):
              (WebCore::JSLocation::reload):
              (WebCore::JSLocation::assign):
              * bindings/js/JSSQLTransactionCustom.cpp:
              (WebCore::JSSQLTransaction::executeSql):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              (WebCore::JSXMLHttpRequest::open):
              * page/JavaScriptDebugServer.cpp:
              (WebCore::toPage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d90896de
  3. 29 Apr, 2008 2 commits
    • ddkilzer@apple.com's avatar
      JavaScriptCore: · 8fe65866
      ddkilzer@apple.com authored
      2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin.
      
              Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
      
              * wtf/Platform.h:
      
      WebCore:
      
      2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin.
      
              Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
      
              * DerivedSources.make:
              * WebCore.DashboardSupport.exp: Added.
              * WebCore.base.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::setLocation):
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              * css/CSSPrimitiveValue.cpp:
              (WebCore::CSSPrimitiveValue::cleanup):
              (WebCore::CSSPrimitiveValue::cssText):
              * css/CSSPropertyNames.in:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * css/DashboardRegion.h:
              * css/DashboardSupportCSSPropertyNames.in: Added.
              * dom/DOMImplementation.cpp:
              (WebCore::DOMImplementation::createDocument):
              * dom/Document.cpp:
              (WebCore::Document::Document):
              (WebCore::Document::importNode):
              * dom/Document.h:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::fill):
              (WebCore::CanvasRenderingContext2D::stroke):
              (WebCore::CanvasRenderingContext2D::clip):
              * html/CanvasRenderingContext2D.h:
              * html/HTMLCanvasElement.cpp:
              * html/HTMLCanvasElement.h:
              * page/Chrome.cpp:
              * page/ChromeClient.h:
              * page/Frame.cpp:
              (WebCore::Frame::paint):
              * page/Frame.h:
              * page/FrameView.cpp:
              (WebCore::FrameView::layout):
              * page/FrameView.h:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              * page/Settings.h:
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
              * page/mac/FrameMac.mm:
              * page/mac/WebDashboardRegion.h:
              * page/mac/WebDashboardRegion.m:
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::scrollToOffset):
              (WebCore::RenderLayer::setHasHorizontalScrollbar):
              (WebCore::RenderLayer::setHasVerticalScrollbar):
              (WebCore::RenderLayer::updateScrollInfoAfterLayout):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::setStyle):
              * rendering/RenderObject.h:
              * rendering/RenderStyle.cpp:
              (WebCore::StyleRareNonInheritedData::operator==):
              (WebCore::RenderStyle::diff):
              * rendering/RenderStyle.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::send):
              (WebCore::XMLHttpRequest::setRequestHeader):
      
      WebKit/mac:
      
      2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin.
      
              Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
      
              * WebCoreSupport/WebChromeClient.h:
              * WebCoreSupport/WebChromeClient.mm:
              * WebView/WebClipView.m:
              (-[WebClipView scrollWheel:]):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView addMouseMovedObserver]):
              (-[WebHTMLView removeMouseMovedObserver]):
              (-[WebHTMLView acceptsFirstMouse:]):
              * WebView/WebUIDelegatePrivate.h:
              * WebView/WebView.mm:
              (-[WebViewPrivate init]):
              * WebView/WebViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8fe65866
    • timothy@apple.com's avatar
      Fixes a regression where the Page's debugger would not be reattached · e6a5e432
      timothy@apple.com authored
      when a new JSDOMWindow is created.
      
      Reviewed by Sam Weinig.
      
      * bindings/js/kjs_proxy.cpp:
      (WebCore::KJSProxy::clear): Call attachDebugger after creating the JSDOMWindow.
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore): For the case where the CachedPage doesn't
      contain a window, reattach the debugger to the new JSDOMWindow by calling
      proxy->attachDebugger. Also restore the setPageGroupIdentifier.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6a5e432
  4. 28 Apr, 2008 2 commits
  5. 27 Apr, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 3beb3006
      darin@apple.com authored
      2008-04-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - fix <rdar://problem/5657459> REGRESSION: JavaScriptCore no longer builds with
                GCC 4.2 due to pointer aliasing warnings
      
              Fix this by removing the HashTable optimizations that allowed us to share a back end
              implementation between hash tables with integers, pointers, RefPtr, and String objects
              as keys. The way it worked was incompatible with strict aliasing.
      
              This increases code size. On Mac OS X we'll have to regenerate .order files to avoid
              slowing down Safari startup times.
      
              This creates a slight slowdown in SunSpider, mitigated by the following four speedups:
      
              - speed up array put slightly by moving a branch (was already done for get)
      
              - speed up symbol table access by adding a function named inlineGet to HashMap
                and using that in symbolTableGet/Put
      
              - speed up PropertyNameArray creation by reducing the amount of reference count
                churn and uniqueness checking when adding names and not doing any allocation at
                all when building small arrays
      
              - speed up conversion of strings to floating point numbers by eliminating the
                malloc/free of the buffer for the ASCII copy of the string; a way to make
                things even faster would be to change strtod to take a UTF-16 string
      
              Note that there is considerable unused complexity now in HashSet/Map/Table to support
              "storage types", which is no longer used. Will do in a separate patch.
      
              * API/JSCallbackObjectFunctions.h:
              (KJS::JSCallbackObject<Base>::getPropertyNames): Removed explicit cast to Identifier to
              take advantage of the new PropertyNameArray::add overload and avoid reference count churn.
              * API/JSObjectRef.cpp:
              (JSPropertyNameAccumulatorAddName): Ditto.
              * JavaScriptCore.exp: Updated PropertyNameArray::add entry point name.
      
              * kjs/JSVariableObject.cpp: Removed now-unneeded IdentifierRepHashTraits::nullRepPtr
              definition (see below).
              (KJS::JSVariableObject::getPropertyNames): Removed explicit cast to Identifier.
      
              * kjs/JSVariableObject.h:
              (KJS::JSVariableObject::symbolTableGet): Use inlineGet for speed. Also changed to do
              early exit instead of nesting the body inside an if.
              (KJS::JSVariableObject::symbolTablePut): Ditto.
      
              * kjs/PropertyNameArray.cpp:
              (KJS::PropertyNameArray::add): Changed implementation to take a raw pointer instead of
              a reference to an identifier. Do uniqueness checking by searching the vector when the
              vector is short, only building the set once the vector is large enough.
      
              * kjs/PropertyNameArray.h: Added an overload of add for a raw pointer, and made the old
              add function call that one. Added an addKnownUnique function for use when the new
              name is known to be different from any other in the array. Changed the vector to have
              an inline capacity of 20.
      
              * kjs/SymbolTable.h: Changed IdentifierRepHash to inherit from the default hash for
              a RefPtr so we don't have to define so much. Added an overload of the hash function for
              a raw pointer as required by the new RefPtrHashMap. Got rid of the now-unneeded
              IdentifierRepHashTraits -- the default traits now work fine. Added a definition of
              empthValueIsZero to SymbolTableIndexHashTraits; not having it was incorrect, but harmless.
      
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::put): Move the maxArrayIndex check inside the branch that checks
              the index against the length, as done in the get function.
      
              * kjs/function.cpp:
              (KJS::globalFuncKJSPrint): Changed to use the new getCString instead of cstring.
      
              * kjs/internal.cpp: Removed printInfo debugging function, a client of cstring.
              If we need a debugging function we can easily make a better one and we haven't
              used this one in a long time.
              * kjs/internal.h: Ditto.
      
              * kjs/object.cpp:
              (KJS::JSObject::getPropertyNames): Removed explicit cast to Identifier.
              * kjs/property_map.cpp:
              (KJS::PropertyMap::getEnumerablePropertyNames): Ditto. Also added a special case for
              the case where the propertyNames array is empty -- in that case we know we're adding
              a set of names that are non-overlapping so we can use addKnownUnique.
              * kjs/ustring.cpp:
              (KJS::UString::getCString): Replaces cstring. Puts the C string into a CStringBuffer,
              which is a char Vector with an inline capacity. Also returns a boolean to indicate if
              the converion was lossy, which eliminates the need for a separate is8Bit call.
              (KJS::UString::toDouble): Changed to call getCString instead of cstring.
              * kjs/ustring.h: Ditto.
      
              * wtf/HashFunctions.h: Overload the hash and equal functions for RefPtr's default
              hash to take raw pointers. This works with the changes to RefPtrHashMap to avoid
              introducing refcount churn.
      
              * wtf/HashMap.h: Removed special code to convert the deleted value to the empty value
              when writing a new value into the map. This is now handled elsewhere.
              (WTF::HashMap::get): Removed code that checks for an empty hash table before calling
              HashTable::lookup; it's slightly more efficient to do this check inside lookup.
      
              * wtf/HashTable.h:
              (WTF::HashTable::isDeletedBucket): Changed to use isDeletedValue instead of using
              deletedValue and the equality operator.
              (WTF::HashTable::deleteBucket): Changed to use constructDeletedValue instead of
              using deletedValue and the assignment operator.
              (WTF::HashTable::checkKey): Added. Factors out the check for values that are empty
              or deleted keys that's used in various functions below.
              (WTF::HashTable::lookup): Changed to use checkKey, check for a 0 table, and also
              made public for use by RefPtrHashMap.
              (WTF::HashTable::lookupForWriting): Changed to use checkKey.
              (WTF::HashTable::fullLookupForWriting): Changed to use checkKey.
              (WTF::HashTable::add): Changed to use checkKey, and call initializeBucket on a
              deleted bucket before putting a new entry into it.
              (WTF::HashTable::addPassingHashCode): Ditto.
              (WTF::HashTable::deallocateTable): Check isDeletedBucket before calling ~ValueType.
      
              * wtf/HashTraits.h: Got ridd of all the HashTraits specialization for the integer
              types, since GeneicHashTraitsBase already deals with integers separately. Put the
              deleted value support into GenericHashTraitsBase. Changed FloatHashTraits to
              inherit from GenericHashTraits, and define construct/isDeletedValue rather than
              deletedValue. Removed the ref and deref functions from RefPtr's HashTraits, and
              defined construct/isDeletedValue. Eliminated DeletedValueAssigner. Changed
              PairHashTraits to define construct/isDeletedValue, and also merged
              PairBaseHashTraits in with PairHashTraits. Got rid of all specialization of
              HashKeyStorageTraits. We'll remove that, and the needsRef data member, later.
      
              * wtf/RefPtr.h: Added HashTableDeletedValueType, an enum type with a single value,
              HashTableDeletedValue. Used that type to make a new constructor to construct
              deleted values and also added an isHashTableDeletedValue function.
      
              * wtf/RefPtrHashMap.h: Added RefPtrHashMapRawKeyTranslator and used it to implement
              the raw pointer functions. This is a way to continue to avoid refcount thrash. We
              can't use the old way because it depended on the underlying map using a non-RefPtr
              type.
              (WTF::HashMap::find): Use find with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::contains): Use contains with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::inlineAdd): Use add with RefPtrHashMapRawKeyTranslator.
              (WTF::HashMap::get): Removed code that checks for an empty hash table before calling
              HashTable::lookup; it's slightly more efficient to do this check inside lookup.
              (WTF::HashMap::inlineGet): Added. Just like get, but marked inline for use in the
              symbol table code.
      
      WebCore:
      
      2008-04-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - update for compatibility with HashTable that no longer has optimization to share
                implementation between hash tables with integers, pointers, RefPtr, and String
                objects as keys
      
              * bindings/js/JSSVGPODTypeWrapper.h:
              (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo): Added constructor
              for HashTableDeletedValue.
              (WebCore::PODTypeReadWriteHashInfo::isHashTableDeletedValue): Added.
              (WebCore::PODTypeReadWriteHashInfoTraits::constructDeletedValue): Added.
              (WebCore::PODTypeReadWriteHashInfoTraits::isDeletedValue): Added.
      
              * dom/Document.cpp: Made changedDocuments internal to the file rather than a
              static data member of Document.
              (WebCore::FormElementKey::ref): Removed unneeded check for deleted value -- this
              will never be called on a deleted element.
              (WebCore::FormElementKey::deref): Ditto.
      
              * dom/Document.h: Added HashTableDeletedValue constructor and isHashTableDeletedValue
              to FormElementKey. Changed FormElementKeyHashTraits to use construct/isDeletedValue.
              Got rid of the changedDocuments data member. Changed iconURL to be an inline that
              returns a const String&.
      
              * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to use
              construct/isDeletedValue.
      
              * page/mac/AXObjectCacheMac.mm:
              (WebCore::AXObjectCache::getAXID): Call isDeletedValue instead of deletedValue.
      
              * platform/SecurityOriginHash.h: Added overload so that SecurityOriginHash can work
              with raw pointers as well as RefPt (helpful with the new RefPtrHashMap). Eliminated
              SecurityOriginTraits, since we can now use the default traits. Changed the value of
              safeToCompareToEmptyOrDeleted to false, since it's not safe to compare a deleted
              value using this hash function. I don't think it was safe before either; I'm not sure
              why it didn't cause a problem before.
      
              * platform/cf/SchedulePair.h: Removed SchedulePairTraits -- custom traits are no
              longer needed.
      
              * platform/graphics/FontCache.cpp:
              (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Added constructor
              for HashTableDeletedValue.
              (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): Added.
              (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Added.
              (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): Added.
              (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): Added.
              (WebCore::FontDataCacheKeyTraits::constructDeletedValue): Added.
              (WebCore::FontDataCacheKeyTraits::isDeletedValue): Added.
      
              * platform/graphics/IntSizeHash.h: Changed HashTraits<IntSize> to use
              construct/isDeletedValue.
      
              * platform/graphics/mac/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData): Added constructor for
              HashTableDeletedValue.
              (WebCore::FontPlatformData::isHashTableDeletedValue): Added.
              (WebCore::FontPlatformData::hashTableDeletedFontValue): Added.
      
              * platform/text/PlatformString.h:
              (WebCore::String::swap): Added. Avoids any refcount churn when swapping two strings.
              (WebCore::String::String): Added constructor for HashTableDeletedValue.
              (WebCore::String::isHashTableDeletedValue): Added.
              (WebCore::swap): Added. Avoids any refcount churn when swapping two strings.
      
              * platform/text/StringHash.h: Changed specialization of HashTraits for
              WebCore::String to use the deleted value now defined in that class and removed
              the code to do ref/deref. Removed HashKeyStorageTraits specializations.
              
              * platform/win/COMPtr.h: Changed specialization of HashTraits for
              COMPtr to use the deleted value now defined in that class and removed
              the code to do ref/deref. Removed HashKeyStorageTraits specializations.
              (COMPtr::COMPtr): Added constructor for HashTableDeletedValue.
              (COMPtr::isHashTableDeletedValue): Added.
              (COMPtr::query): Removed inline keyword not needed since functions defined in the
              class definition are automatically marked inline.
              (COMPtr::hashTableDeletedValue): Added.
      
              * storage/DatabaseTracker.h: Removed now-unneeded SecurityOriginTraits.
              * storage/LocalStorage.h: Ditto.
              * storage/OriginQuotaManager.h: Ditto.
              * storage/SessionStorage.h: Ditto.
      
              * svg/SVGAnimatedTemplate.h:
              (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey): Added constructor
              for HashTableDeletedValue.
              (WebCore::SVGAnimatedTypeWrapperKey::isHashTableDeletedValue): Added.
              (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::constructDeletedValue): Added.
              (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::isDeletedValue): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3beb3006
  6. 26 Apr, 2008 1 commit
    • weinig@apple.com's avatar
      WebCore: · 205006ed
      weinig@apple.com authored
      2008-04-26  Adam Barth  <hk9565@gmail.com>
      
              Reviewed by Adam Roben and Sam Weinig.
      
              Fixes bug http://bugs.webkit.org/show_bug.cgi?id=17331
              Fixes bug http://bugs.webkit.org/show_bug.cgi?id=16848
              
              Updates postMessage implementation to match HTML 5 specification:
              1) Adds origin parameter to postMessage.
              2) Removes domain and uri attributes of MessageEvent in favor of
                 origin attribute.
      
              In order to do this correctly, we need to distinguish between hosts and domains
              in the SecurityOrigin class. There are now three ways to compare security origins:
              1) isSameSchemeHostPort compares scheme, host, and port, and is used for postMessage
              2) equal compares all aspects of the security origin, and is used for hash keys
              3) canAccess understands the semantics of schemes such as file:// and data:// URLs,
                 and should be used for scripting access checks.
      
              Changed SecurityOrigin::toString() to generate identifiers that are suitable for 
              being used as a MessageEvent's origin property. In the future, they could be used 
              as database string identifiers as well. Re-used KURL parser to parse serialized 
              SecurityOrigins.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
              
              Tests: http/tests/security/postMessage/invalid-origin-throws-exception.html
                     http/tests/security/postMessage/javascript-page-still-sends-origin.html
                     http/tests/security/postMessage/origin-unaffected-by-base-tag.html
                     http/tests/security/postMessage/origin-unaffected-by-document-domain.html
                     http/tests/security/postMessage/target-origin.html
      
              * WebCore.base.exp:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::postMessage):
              * dom/Document.cpp:
              (WebCore::Document::domain):
              * dom/MessageEvent.cpp:
              (WebCore::MessageEvent::MessageEvent):
              (WebCore::MessageEvent::initMessageEvent):
              * dom/MessageEvent.h:
              (WebCore::MessageEvent::origin):
              * dom/MessageEvent.idl:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::checkOrigin):
              (WebCore::CanvasRenderingContext2D::createPattern):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::postMessage):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::SecurityOrigin):
              (WebCore::SecurityOrigin::create):
              (WebCore::SecurityOrigin::createForFrame):
              (WebCore::SecurityOrigin::copy):
              (WebCore::SecurityOrigin::setDomainFromDOM):
              (WebCore::SecurityOrigin::canAccess):
              (WebCore::SecurityOrigin::isSecureTransitionTo):
              (WebCore::SecurityOrigin::toString):
              (WebCore::SecurityOrigin::createFromString):
              (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
              (WebCore::SecurityOrigin::databaseIdentifier):
              (WebCore::SecurityOrigin::equal):
              (WebCore::SecurityOrigin::isSameSchemeHostPort):
              * platform/SecurityOrigin.h:
              (WebCore::SecurityOrigin::host):
              (WebCore::SecurityOrigin::domain):
              * platform/SecurityOriginHash.h:
              (WebCore::SecurityOriginTraits::deletedValue):
              * storage/DatabaseTracker.cpp:
              (WebCore::DatabaseTracker::hasEntryForDatabase):
              (WebCore::DatabaseTracker::originPath):
              (WebCore::DatabaseTracker::fullPathForDatabase):
              (WebCore::DatabaseTracker::populateOrigins):
              (WebCore::DatabaseTracker::databaseNamesForOrigin):
              (WebCore::DatabaseTracker::detailsForNameAndOrigin):
              (WebCore::DatabaseTracker::setDatabaseDetails):
              (WebCore::DatabaseTracker::setQuota):
              (WebCore::DatabaseTracker::addDatabase):
              (WebCore::DatabaseTracker::deleteOrigin):
              (WebCore::DatabaseTracker::deleteDatabase):
      
      WebKit/mac:
      
      2008-04-20 Adam Barth <hk9565@gmail.com>
      
              Reviewed by Adam Roben and Sam Weinig.
      
              Updated WebSecurityOrigin to match new SecurityOrigin API.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
      
              * Storage/WebSecurityOrigin.mm:
              (-[WebSecurityOrigin host]):
              (-[WebSecurityOrigin domain]):
              * Storage/WebSecurityOriginPrivate.h:
      
      WebKit/win:
      
      2008-04-26  Adam Barth <hk9565@gmail.com>
      
              Reviewed by Adam Roben and Sam Weinig.
      
              Renamed "domain" method to "host" to match SecurityOrigin.
      
              * Interfaces/IWebSecurityOrigin.idl:
              * WebSecurityOrigin.cpp:
              (WebSecurityOrigin::host):
              * WebSecurityOrigin.h:
      
      WebKitTools:
      
      2008-04-26  Adam Barth <hk9565@gmail.com>
      
              Reviewed by Adam Roben and Sam Weinig.
      
              Updates LayoutTestController to use host instead of domain.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
      
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::setDatabaseQuota):
              * DumpRenderTree/mac/UIDelegate.mm:
              (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]):
      
      LayoutTests:
      
      2008-04-26  Adam Barth  <hk9565@gmail.com>
      
              Reviewed by Adam Roben and Sam Weinig.
      
              Update LayoutTests for new postMessage API.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
      
              * http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag-expected.txt: Removed.
              * http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html: Removed.
              * http/tests/security/postMessage/domain-unaffected-by-document-domain-expected.txt: Removed.
              * http/tests/security/postMessage/domain-unaffected-by-document-domain.html: Removed.
              * http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt: Added.
              * http/tests/security/postMessage/invalid-origin-throws-exception.html: Added.
              * http/tests/security/postMessage/javascript-page-still-sends-domain-expected.txt: Removed.
              * http/tests/security/postMessage/javascript-page-still-sends-domain.html: Removed.
              * http/tests/security/postMessage/javascript-page-still-sends-origin-expected.txt: Copied from LayoutTests/http/tests/security/postMessage/javascript-page-still-sends-domain-expected.txt.
              * http/tests/security/postMessage/javascript-page-still-sends-origin.html: Copied from LayoutTests/http/tests/security/postMessage/javascript-page-still-sends-domain.html.
              * http/tests/security/postMessage/origin-unaffected-by-base-tag-expected.txt: Copied from LayoutTests/http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag-expected.txt.
              * http/tests/security/postMessage/origin-unaffected-by-base-tag.html: Copied from LayoutTests/http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html.
              * http/tests/security/postMessage/origin-unaffected-by-document-domain-expected.txt: Copied from LayoutTests/http/tests/security/postMessage/domain-unaffected-by-document-domain-expected.txt.
              * http/tests/security/postMessage/origin-unaffected-by-document-domain.html: Copied from LayoutTests/http/tests/security/postMessage/domain-unaffected-by-document-domain.html.
              * http/tests/security/postMessage/target-origin-expected.txt: Added.
              * http/tests/security/postMessage/target-origin.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      205006ed
  7. 25 Apr, 2008 2 commits
    • weinig@apple.com's avatar
      2008-04-24 Sam Weinig <sam@webkit.org> · 9c06cb5b
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Replace the JSDOMWindow with a new one instead of clearing it.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::clear):
              Don't reset the window.
      
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
              Replace the current JSDOMWindow stored in the wrapper window
              with a new one.
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              (WebCore::CachedPage::clear):
              * history/CachedPage.h:
              Instead of storing the builtins, properties and localstorage in
              special holding structs, store the entire JSDOMWindow.
      
              For the case of a page that has no JSDOMWindow before it's first
              navigation, has one created while it is in the cache and is then
              navigated back, create a new JSDOMWindow to keep the assumption
              in JSDOMWindowWrapper that it always has the correct window.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::clear):
              We must clear the DOMWindow first, so that we create a new JSDOMWindow,
              it gets a new one.
      
              * page/Frame.cpp:
              (WebCore::Frame::clearDOMWindow):
              Null out the domWindow so that on the next access, a new one is
              created.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c06cb5b
    • weinig@apple.com's avatar
      2008-04-25 Sam Weinig <sam@webkit.org> · d02b7dca
      weinig@apple.com authored
              Reviewed by Mark Rowe.
      
              The EventListeners need to operate and store JSDOMWindows, not JSDOMWrapperWindows.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
              * bindings/js/JSSVGLazyEventListener.cpp:
              (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
              * bindings/js/JSSVGLazyEventListener.h:
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
              (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
              (WebCore::JSUnprotectedEventListener::window):
              (WebCore::JSUnprotectedEventListener::clearWindow):
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::~JSEventListener):
              (WebCore::JSEventListener::window):
              (WebCore::JSEventListener::clearWindow):
              (WebCore::JSLazyEventListener::JSLazyEventListener):
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::createHTMLEventHandler):
              (WebCore::KJSProxy::createSVGEventHandler):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d02b7dca
  8. 24 Apr, 2008 3 commits
    • mrowe@apple.com's avatar
      2008-04-22 Feng Qian <ian.eng.webkit@gmail.com> · 1be36d4d
      mrowe@apple.com authored
              Reviewed by Geoff Garen.
      
              Fix https://bugs.webkit.org/show_bug.cgi?id=18677
              Bug 18677: Synchronous event dispatch confuses the popup blocker into incorrectly blocking chat popups in gmail.com.
      
              Test: fast/events/nested-window-event.html
      
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent): Save and restore the current event around the event dispatch.
      
      2008-04-22  Feng Qian  <ian.eng.webkit@gmail.com>
      
              Reviewed by Geoff Garen.
      
              Test for nested event handlers.
      
              * fast/events/nested-window-event-expected.txt: Added.
              * fast/events/nested-window-event.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1be36d4d
    • weinig@apple.com's avatar
      2008-04-24 Sam Weinig <sam@webkit.org> · 2877cf08
      weinig@apple.com authored
              Fix the world.
      
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2877cf08
    • kmccullough@apple.com's avatar
      JavaScriptCore: · d9e61e09
      kmccullough@apple.com authored
      2008-04-24  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adam and Sam.
      
              -<rdar://problem/5770054> JavaScript profiler (10928)
              -Only profile the page group that starts profiling to avoid profiling
              tools that shouldn't be profiled unless explicitly requested to.
      
              * JavaScriptCore.exp: Export new signature.
              * kjs/JSGlobalObject.cpp: Add unique identifiers to the JSGlobalObject.
              (KJS::JSGlobalObject::init):
              * kjs/JSGlobalObject.h: Ditto.
              (KJS::JSGlobalObject::setPageGroupIdentifier):
              (KJS::JSGlobalObject::pageGroupIdentifier):
              * profiler/Profiler.cpp: Check the identifier of the page group of the
              lexical global exec state and only profile if it matches the given page
              group identifier.
              (KJS::Profiler::startProfiling):
              (KJS::Profiler::willExecute):
              (KJS::Profiler::didExecute):
              * profiler/Profiler.h: Ditto.
              (KJS::Profiler::Profiler):
      
      WebCore:
      
      2008-04-24  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adam and Sam.
      
              -<rdar://problem/5770054> JavaScript profiler (10928)
              -Only profile the page group that starts profiling to avoid profiling
              tools that shouldn't be profiled unless explicitly requested to.
      
              * bindings/js/kjs_proxy.cpp: When a new global object is created set its
              page group identifier.
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              * page/Console.cpp: When calling console.profile set the identifier of
              the page group being profiled.
              (WebCore::Console::profile):
              * page/PageGroup.cpp: Implement unique identifiers.
              (WebCore::getUniqueIdentifier):
              (WebCore::PageGroup::PageGroup):
              * page/PageGroup.h: Ditto.
              (WebCore::PageGroup::identifier):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9e61e09
  9. 21 Apr, 2008 2 commits
    • weinig@apple.com's avatar
      2008-04-21 Sam Weinig <sam@webkit.org> · 723305b5
      weinig@apple.com authored
              Reviewed by Alexey Proskuryakov.
      
              Fix up XMLHttpRequestProgressEvent.
      
              * bindings/js/JSEventCustom.cpp:
              (WebCore::toJS):
              * xml/XMLHttpRequestProgressEvent.cpp:
              * xml/XMLHttpRequestProgressEvent.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      723305b5
    • jchaffraix@webkit.org's avatar
      2008-04-21 Julien Chaffraix <jchaffraix@webkit.org> · 6c9787c1
      jchaffraix@webkit.org authored
              Reviewed by Ap.
      
              Bug 13596: Implement .onprogress handler on XMLHttpRequest objects to support
              progressive download content length information.
      
              - Add the onprogress attribute to XMLHttpRequest and the necessary bindings.
      
              - We use a custom event XMLHttpRequestProgressEvent that is derived from ProgressEvent
               (as specified by the XHR2 specification) but also implement LSProgressEvent interface
               (to be compliant with Firefox event).
      
              Test: http/tests/xmlhttprequest/infoOnProgressEvent.html
      
      2008-04-21  Julien Chaffraix  <jchaffraix@webkit.org>
      
              Reviewed by Ap.
      
              Bug 13596: Implement .onprogress handler on XMLHttpRequest objects to support progressive download content length information.
      
              * http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt: Added.
              * http/tests/xmlhttprequest/infoOnProgressEvent.html: Added.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c9787c1
  10. 18 Apr, 2008 2 commits
  11. 17 Apr, 2008 2 commits
    • weinig@apple.com's avatar
      WebCore: · 81ed4494
      weinig@apple.com authored
      2008-04-17  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Autogenerate the XMLHttpRequest javascript binding.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
              * DerivedSources.make:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSXMLHttpRequest.cpp: Removed.
              * bindings/js/JSXMLHttpRequest.h: Removed.
              * bindings/js/JSXMLHttpRequestConstructor.cpp: Added.
              (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
              (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
              (WebCore::JSXMLHttpRequestConstructor::construct):
              * bindings/js/JSXMLHttpRequestConstructor.h: Added.
              (WebCore::JSXMLHttpRequestConstructor::classInfo):
              * bindings/js/JSXMLHttpRequestCustom.cpp: Added.
              (WebCore::JSXMLHttpRequest::mark):
              (WebCore::JSXMLHttpRequest::onreadystatechange):
              (WebCore::JSXMLHttpRequest::setOnreadystatechange):
              (WebCore::JSXMLHttpRequest::onload):
              (WebCore::JSXMLHttpRequest::setOnload):
              (WebCore::JSXMLHttpRequest::responseXML):
              (WebCore::JSXMLHttpRequest::open):
              (WebCore::JSXMLHttpRequest::setRequestHeader):
              (WebCore::JSXMLHttpRequest::send):
              (WebCore::JSXMLHttpRequest::getResponseHeader):
              (WebCore::JSXMLHttpRequest::overrideMimeType):
              (WebCore::JSXMLHttpRequest::addEventListener):
              (WebCore::JSXMLHttpRequest::removeEventListener):
              (WebCore::JSXMLHttpRequest::dispatchEvent):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::readyState):
              (WebCore::XMLHttpRequest::responseText):
              * xml/XMLHttpRequest.h:
              * xml/XMLHttpRequest.idl: Added.
      
      LayoutTests:
      
      2008-04-17  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Update test result for additon of XMLHttpRequest constants.
      
              * fast/dom/Window/window-properties-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81ed4494
    • andersca@apple.com's avatar
      2008-04-17 Anders Carlsson <andersca@apple.com> · 8e1e57d8
      andersca@apple.com authored
              Reviewed by Sam.
      
              Add JS bindings for the DOMApplicationCache object.
              
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::add):
              (WebCore::JSDOMApplicationCache::remove):
              (WebCore::JSDOMApplicationCache::addEventListener):
              (WebCore::JSDOMApplicationCache::removeEventListener):
              (WebCore::JSDOMApplicationCache::dispatchEvent):
              (WebCore::JSDOMApplicationCache::setOnchecking):
              (WebCore::JSDOMApplicationCache::onchecking):
              (WebCore::JSDOMApplicationCache::setOnerror):
              (WebCore::JSDOMApplicationCache::onerror):
              (WebCore::JSDOMApplicationCache::setOnnoupdate):
              (WebCore::JSDOMApplicationCache::onnoupdate):
              (WebCore::JSDOMApplicationCache::setOndownloading):
              (WebCore::JSDOMApplicationCache::ondownloading):
              (WebCore::JSDOMApplicationCache::setOnprogress):
              (WebCore::JSDOMApplicationCache::onprogress):
              (WebCore::JSDOMApplicationCache::setOnupdateready):
              (WebCore::JSDOMApplicationCache::onupdateready):
              (WebCore::JSDOMApplicationCache::setOncached):
              (WebCore::JSDOMApplicationCache::oncached):
              (WebCore::JSDOMApplicationCache::mark):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::mark):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::toJS):
              * loader/appcache/DOMApplicationCache.idl:
              * page/DOMWindow.idl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e1e57d8
  12. 16 Apr, 2008 5 commits
    • beidson@apple.com's avatar
      JavaScriptCore: · 69d45af4
      beidson@apple.com authored
      2008-04-16  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              Change ThreadSafeShared to act like RefCounted by starting out with a single ref by default
      
              * wtf/Threading.h:
              (WTF::ThreadSafeShared::ThreadSafeShared):
      
      WebCore:
      
      2008-04-16  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              Changing ThreadSafeShared to start with a ref count of 1, so updating all users to
              adoptRef() that initial reference.
      
              * bindings/js/JSCustomSQLStatementCallback.h:
              (WebCore::JSCustomSQLStatementCallback::create):
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              (WebCore::JSCustomSQLStatementErrorCallback::create):
              * bindings/js/JSCustomSQLTransactionCallback.h:
              (WebCore::JSCustomSQLTransactionCallback::create):
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              (WebCore::JSCustomSQLTransactionErrorCallback::create):
      
              * bindings/js/JSDatabaseCustom.cpp:
              (WebCore::JSDatabase::changeVersion):
              (WebCore::JSDatabase::transaction):
      
              * bindings/js/JSSQLTransactionCustom.cpp:
              (WebCore::JSSQLTransaction::executeSql):
      
              * dom/Document.cpp:
              (WebCore::Document::databaseThread):
      
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::create):
      
              * platform/sql/SQLiteAuthorizer.h:
              (WebCore::SQLiteAuthorizer::create):
              (WebCore::SQLiteAuthorizer::SQLiteAuthorizer):
      
              * storage/ChangeVersionWrapper.cpp:
              (WebCore::ChangeVersionWrapper::performPreflight):
              (WebCore::ChangeVersionWrapper::performPostflight):
              * storage/ChangeVersionWrapper.h:
              (WebCore::ChangeVersionWrapper::create):
      
              * storage/Database.cpp:
              (WebCore::Database::openAndVerifyVersion):
              (WebCore::Database::markAsDeletedAndClose):
              (WebCore::Database::changeVersion):
              (WebCore::Database::transaction):
              (WebCore::Database::scheduleTransaction):
              (WebCore::Database::scheduleTransactionStep):
              (WebCore::Database::tableNames):
      
              * storage/DatabaseAuthorizer.h:
              (WebCore::DatabaseAuthorizer::create):
      
              * storage/DatabaseTask.h:
              (WebCore::DatabaseOpenTask::create):
              (WebCore::DatabaseCloseTask::create):
              (WebCore::DatabaseTransactionTask::create):
              (WebCore::DatabaseTableNamesTask::create):
      
              * storage/DatabaseThread.cpp:
              (WebCore::DatabaseThread::scheduleTask): Change to take a PassRefPtr instead of raw
              (WebCore::DatabaseThread::scheduleImmediateTask): Ditto
              * storage/DatabaseThread.h:
              (WebCore::DatabaseThread::create):
      
              * storage/SQLError.h:
              (WebCore::SQLError::create):
              (WebCore::SQLError::SQLError):
      
              * storage/SQLResultSet.h:
              (WebCore::SQLResultSet::create):
      
              * storage/SQLStatement.cpp:
              (WebCore::SQLStatement::create):
              (WebCore::SQLStatement::execute):
              (WebCore::SQLStatement::setDatabaseDeletedError):
              (WebCore::SQLStatement::setVersionMismatchedError):
              (WebCore::SQLStatement::setFailureDueToQuota):
              * storage/SQLStatement.h:
      
              * storage/SQLTransaction.cpp:
              (WebCore::SQLTransaction::create):
              (WebCore::SQLTransaction::executeSQL):
              (WebCore::SQLTransaction::openTransactionAndPreflight):
              (WebCore::SQLTransaction::deliverTransactionCallback):
              (WebCore::SQLTransaction::handleCurrentStatementError):
              (WebCore::SQLTransaction::deliverStatementCallback):
              (WebCore::SQLTransaction::postflightAndCommit):
              * storage/SQLTransaction.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69d45af4
    • andersca@apple.com's avatar
      2008-04-16 Anders Carlsson <andersca@apple.com> · c6839d1c
      andersca@apple.com authored
              Reviewed by Adam.
      
              Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and 
              fix typos in the #if line.
              
              * DerivedSources.make:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMApplicationCacheCustom.cpp: Added.
              * loader/appcache/ApplicationCache.cpp:
              * loader/appcache/ApplicationCache.h:
              * loader/appcache/ApplicationCacheGroup.cpp:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/appcache/ApplicationCacheResource.cpp:
              * loader/appcache/ApplicationCacheResource.h:
              * loader/appcache/DOMApplicationCache.cpp:
              * loader/appcache/DOMApplicationCache.h:
              * loader/appcache/DOMApplicationCache.idl:
              * loader/appcache/ManifestParser.cpp:
              * loader/appcache/ManifestParser.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6839d1c
    • weinig@apple.com's avatar
      JavaScriptCore: · 6ae58b39
      weinig@apple.com authored
      2008-04-16  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              - To keep the behavior of the WebKit and JavaScriptCore API's the same,
                we need to hide the fact that the global object and the window object
                are no longer the same thing, and the the global object now changes on
                navigations.  To do this, only the wrapper should ever be exposed.  This
                fixes the two remaining spots where the internal global object is exposed,
                the windowScriptObject returned from [WebFrame windowObject] and the object
                return by calling JSContextGetGlobalObject on [WebFrame globalContext].
      
              * API/JSContextRef.cpp:
              (JSContextGetGlobalObject):
              This is a bit of a hack, this returns the "this" representation of the globalObject
              which will be the WrapperWindow for WebCore and the globalObject for non-WebCore.
      
              * API/JSObjectRef.cpp:
              (JSObjectSetProperty):
              Call the new putWithAttributes method instead of relying on lower-level calls.
              This is needed so that the window wrapper can forward the calls.
      
              * JavaScriptCore.exp:
              * kjs/Activation.h:
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::putWithAttributes):
              * kjs/JSGlobalObject.h:
              * kjs/JSVariableObject.h:
              (KJS::JSVariableObject::symbolTablePutWithAttributes):
              * kjs/function.cpp:
              (KJS::ActivationImp::putWithAttributes):
              * kjs/nodes.cpp:
              (KJS::ConstDeclNode::handleSlowCase):
              (KJS::ConstDeclNode::evaluateSingle):
              (KJS::EvalNode::processDeclarations):
              * kjs/object.cpp:
              (KJS::JSObject::putWithAttributes):
              * kjs/object.h:
              Rename initializeVariable to putWithAttributes and move it down to JSObject so it
              can be used for JSObjectSetProperty.
      
      WebCore:
      
      2008-04-16  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              - To keep the behavior of the WebKit and JavaScriptCore API's the same,
                we need to hide the fact that the global object and the window object
                are no longer the same thing, and the the global object now changes on
                navigations.  To do this, only the wrapper should ever be exposed.  This
                fixes the two remaining spots where the internal global object is exposed,
                the windowScriptObject returned from [WebFrame windowObject] and the object
                return by calling JSContextGetGlobalObject on [WebFrame globalContext]
      
              * bindings/js/JSDOMWindowWrapper.cpp:
              (WebCore::JSDOMWindowWrapper::putWithAttributes):
              * bindings/js/JSDOMWindowWrapper.h:
              Forward this new method so that JSObjectSetProperty doesn't set properties on the 
              wrapper.
      
              * page/mac/FrameMac.mm:
              (WebCore::Frame::windowScriptObject):
              Return the wrapper instead of the global object.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ae58b39
    • aroben@apple.com's avatar
      Change calls to Chrome::addMessageToConsole to use Console::addMessage · 92cfa90a
      aroben@apple.com authored
              Part of Bug 17228: console.{log,warn,info,error} should support format
              strings, variable arguments
              <http://bugs.webkit.org/show_bug.cgi?id=17228>
              <rdar://problem/5732828>
      
              Console now takes care of calling ChromeClient::addMessageToConsole
              for the appropriate messages (i.e., just messages from JavaScript). If
              you ever want to add a message to the console, Console is the place to
              do it.
      
              Reviewed by Darin Adler.
      
              * WebCore.xcodeproj/project.pbxproj: Mark Console.h Private.
              * page/Chrome.cpp: Removed addMessageToConsole
              * page/Chrome.h: Moved MessageSource/MessageLevel to Console.h.
              * page/Console.cpp:
              (WebCore::Console::addMessage): Added. Calls
              ChromeClient::addMessageToConsole for JS messages, and calls
              InspectorController::addMessageToConsole for all messages.
              (WebCore::Console::error): Changed to call directly to
              InspectorController in addition to ChromeClient.
              (WebCore::Console::info): Ditto.
              (WebCore::Console::log): Ditto.
              (WebCore::Console::warn): Ditto.
              * page/Console.h: Added MessageSource/MessageLevel enums from Chrome.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92cfa90a
    • aroben@apple.com's avatar
      Pass JSConsole's arguments unmodified to Console · a63db323
      aroben@apple.com authored
              Part of Bug 17228: console.{log,warn,info,error} should support format
              strings, variable arguments
              <http://bugs.webkit.org/show_bug.cgi?id=17228>
              <rdar://problem/5732828>
      
              All of JSConsole's methods are now custom, so that we can pass the
              arguments unmodified to Console. Console now handles calling
              toString() on the first argument. Later it will pass the arguments off
              to InspectorController.
      
              There should be no behavioral changes caused by this patch.
      
              Reviewed by Darin Adler.
      
              * ForwardingHeaders/kjs/list.h: Added.
              * GNUmakefile.am: Added JSConsoleCustom.cpp to the project.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
              * bindings/js/JSConsoleCustom.cpp: Added.
              (WebCore::JSConsole::error):
              (WebCore::JSConsole::info):
              (WebCore::JSConsole::log):
              (WebCore::JSConsole::warn):
              * page/Console.cpp: Changed all methods to take an ExecState* and a
              const List&. The first item in the List is toString()ed and passed to
              Chrome.
              (WebCore::Console::error):
              (WebCore::Console::info):
              (WebCore::Console::log):
              (WebCore::Console::warn):
              * page/Console.h:
              * page/Console.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a63db323
  13. 14 Apr, 2008 2 commits
    • beidson@apple.com's avatar
      WebCore: · 21c04acd
      beidson@apple.com authored
      2008-04-14  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Anders
      
              Lay the underpinnings for LocalStorage.
      
              For now, this just exposes window.localStorage to the dom which returns an in-memory Storage object, much
              like SessionStorage.  The primary difference at this point is that the object returned is shared globally,
              and isn't copied for new top-level browsing contexts like SessionStorage.
      
              Later, I'll add proper event dispatch and a persistent storage backing.
      
              * GNUmakefile.am:
              * WebCore.base.exp:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::mark): Mark the optionalLocalStorage
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::clear):
              (WebCore::DOMWindow::localStorage):
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalLocalStorage):
      
              * storage/LocalStorage.cpp: Added.
              (WebCore::LocalStorage::sharedLocalStorage):
              (WebCore::LocalStorage::LocalStorage):
              (WebCore::LocalStorage::storageArea):
              (WebCore::LocalStorage::itemChanged):
              (WebCore::LocalStorage::itemRemoved):
              (WebCore::LocalStorage::dispatchStorageEvent):
              * storage/LocalStorage.h: Added.
      
              * storage/SessionStorage.cpp: Refactor to use the client interface for event dispatching for sessionStorage objects
              (WebCore::SessionStorage::SessionStorage):
              (WebCore::SessionStorage::copy):
              (WebCore::SessionStorage::storageArea):
              (WebCore::SessionStorage::itemChanged):
              (WebCore::SessionStorage::itemRemoved):
              (WebCore::SessionStorage::dispatchStorageEvent):
              * storage/SessionStorage.h:
      
              * storage/StorageArea.cpp: Add a client parameter, and call to the client when an item is changed or removed.
              (WebCore::StorageArea::create):
              (WebCore::StorageArea::StorageArea):
              (WebCore::StorageArea::copy):
              (WebCore::StorageArea::setItem):
              (WebCore::StorageArea::removeItem):
              (WebCore::StorageArea::setClient):
              * storage/StorageArea.h:
              (WebCore::StorageArea::page):
              (WebCore::StorageArea::securityOrigin):
      
              * storage/StorageAreaClient.h: Added.  Break out "itemChanged" and "itemRemoved" to a StorageAreaClient
                This way, both SessionStorage and LocalStorage areas can have different behavior on changes with
                that behavior managed from a central location.
              (WebCore::StorageAreaClient::~StorageAreaClient):
              (WebCore::StorageAreaClient::StorageAreaClient):
              (WebCore::StorageAreaClient::itemChanged):
              (WebCore::StorageAreaClient::itemRemoved):
      
      LayoutTests:
      
      2008-04-14  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Anders
      
              As underpinnings for LocalStorage are laid, it is exposed to the dom - update the relevant layout tests.
      
              * fast/dom/Window/window-properties-expected.txt:
              * storage/domstorage/window-attributes-exist-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21c04acd
    • aroben@apple.com's avatar
      Don't let the inspected page overwrite properties of JS objects in the Inspector · 222d7489
      aroben@apple.com authored
              <https://bugs.webkit.org/show_bug.cgi?id=16011>
              <rdar://problem/5604409>
      
              <https://bugs.webkit.org/show_bug.cgi?id=16837>
              <rdar://problem/5813850>
      
              Reviewed by Sam Weinig and Geoff Garen.
      
              Tests (contributed by Adam Barth and Collin Jackson):
              manual-tests/inspector-wrappers
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              Added new files to the projects.
      
              * bindings/js/JSQuarantinedObjectWrapper.cpp: Added.
              (WebCore::):
              (WebCore::JSQuarantinedObjectWrapper::asWrapper): Converts a JSValue
              into a JSQuarantinedObjectWrapper, if the JSValue is in fact a
              JSQuarantinedObjectWrapper.
              (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): Callback to
              be used with PropertySlot.
              (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
              Hold onto the object we're wrapping and its global object. Pass the
              wrapped prototype up to the JSObject constructor.
              (WebCore::JSQuarantinedObjectWrapper::~JSQuarantinedObjectWrapper):
              (WebCore::JSQuarantinedObjectWrapper::unwrappedExecStateMatches):
              Returns true if our underlying object originated from the same global
              object as the passed-in ExecState.
              (WebCore::JSQuarantinedObjectWrapper::unwrappedExecState):
              (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState):
              Wraps and moves an exception from our underlying ExecState to the
              passed-in one.
              (WebCore::JSQuarantinedObjectWrapper::mark): Marks ourselves and the
              objects we're holding references to.
      
              (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
              (WebCore::JSQuarantinedObjectWrapper::put):
              (WebCore::JSQuarantinedObjectWrapper::deleteProperty):
              (WebCore::JSQuarantinedObjectWrapper::implementsConstruct):
              (WebCore::JSQuarantinedObjectWrapper::construct):
              (WebCore::JSQuarantinedObjectWrapper::implementsHasInstance):
              (WebCore::JSQuarantinedObjectWrapper::hasInstance):
              (WebCore::JSQuarantinedObjectWrapper::implementsCall):
              (WebCore::JSQuarantinedObjectWrapper::callAsFunction):
              (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
              JSObject overrides. These each check the appropriate permission before
              allowing the call to proceed. We wrap all outgoing values using
              m_wrapOutgoingValue, and we prepare all incoming values with the
              virtual prepareIncomingValue function. If an exception is raised when
              calling the underlying object, we transfer the exception in wrapped
              form to the passed-in ExecState.
      
              * bindings/js/JSQuarantinedObjectWrapper.h: Added.
              (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
              (WebCore::JSQuarantinedObjectWrapper::className): We return the
              underlying object's class name so that we can successfully masquerade
              as that underlying object when, e.g., Object.prototype.toString is
              called on us.
              (WebCore::JSQuarantinedObjectWrapper::classInfo):
      
              (WebCore::JSQuarantinedObjectWrapper::allowsGetProperty):
              (WebCore::JSQuarantinedObjectWrapper::allowsSetProperty):
              (WebCore::JSQuarantinedObjectWrapper::allowsDeleteProperty):
              (WebCore::JSQuarantinedObjectWrapper::allowsConstruct):
              (WebCore::JSQuarantinedObjectWrapper::allowsHasInstance):
              (WebCore::JSQuarantinedObjectWrapper::allowsCallAsFunction):
              (WebCore::JSQuarantinedObjectWrapper::allowsGetPropertyNames):
              These virtual methods let subclasses define the allowed operations on
              the wrapped object. By default all operations are disabled.
      
              * bindings/js/JSInspectedObjectWrapper.cpp: Added. This subclass of
              JSQuarantinedObjectWrapper is used to wrap objects from the inspected
              page being passed to the Inspector.
              (WebCore::wrappers):
              (WebCore::):
              (WebCore::JSInspectedObjectWrapper::wrap): Wraps the passed-in object
              if needed and returns the wrapper. If this object has been wrapped
              previously we'll return the old wrapper rather than make a new one.
              (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Add
              ourselves to the wrapper map.
              (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Remove
              ourselves from the wrapper map.
              (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Ensure that
              any objects passed to the inspected object are either wrappers around
              objects from the inspected page (in which case we unwrap them so that
              the inspected page never sees the wrapper), or wrapped callbacks from
              the Inspector.
              * bindings/js/JSInspectedObjectWrapper.h: Added.
              (WebCore::JSInspectedObjectWrapper::classInfo):
              (WebCore::JSInspectedObjectWrapper::allowsGetProperty):
              (WebCore::JSInspectedObjectWrapper::allowsSetProperty):
              (WebCore::JSInspectedObjectWrapper::allowsDeleteProperty):
              (WebCore::JSInspectedObjectWrapper::allowsConstruct):
              (WebCore::JSInspectedObjectWrapper::allowsHasInstance):
              (WebCore::JSInspectedObjectWrapper::allowsCallAsFunction):
              (WebCore::JSInspectedObjectWrapper::allowsGetPropertyNames):
              These all return true so that the Inspector can use objects from the
              inspected page however it needs.
              (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue): Wrap all
              outgoing values as JSInspectedObjectWrappers.
      
              * bindings/js/JSInspectorCallbackWrapper.cpp: Added. This subclass of
              JSQuarantinedObjectWrapper is used to wrap callbacks that the
              Inspector passes to the inspected page (e.g., for event listeners or
              client-side storage callbacks).
              (WebCore::wrappers):
              (WebCore::):
              (WebCore::JSInspectorCallbackWrapper::wrap): Wraps the passed-in
              object if needed and returns the wrapper. If this object has been
              wrapped previously we'll return the old wrapper rather than make a new
              one.
              (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper): Add
              ourselves to the wrapper map.
              (WebCore::JSInspectorCallbackWrapper::~JSInspectorCallbackWrapper):
              Remove ourselves from the wrapper map.
              (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue): Ensure
              that values passed from the inspected page to an Inspector callback
              are wrapped in JSInspectedObjectWrappers. We also allow the inspected
              page to pass ourselves in (which will happen in the case of a
              client-side storage callback, where the callback itself is passed as
              the `this` object). In this case we unwrap ourselves so that the
              Inspector doesn't have to deal with the wrapper.
              * bindings/js/JSInspectorCallbackWrapper.h: Added.
              (WebCore::JSInspectorCallbackWrapper::classInfo):
              (WebCore::JSInspectorCallbackWrapper::allowsCallAsFunction):
              This is the only allowed operation on a JSInspectorCallbackWrapper.
              (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue): Wrap all
              outgoing values as JSInspectorCallbackWrappers.
      
              * page/InspectorController.cpp:
              (WebCore::getResourceDocumentNode): Wrap the Document before passing
              it to the Inspector.
              (WebCore::highlightDOMNode): Unwrap the Node that the Inspector passed
              to us.
              (WebCore::databaseTableNames): Unwrap the Database that the Inspector
              passed to us.
              (WebCore::inspectedWindow): Wrap the Window before passing it to the
              Inspector.
              (WebCore::InspectorController::focusNode): Wrap the Node before
              passing it to the Inspector.
              (WebCore::wrapCallback): Wraps the passed-in callback in a
              JSInspectorCallbackWrapper.
              (WebCore::InspectorController::addDatabaseScriptResource): Wrap the
              Database beore pasing it to the Inspector.
              (WebCore::InspectorController::windowScriptObjectAvailable): Add the
              new wrapCallback function to the InspectorController JS object.
      
              * page/inspector/ElementsPanel.js:
              (WebInspector.ElementsPanel.reset): Wrap the contentLoaded callback.
      
              * page/inspector/DatabaseQueryView.js:
              (WebInspector.DatabaseQueryView._enterKeyPressed):
              * page/inspector/DatabaseTableView.js:
              (WebInspector.DatabaseTableView.update):
              Pass null instead of an empty array to executeSql since we're no
              longer allowed to pass any unwrapped objects to the inspected page.
              We now wrap all callbacks being passed to the inspected page using
              InspectorController.wrapCallback.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      222d7489
  14. 11 Apr, 2008 1 commit
    • antti@apple.com's avatar
      2008-04-11 Antti Koivisto <antti@apple.com> · 39ef7d1d
      antti@apple.com authored
              Reviewed by Oliver.
      
              Fix build when SVG is enabled but SVG_ANIMATION is not.
      
              * ChangeLog:
              * bindings/js/JSSVGElementWrapperFactory.cpp:
              * bindings/objc/DOM.mm:
              (WebCore::createElementClassMap):
              * svg/SVGAElement.cpp:
              (WebCore::SVGAElement::defaultEventHandler):
              * svg/SVGAnimateColorElement.cpp:
              * svg/SVGAnimateColorElement.h:
              * svg/SVGAnimateColorElement.idl:
              * svg/SVGAnimateMotionElement.h:
              * svg/SVGAnimationElement.cpp:
              (WebCore::SVGAnimationElement::animationMode):
              * svg/SVGAnimationElement.h:
              * svg/SVGAnimationElement.idl:
              * svg/SVGSetElement.cpp:
              * svg/SVGSetElement.h:
              * svg/SVGSetElement.idl:
              * svg/animation/SMILTimeContainer.cpp:
              (WebCore::SMILTimeContainer::begin):
              (WebCore::SMILTimeContainer::pause):
              (WebCore::SMILTimeContainer::resume):
              (WebCore::SMILTimeContainer::elapsed):
              (WebCore::SMILTimeContainer::isPaused):
              (WebCore::SMILTimeContainer::timerFired):
              * svg/animation/SMILTimeContainer.h:
              * svg/animation/SVGSMILElement.cpp:
              * svg/animation/SVGSMILElement.h:
              * svg/svgtags.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39ef7d1d
  15. 09 Apr, 2008 3 commits
    • weinig@apple.com's avatar
      2008-04-09 Sam Weinig <sam@webkit.org> · c0379baf
      weinig@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=18389
              Crash in JSDOMWindowWrapper::mark loading digg.com
      
              - Add a null check to JSDOMWindowWrapper::mark for the case when the collector
                runs during its allocation.
              - Cleans up the creation of the window to be a little more straight forward.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
              (WebCore::JSDOMWindowBase::JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::clear):
              (WebCore::JSDOMWindowBase::wrapper):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowWrapper.cpp:
              (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper):
              (WebCore::JSDOMWindowWrapper::mark):
              * bindings/js/JSDOMWindowWrapper.h:
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0379baf
    • beidson@apple.com's avatar
      WebCore: · c585cf1d
      beidson@apple.com authored
      2008-04-09  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              When enumerating a Storage object, the Storage built-ins should not be included, but the 
              prototype chain SHOULD be included.
      
              * bindings/js/JSStorageCustom.cpp:
              (WebCore::JSStorage::customGetPropertyNames): Return false so the prototype chain is walked
      
              * storage/Storage.idl: Mark all built-ins as "DontEnum"
      
      LayoutTests:
      
      2008-04-09  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Sam Weinig
      
              When enumerating a Storage object, the Storage built-ins should not be included, but the 
              prototype chain SHOULD be included.
      
              Updated the layout test to test this.
              * storage/domstorage/sessionstorage/enumerate-storage-expected.txt:
              * storage/domstorage/sessionstorage/enumerate-storage.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c585cf1d
    • beidson@apple.com's avatar
      WebCore: · f4283713
      beidson@apple.com authored
      2008-04-09  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Adam Roben
      
              Per the HTML5 spec, enumerating a Storage object should walk the keys in the storage area, 
              and should not return the built-in properties.
      
              Test: storage/domstorage/sessionstorage/enumerate-storage.html
      
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::JSLocation::customGetPropertyNames): Removed the name from an unused parameter
      
              * bindings/js/JSStorageCustom.cpp:
              (WebCore::JSStorage::customGetPropertyNames): Copy all of the keys into the property names array
      
              * storage/Storage.idl: Add CustomGetPropertyNames
      
      LayoutTests:
      
      2008-04-09  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Adam Roben
      
              Per the HTML5 spec, enumerating a Storage object should walk the keys in the storage area, 
              and should not return the built-in properties.
      
              This test adds some keys to sessionStorage, enumerates the sessionStorage object, and logs 
              the sorted result.  It should *not* contain the built in properties of the Storage object
      
              * storage/domstorage/sessionstorage/enumerate-storage-expected.txt: Added.
              * storage/domstorage/sessionstorage/enumerate-storage.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f4283713
  16. 08 Apr, 2008 2 commits
    • weinig@apple.com's avatar
      JavaScriptCore: · 41dbaab8
      weinig@apple.com authored
      2008-04-04  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              First step in implementing the "split window"
      
              - Add a GlobalThisValue to ExecState which should be used 
                in places that used to implement the "use the global object
                as this if null" rule.
              - Factor out lookupGetter/lookupSetter into virtual methods 
                on JSObject so that they can be forwarded.
              - Make defineGetter/defineSetter virtual methods for the same
                reason.
              - Have PrototypeReflexiveFunction store the globalObject used
                to create it so that it can be used to get the correct thisObject
                for eval.
      
              * API/JSObjectRef.cpp:
              (JSObjectCallAsFunction):
              * JavaScriptCore.exp:
              * kjs/Activation.h:
              * kjs/ExecState.cpp:
              (KJS::ExecState::ExecState):
              (KJS::GlobalExecState::GlobalExecState):
              * kjs/ExecState.h:
              (KJS::ExecState::globalThisValue):
              * kjs/ExecStateInlines.h:
              (KJS::ExecState::ExecState):
              (KJS::FunctionExecState::FunctionExecState):
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::reset):
              (KJS::JSGlobalObject::toGlobalObject):
              * kjs/JSGlobalObject.h:
              (KJS::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (KJS::JSGlobalObject::JSGlobalObject):
              * kjs/array_instance.cpp:
              (KJS::CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments):
              (KJS::compareWithCompareFunctionForQSort):
              * kjs/array_object.cpp:
              (KJS::arrayProtoFuncSort):
              (KJS::arrayProtoFuncFilter):
              (KJS::arrayProtoFuncMap):
              (KJS::arrayProtoFuncEvery):
              (KJS::arrayProtoFuncForEach):
              (KJS::arrayProtoFuncSome):
              * kjs/function.cpp:
              (KJS::FunctionImp::callAsFunction):
              (KJS::ActivationImp::toThisObject):
              (KJS::globalFuncEval):
              (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction):
              (KJS::PrototypeReflexiveFunction::mark):
              * kjs/function.h:
              (KJS::PrototypeReflexiveFunction::cachedGlobalObject):
              * kjs/function_object.cpp:
              (KJS::functionProtoFuncApply):
              (KJS::functionProtoFuncCall):
              * kjs/nodes.cpp:
              (KJS::ExpressionNode::resolveAndCall):
              (KJS::FunctionCallValueNode::evaluate):
              (KJS::LocalVarFunctionCallNode::inlineEvaluate):
              (KJS::ScopedVarFunctionCallNode::inlineEvaluate):
              (KJS::FunctionCallBracketNode::evaluate):
              (KJS::FunctionCallDotNode::inlineEvaluate):
              * kjs/object.cpp:
              (KJS::JSObject::call):
              (KJS::JSObject::put):
              (KJS::tryGetAndCallProperty):
              (KJS::JSObject::lookupGetter):
              (KJS::JSObject::lookupSetter):
              (KJS::JSObject::toThisObject):
              (KJS::JSObject::toGlobalObject):
              (KJS::JSObject::fillGetterPropertySlot):
              * kjs/object.h:
              * kjs/object_object.cpp:
              (KJS::objectProtoFuncLookupGetter):
              (KJS::objectProtoFuncLookupSetter):
              * kjs/string_object.cpp:
              (KJS::replace):
      
      WebCore:
      
      2008-04-04  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Geoffrey Garen.
      
              First step in implementing the "split window"
      
              - This patch takes the first step in changing the window navigation model
                from clearing the window properties on navigation, to replacing
                an inner window.  This is necessary to safely perform security checks
                using the lexical global object.
      
                This first step adds a new class called JSDOMWindowWrapper, which wraps
                the real window object.  All JS calls that would go to the window object
                now go to it, which it forwards to the current inner window.  To accomplish
                this, the wrapper window is used as the ThisValue wherever the window was used
                before.
      
              * WebCore.base.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::clear): Reset the wrapper windows prototype too.
              (WebCore::JSDOMWindowBase::toThisObject):
              (WebCore::JSDOMWindowBase::wrapper):
              (WebCore::windowProtoFuncAToB):
              (WebCore::windowProtoFuncBToA):
              (WebCore::windowProtoFuncOpen):
              (WebCore::windowProtoFuncSetTimeout):
              (WebCore::windowProtoFuncClearTimeout):
              (WebCore::windowProtoFuncSetInterval):
              (WebCore::windowProtoFuncAddEventListener):
              (WebCore::windowProtoFuncRemoveEventListener):
              (WebCore::windowProtoFuncShowModalDialog):
              (WebCore::windowProtoFuncNotImplemented):
              (WebCore::toJS):
              * bindings/js/JSDOMWindowBase.h:
              Fix to expect the wrapper as the thisObj.
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::postMessage):
              (WebCore::toDOMWindow):
              * bindings/js/JSDOMWindowWrapper.cpp: Added.
              (WebCore::):
              (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper):
              (WebCore::JSDOMWindowWrapper::~JSDOMWindowWrapper):
              (WebCore::JSDOMWindowWrapper::mark):
              (WebCore::JSDOMWindowWrapper::className):
              (WebCore::JSDOMWindowWrapper::getOwnPropertySlot):
              (WebCore::JSDOMWindowWrapper::put):
              (WebCore::JSDOMWindowWrapper::deleteProperty):
              (WebCore::JSDOMWindowWrapper::getPropertyNames):
              (WebCore::JSDOMWindowWrapper::getPropertyAttributes):
              (WebCore::JSDOMWindowWrapper::defineGetter):
              (WebCore::JSDOMWindowWrapper::defineSetter):
              (WebCore::JSDOMWindowWrapper::lookupGetter):
              (WebCore::JSDOMWindowWrapper::lookupSetter):
              (WebCore::JSDOMWindowWrapper::toGlobalObject):
              (WebCore::JSDOMWindowWrapper::impl):
              (WebCore::JSDOMWindowWrapper::disconnectFrame):
              (WebCore::JSDOMWindowWrapper::clear):
              (WebCore::toJS):
              * bindings/js/JSDOMWindowWrapper.h: Added.
              (WebCore::JSDOMWindowWrapper::innerWindow):
              (WebCore::JSDOMWindowWrapper::setInnerWindow):
              (WebCore::JSDOMWindowWrapper::classInfo):
              Forward methods to the innerWindow.
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::open):
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::~KJSProxy):
              (WebCore::KJSProxy::evaluate):
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              (WebCore::KJSProxy::clearDocumentWrapper):
              (WebCore::KJSProxy::processingUserGesture):
              (WebCore::KJSProxy::attachDebugger):
              * bindings/js/kjs_proxy.h:
              (WebCore::KJSProxy::haveWindowWrapper):
              (WebCore::KJSProxy::windowWrapper):
              (WebCore::KJSProxy::globalObject):
              (WebCore::KJSProxy::initScriptIfNeeded):
              Hold onto the wrapper window instead of global object.  As a convenience,
              keep the globalObject() as a forward to the inner window.
              * bindings/objc/DOMUtility.mm:
              (KJS::createDOMWrapper):
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Document.cpp:
              (WebCore::Document::domWindow):
              * dom/Document.h:
              (WebCore::Document::defaultView):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::dispatchWindowObjectAvailable):
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::pageDestroyed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41dbaab8
    • aroben@apple.com's avatar
      Move callOnMainThread to WTF · 614f946c
      aroben@apple.com authored
      JavaScriptCore:
      
              Move callOnMainThread to WTF
      
              Reviewed by Alexey Proskuryakov.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              Added new files.
      
              * wtf/MainThread.cpp:
              * wtf/MainThread.h:
              * wtf/gtk/MainThreadGtk.cpp:
              * wtf/mac/MainThreadMac.mm:
              * wtf/qt/MainThreadQt.cpp:
              * wtf/win/MainThreadWin.cpp:
              * wtf/wx/MainThreadWx.cpp:
              Moved here from WebCore/platform. Replaced all instances of "WebCore"
              with "WTF".
      
              * kjs/bool_object.cpp: Touched to force JavaScriptCore.vcproj to
              build.
              to the WTF namespace.
              * wtf/ThreadingWin.cpp:
              (WTF::initializeThreading): Call initializeMainThread.
      
      WebCore:
      
              Move callOnMainThread to WTF
      
              Reviewed by Alexey Proskuryakov.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
              Removed MainThread files.
      
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              * loader/icon/IconDatabase.cpp:
              (WebCore::iconDatabase):
              * storage/Database.cpp:
              (WebCore::Database::Database):
              * storage/DatabaseTracker.cpp:
              Updated #includes and replaced calls to
              WebCore::initializeThreadingAndMainThread with calls to
              KJS::initializeThreading.
      
              * platform/MainThread.cpp: Removed.
              * platform/MainThread.h: Removed.
              * platform/gtk/MainThreadGtk.cpp: Removed.
              * platform/mac/MainThreadMac.mm: Removed.
              * platform/qt/MainThreadQt.cpp: Removed.
              * platform/win/MainThreadWin.cpp: Removed.
              * platform/wx/MainThreadWx.cpp: Removed.
      
      WebKit/gtk:
      
              Move callOnMainThread to WTF
      
              Reviewed by Alexey Proskuryakov.
      
              * webkit/webkitprivate.cpp: Updated #include.
              (webkit_init): Changed to call KJS::initializeThreading.
      
      WebKit/win:
      
              Move callOnMainThread to WTF
      
              Reviewed by Alexey Proskuryakov.
      
              * WebIconDatabase.cpp: Updated #include
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      614f946c
  17. 07 Apr, 2008 3 commits
    • beidson@apple.com's avatar
      2008-04-07 Brady Eidson <beidson@apple.com> · 355c7266
      beidson@apple.com authored
              Touch JSStorageCustom.cpp to try to FORCE a recompile on bots that haven't gotten the message
      
              * bindings/js/JSStorageCustom.cpp:
              (WebCore::JSStorage::customPut):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      355c7266
    • beidson@apple.com's avatar
      WebCore: · c2e6fd7e
      beidson@apple.com authored
      2008-04-07  Brady Eidson  <beidson@apple.com>
      
              Lovingly reviewed by Sam Weinig
      
              <rdar://problem/5797684> - HTML5 SessionStorage and underpinnings for LocalStorage
      
              Tests: storage/domstorage/sessionstorage/iframe-events.html
                     storage/domstorage/sessionstorage/index-get-and-set.html
                     storage/domstorage/sessionstorage/simple-events.html
                     storage/domstorage/sessionstorage/simple-usage.html
                     storage/domstorage/sessionstorage/window-open.html
                     storage/domstorage/window-attributes-exist.html
      
              * Configurations/WebCore.xcconfig: Define to enable DOM_STORAGE
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::mark): Add optionalSessionStorage case
      
              * bindings/js/JSEventCustom.cpp:
              (WebCore::toJS): Add StorageEvent case
      
              * bindings/js/JSStorageCustom.cpp:
              (WebCore::JSStorage::canGetItemsForName):
              (WebCore::JSStorage::nameGetter): If the property doesn't exist on the object, call through to getItem()
              (WebCore::JSStorage::customPut): If the property doesn't exist on the object, call through to setItem()
      
              * dom/Event.cpp:
              (WebCore::Event::isStorageEvent):
              * dom/Event.h:
      
              * dom/EventNames.h: Add "storage"
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchStorageEvent):
              * dom/EventTargetNode.h:
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::createWindow): After a new page has been created, set its SessionStorage object
                to a copy of the previous Page's
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::sessionStorage): Accessor to pull the appropriate OriginStorage out of the Page's
                SessionStorage.
              (WebCore::DOMWindow::localStorage): To be filled in later
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalSessionStorage): Return the session Storage object for this window to mark, 
                if any exists
              * page/DOMWindow.idl:
      
              * page/Page.cpp:
              (WebCore::Page::sessionStorage):  Create and/or return the SessionStorage for this Page.
              (WebCore::Page::setSessionStorage): Set the SessionStorage for this Page - used in FrameLoader after a
                Window.open();
              * page/Page.h:
      
              * storage/OriginStorage.cpp: Intermediate layer between individual Storage objects, and shared StorageMap 
                objects.  There is one OriginStorage object per SecurityOrigin in each "unique set of storage areas", such
                as the SessionStorage.  This layer forwards DOM-level calls down to the backing StorageMap, handles 
                copy-on-write along with the StorageMap, fires StorageEvents to the DOM when a value is changed, and will
                eventually handle quota enforcement.
              (WebCore::OriginStorage::create):
              (WebCore::OriginStorage::OriginStorage):
              (WebCore::OriginStorage::~OriginStorage):
              (WebCore::OriginStorage::copy):
              (WebCore::OriginStorage::length):
              (WebCore::OriginStorage::key):
              (WebCore::OriginStorage::getItem):
              (WebCore::OriginStorage::setItem):
              (WebCore::OriginStorage::removeItem):
              (WebCore::OriginStorage::contains):
              (WebCore::OriginStorage::dispatchStorageEvent):
              * storage/OriginStorage.h:
      
              * storage/SessionStorage.cpp: From the HTML5 spec:
                "Each top-level browsing context has a unique set of session storage areas, one for each origin."
                This object represents that "unique set of session storage areas", and creates or returns the Storage
                object for the requested SecurityOrigin
              (WebCore::SessionStorage::create):
              (WebCore::SessionStorage::SessionStorage):
              (WebCore::SessionStorage::copy):
              (WebCore::SessionStorage::originStorage):
              * storage/SessionStorage.h:
              (WebCore::SessionStorage::page):
      
              * storage/Storage.cpp: Representation of the DOM-level object, wrapped by JSStorage.  There is a unique
                Storage object per Window (per-Frame) that wraps a specific shared OriginStorage object.
              (WebCore::Storage::create):
              (WebCore::Storage::Storage):
              (WebCore::Storage::length):
              (WebCore::Storage::key):
              (WebCore::Storage::getItem):
              (WebCore::Storage::setItem):
              (WebCore::Storage::removeItem):
              (WebCore::Storage::contains):
              * storage/Storage.h:
              * storage/Storage.idl:
      
              * storage/StorageEvent.cpp:
              (WebCore::StorageEvent::StorageEvent):
              (WebCore::StorageEvent::initStorageEvent):
              * storage/StorageEvent.h:
              (WebCore::StorageEvent::isStorageEvent):
      
              * storage/StorageMap.cpp: The physical map of key/value pairs that is shared between OriginStorage objects, 
                and implements copy-on-write semantics whenever a value is changed
              (WebCore::StorageMap::create):
              (WebCore::StorageMap::StorageMap):
              (WebCore::StorageMap::copy):
              (WebCore::StorageMap::invalidateIterator): Used to support the key(unsigned i) part of the API
              (WebCore::StorageMap::setIteratorToIndex): Ditto
              (WebCore::StorageMap::length):
              (WebCore::StorageMap::key):
              (WebCore::StorageMap::getItem):
              (WebCore::StorageMap::setItem):
              (WebCore::StorageMap::removeItem):
              (WebCore::StorageMap::contains):
              * storage/StorageMap.h:
      
      LayoutTests:
      
      2008-04-07  Brady Eidson  <beidson@apple.com>
      
              Begrudgingly reviewed by Sam Weinig
      
              Initial suite of layout tests for HTML5 key/value SessionStorage (<rdar://problem/5797684>)
      
              * fast/dom/Window/window-properties-expected.txt:
              * storage/domstorage: Added.
              * storage/domstorage/localstorage: Added.
              * storage/domstorage/sessionstorage: Added.
              * storage/domstorage/sessionstorage/iframe-events-expected.txt: Added.
              * storage/domstorage/sessionstorage/iframe-events.html: Added.
              * storage/domstorage/sessionstorage/index-get-and-set-expected.txt: Added.
              * storage/domstorage/sessionstorage/index-get-and-set.html: Added.
              * storage/domstorage/sessionstorage/resources: Added.
              * storage/domstorage/sessionstorage/resources/clearSessionStorage.js: Added.
              * storage/domstorage/sessionstorage/resources/iframe-events-second.html: Added.
              * storage/domstorage/sessionstorage/resources/window-open-second.html: Added.
              * storage/domstorage/sessionstorage/simple-events-expected.txt: Added.
              * storage/domstorage/sessionstorage/simple-events.html: Added.
              * storage/domstorage/sessionstorage/simple-usage-expected.txt: Added.
              * storage/domstorage/sessionstorage/simple-usage.html: Added.
              * storage/domstorage/sessionstorage/window-open-expected.txt: Added.
              * storage/domstorage/sessionstorage/window-open.html: Added.
              * storage/domstorage/window-attributes-exist-expected.txt: Added.
              * storage/domstorage/window-attributes-exist.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2e6fd7e
    • beidson@apple.com's avatar
      2008-04-07 Brady Eidson <beidson@apple.com> · f65c9fae
      beidson@apple.com authored
              Reviewed by Tim Hatcher
      
              Add 1 more empty file for upcoming work, as a separate step, to keep all build-systems working
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * bindings/js/JSStorageCustom.cpp: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f65c9fae
  18. 03 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-04-03 David Hyatt <hyatt@apple.com> · 16b7b440
      hyatt@apple.com authored
              Create a new cross-platform Gradient abstraction and make CanvasGradient wrap it.  This first
              step just cleans up CanvasGradient.  The code that calls it remains ifdef'd however.
      
              Reviewed by olliej
      
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              (WebCore::toJS):
              * html/CanvasGradient.cpp:
              (WebCore::CanvasGradient::CanvasGradient):
              * html/CanvasGradient.h:
              (WebCore::CanvasGradient::gradient):
              (WebCore::CanvasGradient::addColorStop):
              (WebCore::CanvasGradient::getColor):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::fill):
              (WebCore::CanvasRenderingContext2D::stroke):
              (WebCore::CanvasRenderingContext2D::fillRect):
              * html/CanvasStyle.h:
              (WebCore::CanvasStyle::canvasGradient):
              * platform/graphics/Gradient.cpp: Added.
              (WebCore::Gradient::Gradient):
              (WebCore::Gradient::~Gradient):
              (WebCore::Gradient::addColorStop):
              (WebCore::compareStops):
              (WebCore::Gradient::getColor):
              (WebCore::Gradient::findStop):
              * platform/graphics/Gradient.h: Added.
              (WebCore::Gradient::ColorStop::ColorStop):
              (WebCore::Gradient::platformInit):
              * platform/graphics/cairo/GradientCairo.cpp: Added.
              (WebCore::Gradient::platformDestroy):
              (WebCore::Gradient::platformGradient):
              * platform/graphics/cg/GradientCG.cpp: Added.
              (WebCore::Gradient::platformDestroy):
              (WebCore::gradientCallback):
              (WebCore::Gradient::platformGradient):
              * platform/graphics/qt/GradientQt.cpp: Added.
              (WebCore::Gradient::platformDestroy):
              (WebCore::Gradient::platformGradient):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16b7b440
  19. 01 Apr, 2008 1 commit