1. 31 May, 2008 2 commits
    • timothy@apple.com's avatar
      Made the starting line number of scripts be 1-based throughout the engine. · 82a000d6
      timothy@apple.com authored
      JavaScriptCore:
      
      2008-05-30  Timothy Hatcher  <timothy@apple.com>
      
              Made the starting line number of scripts be 1-based throughout the engine.
              This cleans up script line numbers so they are all consistent now and fixes
              some cases where script execution was shown as off by one line in the debugger.
      
              No change in SunSpider.
      
              Reviewed by Oliver Hunt.
      
              * API/minidom.c:
              (main): Pass a line number of 1 instead of 0 to parser().parse().
              * API/testapi.c:
              (main): Ditto. And removes a FIXME and changed an assertEqualsAsNumber
              to use 1 instead of 2 for the line number.
              * VM/Machine.cpp:
              (KJS::callEval): Pass a line number of 1 instead of 0.
              (KJS::Machine::debug): Use firstLine for WillExecuteProgram instead of
              lastLine. Use lastLine for DidExecuteProgram instead of firstLine.
              * kjs/DebuggerCallFrame.cpp:
              (KJS::DebuggerCallFrame::evaluate): Pass a line number of 1 instead of
              0 to parser().parse().
              * kjs/Parser.cpp:
              (KJS::Parser::parse): ASSERT startingLineNumber is greatter than 0. Change
              the startingLineNumber to be 1 if it was less than or equal to 0. This is needed
              for release builds to maintain compatibility with the JavaScriptCore API.
              * kjs/function.cpp:
              (KJS::globalFuncEval): Pass a line number of 1 instead of 0 to parser().parse().
              * kjs/function_object.cpp:
              (FunctionObjectImp::construct): Pass a line number of 1 instead of 0 to construct().
              * kjs/lexer.cpp:
              (Lexer::setCode): Made yylineno = startingLineNumber instead of adding 1.
              * kjs/testkjs.cpp:
              (functionRun): Pass a line number of 1 instead of 0 to Interpreter::evaluate().
              (functionLoad): Ditto.
              (prettyPrintScript): Ditto.
              (runWithScripts): Ditto.
              * profiler/Profiler.cpp:
              (WebCore::createCallIdentifier): Removed a plus 1 of startingLineNumber.
      
      WebCore:
      
      2008-05-30  Timothy Hatcher  <timothy@apple.com>
      
              Made the starting line number of scripts be 1-based throughout the engine.
              This cleans up script line numbers so they are all consistent now and fixes
              some cases where script execution was shown as off by one line in the debugger.
      
              Doing this also exposed a bug where JSLazyEventListener created in XHML or SVG
              documents would always have a line number of 0. So this change fixed that bug
              to pass all the SVG and XHTML tests.
      
              All layout tests pass.
      
              Reviewed by Oliver Hunt.
      
              * bindings/js/kjs_events.cpp:
              (WebCore::JSLazyEventListener::JSLazyEventListener): Set the line number to 1
              if it was passed in as 0. This can happen when listeners are created with
              a setAttribute call from JavaScript.
              (WebCore::JSLazyEventListener::parseCode): Add a FIXME about the URL being
              incorrect when listeners are created with a setAttribute call from JavaScript.
              * bindings/js/kjs_events.h: Remove the default value for lineNumber, since no
              callers need it.
              * bindings/objc/WebScriptObject.mm:
              (-[WebScriptObject evaluateWebScript:]): Pass a line number of 1 instead of 0
              to Interpreter::evaluate().
              * bridge/NP_jsobject.cpp:
              (_NPN_Evaluate): Ditto.
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::eval): Ditto.
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::startElementNs): Call KJSProxy::setEventHandlerLineno()
              around the call to handleElementAttributes, so any JSLazyEventListener created
              from those attributes have line numbers.
              (WebCore::XMLTokenizer::endElementNs): Remove a minus 1 of the line number.
              (WebCore::XMLTokenizer::notifyFinished): Pass a line number of 1 instead of 0.
              (WebCore::XMLTokenizer::parseEndElement): Remove a minus 1 of the line number.
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::evaluateScript): Add a FIXME about the starting
              line number being incorrect in some cases when this function is called.
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::parseSpecial): Add a plus 1 to the line number when
              setting scriptStartLineno so it is 1-based. Same for calling setEventHandlerLineno().
              (WebCore::HTMLTokenizer::processToken): Ditto.
              * html/HTMLTokenizer.h: Change the default line number on scriptExecution() to 1 from 0.
              * loader/FrameLoader.cpp:
              (FrameLoader::executeIfJavaScriptURL): Pass a line number of 1 instead of 0 to executeScript().
      
      WebKitTools:
      
      2008-05-30  Timothy Hatcher  <timothy@apple.com>
      
              Made the starting line number of scripts be 1-based throughout the engine.
              This cleans up script line numbers so they are all consistent now.
      
              Reviewed by Oliver Hunt.
      
              * DumpRenderTree/mac/ObjCController.m:
              (runJavaScriptThread): Pass a line number of 1 instead of 0 to JSEvaluateScript.
              * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp:
              (runJavaScriptThread): Ditto.
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (runJavaScriptThread): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82a000d6
    • timothy@apple.com's avatar
      Fixes the regression where image resources don't have a preview icon. · f8375ffb
      timothy@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=18500
      
              Reviewed by Adam Roben.
      
              * page/inspector/ResourcesPanel.js:
              (WebInspector.ResourceSidebarTreeElement): Call createIconElement before
              calling the superclass.
              (WebInspector.ResourceSidebarTreeElement.prototype.createIconElement):
              Create an iconElement, if the category is images then make a div that
              contains a preview image. Otherwise just make an img element. If there
              was a previous iconElement, then replace it.
              (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
              createIconElement if the category changed.
              * page/inspector/SidebarTreeElement.js:
              (WebInspector.SidebarTreeElement): Create an iconElement if one hasn't
              been made already by a subclass.
              (WebInspector.SidebarTreeElement.prototype.onattach): Append the iconElement
              instead of creating one each time.
              * page/inspector/inspector.css: New and updated style rules.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8375ffb
  2. 30 May, 2008 13 commits
    • mjs@apple.com's avatar
      2008-05-30 Maciej Stachowiak <mjs@apple.com> · 94872a04
      mjs@apple.com authored
              Reviewed by Oliver (earlier version reviewed by Alexey).
      
              - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
              https://bugs.webkit.org/show_bug.cgi?id=19285
              
              ("This Time for Sure" Edition)
      
              I'm pretty sure this fixes it but I have not been able to
              reproduce and am unsure if my theory of the bug is right.
      
              I belive the bug was because JSDOMWindowBase accessed
              JSDOMWindowShell in its destructor to remove itself from a
              hashtable, but GC destructor order is not guaranteed, so the
              hashtable may have been freed already. This patch changes things
              so that a non-GC object (the KJSProxy) does the tracking of live
              window objects for a frame. JSDOMWindowBase can null check the frame
              pointer to verify if it is still good.
              
              In addition, we must create a similar setup between DOMWindow and
              Frame; since the DOMWindow of a given frame can now change over
              time, we must ensure that the Frame disconnects every live
              DOMWindow when destroyed, not just the last.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              (WebCore::KJSProxy::updateDocument):
              * bindings/js/kjs_proxy.h:
              (WebCore::KJSProxy::clearFormerWindow):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::~DOMWindow):
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::setDocument):
              (WebCore::Frame::clearDOMWindow):
              (WebCore::Frame::clearFormerDOMWindow):
              * page/Frame.h:
              * page/FramePrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94872a04
    • mitz@apple.com's avatar
      WebCore: · 88c7b054
      mitz@apple.com authored
              Reviewed by Darin Adler and Dave Hyatt.
      
              - eliminate excessive repainting when an object's final position
                after layout is unchanged
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutBlockChildren): Removed the full repaint
              for the case that the final position is unchanged but the position at
              which an intermediate layout occurred was different. Any repainting
              done during the intermediate layout would have happened at the object's
              initial (and also final) coordinates, since layoutDelta is factored
              into repaint rect calculations.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - updated pixel results for "eliminate excessive repainting when an
                object's final position after layout is unchanged"
      
              * platform/mac/fast/repaint/intermediate-layout-position-clip-expected.checksum:
              * platform/mac/fast/repaint/intermediate-layout-position-clip-expected.png:
              * platform/mac/fast/repaint/intermediate-layout-position-expected.checksum:
              * platform/mac/fast/repaint/intermediate-layout-position-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88c7b054
    • justin.garcia@apple.com's avatar
      2008-05-29 Justin Garcia <justin.garcia@apple.com> · 2ca11c14
      justin.garcia@apple.com authored
              Reviewed by Darin.
              
              <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail
              
              AppKit started putting PNG instead of PICT onto the pasteboard for screen 
              captures.  Added support for PNG with kUTTypePNG.  Tiger doesn't support
              setting and retrieving pasteboard types with UTIs, but we don't know of any
              applications on Tiger that put only PNG on the pasteboard.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
              (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ca11c14
    • ap@webkit.org's avatar
      Reviewed by Darin. · c4ee7989
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=19180
              speed up SunSpider by optimizing immediate number cases
      
              Also fixed a JavaScriptCore regression seen on PowerPC - we didn't clip left shift
              parameter to 0...31.
      
              0.5% improvement on SunSpider overall, although a 8.5 regression on bitops-3bit-bits-in-byte.
      
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
              Added fast paths for >>> and <<.
      
              * kjs/JSImmediate.h:
              (KJS::JSImmediate::toTruncatedUInt32): Added. Same as getTruncatedInt32, but casts the result
              to unsigned.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4ee7989
    • cfleizach@apple.com's avatar
      bd2b3c15
    • jmalonzo@webkit.org's avatar
      2008-05-30 Carlos Martín Nieto <carlos@cmartin.tk> · da33b486
      jmalonzo@webkit.org authored
              Reviewed by Alp Toker.
      
              http://bugs.webkit.org/show_bug.cgi?id=18383
              [GTK] The "hovering-over-link" signal arguments aren't documented.
      
              * webkit/webkitwebview.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da33b486
    • hausmann@webkit.org's avatar
      2008-05-30 Tor Arne Vestbø <tavestbo@trolltech.com> · 78025d5d
      hausmann@webkit.org authored
              Reviewed by Simon.
      
              Fix the build dependencies for the Qt build. Don't generate
              SVGCSSPropertyNames.cpp for every build.
      
              * WebCore.pro: The output file was renamed, so the compiler rule needs
              to be adjusted in order for qmake to generate correct depdencies.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78025d5d
    • mjs@apple.com's avatar
      2008-05-30 Maciej Stachowiak <mjs@apple.com> · 7a7cf5aa
      mjs@apple.com authored
              Revert fix for 19285, it just caused more crashes and I need time
              to fix it properly.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::updateDocument):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::setWindow):
              (WebCore::JSDOMWindowShell::clearFormerWindow):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              * bindings/js/kjs_proxy.h:
              * page/Frame.cpp:
              (WebCore::Frame::setDocument):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a7cf5aa
    • hausmann@webkit.org's avatar
      2008-05-30 Adam Treat <treat@kde.org> · 0b0004eb
      hausmann@webkit.org authored
              Reviewed by Simon.
      
              Fix a huge memory leak by ensuring that on application shutdown
              the shared timer is fired one last time if it is active. This
              ensures that the GCController timer is fired at the end to free
              references to JavaScript objects.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b0004eb
    • ap@webkit.org's avatar
      Reviewed by Darin. · 417ecd66
      ap@webkit.org authored
              http://bugs.webkit.org/show_bug.cgi?id=7466
              <rdar://problem/4657563> Use of Ctrl as access key modifier conflicts with Mac OS X
              emacs-style keybindings
      
      WebCore:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleAccessKey): Use Ctrl+Option for access keys on Mac OS X.
      
      LayoutTests:
              * fast/events/access-key-self-destruct.html:
              * fast/forms/access-key.html:
              * fast/forms/focus-selection-input-expected.txt:
              * fast/forms/focus-selection-input.html:
              * fast/forms/legend-access-key.html:
              * fast/forms/select-accesskey.html:
              Updated tests to keep passing.
      
              * fast/forms/select-accesskey-expected.txt: Added.
              * fast/forms/select-accesskey.html:
              * platform/mac/fast/forms/select-accesskey-expected.checksum: Removed.
              * platform/mac/fast/forms/select-accesskey-expected.png: Removed.
              * platform/mac/fast/forms/select-accesskey-expected.txt: Removed.
              Updated to keep passing, made text-only.
      
              * fast/forms/focus-selection-textarea.html:
              * fast/forms/focus-selection-textarea-expected.txt:
              Added missing platform-specific logic.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      417ecd66
    • ap@webkit.org's avatar
      Reviewed by Oliver Hunt. · 655b491d
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=19180
              speed up SunSpider by optimizing immediate number cases
      
              Also fixed three JavaScriptCore regressions seen on PowerPC - we didn't clip right shift
              parameter to 0...31.
      
              1.6% improvement on SunSpider, without significant regressions on any tests.
      
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
              Added fast paths for >>, ==, ===, !=, !==. Changed order of memory accesses in many
              cases, making them less dependent on gcc's ability to properly assign registers. With this,
              I could move exception checks back into slow code paths, and saw less randomness in general.
      
              * kjs/JSImmediate.h:
              (KJS::JSImmediate::rightShiftImmediateNumbers):
              Added.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      655b491d
    • mjs@apple.com's avatar
      2008-05-30 Maciej Stachowiak <mjs@apple.com> · b6aa1156
      mjs@apple.com authored
              Reviewed by Alexey.
              
              - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
              https://bugs.webkit.org/show_bug.cgi?id=19285
      
              I'm pretty sure this fixes it but I have not been able to
              reproduce and am unsure if my theory of the bug is right.
      
              I belive the bug was because JSDOMWindowBase accessed
              JSDOMWindowShell in its destructor to remove itself from a
              hashtable, but GC destructor order is not guaranteed, so the
              hashtable may have been freed already. This patch changes things
              so that a non-GC object (the KJSProxy) does the tracking of live
              window objects for a frame. JSDOMWindowBase can null check the frame
              pointer to verify if it is still good.
              
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              (WebCore::KJSProxy::updateDocument):
              * bindings/js/kjs_proxy.h:
              (WebCore::KJSProxy::clearFormerWindow):
              * page/Frame.cpp:
              (WebCore::Frame::setDocument):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6aa1156
    • cfleizach@apple.com's avatar
      <rdar://problem/5091386> Seed: VO reads form labels twice in Safari · ea61d43d
      cfleizach@apple.com authored
      <rdar://problem/4783102> Radio button/checkbox embedded with <label> tag should combine the text and the label as a single element
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea61d43d
  3. 29 May, 2008 25 commits
    • mjs@apple.com's avatar
      JavaScriptCore: · 7374be5d
      mjs@apple.com authored
      2008-05-29  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Oliver.
      
              - fixed <rdar://problem/5972943> REGRESSION(r33979): Flash clips do not play on cnn.com
              
              Finally blocks could clobber registers that had to remain live
              until they returned. This patch takes a conservative approach and
              makes sure that finally blocks do not reuse any registers that
              were previously allocated for the function. In the future this
              could probably be tightened up to be less profligate with the
              register allocation.
              
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::highestUsedRegister):
              * VM/CodeGenerator.h:
              * kjs/nodes.cpp:
              (KJS::TryNode::emitCode):
      
      LayoutTests:
      
      2008-05-29  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Oliver. Test by Geoff Garen.
              
              - fixed <rdar://problem/5972943> REGRESSION(r33979): Flash clips do not play on cnn.com
      
              * fast/js/finally-codegen-failure-expected.txt: Added.
              * fast/js/finally-codegen-failure.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7374be5d
    • alp@webkit.org's avatar
      2008-05-29 Marco Barisione <marco@collabora.co.uk> · fef55edf
      alp@webkit.org authored
              Reviewed (and tweaked) by Alp Toker.
      
              http://bugs.webkit.org/show_bug.cgi?id=18281
              [GTK] add functions to set/get the zoom level
      
              * webkit/webkitwebsettings.cpp:
              (_WebKitWebSettingsPrivate::):
              (_WebKitWebSettingsPrivate::webkit_web_settings_class_init):
              (_WebKitWebSettingsPrivate::webkit_web_settings_set_property):
              (_WebKitWebSettingsPrivate::webkit_web_settings_get_property):
              * webkit/webkitwebview.cpp: Add functions to get and set the zoom
              level.
              * webkit/webkitwebview.h: Ditto.
              * webkit/webkitprivate.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fef55edf
    • mrowe@apple.com's avatar
      Versioning. · 7cd7868f
      mrowe@apple.com authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7cd7868f
    • aroben@apple.com's avatar
      Update PrettyPatch directory list · fecbee4c
      aroben@apple.com authored
              * PrettyPatch/PrettyPatch.rb:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fecbee4c
    • timothy@apple.com's avatar
      Removes a use of the internal _childrenListNode property by adding · 79842459
      timothy@apple.com authored
              a getter/setter for smallChildren to SidebarSectionTreeElement.
      
              Reviewed by Adam Roben.
      
              * page/inspector/ResourcesPanel.js:
              (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
              Toggle smallChildren on the resourcesTreeElement instead of setting
              the style class directly.
              * page/inspector/SidebarTreeElement.js:
              (WebInspector.SidebarSectionTreeElement.prototype.smallChildren):
              Sets or removes the small class on the _childrenListNode.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79842459
    • ggaren@apple.com's avatar
      Geoffrey Garen <ggaren@apple.com> · 387d45ab
      ggaren@apple.com authored
              Reviewed by Adam Roben.
      
              Fixed VCSUtils.pm to work with git repositories inside symlinks.
      
              * Scripts/VCSUtils.pm: Compute a relative path from the git repository
              root, instead of the root of the filesystem, to work around a bug in
              abs2rel when traversing symlinked home directories.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      387d45ab
    • timothy@apple.com's avatar
      Fixes a bug where the className would be reset for Resource · f5b7c11a
      timothy@apple.com authored
      tree elements and the selected state would be lost. This could
      happen when sorting the resources.
      
      https://bugs.webkit.org/show_bug.cgi?id=19211
      
      Reviewed by Adam Roben.
      
      * page/inspector/ResourcesPanel.js:
      (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
      removeMatchingStyleClasses to remove previous category classes instead
      of setting the whole className directly.
      * page/inspector/utilities.js:
      (Element.prototype.removeStyleClass): Moved code to
      removeMatchingStyleClasses and call removeMatchingStyleClasses.
      (Element.prototype.removeMatchingStyleClasses): Added. Code moved from
      removeStyleClass and don't escape the string.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5b7c11a
    • hyatt@apple.com's avatar
      2008-05-29 David Hyatt <hyatt@apple.com> · 7d2be025
      hyatt@apple.com authored
              Improve the performance of the GUIMark benchmark by 2x in the CoreGraphics code path.
      
              Whenever a foreground image changes size rapidly, we will now dynamically shift into rendering it
              using low quality scaling.  Once the animation completes, the image will repaint at high quality.
              Scaled images will still render at high quality by default, only shifting into low quality if
              the scale factor is rapidly changing.  This change raises GUIMark from 21fps to 34fps on my machine.
      
              Rewrite the Image draw method to avoid the use of throwaway CG subimages.  Instead the entire image is
              always drawn (with the appropriate clip and scale set up to make sure the correct subimage portion shows up
              in the destination rect).  This change raises GUIMark from 34fps to 43fps on my machine.
      
              Reviewed by Darin
      
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawImage):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImageScaleData::RenderImageScaleData):
              (WebCore::RenderImageScaleData::~RenderImageScaleData):
              (WebCore::RenderImageScaleData::size):
              (WebCore::RenderImageScaleData::time):
              (WebCore::RenderImageScaleData::useLowQualityScale):
              (WebCore::RenderImageScaleData::hiqhQualityRepaintTimer):
              (WebCore::RenderImageScaleData::setSize):
              (WebCore::RenderImageScaleData::setTime):
              (WebCore::RenderImageScaleData::setUseLowQualityScale):
              (WebCore::RenderImageScaleObserver::shouldImagePaintAtLowQuality):
              (WebCore::RenderImageScaleObserver::imageDestroyed):
              (WebCore::RenderImageScaleObserver::highQualityRepaintTimerFired):
              (WebCore::RenderImage::highQualityRepaintTimerFired):
              (WebCore::RenderImage::~RenderImage):
              (WebCore::RenderImage::paintReplaced):
              * rendering/RenderImage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d2be025
    • justin.garcia@apple.com's avatar
      WebCore: · ab87ef8e
      justin.garcia@apple.com authored
      2008-05-29  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Eric.
      
              <rdar://problem/5847330> REGRESSION CrashTracer: [USER] 536 crashes at WebCore::highestAncestor
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Don't break out of an empty
              list item if its parent is non-editable, since doing so will move into non-editable content.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializePositionData): We want to prevent merges from
              table cells even if those table cells are non-editable.
              * editing/htmlediting.cpp:
              (WebCore::enclosingNodeOfType): Can now return non-editable nodes, for cases where the caller 
              isn't going to do editing in the returned node.
              * editing/htmlediting.h:
      
      LayoutTests:
      
      2008-05-28  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Eric.
              
              <rdar://problem/5847330> REGRESSION CrashTracer: [USER] 536 crashes at WebCore::highestAncestor
      
              * editing/deleting/5847330-1-expected.txt: Added.
              * editing/deleting/5847330-1.html: Added.
              * editing/deleting/5847330-2-expected.txt: Added.
              * editing/deleting/5847330-2.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab87ef8e
    • andersca@apple.com's avatar
      ../mac: · d94d22f1
      andersca@apple.com authored
      2008-05-29  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Brady.
      
              <rdar://problem/5970312> 
              icon file specified for stand alone web app causes crash if the icon can't be found
              
              Handle the case where iconData is null.
              
              * Misc/WebIconFetcher.mm:
              (WebIconFetcherClient::finishedFetchingIcon):
      
      ../win:
      
      2008-05-29  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Brady.
      
              <rdar://problem/5970312> 
              icon file specified for stand alone web app causes crash if the icon can't be found
              
              Handle the case where iconData is null.
      
              * WebIconFetcher.cpp:
              (WebIconFetcherClient::finishedFetchingIcon):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d94d22f1
    • andersca@apple.com's avatar
      WebCore: · d2517f04
      andersca@apple.com authored
      2008-05-29  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Mitz.
      
              <rdar://problem/5971845>
              https://bugs.webkit.org/show_bug.cgi?id=19313
              Add version member to NPCocoaEvent
              
              * bridge/npapi.h:
      
      WebKit/mac:
      
      2008-05-29  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Mitz.
      
              <rdar://problem/5971845>
              https://bugs.webkit.org/show_bug.cgi?id=19313
              Add version member to NPCocoaEvent
      
              Initialize the version member to 0 for all events.
              
              * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
              (initializeEvent):
              (WebNetscapePluginEventHandlerCocoa::drawRect):
              (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
              (WebNetscapePluginEventHandlerCocoa::flagsChanged):
              (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
              (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
              (WebNetscapePluginEventHandlerCocoa::focusChanged):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2517f04
    • kevino@webkit.org's avatar
      Reviewed by Darin Adler. · 253906de
      kevino@webkit.org authored
              
      Restore original behavior of isOSX() referring to the Mac port, not the OS itself.
              
      https://bugs.webkit.org/show_bug.cgi?id=19311
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      253906de
    • sfalken@apple.com's avatar
      2008-05-29 Steve Falkenburg <sfalken@apple.com> · 0aaf9d1f
      sfalken@apple.com authored
              Build fix.
      
              * kjs/array_instance.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0aaf9d1f
    • ap@webkit.org's avatar
      Reviewed by Darin. · 56cb5179
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=19294
              <rdar://problem/5969062> A crash when iterating over a sparse array backwards.
      
              * kjs/array_instance.cpp: Turned sparseArrayCutoff into a macro, so that using max() on it
              doesn't cause a PIC branch.
              (KJS::ArrayInstance::increaseVectorLength): Added a comment about this function not
              preserving class invariants.
              (KJS::ArrayInstance::put): Update m_storage after reallocation. Move values that fit to
              the vector from the map in all code paths.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56cb5179
    • mitz@apple.com's avatar
      Reviewed by Jessica Kahn. · 4e770aa5
      mitz@apple.com authored
              - fix <rdar://problem/5965013> Page 2 does not print correctly
      
              When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and
              _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without
              -viewWillDraw being sent first, which could lead to painting without
              valid layout. The fix is to ensure up-to-date layout in those methods
              when printing.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
              (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e770aa5
    • ap@webkit.org's avatar
      Reviewed by Adam Roben. · daed70e3
      ap@webkit.org authored
              <rdar://problem/5960682> REGRESSION(r30535): Crashes on iExploder in checkForHeadCharset().
      
              I don't see how to make a reliable test, but iExploder catches this quickly.
      
              * loader/TextResourceDecoder.cpp:
              (WebCore::TextResourceDecoder::checkForHeadCharset): Correct the length passed to
              findIgnoringCase().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      daed70e3
    • ap@webkit.org's avatar
      Reviewed by Adam Roben. · 032862b0
      ap@webkit.org authored
              Fix run-iexploder-tests and run-mangleme-tests to work with updated shared scripts and
              configuration files.
      
              * Scripts/run-iexploder-tests:
              * Scripts/run-mangleme-tests:
              Renamed runSafari to not conflict with the one in webkitdirs.
              Added SSLCertificateFile option for httpd, as now needed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      032862b0
    • alp@webkit.org's avatar
      2008-05-29 Peter Kasting <zerodpx@gmail.com> · 567092fb
      alp@webkit.org authored
              Reviewed by Dave Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=19273
              Handle looping GIFs correctly (at least in the open source GIF decoder) even when
              the loop count doesn't appear in the initial data packets.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::cacheFrame):
              (WebCore::BitmapImage::startAnimation):
              (WebCore::BitmapImage::advanceAnimation):
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::GIFImageDecoder):
              (WebCore::GIFImageDecoder::repetitionCount):
              (WebCore::GIFImageDecoder::gifComplete):
              * platform/image-decoders/gif/GIFImageDecoder.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      567092fb
    • alp@webkit.org's avatar
      2008-05-29 Brent Fulgham <bfulgham@gmail.com> · b5743686
      alp@webkit.org authored
              Reviewed by Alp Toker.
      
              http://bugs.webkit.org/show_bug.cgi?id=19284
              Correct Windows (Cairo) Build Regressions
      
              Correct small Windows (Cairo) build regressions in recent updates.
      
              * platform/graphics/SimpleFontData.h:  Correct build regression due
                to r32781 (additional use of m_syntheticBoldOffset in GDI code).
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
                Correct build regression due to r31830 (change of clip signature
                to use FloatRect rather than IntRect).
              * platform/graphics/win/SimpleFontDataCairoWin.cpp:
              (WebCore::SimpleFontData::platformInit):  Initialize
              m_syntheticBoldOffset
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageReader::JPEGImageReader):  Work around build
                error due to warnings about _setjmp treated as errors.
              * platform/image-decoders/png/PNGImageDecoder.cpp:  Work around
                build error due to warnings about _setjmp treated as errors.
              * platform/network/curl/ResourceHandleCurl.cpp:  Correct build error
                due to different order (and content) of include files when building
                with CoreFoundation (but not CoreGraphics).
              * platform/network/curl/ResourceHandleManager.cpp:
              (WebCore::ResourceHandleManager::setupPOST):  Correct build error
                due to Visual Studio compiler bug.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5743686
    • hausmann@webkit.org's avatar
      2008-05-29 Thiago Macieira <tjmaciei@trolltech.com> · 56079a32
      hausmann@webkit.org authored
              Reviewed by Simon.
      
              Fix compilation in Solaris with Sun CC
      
              Lots of WebKit code uses C99 functions that, strict as it
              is, the Solaris system doesn't provide in C++. So we must define them
              for both GCC and the Sun CC.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56079a32
    • ap@webkit.org's avatar
      Reviewed by Darin. · 8aba93cd
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=19215
              REGRESSION: transformToDocument fails when xsl includes &#160;
      
              Test: fast/xsl/nbsp-in-stylesheet.html
      
              * editing/markup.cpp:
              (WebCore::appendAttributeValue):
              (WebCore::appendEscapedContent):
              (WebCore::escapeContentText):
              (WebCore::appendQuotedURLAttributeValue):
              (WebCore::appendNamespace):
              (WebCore::appendStartMarkup):
              (WebCore::appendDocumentType):
              (WebCore::createMarkup):
              Only escape non-breaking spaces in HTML documents. In Firefox, this behavior is also limited
              to innerHTML, but we don't have a separate code path for it, and do not necessarily want to.
      
              * page/Frame.cpp:
              (WebCore::Frame::documentTypeString):
              * dom/CDATASection.cpp:
              * dom/CDATASection.h:
              * dom/Comment.cpp:
              * dom/Comment.h:
              * dom/DocumentType.cpp:
              * dom/DocumentType.h:
              * dom/ProcessingInstruction.cpp:
              * dom/ProcessingInstruction.h:
              While at it, I also wanted to fix escaping for these nodes, but it turned out that FIXMEs were
              incorrect. So, I just moved their serialization to markup.cpp for consistency.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8aba93cd
    • hausmann@webkit.org's avatar
      Kavindra Devi Palaraja <kdpalara@trolltech.com> · 3f8a426f
      hausmann@webkit.org authored
      Doc: Mention the requirement of a QApplication with QtWebKit
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f8a426f
    • hausmann@webkit.org's avatar
      David Boddie <dboddie@trolltech.com> · 3bcd1202
      hausmann@webkit.org authored
      Some clarifications for the documentation.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3bcd1202
    • mjs@apple.com's avatar
      Fix ChangeLog typos. · 45ee7b5e
      mjs@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45ee7b5e
    • mjs@apple.com's avatar
      WebCore: · bf259502
      mjs@apple.com authored
      2008-05-29  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Dave Hyatt.
      
              - speed up DHTML using lazy style resolution and rendere creation
      
              This change introduces the concept of "lazy attach" - when a node
              is lazy attached, then instead of resolving style and creating a
              renderer right away, we just mark it as needing a style recalc.
              
              The patch makes use of this mechanism when inserting nodes directly
              using DOM APIs from script. For now this is only done for the
              JavaScript language binding but could also be done for other
              bindings in the future.
              
              Lazy attach helps some common DHTML patterns - when a node is
              added to the DOM, and then subsequently changed in a
              style-affecting way, this causes an extra style recalc. This is a
              fairly common pattern so it is better to be lazy.
              
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::insertBefore): Request lazy attach.
              (WebCore::JSNode::replaceChild): ditto
              (WebCore::JSNode::appendChild): ditto
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::insertBefore): Support lazy attach.
              (WebCore::ContainerNode::replaceChild): ditto
              (WebCore::ContainerNode::appendChild): ditto
              (WebCore::ContainerNode::detach): Clear "changed child" bit if still set.
              * dom/ContainerNode.h:
              * dom/Element.cpp:
              (WebCore::Element::recalcStyle): Adjusted to properly reattach a
              lazy-attached node.
              * dom/Node.cpp:
              (WebCore::Node::insertBefore): Extra parameter for lazy attach
              (still doesn't do anything).
              (WebCore::Node::replaceChild): ditto
              (WebCore::Node::appendChild): ditto
              (WebCore::Node::setChanged): Unrelated but obvious optimization -
              stop marking ancestor as having a changed child once we already reach
              an ancestor so marked.
              (WebCore::outermostLazyAttachedAncestor): Helper function for lazyAttach.
              (WebCore::Node::lazyAttach): Implement lazy attach.
              (WebCore::Node::canLazyAttach): Virtual method - true for most nodes.
              * dom/Node.h:
              * dom/Text.cpp:
              (WebCore::Text::recalcStyle): Properly handle the case of a reattached node.
              * html/HTMLEmbedElement.h:
              (WebCore::HTMLEmbedElement::canLazyAttach): Refuse lazy attach, since
              plugins and frames do important work at rederer creation time.
              * html/HTMLFrameElementBase.h:
              (WebCore::HTMLFrameElementBase::canLazyAttach): Refuse lazy attach, since
              plugins and frames do important work at rederer creation time.
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::recalcStyle): Change order so that
              reattach works properly.
              * html/HTMLObjectElement.h:
              (WebCore::HTMLObjectElement::canLazyAttach): Refuse lazy attach, since
              plugins and frames do important work at rederer creation time.
              * html/HTMLOptGroupElement.cpp:
              (WebCore::HTMLOptGroupElement::insertBefore): Pass along extra param.
              (WebCore::HTMLOptGroupElement::replaceChild): ditto
              (WebCore::HTMLOptGroupElement::appendChild): ditto
              * html/HTMLOptGroupElement.h:
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::insertBefore): Pass along extra param.
              (WebCore::HTMLSelectElement::replaceChild): ditto
              (WebCore::HTMLSelectElement::appendChild): ditto
              * html/HTMLSelectElement.h:
              * svg/SVGLocatable.cpp:
              (WebCore::SVGLocatable::getBBox): Add missing updateLayout call.
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::getNumberOfChars): ditto
              (WebCore::SVGTextContentElement::getComputedTextLength): ditto
              (WebCore::SVGTextContentElement::getSubStringLength): ditto
              (WebCore::SVGTextContentElement::getStartPositionOfChar): ditto
              (WebCore::SVGTextContentElement::getEndPositionOfChar): ditto
              (WebCore::SVGTextContentElement::getExtentOfChar): ditto
              (WebCore::SVGTextContentElement::getRotationOfChar): ditto
              (WebCore::SVGTextContentElement::getCharNumAtPosition): ditto
      
      LayoutTests:
      
      2008-05-29  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Dave Hyatt.
      
              - Test cases for this change: "speed up DHTML using lazy style resolution and rendere creation"
      
              * http/tests/misc/acid3-expected.txt:
              * platform/mac/fast/dynamic/insert-before-table-part-in-continuation-expected.checksum:
              * platform/mac/fast/dynamic/insert-before-table-part-in-continuation-expected.png:
              * platform/mac/fast/dynamic/insert-before-table-part-in-continuation-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf259502