1. 27 May, 2008 1 commit
  2. 24 May, 2008 2 commits
    • ap@webkit.org's avatar
      Reviewed by Maciej. · 494e3da5
      ap@webkit.org authored
              Optimize Node::textContent() to avoid O(n^2) string appending behavior.
      
              1.6% speedup at Acid3 test 26.
      
              * WebCore.xcodeproj/project.pbxproj:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCoreSources.bkl:
              * WebCore.vcproj/WebCore.vcproj:
              * platform/text/StringBuilder.cpp: Added.
              (WebCore::StringBuilder::append):
              (WebCore::StringBuilder::toString):
              * platform/text/StringBuilder.h: Added.
              (WebCore::StringBuilder::StringBuilder):
              (WebCore::StringBuilder::isNull):
              Added a simple class to efficiently build a string by appending. Potentially, it can be
              extended to be more like java.lang.StringBuilder, but we don't need that much flexibility now.
      
              * dom/Node.cpp:
              (WebCore::Node::appendTextContent):
              (WebCore::Node::textContent):
              * dom/Node.h:
              Changed to use StringBuilder.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      494e3da5
    • jchaffraix@webkit.org's avatar
      2008-05-24 Julien Chaffraix <jchaffraix@webkit.org> · a6454934
      jchaffraix@webkit.org authored
              Reviewed by Eric.
      
              Bug 9191: JS*ElementWrapperFactory should be autogenerated
              https://bugs.webkit.org/show_bug.cgi?id=9191
      
              This is a first pass for generation of JS*ElementWrapperFactory, in the long term we should move the make_names.pl
              intelligence to the *.in files.
      
              - Add a new parameter to make_names.pl --wrapperFactory which works like --wrapper but generates the
              JS*ElementWrapperFactory files.
      
              - Removed JS*ElementWrapperFactory files in WebCore/bindings/js, replaced by the generated ones.
      
              - Updated the build systems to account for the previous changes.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSHTMLElementWrapperFactory.cpp: Removed.
              * bindings/js/JSHTMLElementWrapperFactory.h: Removed.
              * bindings/js/JSSVGElementWrapperFactory.cpp: Removed.
              * bindings/js/JSSVGElementWrapperFactory.h: Removed.
              * dom/make_names.pl:
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6454934
  3. 15 May, 2008 2 commits
  4. 14 May, 2008 2 commits
    • kmccullough@apple.com's avatar
      JavaScriptCore: · 944b8621
      kmccullough@apple.com authored
      2008-05-14  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Sam.
      
              <rdar://problem/5770054> JavaScript profiler (10928)
              - Rename FunctionCallProfile to ProfileNode.
      
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * profiler/FunctionCallProfile.cpp: Removed.
              * profiler/FunctionCallProfile.h: Removed.
              * profiler/Profile.cpp:
              (KJS::Profile::Profile):
              (KJS::Profile::willExecute):
              * profiler/Profile.h:
              (KJS::Profile::callTree):
              * profiler/ProfileNode.cpp: Copied from profiler/FunctionCallProfile.cpp.
              (KJS::ProfileNode::ProfileNode):
              (KJS::ProfileNode::willExecute):
              (KJS::ProfileNode::didExecute):
              (KJS::ProfileNode::addChild):
              (KJS::ProfileNode::findChild):
              (KJS::ProfileNode::stopProfiling):
              (KJS::ProfileNode::selfTime):
              (KJS::ProfileNode::printDataInspectorStyle):
              (KJS::ProfileNode::printDataSampleStyle):
              (KJS::ProfileNode::endAndRecordCall):
              * profiler/ProfileNode.h: Copied from profiler/FunctionCallProfile.h.
              (KJS::ProfileNode::create):
              (KJS::ProfileNode::children):
              * profiler/Profiler.cpp:
      
      WebCore:
      
      2008-05-14  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Sam.
      
              <rdar://problem/5770054> JavaScript profiler (10928)
              - Rename FunctionCallProfile to ProfileNode
      
              * ForwardingHeaders/profiler/FunctionCallProfile.h: Removed.
              * ForwardingHeaders/profiler/ProfileNode.h: Copied from ForwardingHeaders/profiler/FunctionCallProfile.h.
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * page/JavaScriptFunctionCallProfile.cpp: Removed.
              * page/JavaScriptFunctionCallProfile.h: Removed.
              * page/JavaScriptProfile.cpp:
              * page/JavaScriptProfileNode.cpp: Copied from page/JavaScriptFunctionCallProfile.cpp.
              (WebCore::ProfileNodeCache):
              (WebCore::getFunctionName):
              (WebCore::getTotalTime):
              (WebCore::getSelfTime):
              (WebCore::getNumberOfCalls):
              (WebCore::getChildren):
              (WebCore::finalize):
              (WebCore::ProfileNodeClass):
              (WebCore::toJS):
              * page/JavaScriptProfileNode.h: Copied from page/JavaScriptFunctionCallProfile.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      944b8621
    • kmccullough@apple.com's avatar
      2008-05-14 Kevin McCullough <kmccullough@apple.com> · 7c0ba747
      kmccullough@apple.com authored
              Reviewed by Adam.
      
              <rdar://problem/5770054> JavaScript profiler (10928)
              - Add support for interacting with the JavaScriptCore profiler.
      
              * ForwardingHeaders/profiler/FunctionCallProfile.h: Added.
              * ForwardingHeaders/profiler/Profile.h: Added.
              * GNUmakefile.am: Add the new files to all the projects.
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * page/InspectorController.cpp: Add the ability to retrieve all of the
              profiles in JavaScript from the InspectorController.
              (WebCore::allProfiles):
              (WebCore::InspectorController::windowScriptObjectAvailable):
              * page/JavaScriptFunctionCallProfile.cpp: Added. Wrapper around the JSC
              FunctionCallProfile.
              (WebCore::functionCallProfileCache): This cache makes sure we don't
              needlessly create duplicate wrappers around the same
              FunctionCallProfile*.
              (WebCore::getFunctionName): Callback to return the name of the function.
              (WebCore::getTotalTime): Callback to return the total time spent in the
              function.
              (WebCore::getSelfTime): Callback to return the time spent in self (total
              - time in children) in the function.
              (WebCore::getNumberOfCalls): Callback to return the number of times this
              function was called.
              (WebCore::getChildren): Callback to return the children of this function
              where the children are the functions this function called.
              (WebCore::finalize): Cleanup.
              (WebCore::functionCallProfileClass): Define the JSClassRef for this
              object.
              (WebCore::toJS): Create a conversion function to make a usable JSValue
              to wrap the FunctionCallProfile in JSC.
              * page/JavaScriptFunctionCallProfile.h: Added.
              * page/JavaScriptProfile.cpp: Added. Wrapper around the JSC Profile.
              (WebCore::profileCache): This cache makes sure we don't needlessly
              create duplicate wrappers aroudn the same Profile*.
              (WebCore::getHeadCallback): Callback to return the head of the graph of
              the functions profiled durring this profile's run.
              (WebCore::finalize):
              (WebCore::profileClass): Define the JSClassRef for this object.
              (WebCore::toJS): Create a conversion function to make a usable JSValue
              to wrap the Profile from JSC.
              * page/JavaScriptProfile.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c0ba747
  5. 11 May, 2008 1 commit
    • weinig@apple.com's avatar
      2008-05-11 Sam Weinig <sam@webkit.org> · f3f6843d
      weinig@apple.com authored
              Reviewed by Dan Bernstein.
      
              Add scaffolding for the implementation of Access Control for Cross-site Requests. 
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * xml/AccessControlList.cpp: Added.
              (WebCore::AccessControlList::AccessControlList):
              (WebCore::AccessControlList::~AccessControlList):
              (WebCore::AccessControlList::parseAccessControlHeader):
              (WebCore::AccessControlList::checkOrigin):
              * xml/AccessControlList.h: Added.
              * xml/AccessItem.cpp: Added.
              (WebCore::AccessItem::AccessItem):
              (WebCore::AccessItem::parseAccessItem):
              (WebCore::AccessItem::matches):
              * xml/AccessItem.h: Added.
              * xml/AccessItemRule.cpp: Added.
              (WebCore::AccessItemRule::AccessItemRule):
              (WebCore::AccessItemRule::parseAccessItemRule):
              * xml/AccessItemRule.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3f6843d
  6. 06 May, 2008 3 commits
    • kevino@webkit.org's avatar
      wx build fix. Adding files added in r32925 to the bakefiles. · f8726c7b
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8726c7b
    • alice.liu@apple.com's avatar
      2008-05-06 Alice Liu <alice.liu@apple.com> · d5e7aef8
      alice.liu@apple.com authored
              Rubber-stamped by Beth
              
              stab-in-the-dark attempt at fixing non-mac builds.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5e7aef8
    • beidson@apple.com's avatar
      2008-05-06 Brady Eidson <beidson@apple.com> · 7783de5a
      beidson@apple.com authored
              Reviewed by Darin Adler
      
              Preparation for upcoming work making LocalStorage persistent.
      
              Writing persistent values for LocalStorage will take place on a background thread.
              Here is that background thread, as well as most of the hooks that will be utilized to
              make the whole song and dance work.
      
              The thread itself is very simple and MessageQueue based.  LocalStorageTasks are what 
              mark the work that needs to be done and come in 5 flavors:  Import and Sync a LocalStorage set,
              Import and Sync a LocalStorageArea, and terminate the thread.
      
              This patch accomplished 2 things:
              
              1 - Each PageGroup has its own LocalStorage set.  Upon its creation its LocalStorageThread is 
                  created and started.
      
              2 - At application shutdown, each thread is synchronously terminated.
      
              What happens between steps 1 and 2 will come later.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * storage/LocalStorage.cpp: Add some threading ASSERTs to make it clear which thread each
                method is meant to be called from.
              (WebCore::LocalStorage::LocalStorage):
              (WebCore::LocalStorage::storageArea):
              (WebCore::LocalStorage::performImport): Placeholder for importing known origins and quotas
              (WebCore::LocalStorage::performSync): Placeholder for writing out updated origins and quotas
              (WebCore::LocalStorage::close): Synchronously terminate the thread.
              * storage/LocalStorage.h:
      
              * storage/LocalStorageArea.cpp: Add some threading ASSERTs to make it clear which thread each
                method is meant to be called from.
              (WebCore::LocalStorageArea::itemChanged):
              (WebCore::LocalStorageArea::itemRemoved):
              (WebCore::LocalStorageArea::areaCleared):
              (WebCore::LocalStorageArea::dispatchStorageEvent):
              (WebCore::LocalStorageArea::performImport): Placeholder for importing all items for this 
                LocalStorageArea to prime the page before the items are needed
              (WebCore::LocalStorageArea::performSync): Placeholder for writing out dirty items to disk
              * storage/LocalStorageArea.h:
      
              * storage/LocalStorageTask.cpp: Added.
              (WebCore::LocalStorageTask::LocalStorageTask):
              (WebCore::LocalStorageTask::performTask):
              * storage/LocalStorageTask.h: Added.
              (WebCore::LocalStorageTask::):
              (WebCore::LocalStorageTask::createImport):
              (WebCore::LocalStorageTask::createSync):
              (WebCore::LocalStorageTask::createTerminate):
      
              * storage/LocalStorageThread.cpp: Added.
              (WebCore::LocalStorageThread::create):
              (WebCore::LocalStorageThread::LocalStorageThread):
              (WebCore::LocalStorageThread::start):
              (WebCore::LocalStorageThread::localStorageThreadStart):
              (WebCore::LocalStorageThread::localStorageThread):
              (WebCore::LocalStorageThread::scheduleImport):
              (WebCore::LocalStorageThread::scheduleSync):
              (WebCore::LocalStorageThread::terminate): 
              (WebCore::LocalStorageThread::performTerminate):
              * storage/LocalStorageThread.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7783de5a
  7. 03 May, 2008 1 commit
  8. 01 May, 2008 1 commit
    • 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
  9. 29 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      WebCore: · 7eb14abd
      hyatt@apple.com authored
      2008-04-29  David Hyatt  <hyatt@apple.com>
      
              Implement the new box-reflect property in CSS.  This property enables real-time reflections on
              objects (yes you can reflect <video>!).
      
              Reviewed by Dan Bernstein
      
              Test cases added in fast/reflections/
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::):
              (WebCore::valueForReflection):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              (WebCore::CSSParser::parseReflect):
              (WebCore::BorderImageParseContext::commitBorderImage):
              (WebCore::CSSParser::parseBorderImage):
              (WebCore::parseGradientColorStop):
              (WebCore::CSSParser::parseTransform):
              * css/CSSParser.h:
              * css/CSSPropertyNames.in:
              * css/CSSReflectValue.cpp: Added.
              (WebCore::CSSReflectValue::cssText):
              * css/CSSReflectValue.h: Added.
              (WebCore::):
              (WebCore::CSSReflectValue::CSSReflectValue):
              (WebCore::CSSReflectValue::direction):
              (WebCore::CSSReflectValue::offset):
              (WebCore::CSSReflectValue::mask):
              (WebCore::CSSReflectValue::setDirection):
              (WebCore::CSSReflectValue::setOffset):
              (WebCore::CSSReflectValue::setMask):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::mapNinePieceImage):
              * css/CSSStyleSelector.h:
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesVertically):
              (WebCore::InlineFlowBox::paintMask):
              * rendering/Length.h:
              (WebCore::Length::calcFloatValue):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::overflowHeight):
              (WebCore::RenderBlock::overflowWidth):
              (WebCore::RenderBlock::overflowLeft):
              (WebCore::RenderBlock::overflowTop):
              (WebCore::RenderBlock::overflowRect):
              (WebCore::RenderBlock::layoutBlock):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::setStyle):
              (WebCore::RenderBox::paintMask):
              (WebCore::RenderBox::imageChanged):
              (WebCore::RenderBox::computeAbsoluteRepaintRect):
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::RenderFlexibleBox::layoutBlock):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::RenderLayer):
              (WebCore::RenderLayer::~RenderLayer):
              (WebCore::RenderLayer::updateLayerPositions):
              (WebCore::RenderLayer::enclosingPositionedAncestor):
              (WebCore::RenderLayer::enclosingTransformedAncestor):
              (WebCore::RenderLayer::isTransparent):
              (WebCore::transparencyClipBox):
              (WebCore::RenderLayer::operator delete):
              (WebCore::RenderLayer::destroy):
              (WebCore::RenderLayer::removeOnlyThisLayer):
              (WebCore::RenderLayer::insertOnlyThisLayer):
              (WebCore::RenderLayer::paintLayer):
              (WebCore::RenderLayer::updateZOrderLists):
              (WebCore::RenderLayer::updateOverflowList):
              (WebCore::RenderLayer::collectLayers):
              (WebCore::RenderLayer::shouldBeOverflowOnly):
              (WebCore::RenderLayer::styleChanged):
              (WebCore::RenderLayer::reflectionLayer):
              (WebCore::RenderLayer::createReflection):
              (WebCore::RenderLayer::updateReflectionStyle):
              * rendering/RenderLayer.h:
              (WebCore::RenderLayer::hasReflection):
              (WebCore::RenderLayer::reflection):
              (WebCore::RenderLayer::paintingInsideReflection):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::RenderObject):
              (WebCore::RenderObject::requiresLayer):
              (WebCore::RenderObject::setStyle):
              (WebCore::RenderObject::updateImage):
              (WebCore::RenderObject::reflectionBox):
              (WebCore::RenderObject::reflectionOffset):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::hasTransform):
              (WebCore::RenderObject::setHasReflection):
              (WebCore::RenderObject::hasReflection):
              * rendering/RenderReplica.cpp: Added.
              (WebCore::RenderReplica::RenderReplica):
              (WebCore::RenderReplica::~RenderReplica):
              (WebCore::RenderReplica::layout):
              (WebCore::RenderReplica::calcPrefWidths):
              (WebCore::RenderReplica::paint):
              * rendering/RenderReplica.h: Added.
              (WebCore::RenderReplica::renderName):
              (WebCore::RenderReplica::requiresLayer):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
              (WebCore::StyleRareNonInheritedData::operator==):
              (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent):
              (WebCore::RenderStyle::diff):
              (WebCore::RenderStyle::applyTransform):
              * rendering/RenderStyle.h:
              (WebCore::TranslateTransformOperation::apply):
              (WebCore::StyleReflection::StyleReflection):
              (WebCore::StyleReflection::operator==):
              (WebCore::StyleReflection::operator!=):
              (WebCore::StyleReflection::direction):
              (WebCore::StyleReflection::offset):
              (WebCore::StyleReflection::mask):
              (WebCore::StyleReflection::setDirection):
              (WebCore::StyleReflection::setOffset):
              (WebCore::StyleReflection::setMask):
              (WebCore::RenderStyle::boxReflect):
              (WebCore::RenderStyle::setBoxReflect):
              (WebCore::RenderStyle::initialBoxReflect):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::layout):
              (WebCore::RenderTable::paintMask):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::requiresLayer):
              (WebCore::RenderTableCell::paintMask):
      
      LayoutTests:
      
      2008-04-29  David Hyatt  <hyatt@apple.com>
      
              Implement support for the new box-reflect property.  Tests of the new property.
      
              Reviewed by Dan Bernstein
      
              * fast/reflections: Added.
              * fast/reflections/reflection-computed-style-expected.txt: Added.
              * fast/reflections/reflection-computed-style.html: Added.
              * fast/reflections/reflection-direction.html: Added.
              * fast/reflections/reflection-masks.html: Added.
              * fast/reflections/reflection-nesting.html: Added.
              * fast/reflections/resources: Added.
              * fast/reflections/resources/kate.png: Added.
              * fast/reflections/resources/vignette-mask.png: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7eb14abd
  10. 21 Apr, 2008 1 commit
    • 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
  11. 18 Apr, 2008 1 commit
  12. 17 Apr, 2008 1 commit
    • 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
  13. 16 Apr, 2008 3 commits
    • beidson@apple.com's avatar
      2008-04-16 Brady Eidson <beidson@apple.com> · bb69e1eb
      beidson@apple.com authored
              Reviewed by Darin Adler
      
              Merge the StorageAreaClient into the StorageArea class itself as pure virtual methods.
              Add "LocalStorageArea" add "SessionStorageArea" implementations, and have SessionStorage
              and LocalStorage instantiate the appropriate type of StorageArea object.
      
              This purpose of this change is because while adding the persistent store to LocalStorage,
              it became obvious that the client approach wasn't scaling well.  Additionally, a StorageArea
              backing a local storage area required vastly different data members compared to one backing
              a session storage area.
      
              This will be much cleaner going forward.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::storageArea):
              * storage/LocalStorage.h:
      
              * storage/LocalStorageArea.cpp: Added.
              (WebCore::LocalStorageArea::LocalStorageArea):
              (WebCore::LocalStorageArea::itemChanged):
              (WebCore::LocalStorageArea::itemRemoved):
              (WebCore::LocalStorageArea::dispatchStorageEvent):
              * storage/LocalStorageArea.h: Added.
              (WebCore::LocalStorageArea::create):
      
              * storage/SessionStorage.cpp:
              (WebCore::SessionStorage::copy):
              (WebCore::SessionStorage::storageArea):
              * storage/SessionStorage.h:
      
              * storage/SessionStorageArea.cpp: Added.
              (WebCore::SessionStorageArea::copy):
              (WebCore::SessionStorageArea::SessionStorageArea):
              (WebCore::SessionStorageArea::itemChanged):
              (WebCore::SessionStorageArea::itemRemoved):
              (WebCore::SessionStorageArea::dispatchStorageEvent):
              * storage/SessionStorageArea.h: Added.
              (WebCore::SessionStorageArea::create):
              (WebCore::SessionStorageArea::page):
      
              * storage/StorageArea.cpp:
              (WebCore::StorageArea::StorageArea):
              (WebCore::StorageArea::setItem):
              (WebCore::StorageArea::removeItem):
              (WebCore::StorageArea::storageMap):
              * storage/StorageArea.h:
      
              * storage/StorageAreaClient.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb69e1eb
    • hyatt@apple.com's avatar
      2008-04-16 David Hyatt <hyatt@apple.com> · 6838215c
      hyatt@apple.com authored
              Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D.
      
              Reviewed by olliej
      
              Added fast/canvas/canvas-bg.html
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSCanvasValue.cpp: Added.
              (WebCore::CSSCanvasValue::~CSSCanvasValue):
              (WebCore::CSSCanvasValue::cssText):
              (WebCore::CSSCanvasValue::canvasChanged):
              (WebCore::CSSCanvasValue::canvasResized):
              (WebCore::CSSCanvasValue::fixedSize):
              (WebCore::CSSCanvasValue::element):
              (WebCore::CSSCanvasValue::image):
              * css/CSSCanvasValue.h: Added.
              (WebCore::CSSCanvasValue::CSSCanvasValue):
              (WebCore::CSSCanvasValue::isFixedSize):
              (WebCore::CSSCanvasValue::setName):
              * css/CSSGradientValue.cpp:
              * css/CSSGradientValue.h:
              * css/CSSImageGeneratorValue.cpp:
              (WebCore::CSSImageGeneratorValue::generatedImage):
              * css/CSSImageGeneratorValue.h:
              (WebCore::CSSImageGeneratorValue::isFixedSize):
              (WebCore::CSSImageGeneratorValue::fixedSize):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseContent):
              (WebCore::CSSParser::parseBackgroundImage):
              (WebCore::CSSParser::parseBorderImage):
              (WebCore::CSSParser::parseCanvas):
              * css/CSSParser.h:
              * dom/Document.cpp:
              (WebCore::Document::getCSSCanvasContext):
              (WebCore::Document::getCSSCanvasElement):
              * dom/Document.h:
              * dom/Document.idl:
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::HTMLCanvasElement):
              (WebCore::HTMLCanvasElement::reset):
              * html/HTMLCanvasElement.h:
              (WebCore::HTMLCanvasElement::setSize):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calculateBackgroundSize):
              (WebCore::RenderBox::imageChanged):
              * rendering/RenderBox.h:
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::imageChanged):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::imagePtr):
              (WebCore::RenderImage::intrinsicSizeChanged):
              * rendering/RenderImageGeneratedContent.h:
              (WebCore::RenderImageGeneratedContent::imageSize):
              (WebCore::RenderImageGeneratedContent::imagePtr):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::layout):
              (WebCore::RenderListMarker::imageChanged):
              (WebCore::RenderListMarker::calcPrefWidths):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              * rendering/RenderListMarker.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::paintBorderImage):
              (WebCore::RenderObject::imageChanged):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::imageChanged):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::imageChanged):
              * rendering/RenderSVGImage.h:
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::imageSize):
              (WebCore::StyleGeneratedImage::imageSize):
              * rendering/RenderStyle.h:
              (WebCore::StyleCachedImage::data):
              (WebCore::StyleGeneratedImage::StyleGeneratedImage):
              (WebCore::StyleGeneratedImage::data):
              (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
              (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
              (WebCore::StyleGeneratedImage::usesImageContainerSize):
              * rendering/RenderTableCol.cpp:
              (WebCore::RenderTableCol::imageChanged):
              * rendering/RenderTableCol.h:
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::imageChanged):
              * rendering/RenderTableRow.h:
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::imageChanged):
              * rendering/RenderTableSection.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6838215c
    • 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
  14. 14 Apr, 2008 3 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
    • hyatt@apple.com's avatar
      2008-04-14 David Hyatt <hyatt@apple.com> · 82b7dbbd
      hyatt@apple.com authored
              Add support for gradients in the CSS content property.
      
              Reviewed by olliej
      
              Added fast/gradients/generated-gradients.html
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseContent):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::styleImage):
              (WebCore::CSSStyleSelector::mapBackgroundImage):
              * css/CSSStyleSelector.h:
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::attach):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::RenderImage):
              (WebCore::RenderImage::setCachedImage):
              (WebCore::RenderImage::paintReplaced):
              (WebCore::RenderImage::calcReplacedWidth):
              (WebCore::RenderImage::calcReplacedHeight):
              (WebCore::RenderImage::calcAspectRatioWidth):
              (WebCore::RenderImage::calcAspectRatioHeight):
              * rendering/RenderImage.h:
              (WebCore::RenderImage::hasImage):
              (WebCore::RenderImage::image):
              (WebCore::RenderImage::errorOccurred):
              (WebCore::RenderImage::usesImageContainerSize):
              (WebCore::RenderImage::setImageContainerSize):
              (WebCore::RenderImage::imageHasRelativeWidth):
              (WebCore::RenderImage::imageHasRelativeHeight):
              (WebCore::RenderImage::imageSize):
              * rendering/RenderImageGeneratedContent.cpp: Added.
              (WebCore::RenderImageGeneratedContent::RenderImageGeneratedContent):
              (WebCore::RenderImageGeneratedContent::~RenderImageGeneratedContent):
              (WebCore::RenderImageGeneratedContent::setStyleImage):
              * rendering/RenderImageGeneratedContent.h: Added.
              (WebCore::RenderImageGeneratedContent::hasImage):
              (WebCore::RenderImageGeneratedContent::image):
              (WebCore::RenderImageGeneratedContent::errorOccurred):
              (WebCore::RenderImageGeneratedContent::usesImageContainerSize):
              (WebCore::RenderImageGeneratedContent::setImageContainerSize):
              (WebCore::RenderImageGeneratedContent::imageHasRelativeWidth):
              (WebCore::RenderImageGeneratedContent::imageHasRelativeHeight):
              (WebCore::RenderImageGeneratedContent::imageSize):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createObject):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::imageHasRelativeWidth):
              (WebCore::StyleCachedImage::imageHasRelativeHeight):
              (WebCore::StyleCachedImage::usesImageContainerSize):
              (WebCore::RenderStyle::contentDataEquivalent):
              (WebCore::RenderStyle::setContent):
              (WebCore::ContentData::clear):
              * rendering/RenderStyle.h:
              (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
              (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
              (WebCore::StyleGeneratedImage::usesImageContainerSize):
              (WebCore::BackgroundLayer::setBackgroundImage):
              (WebCore::ContentData::):
              (WebCore::RenderStyle::setListStyleImage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82b7dbbd
  15. 11 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-04-11 David Hyatt <hyatt@apple.com> · 805aaf43
      hyatt@apple.com authored
              This patch adds support for CSS gradients as background images.  RenderStyles now hold a StyleImage
              RefPtr, which is a wrapper for two types of images: CachedImages (loaded from URLs) and generated images
              (patterns created on the fly such as gradients).
      
              All of the features of <canvas> are supported: gradients can be linear or radial, have multiple stops, and
              can specify their points as percentages (for reusable gradients across different box sizes).
      
              Reviewed by olliej
      
              Added fast/gradients/simple-gradients.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * css/CSSBorderImageValue.cpp:
              (WebCore::CSSBorderImageValue::CSSBorderImageValue):
              * css/CSSBorderImageValue.h:
              (WebCore::CSSBorderImageValue::imageValue):
              (WebCore::CSSBorderImageValue::generatorValue):
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSGradientValue.cpp: Added.
              (WebCore::CSSGradientValue::cssText):
              (WebCore::CSSGradientValue::createGradient):
              (WebCore::CSSGradientValue::image):
              (WebCore::compareStops):
              (WebCore::CSSGradientValue::sortStopsIfNeeded):
              (WebCore::CSSGradientValue::resolvePoint):
              (WebCore::CSSGradientValue::resolveRadius):
              * css/CSSGradientValue.h: Added.
              (WebCore::):
              (WebCore::CSSGradientColorStop::CSSGradientColorStop):
              (WebCore::CSSGradientValue::CSSGradientValue):
              (WebCore::CSSGradientValue::type):
              (WebCore::CSSGradientValue::setType):
              (WebCore::CSSGradientValue::setFirstX):
              (WebCore::CSSGradientValue::setFirstY):
              (WebCore::CSSGradientValue::setSecondX):
              (WebCore::CSSGradientValue::setSecondY):
              (WebCore::CSSGradientValue::setFirstRadius):
              (WebCore::CSSGradientValue::setSecondRadius):
              (WebCore::CSSGradientValue::addStop):
              * css/CSSImageGeneratorValue.cpp: Added.
              (WebCore::CSSImageGeneratorValue::~CSSImageGeneratorValue):
              (WebCore::CSSImageGeneratorValue::addClient):
              (WebCore::CSSImageGeneratorValue::removeClient):
              (WebCore::CSSImageGeneratorValue::getImage):
              (WebCore::CSSImageGeneratorValue::putImage):
              * css/CSSImageGeneratorValue.h: Added.
              (WebCore::CSSImageGeneratorValue::isImageGeneratorValue):
              * css/CSSImageValue.h:
              (WebCore::CSSImageValue::isImageValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseBackgroundImage):
              (WebCore::BorderImageParseContext::commitImage):
              (WebCore::CSSParser::parseBorderImage):
              (WebCore::parseGradientPoint):
              (WebCore::parseGradientColorStop):
              (WebCore::CSSParser::parseGradient):
              * css/CSSParser.h:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::createStyleImage):
              (WebCore::CSSStyleSelector::mapBackgroundImage):
              * css/CSSStyleSelector.h:
              * css/CSSValue.h:
              (WebCore::CSSValue::isImageValue):
              (WebCore::CSSValue::isImageGeneratorValue):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::isPointInPath):
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::dataChanged):
              (WebCore::BitmapImage::frameCount):
              * platform/graphics/BitmapImage.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::cgImage):
              (WebCore::ImageBuffer::image):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::clipToImageBuffer):
              (WebCore::GraphicsContext::paintBuffer):
              (WebCore::GraphicsContext::drawImage):
              * platform/graphics/cg/ImageBufferCG.cpp:
              (WebCore::ImageBuffer::create):
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::ImageBuffer::~ImageBuffer):
              (WebCore::ImageBuffer::image):
              (WebCore::ImageBuffer::getImageData):
              (WebCore::ImageBuffer::putImageData):
              (WebCore::ImageBuffer::toDataURL):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::draw):
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintBackground):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calculateBackgroundSize):
              (WebCore::RenderBox::imageChanged):
              (WebCore::RenderBox::paintBackgroundExtended):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
              (WebCore::RenderObject::updateBackgroundImages):
              (WebCore::RenderObject::arenaDelete):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleCachedImage::cssValue):
              (WebCore::StyleCachedImage::canRender):
              (WebCore::StyleCachedImage::imageSize):
              (WebCore::StyleCachedImage::setImageContainerSize):
              (WebCore::StyleCachedImage::addClient):
              (WebCore::StyleCachedImage::removeClient):
              (WebCore::StyleCachedImage::image):
              (WebCore::StyleGeneratedImage::cssValue):
              (WebCore::StyleGeneratedImage::imageSize):
              (WebCore::StyleGeneratedImage::setImageContainerSize):
              (WebCore::StyleGeneratedImage::addClient):
              (WebCore::StyleGeneratedImage::removeClient):
              (WebCore::StyleGeneratedImage::image):
              * rendering/RenderStyle.h:
              (WebCore::StyleImage::StyleImage):
              (WebCore::StyleImage::~StyleImage):
              (WebCore::StyleImage::operator==):
              (WebCore::StyleImage::canRender):
              (WebCore::StyleImage::isCachedImage):
              (WebCore::StyleImage::isGeneratedImage):
              (WebCore::StyleCachedImage::StyleCachedImage):
              (WebCore::StyleCachedImage::data):
              (WebCore::StyleCachedImage::isCachedImage):
              (WebCore::StyleGeneratedImage::StyleGeneratedImage):
              (WebCore::StyleGeneratedImage::data):
              (WebCore::StyleGeneratedImage::isGeneratedImage):
              (WebCore::BackgroundLayer::backgroundImage):
              (WebCore::BackgroundLayer::setBackgroundImage):
              (WebCore::BackgroundLayer::containsImage):
              (WebCore::RenderStyle::backgroundImage):
              (WebCore::RenderStyle::initialBackgroundImage):
              * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
              (WebCore::SVGPaintServerGradient::teardown):
              * svg/graphics/cg/SVGResourceMaskerCg.mm:
              (WebCore::SVGResourceMasker::applyMask):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      805aaf43
  16. 10 Apr, 2008 1 commit
    • beidson@apple.com's avatar
      2008-04-10 Brady Eidson <beidson@apple.com> · 9d6f41cd
      beidson@apple.com authored
              Reviewed by Sam Weinig
      
              The name "OriginStorage" never felt right to a few of us.  The HTML5 spec refers to our 
              concept of "OriginStorage" as a "storage area", which makes more sense here.
      
              This patch is basically:
              s/OriginStorage/StorageArea/
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * loader/FrameLoader.cpp:
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::sessionStorage):
              * page/Page.cpp:
      
              * storage/OriginStorage.cpp: Removed.
              * storage/OriginStorage.h: Removed.
      
              * storage/SessionStorage.cpp:
              (WebCore::SessionStorage::copy):
              (WebCore::SessionStorage::storageArea):
              * storage/SessionStorage.h:
      
              * storage/Storage.cpp:
              (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/StorageArea.cpp: Copied from storage/OriginStorage.cpp.
              (WebCore::StorageArea::create):
              (WebCore::StorageArea::StorageArea):
              (WebCore::StorageArea::~StorageArea):
              (WebCore::StorageArea::copy):
              (WebCore::StorageArea::length):
              (WebCore::StorageArea::key):
              (WebCore::StorageArea::getItem):
              (WebCore::StorageArea::setItem):
              (WebCore::StorageArea::removeItem):
              (WebCore::StorageArea::contains):
              (WebCore::StorageArea::dispatchStorageEvent):
              * storage/StorageArea.h: Copied from storage/OriginStorage.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d6f41cd
  17. 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
  18. 07 Apr, 2008 4 commits
    • alice.liu@apple.com's avatar
      I "objeect" to that previous build fix · d9ecef83
      alice.liu@apple.com authored
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9ecef83
    • alice.liu@apple.com's avatar
      attempt at wx build fix · 15c61d6a
      alice.liu@apple.com authored
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15c61d6a
    • 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
    • beidson@apple.com's avatar
      2008-04-06 Brady Eidson <beidson@apple.com> · cce3c766
      beidson@apple.com authored
              Reviewed by Sam
      
              HTML5 Session and Local Storage
      
              Land a bunch of empty files and interfaces to keep things building while 
              I finish off the rest of the implementation of SessionStorage
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
      
              * storage/OriginStorage.cpp: Added.
              * storage/OriginStorage.h: Added.
      
              * storage/SessionStorage.cpp: Added.
              * storage/SessionStorage.h: Added.
      
              * storage/Storage.cpp: Added.
              (WebCore::Storage::length):
              (WebCore::Storage::key):
              (WebCore::Storage::getItem):
              (WebCore::Storage::setItem):
              (WebCore::Storage::removeItem):
              * storage/Storage.h: Added.
              * storage/Storage.idl: Added.
      
              * storage/StorageEvent.cpp: Added.
              * storage/StorageEvent.h: Added.
              (WebCore::StorageEvent::key):
              (WebCore::StorageEvent::oldValue):
              (WebCore::StorageEvent::newValue):
              (WebCore::StorageEvent::uri):
              (WebCore::StorageEvent::source):
              (WebCore::StorageEvent::initStorageEvent):
              * storage/StorageEvent.idl: Added.
      
              * storage/StorageMap.cpp: Added.
              * storage/StorageMap.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cce3c766
  19. 03 Apr, 2008 2 commits
    • mitz@apple.com's avatar
      - project file updates in preparation for build fixes · 7454b3e7
      mitz@apple.com authored
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCoreSources.bkl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7454b3e7
    • 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
  20. 26 Mar, 2008 1 commit
    • weinig@apple.com's avatar
      2008-03-26 Sam Weinig <sam@webkit.org> · e3bf41a8
      weinig@apple.com authored
              Reviewed by Adam Roben.
      
              Autogenerate JSLocation.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              Add files.
      
              * DerivedSources.make: Add Location, remove JSLocation.lut.h
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
              (WebCore::JSDOMWindowBase::getValueProperty):
              (WebCore::JSDOMWindowBase::put):
              (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
              (WebCore::JSDOMWindowBase::disconnectFrame):
              * bindings/js/JSDOMWindowBase.h:
              Remove manuel management of the Location object.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::mark): Add marking of JSLocation.
              (WebCore::JSDOMWindow::setLocation): Add custom setLocation as we only want to do this when
              safe and we need to keep Dashboard quirks.
      
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::location):
              Fetch the location object using the normal toJS route.
      
              * bindings/js/JSLocation.cpp: Removed.
              * bindings/js/JSLocation.h: Removed.
              * bindings/js/JSLocationCustom.cpp: Added.
              (WebCore::JSLocation::customGetOwnPropertySlot):
              (WebCore::JSLocation::customPut):
              (WebCore::JSLocation::deleteProperty):
              (WebCore::JSLocation::customGetPropertyNames):
              (WebCore::navigateIfAllowed):
              (WebCore::JSLocation::setHref):
              (WebCore::JSLocation::setProtocol):
              (WebCore::JSLocation::setHost):
              (WebCore::JSLocation::setHostname):
              (WebCore::JSLocation::setPort):
              (WebCore::JSLocation::setPathname):
              (WebCore::JSLocation::setSearch):
              (WebCore::JSLocation::setHash):
              (WebCore::JSLocation::replace):
              (WebCore::JSLocation::reload):
              (WebCore::JSLocation::assign):
              (WebCore::JSLocation::toString):
              Setter and Functions need custom implementations as they rely on the dynamic
              global object for determining the behavior of the navigation.
      
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              (WebCore::CachedPage::clear):
              * history/CachedPage.h:
              Removed all the special casing for location as it should be treated like all
              the other objects hanging off the window.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::clear):
              (WebCore::DOMWindow::location):
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalLocation):
              * page/DOMWindow.idl:
              Add Location accessor and pointer getter for marking.
      
              * page/Location.cpp: Added.
              (WebCore::Location::Location):
              (WebCore::Location::disconnectFrame):
              (WebCore::Location::url):
              (WebCore::Location::href):
              (WebCore::Location::protocol):
              (WebCore::Location::host):
              (WebCore::Location::hostname):
              (WebCore::Location::port):
              (WebCore::Location::pathname):
              (WebCore::Location::search):
              (WebCore::Location::hash):
              (WebCore::Location::toString):
              * page/Location.h: Added.
              (WebCore::Location::create):
              (WebCore::Location::frame):
              * page/Location.idl: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3bf41a8
  21. 24 Mar, 2008 1 commit
    • beidson@apple.com's avatar
      WebCore: · 38f2f236
      beidson@apple.com authored
      2008-03-24  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin's rubberstamp
      
              Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * loader/archive: Added.
              * loader/archive/Archive.h: Added.
              * loader/archive/ArchiveFactory.cpp: Added.
              * loader/archive/ArchiveFactory.h: Added.
              * loader/archive/ArchiveResource.cpp: Added.
              * loader/archive/ArchiveResource.h: Added.
              * loader/archive/ArchiveResourceCollection.cpp: Added.
              * loader/archive/ArchiveResourceCollection.h: Added.
              * loader/archive/cf: Added.
              * loader/archive/cf/LegacyWebArchive.cpp: Added.
              * loader/archive/cf/LegacyWebArchive.h: Added.
              * loader/archive/cf/LegacyWebArchiveMac.mm: Added.
      
      WebKit:
      
      2008-03-24  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin's rubberstamp
      
              Rename a .m to .mm
      
              * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/mac:
      
      2008-03-24  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin's rubberstamp
      
              Rename this file for upcoming work.
      
              * WebView/WebArchive.m: Removed.
              * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38f2f236
  22. 18 Mar, 2008 2 commits
    • antti@apple.com's avatar
      2008-03-18 Antti Koivisto <antti@apple.com> · 07362600
      antti@apple.com authored
              Reviewed by Mark Rowe.
      
              Enable preloading for other platforms besides Mac.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
              * html/HTMLTokenizer.cpp:
              * html/HTMLTokenizer.h:
              * html/PreloadScanner.cpp:
              (WebCore::PreloadScanner::tokenize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07362600
    • pewtermoose@webkit.org's avatar
      WebCore: · d914008d
      pewtermoose@webkit.org authored
      2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
      
              Reviewed by Jon Honeycutt.
      
              Add PluginView.cpp and npapi.cpp to build files.
              Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
              Split Windows specific code out of PluginView.cpp.
              Add #if USE(NPOBJECT) around dependant code.
              Use npruntime_internal.h instead of npapi.h.
              Add PlatformWidget typedef to Widget.h.
              Update WidgetGtk.cpp for the PlatformWidget usage.
              Add needed methods to TemporaryLinkStubs for GTK+ port.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCoreSources.bkl:
              * WebCore.vcproj/WebCore.vcproj:
              * plugins/win/PluginViewWin.cpp:
              * plugins/PluginView.cpp:
              * plugins/PluginView.h:
              * plugins/npapi.cpp:
              * platform/Widget.h:
              * platform/gtk/WidgetGtk.cpp:
              * platform/gtk/TemporaryLinkStubs.cpp:
      
      WebKit/gtk:
      
      2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
      
              Reviewed by Jon Honeycutt.
      
              Update setContainingWindow() calls to pass a GtkWidget.
      
              * webkit/webkitwebframe.cpp:
              (webkit_web_frame_new):
              (webkit_web_frame_init_with_web_view):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d914008d
  23. 14 Mar, 2008 1 commit
    • aroben@apple.com's avatar
      Make most of callOnMainThread's implementation be cross-platform · 81dfe13d
      aroben@apple.com authored
              I took the non-platform-specific parts of MainThreadWin.cpp and moved
              them to a new MainThread.cpp. Each platform is now responsible for
              implementing one function, scheduleDispatchFunctionsOnMainThread,
              which is supposed to set things up so that
              dispatchFunctionsFromMainThread gets called from the main thread in
              the near future.
      
              Reviewed by Alexey.
      
              * GNUmakefile.am: Added MainThread.cpp to the project.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
              * platform/MainThread.cpp:
                - Copied from WebCore/platform/win/MainThreadWin.cpp.
                - Removed the Windows-specific parts.
              (WebCore::callOnMainThread): Changed to call
              scheduleDispatchFunctionsOnMainThread instead of PostMessage.
              * platform/gtk/MainThreadGtk.cpp:
              (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
              just calls dispatchFunctionsFromMainThread.
              (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
              to g_timeout_add.
              * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
              WebCoreMainThreadCaller.
              (-[WebCoreMainThreadCaller call]): Calls through to
              dispatchFunctionsFromMainThread.
              (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
              WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
              * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
              (WebCore::MainThreadInvoker::event): Chagned to call through to
              dispatchFunctionsFromMainThread.
              (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
              to the MainThreadInvoker.
              * platform/win/MainThreadWin.cpp:
                - Removed the non-Windows-specific parts.
                - Removed some unnecessary initialization of static variables to 0.
              (WebCore::ThreadingWindowWndProc): Changed to call
              dispatchFunctionsFromMainThread.
              (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
              PostMessage.
              * platform/wx/MainThreadWx.cpp:
              (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81dfe13d
  24. 10 Mar, 2008 1 commit
  25. 07 Mar, 2008 1 commit
    • aroben@apple.com's avatar
      Add WebCore::JavaScriptDebugServer and use it from WebKit/win · 908319c6
      aroben@apple.com authored
      WebCore:
      
              Add JavaScriptDebugServer
      
              This class is a singleton which allows one or more
              JavaScriptDebugListeners to receive callbacks during JavaScript
              execution.
      
              Right now all listeners receive callbacks for all Pages in the
              process. Eventually we will want to support listeners registering for
              callbacks for specific Pages (e.g., the Inspector will want to listen
              for execution in just the Page it's inspecting).
      
              Pages notify the JavaScriptDebugServer when they are created so that
              it can install itself as the Page's debugger.
      
              Reviewed by Darin.
      
              * GNUMakefile.am: Added new files to project.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
              * page/JavaScriptDebugListener.h: Added.
              * page/JavaScriptDebugServer.cpp: Added.
              (WebCore::toFrame):
              (WebCore::JavaScriptDebugServer::shared):
              (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
              (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
              (WebCore::JavaScriptDebugServer::addListener): Registers as the
              debugger for all Pages if we're adding our first listener.
              (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
              debugger for all Pages if we're removing our last listner.
              (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
              debugger for the newly created Page if we have any listeners.
              (WebCore::dispatchDidParseSource): Helper function.
              (WebCore::dispatchFailedToParseSource): Ditto.
              (WebCore::JavaScriptDebugServer::sourceParsed): Call
              dispatchDidParseSource or dispatchFailedToParseSource depending on
              whether there was an error or not.
              (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
              the passed-in JavaScriptExecutionCallback on each listener, guarding
              against re-entry.
              (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
              (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
              (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
              (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
              * page/JavaScriptDebugServer.h: Added.
              * page/Page.cpp:
              (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
              created so it can register as our debugger if needed.
      
      WebKit/win:
      
              Change WebScriptDebugServer to use WebCore::JavaScriptDebugServer
      
              WebScriptDebugServer is now a JavaScriptDebugListener.
      
              Reviewed by Darin.
      
              * WebScriptDebugServer.cpp:
              (WebScriptDebugServer::WebScriptDebugServer): Removed initialization
              of m_callingListeners member.
              (WebScriptDebugServer::addListener): Register as a listener with
              JavaScriptDebugServer if we've just added our first listener.
              (WebScriptDebugServer::removeListener): Deregister as a listener with
              JavaScriptDebugServer if we've just removed our last listener.
              (WebScriptDebugServer::didParseSource): Added. Code came from the old
              sourceParsed method. Removed m_callingListeners code because
              JavaScriptDebugServer guards against re-entry for us.
              (WebScriptDebugServer::failedToParseSource): Ditto.
              (WebScriptDebugServer::didEnterCallFrame): Ditto for callEvent.
              (WebScriptDebugServer::willExecuteStatement): Ditto for atStatement.
              (WebScriptDebugServer::willLeaveCallFrame): Ditto for
              willLeaveCallFrame.
              (WebScriptDebugServer::exceptionWasRaised): Ditto for exception.
              * WebScriptDebugServer.h: Changed to inherit from
              WebCore::JavaScriptDebugListener.
              * WebView.cpp:
              (WebView::initWithFrame): Removed call to
              WebScriptDebugServer::pageCreated. This is now handled by WebCore.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      908319c6