1. 06 Oct, 2008 14 commits
    • mjs@apple.com's avatar
      JavaScriptCore: · 6c3268ce
      mjs@apple.com authored
      2008-10-06  Maciej Stachowiak  <mjs@apple.com>
      
              Not reviewed. Build fix.
              
              - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these
      
              * API/JSValueRef.cpp:
              (JSValueToBoolean):
              * ChangeLog:
              * JavaScriptCore.exp:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_loop_if_true):
              (JSC::Machine::cti_op_not):
              (JSC::Machine::cti_op_jtrue):
              * kjs/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncFilter):
              (JSC::arrayProtoFuncEvery):
              (JSC::arrayProtoFuncSome):
              * kjs/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::callBooleanConstructor):
              * kjs/GetterSetter.h:
              * kjs/JSCell.h:
              (JSC::JSValue::toBoolean):
              * kjs/JSNumberCell.cpp:
              (JSC::JSNumberCell::toBoolean):
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              (JSC::JSObject::toBoolean):
              * kjs/JSObject.h:
              * kjs/JSString.cpp:
              (JSC::JSString::toBoolean):
              * kjs/JSString.h:
              * kjs/JSValue.h:
              * kjs/RegExpConstructor.cpp:
              (JSC::setRegExpConstructorMultiline):
              * kjs/RegExpObject.cpp:
              (JSC::RegExpObject::match):
              * kjs/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncToString):
      
      JavaScriptGlue:
      
      2008-10-06  Maciej Stachowiak  <mjs@apple.com>
      
              Not reviewed. Build fix.
      
              - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these
      
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c3268ce
    • mjs@apple.com's avatar
      2008-10-06 Maciej Stachowiak <mjs@apple.com> · d11bb12b
      mjs@apple.com authored
              Not reviewed.
              
              - fix build; toBoolean no longer takes an ExecState
      
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d11bb12b
    • vestbo@webkit.org's avatar
      2008-10-06 Tor Arne Vestbø <tavestbo@trolltech.com> · c5067907
      vestbo@webkit.org authored
              Reviewed by Simon.
      
              Add native virtual keycode to PlatformKeyboardEvent
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5067907
    • vestbo@webkit.org's avatar
      2008-10-06 Tor Arne Vestbø <tavestbo@trolltech.com> · 89d13717
      vestbo@webkit.org authored
              Reviewed by Simon.
      
              Enable WebCore::String <> CFStringRef conversion functions for QtWebKit/Mac
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89d13717
    • mjs@apple.com's avatar
      2008-10-06 Maciej Stachowiak <mjs@apple.com> · d2c36fec
      mjs@apple.com authored
              Reviewed by Sam Weinig.
              
              - optimize op_jtrue, op_loop_if_true and op_not in various ways
              https://bugs.webkit.org/show_bug.cgi?id=21404
              
              1) Make JSValue::toBoolean nonvirtual and completely inline by
              making use of the StructureID type field.
              
              2) Make JSValue::toBoolean not take an ExecState; doesn't need it.
              
              3) Make op_not, op_loop_if_true and op_jtrue not read the
              ExecState (toBoolean doesn't need it any more) and not check
              exceptions (toBoolean can't throw).
      
              * API/JSValueRef.cpp:
              (JSValueToBoolean):
              * JavaScriptCore.exp:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_loop_if_true):
              (JSC::Machine::cti_op_not):
              (JSC::Machine::cti_op_jtrue):
              * kjs/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncFilter):
              (JSC::arrayProtoFuncEvery):
              (JSC::arrayProtoFuncSome):
              * kjs/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::callBooleanConstructor):
              * kjs/GetterSetter.h:
              * kjs/JSCell.h:
              (JSC::JSValue::toBoolean):
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              (JSC::JSNumberCell::toBoolean):
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              (JSC::JSObject::toBoolean):
              (JSC::JSCell::toBoolean):
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              (JSC::JSString::toBoolean):
              * kjs/JSValue.h:
              * kjs/RegExpConstructor.cpp:
              (JSC::setRegExpConstructorMultiline):
              * kjs/RegExpObject.cpp:
              (JSC::RegExpObject::match):
              * kjs/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncToString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2c36fec
    • vestbo@webkit.org's avatar
      2008-10-06 Tor Arne Vestbø <tavestbo@trolltech.com> · e4b1d4f6
      vestbo@webkit.org authored
              Reviewed by Simon.
      
              Use bundles on QtWebKit/Mac for platform modules
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4b1d4f6
    • hausmann@webkit.org's avatar
      2008-10-06 Ariya Hidayat <ariya.hidayat@trolltech.com> · 33791a88
      hausmann@webkit.org authored
              Reviewed by Simon.
      
              Build fix for MinGW.
      
              * platform/win/SystemTimeWin.cpp:
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::invalidateRect):
      
      2008-10-06  Ariya Hidayat  <ariya.hidayat@trolltech.com>
      
              Reviewed by Simon.
      
              Build fix for MinGW.
      
              * JavaScriptCore.pri:
              * kjs/DateMath.cpp:
              (JSC::highResUpTime):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33791a88
    • aroben@apple.com's avatar
      Mimic the inspector/ directory structure in WebCore.vcproj · bf38ff1b
      aroben@apple.com authored
              * WebCore.vcproj/WebCore.vcproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf38ff1b
    • aroben@apple.com's avatar
      Windows build fix · 5613e51f
      aroben@apple.com authored
              * WebCore.vcproj/WebCore.vcproj: Update the Include path for all
              configurations to include WebCore/inspector.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5613e51f
    • eric@webkit.org's avatar
      Reviewed by Darin Adler. · 15e92967
      eric@webkit.org authored
              SVG should support ascent and descent properties <font-face> instead of <font>!
              https://bugs.webkit.org/show_bug.cgi?id=21365
      
              Tested by many many existing SVG tests.
      
              * svg/SVGFontFaceElement.cpp:
              (WebCore::SVGFontFaceElement::ascent):
              (WebCore::SVGFontFaceElement::descent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15e92967
    • mjs@apple.com's avatar
      2008-10-05 Darin Fisher <darin@chromium.org> · 64662c80
      mjs@apple.com authored
              Reviewed by Eric Seidel.
      
              REGRESSION: crash in ScriptElement::notifyFinished
              Fixes https://bugs.webkit.org/show_bug.cgi?id=21329
      
              * dom/ScriptElement.cpp:
              (WebCore::ScriptElementData::notifyFinished): Revert part of r35744 to
              ensure that the ScriptElementData object is not destroyed prematurely.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64662c80
    • cwzwarich@webkit.org's avatar
      2008-10-05 Cameron Zwarich <zwarich@apple.com> · 08420452
      cwzwarich@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Remove ScopeNode::containsClosures() now that it is unused.
      
              * kjs/nodes.h:
              (JSC::ScopeNode::containsClosures):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08420452
    • mjs@apple.com's avatar
      2008-10-05 Maciej Stachowiak <mjs@apple.com> · 1d94015c
      mjs@apple.com authored
              Reviewed by Cameron Zwarich.
              
              - fix releas-only test failures caused by the fix to bug 21375
      
              * VM/Machine.cpp:
              (JSC::Machine::unwindCallFrame): Update ExecState while unwinding call frames;
              it now matters more to have a still-valid ExecState, since dynamicGlobalObject
              will make use of the ExecState's scope chain.
              * VM/Machine.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d94015c
    • cwzwarich@webkit.org's avatar
      2008-10-05 Cameron Zwarich <zwarich@apple.com> · a3b5f8a7
      cwzwarich@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Bug 21364: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments
              <https://bugs.webkit.org/show_bug.cgi?id=21364>
      
              Use information from the parser to detect whether an activation is
              needed or 'arguments' is used, and emit explicit instructions to tear
              them off before op_ret. This allows a branch to be removed from op_ret
              and simplifies some other code. This does cause a small change in the
              behaviour of 'f.arguments'; it is no longer live when 'arguments' is not
              mentioned in the lexical scope of the function.
      
              It should now be easy to remove the OptionaCalleeActivation slot in the
              call frame, but this will be done in a later patch.
      
              JavaScriptCore:
      
              * VM/CTI.cpp:
              (JSC::CTI::privateCompileMainPass):
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitReturn):
              * VM/CodeGenerator.h:
              * VM/Machine.cpp:
              (JSC::Machine::unwindCallFrame):
              (JSC::Machine::privateExecute):
              (JSC::Machine::retrieveArguments):
              (JSC::Machine::cti_op_create_arguments):
              (JSC::Machine::cti_op_tear_off_activation):
              (JSC::Machine::cti_op_tear_off_arguments):
              * VM/Machine.h:
              * VM/Opcode.h:
              * kjs/Arguments.cpp:
              (JSC::Arguments::mark):
              * kjs/Arguments.h:
              (JSC::Arguments::isTornOff):
              (JSC::Arguments::Arguments):
              (JSC::Arguments::copyRegisters):
              (JSC::JSActivation::copyRegisters):
              * kjs/JSActivation.cpp:
              (JSC::JSActivation::argumentsGetter):
              * kjs/JSActivation.h:
      
              LayoutTests:
      
              * fast/js/function-dot-arguments-expected.txt:
              * fast/js/resources/function-dot-arguments.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3b5f8a7
  2. 05 Oct, 2008 10 commits
    • mjs@apple.com's avatar
      2008-10-05 Maciej Stachowiak <mjs@apple.com> · 05456d94
      mjs@apple.com authored
              Reviewed by Oliver Hunt.
              
              - fixed "REGRESSION (r37297): fast/js/deep-recursion-test takes too long and times out"
              https://bugs.webkit.org/show_bug.cgi?id=21375
              
              The problem is that dynamicGlobalObject had become O(N) in number
              of call frames, but unwinding the stack for an exception called it
              for every call frame, resulting in O(N^2) behavior for an
              exception thrown from inside deep recursion.
      
              Instead of doing it that way, stash the dynamic global object in JSGlobalData.
              
              * JavaScriptCore.exp:
              * VM/Machine.cpp:
              (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Helper class to temporarily
              store and later restore a dynamicGlobalObject in JSGlobalData.
              (JSC::DynamicGlobalObjectScope::~DynamicGlobalObjectScope):
              (JSC::Machine::execute): In each version, establish a DynamicGlobalObjectScope.
              For ProgramNode, always establish set new dynamicGlobalObject, for FunctionBody and Eval,
              only if none is currently set.
              * VM/Machine.h:
              * kjs/ExecState.h:
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData): Ininitalize new dynamicGlobalObject field to 0.
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.h:
              (JSC::ExecState::dynamicGlobalObject): Moved here from ExecState for benefit of inlining.
              Return lexical global object if this is a globalExec(), otherwise look in JSGlobalData
              for the one stashed there.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05456d94
    • jmalonzo@webkit.org's avatar
      2008-10-05 Chris Lord <chris@openedhand.com> · 7cfb4ca1
      jmalonzo@webkit.org authored
              Reviewed by Alp Toker. Landed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=20624
              WebKit-gtk uses deprecated GtkType/GtkObject
      
              * plugins/gtk/gtk2xtbin.c:
              (gtk_xtbin_get_type):
              * plugins/gtk/gtk2xtbin.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cfb4ca1
    • weinig@apple.com's avatar
      2008-10-05 Sam Weinig <sam@webkit.org> · 1c52b486
      weinig@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Avoid an extra lookup when transitioning to an existing StructureID
              by caching the offset of property that caused the transition.
      
              1% win on V8 suite.  Wash on SunSpider.
      
              * kjs/PropertyMap.cpp:
              (JSC::PropertyMap::put):
              * kjs/PropertyMap.h:
              * kjs/StructureID.cpp:
              (JSC::StructureID::StructureID):
              (JSC::StructureID::addPropertyTransition):
              * kjs/StructureID.h:
              (JSC::StructureID::setCachedTransistionOffset):
              (JSC::StructureID::cachedTransistionOffset):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c52b486
    • cwzwarich@webkit.org's avatar
      2008-10-05 Cameron Zwarich <zwarich@apple.com> · bf16a7df
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Bug 21364: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments
              <https://bugs.webkit.org/show_bug.cgi?id=21364>
      
              This patch does not yet remove the branch, but it does a bit of refactoring
              so that a CodeGenerator now knows whether the associated CodeBlock will need
              a full scope before doing any code generation. This makes it possible to emit
              explicit tear-off instructions before every op_ret.
      
              * VM/CodeBlock.h:
              (JSC::CodeBlock::CodeBlock):
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::generate):
              (JSC::CodeGenerator::CodeGenerator):
              (JSC::CodeGenerator::emitPushScope):
              (JSC::CodeGenerator::emitPushNewScope):
              * kjs/nodes.h:
              (JSC::ScopeNode::needsActivation):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf16a7df
    • jmalonzo@webkit.org's avatar
      2008-10-05 Luke Kenneth Casson Leighton <lkcl@lkcl.net> · 1285b2ad
      jmalonzo@webkit.org authored
              Reviewed by David Hyatt.
      
              GTK_WINDOW_HWND not GTK_WINDOWING_HWND
              https://bugs.webkit.org/show_bug.cgi?id=20725
      
              Updated to ToT by Jan Alonzo.
      
              * plugins/gtk/PluginViewGtk.cpp:
              (WebCore::PluginView::getValue):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1285b2ad
    • jmalonzo@webkit.org's avatar
      2008-10-05 Jan Michael Alonzo <jmalonzo@webkit.org> · 2b465838
      jmalonzo@webkit.org authored
              Reviewed by Darin Adler.
      
              Invalid cast from GdkWindow to GtkWidget
              https://bugs.webkit.org/show_bug.cgi?id=21391
      
              Fix a misplaced closing parenthesis to actually cast the widget, not the window
      
              * platform/gtk/PlatformScreenGtk.cpp:
              (WebCore::screenDepth):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b465838
    • abarth@webkit.org's avatar
      WebCore: · fb074382
      abarth@webkit.org authored
      2008-10-04  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Alder.
      
              Attach the Origin header to POST requests to help defend against
              cross-site request forgery.
      
              https://bugs.webkit.org/show_bug.cgi?id=20792
      
              Collin Jackson <collinj@webkit.org> also contributed to this patch.
      
              Tests: http/tests/security/originHeader/origin-header-for-data.html
                     http/tests/security/originHeader/origin-header-for-empty.html
                     http/tests/security/originHeader/origin-header-for-get.html
                     http/tests/security/originHeader/origin-header-for-https.html
                     http/tests/security/originHeader/origin-header-for-post.html
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::createWindow):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::createWindow):
              (WebCore::FrameLoader::urlSelected):
              (WebCore::FrameLoader::submitForm):
              (WebCore::FrameLoader::outgoingOrigin):
              (WebCore::FrameLoader::loadURL):
              (WebCore::FrameLoader::addExtraFieldsToRequest):
              (WebCore::FrameLoader::loadPostRequest):
              (WebCore::FrameLoader::loadResourceSynchronously):
              (WebCore::FrameLoader::loadItem):
              * loader/FrameLoader.h:
              * loader/SubresourceLoader.cpp:
              (WebCore::SubresourceLoader::create):
              * loader/loader.cpp:
              (WebCore::Loader::Host::servePendingRequests):
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::toHTTPOrigin):
              * platform/SecurityOrigin.h:
              * platform/network/ResourceRequestBase.h:
              (WebCore::ResourceRequestBase::httpOrigin):
              (WebCore::ResourceRequestBase::setHTTPOrigin):
              (WebCore::ResourceRequestBase::clearHTTPOrigin):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
              (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
              (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
              (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
      
      LayoutTests:
      
      2008-10-04  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Adler.
      
              Tests for the new Origin header.
      
              https://bugs.webkit.org/show_bug.cgi?id=20792
      
              Collin Jackson <collinj@webkit.org> also contributed to this patch.
      
              * http/tests/security/originHeader: Added.
              * http/tests/security/originHeader/origin-header-for-data-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-data.html: Added.
              * http/tests/security/originHeader/origin-header-for-empty-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-empty.html: Added.
              * http/tests/security/originHeader/origin-header-for-get-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-get.html: Added.
              * http/tests/security/originHeader/origin-header-for-https-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-https.html: Added.
              * http/tests/security/originHeader/origin-header-for-post-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-post.html: Added.
              * http/tests/security/originHeader/origin-header-for-xmlhttprequest-expected.txt: Added.
              * http/tests/security/originHeader/origin-header-for-xmlhttprequest.html: Added.
              * http/tests/security/originHeader/resources: Added.
              * http/tests/security/originHeader/resources/origin-header-post-to-http.html: Added.
              * http/tests/security/originHeader/resources/print-origin.cgi: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb074382
    • barraclough@apple.com's avatar
      2008-10-05 Gavin Barraclough <barraclough@apple.com> · 6bd3e165
      barraclough@apple.com authored
              Reviewed by Cameron Zwarich.
      
              Fix for bug #21387 - using SamplingTool with CTI.
      
              (1) A repatch offset offset changes due to an additional instruction to update SamplingTool state.
              (2) Fix an incusion order problem due to ExecState changes.
              (3) Change to a MACHINE_SAMPLING macro, use of exec should now be accessing global data.
      
              * VM/CTI.h:
              (JSC::CTI::execute):
              * VM/SamplingTool.h:
              (JSC::SamplingTool::privateExecuteReturned):
              * kjs/Shell.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6bd3e165
    • oliver@apple.com's avatar
      Bug 21381: Incremental parsing of html causes bogus line numbers in some cases · 12c92c93
      oliver@apple.com authored
      <https://bugs.webkit.org/show_bug.cgi?id=21381>
      
      Reviewed by Tim Hatcher.
      
      If we hit a parsing boundary (end of a packet, etc) in the middle of a
      <script> element when we are doing an incremental parse, we exit the
      parser, and reenter later when more data is available.  During this
      reentry we incorrectly reset the scriptStartLineno to the current line
      in the parser, which is now part way through the script element.
      
      The solution is to track whether we are entering or reentering the parsing
      of a script element.  We do this simply by 0 checking scriptStartLineno,
      and resetting it after we complete parsing of each script element.
      
      Test: http/tests/incremental/pause-in-script-element.pl
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12c92c93
    • jmalonzo@webkit.org's avatar
      2008-10-04 Alp Toker <alp@nuanti.com> · cc0c46e5
      jmalonzo@webkit.org authored
              Reviewed by David Hyatt. Landed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=20924
              [Gtk] Linux/Gtk: Recent tree revisions fail Acid2 and Acid3
      
              https://bugs.webkit.org/show_bug.cgi?id=19578
              [CURL] problem in parseDataUrl
      
              De-obfuscate parseDataUrl() and fix regressions introduced in r35954.
              This patch also fixes encoding support in escaped (non-Base64) data
              URLs. All manual data URL tests now pass in both GLib and non-GLib
              code paths.
      
              * platform/network/curl/ResourceHandleManager.cpp:
              (WebCore::parseDataUrl):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc0c46e5
  3. 04 Oct, 2008 16 commits
    • timothy@apple.com's avatar
      Makes breakpoints and debugging code during page load work in the · 5c58fb14
      timothy@apple.com authored
              Web Inspector's debugger. Specifically, this makes the source
              code for loading resources show up in the Scripts panel.
      
              https://bugs.webkit.org/show_bug.cgi?id=19053
              rdar://problem/5933408
      
              Reviewed by Mark Rowe.
      
              * WebCore.xcodeproj/project.pbxproj: Mark the inspector group as
              not using tabs and a tab width of 8.
              * inspector/InspectorController.cpp:
              (WebCore::addResourceSourceToFrame): Return a bool to report if the
              source was added successfully or not.
              (WebCore::addSourceToFrame): Ditto.
              * inspector/front-end/ScriptView.js:
              (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
              Return early if the InspectorController.addSourceToFrame fails.
              Moved the delete of the _frameNeedsSetup property after that call so
              if the source wasn't added it will be attempted again.
              * inspector/front-end/SourceView.js:
              (WebInspector.SourceView.prototype.detach): Move a comment.
              (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
              Don't check if the resource is finished or failed, just attempt
              to add the source to the frame. WebCore has the source, but the
              finished property hasn't been set yet. Return early if the
              InspectorController.addSourceToFrame fails. Moved the delete
              of the _frameNeedsSetup property after that call so if the source
              wasn't added it will be attempted again.
              (WebInspector.SourceView.prototype._resourceLoadingFinished):
              Clear the _frameNeedsSetup and _sourceFrameSetup properties so
              the source frame will we populated again now that the resource
              load has finished.
              * manual-tests/inspector/debugger-pause-during-load.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c58fb14
    • mrowe@apple.com's avatar
      Add a 'Check For Weak VTables' build phase to catch weak vtables as early as possible. · b321465d
      mrowe@apple.com authored
      Reviewed by Tim Hatcher.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b321465d
    • mrowe@apple.com's avatar
      Update check-for-weak-vtables to check only the final linked image for weak vtables. · e380b15a
      mrowe@apple.com authored
      This gives more useful results than checking each object file independently.
      
      Reviewed by Tim Hatcher.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e380b15a
    • hyatt@apple.com's avatar
      Fix Qt build bustage. · c6380b3f
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6380b3f
    • mrowe@apple.com's avatar
      Upgrade to WordPress 2.6.2. · 74efd997
      mrowe@apple.com authored
      * blog:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74efd997
    • hyatt@apple.com's avatar
      Fix build bustage I just introduced. · eeaf27dc
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eeaf27dc
    • hyatt@apple.com's avatar
      2008-10-04 David Hyatt <hyatt@apple.com> · a4a9e259
      hyatt@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=21373
      
              Tear down scrollbars in FrameView rather than ScrollView so that the connection to the hostWindow()
              is still present.
      
              Reviewed by Mark Rowe
      
              * page/FrameView.cpp:
              (WebCore::FrameView::~FrameView):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4a9e259
    • hyatt@apple.com's avatar
      Fix Qt bustage. · 7cee18f2
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cee18f2
    • hyatt@apple.com's avatar
      Fix Qt bustage. · 4c9199b6
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c9199b6
    • weinig@apple.com's avatar
      2008-10-04 Sam Weinig <sam@webkit.org> · 3b7e4b1c
      weinig@apple.com authored
              Reviewed by Dan Bernstein.
      
              Avoid copying a Vector when using getSupportedKeySizes.
      
              * html/HTMLKeygenElement.cpp:
              (WebCore::HTMLKeygenElement::HTMLKeygenElement):
              * platform/SSLKeyGenerator.h:
              * platform/gtk/TemporaryLinkStubs.cpp:
              (WebCore::getSupportedKeySizes):
              * platform/mac/SSLKeyGeneratorMac.mm:
              (WebCore::getSupportedKeySizes):
              * platform/qt/TemporaryLinkStubs.cpp:
              (WebCore::getSupportedKeySizes):
              * platform/win/TemporaryLinkStubs.cpp:
              (WebCore::getSupportedKeySizes):
              * platform/wx/TemporaryLinkStubs.cpp:
              (WebCore::getSupportedKeySizes):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b7e4b1c
    • weinig@apple.com's avatar
      2008-10-04 Sam Weinig <sam@webkit.org> · 6e56e4ab
      weinig@apple.com authored
              Reviewed by Oliver Hunt.
      
              Fix https://bugs.webkit.org/show_bug.cgi?id=21320
              leaks of PropertyNameArrayData seen on buildbot
      
              - Fix RefPtr cycle by making PropertyNameArrayData's pointer back
                to the StructureID a weak pointer.
      
              * kjs/PropertyNameArray.h:
              (JSC::PropertyNameArrayData::setCachedStructureID):
              (JSC::PropertyNameArrayData::cachedStructureID):
              * kjs/StructureID.cpp:
              (JSC::StructureID::getEnumerablePropertyNames):
              (JSC::StructureID::clearEnumerationCache):
              (JSC::StructureID::~StructureID):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e56e4ab
    • hyatt@apple.com's avatar
      Speculative fix for Qt bustage from inspector directory move. · 9d859919
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d859919
    • hyatt@apple.com's avatar
      Fix build bustage from the inspector directory move on Windows. · e3d0e31a
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3d0e31a
    • darin@apple.com's avatar
      JavaScriptCore: · d3f46409
      darin@apple.com authored
      2008-10-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - https://bugs.webkit.org/show_bug.cgi?id=21295
                Bug 21295: Replace ExecState with a call frame Register pointer
      
              10% faster on Richards; other v8 benchmarks faster too.
              A wash on SunSpider.
      
              This does the minimum necessary to get the speedup. Next step in
              cleaning this up is to replace ExecState with a CallFrame class,
              and be more judicious about when to pass a call frame and when
              to pass a global data pointer, global object pointer, or perhaps
              something else entirely.
      
              * VM/CTI.cpp: Remove the debug-only check of the exception in
              ctiVMThrowTrampoline -- already checked in the code the trampoline
              jumps to, so not all that useful. Removed the exec argument from
              ctiTrampoline. Removed emitDebugExceptionCheck -- no longer needed.
              (JSC::CTI::emitCall): Removed code to set ExecState::m_callFrame.
              (JSC::CTI::privateCompileMainPass): Removed code in catch to extract
              the exception from ExecState::m_exception; instead, the code that
              jumps into catch will make sure the exception is already in eax.
              * VM/CTI.h: Removed exec from the ctiTrampoline. Also removed the
              non-helpful "volatile". Temporarily left ARG_exec in as a synonym
              for ARG_r; I'll change that on a future cleanup pass when introducing
              more use of the CallFrame type.
              (JSC::CTI::execute): Removed the ExecState* argument.
      
              * VM/ExceptionHelpers.cpp:
              (JSC::InterruptedExecutionError::InterruptedExecutionError): Take
              JSGlobalData* instead of ExecState*.
              (JSC::createInterruptedExecutionException): Ditto.
              * VM/ExceptionHelpers.h: Ditto. Also removed an unneeded include.
      
              * VM/Machine.cpp:
              (JSC::slideRegisterWindowForCall): Removed the exec and
              exceptionValue arguments. Changed to return 0 when there's a stack
              overflow rather than using a separate exception argument to cut
              down on memory accesses in the calling convention.
              (JSC::Machine::unwindCallFrame): Removed the exec argument when
              constructing a DebuggerCallFrame. Also removed code to set
              ExecState::m_callFrame.
              (JSC::Machine::throwException): Removed the exec argument when
              construction a DebuggerCallFrame.
              (JSC::Machine::execute): Updated to use the register instead of
              ExecState and also removed various uses of ExecState.
              (JSC::Machine::debug):
              (JSC::Machine::privateExecute): Put globalData into a local
              variable so it can be used throughout the interpreter. Changed
              the VM_CHECK_EXCEPTION to get the exception in globalData instead
              of through ExecState.
              (JSC::Machine::retrieveLastCaller): Turn exec into a registers
              pointer by calling registers() instead of by getting m_callFrame.
              (JSC::Machine::callFrame): Ditto.
              Tweaked exception macros. Made new versions for when you know
              you have an exception. Get at global exception with ARG_globalData.
              Got rid of the need to pass in the return value type.
              (JSC::Machine::cti_op_add): Update to use new version of exception
              macros.
              (JSC::Machine::cti_op_pre_inc): Ditto.
              (JSC::Machine::cti_timeout_check): Ditto.
              (JSC::Machine::cti_op_instanceof): Ditto.
              (JSC::Machine::cti_op_new_func): Ditto.
              (JSC::Machine::cti_op_call_JSFunction): Optimized by using the
              ARG values directly instead of through local variables -- this gets
              rid of code that just shuffles things around in the stack frame.
              Also get rid of ExecState and update for the new way exceptions are
              handled in slideRegisterWindowForCall.
              (JSC::Machine::cti_vm_compile): Update to make exec out of r since
              they are both the same thing now.
              (JSC::Machine::cti_op_call_NotJSFunction): Ditto.
              (JSC::Machine::cti_op_init_arguments): Ditto.
              (JSC::Machine::cti_op_resolve): Ditto.
              (JSC::Machine::cti_op_construct_JSConstruct): Ditto.
              (JSC::Machine::cti_op_construct_NotJSConstruct): Ditto.
              (JSC::Machine::cti_op_resolve_func): Ditto.
              (JSC::Machine::cti_op_put_by_val): Ditto.
              (JSC::Machine::cti_op_put_by_val_array): Ditto.
              (JSC::Machine::cti_op_resolve_skip): Ditto.
              (JSC::Machine::cti_op_resolve_global): Ditto.
              (JSC::Machine::cti_op_post_inc): Ditto.
              (JSC::Machine::cti_op_resolve_with_base): Ditto.
              (JSC::Machine::cti_op_post_dec): Ditto.
              (JSC::Machine::cti_op_call_eval): Ditto.
              (JSC::Machine::cti_op_throw): Ditto. Also rearranged to return
              the exception value as the return value so it can be used by
              op_catch.
              (JSC::Machine::cti_op_push_scope): Ditto.
              (JSC::Machine::cti_op_in): Ditto.
              (JSC::Machine::cti_op_del_by_val): Ditto.
              (JSC::Machine::cti_vm_throw): Ditto. Also rearranged to return
              the exception value as the return value so it can be used by
              op_catch.
      
              * kjs/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::functionName): Pass globalData.
              (JSC::DebuggerCallFrame::evaluate): Eliminated code to make a
              new ExecState.
              * kjs/DebuggerCallFrame.h: Removed ExecState argument from
              constructor.
      
              * kjs/ExecState.h: Eliminated all data members and made ExecState
              inherit privately from Register instead. Also added a typedef to
              the future name for this class, which is CallFrame. It's just a
              Register* that knows it's a pointer at a call frame. The new class
              can't be constructed or copied. Changed all functions to use
              the this pointer instead of m_callFrame. Changed exception-related
              functions to access an exception in JSGlobalData. Removed functions
              used by CTI to pass the return address to the throw machinery --
              this is now done directly with a global in the global data.
      
              * kjs/FunctionPrototype.cpp:
              (JSC::functionProtoFuncToString): Pass globalData instead of exec.
      
              * kjs/InternalFunction.cpp:
              (JSC::InternalFunction::name): Take globalData instead of exec.
              * kjs/InternalFunction.h: Ditto.
      
              * kjs/JSGlobalData.cpp: Initialize the new exception global to 0.
              * kjs/JSGlobalData.h: Declare two new globals. One for the current
              exception and another for the return address used by CTI to
              implement the throw operation.
      
              * kjs/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::init): Removed code to set up globalExec,
              which is now the same thing as globalCallFrame.
              (JSC::JSGlobalObject::reset): Get globalExec from our globalExec
              function so we don't have to repeat the logic twice.
              (JSC::JSGlobalObject::mark): Removed code to mark the exception;
              the exception is now stored in JSGlobalData and marked there.
              (JSC::JSGlobalObject::globalExec): Return a pointer to the end
              of the global call frame.
              * kjs/JSGlobalObject.h: Removed the globalExec data member.
      
              * kjs/JSObject.cpp:
              (JSC::JSObject::putDirectFunction): Pass globalData instead of exec.
      
              * kjs/collector.cpp:
              (JSC::Heap::collect): Mark the global exception.
      
              * profiler/ProfileGenerator.cpp:
              (JSC::ProfileGenerator::addParentForConsoleStart): Pass globalData
              instead of exec to createCallIdentifier.
      
              * profiler/Profiler.cpp:
              (JSC::Profiler::willExecute): Pass globalData instead of exec to
              createCallIdentifier.
              (JSC::Profiler::didExecute): Ditto.
              (JSC::Profiler::createCallIdentifier): Take globalData instead of
              exec.
              (JSC::createCallIdentifierFromFunctionImp): Ditto.
              * profiler/Profiler.h: Change interface to take a JSGlobalData
              instead of an ExecState.
      
      WebKit/mac:
      
      2008-10-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - https://bugs.webkit.org/show_bug.cgi?id=21295
                Bug 21295: Replace ExecState with a call frame Register pointer
      
              * WebView/WebScriptDebugger.mm:
              (WebScriptDebugger::WebScriptDebugger): Remove 0 passed for ExecState.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3f46409
    • darin@apple.com's avatar
      2008-10-04 Darin Adler <darin@apple.com> · 28f84fce
      darin@apple.com authored
              Reviewed by Cameron Zwarich.
      
              - prepare for https://bugs.webkit.org/show_bug.cgi?id=21295
                Bug 21295: Replace ExecState with a call frame Register pointer
      
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom):
              Remove bogus "const".
              * bindings/js/JSQuarantinedObjectWrapper.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28f84fce
    • hyatt@apple.com's avatar
      2008-10-04 David Hyatt <hyatt@apple.com> · b17c775e
      hyatt@apple.com authored
              Make PopupMenuClient obey the platform abstraction.  Remove any connection to Document and RenderStyle.
      
              Reviewed by Darin Adler
      
              * WebCore.xcodeproj/project.pbxproj:
              * platform/PopupMenuClient.h:
              * platform/gtk/PopupMenuGtk.cpp:
              (WebCore::PopupMenu::show):
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::populate):
              (WebCore::PopupMenu::show):
              * platform/qt/PopupMenuQt.cpp:
              (WebCore::PopupMenu::populate):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::calculatePositionAndSize):
              (WebCore::PopupMenu::paint):
              (WebCore::PopupWndProc):
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::itemStyle):
              (WebCore::RenderMenuList::menuStyle):
              (WebCore::RenderMenuList::hostWindow):
              * rendering/RenderMenuList.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::itemStyle):
              (WebCore::RenderTextControl::menuStyle):
              (WebCore::RenderTextControl::hostWindow):
              * rendering/RenderTextControl.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b17c775e