1. 29 Jun, 2008 6 commits
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · fee62a72
      weinig@apple.com authored
              Rubber-stamped by Cameron Zwarich.
      
              Splits ErrorConstructor, ErrorPrototype,  NativeErrorConstructor and
              NativeErrorPrototype out of error_object.h/cpp and renames it ErrorInstance.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayPrototype.cpp:
              * kjs/BooleanPrototype.cpp:
              * kjs/DatePrototype.cpp:
              * kjs/ErrorConstructor.cpp: Copied from kjs/error_object.cpp.
              * kjs/ErrorConstructor.h: Copied from kjs/error_object.h.
              * kjs/ErrorInstance.cpp: Copied from kjs/error_object.cpp.
              * kjs/ErrorInstance.h: Copied from kjs/error_object.h.
              * kjs/ErrorPrototype.cpp: Copied from kjs/error_object.cpp.
              * kjs/ErrorPrototype.h: Copied from kjs/error_object.h.
              * kjs/JSGlobalObject.cpp:
              * kjs/JSObject.cpp:
              * kjs/JSValue.cpp:
              * kjs/NativeErrorConstructor.cpp: Copied from kjs/error_object.cpp.
              * kjs/NativeErrorConstructor.h: Copied from kjs/error_object.h.
              * kjs/NativeErrorPrototype.cpp: Copied from kjs/error_object.cpp.
              * kjs/NativeErrorPrototype.h: Copied from kjs/error_object.h.
              * kjs/NumberPrototype.cpp:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpPrototype.cpp:
              * kjs/StringPrototype.cpp:
              * kjs/error_object.cpp: Removed.
              * kjs/error_object.h: Removed.
              * kjs/internal.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fee62a72
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · 2e67c024
      weinig@apple.com authored
              Fix Tiger build.
      
              * DumpRenderTree/mac/EventSendingController.mm:
              (eventTypeForMouseButtonAndAction):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e67c024
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · 603e4d12
      weinig@apple.com authored
              Fix non-AllInOne build.
      
              * kjs/DateConstructor.cpp:
              * kjs/DateMath.cpp:
              * kjs/JSObject.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      603e4d12
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · b54ef442
      weinig@apple.com authored
              Rubber-stamped by Oliver Hunt.
      
              Splits DateConstructor and DatePrototype out of date_object.h/cpp
              Moves shared Date code into DateMath.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              * kjs/DateConstructor.cpp: Copied from kjs/date_object.cpp.
              * kjs/DateConstructor.h: Copied from kjs/date_object.h.
              * kjs/DateMath.cpp:
              (KJS::ymdhmsToSeconds):
              (KJS::):
              (KJS::skipSpacesAndComments):
              (KJS::findMonth):
              (KJS::parseDate):
              (KJS::timeClip):
              (KJS::formatDate):
              (KJS::formatDateUTCVariant):
              (KJS::formatTime):
              * kjs/DateMath.h:
              (KJS::gmtoffset):
              * kjs/DatePrototype.cpp: Copied from kjs/date_object.cpp.
              * kjs/DatePrototype.h: Copied from kjs/date_object.h.
              * kjs/JSGlobalObject.cpp:
              * kjs/JSObject.cpp:
              * kjs/date_object.cpp:
              * kjs/date_object.h:
              * kjs/internal.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54ef442
    • eric@webkit.org's avatar
      Reviewed by darin. · 83930636
      eric@webkit.org authored
              Add multi-button mouseevent support to DRT
              https://bugs.webkit.org/show_bug.cgi?id=15173
      
              It's now possible to specify the mouse button with:
              eventSender.mouseDown(1); eventSender.mouseUp(1); etc.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
              * DumpRenderTree/mac/EventSendingController.h:
              * DumpRenderTree/mac/EventSendingController.mm:
              (+[EventSendingController isSelectorExcludedFromWebScript:]):
              (+[EventSendingController webScriptNameForSelector:]):
              (eventTypeForMouseButtonAndAction):
              (-[EventSendingController updateClickCountForButton:]):
              (-[EventSendingController mouseDown:]):
              (-[EventSendingController mouseUp:]):
              (-[EventSendingController mouseMoveToX:Y:]):
              (-[EventSendingController contextClick]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83930636
    • jmalonzo@webkit.org's avatar
      2008-06-29 Jan Michael Alonzo <jmalonzo@webkit.org> · 540146ab
      jmalonzo@webkit.org authored
              Rubber-stamped by Cameron Zwarich
      
              Fix Gtk non-AllInOne build
      
              * GNUmakefile.am: include JSVariableObject.cpp
              * kjs/RegExpConstructor.cpp: include RegExpObject.h
              * kjs/RegExpObject.h: forward declare RegExpPrototype
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      540146ab
  2. 28 Jun, 2008 24 commits
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · c1437dd8
      darin@apple.com authored
              - fix build
      
              * WebView/WebView.mm:
              (aeDescFromJSValue): Use get instead of getItem, which no longer exists.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1437dd8
    • darin@apple.com's avatar
      JavaScriptCore: · 04c507c9
      darin@apple.com authored
      2008-06-28  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam and Cameron.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=19805
                Array.concat turns missing array elements into "undefined"
      
              Test: fast/js/array-holes.html
      
              * JavaScriptCore.exp: No longer export JSArray::getItem.
      
              * kjs/ArrayPrototype.cpp:
              (KJS::arrayProtoFuncConcat): Changed to use getProperty instead of
              JSArray::getItem -- need to handle properties from the prototype chain
              instead of ignoring them.
      
              * kjs/JSArray.cpp: Removed getItem.
              * kjs/JSArray.h: Ditto.
      
      WebCore:
      
      2008-06-28  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam and Cameron.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=19805
                Array.concat turns missing array elements into "undefined"
      
              * bridge/jni/jni_utility.cpp:
              (KJS::Bindings::convertArrayInstanceToJavaArray):
              Use get instead of getItem, since we always want to consider values from the
              prototypes when looking at JavaScript arrays.
      
      LayoutTests:
      
      2008-06-28  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam and Cameron.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=19805
                Array.concat turns missing array elements into "undefined"
      
              * fast/js/array-holes-expected.txt: Added.
              * fast/js/array-holes.html: Added.
              * fast/js/resources/array-holes.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04c507c9
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · 9e127924
      darin@apple.com authored
              Reviewed by Cameron.
      
              - https://bugs.webkit.org/show_bug.cgi?id=19804
                optimize access to arrays without "holes"
      
              SunSpider says 1.8% faster.
      
              * kjs/JSArray.cpp:
              (KJS::JSArray::JSArray): Initialize m_fastAccessCutoff when creating
              arrays. Also updated for new location of m_vectorLength.
              (KJS::JSArray::getItem): Updated for new location of m_vectorLength.
              (KJS::JSArray::getSlowCase): Added. Broke out the non-hot parts of
              getOwnPropertySlot to make the hot part faster.
              (KJS::JSArray::getOwnPropertySlot): Added a new faster case for
              indices lower than m_fastAccessCutoff. We can do theese with no
              additional checks or branches.
              (KJS::JSArray::put): Added a new faster case for indices lower than
              m_fastAccessCutoff. We can do theese with no additional checks or
              branches. Moved the maxArrayIndex handling out of this function.
              Added code to set m_fastAccessCutoff when the very last hole in
              an array is filled; this is how the cutoff gets set for most arrays.
              (KJS::JSArray::putSlowCase): Moved the rest of the put function logic
              in here, to make the hot part of the put function faster.
              (KJS::JSArray::deleteProperty): Added code to lower m_fastAccessCutoff
              when a delete makes a new hole in the array.
              (KJS::JSArray::getPropertyNames): Updated for new location of
              m_vectorLength.
              (KJS::JSArray::increaseVectorLength): Ditto.
              (KJS::JSArray::setLength): Added code to lower m_fastAccessCutoff
              when setLength makes the array smaller.
              (KJS::JSArray::mark): Updated for new location of m_vectorLength.
              (KJS::JSArray::sort): Ditto. Set m_fastAccessCutoff after moving
              all the holes to the end of the array.
              (KJS::JSArray::compactForSorting): Ditto.
              (KJS::JSArray::checkConsistency): Added consistency checks fro
              m_fastAccessCutoff and updated for the new location of m_vectorLength.
      
              * kjs/JSArray.h: Added declarations for slow case functions.
              Replaced m_vectorLength with m_fastAccessCutoff.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e127924
    • cwzwarich@webkit.org's avatar
      2008-06-28 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 64b5b6cf
      cwzwarich@webkit.org authored
              Reviewed by Sam.
      
              When executing a native call, check for an exception before writing the
              return value.
      
              JavaScriptCore:
      
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
      
              LayoutTests:
      
              * fast/js/exception-sequencing-expected.txt:
              * fast/js/exception-sequencing.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64b5b6cf
    • mrowe@apple.com's avatar
      2008-06-28 Mark Rowe <mrowe@apple.com> · 4a4a190b
      mrowe@apple.com authored
              Build fix.  Flag headers as private or public as is appropriate.
              These settings were accidentally removed during some project file cleanup.
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a4a190b
    • mitz@apple.com's avatar
      Reviewed by Darin Adler. · e02ec0cc
      mitz@apple.com authored
              - allow document markers to touch or overlap if they are not of the same type
      
              Cannot be tested in DumpRenderTree
      
              * dom/Document.cpp:
              (WebCore::Document::addMarker):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintDocumentMarkers):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e02ec0cc
    • weinig@apple.com's avatar
      2008-06-28 Sam Weinig <sam@webkit.org> · 343e3d7f
      weinig@apple.com authored
              Rubber-stamped by Darin Adler.
      
              Splits RegExpConstructor and RegExpPrototype out of RegExpObject.h/cpp
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/Machine.cpp:
              * kjs/AllInOneFile.cpp:
              * kjs/JSGlobalObject.cpp:
              * kjs/RegExpConstructor.cpp: Copied from kjs/RegExpObject.cpp.
              * kjs/RegExpConstructor.h: Copied from kjs/RegExpObject.h.
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp: Copied from kjs/RegExpObject.cpp.
              * kjs/RegExpPrototype.h: Copied from kjs/RegExpObject.h.
              * kjs/StringPrototype.cpp:
              * kjs/internal.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      343e3d7f
    • weinig@apple.com's avatar
      2008-06-28 Sam Weinig <sam@webkit.org> · bb234632
      weinig@apple.com authored
              Fix non-AllInOne builds.
      
              * kjs/StringConstructor.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb234632
    • weinig@apple.com's avatar
      JavaScriptCore: · 3ea39f71
      weinig@apple.com authored
      2008-06-28  Sam Weinig  <sam@webkit.org>
      
              Rubber-stamped by Darin Adler.
      
              Rename string_object.h/cpp to StringObject.h/cpp and split out StringObjectThatMasqueradesAsUndefined,
              StringConstructor and StringPrototype.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              * kjs/JSGlobalObject.cpp:
              * kjs/StringConstructor.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
              * kjs/StringConstructor.h: Copied from JavaScriptCore/kjs/string_object.h.
              * kjs/StringObject.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
              * kjs/StringObject.h: Copied from JavaScriptCore/kjs/string_object.h.
              * kjs/StringObjectThatMasqueradesAsUndefined.h: Copied from JavaScriptCore/kjs/string_object.h.
              * kjs/StringPrototype.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
              * kjs/StringPrototype.h: Copied from JavaScriptCore/kjs/string_object.h.
              * kjs/internal.cpp:
              * kjs/string_object.cpp: Removed.
              * kjs/string_object.h: Removed.
      
      WebCore:
      
      2008-06-28  Sam Weinig  <sam@webkit.org>
      
              Rubber-stamped by Darin Adler.
      
              Update includes after remaming string_object.h to StringObject.h and
              splitting out StringObjectThatMasqueradesAsUndefined, StringConstructor
              and StringPrototype.
      
              * ForwardingHeaders/kjs/StringObject.h: Copied from WebCore/ForwardingHeaders/kjs/string_object.h.
              * ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h: Added.
              * ForwardingHeaders/kjs/StringPrototype.h: Added.
              * ForwardingHeaders/kjs/string_object.h: Removed.
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ea39f71
    • jmalonzo@webkit.org's avatar
      2008-06-28 Jan Michael Alonzo <jmalonzo@webkit.org> · d2333c04
      jmalonzo@webkit.org authored
              Gtk build fix: JSVariableObject is now part of AllInOne
      
              * GNUmakefile.am:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2333c04
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · cff4159e
      darin@apple.com authored
              Reviewed by Oliver.
      
              - https://bugs.webkit.org/show_bug.cgi?id=19801
                add a feature so we can tell what regular expressions are taking time
      
              * pcre/pcre_compile.cpp:
              (jsRegExpCompile): Compile in the string if REGEXP_HISTOGRAM is on.
      
              * pcre/pcre_exec.cpp:
              (jsRegExpExecute): Add hook to time execution.
              (Histogram::~Histogram): Print a sorted list of what took time.
              (Histogram::add): Accumulate records of what took time.
              (HistogramTimeLogger::~HistogramTimeLogger): Hook that calls
              Histogram::add at the right moment and creates the global histogram
              object.
      
              * pcre/pcre_internal.h: Define REGEXP_HISTOGRAM.
      
              * pcre/pcre_tables.cpp: Added missing include of "config.h". Not needed
              any more, but an omissions an earlier version of this patch detected.
              * pcre/pcre_ucp_searchfuncs.cpp: Ditto.
              * pcre/pcre_xclass.cpp: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cff4159e
    • weinig@apple.com's avatar
      2008-06-28 Sam Weinig <sam@webkit.org> · df10222f
      weinig@apple.com authored
              Try and fix the Windows build again.
      
              * kjs/RegExpObject.cpp:
              * kjs/date_object.cpp:
              * kjs/error_object.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df10222f
    • weinig@apple.com's avatar
      2008-06-28 Sam Weinig <sam@webkit.org> · 3a811201
      weinig@apple.com authored
              Rubber-stamped by Darin Adler.
      
              Remove unused StringConstructorFunction class.
      
              * kjs/string_object.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a811201
    • weinig@apple.com's avatar
      2008-06-28 Sam Weinig <sam@webkit.org> · ee8c780b
      weinig@apple.com authored
              Fix windows build.
      
              * kjs/ArrayPrototype.cpp:
              * kjs/BooleanPrototype.cpp:
              * kjs/BooleanPrototype.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/JSImmediate.cpp:
              * kjs/JSObject.cpp:
              * kjs/MathObject.cpp:
              * kjs/NumberPrototype.cpp:
              * kjs/NumberPrototype.h:
              * kjs/ObjectConstructor.cpp:
              * kjs/RegExpObject.h:
              * kjs/error_object.h:
              * kjs/string_object.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee8c780b
    • weinig@apple.com's avatar
      JavaScriptCore: · 2ce2a7f8
      weinig@apple.com authored
      2008-06-28  Sam Weinig  <sam@webkit.org>
      
              Rubber-stamped by Oliver Hunt.
      
              Splits FunctionConstructor out of FunctionPrototype.h/cpp
              Splits NumberConstructor and NumberPrototype out of NumberObject.h/cpp
              Rename object_object.h/cpp to ObjectPrototype.h/cpp and split out ObjectConstructor.
      
              * API/JSCallbackConstructor.cpp:
              * API/JSClassRef.cpp:
              * API/JSObjectRef.cpp:
              * DerivedSources.make:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/Machine.cpp:
              * kjs/AllInOneFile.cpp:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayConstructor.h:
              * kjs/FunctionConstructor.cpp: Copied from JavaScriptCore/kjs/FunctionPrototype.cpp.
              * kjs/FunctionConstructor.h: Copied from JavaScriptCore/kjs/FunctionPrototype.h.
              * kjs/FunctionPrototype.cpp:
              * kjs/FunctionPrototype.h:
              * kjs/JSFunction.cpp:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSImmediate.cpp:
              * kjs/MathObject.h:
              * kjs/NumberConstructor.cpp: Copied from JavaScriptCore/kjs/NumberObject.cpp.
              * kjs/NumberConstructor.h: Copied from JavaScriptCore/kjs/NumberObject.h.
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp: Copied from JavaScriptCore/kjs/NumberObject.cpp.
              * kjs/NumberPrototype.h: Copied from JavaScriptCore/kjs/NumberObject.h.
              * kjs/ObjectConstructor.cpp: Copied from JavaScriptCore/kjs/object_object.cpp.
              * kjs/ObjectConstructor.h: Copied from JavaScriptCore/kjs/object_object.h.
              * kjs/ObjectPrototype.cpp: Copied from JavaScriptCore/kjs/object_object.cpp.
              * kjs/ObjectPrototype.h: Copied from JavaScriptCore/kjs/object_object.h.
              * kjs/RegExpObject.h:
              * kjs/Shell.cpp:
              * kjs/error_object.h:
              * kjs/internal.cpp:
              * kjs/nodes.cpp:
              * kjs/object_object.cpp: Removed.
              * kjs/object_object.h: Removed.
              * kjs/string_object.h:
      
      WebCore:
      
      2008-06-28  Sam Weinig  <sam@webkit.org>
      
              Rubber-stamped by Oliver Hunt.
      
              Update includes after remaming object_object.h to ObjectPrototype.h and
              splitting FunctionConstructor out of FunctionPrototype.h
      
              * ForwardingHeaders/kjs/FunctionConstructor.h: Added.
              * ForwardingHeaders/kjs/ObjectPrototype.h: Copied from WebCore/ForwardingHeaders/kjs/object_object.h.
              * ForwardingHeaders/kjs/object_object.h: Removed.
              * bindings/js/JSEventListener.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/qt/qt_instance.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ce2a7f8
    • mitz@apple.com's avatar
      WebCore: · ef1d58db
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix <rdar://problem/5994621> REGRESSION (r31090-r31114): Weather widget shows missing image icons briefly when (re)loaded
      
              * html/HTMLImageLoader.cpp:
              (WebCore::HTMLImageLoader::updateFromElement): Changed to not load an
              image if the 'src' attribute is the empty string and the document's base
              URI is a file: URL.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - updated test and results for <rdar://problem/5994621> REGRESSION (r31090-r31114): Weather widget shows missing image icons briefly when (re)loaded
      
              * fast/images/load-img-with-empty-src-expected.txt:
              * fast/images/load-img-with-empty-src.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef1d58db
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · 87255fce
      darin@apple.com authored
              Reviewed by Oliver.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=19796
                optimize expressions with ignored results (especially post-increment)
      
              SunSpider says 0.9% faster.
      
              * VM/CodeGenerator.h:
              (KJS::CodeGenerator::tempDestination): Create a new temporary for
              ignoredResult() too, just as we would for 0.
              (KJS::CodeGenerator::finalDestination): Use the temporary if the
              register passed in is ignoredResult() too, just as we would for 0.
              (KJS::CodeGenerator::destinationForAssignResult): Return 0 if the
              passed in register is ignoredResult(), just as we would for 0.
              (KJS::CodeGenerator::moveToDestinationIfNeeded): Return 0 if the
              register passed in is ignoredResult(). What matters is that we
              don't want to emit a move. The return value won't be looked at.
              (KJS::CodeGenerator::emitNode): Allow ignoredResult() and pass it
              through to the node's emitCode function.
      
              * VM/RegisterID.h:
              (KJS::ignoredResult): Added. Special value to indicate the result of
              a node will be ignored and need not be put in any register.
      
              * kjs/nodes.cpp:
              (KJS::NullNode::emitCode): Do nothing if dst == ignoredResult().
              (KJS::BooleanNode::emitCode): Ditto.
              (KJS::NumberNode::emitCode): Ditto.
              (KJS::StringNode::emitCode): Ditto.
              (KJS::RegExpNode::emitCode): Ditto.
              (KJS::ThisNode::emitCode): Ditto.
              (KJS::ResolveNode::emitCode): Do nothing if dst == ignoredResult() and
              the identifier resolves to a local variable.
              (KJS::ObjectLiteralNode::emitCode): Do nothing if dst == ignoredResult()
              and the object is empty.
              (KJS::PostIncResolveNode::emitCode): If dst == ignoredResult(), then do
              nothing for the local constant case, and do a pre-increment in all the
              other cases.
              (KJS::PostDecResolveNode::emitCode): Ditto.
              (KJS::PostIncBracketNode::emitCode): Ditto.
              (KJS::PostDecBracketNode::emitCode): Ditto.
              (KJS::PostIncDotNode::emitCode): Ditto.
              (KJS::PostDecDotNode::emitCode): Ditto.
              (KJS::DeleteValueNode::emitCode): Pass ignoredResult() when evaluating
              the expression.
              (KJS::VoidNode::emitCode): Ditto.
              (KJS::TypeOfResolveNode::emitCode): If dst == ignoredResult(), do nothing
              if the identifier resolves to a local variable, and don't bother generating
              a typeof opcode in the other case.
              (KJS::TypeOfValueNode::emitCode): Ditto.
              (KJS::PreIncResolveNode::emitCode): Do nothing if dst == ignoredResult() and
              the identifier resolves to a local constant.
              (KJS::PreDecResolveNode::emitCode): Ditto.
              (KJS::AssignResolveNode::emitCode): Turn ignoredResult() into 0 in a couple
              places, because we need to put the result into a register so we can assign
              it. At other sites this is taken care of by functions like finalDestination.
              (KJS::CommaNode::emitCode): Pass ignoredResult() when evaluating the first
              expression.
              (KJS::ForNode::emitCode): Pass ignoredResult() when evaluating the first and
              third expressions.
              (KJS::ForInNode::emitCode): Pass ignoredResult() when evaluating the first
              expression.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87255fce
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · 9ce7902a
      darin@apple.com authored
              Reviewed by Oliver.
      
              - https://bugs.webkit.org/show_bug.cgi?id=19787
                create most arrays from values in registers rather than with multiple put operations
      
              SunSpider says 0.8% faster.
      
              * VM/CodeBlock.cpp:
              (KJS::CodeBlock::dump): Added argv and argc parameters to new_array.
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute): Ditto.
      
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::emitNewArray): Added.
              * VM/CodeGenerator.h: Added ElementNode* argument to emitNewArray.
      
              * kjs/nodes.cpp:
              (KJS::ArrayNode::emitCode): Pass the ElementNode to emitNewArray so it can be
              initialized with as many elements as possible. If the array doesn't have any
              holes in it, that's all that's needed. If there are holes, then emit some separate
              put operations for the other values in the array and for the length as needed.
      
              * kjs/nodes.h: Added some accessors to ElementNode so the code generator can
              iterate through elements and generate code to evaluate them. Now ArrayNode does
              not need to be a friend. Also took out some unused PlacementNewAdoptType
              constructors.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ce7902a
    • darin@apple.com's avatar
      2008-06-28 Darin Adler <darin@apple.com> · f40ce40c
      darin@apple.com authored
              Reviewed by Oliver Hunt.
      
              * kjs/nodes.h: Remove obsolete PlacementNewAdopt constructors.
              We no longer mutate the AST in place.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f40ce40c
    • jmalonzo@webkit.org's avatar
      2008-06-28 Jan Michael Alonzo <jmalonzo@webkit.org> · da4cd44e
      jmalonzo@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Build fix
      
              * VM/Machine.cpp: include stdio.h
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da4cd44e
    • zimmermann@webkit.org's avatar
      Reviewed by Oliver. · 26e01471
      zimmermann@webkit.org authored
      Update all (except four) SVG pixel tests, after a long time.
      Four tests are broken in trunk, filed bugs 19798 & 19799.
      
      Add all missing png/checksum files, and move files around which were misplaced.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26e01471
    • zimmermann@webkit.org's avatar
      Reviewed by Oliver. · 9e2b264c
      zimmermann@webkit.org authored
      Copy <test>-expected.png from the right location to /tmp/layout-test-results.
      Use $expectedPixelDir instead of $expectedDir. Allows using SVG pixel tests again.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e2b264c
    • mitz@apple.com's avatar
      Reviewed by Oliver Hunt. · ac9ca1f0
      mitz@apple.com authored
              - make a test valid
      
              * fast/images/load-img-with-empty-src.html: Renamed the "status"
              variable to "results", because "status" is a Window property.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac9ca1f0
    • weinig@apple.com's avatar
      WebCore: · cdaa1970
      weinig@apple.com authored
      2008-06-27  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dan Bernstein.
      
              <rdar://problem/6025499> Make Cross-site XHR match the final specification
      
              Update the implemented subset of Access-Control for XMLHttpRequest to the 
              latest version. (Editor's Draft 25 May 2008)
      
              - Now differentiates between simple and non-simple cross-site requests, the later
                requiring a preflight.
              - Now sends request headers cross-site, limited by a blacklist.
              - Now allows access to cross-site response headers, limited by a whitelist.
              - Now sends request entity body for non-get cross-site requests after preflight.
      
              Tests: http/tests/xmlhttprequest/access-control-basic-blacklist-request-headers.html
                     http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple.html
                     http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers.html
      
              * xml/XMLHttpRequest.cpp:
              (WebCore::isOnAccessControllRequestHeaderBlackList):
              (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
              (WebCore::isOnAccessControlResponseHeaderWhitelist):
              (WebCore::XMLHttpRequest::XMLHttpRequest):
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::makeSameOriginRequest):
              (WebCore::XMLHttpRequest::isSimpleCrossSiteAccessRequest):
              (WebCore::XMLHttpRequest::makeCrossSiteAccessRequest):
              (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
              (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
              (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
              (WebCore::XMLHttpRequest::loadRequestAsynchronously):
              (WebCore::XMLHttpRequest::abort):
              (WebCore::XMLHttpRequest::clearRequest):
              (WebCore::XMLHttpRequest::setRequestHeader):
              (WebCore::XMLHttpRequest::setRequestHeaderInternal):
              (WebCore::XMLHttpRequest::getAllResponseHeaders):
              (WebCore::XMLHttpRequest::getResponseHeader):
              (WebCore::XMLHttpRequest::didFinishLoading):
              (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
              (WebCore::XMLHttpRequest::didReceiveResponse):
              (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequest.h:
      
      LayoutTests:
      
      2008-06-27  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dan Bernstein.
      
              <rdar://problem/6025499> Make Cross-site XHR match the final specification
              Add tests for the updated implemented subset of Access-Control for XMLHttpRequest.
      
              * http/tests/xmlhttprequest/access-control-basic-blacklist-request-headers-expected.txt: Added.
              * http/tests/xmlhttprequest/access-control-basic-blacklist-request-headers.html: Added.
              * http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt: Added.
              * http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple.html: Added.
              * http/tests/xmlhttprequest/access-control-basic-not-get-allow-async-expected.txt:
              * http/tests/xmlhttprequest/access-control-basic-not-get-allow-expected.txt:
              * http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers-expected.txt: Added.
              * http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers.html: Added.
              * http/tests/xmlhttprequest/resources/access-control-basic-allow-print-headers.cgi: Added.
              * http/tests/xmlhttprequest/resources/access-control-basic-get-fail-non-simple.cgi: Added.
              * http/tests/xmlhttprequest/resources/access-control-basic-whitelist-response-headers.cgi: Added.
              * http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cdaa1970
  3. 27 Jun, 2008 10 commits
    • weinig@apple.com's avatar
      2008-06-27 Sam Weinig <sam@webkit.org> · 2d983abd
      weinig@apple.com authored
              Reviewed by Oliver Hunt.
      
              Fix platforms that don't use AllInOne.cpp
      
              * kjs/BooleanConstructor.h:
              * kjs/BooleanPrototype.h:
              * kjs/FunctionPrototype.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d983abd
    • weinig@apple.com's avatar
      2008-06-27 Sam Weinig <sam@webkit.org> · 282b0a4e
      weinig@apple.com authored
              Rubber-stamped by Oliver Hunt.
      
              Splits ArrayConstructor out of ArrayPrototype.h/cpp
              Splits BooleanConstructor and BooleanPrototype out of BooleanObject.h/cpp
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/Machine.cpp:
              * kjs/AllInOneFile.cpp:
              * kjs/ArrayConstructor.cpp: Copied from kjs/ArrayPrototype.cpp.
              * kjs/ArrayConstructor.h: Copied from kjs/ArrayPrototype.h.
              * kjs/ArrayPrototype.cpp:
              * kjs/ArrayPrototype.h:
              * kjs/BooleanConstructor.cpp: Copied from kjs/BooleanObject.cpp.
              * kjs/BooleanConstructor.h: Copied from kjs/BooleanObject.h.
              * kjs/BooleanObject.cpp:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp: Copied from kjs/BooleanObject.cpp.
              * kjs/BooleanPrototype.h: Copied from kjs/BooleanObject.h.
              * kjs/CommonIdentifiers.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/JSArray.cpp:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSImmediate.cpp:
              * kjs/Shell.cpp:
              * kjs/internal.cpp:
              * kjs/nodes.cpp:
              * kjs/string_object.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      282b0a4e
    • oliver@apple.com's avatar
      Bug 18626: SQUIRRELFISH: support the "slow script" dialog... · c8f3a755
      oliver@apple.com authored
      Bug 18626: SQUIRRELFISH: support the "slow script" dialog <https://bugs.webkit.org/show_bug.cgi?id=18626>
      <rdar://problem/5973931> Slow script dialog needs to be reimplemented for squirrelfish
      
      Reviewed by Sam
      
      Adds support for the slow script dialog in squirrelfish.  This requires the addition
      of three new op codes, op_loop, op_loop_if_true, and op_loop_if_less which have the
      same behaviour as their simple jump equivalents but have an additional time out check.
      
      Additional assertions were added to other jump instructions to prevent accidentally
      creating loops with jump types that do not support time out checks.
      
      Sunspider does not report a regression, however this appears very sensitive to code
      layout and hardware, so i would expect up to a 1% regression on other systems.
      
      Part of this required moving the old timeout logic from JSGlobalObject and into Machine
      which is the cause of a number of the larger diff blocks.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8f3a755
    • weinig@apple.com's avatar
      2008-06-27 Sam Weinig <sam@webkit.org> · 2d7400ee
      weinig@apple.com authored
              Rubber-stamped by Mark Rowe.
      
              Clean up sorting in WebCore.xcodeproj.
      
              * WebCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d7400ee
    • jmalonzo@webkit.org's avatar
      2008-06-27 Jan Michael Alonzo <jmalonzo@webkit.org> · 86e13f0e
      jmalonzo@webkit.org authored
              Gtk and Qt build fix: Remove RegisterFileStack from the build
              scripts.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86e13f0e
    • adele@apple.com's avatar
      2008-06-27 Adele Peterson <adele@apple.com> · 2e1114a5
      adele@apple.com authored
              Reviewed by Geoff.
      
              Build fixes. 
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * VM/RegisterFile.h:
              (KJS::RegisterFile::RegisterFile):
              * kjs/JSGlobalObject.cpp:
              * kjs/collector.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e1114a5
    • ggaren@apple.com's avatar
      JavaScriptCore: · 82a62d05
      ggaren@apple.com authored
      2008-06-27  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
              
              One RegisterFile to rule them all!
              
              SunSpider reports a 0.2% speedup.
      
              This patch removes the RegisterFileStack abstraction and replaces it with
              a single register file that
              
              (a) allocates a fixed storage area, including a fixed area for global
              vars, so that no operation may cause the register file to reallocate
              
              and
      
              (b) swaps between global storage areas when executing code in different 
              global objects.
              
              This patch also changes the layout of the register file so that all call
              frames, including call frames for global code, get a header. This is
              required to support re-entrant global code. It also just makes things simpler.
              
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::addGlobalVar): New function. Differs from addVar in
              that
              
              (a) global vars don't contribute to a CodeBlock's numLocals count, since
              global storage is fixed and allocated at startup
              
              and
              
              (b) references to global vars get shifted to elide intermediate stack
              between "r" and the global storage area.
              
              * VM/Machine.cpp:
              (KJS::Machine::dumpRegisters): Updated this function to match the new
              register file layout, and added the ability to dump exact identifiers
              for the different parts of a call frame.
              
              (KJS::Machine::unwindCallFrame): Updated this function to match the new
              register file layout.
               
              (KJS::Machine::execute): Updated this function to initialize a call frame
              header for global code, and to swap global storage areas when switching
              to execution in a new global object.
              
              (KJS::Machine::privateExecute): Got rid of "safeForReentry" and re-reading
              of registerBase because the register file is always safe for reentry now,
              and registerBase never changes.
              
              * VM/Machine.h: Moved the call frame header enum from Machine to RegisterFile,
              to resolve a header dependency problem (a good sign that the enum belonged
              in RegisterFile all along!)
      
              * VM/RegisterFile.cpp:
              * VM/RegisterFile.h: Changed RegisterFile to mmap a fixed size register
              area. This allows us to avoid re-allocting the register file later on.
              Instead, we rely on the OS to allocate physical pages to the register
              file as necessary.
      
              * VM/RegisterFileStack.cpp: Removed. Tada!
              * VM/RegisterFileStack.h: Removed. Tada!
      
              * kjs/DebuggerCallFrame.cpp: Updated this class to match the new
              register file layout, greatly simplifying it in the process.
      
              * kjs/JSActivation.h:
              * kjs/JSActivation.cpp: Moved some of this logic up to JSVariableObject,
              since the global object now needs to be able to tear off its registers
              just like the activation object.
      
              * kjs/JSFunction.cpp: No need to fiddle with the register file anymore.
      
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObject.cpp: Updated JSGlobalObject to support moving its
              global storage area into and out of the register file.
      
              * kjs/PropertySlot.cpp: No need to fiddle with the register file anymore.
      
              * kjs/collector.cpp: Renamed markStackObjectConservatively to
              markConservatively, since we don't just mark stack objects this way.
              
              Also, added code to mark the machine's register file.
      
              * kjs/config.h: Moved some platforms #defines from here...
              * wtf/Platform.h: ...to here, to support mmap/VirtualAlloc detection
              in RegisterFile.h.
      
      LayoutTests:
      
      2008-06-26  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
              
              Added a test for what happens when a script exceeds the limit on declared
              global variables.
      
              * fast/js/global-var-limit-expected.txt: Added.
              * fast/js/global-var-limit.html: Added.
      
              * fast/js/global-recursion-on-full-stack-expected.txt: Updated for new
              (slightly more correct) behavior. Since the stack overflow happens in the
              middle of a try/catch block, it should be caught, instead of logged to
              the console.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82a62d05
    • jmalonzo@webkit.org's avatar
      2008-06-27 Jan Michael Alonzo <jmalonzo@webkit.org> · 0f431a15
      jmalonzo@webkit.org authored
              Reviewed by Christian Dywan.
      
              [Gtk] Initialize webview settings before running DRT tests
              http://bugs.webkit.org/show_bug.cgi?id=19778
      
              * DumpRenderTree/gtk/DumpRenderTree.cpp:
              (setDefaultsToConsistentStateValuesForTesting):
              (main):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f431a15
    • jmalonzo@webkit.org's avatar
      2008-06-27 Jan Michael Alonzo <jmalonzo@webkit.org> · 808b6178
      jmalonzo@webkit.org authored
              Reviewed by Darin Adler.
      
              Remove unnecessary options to make_names.pl command line
              http://bugs.webkit.org/show_bug.cgi?id=19777
      
              * DerivedSources.make:
              * GNUmakefile.am:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      808b6178
    • mitz@apple.com's avatar
      PlanetWebKit: · df76851f
      mitz@apple.com authored
              Reviewed by Timothy Hatcher.
      
              * wwwroot/planetwebkit.css: Reduced text shadow offsets.
      
      WebKitSite:
      
              Reviewed by Timothy Hatcher.
      
              * css/main.css: Reduced text shadow offsets.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df76851f