1. 23 Aug, 2009 1 commit
    • xan@webkit.org's avatar
      2009-08-22 Xan Lopez <xlopez@igalia.com> · 382487e9
      xan@webkit.org authored
              Reviewed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=28154
              clicking below end of text in a textarea moves cursor to wrong position
      
              Expose the EditingBehavior setting and set it by default to Mac,
              since that what matches the GTK+ default behavior.
      
              * webkit/webkitprivate.cpp:
              (WebKit::core):
              * webkit/webkitprivate.h:
              * webkit/webkitwebsettings.cpp:
              (webkit_web_settings_class_init):
              (webkit_web_settings_set_property):
              (webkit_web_settings_get_property):
              (webkit_web_settings_copy):
              * webkit/webkitwebsettings.h:
              * webkit/webkitwebview.cpp:
              (webkit_web_view_update_settings):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      382487e9
  2. 22 Aug, 2009 19 commits
    • mjs@apple.com's avatar
      REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC · a0f33bcd
      mjs@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28655
      
      Reviewed by Mark Rowe.
      
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
      * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0f33bcd
    • abarth@webkit.org's avatar
      WebKit/mac: Revert 47684. We're going to do this later once clients have had a · 0a502fbc
      abarth@webkit.org authored
      chance to opt into the setting they like.
      
      Patch by Adam Barth <abarth@webkit.org> on 2009-08-22
      * Misc/WebKitVersionChecks.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      
      WebKit/qt: Revert 47684.  We're going to do this later once clients have had a
      chance to opt into the setting they like.
      
      Patch by Adam Barth <abarth@webkit.org> on 2009-08-22
      * Api/qwebsettings.cpp:
      (QWebSettings::QWebSettings):
      
      WebKit/win: Revert 47684.  We're going to do this later once clients have had a
      chance to opt into the setting they like.
      
      Patch by Adam Barth <abarth@webkit.org> on 2009-08-22
      * WebPreferences.cpp:
      (WebPreferences::initializeDefaultSettings):
      
      WebKitTools: Revert 47684.  We're going to do this later once clients have had a
      chance to opt into the setting they like.
      
      Patch by Adam Barth <abarth@webkit.org> on 2009-08-22
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/qt/DumpRenderTree.cpp:
      (WebCore::WebPage::WebPage):
      * DumpRenderTree/win/DumpRenderTree.cpp:
      (resetDefaultsToConsistentValues):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a502fbc
    • abarth@webkit.org's avatar
      2009-08-22 Adam Barth <abarth@webkit.org> · b34a9846
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Don't let local files access web URLs
              https://bugs.webkit.org/show_bug.cgi?id=28480
      
              * Misc/WebKitVersionChecks.m:
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]):
      2009-08-22  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Don't let local files access web URLs
              https://bugs.webkit.org/show_bug.cgi?id=28480
      
              * Api/qwebsettings.cpp:
              (QWebSettings::QWebSettings):
      2009-08-22  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Don't let local files access web URLs
              https://bugs.webkit.org/show_bug.cgi?id=28480
      
              * WebPreferences.cpp:
              (WebPreferences::initializeDefaultSettings):
      2009-08-22  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Don't let local files access web URLs
              https://bugs.webkit.org/show_bug.cgi?id=28480
      
              A bunch of our LayoutTests rely on our old behavior, so we explicitly
              grant local files universal access during testing.  Mainly, these tests
              involve making XMLHttpRequests for data URLs.
      
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetDefaultsToConsistentValues):
              * DumpRenderTree/qt/DumpRenderTree.cpp:
              (WebCore::WebPage::WebPage):
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (resetDefaultsToConsistentValues):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b34a9846
    • adele@apple.com's avatar
      Fix for <rdar://problem/7161656> Crash in RenderObject::destroy when using custom scrollbars · fb2cebdd
      adele@apple.com authored
      Reviewed by Anders Carlsson.
      
      Custom scrollbars normally get detached when a document gets detached.  In this case, a crash was happening when the document had gone into the page cache 
      and then was getting destroyed without proper scrollbar teardown.  This change makes custom scrollbars get detached when the document enters the cache.
      
      I couldn't figure out a way to reliably cause this to happen in DRT, since the reproducible case relies on the cache being purged at a particular time.
      
      * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Detach custom scrollbars when the CachedFrame is created.  
        They'll get reattached when the document comes out of the page cache.
      * page/FrameView.cpp: (WebCore::FrameView::~FrameView): Added some asserts to catch this problem earlier in debug builds.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb2cebdd
    • hyatt@apple.com's avatar
      WebCore: Make sure self-collapsing blocks that clear floats are still able to... · ddb67816
      hyatt@apple.com authored
      WebCore: Make sure self-collapsing blocks that clear floats are still able to collapse their bottom margins with
      the bottom of their parent blocks.  The old code prevented all collapsing, but all CSS2.1 states is that:
      "An element that has had clearance applied to it never collapses its top margin with its parent block's bottom margin."
              
      Reviewed by Dan Bernstein.
      
      The implication is that the bottom margin can still collapse, and the block-inside-inline form of
      fast/block/margin-collapse/025.html (added as fast/block/margin-collapse/block-inside-inline/025.html) depends
      on it to get comparable results.
      
      Added block-inside-inline tests (a whole slew of them) in fast/block/margin-collapse/block-inside-inline/
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::MarginInfo::MarginInfo):
      (WebCore::RenderBlock::collapseMargins):
      (WebCore::RenderBlock::clearFloatsIfNeeded):
      (WebCore::RenderBlock::handleBottomOfBlock):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::MarginInfo::clearMargin):
      (WebCore::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
      
      LayoutTests: Add a bunch of tests for the block-inside-inline cases of margin-collapsing.  The same test
      suite but converted to wrap all the blocks inside inlines to make sure they still collapse
      the same way.
      
      Reviewed by Dan Bernstein.
      
      * fast/block/margin-collapse/block-inside-inline: Added.
      * fast/block/margin-collapse/block-inside-inline/001.html: Added.
      * fast/block/margin-collapse/block-inside-inline/002.html: Added.
      * fast/block/margin-collapse/block-inside-inline/003.html: Added.
      * fast/block/margin-collapse/block-inside-inline/004.html: Added.
      * fast/block/margin-collapse/block-inside-inline/005.html: Added.
      * fast/block/margin-collapse/block-inside-inline/006.html: Added.
      * fast/block/margin-collapse/block-inside-inline/010.html: Added.
      * fast/block/margin-collapse/block-inside-inline/011.html: Added.
      * fast/block/margin-collapse/block-inside-inline/012.html: Added.
      * fast/block/margin-collapse/block-inside-inline/015.html: Added.
      * fast/block/margin-collapse/block-inside-inline/016.html: Added.
      * fast/block/margin-collapse/block-inside-inline/017.html: Added.
      * fast/block/margin-collapse/block-inside-inline/018.html: Added.
      * fast/block/margin-collapse/block-inside-inline/019.html: Added.
      * fast/block/margin-collapse/block-inside-inline/020.html: Added.
      * fast/block/margin-collapse/block-inside-inline/021.html: Added.
      * fast/block/margin-collapse/block-inside-inline/022.html: Added.
      * fast/block/margin-collapse/block-inside-inline/025.html: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/001-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/001-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/001-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/002-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/002-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/002-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/003-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/003-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/003-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/004-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/004-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/004-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/005-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/005-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/005-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/006-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/006-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/006-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/010-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/010-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/010-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/011-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/011-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/011-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/012-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/012-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/012-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/015-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/015-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/015-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/016-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/016-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/016-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/017-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/017-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/017-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/018-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/018-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/018-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/019-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/019-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/019-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/020-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/020-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/020-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/021-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/021-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/021-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/022-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/022-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/022-expected.txt: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/025-expected.checksum: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/025-expected.png: Added.
      * platform/mac/fast/block/margin-collapse/block-inside-inline/025-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ddb67816
    • mrowe@apple.com's avatar
      Bring signed updates to the Mac nightly builds. · 854fe306
      mrowe@apple.com authored
      Rubber-stamped by Anders Carlsson.
      
      * WebKitLauncher/Info.plist:
      * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
      * WebKitLauncher/WebKitNightlyEnablerSparkle.m:
      (initializeSparkle):
      * WebKitLauncher/nightly.webkit.org.public.pem: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      854fe306
    • cfleizach@apple.com's avatar
      Need to implement ARIA role="listitem" and role="list" · 4a06b8e3
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28606
      
      Fixing LayoutTest bustage.
      
      The SnowLeopard results are the latest, so they need to move to platform/mac
      The Tiger/Leopard results will default to the SnowLeopard results, so we need to move
      the current test from platform/mac to platform/mac-leopard         
      
      * platform/mac-leopard/accessibility/aria-roles-expected.txt: Copied from LayoutTests/platform/mac/accessibility/aria-roles-expected.txt.
      * platform/mac-snowleopard/accessibility/aria-roles-expected.txt: Removed.
      * platform/mac/accessibility/aria-roles-expected.txt: Replaced with LayoutTests/platform/mac-snowleopard/accessibility/aria-roles-expected.txt.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a06b8e3
    • cfleizach@apple.com's avatar
      WebCore: Need to implement ARIA role="listitem" and role="list" · c0620bb0
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28606
      
      Reviewed by Darin Adler.
      
      Test: platform/mac-snowleopard/accessibility/aria-list-and-listitem.html
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::getOrCreate):
      * accessibility/AccessibilityList.cpp:
      (WebCore::AccessibilityList::isUnorderedList):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::RoleEntry::):
      
      LayoutTests: Need to implement ARIA role="listitem" and role="list"
      https://bugs.webkit.org/show_bug.cgi?id=28606
      
      Reviewed by Darin Adler.
      
      Also added a SnowLeopard specific result for aria-roles-expected.
      
      * platform/mac-snowleopard/accessibility: Added.
      * platform/mac-snowleopard/accessibility/aria-list-and-listitem-expected.txt: Added.
      * platform/mac-snowleopard/accessibility/aria-list-and-listitem.html: Added.
      * platform/mac-snowleopard/accessibility/aria-roles-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0620bb0
    • mitz@apple.com's avatar
      Clean up fill image geometry calculation · 0a597b16
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28652
      
      Reviewed by Darin Adler.
      
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::calculateFillTileSize): Renamed
          calculateBackgroundSize() to this. Replaced separate scaledWidth and
          scaledHeight parameters with a single scaledSize parameter. Renamed
          parameters and local variables.
      (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Changed
          to use CSS3 Backgrounds and Borders terminology in comments and
          local variable names. Renamed, clarified and consolidated some local
          variables.
      * rendering/RenderBoxModelObject.h: Made calculateFillTileSize() private.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a597b16
    • cmarrin@apple.com's avatar
      Backing out http://trac.webkit.org/changeset/47669 · 028b5e62
      cmarrin@apple.com authored
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      028b5e62
    • dglazkov@chromium.org's avatar
      2009-08-22 Dimitri Glazkov <dglazkov@chromium.org> · fd685531
      dglazkov@chromium.org authored
              Unreviewed, build fix.
      
              Backing out http://trac.webkit.org/changeset/47671 in preparation of
              rolling out http://trac.webkit.org/changeset/47669.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd685531
    • dglazkov@chromium.org's avatar
      2009-08-22 Dimitri Glazkov <dglazkov@chromium.org> · a9dc709e
      dglazkov@chromium.org authored
              Reviewed by Anders Carlsson.
      
              Build fix, add CanvasRenderingContext to build systems.
              https://bugs.webkit.org/show_bug.cgi?id=28018
      
              * DerivedSources.make: Added CanvasRenderinContext.
              * GNUmakefile.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9dc709e
    • cmarrin@apple.com's avatar
    • cmarrin@apple.com's avatar
      stash CanvasRenderingContext2D · 53323635
      cmarrin@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53323635
    • darin@apple.com's avatar
      Fix storage leak from syntax tree arena allocation patch. · 18af0e02
      darin@apple.com authored
      Patch by Darin Adler <darin@apple.com> on 2009-08-22
      * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
      because it has a vector.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18af0e02
    • darin@apple.com's avatar
      Fix Qt build. · cb5bfc09
      darin@apple.com authored
      Patch by Darin Adler <darin@apple.com> on 2009-08-21
      * parser/Nodes.cpp:
      (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
      This is used outside Nodes.cpp so can't be inline unless
      it is in the header.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb5bfc09
    • darin@apple.com's avatar
      * WebCore.vcproj/build-generated-files.sh: · 3ab318b0
      darin@apple.com authored
      * make-generated-sources.sh:
      Removed obsolete code to set up CREATE_HASH_TABLE.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ab318b0
    • darin@apple.com's avatar
      Two loose ends from the last commit. · c175ab8a
      darin@apple.com authored
      Patch by Darin Adler <darin@apple.com> on 2009-08-21
      * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
      and create_hash_table project-internal instead of "private".
      * runtime/Executable.h: Removed accidentally-added constructor.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c175ab8a
    • darin@apple.com's avatar
      Syntax tree nodes should use arena allocation · 85a65c3c
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=25674
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-21
      Reviewed by Gavin Barraclough.
      
      Use an actual arena now. 0.6% speedup on SunSpider.
      
      New and improved with 100% less leaking of the universe.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
      Removed all exports involving the class FunctionBodyNode, which no
      longer needs to be used outside JavaScriptCore.
      
      * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
      Executable.h project-internal instead of "private".
      
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
      contains const Identifier* now.
      
      * parser/Grammar.y: Made identifiers from the lexer be const
      Identifier* and updated since VarStack contains const Identifier* now.
      
      * parser/Lexer.cpp:
      (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
      (JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
      and changed to call ParserArena.
      (JSC::Lexer::clear): Removed the code to manage m_identifiers and
      added code to set m_arena to 0.
      * parser/Lexer.h: Updated for changes above.
      
      * parser/NodeConstructors.h:
      (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
      on the arena.
      (JSC::ParserArenaDeletable::operator new): Changed to call the
      allocateDeletable function on the arena instead of deleteWithArena.
      (JSC::PropertyNode::PropertyNode): Added new constructor that makes
      numeric identifiers. Some day we might want to optimize this for
      integers so it doesn't create a string for each one.
      (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
      since it's now a const Identifier& so it can't be left uninitialized.
      (JSC::BreakNode::BreakNode): Ditto.
      (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
      to keep track of the statements rather than a separate statement vector.
      (JSC::BlockNode::BlockNode): Ditto.
      (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
      
      * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
      It seemed strangely out of place in the header.
      (JSC::ThrowableExpressionData::emitThrowError): Added an overload for
      UString as well as Identifier.
      (JSC::SourceElements::singleStatement): Added.
      (JSC::SourceElements::lastStatement): Added.
      (JSC::RegExpNode::emitBytecode): Changed the throwError code to use
      the substitution mechanism instead of doing a string append.
      (JSC::SourceElements::emitBytecode): Added. Replaces the old
      statementListEmitCode function, since we now keep the SourceElements
      objects around.
      (JSC::BlockNode::lastStatement): Added.
      (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
      statementListEmitCode.
      (JSC::CaseClauseNode::emitBytecode): Added.
      (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
      instead of statementListEmitCode.
      (JSC::ScopeNodeData::ScopeNodeData): Changed to store the
      SourceElements* instead of using releaseContentsIntoVector.
      (JSC::ScopeNode::emitStatementsBytecode): Added.
      (JSC::ScopeNode::singleStatement): Added.
      (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
      of statementListEmitCode.
      (JSC::EvalNode::emitBytecode): Ditto.
      (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
      insetad of statementListEmitCode and check for the return node using
      the new functions.
      
      * parser/Nodes.h: Changed VarStack to store const Identifier* instead
      of Identifier and rely on the arena to control lifetime. Added a new
      ParserArenaFreeable class. Made ParserArenaDeletable inherit from
      FastAllocBase instead of having its own operator new. Base the Node
      class on ParserArenaFreeable. Changed the various Node classes
      to use const Identifier& instead of Identifier to avoid the need to
      call their destructors and allow them to function as "freeable" in the
      arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
      Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
      CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
      as a base class since they do not descend from Node. Eliminated the
      StatementVector type and instead have various classes use SourceElements*
      instead of StatementVector. This prevents those classes from having to
      use ParserArenaDeletable to make sure the vector destructor is called.
      
      * parser/Parser.cpp:
      (JSC::Parser::parse): Pass the arena to the lexer.
      
      * parser/Parser.h: Added an include of ParserArena.h, which is no longer
      included by Nodes.h.
      (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
      singleStatement function, since there is no longer any children function.
      Removed some unneeded use of RefPtr.
      
      * parser/ParserArena.cpp:
      (JSC::ParserArena::ParserArena): Added. Initializes the new members,
      m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
      (JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
      since we store only the current pointer and the end of pool pointer.
      (JSC::ParserArena::deallocateObjects): Added. Contains the common
      memory-deallocation logic used by both the destructor and the
      reset function.
      (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
      (JSC::ParserArena::reset): Ditto. Also added code to zero out the
      new structures, and switched to use clear() instead of shrink(0) since
      we don't really reuse arenas.
      (JSC::ParserArena::makeNumericIdentifier): Added.
      (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
      is empty.
      (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
      since this is used only for assertions at the moment.
      (JSC::ParserArena::derefWithArena): Make non-inline.
      
      * parser/ParserArena.h: Added an actual arena of "freeable" objects,
      ones that don't need destructors to be called. Also added a separate
      IdentifierArena object, a segmented vector of identifiers that used
      to be in the Lexer.
      
      * runtime/Executable.h: Moved the definition of the
      FunctionExecutable::make function here. It can't go in JSFunction.h
      since that header has to be used outside JavaScriptCore and so can't
      include this, which includes Nodes.h. The function could be moved
      elswhere if we don't want to include JSFunction.h in this header, but
      for now this seems to be the best place.
      
      * runtime/JSFunction.h: Removed the include of Executable.h and
      definition of the FunctionExecutable::make function.
      
      * wtf/FastMalloc.cpp: Fixed an incorrect comment.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85a65c3c
  3. 21 Aug, 2009 20 commits