1. 30 Jun, 2008 17 commits
    • adele@apple.com's avatar
      WebCore: · 8e9caa38
      adele@apple.com authored
      2008-06-30  Adele Peterson  <adele@apple.com>
      
              Reviewed by Anders.
      
              Fix for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
      
              Test: editing/selection/select-all-textarea.html
      
              * dom/Node.cpp:
              (WebCore::Node::shadowAncestorNode): Break out code to find the root of the shadow tree into a new helper function.
              (WebCore::Node::shadowTreeRootNode): Added helper function.
              * dom/Node.h:
              * dom/Range.cpp: (WebCore::Range::shadowTreeRootNode): Added helper function.
              * dom/Range.h:
              * editing/Selection.cpp: (WebCore::Selection::shadowTreeRootNode): ditto.
              * editing/Selection.h:
              * editing/SelectionController.h: (WebCore::SelectionController::shadowTreeRootNode): ditto.
              * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll):
              If the selection is in a shadow tree, only select the contents of that shadow tree, not the whole document.
              * page/Frame.cpp:
              (WebCore::Frame::findString): Use the new shadowTreeRootNode helper functions.
              (WebCore::Frame::markAllMatchesForText): ditto.
      
      LayoutTests:
      
      2008-06-30  Adele Peterson  <adele@apple.com>
      
              Reviewed by Anders.
      
              Test for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
      
              * editing/selection/select-all-textarea-expected.txt: Added.
              * editing/selection/select-all-textarea.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e9caa38
    • cfleizach@apple.com's avatar
      <rdar://problem/4180780> Add attribute to get all the radio buttons in a set · 7f0c186c
      cfleizach@apple.com authored
      Adds ability for radio buttons to return an array of the other radio buttons in its radio group.
      Updates DumpRenderTree to support the linked ui elements attribute
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f0c186c
    • weinig@apple.com's avatar
      2008-06-30 Sam Weinig <sam@webkit.org> · 0755938a
      weinig@apple.com authored
              Reviewed by Kevin McCullough.
      
              Remove empty files Instruction.cpp, LabelID.cpp, Register.cpp and RegisterID.cpp.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/Instruction.cpp: Removed.
              * VM/LabelID.cpp: Removed.
              * VM/Register.cpp: Removed.
              * VM/RegisterID.cpp: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0755938a
    • weinig@apple.com's avatar
      2008-06-30 Sam Weinig <sam@webkit.org> · f55ee0ce
      weinig@apple.com authored
              Rubber-stamped (reluctantly) by Kevin McCullough.
      
              Rename date_object.h/cpp to DateInstance.h/cpp
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              * kjs/DateConstructor.cpp:
              * kjs/DateInstance.cpp: Copied from kjs/date_object.cpp.
              * kjs/DateInstance.h: Copied from kjs/date_object.h.
              * kjs/DatePrototype.cpp:
              * kjs/DatePrototype.h:
              * kjs/date_object.cpp: Removed.
              * kjs/date_object.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f55ee0ce
    • mitz@apple.com's avatar
      WebCore: · 1e6e97b8
      mitz@apple.com authored
              Reviewed by Adele Peterson.
      
              - WebCore part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
      
              * WebCore.base.exp: Removed Editor::setBaseWritingDirection() and added
              Frame::setSelectionBaseWritingDirection().
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
              call Frame::setSelectionBaseWritingDirection().
              * page/Frame.cpp:
              (WebCore::Frame::setSelectionBaseWritingDirection): Added. If the
              focused node is a text field or text area, changes its 'dir' attribute.
              This is what IE does when the user changes the writing direction in a
              text control. Otherwise, calls down to Editor::setBaseWritingDirection().
              * page/Frame.h:
      
      WebKit/mac:
      
              Reviewed by Adele Peterson.
      
              - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
              WebCore::Frame::setSelectionBaseWritingDirection() instead of
              WebCore::Editor::setBaseWritingDirection().
              (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
              (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e6e97b8
    • ddkilzer@apple.com's avatar
      Improve HTMLObjectElement data encapsulation · d44054d1
      ddkilzer@apple.com authored
              Reviewed by Dave Hyatt.
      
              HTMLObjectElement has some public member variables that should be
              private with accessor methods.
      
              No test cases added since there is no change in behavior.
      
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::HTMLObjectElement): Reorder
              initialization of member variables to match defined order in header.
              * html/HTMLObjectElement.h:
              (WebCore::HTMLObjectElement::classId): Added.
              (WebCore::HTMLObjectElement::url): Added.
              (WebCore::HTMLObjectElement::serviceType): Added.
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::updateWidget): Use new accessor methods
              in HTMLObjectElement now that its member variables are private.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d44054d1
    • mitz@apple.com's avatar
      Reviewed by Anders Carlsson. · 0c5d1ff2
      mitz@apple.com authored
              - remove unused member variable
      
              * page/Page.h: Removed Page::m_focusedNode.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c5d1ff2
    • weinig@apple.com's avatar
      2008-06-30 Sam Weinig <sam@webkit.org> · efdce0f9
      weinig@apple.com authored
              Rubber-stamped by Darin Adler.
      
              Remove internal.cpp and move its contents to there own .cpp files.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              * kjs/GetterSetter.cpp: Copied from kjs/internal.cpp.
              * kjs/InternalFunction.cpp: Copied from kjs/internal.cpp.
              * kjs/JSNumberCell.cpp: Copied from kjs/internal.cpp.
              * kjs/JSString.cpp: Copied from kjs/internal.cpp.
              * kjs/JSString.h:
              * kjs/LabelStack.cpp: Copied from kjs/internal.cpp.
              * kjs/NumberConstructor.cpp:
              * kjs/NumberObject.cpp:
              (KJS::constructNumber):
              (KJS::constructNumberFromImmediateNumber):
              * kjs/internal.cpp: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efdce0f9
    • andersca@apple.com's avatar
      2008-06-30 Anders Carlsson <andersca@apple.com> · d60bde3b
      andersca@apple.com authored
              Reviewed by Adam.
      
              <rdar://problem/6014209>
              Crash when loading manifest from application cache fails
              
              There is no need to set any handles to 0 after calling cacheUpdateFailed(), since
              that is done inside the function. Furthermore, after calling cacheUpdateFailed() the cache
              group could be deleted causing us to access freed memory and then crashing.
              
              * loader/appcache/ApplicationCacheGroup.cpp:
              (WebCore::ApplicationCacheGroup::didReceiveResponse):
              (WebCore::ApplicationCacheGroup::didFail):
              (WebCore::ApplicationCacheGroup::didFailToLoadManifest):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d60bde3b
    • aroben@apple.com's avatar
      Fix <rdar://5954749> Assertion failure due to HashTable's use of operator& · 3cd7511b
      aroben@apple.com authored
      JavaScriptCore:
      
              Fix <rdar://5954749> Assertion failure due to HashTable's use of
              operator&
      
              HashTable was passing &value to constructDeletedValue, which in
              classes like WebCore::COMPtr would cause an assertion. We now pass
              value by reference instead of by address so that the HashTraits
              implementations have more flexibility in constructing the deleted
              value.
      
              Reviewed by Ada Chan.
      
              * VM/CodeGenerator.h: Updated for changes to HashTraits.
              * wtf/HashTable.h:
              (WTF::::deleteBucket): Changed to pass bucket by reference instead of
              by address.
              (WTF::::checkKey): Ditto.
              * wtf/HashTraits.h:
              (WTF::): Updated HashTraits for HashTable change.
      
      WebCore:
      
              Fix <rdar://5954749> Assertion failure due to HashTable's use of
              operator&
      
              Reviewed by Ada Chan.
      
              * bindings/js/JSSVGPODTypeWrapper.h:
              * dom/Document.h:
              * dom/StyledElement.cpp:
              * platform/graphics/FontCache.cpp:
              * platform/graphics/IntSizeHash.h:
              (WTF::):
              * platform/text/StringHash.h:
              * platform/win/COMPtr.h:
              * svg/SVGAnimatedTemplate.h:
              Updated all custom HashTraits for HashTable changes.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cd7511b
    • mrowe@apple.com's avatar
      Versioning. · fec3e790
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fec3e790
    • hausmann@webkit.org's avatar
      2008-06-30 Simon Hausmann <hausmann@webkit.org> · 557953a4
      hausmann@webkit.org authored
              Rubber-stamped by Niko.
      
              Removed the obsolete and unmaintained WebKitPart. The integration of
              QtWebKit into KDE is now done in the webkitkde component inside KDE.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      557953a4
    • zimmermann@webkit.org's avatar
      Reviewed by Antti. · e4fa77d3
      zimmermann@webkit.org authored
      Fix all existing tests in svg/dynamic-updates to actually reflect repainting changes, by
      removing the timing dependency. Instead model them like frame-getSVGDocument.html by
      not including the <script src="js-test-post.js"> element within the TEMPLATE.html but
      by dynamically injecting it, if the test actually finished.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4fa77d3
    • ap@webkit.org's avatar
      Reviewed by Cameron Zwarich. · c618cd25
      ap@webkit.org authored
              Make RegisterFile really unmap memory on destruction.
      
              This fixes run-webkit-tests --threaded, which ran out of address space in a few seconds.
      
              * VM/RegisterFile.cpp: (KJS::RegisterFile::~RegisterFile): Unmap all the memory, not just
              1/4 of it.
      
              * kjs/JSGlobalObject.h: Don't include RegisterFile.h, so that changes to it don't make
              half of WebCore rebuild.
      
              * VM/Machine.h: Don't forward declare RegisterFile, as RegisterFile.h is included already.
      
              * VM/RegisterFile.h: (KJS::RegisterFile::RegisterFile): Assert that the allocation succeeded.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c618cd25
    • cwzwarich@webkit.org's avatar
      2008-06-30 Cameron Zwarich <cwzwarich@uwaterloo.ca> · f241e928
      cwzwarich@webkit.org authored
              Rubber-stamped by Oliver.
      
              Correct the documentation for op_put_by_index.
      
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f241e928
    • hausmann@webkit.org's avatar
      2008-06-30 Simon Hausmann <hausmann@webkit.org> · a59e104b
      hausmann@webkit.org authored
              Fix the Qt build.
      
              Added missing includes and changed getItem array calls to use get()
              instead.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a59e104b
    • cwzwarich@webkit.org's avatar
      2008-06-29 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 7b04fefa
      cwzwarich@webkit.org authored
              Reviewed by Oliver.
      
              Bug 19821: Merge the instruction pair (less, jfalse)
              <https://bugs.webkit.org/show_bug.cgi?id=19821>
      
              This is a 2.4% win on SunSpider. I needed to add an ALWAYS_INLINE
              intrinisc to CodeGenerator::rewindBinaryOp() to avoid a massive
              regression in regexp-dna.
      
              * VM/CodeBlock.cpp:
              (KJS::CodeBlock::dump):
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::rewindBinaryOp):
              (KJS::CodeGenerator::emitJumpIfFalse):
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
              * VM/Opcode.cpp:
              (KJS::):
              * VM/Opcode.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b04fefa
  2. 29 Jun, 2008 12 commits
    • dsmith@webkit.org's avatar
      2008-06-29 David Smith <catfish.man@gmail.com> · 4608318f
      dsmith@webkit.org authored
              Rubberstamped by Sam Weinig.
      
              Change a redundant node->isElement() check to an ASSERT for a 1.3% speedup on getElementsByTagName.
      
              * dom/TagNodeList.cpp:
              (WebCore::TagNodeList::nodeMatches):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4608318f
    • mitz@apple.com's avatar
      Reviewed by Darin Adler. · 65e10cb0
      mitz@apple.com authored
              - fix SVG layout test regressions
      
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::addFontFaceRule): Made this function work
              again with primitive values, because the @font-face rules SVG fonts
              create still use a single primitive value rather than a value list.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65e10cb0
    • mitz@apple.com's avatar
      2008-06-29 Dan Bernstein <mitz@apple.com> · cba5fff9
      mitz@apple.com authored
              - add a missing file from the last check-in
      
              * fast/css/resources/font-face-descriptor-multiple-values-parsing.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cba5fff9
    • mitz@apple.com's avatar
      WebCore: · fdf503bb
      mitz@apple.com authored
              Reviewed by Sam Weinig.
      
              - fix <rdar://problem/5734440> Specifying a font-weight for @font-face not working
      
              Tests: fast/css/font-face-descriptor-multiple-values-parsing.html
                     fast/css/font-face-descriptor-multiple-values.html
      
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::addFontFaceRule): Changed to work with value
              lists for the descriptor properties.
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::CSSParser): Initialize m_hasFontFaceOnlyValues.
              (WebCore::CSSParser::parseValue): Added a call to
              deleteFontFaceOnlyValues() if necessary.
              (WebCore::CSSParser::parseDeclaration): Ditto.
              (WebCore::CSSParser::clearProperties): Added code to reset
              m_hasFontFaceOnlyValues to false.
              (WebCore::CSSParser::parseFontStyle): Added. If there is a single
              valid identifier other than 'all', creates a CSSPrimitiveValue and
              assigns it to the property. If 'all' is the only value, or if there are
              multiple valid identifiers that are not 'all', creates a CSSValueList
              and assigns it to the property, and sets m_hasFontFaceOnlyValues to
              true.
              (WebCore::CSSParser::parseFontVariant): Ditto.
              (WebCore::CSSParser::parseFontWeight): Ditto.
              (WebCore::CSSParser::createStyleRule): Added a call to
              deleteFontFaceOnlyValues().
              (WebCore::CSSParser::createFontFaceRule): Added code to change
              font descriptor properties that had only one value, and therefore were
              assigned a CSSPrimitiveValue, into CSSValueLists containing that value.
              (WebCore::CSSParser::deleteFontFaceOnlyValues): Added. Retroactively
              invalidates font descriptor properties that had values that are only
              allowed in @font-face. Those are identified by having CSSValueLists
              rather than CSSPrimitiveValues as their values.
              * css/CSSParser.h: Added m_hasFontFaceOnlyValues, a flag that says that
              font descriptor property values that are only valid in @font-face were
              encountered. This is used when the style declaration is created (and we
              finally know if it is @font-face or not) to delete invalid properties
              if needed.
      
      LayoutTests:
      
              Reviewed by Sam Weinig.
      
              - tests for <rdar://problem/5734440> Specifying a font-weight for @font-face not working
      
              * fast/css/font-face-descriptor-multiple-values-parsing-expected.txt: Added.
              * fast/css/font-face-descriptor-multiple-values-parsing.html: Added.
              * fast/css/font-face-descriptor-multiple-values.html: Added.
              * platform/mac/fast/css/font-face-descriptor-multiple-values-expected.checksum: Added.
              * platform/mac/fast/css/font-face-descriptor-multiple-values-expected.png: Added.
              * platform/mac/fast/css/font-face-descriptor-multiple-values-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdf503bb
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · 860df8c6
      weinig@apple.com authored
              Fix non-AllInOne builds.
      
              * kjs/JSObject.cpp:
              * kjs/JSValue.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      860df8c6
    • weinig@apple.com's avatar
      2008-06-29 Sam Weinig <sam@webkit.org> · 747bcd9a
      weinig@apple.com authored
              Build fix for Qt.
      
              * kjs/DateMath.cpp:
              * kjs/DatePrototype.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      747bcd9a
    • 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
  3. 28 Jun, 2008 11 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