1. 22 Sep, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-09-22 David Hyatt <hyatt@apple.com> · 7cb18562
      hyatt@apple.com authored
              Fix a hit testing bug where events are mistakenly passed to subframes
              if the mouse is over the border or padding area of the frame.  Add
              a boolean flag, isOverWidget(), to hit test results so that EventHandler
              can check it to tell if the mouse is really over the content box of a
              RenderWidget and not just in the border/padding area.
      
              This is not testable, since the old code properly recovered when it detected
              that the mouse was outside the bounds of the view, but this prevents
              the extra passdown from even occurring (and is basically a nice cleanup).
      
              Reviewed by Oliver Hunt
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::hitTestResultAtPoint):
              (WebCore::subframeForHitTestResult):
              (WebCore::EventHandler::handleMouseDoubleClickEvent):
              (WebCore::EventHandler::handleMouseMoveEvent):
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::handleWheelEvent):
              * page/MouseEventWithHitTestResults.h:
              (WebCore::MouseEventWithHitTestResults::isOverWidget):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::HitTestResult):
              (WebCore::HitTestResult::operator=):
              * rendering/HitTestResult.h:
              (WebCore::HitTestResult::isOverWidget):
              (WebCore::HitTestResult::setIsOverWidget):
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::nodeAtPoint):
              * rendering/RenderWidget.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cb18562
  2. 21 Sep, 2008 31 commits
    • hyatt@apple.com's avatar
      2008-09-21 David Hyatt <hyatt@apple.com> · b2bf5270
      hyatt@apple.com authored
              Rename FrameView's repaintRectangle method to repaintContentRectangle.  Make
              both it and ScrollView's updateContents method be off-limits to everyone in
              WebCore except for RenderView.
      
              Make repaintViewRectangle the only possible method for WebCore code to do
              an invalidation.  This ensures that all invalidates triggered by WebCore
              cross-platform code that cross ownerElement() boundaries are transform-aware.
      
              Make sure that iframes/frames contained inside objects that have transforms
              or reflections are not allowed to blit (this was already true for transparency).
      
              It is not possible to make a test for any of this, since iframe scrolling
              still doesn't work on Mac (since the invalidates are not being done
              through WebCore's cross-platform invalidation code but are instead going
              through NSScrollView's setNeedsDisplay still).
      
              Reviewed by Oliver Hunt
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::recomputeCaretRect):
              (WebCore::SelectionController::invalidateCaretRect):
              (WebCore::SelectionController::focusedOrActiveStateChanged):
              * page/FrameView.cpp:
              (WebCore::FrameView::repaintContentRectangle):
              (WebCore::FrameView::endDeferredRepaints):
              * page/FrameView.h:
              * platform/ScrollView.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintFillLayerExtended):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::enclosingPositionedAncestor):
              (WebCore::RenderLayer::requiresSlowRepaints):
              * rendering/RenderLayer.h:
              (WebCore::RenderLayer::hasTransform):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::paintBoxDecorations):
              (WebCore::RenderView::repaintViewRectangle):
              (WebCore::RenderView::setSelection):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2bf5270
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · a09818a7
      darin@apple.com authored
              - blind attempt to fix non-all-in-one builds
      
              * kjs/JSGlobalObject.cpp: Added includes of Arguments.h and RegExpObject.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a09818a7
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · b20dcb58
      darin@apple.com authored
              - fix debug build
      
              * kjs/StructureID.cpp:
              (JSC::StructureID::addPropertyTransition): Use typeInfo().type() instead of m_type.
              (JSC::StructureID::createCachedPrototypeChain): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b20dcb58
    • mjs@apple.com's avatar
      JavaScriptCore: · 52b6760c
      mjs@apple.com authored
      2008-09-21  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin.
              
              - introduce a TypeInfo class, for holding per-type (in the C++ class sense) date in StructureID
              https://bugs.webkit.org/show_bug.cgi?id=20981
      
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * VM/CTI.cpp:
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompilePutByIdTransition):
              * VM/Machine.cpp:
              (JSC::jsIsObjectType):
              (JSC::Machine::Machine):
              * kjs/AllInOneFile.cpp:
              * kjs/JSCell.h:
              (JSC::JSCell::isObject):
              (JSC::JSCell::isString):
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * kjs/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * kjs/JSGlobalObject.h:
              (JSC::StructureID::prototypeForLookup):
              * kjs/JSNumberCell.h:
              (JSC::JSNumberCell::createStructureID):
              * kjs/JSObject.cpp:
              (JSC::JSObject::createInheritorID):
              * kjs/JSObject.h:
              (JSC::JSObject::createStructureID):
              * kjs/JSString.h:
              (JSC::JSString::createStructureID):
              * kjs/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpMatchesArray.h: Added.
              (JSC::RegExpMatchesArray::getOwnPropertySlot):
              (JSC::RegExpMatchesArray::put):
              (JSC::RegExpMatchesArray::deleteProperty):
              (JSC::RegExpMatchesArray::getPropertyNames):
              * kjs/StructureID.cpp:
              (JSC::StructureID::StructureID):
              (JSC::StructureID::addPropertyTransition):
              (JSC::StructureID::toDictionaryTransition):
              (JSC::StructureID::changePrototypeTransition):
              (JSC::StructureID::getterSetterTransition):
              * kjs/StructureID.h:
              (JSC::StructureID::create):
              (JSC::StructureID::typeInfo):
              * kjs/TypeInfo.h: Added.
              (JSC::TypeInfo::TypeInfo):
              (JSC::TypeInfo::type):
      
      WebCore:
      
      2008-09-21  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Darin.
      
              - introduce a TypeInfo class, for holding per-type (in the C++ class sense) date in StructureID
              https://bugs.webkit.org/show_bug.cgi?id=20981
              
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::nameGetter):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::createDOMStructure):
              * bindings/js/JSDOMBinding.h:
              (WebCore::getDOMStructure):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNode::createPrototype):
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52b6760c
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · ad89d66f
      darin@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              - fix problem Maciej noticed where every JSNamedNodesCollection
                gets its own StructureID
      
              * bindings/js/JSNamedNodesCollection.cpp:
              (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Use
              getDOMStructure to get the structure.
              * bindings/js/JSNamedNodesCollection.h:
              (WebCore::JSNamedNodesCollection::createPrototype): Return the
              object prototype.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad89d66f
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · 38856d72
      darin@apple.com authored
              Reviewed by Cameron Zwarich.
      
              - fix crash logging into Gmail due to recent Arguments change
      
              * kjs/Arguments.cpp:
              (JSC::Arguments::Arguments): Fix window where mark() function could
              see d->extraArguments with uninitialized contents.
              (JSC::Arguments::mark): Check d->extraArguments for 0 to handle two
              cases: 1) Inside the constructor before it's initialized.
              2) numArguments <= numParameters.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38856d72
    • hyatt@apple.com's avatar
      2008-09-20 David Hyatt <hyatt@apple.com> · 1f2ad1e2
      hyatt@apple.com authored
              Make sure transformed scrollbars in overflow sections position
              properly.  This patch mimics the same behavior that works for
              iframes, namely making sure that the same code that dynamically
              adjusts iframe widget positions at paint time for fixed positioning
              and transforms also applies to scrollbars.  (This is as simple as passing
              in the current translation factor at paint time rather than crawling
              up the layer tree to compute a "false" absolute position.)
      
              An existing transform test covers this (although only a pixel result
              reveals the correct rendering).
      
              Reviewed by Darin Adler
      
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateLayerPositions):
              (WebCore::RenderLayer::positionOverflowControls):
              (WebCore::RenderLayer::paintOverflowControls):
              (WebCore::RenderLayer::paintLayer):
              * rendering/RenderLayer.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f2ad1e2
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · 023c3209
      darin@apple.com authored
              - fix loose end from the "duplicate constant values" patch
      
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitLoad): Add a special case for values the
              hash table can't handle.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      023c3209
    • sfalken@apple.com's avatar
      Removed unnecessary nested timer check. · 4fe10f9f
      sfalken@apple.com authored
              
              Rubber-stamped by Dan Bernstein.
      
              * platform/win/SharedTimerWin.cpp:
              (WebCore::TimerWindowWndProc):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4fe10f9f
    • mrowe@apple.com's avatar
      Fix the non-AllInOneFile build. · e8d2f739
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8d2f739
    • sfalken@apple.com's avatar
      Improve timer resolution on WinXP. · d0274690
      sfalken@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=20979
              
              Removed last-chance timer. It should not be necessary.
              Change timeEndPeriod timer to fire in 300ms instead of 20ms. Calling timeBeginPeriod/timeEndPeriod too often throws off accuracy.
              Remove Vista checks. We now run the same code on both XP and Vista.
              
              Call through to JSC::getCurrentUTCTimeWithMicroseconds from WebCore::currentTime.
              The code previously called GetSystemTimeAsFileTime, which is always low-resolution on XP, even within timeBeginPeriod(1).
              
              Reviewed by Maciej Stachowiak.
      
              * platform/win/SharedTimerWin.cpp:
              (WebCore::):
              (WebCore::TimerWindowWndProc):
              (WebCore::setSharedTimerFireTime):
              * platform/win/SystemTimeWin.cpp:
              (WebCore::currentTime):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0274690
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · 1073c225
      darin@apple.com authored
              Reviewed by Cameron Zwarich and Mark Rowe.
      
              - fix test failure caused by my recent IndexToNameMap patch
      
              * kjs/Arguments.cpp:
              (JSC::Arguments::deleteProperty): Added the accidentally-omitted
              check of the boolean result from toArrayIndex.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1073c225
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · 71610918
      darin@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              - https://bugs.webkit.org/show_bug.cgi?id=20975
                inline immediate-number case of ==
      
              * VM/CTI.h: Renamed emitJumpSlowCaseIfNotImm to
              emitJumpSlowCaseIfNotImmNum, since the old name was incorrect.
      
              * VM/CTI.cpp: Updated for new name.
              (JSC::CTI::privateCompileMainPass): Added op_eq.
              (JSC::CTI::privateCompileSlowCases): Added op_eq.
      
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_eq): Removed fast case, since it's now
              compiled.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71610918
    • eric@webkit.org's avatar
      2008-09-21 Peter Gal <galpter@inf.u-szeged.hu> · 8c150675
      eric@webkit.org authored
              Reviewed by Tim Hatcher and Eric Seidel.
      
              Fix the QT/Linux JavaScriptCore segmentation fault.
              https://bugs.webkit.org/show_bug.cgi?id=20914
      
              * wtf/ThreadingQt.cpp:
              (WTF::initializeThreading): Use currentThread() if
              platform is not a MAC (like in pre 36541 revisions)
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c150675
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · f9ef6583
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              * kjs/debugger.h: Removed some unneeded includes and declarations.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9ef6583
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · 2d1b3587
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              - https://bugs.webkit.org/show_bug.cgi?id=20972
                speed up Arguments further by eliminating the IndexToNameMap
      
              No change on SunSpider. 1.29x as fast on V8 Raytrace.
      
              * kjs/Arguments.cpp: Moved ArgumentsData in here. Eliminated the
              indexToNameMap and hadDeletes data members. Changed extraArguments into
              an OwnArrayPtr and added deletedArguments, another OwnArrayPtr.
              Replaced numExtraArguments with numParameters, since that's what's
              used more directly in hot code paths.
              (JSC::Arguments::Arguments): Pass in argument count instead of ArgList.
              Initialize ArgumentsData the new way.
              (JSC::Arguments::mark): Updated.
              (JSC::Arguments::getOwnPropertySlot): Overload for the integer form so
              we don't have to convert integers to identifiers just to get an argument.
              Integrated the deleted case with the fast case.
              (JSC::Arguments::put): Ditto.
              (JSC::Arguments::deleteProperty): Ditto.
      
              * kjs/Arguments.h: Minimized includes. Made everything private. Added
              overloads for the integral property name case. Eliminated mappedIndexSetter.
              Moved ArgumentsData into the .cpp file.
      
              * kjs/IndexToNameMap.cpp: Emptied out and prepared for deletion.
              * kjs/IndexToNameMap.h: Ditto.
      
              * kjs/JSActivation.cpp:
              (JSC::JSActivation::createArgumentsObject): Elminated ArgList.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * kjs/AllInOneFile.cpp:
              Removed IndexToNameMap.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d1b3587
    • darin@apple.com's avatar
      2008-09-21 Darin Adler <darin@apple.com> · bcb8e776
      darin@apple.com authored
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitLoad): One more tweak: Wrote this in a slightly
              clearer style.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bcb8e776
    • darin@apple.com's avatar
      2008-09-21 Judit Jasz <jasy@inf.u-szeged.hu> · a372f0a6
      darin@apple.com authored
              Reviewed and tweaked by Darin Adler.
      
              - https://bugs.webkit.org/show_bug.cgi?id=20645
                Elminate duplicate constant values in CodeBlocks.
      
              Seems to be a wash on SunSpider.
      
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitLoad): Use m_numberMap and m_stringMap to guarantee
              we emit the same JSValue* for identical numbers and strings.
              * VM/CodeGenerator.h: Added overload of emitLoad for const Identifier&.
              Add NumberMap and IdentifierStringMap types and m_numberMap and m_stringMap.
              * kjs/nodes.cpp:
              (JSC::StringNode::emitCode): Call the new emitLoad and let it do the
              JSString creation.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a372f0a6
    • darin@apple.com's avatar
      2008-09-21 Paul Pedriana <webkit@pedriana.com> · cc80f8f5
      darin@apple.com authored
              Reviewed and tweaked by Darin Adler.
      
              - https://bugs.webkit.org/show_bug.cgi?id=16925
                Fixed lack of Vector buffer alignment for both GCC and MSVC.
                Since there's no portable way to do this, for now we don't support
                other compilers.
      
              * wtf/Vector.h: Added WTF_ALIGH_ON, WTF_ALIGNED, AlignedBufferChar, and AlignedBuffer.
              Use AlignedBuffer insteadof an array of char in VectorBuffer.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc80f8f5
    • darin@apple.com's avatar
      JavaScriptCore: · 19afd1c3
      darin@apple.com authored
      2008-09-21  Gabor Loki  <loki@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              - https://bugs.webkit.org/show_bug.cgi?id=19408
                Add lightweight constant folding to the parser for *, /, + (only for numbers), <<, >>, ~ operators.
      
              1.008x as fast on SunSpider.
      
              * kjs/grammar.y:
              (makeNegateNode): Fold if expression is a number > 0.
              (makeBitwiseNotNode): Fold if expression is a number.
              (makeMultNode): Fold if expressions are both numbers.
              (makeDivNode): Fold if expressions are both numbers.
              (makeAddNode): Fold if expressions are both numbers.
              (makeLeftShiftNode): Fold if expressions are both numbers.
              (makeRightShiftNode): Fold if expressions are both numbers.
      
      LayoutTests:
      
      2008-09-21  Gabor Loki  <loki@inf.u-szeged.hu>
      
              Reviewed and tweaked by Darin Adler.
      
              - https://bugs.webkit.org/show_bug.cgi?id=19408
                Add test case for constant folding.
      
              * fast/js/constant-folding-expected.txt: Added.
              * fast/js/constant-folding.html: Added.
              * fast/js/resources/constant-folding.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19afd1c3
    • mjs@apple.com's avatar
      2008-09-21 Maciej Stachowiak <mjs@apple.com> · 4032873b
      mjs@apple.com authored
              Reviewed by Oliver.
              
              - speed up === operator by generating inline machine code for the fast paths
              https://bugs.webkit.org/show_bug.cgi?id=20820
      
              * VM/CTI.cpp:
              (JSC::CTI::emitJumpSlowCaseIfNotImmediateNumber):
              (JSC::CTI::emitJumpSlowCaseIfNotImmediateNumbers):
              (JSC::CTI::emitJumpSlowCaseIfNotImmediates):
              (JSC::CTI::emitTagAsBoolImmediate):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              * VM/CTI.h:
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_stricteq):
              * masm/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::sete_r):
              (JSC::X86Assembler::setz_r):
              (JSC::X86Assembler::movzbl_rr):
              (JSC::X86Assembler::emitUnlinkedJnz):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4032873b
    • eric@webkit.org's avatar
      2008-09-21 Dirk Schulze <vbs85@gmx.de> · c3431284
      eric@webkit.org authored
              Reviewed by eseidel.  Landed by eseidel.
      
              All platforms use the DashArray in the GraphicsContext.
      
              * svg/graphics/SVGPaintServer.h:
              * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp:
              (WebCore::SVGPaintServerGradient::setup):
              * svg/graphics/cairo/SVGPaintServerPatternCairo.cpp:
              (WebCore::SVGPaintServerPattern::setup):
              * svg/graphics/cairo/SVGPaintServerSolidCairo.cpp:
              (WebCore::SVGPaintServerSolid::setup):
              * svg/graphics/qt/SVGPaintServerGradientQt.cpp:
              (WebCore::SVGPaintServerGradient::setup):
              * svg/graphics/qt/SVGPaintServerQt.cpp:
              * svg/graphics/qt/SVGPaintServerSolidQt.cpp:
              (WebCore::SVGPaintServerSolid::setup):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3431284
    • cwzwarich@webkit.org's avatar
      2008-09-21 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 6379f586
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Free memory allocated for extra arguments in the destructor of the
              Arguments object.
      
              * kjs/Arguments.cpp:
              (JSC::Arguments::~Arguments):
              * kjs/Arguments.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6379f586
    • cwzwarich@webkit.org's avatar
      2008-09-21 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 4e9a20cd
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Bug 20815: 'arguments' object creation is non-optimal
              <https://bugs.webkit.org/show_bug.cgi?id=20815>
      
              Fix our inefficient way of creating the arguments object by only
              creating named properties for each of the arguments after a use of the
              'delete' statement. This patch also speeds up access to the 'arguments'
              object slightly, but it still does not use the array fast path for
              indexed access that exists for many opcodes.
      
              This is about a 20% improvement on the V8 Raytrace benchmark, and a 1.5%
              improvement on the Earley-Boyer benchmark, which gives a 4% improvement
              overall.
      
              JavaScriptCore:
      
              * kjs/Arguments.cpp:
              (JSC::Arguments::Arguments):
              (JSC::Arguments::mark):
              (JSC::Arguments::getOwnPropertySlot):
              (JSC::Arguments::put):
              (JSC::Arguments::deleteProperty):
              * kjs/Arguments.h:
              (JSC::Arguments::ArgumentsData::ArgumentsData):
              * kjs/IndexToNameMap.h:
              (JSC::IndexToNameMap::size):
              * kjs/JSActivation.cpp:
              (JSC::JSActivation::createArgumentsObject):
              * kjs/JSActivation.h:
              (JSC::JSActivation::uncheckedSymbolTableGet):
              (JSC::JSActivation::uncheckedSymbolTableGetValue):
              (JSC::JSActivation::uncheckedSymbolTablePut):
              * kjs/JSFunction.h:
              (JSC::JSFunction::numParameters):
      
              LayoutTests:
      
              * fast/js/arguments-expected.txt: Added.
              * fast/js/arguments.html: Added.
              * fast/js/resources/arguments.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e9a20cd
    • eric@webkit.org's avatar
      2008-09-21 Dirk Schulze <vbs85@gmx.de> · 3e96c486
      eric@webkit.org authored
              Reviewed by eseidel.  Landed by eseidel.
      
              Moved DashArray to GraphicsContext.
      
              * GNUmakefile.am:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/graphics/DashArray.h: Added.
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::setLineDash):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::setLineDash):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::setLineDash):
              * svg/graphics/SVGPaintServer.cpp:
              (WebCore::applyStrokeStyleToContext):
              * svg/graphics/SVGPaintServer.h:
              * svg/graphics/cg/CgSupport.cpp:
              * svg/graphics/cg/CgSupport.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e96c486
    • mitz@apple.com's avatar
      Reviewed by Mark Rowe. · 9138ecad
      mitz@apple.com authored
              - fix linker warnings
      
              * WebCore.base.exp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9138ecad
    • darin@apple.com's avatar
      2008-09-20 Darin Adler <darin@apple.com> · c3215136
      darin@apple.com authored
              - another try at fixing Qt
      
              * bridge/qt/qt_runtime.cpp: "using namespce WebCore"
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3215136
    • darin@apple.com's avatar
      2008-09-20 Darin Adler <darin@apple.com> · b149177f
      darin@apple.com authored
              - blind attempt to fix Qt build
      
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::convertQVariantToValue): Use regExpStructure instead
              of regExpPrototype to make a RegExpObject. There should really be
              some sort of public helper function for this. Same thing for
              DateInstance and dateStructure. For JSObject, use constructEmptyObject.
              (JSC::Bindings::):
              (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): Use getDOMStructure.
              It is not correct to do this inside the constructor because it could
              cause a garbage collect while the QtRuntimeMethod object is half-
              allocated, which could lead to a crash; note that RuntimeMethod,
              QtRuntimeObjectImp, and RuntimeObjectImp have the same bug.
              * bridge/qt/qt_runtime.h: Add s_info and createPrototype.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b149177f
    • collinj@webkit.org's avatar
      2008-09-20 Collin Jackson <collinj@webkit.org> · 8e01a435
      collinj@webkit.org authored
              Prefetch DNS for hyperlinks that the user mouses over.
      
              https://bugs.webkit.org/show_bug.cgi?id=20931
      
              Reviewed by Sam Weinig.
      
              * page/Chrome.cpp:
              (WebCore::Chrome::mouseDidMoveOverElement):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e01a435
    • darin@apple.com's avatar
      2008-09-20 Darin Adler <darin@apple.com> · c930aa38
      darin@apple.com authored
              Reviewed by Mark Rowe.
      
              - fix crash seen on buildbot
      
              * kjs/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::mark): Add back mark of arrayPrototype,
              deleted by accident in my recent check-in.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c930aa38
    • mjs@apple.com's avatar
      2008-09-20 Maciej Stachowiak <mjs@apple.com> · 4cfb9712
      mjs@apple.com authored
              Not reviewed, build fix.
              
              - speculative fix for non-AllInOne builds
      
              * kjs/operations.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cfb9712
  3. 20 Sep, 2008 8 commits
    • mjs@apple.com's avatar
      2008-09-20 Maciej Stachowiak <mjs@apple.com> · 436e591e
      mjs@apple.com authored
              Reviewed by Darin.
              
              - assorted optimizations to === and !== operators
              (work towards <https://bugs.webkit.org/show_bug.cgi?id=20820>)
              
              2.5% speedup on earley-boyer test
      
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_stricteq): Use inline version of
              strictEqualSlowCase; remove unneeded exception check.
              (JSC::Machine::cti_op_nstricteq): ditto
              * kjs/operations.cpp:
              (JSC::strictEqual): Use strictEqualSlowCaseInline
              (JSC::strictEqualSlowCase): ditto
              * kjs/operations.h:
              (JSC::strictEqualSlowCaseInline): Version of strictEqualSlowCase that can be inlined,
              since the extra function call indirection is a lose for CTI.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      436e591e
    • darin@apple.com's avatar
      JavaScriptCore: · 8281d838
      darin@apple.com authored
      2008-09-20  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              - finish https://bugs.webkit.org/show_bug.cgi?id=20858
                make each distinct C++ class get a distinct JSC::Structure
      
              This also includes some optimizations that make the change an overall
              small speedup. Without those it was a bit of a slowdown.
      
              * API/JSCallbackConstructor.cpp:
              (JSC::JSCallbackConstructor::JSCallbackConstructor): Take a structure.
              * API/JSCallbackConstructor.h: Ditto.
              * API/JSCallbackFunction.cpp:
              (JSC::JSCallbackFunction::JSCallbackFunction): Pass a structure.
              * API/JSCallbackObject.h: Take a structure.
              * API/JSCallbackObjectFunctions.h:
              (JSC::JSCallbackObject::JSCallbackObject): Ditto.
      
              * API/JSClassRef.cpp:
              (OpaqueJSClass::prototype): Pass in a structure. Call setPrototype
              if there's a custom prototype involved.
              * API/JSObjectRef.cpp:
              (JSObjectMake): Ditto.
              (JSObjectMakeConstructor): Pass in a structure.
      
              * JavaScriptCore.exp: Updated.
      
              * VM/Machine.cpp:
              (JSC::jsLess): Added a special case for when both arguments are strings.
              This avoids converting both strings to with UString::toDouble.
              (JSC::jsLessEq): Ditto.
              (JSC::Machine::privateExecute): Pass in a structure.
              (JSC::Machine::cti_op_construct_JSConstruct): Ditto.
              (JSC::Machine::cti_op_new_regexp): Ditto.
              (JSC::Machine::cti_op_is_string): Ditto.
              * VM/Machine.h: Made isJSString public so it can be used in the CTI.
      
              * kjs/Arguments.cpp:
              (JSC::Arguments::Arguments): Pass in a structure.
      
              * kjs/JSCell.h: Mark constructor explicit.
      
              * kjs/JSGlobalObject.cpp:
              (JSC::markIfNeeded): Added an overload for marking structures.
              (JSC::JSGlobalObject::reset): Eliminate code to set data members to
              zero. We now do that in the constructor, and we no longer use this
              anywhere except in the constructor. Added code to create structures.
              Pass structures rather than prototypes when creating objects.
              (JSC::JSGlobalObject::mark): Mark the structures.
      
              * kjs/JSGlobalObject.h: Removed unneeded class declarations.
              Added initializers for raw pointers in JSGlobalObjectData so
              everything starts with a 0. Added structure data and accessor
              functions.
      
              * kjs/JSImmediate.cpp:
              (JSC::JSImmediate::nonInlineNaN): Added.
              * kjs/JSImmediate.h:
              (JSC::JSImmediate::toDouble): Rewrote to avoid PIC branches.
      
              * kjs/JSNumberCell.cpp:
              (JSC::jsNumberCell): Made non-inline to avoid PIC branches
              in functions that call this one.
              (JSC::jsNaN): Ditto.
              * kjs/JSNumberCell.h: Ditto.
      
              * kjs/JSObject.h: Removed constructor that takes a prototype.
              All callers now pass structures.
      
              * kjs/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::constructArrayWithSizeQuirk):
              * kjs/ArrayConstructor.h:
              * kjs/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::ArrayPrototype):
              * kjs/ArrayPrototype.h:
              * kjs/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.cpp:
              (JSC::BooleanObject::BooleanObject):
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * kjs/BooleanPrototype.h:
              * kjs/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              (JSC::constructDate):
              * kjs/DateConstructor.h:
              * kjs/DateInstance.cpp:
              (JSC::DateInstance::DateInstance):
              * kjs/DateInstance.h:
              * kjs/DatePrototype.cpp:
              (JSC::DatePrototype::DatePrototype):
              * kjs/DatePrototype.h:
              * kjs/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              (JSC::constructError):
              * kjs/ErrorConstructor.h:
              * kjs/ErrorInstance.cpp:
              (JSC::ErrorInstance::ErrorInstance):
              * kjs/ErrorInstance.h:
              * kjs/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * kjs/ErrorPrototype.h:
              * kjs/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * kjs/FunctionConstructor.h:
              * kjs/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              (JSC::FunctionPrototype::addFunctionProperties):
              * kjs/FunctionPrototype.h:
              * kjs/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              * kjs/GlobalEvalFunction.h:
              * kjs/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * kjs/InternalFunction.h:
              (JSC::InternalFunction::InternalFunction):
              * kjs/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::constructEmptyArray):
              (JSC::constructArray):
              * kjs/JSArray.h:
              * kjs/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::construct):
              * kjs/JSObject.cpp:
              (JSC::constructEmptyObject):
              * kjs/JSString.cpp:
              (JSC::StringObject::create):
              * kjs/JSWrapperObject.h:
              * kjs/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * kjs/MathObject.h:
              * kjs/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              (JSC::NativeErrorConstructor::construct):
              * kjs/NativeErrorConstructor.h:
              * kjs/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * kjs/NativeErrorPrototype.h:
              * kjs/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              (JSC::constructWithNumberConstructor):
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              (JSC::NumberObject::NumberObject):
              (JSC::constructNumber):
              (JSC::constructNumberFromImmediateNumber):
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * kjs/NumberPrototype.h:
              * kjs/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::constructObject):
              * kjs/ObjectConstructor.h:
              * kjs/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * kjs/ObjectPrototype.h:
              * kjs/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * kjs/PrototypeFunction.h:
              * kjs/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::RegExpMatchesArray::RegExpMatchesArray):
              (JSC::constructRegExp):
              * kjs/RegExpConstructor.h:
              * kjs/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject):
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * kjs/RegExpPrototype.h:
              * kjs/Shell.cpp:
              (GlobalObject::GlobalObject):
              * kjs/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              (JSC::constructWithStringConstructor):
              * kjs/StringConstructor.h:
              * kjs/StringObject.cpp:
              (JSC::StringObject::StringObject):
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
              * kjs/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * kjs/StringPrototype.h:
              Take and pass structures.
      
      WebCore:
      
      2008-09-20  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              - finish https://bugs.webkit.org/show_bug.cgi?id=20858
                make each distinct C++ class get a distinct JSC::Structure
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::nameGetter): Pass in a structure
              ID. Note that this makes a new structure every time -- we could
              optimize this slightly be caching and reusing a single one.
      
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::RuntimeMethod): Create a unique structure using
              getDOMStructure.
              * bridge/runtime_method.h:
              (JSC::RuntimeMethod::createPrototype): Added createPrototype so
              getDOMStructure will work.
      
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell): Initialize m_window to
              0; needed in case garbage collection happens while creating the
              JSDOMWindow.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8281d838
    • mrowe@apple.com's avatar
    • mitz@apple.com's avatar
      Added Radar link · c3dfbacf
      mitz@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3dfbacf
    • mitz@apple.com's avatar
      Reviewed by Eric Seidel. · f674f4fa
      mitz@apple.com authored
              - fix https://bugs.webkit.org/show_bug.cgi?id=20950
                Reproducible assertion failure running svg/custom/acid3-test-77.html multiple times under guard malloc
      
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): Changed to
              not include the first character in the extraCharsAvailable count.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f674f4fa
    • mitz@apple.com's avatar
      - Mac build fix · 9b3ac792
      mitz@apple.com authored
              * WebCore.xcodeproj/project.pbxproj: Made DashArray.h a private header.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b3ac792
    • mitz@apple.com's avatar
      Added a file that was missing from r36719 · e45aa4fb
      mitz@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e45aa4fb
    • kevino@webkit.org's avatar
      Add missing bug reference to ChangeLog. · 6f86cbb7
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f86cbb7