WebKit-https.git
11 years ago Focus the DOM tree in the Web Inspector when a node is inspected.
timothy@apple.com [Tue, 30 Sep 2008 20:57:55 +0000 (20:57 +0000)]
    Focus the DOM tree in the Web Inspector when a node is inspected.
        So when the search field has focus, the focus moves to the tree,
        allowing the arrow keys work. This can happen when using the new
        find in page feature.

        https://bugs.webkit.org/show_bug.cgi?id=21251

        Reviewed by Geoff Garen.

        * page/inspector/ElementsPanel.js:
        (WebInspector.ElementsPanel): Set currentFocusElement to
        the main-panels element if the panel is visible.
        (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
        Remove a set of currentFocusElement since this moved.
        * page/inspector/inspector.js:
        (WebInspector.set currentFocusElement): Always focus the element.
        This ensures that when focus changes in the page and we don't
        catch it, we will still focus the elements even if we think it
        was already focused.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37111 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Make the Web Inspector's toolbar icons darker when the mouse is
timothy@apple.com [Tue, 30 Sep 2008 20:57:49 +0000 (20:57 +0000)]
    Make the Web Inspector's toolbar icons darker when the mouse is
        pressed on them. This matches the standard NSToolbar look.

        https://bugs.webkit.org/show_bug.cgi?id=21249
        rdar://problem/6033752

        Reviewed by Adam Roben.

        * page/inspector/Images/databasesIcon.png:
        * page/inspector/Images/elementsIcon.png:
        * page/inspector/Images/profilesIcon.png:
        * page/inspector/Images/resourcesIcon.png:
        * page/inspector/Images/scriptsIcon.png:
        * page/inspector/Panel.js:
        * page/inspector/inspector.css:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix qt bustage.
hyatt@apple.com [Tue, 30 Sep 2008 20:56:17 +0000 (20:56 +0000)]
Fix qt bustage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoBuild fix.
mrowe@apple.com [Tue, 30 Sep 2008 20:27:13 +0000 (20:27 +0000)]
Build fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37107 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-30 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Tue, 30 Sep 2008 20:26:29 +0000 (20:26 +0000)]
2008-09-30  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim Hatcher.

        Bug 21139: Profiler log message is wrong
        - Correctly fix =(
        Don't call _format twice.

        * page/Page.h:
        * page/inspector/Console.js:
        * page/inspector/ProfilesPanel.js:
        * page/inspector/inspector.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37106 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoMake ScrollView's updateContents method cross-platform.
hyatt@apple.com [Tue, 30 Sep 2008 20:09:42 +0000 (20:09 +0000)]
Make ScrollView's updateContents method cross-platform.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoBuild fix.
mrowe@apple.com [Tue, 30 Sep 2008 19:38:36 +0000 (19:38 +0000)]
Build fix.

Move InternalFunction::classInfo implementation into the .cpp file to
prevent the vtable for InternalFunction being generated as a weak symbol.
Has no effect on SunSpider.

Rubber-stamped by Sam Weinig.

* kjs/InternalFunction.cpp:
(JSC::InternalFunction::classInfo):
* kjs/InternalFunction.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-30 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Tue, 30 Sep 2008 19:29:20 +0000 (19:29 +0000)]
2008-09-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mark Rowe and Adam Roben.

        No need to use pointers to store C++ objects as pointers in WebViewPrivate, we can just
        store them directly.

        * Configurations/Base.xcconfig:
        Set GCC_OBJC_CALL_CXX_CDTORS to YES.

        * WebView/WebView.mm:
        (-[WebViewPrivate init]):
        (-[WebViewPrivate dealloc]):
        (-[WebViewPrivate finalize]):
        (-[WebView _preferencesChangedNotification:]):
        (-[WebView setApplicationNameForUserAgent:]):
        (-[WebView setCustomUserAgent:]):
        (-[WebView customUserAgent]):
        (-[WebView WebCore::_userAgentForURL:WebCore::]):
        (-[WebView _addObject:forIdentifier:]):
        (-[WebView _objectForIdentifier:]):
        (-[WebView _removeObjectForIdentifier:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Non-Mac build fixes.
ap@webkit.org [Tue, 30 Sep 2008 17:58:10 +0000 (17:58 +0000)]
    Non-Mac build fixes.

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCoreSources.bkl:
        * webcore-base.bkl:
        Added DOMProtect.{cpp,h}.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Reviewed by John Sullivan.
kdecker@apple.com [Tue, 30 Sep 2008 17:40:02 +0000 (17:40 +0000)]
    Reviewed by John Sullivan.

        * bridge/npapi.h: Added skeleton for a new plug-in drawing model, the NPCoreAnimationDrawingModel. This model will eventually pave the way
        for hardware accelerated drawing in plug-ins and out of process plug-in rendering.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Julien Chaffraix <jchaffraix@webkit.org>
jchaffraix@webkit.org [Tue, 30 Sep 2008 17:05:20 +0000 (17:05 +0000)]
2008-09-29  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Maciej Stachowiak.

        Bug 21106: .in format discussed changes
        https://bugs.webkit.org/show_bug.cgi?id=21106

        - Removed "cppNamespace" global parameter and hard-coded "WebCore" as it
        is the only namespace used.

        - Removed "generateFactory" and "generateWrapperFactory" parameters and
        re-introduced the command line options.

        - Cleaned up the output of make_names.pl (removed unneeded new line).

        * DerivedSources.make: Added factories command line options.
        * GNUmakefile.am: Ditto.
        * WebCore.pro: Ditto and removed some arguments that were migrated to
        the .in files.

        * dom/make_names.pl: Clean up (see above).

        * html/HTMLAttributeNames.in: Removed "cppNamespace", "generateFactory"
        and "generateWrapperFactory" occurences.
        * html/HTMLTagNames.in: Ditto.
        * svg/svgattrs.in: Ditto.
        * svg/svgtags.in: Ditto.
        * svg/xlinkattrs.in: Ditto.
        * xml/xmlattrs.in: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37096 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago<rdar://problem/6255456> AX: <file> input button shouldn't have children exposed
cfleizach@apple.com [Tue, 30 Sep 2008 16:19:01 +0000 (16:19 +0000)]
<rdar://problem/6255456> AX: <file> input button shouldn't have children exposed

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Reviewed by Sam Weinig.
ap@webkit.org [Tue, 30 Sep 2008 15:52:06 +0000 (15:52 +0000)]
    Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21213
        MessagePort crash when GC collects an object with a pending close event

        Test: fast/events/message-channel-gc-2.html
              fast/events/message-channel-listener-circular-ownership.html

        * bindings/DOMProtect.cpp: Added.
        (WebCore::gcProtectDOMObject):
        (WebCore::gcUnprotectDOMObject):
        * bindings/DOMProtect.h: Added.
        Added an abstraction for GC protection to avoid the need to call JS bindings code from
        DOM objects directly.

        * dom/MessagePort.cpp:
        (WebCore::CloseMessagePortTimer::fired):
        (WebCore::MessagePort::queueCloseEvent):
        GC protect MessagePort wrapper while there is a pending close event.
        This may be necessary for message events, too, but that case is not a crasher, and actually
        behaves to the letter of the current HTML5 text, so I'll consider it later.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::loadRequestAsynchronously):
        (WebCore::XMLHttpRequest::dropProtection):
        Use gcProtectDOMObject here, too. Unfortunately, XMLHttpRequest has more dependencies on JSC.

        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::addEventListener):
        (WebCore::JSMessagePort::removeEventListener):
        (WebCore::JSMessagePort::setOnmessage):
        (WebCore::JSMessagePort::setOnclose):
        Don't tell DOMWindowBase that MessagePort is a NodeEventTarget, this is not true. I do not
        know if this was causing any real issues, but we shouldn't lie to DOMWindowBase.

        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::mark):
        While at it, changed to use a typedef for event listeners from XMLHttpRequestUpload, not
        from XMLHttpRequest.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37094 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Windows build fix
aroben@apple.com [Tue, 30 Sep 2008 14:17:28 +0000 (14:17 +0000)]
    Windows build fix

        * DerivedSources.cpp: Add JSEventTargetNode.cpp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix gtk qt bustage.
hyatt@apple.com [Tue, 30 Sep 2008 07:42:48 +0000 (07:42 +0000)]
Fix gtk qt bustage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37092 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-30 Cameron Zwarich <zwarich@apple.com>
cwzwarich@webkit.org [Tue, 30 Sep 2008 07:10:26 +0000 (07:10 +0000)]
2008-09-30  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Add the performance improvement to the ChangeLog entry for r37050.

        * ChangeLog

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37091 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Sam Weinig <sam@webkit.org>
weinig@apple.com [Tue, 30 Sep 2008 07:01:45 +0000 (07:01 +0000)]
2008-09-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Tim Hatcher.

        Patch for https://bugs.webkit.org/show_bug.cgi?id=21122
        Autogenerate JS event listeners

        - Generate EventTargetNode.

        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * bindings/js/JSEventListener.cpp:
        * bindings/js/JSEventTarget.cpp: Added.
        (WebCore::toJS):
        * bindings/js/JSEventTarget.h: Added.
        * bindings/js/JSEventTargetBase.cpp: Removed.
        * bindings/js/JSEventTargetBase.h:
        * bindings/js/JSEventTargetNode.cpp: Removed.
        * bindings/js/JSEventTargetNode.h: Removed.
        * bindings/js/JSEventTargetNodeCustom.cpp: Added.
        (WebCore::JSEventTargetNode::addEventListener):
        (WebCore::JSEventTargetNode::removeEventListener):
        (WebCore::JSEventTargetNode::dispatchEvent):
        (WebCore::JSEventTargetNode::getListener):
        (WebCore::JSEventTargetNode::setListener):
        (WebCore::JSEventTargetNode::pushEventHandlerScope):
        * bindings/js/JSEventTargetSVGElementInstance.cpp:
        (WebCore::):
        (WebCore::JSEventTargetSVGElementInstancePrototype::self):
        (WebCore::JSEventTargetSVGElementInstancePrototype::getOwnPropertySlot):
        (jsEventTargetAddEventListener):
        (jsEventTargetRemoveEventListener):
        (jsEventTargetDispatchEvent):
        * bindings/js/JSEventTargetSVGElementInstance.h:
        (WebCore::JSEventTargetSVGElementInstancePrototype::JSEventTargetSVGElementInstancePrototype):
        (WebCore::JSEventTargetSVGElementInstancePrototype::classInfo):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/EventTargetNode.idl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37090 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Maciej Stachowiak <mjs@apple.com>
mjs@apple.com [Tue, 30 Sep 2008 01:31:09 +0000 (01:31 +0000)]
2008-09-29  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin Adler.

        - optimize appending a number to a string
        https://bugs.webkit.org/show_bug.cgi?id=21203

        It's pretty common in real-world code (and on some of the v8
        benchmarks) to append a number to a string, so I made this one of
        the fast cases, and also added support to UString to do it
        directly without allocating a temporary UString.

        ~1% speedup on v8 benchmark.

        * VM/Machine.cpp:
        (JSC::jsAddSlowCase): Make this NEVER_INLINE because somehow otherwise
        the change is a regression.
        (JSC::jsAdd): Handle number + string special case.
        (JSC::Machine::cti_op_add): Integrate much of the logic of jsAdd to
        avoid exception check in the str + str, num + num and str + num cases.
        * kjs/ustring.cpp:
        (JSC::expandedSize): Make this a non-member function, since it needs to be
        called in non-member functions but not outside this file.
        (JSC::expandCapacity): Ditto.
        (JSC::UString::expandCapacity): Call the non-member version.
        (JSC::createRep): Helper to make a rep from a char*.
        (JSC::UString::UString): Use above helper.
        (JSC::concatenate): Guts of concatenating constructor for cases where first
        item is a UString::Rep, and second is a UChar* and length, or a char*.
        (JSC::UString::append): Implement for cases where first item is a UString::Rep,
        and second is an int or double. Sadly duplicates logic of UString::from(int)
        and UString::from(double).
        * kjs/ustring.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37089 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoJavaScriptCore:
darin@apple.com [Tue, 30 Sep 2008 01:14:26 +0000 (01:14 +0000)]
JavaScriptCore:

2008-09-29  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        - https://bugs.webkit.org/show_bug.cgi?id=21214
          work on getting rid of ExecState

        * JavaScriptCore.exp: Updated since JSGlobalObject::init
        no longer takes a parameter.

        * VM/Machine.cpp:
        (JSC::Machine::execute): Removed m_registerFile argument
        for ExecState constructors.

        * kjs/DebuggerCallFrame.cpp:
        (JSC::DebuggerCallFrame::evaluate): Removed globalThisValue
        argument for ExecState constructor.

        * kjs/ExecState.cpp:
        (JSC::ExecState::ExecState): Removed globalThisValue and
        registerFile arguments to constructors.

        * kjs/ExecState.h: Removed m_globalThisValue and
        m_registerFile data members.

        * kjs/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::init): Removed globalThisValue
        argument for ExecState constructor.

        * kjs/JSGlobalObject.h:
        (JSC::JSGlobalObject::JSGlobalObject): Got rid of parameter
        for the init function.

WebCore:

2008-09-29  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        - https://bugs.webkit.org/show_bug.cgi?id=21214
          work on getting rid of ExecState

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::JSDOMWindowBase): Removed globalThisValue argument
        for base class constructor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37088 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Tue, 30 Sep 2008 01:03:26 +0000 (01:03 +0000)]
2008-09-29  Geoffrey Garen  <ggaren@apple.com>

        Rubber-stamped by Cameron Zwarich.

        Fixed https://bugs.webkit.org/show_bug.cgi?id=21225
        Machine::retrieveLastCaller should check for a NULL codeBlock

        In order to crash, you would need to call retrieveCaller in a situation
        where you had two host call frames in a row in the register file. I
        don't know how to make that happen, or if it's even possible, so I don't
        have a test case -- but better safe than sorry!

        * VM/Machine.cpp:
        (JSC::Machine::retrieveLastCaller):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoJavaScriptCore:
ggaren@apple.com [Tue, 30 Sep 2008 00:46:25 +0000 (00:46 +0000)]
JavaScriptCore:

2008-09-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.

        Store the callee ScopeChain, not the caller ScopeChain, in the call frame
        header. Nix the "scopeChain" local variable and ExecState::m_scopeChain, and
        access the callee ScopeChain through the call frame header instead.

        Profit: call + return are simpler, because they don't have to update the
        "scopeChain" local variable, or ExecState::m_scopeChain.

        Because CTI keeps "r" in a register, reading the callee ScopeChain relative
        to "r" can be very fast, in any cases we care to optimize.

        0% speedup on empty function call benchmark. (5.5% speedup in bytecode.)
        0% speedup on SunSpider. (7.5% speedup on controlflow-recursive.)
        2% speedup on SunSpider --v8.
        2% speedup on v8 benchmark.

        * VM/CTI.cpp: Changed scope chain access to read the scope chain from
        the call frame header. Sped up op_ret by changing it not to fuss with
        the "scopeChain" local variable or ExecState::m_scopeChain.

        * VM/CTI.h: Updated CTI trampolines not to take a ScopeChainNode*
        argument, since that's stored in the call frame header now.

        * VM/Machine.cpp: Access "scopeChain" and "codeBlock" through new helper
        functions that read from the call frame header. Updated functions operating
        on ExecState::m_callFrame to account for / take advantage of the fact that
        Exec:m_callFrame is now never NULL.

        Fixed a bug in op_construct, where it would use the caller's default
        object prototype, rather than the callee's, when constructing a new object.

        * VM/Machine.h: Made some helper functions available. Removed
        ScopeChainNode* arguments to a lot of functions, since the ScopeChainNode*
        is now stored in the call frame header.

        * VM/RegisterFile.h: Renamed "CallerScopeChain" to "ScopeChain", since
        that's what it is now.

        * kjs/DebuggerCallFrame.cpp: Updated for change to ExecState signature.

        * kjs/ExecState.cpp:
        * kjs/ExecState.h: Nixed ExecState::m_callFrame, along with the unused
        isGlobalObject function.

        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h: Gave the global object a fake call frame in
        which to store the global scope chain, since our code now assumes that
        it can always read the scope chain out of the ExecState's call frame.

JavaScriptGlue:

2008-09-29  Geoffrey Garen  <ggaren@apple.com>

        Not reviewed.

        Forwarding headers to fix the build.

        * ForwardingHeaders/kjs/CTI.h: Copied from ForwardingHeaders/kjs/ExecState.h.
        * ForwardingHeaders/kjs/ustring.h: Copied from ForwardingHeaders/kjs/ExecState.h.
        * ForwardingHeaders/masm: Added.
        * ForwardingHeaders/masm/X86Assembler.h: Added.
        * ForwardingHeaders/profiler: Added.
        * ForwardingHeaders/profiler/Profiler.h: Added.

LayoutTests:

2008-09-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.

        Test case for which prototype is used when calling "new" across windows.

        * fast/js/construct-global-object-expected.txt: Added.
        * fast/js/construct-global-object.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Tue, 30 Sep 2008 00:42:25 +0000 (00:42 +0000)]
2008-09-29  David Hyatt  <hyatt@apple.com>

        Add the new HostWindow base class.  A HostWindow hosts a hierarchy of Widgets.  The Chrome object on Page
        now subclasses from HostWindow.  The new class will allow objects in platform/ like Widgets, Scrollbars
        and ScrollViews to talk to the HostWindow object in order to do backing store operations and invalidations.
        (Right now the platform layering is simply being violated by ScrollViews going directly to the ChromeClient.)

        Reviewed by Sam Weinig

        * WebCore.xcodeproj/project.pbxproj:
        * page/Chrome.h:
        * platform/HostWindow.h: Added.
        (WebCore::HostWindow::HostWindow):
        (WebCore::HostWindow::~HostWindow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37085 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Reviewed by Anders Carlsson.
kdecker@apple.com [Tue, 30 Sep 2008 00:17:15 +0000 (00:17 +0000)]
    Reviewed by Anders Carlsson.

        * bridge/npapi.h: Tweaked NPNVariable enum. NPNVsupportsCocoaBool,  NPNVsupportsCarbonBool are now in the 3000 range instead of
        2000.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37084 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWebCore:
mitz@apple.com [Mon, 29 Sep 2008 23:42:38 +0000 (23:42 +0000)]
WebCore:

        Reviewed by Adam Roben.

        - WebCore part of fixing <rdar://problem/6247906> REGRESSION (r19500): Crash on quit beneath CloseThemeData

        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::setWebKitIsBeingUnloaded): Added.
        (WebCore::RenderThemeWin::~RenderThemeWin): Check if WebKit is being
        unloaded, to avoid calling uxtheme.dll functions after that library has
        been unloaded.
        * rendering/RenderThemeWin.h:

WebKit/win:

        Reviewed by Adam Roben.

        - WebKit/win part of fixing <rdar://problem/6247906> REGRESSION (r19500): Crash on quit beneath CloseThemeData

        * WebKitDLL.cpp:
        (DllMain): Call RenderThemeWin::setWebKitIsBeingUnloaded() when WebKit
        is being unloaded.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago<rdar://problem/6240743> AXLoadComplete is sent for non-top level web areas and bogus...
cfleizach@apple.com [Mon, 29 Sep 2008 23:10:03 +0000 (23:10 +0000)]
<rdar://problem/6240743> AXLoadComplete is sent for non-top level web areas and bogus web areas

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoVersioning.
mrowe@apple.com [Mon, 29 Sep 2008 22:50:08 +0000 (22:50 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37081 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Makes the node highlight always show up when hovering a node in
timothy@apple.com [Mon, 29 Sep 2008 22:34:10 +0000 (22:34 +0000)]
    Makes the node highlight always show up when hovering a node in
        the Web Inspector now that the highlight does not scroll to reveal
        the node. Also adds a hover effect in the inspector when hovering
        causes a highlight in the page. This ties the user hovering action
        to the highlight so it is clear what causes the highlight to appear.

        Also the highlight now temporarily shows up for 2 seconds after
        selecting a node in the DOM tree. So arrowing around in the tree
        will show the node on the page, providing feedback to the user.

        Plus fixes an issue where quickly moving away from hovering
        a node would keep showing the page highlight. This was happening
        in breadcrumbs and the DOM tree.

        https://bugs.webkit.org/show_bug.cgi?id=21220

        Reviewed by Kevin McCullough.

        * page/inspector/Console.js:
        (WebInspector.Console.prototype._mouseOverNode): Added. Used for
        hovering DOM nodes in the console.
        (WebInspector.Console.prototype._mouseOutOfNode): Ditto.
        (WebInspector.Console.prototype._formatnode): Use the new event
        listeners and add a class name to the anchor element.
        * page/inspector/ElementsPanel.js:
        (WebInspector.ElementsPanel): Add new event listeners to the
        crumbs element to do the node hovering highlight.
        (WebInspector.ElementsPanel.prototype.hide):
        (WebInspector.ElementsPanel.prototype.reset):
        (WebInspector.ElementsPanel.prototype._mouseMovedInCrumbs):
        (WebInspector.ElementsPanel.prototype._mouseMovedOutOfCrumbs):
        (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
        * page/inspector/ElementsTreeOutline.js:
        (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
        Show the node hishlight for 2 seconds then restore the highlight
        to the current hovered node.
        (WebInspector.ElementsTreeOutline.prototype._onmousemove): Set the
        hovered node and set the hovered state on the tree element.
        (WebInspector.ElementsTreeOutline.prototype._onmouseout): Set the
        hovered node to null and removed the hovered state from the previous
        hovered tree element.
        (WebInspector.ElementsTreeElement.prototype.set/get hovered): Adds
        the hovered class to the list item.
        (WebInspector.ElementsTreeElement.prototype.onattach): Ditto.
        * page/inspector/inspector.css:
        * page/inspector/inspector.js:
        (WebInspector.set hoveredDOMNode): Pass a delay to _updateHoverHighlightSoon
        based on the showingDOMNodeHighlight property of 50ms or 500ms. This
        causes the highlight to change sooner if there is one already showing
        and appear later if there isn't one showing. This is like tooltips,
        hovering a node for 500ms will cause highlight then mousing between nodes
        will keep the highlight and change to the new node.
        (WebInspector._updateHoverHighlightSoon): Take a delay being passed in and
        always reset the timeout so continuous mousing does not keep flasshing
        the highlight on the screen.
        (WebInspector._updateHoverHighlight): Removed the alt key check and added
        the showingDOMNodeHighlight property.
        (WebInspector.documentKeyDown): Removed the alt key check.
        (WebInspector.documentKeyUp): Ditto.
        (WebInspector.reset): Clear the hoveredDOMNode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37079 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 22:04:38 +0000 (22:04 +0000)]
2008-09-29  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Anders Carlsson

        Fix RenderStyle leak in animation code, and assert that
        keyframe resolution in CSSStyleSelector is not going to clobber
        m_style.

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::~KeyframeAnimation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37078 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 21:31:26 +0000 (21:31 +0000)]
2008-09-29  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Dave Hyatt

        Fixed https://bugs.webkit.org/show_bug.cgi?id=20995
        Rewrite keyframe resolution to be like styleForElement()

        Test: animations/lineheight-animation.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::addKeyframeStyle):
        (WebCore::CSSStyleSelector::~CSSStyleSelector):
        (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
        (WebCore::CSSRuleSet::addRulesFromSheet):
        (WebCore::CSSStyleSelector::mapAnimationName):
        * css/CSSStyleSelector.h:
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::updateKeyframeAnimations):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::KeyframeAnimation):
        (WebCore::KeyframeAnimation::animate):
        (WebCore::KeyframeAnimation::hasAnimationForProperty):
        (WebCore::KeyframeAnimation::sendAnimationEvent):
        (WebCore::KeyframeAnimation::overrideAnimations):
        (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
        (WebCore::KeyframeAnimation::affectsProperty):
        (WebCore::KeyframeAnimation::validateTransformFunctionList):
        * page/animation/KeyframeAnimation.h:
        * rendering/style/Animation.cpp:
        (WebCore::Animation::animationsMatch):
        * rendering/style/Animation.h:
        * rendering/style/KeyframeList.cpp:
        (WebCore::KeyframeList::~KeyframeList):
        (WebCore::KeyframeList::clear):
        (WebCore::KeyframeList::insert):
        * rendering/style/KeyframeList.h:
        (WebCore::KeyframeValue::KeyframeValue):
        (WebCore::KeyframeList::KeyframeList):
        (WebCore::KeyframeList::operator!=):
        (WebCore::KeyframeList::animationName):
        (WebCore::KeyframeList::addProperty):
        (WebCore::KeyframeList::containsProperty):
        (WebCore::KeyframeList::beginProperties):
        (WebCore::KeyframeList::endProperties):
        (WebCore::KeyframeList::isEmpty):
        (WebCore::KeyframeList::size):
        (WebCore::KeyframeList::beginKeyframes):
        (WebCore::KeyframeList::endKeyframes):
        * rendering/style/RenderStyle.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        * rendering/style/StyleRareNonInheritedData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37077 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 21:24:52 +0000 (21:24 +0000)]
2008-09-29  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Eric Seidel

        Clean up fix in PropertyWrapperGetter::equals
        https://bugs.webkit.org/show_bug.cgi?id=21011

        Test: transitions/override-transition-crash.html

        * page/animation/AnimationBase.cpp:
        (WebCore::PropertyWrapperGetter::equals):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::updateTransitions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 21:21:38 +0000 (21:21 +0000)]
2008-09-29  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Eric Seidel

        https://bugs.webkit.org/show_bug.cgi?id=21001
        Starting transition after animation, when animation
        is finished, transition is wrong.

        Test: animations/transition-and-animation-2.html

        * page/animation/AnimationBase.h:
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::updateTransitions):
        (WebCore::CompositeAnimation::updateKeyframeAnimations):
        (WebCore::CompositeAnimation::resetTransitions):
        (WebCore::CompositeAnimation::cleanupFinishedAnimations):
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::ImplicitAnimation):
        (WebCore::ImplicitAnimation::~ImplicitAnimation):
        (WebCore::ImplicitAnimation::animate):
        (WebCore::ImplicitAnimation::reset):
        * page/animation/ImplicitAnimation.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 21:18:07 +0000 (21:18 +0000)]
2008-09-29  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Sam Weinig

        https://bugs.webkit.org/show_bug.cgi?id=20921
        -webkit-animation-timing-function: inside of keyframes is ignored

        Test: animations/keyframe-timing-functions.html

        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::progress):
        * page/animation/AnimationBase.h:
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::animate):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::animate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Mon, 29 Sep 2008 21:09:18 +0000 (21:09 +0000)]
2008-09-29  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Darin Adler

        Testcase for crash when parsing keyframes from an @imported
        CSS file
        https://bugs.webkit.org/show_bug.cgi?id=20855

         * animations/import-crash-expected.txt: Added.
         * animations/import-crash.html: Added.
         * animations/import-expected.txt: Added.
         * animations/import.html: Added.
         * animations/resources/keyframes.css: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWindows build fix, take 3
mitz@apple.com [Mon, 29 Sep 2008 21:04:54 +0000 (21:04 +0000)]
Windows build fix, take 3

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWindows build fix, take 2
mitz@apple.com [Mon, 29 Sep 2008 20:57:33 +0000 (20:57 +0000)]
Windows build fix, take 2

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWindows build fix
mitz@apple.com [Mon, 29 Sep 2008 20:52:19 +0000 (20:52 +0000)]
Windows build fix

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Mon, 29 Sep 2008 20:09:59 +0000 (20:09 +0000)]
2008-09-29  David Hyatt  <hyatt@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=21218

        Accidentally removed a check to see if the scrollbar modes were equal.  This caused a crash on Windows.
        It's silly that the code was this fragile, but for now just put the check back in.

        Reviewed by Dan Bernstein

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollbarModes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Mon, 29 Sep 2008 19:49:55 +0000 (19:49 +0000)]
2008-09-29  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Sam Weinig.

        Remove the isActivationObject() virtual method on JSObject and use
        StructureID information instead. This should be slightly faster, but
        isActivationObject() is only used in assertions and unwinding the stack
        for exceptions.

        * VM/Machine.cpp:
        (JSC::depth):
        (JSC::Machine::unwindCallFrame):
        (JSC::Machine::privateExecute):
        (JSC::Machine::cti_op_ret_activation):
        * kjs/JSActivation.cpp:
        * kjs/JSActivation.h:
        * kjs/JSObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Mon, 29 Sep 2008 19:46:37 +0000 (19:46 +0000)]
2008-09-29  David Hyatt  <hyatt@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=21216

        Make setScrollPosition and scroll() cross-platform.

        Reviewed by Anders

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition):
        (WebCore::ScrollView::scroll):
        * platform/ScrollView.h:
        * platform/gtk/ScrollViewGtk.cpp:
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::platformSetScrollPosition):
        (WebCore::ScrollView::platformScroll):
        * platform/qt/ScrollViewQt.cpp:
        * platform/win/ScrollViewWin.cpp:
        * platform/wx/ScrollViewWx.cpp:
        (WebCore::ScrollView::platformSetScrollPosition):
        (WebCore::ScrollView::platformScroll):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Mon, 29 Sep 2008 19:09:44 +0000 (19:09 +0000)]
2008-09-29  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Oliver.

        Bug 21139: Profiler log message is wrong
        - Because _format was called twice the number in the log was incremented
        too many times, but we were passing it around in the link the whole time

        * page/inspector/ProfilesPanel.js:
        * page/inspector/inspector.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Sam Weinig <sam@webkit.org>
weinig@apple.com [Mon, 29 Sep 2008 19:09:02 +0000 (19:09 +0000)]
2008-09-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich.

        Autogenerate EventListeners, addEventListener and removeEventListener
        for JSDOMWindow.

        * bindings/js/JSDOMWindowBase.cpp:
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::onwebkitanimationstart):
        (WebCore::JSDOMWindow::setOnwebkitanimationstart):
        (WebCore::JSDOMWindow::onwebkitanimationiteration):
        (WebCore::JSDOMWindow::setOnwebkitanimationiteration):
        (WebCore::JSDOMWindow::onwebkitanimationend):
        (WebCore::JSDOMWindow::setOnwebkitanimationend):
        (WebCore::JSDOMWindow::onwebkittransitionend):
        (WebCore::JSDOMWindow::setOnwebkittransitionend):
        (WebCore::JSDOMWindow::addEventListener):
        (WebCore::JSDOMWindow::removeEventListener):
        (WebCore::JSDOMWindow::setListener):
        (WebCore::JSDOMWindow::getListener):
        * bindings/scripts/CodeGeneratorJS.pm:
        * page/DOMWindow.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37065 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Gunnar Sletta <gunnar@trolltech.com>
hausmann@webkit.org [Mon, 29 Sep 2008 16:08:11 +0000 (16:08 +0000)]
2008-09-29  Gunnar Sletta  <gunnar@trolltech.com>

        Reviewed by Simon

        Compile on windows using MSVC 2005

        For the PCH We need to define _WIN32_WINNT and include windows.h early on,
        otherwise we'll miss several functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Peter Gal <galpeter@inf.u-szeged.hu>
darin@apple.com [Mon, 29 Sep 2008 16:03:38 +0000 (16:03 +0000)]
2008-09-29  Peter Gal  <galpeter@inf.u-szeged.hu>

        Reviewed and tweaked by Darin Adler.

        Fix build for non-all-in-one platforms.

        * kjs/StringPrototype.cpp: Added missing ASCIICType.h include.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Bradley T. Hughes <bradley.hughes@nokia.com>
hausmann@webkit.org [Mon, 29 Sep 2008 14:55:37 +0000 (14:55 +0000)]
2008-09-29  Bradley T. Hughes  <bradley.hughes@nokia.com>

        Reviewed by Simon.

        Fix compilation with icpc

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Thiago Macieira <thiago.macieira@nokia.com>
hausmann@webkit.org [Mon, 29 Sep 2008 12:47:08 +0000 (12:47 +0000)]
2008-09-29  Thiago Macieira  <thiago.macieira@nokia.com>

        Reviewed by Simon.

        Changed copyright from Trolltech ASA to Nokia.

        Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37061 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWebCore:
jchaffraix@webkit.org [Mon, 29 Sep 2008 11:48:08 +0000 (11:48 +0000)]
WebCore:

2008-09-26  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Eric Seidel.

        Bug 5727: We want to evaluate scripts in viewless documents
        https://bugs.webkit.org/show_bug.cgi?id=5727

        Add the posibility to evaluate script or fetch resources on viewless
        document using the EmptyClient workaround.

        Test: fast/loader/viewless-document.html

        * dom/Document.h:
        (WebCore::Document::setFrame): Method to set the Document's
        Frame, added a warning that it should be used under special
        circumstances.

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElementData::requestScript): If the
        frame is empty (viewless document), get a dummy Frame to be
        able to evalute the script.
        (WebCore::ScriptElementData::evaluateScript): Ditto.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::init): Take a bool to toogle
        empty Document creation.

        (WebCore::FrameLoader::fakeLoad): Fake remote resource load.

        (WebCore::FrameLoader::createDummyFrame):
        * loader/FrameLoader.h:
        * page/Frame.cpp:
        (WebCore::Frame::isDummyFrame):
        (WebCore::Frame::setIsDummyFrame):
        (WebCore::Frame::setDocument):

        (WebCore::FramePrivate::FramePrivate): Added m_isDummyFrame.
        (WebCore::FramePrivate::~FramePrivate): We have to free the Page if it is a dummyFrame
        (a dummyFrame own its Page).

        * page/Frame.h:
        * page/FramePrivate.h:

        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::SVGImage):
        (WebCore::SVGImage::dataChanged): Use the dummy Frame
        work-around.

        * svg/graphics/SVGImage.h: Removed unused members.

LayoutTests:

2008-09-26  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Eric Seidel.

        Bug 5727: We want to evaluate scripts in viewless documents
        https://bugs.webkit.org/show_bug.cgi?id=5727

        * fast/loader/viewless-document-expected.txt: Added.
        * fast/loader/viewless-document.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37060 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Thiago Macieira <thiago.macieira@trolltech.com>
hausmann@webkit.org [Mon, 29 Sep 2008 09:03:09 +0000 (09:03 +0000)]
2008-09-29  Thiago Macieira  <thiago.macieira@trolltech.com>

        Reviewed by Simon

        Fix compilation with gcc 4.3

         gcc 4.3 is stricter and ctype.h isn't getting included
        automatically here by dependencies. So do it directly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Morten Sørvig <msorvig@trolltech.com>
hausmann@webkit.org [Mon, 29 Sep 2008 09:02:56 +0000 (09:02 +0000)]
2008-09-29  Morten Sørvig  <msorvig@trolltech.com>

        Reviewed by Simon.

        Fix compilation with Qt/Mac without plugins.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-29 Simon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Mon, 29 Sep 2008 09:02:42 +0000 (09:02 +0000)]
2008-09-29  Simon Hausmann  <hausmann@webkit.org>

        Reviewed by Lars.

        Don't accidentially install libJavaScriptCore.a for the build inside
        Qt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoApply the ASCII fast path optimization from StringImpl::lower to StringImpl::upper.
mrowe@apple.com [Mon, 29 Sep 2008 08:20:37 +0000 (08:20 +0000)]
Apply the ASCII fast path optimization from StringImpl::lower to StringImpl::upper.
In the few places that we call .upper() in WebCore the strings represent things like
tag and attribute names, which are nearly always going to be ASCII.

Reviewed by Sam Weinig.

* platform/text/StringImpl.cpp:
(WebCore::StringImpl::lower): If we have to resize the buffer, be sure to pass the new length
in to Unicode::toLower the second time.
(WebCore::StringImpl::upper):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoSpeed up getPropertyValue('clip') by 25% by using a Vector<UChar> for building a...
mrowe@apple.com [Mon, 29 Sep 2008 08:19:14 +0000 (08:19 +0000)]
Speed up getPropertyValue('clip') by 25% by using a Vector<UChar> for building a string,
rather than String::operator+=.

Reviewed by Sam Weinig.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cssText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoSpeed up computedStyle.getPropertyValue('color') by 4.5x.
mrowe@apple.com [Mon, 29 Sep 2008 08:19:09 +0000 (08:19 +0000)]
Speed up computedStyle.getPropertyValue('color') by 4.5x.

Using a Vector<UChar> while building up the property's cssText is substantially cheaper than using String::operator+=
as it avoids many memory reallocations.

This also speeds up the jQuery .offset() benchmark at <http://dev.jquery.com/~john/speed/1.2.6/offset-1.2.6.html>
by 20% due to jQuery's strange need to call getPropertyValue('color') when retrieving the computed styles for
unrelated properties on an element.

Reviewed by Oliver Hunt.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cssText): Build the result for the color types into a Vector<UChar>
and use appendNumber rather than the String::number in order to cut down on memory allocations.
* platform/text/PlatformString.h:
(WebCore::appendNumber): A helper function for formatting an unsigned character as a number
into a Vector<UChar>.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix spelling
weinig@apple.com [Mon, 29 Sep 2008 04:17:33 +0000 (04:17 +0000)]
Fix spelling

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Sam Weinig <sam@webkit.org>
weinig@apple.com [Mon, 29 Sep 2008 04:16:15 +0000 (04:16 +0000)]
2008-09-28  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Remove spurious call to lower().

        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Sam Weinig <sam@webkit.org>
weinig@apple.com [Mon, 29 Sep 2008 03:41:35 +0000 (03:41 +0000)]
2008-09-28  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Use a CaseFoldingHash instead of calling lower on family strings.

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        (WebCore::CSSFontSelector::getFontData):
        * css/CSSFontSelector.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Mon, 29 Sep 2008 03:04:08 +0000 (03:04 +0000)]
2008-09-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej Stachowiak.

        Bug 21200: Allow direct access to 'arguments' without using op_resolve
        <https://bugs.webkit.org/show_bug.cgi?id=21200>

        Allow fast access to the 'arguments' object by adding an extra slot to
        the callframe to store it.

        * JavaScriptCore.exp:
        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass):
        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::CodeGenerator):
        (JSC::CodeGenerator::registerFor):
        * VM/CodeGenerator.h:
        (JSC::CodeGenerator::registerFor):
        * VM/Machine.cpp:
        (JSC::Machine::initializeCallFrame):
        (JSC::Machine::dumpRegisters):
        (JSC::Machine::privateExecute):
        (JSC::Machine::retrieveArguments):
        (JSC::Machine::cti_op_call_JSFunction):
        (JSC::Machine::cti_op_create_arguments):
        (JSC::Machine::cti_op_construct_JSConstruct):
        * VM/Machine.h:
        * VM/Opcode.h:
        * VM/RegisterFile.h:
        (JSC::RegisterFile::):
        * kjs/JSActivation.cpp:
        (JSC::JSActivation::mark):
        (JSC::JSActivation::argumentsGetter):
        * kjs/JSActivation.h:
        (JSC::JSActivation::JSActivationData::JSActivationData):
        * kjs/NodeInfo.h:
        * kjs/Parser.cpp:
        (JSC::Parser::didFinishParsing):
        * kjs/Parser.h:
        (JSC::Parser::parse):
        * kjs/grammar.y:
        * kjs/nodes.cpp:
        (JSC::ScopeNode::ScopeNode):
        (JSC::ProgramNode::ProgramNode):
        (JSC::ProgramNode::create):
        (JSC::EvalNode::EvalNode):
        (JSC::EvalNode::create):
        (JSC::FunctionBodyNode::FunctionBodyNode):
        (JSC::FunctionBodyNode::create):
        * kjs/nodes.h:
        (JSC::ScopeNode::usesArguments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37050 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoAdd an ASCII fast-path to toLowerCase and toUpperCase.
mrowe@apple.com [Mon, 29 Sep 2008 02:45:12 +0000 (02:45 +0000)]
Add an ASCII fast-path to toLowerCase and toUpperCase.

The fast path speeds up the common case of an ASCII-only string by up to 60% while adding a less than 5% penalty
to the less common non-ASCII case.

This also removes stringProtoFuncToLocaleLowerCase and stringProtoFuncToLocaleUpperCase, which were identical
to the non-locale variants of the functions.  toLocaleLowerCase and toLocaleUpperCase now use the non-locale
variants of the functions directly.

Reviewed by Sam Weinig.

* kjs/StringPrototype.cpp:
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoSpeed up parseInt and parseFloat.
mrowe@apple.com [Mon, 29 Sep 2008 02:00:42 +0000 (02:00 +0000)]
Speed up parseInt and parseFloat.

Repeatedly indexing into a UString is slow, so retrieve a pointer into the underlying buffer once up front
and use that instead.  This is a 7% win on a parseInt/parseFloat micro-benchmark.

Reviewed by Cameron Zwarich.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Bug 21185: resolve-ChangeLogs should be able to fix poorly merged ChangeLog...
ddkilzer@apple.com [Sun, 28 Sep 2008 23:57:03 +0000 (23:57 +0000)]
    Bug 21185: resolve-ChangeLogs should be able to fix poorly merged ChangeLog entries after a git svn rebase

        <https://bugs.webkit.org/show_bug.cgi?id=21185>

        Reviewed by Adam.

        * Scripts/resolve-ChangeLogs: Added new -f|--fix-merge switch that
        will attempt to reapply the last commit to a ChangeLog file such
        that the ChangeLog entry appears at the top of the file.
        (findChangeLog): Added prototype and moved method below the exit
        statement.
        (fixMergedChangeLog): Added.  Method to fix incorrectly merged
        ChangeLog entries.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoImproves the Web Inspector node highlight so it does not scroll to reveal the node...
timothy@apple.com [Sun, 28 Sep 2008 23:31:25 +0000 (23:31 +0000)]
Improves the Web Inspector node highlight so it does not scroll to reveal the node in the page.

WebCore:

2008-09-28  Timothy Hatcher  <timothy@apple.com>

        Remove the scrollIntoViewIfNeeded() call when drawing the
        Inspector node highlight.

        <rdar://problem/6115804> Don't scroll when highlighting (21000)
        https://bugs.webkit.org/show_bug.cgi?id=21000

        Reviewed by Dan Bernstein.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::drawNodeHighlight):

WebKit/mac:

2008-09-28  Timothy Hatcher  <timothy@apple.com>

        Improves the Web Inspector node highlight so it does not scroll
        to reveal the node in the page. This makes the highlight less
        invasive and causes less things to change on screen. Also makes
        the highlight redraw when the WebView draws, so it stays current
        if the node changes on the page for any reason.

        <rdar://problem/6115804> Don't scroll when highlighting (21000)
        https://bugs.webkit.org/show_bug.cgi?id=21000

        Reviewed by Dan Bernstein.

        * WebCoreSupport/WebInspectorClient.mm:
        (-[WebInspectorWindowController highlightNode:]): Call setNeedsDisplay:YES
        if there is an existing highlight.
        (-[WebInspectorWindowController didAttachWebNodeHighlight:]): Set the current
        highlight node on the inspected WebView.
        (-[WebInspectorWindowController willDetachWebNodeHighlight:]): Set the current
        highlight node on the inspected WebView to nil.
        * WebInspector/WebNodeHighlight.m:
        (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Disable screen updates
        until flush for the inspected window. Invalidate the whole highlight view since
        we don't know the rect that needs updated since the highlight can be larger than
        the highlighted element due to the margins and other factors.
        * WebInspector/WebNodeHighlightView.m:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView drawSingleRect:]): Call setNeedsUpdateInTargetViewRect: on the
        current highlight node.
        * WebView/WebView.mm:
        (-[WebViewPrivate dealloc]): Release the current highlight node.
        (-[WebView setCurrentNodeHighlight:]): Set the current highlight node.
        (-[WebView currentNodeHighlight]): Return the current highlight node.
        * WebView/WebViewInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 19:58:14 +0000 (19:58 +0000)]
2008-09-28  David Hyatt  <hyatt@apple.com>

        Fix crash when WebKit has no instantiated Scrollbars and the appearance prefs for scrollbars are
        changed.

        Reviewed by Dan Bernstein

        * platform/mac/ScrollbarThemeMac.mm:
        (+[ScrollbarPrefsObserver appearancePrefsChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37045 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Clear the current search results in the Inspector when
timothy@apple.com [Sun, 28 Sep 2008 19:52:30 +0000 (19:52 +0000)]
    Clear the current search results in the Inspector when
        the search query is less than 3 characters long. Incremental
        searches only occur for 3 characters or longer, but deleting
        under this limit would not clear the results unless the whole
        query was deleted.

        https://bugs.webkit.org/show_bug.cgi?id=21196

        Reviewed by Dan Bernstein.

        * page/inspector/inspector.js:
        (WebInspector.performSearch): Check for short queries in the
        if statement that triggers the clear.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix typo noticed by Hyatt in review, which I forgot to fix before checking in.
mitz@apple.com [Sun, 28 Sep 2008 19:41:30 +0000 (19:41 +0000)]
Fix typo noticed by Hyatt in review, which I forgot to fix before checking in.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37043 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Reviewed by Dave Hyatt.
mitz@apple.com [Sun, 28 Sep 2008 19:38:50 +0000 (19:38 +0000)]
    Reviewed by Dave Hyatt.

        - fix <rdar://problem/6202962> "Tibetan Machine Uni" font does not work as a web font on Windows because TTLoadEmbeddedFont fails with E_NAMECHANGEFAILED

        * platform/graphics/win/FontCustomPlatformData.cpp:
        (WebCore::EOTStream::EOTStream): Added overlayDst, overlaySrc and
        overlayLength parameters.
        (WebCore::EOTStream::read): Added code to overlay the the
        m_overlayLength bytes starting at m_overlayDst with the same number of
        bytes from m_overlaySrc.
        (WebCore::createFontCustomPlatformData): Changed to get overlay
        parameters from getEOTHeader.
        * platform/graphics/win/GetEOTHeader.cpp:
        (WebCore::getEOTHeader): Added code to specify overlaying of the
        family name with the prefix of the full name if they differ, because
        that such a difference causes TTLoadEmbeddedFont to fail.
        * platform/graphics/win/GetEOTHeader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Simon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Sun, 28 Sep 2008 18:57:16 +0000 (18:57 +0000)]
2008-09-28  Simon Hausmann  <hausmann@webkit.org>

        Reviewed by David Hyatt.

        Ensure the mainThreadIdentifier is set as well as other bits and pieces of
        the threading machinery, by calling JSC::initializeThreading().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Simon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Sun, 28 Sep 2008 18:56:50 +0000 (18:56 +0000)]
2008-09-28  Simon Hausmann  <hausmann@webkit.org>

        Reviewed by David Hyatt.

        In Qt's initializeThreading re-use an existing thread identifier for the main
        thread if it exists.

        currentThread() implicitly creates new identifiers and it could be that
        it is called before initializeThreading().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Fix build warning in WebDefaultUIDelegate.m
ddkilzer@apple.com [Sun, 28 Sep 2008 18:22:05 +0000 (18:22 +0000)]
    Fix build warning in WebDefaultUIDelegate.m

        Reviewed by Dan Bernstein.

        This fixes a warning noticed by the clang static analyzer:
        .../WebDefaultUIDelegate.m: In function ‘-[WebDefaultUIDelegate webViewFirstResponder:]’:
        .../WebDefaultUIDelegate.m:92: warning: initialization from distinct Objective-C type

        Note that this doesn't actually cause any change in behavior since
        the gcc compiler ignores the semi-colon anyway.

        * DefaultDelegates/WebDefaultUIDelegate.m:
        (-[WebDefaultUIDelegate webViewFirstResponder:]): Removed semi-colon
        from method signature.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Reviewed by Eric Seidel.
ap@webkit.org [Sun, 28 Sep 2008 13:23:51 +0000 (13:23 +0000)]
    Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=20366
        Reproducible test failure for editing/undo/undo-iframe-location-change.html

        This does not fix the problem, but makes the test more predictable by using iframe onload.
        Also, makes the test runnable in browser. Turns out that the test reliably fails there too,
        even without any special steps needed in DRT.

        * editing/undo/undo-iframe-location-change-expected.txt:
        * editing/undo/undo-iframe-location-change.html:

        * ChangeLog-2007-10-14: Added bug URLs for a patch that included this test.

WebCore:
        * ChangeLog-2006-05-10: Added bug URLs for a fix that included this test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 Darin Adler <darin@apple.com>
darin@apple.com [Sun, 28 Sep 2008 09:35:06 +0000 (09:35 +0000)]
2008-09-28  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig (except for a few comment and header tweaks).

        - https://bugs.webkit.org/show_bug.cgi?id=21158
          reduce use of virtual functions in Node for speed

        Speeds up Dromaeo a bit less than 1%.

        * bindings/js/JSNamedNodesCollection.cpp: Include Element.h instead of
        Node.h now that some inlines are in there.

        * dom/Attr.h: Override both the virtual and non-virtual name functions.

        * dom/ChildNodeList.cpp:
        (WebCore::ChildNodeList::nodeMatches): Updated to take an Element.
        * dom/ChildNodeList.h: Ditto.
        * dom/ClassNodeList.cpp:
        (WebCore::ClassNodeList::nodeMatches): Ditto.
        * dom/ClassNodeList.h: Ditto.

        * dom/Document.h: Put the Node::isDocumentNode() function's inline
        definition here where it can see the Document class definition.

        * dom/DynamicNodeList.cpp:
        (WebCore::DynamicNodeList::length): Changed to pass an Element.
        (WebCore::DynamicNodeList::itemForwardsFromCurrent): Ditto.
        (WebCore::DynamicNodeList::itemBackwardsFromCurrent): Ditto.
        (WebCore::DynamicNodeList::itemWithName): Ditto.
        * dom/DynamicNodeList.h: Ditto.

        * dom/Element.cpp: Removed virtualHasTagName.
        * dom/Element.h: Made localName, prefix, namespaceURI, and
        styleForRenderer non-virtual. Added virtualPrefix, virtualLocalName,
        virtualNamespaceURI, and removed virtualHasTagName. Put the
        Node::hasTagName, Node::hasAttributes, and Node::attributes
        functions' inline definitions here where they can see the Element
        class definition.

        * dom/NameNodeList.cpp:
        (WebCore::NameNodeList::nodeMatches): Updated to take an Element.
        * dom/NameNodeList.h: Ditto.

        * dom/Node.cpp:
        (WebCore::Node::virtualPrefix): Renamed from prefix.
        (WebCore::Node::virtualLocalName): Renamed from localName.
        (WebCore::Node::virtualNamespaceURI): Renamed from namespaceURI.
        (WebCore::Node::styleForRenderer): Handle the Element case here.

        * dom/Node.h: Removed definition of hasTagName that calls virtual,
        since we now have a non-virtual version. Made hasAttributes,
        attributes, remove, localName, namespaceURI, prefix, isDocumentNode,
        and styleForRenderer non-virtual. Added virtualPrefix,
        virtualLocalName, and virtualNamespaceURI. Removed isMalformed
        and setMalformed, which are used only on HTMLFormElement objects.

        * dom/TagNodeList.cpp:
        (WebCore::TagNodeList::nodeMatches): Updated to take an Element.
        * dom/TagNodeList.h: Ditto.

        * html/HTMLAnchorElement.cpp: Added a comment.
        * html/HTMLFormControlElement.cpp: Ditto.

        * html/HTMLAnchorElement.h: Removed unused, unimplemented setTabIndex
        function. Marked tabIndex function virtual explicitly for clarity.

        * html/HTMLAreaElement.h: Removed unused, unimplemented setTabIndex
        function. Marked isFocusable function virtual explicitly for clarity.

        * html/HTMLElement.h: Marked tabIndex function virtual explicitly for
        clarity.
        * html/HTMLFormControlElement.h: Ditto.

        * html/HTMLFormElement.h: Made isMalformed non-virtual.

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError): Use the already-cast-to-HTMLElement
        pointer to call localName since that one does not need to call a virtual
        function.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock): Cast to HTMLFormElement before
        calling isMalformed. We already did a tag name check so we know it's
        an HTMLFormELement.

        * xml/XPathUtil.cpp:
        (WebCore::XPath::isValidContextNode): Rewrote to not make so many calls
        to nodeType(), since it's a virtual function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix wx bustage.
hyatt@apple.com [Sun, 28 Sep 2008 09:33:46 +0000 (09:33 +0000)]
Fix wx bustage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 08:52:26 +0000 (08:52 +0000)]
2008-09-28  David Hyatt  <hyatt@apple.com>

        Make frameRectsChanged() cross-platform on ScrollView.

        Reviewed by Oliver Hunt

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::frameRectsChanged):
        * platform/ScrollView.h:
        * platform/gtk/ScrollViewGtk.cpp:
        * platform/qt/ScrollViewQt.cpp:
        * platform/win/ScrollViewWin.cpp:
        * platform/wx/ScrollViewWx.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoBug 21141: REGRESSION: Exception messages for user entered commands are poor
oliver@apple.com [Sun, 28 Sep 2008 08:36:39 +0000 (08:36 +0000)]
Bug 21141: REGRESSION: Exception messages for user entered commands are poor
<https://bugs.webkit.org/show_bug.cgi?id=21141>

Reviewed by Maciej Stachowiak.

The bug repsonsible for this was the the JSInspectedObjectWrapper instances
were not initialising their StructureID's to indicate that the wrapper
overrides hasInstance, etc.  The solution is simply to use the createStructureID
helper on JSQuarantinedObjectWrapper to create a correct StructureID.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix GTK bustage.
hyatt@apple.com [Sun, 28 Sep 2008 08:30:43 +0000 (08:30 +0000)]
Fix GTK bustage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 08:29:47 +0000 (08:29 +0000)]
2008-09-28  David Hyatt  <hyatt@apple.com>

        Make sure pixel wheel scrolls (formerly "continuous" wheel events) send deltas to DOM wheel events in
        terms of lines.

        Reviewed by Oliver Hunt

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchWheelEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-28 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 08:21:09 +0000 (08:21 +0000)]
2008-09-28  David Hyatt  <hyatt@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=21191

        Rework mouse wheeling significantly to make the platform event less messy and to enable wheelEvent
        on ScrollView to be cross-platform.

        Give the wheel event a concept of granularity (pixel, line or page).  What used to be called continuous
        events are now pixel wheel events.

        Page scrolling as implemented in bug 17589 was completely broken.  It had the following problems:
        (1) Page scrolling has been corrected to be properly detected (on Windows
        page wheeling is only done in the vertical direction and it is keyed off a special return value of -1).  The
        old code had some bizarre incorrect heuristic for "guessing" that you should page scroll and also thought
        you could page scroll horizontally.
        (2) Page scrolling a layer used the enclosing ScrollView's width/height instead of the layer's width/height.
        This caused the scroll amount for page scrolling to be way too large on layers.

        Bug 17589 got the default horizontal scrolling value wrong.  It assumed 1, when the Vista default is 3.

        Incorporate WebCore's line multiplier right into the deltas of the event.  This eliminates the need
        for separate multiplier fields (or for the need to ask if you're looking for line sensitivity).

        Reviewed by Oliver Hunt

        * editing/EditorCommand.cpp:
        (WebCore::verticalScrollDistance):
        * page/EventHandler.cpp:
        (WebCore::scrollAndAcceptEvent):
        (WebCore::EventHandler::handleWheelEvent):
        * platform/PlatformWheelEvent.h:
        (WebCore::):
        (WebCore::PlatformWheelEvent::pos):
        (WebCore::PlatformWheelEvent::globalPos):
        (WebCore::PlatformWheelEvent::deltaX):
        (WebCore::PlatformWheelEvent::deltaY):
        (WebCore::PlatformWheelEvent::granularity):
        (WebCore::PlatformWheelEvent::x):
        (WebCore::PlatformWheelEvent::globalX):
        (WebCore::PlatformWheelEvent::ignore):
        (WebCore::PlatformWheelEvent::horizontalLineMultiplier):
        (WebCore::PlatformWheelEvent::verticalLineMultiplier):
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::wheelEvent):
        * platform/Scrollbar.h:
        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::updateScrollbars):
        * platform/gtk/WheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
        * platform/mac/ScrollViewMac.mm:
        * platform/mac/WheelEventMac.mm:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::updateScrollbars):
        * platform/qt/WheelEventQt.cpp:
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::updateScrollbars):
        * platform/win/WheelEventWin.cpp:
        (WebCore::PlatformWheelEvent::horizontalLineMultiplier):
        (WebCore::PlatformWheelEvent::verticalLineMultiplier):
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
        * platform/wx/ScrollViewWx.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
        (WebCore::ScrollView::wheelEvent):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Sun, 28 Sep 2008 05:38:57 +0000 (05:38 +0000)]
2008-09-27  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Sam Weinig.

        fix https://bugs.webkit.org/show_bug.cgi?id=20994
        <rdar://problem/6171023> HTMLVideoElement width and height attributes are now unsigned

        HTML5 spec says HTMLVideoElement width and height attributes should be unsigned. Convert
        all unsigned media attributes from string with toUInt() instead of toInt().

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::playCount): convert from attribute with toUInt().

        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::videoWidth):
        (WebCore::HTMLVideoElement::videoHeight): return unsigned to match idl.
        (WebCore::HTMLVideoElement::width): convert from attribute with toUInt() and return
          unsigned value.
        (WebCore::HTMLVideoElement::height): Ditto.
        (WebCore::HTMLVideoElement::setWidth): take unsigned value.
        (WebCore::HTMLVideoElement::setHeight): Ditto.

        * html/HTMLVideoElement.h: width, height, videoWidth, and videoHeight are unsigned.

        * html/HTMLVideoElement.idl: make width and height unsigned to match HTML5 spec.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix indentation error from bug 17589 fix made in WheelEventMac.mm
hyatt@apple.com [Sun, 28 Sep 2008 04:59:43 +0000 (04:59 +0000)]
Fix indentation error from bug 17589 fix made in WheelEventMac.mm

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoIt's SENSITIVE. SENSITIVE. Not SENSIBLE.
hyatt@apple.com [Sun, 28 Sep 2008 04:57:58 +0000 (04:57 +0000)]
It's SENSITIVE. SENSITIVE. Not SENSIBLE.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Fixes an exception when typing a command in the Console.
timothy@apple.com [Sun, 28 Sep 2008 04:40:58 +0000 (04:40 +0000)]
    Fixes an exception when typing a command in the Console.

        Reviewed by Oliver Hunt.

        * page/inspector/Console.js:
        (WebInspector.Console.prototype.addMessage): Null check
        this.previosMessage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Fixes a bug where the Profiles panel sidebar would be empty
timothy@apple.com [Sun, 28 Sep 2008 04:40:53 +0000 (04:40 +0000)]
    Fixes a bug where the Profiles panel sidebar would be empty
        after closing and reopening the Web Inspector.

        https://bugs.webkit.org/show_bug.cgi?id=21179

        Reviewed by Sam Weinig.

        * page/inspector/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype.reset): Don't call
        populateInterface, it is called automatically.
        (WebInspector.ProfilesPanel.prototype._populateProfiles):
        Return early if the sidebar is already populated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix for line step being too small on Windows.
hyatt@apple.com [Sun, 28 Sep 2008 04:38:21 +0000 (04:38 +0000)]
Fix for line step being too small on Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 03:51:41 +0000 (03:51 +0000)]
2008-09-27  David Hyatt  <hyatt@apple.com>

        Make the scrollbarUnderMouse method cross-platform.

        Reviewed by Sam Weinig

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::scrollbarUnderMouse):
        * platform/gtk/ScrollViewGtk.cpp:
        * platform/mac/ScrollViewMac.mm:
        * platform/qt/ScrollViewQt.cpp:
        * platform/win/ScrollViewWin.cpp:
        * platform/wx/ScrollViewWx.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoGtk+ build fix.
zecke@webkit.org [Sun, 28 Sep 2008 01:50:42 +0000 (01:50 +0000)]
Gtk+ build fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago/
zecke@webkit.org [Sun, 28 Sep 2008 01:49:45 +0000 (01:49 +0000)]
/
2008-09-27  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Holger Freyther.

        https://bugs.webkit.org/show_bug.cgi?id=20287
        [Gtk] disable plugins for gtk/directfb target

        Introduce WTF_PLATFORM_X11 for X11 builds.
        Also use target-specific packages when building the port

        * configure.ac: Do not check for cairo-ft for directfb builds.

WebCore
2008-09-27  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Holger Freyther.

        https://bugs.webkit.org/show_bug.cgi?id=20287
        [Gtk] disable plugins for gtk/directfb target

        Introduce WTF_PLATFORM_X11 for X11 builds.
        Also use target-specific packages when building the port

        * platform/gtk/PlatformScreenGtk.cpp:
        * plugins/gtk/PluginViewGtk.cpp:
        (WebCore::PluginView::updatePluginWidget):
        (WebCore::PluginView::getValueStatic):
        (WebCore::PluginView::getValue):
        (WebCore::PluginView::init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoMissed WebKit single line change.
hyatt@apple.com [Sun, 28 Sep 2008 01:08:44 +0000 (01:08 +0000)]
Missed WebKit single line change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoOops. Checked in stale file.
hyatt@apple.com [Sun, 28 Sep 2008 01:07:36 +0000 (01:07 +0000)]
Oops. Checked in stale file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sun, 28 Sep 2008 01:07:05 +0000 (01:07 +0000)]
2008-09-27  David Hyatt  <hyatt@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=21188

        Make scrollbar suppression and resizer avoidance cross-platform.

        Reviewed by Anders

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted):
        * page/FrameView.cpp:
        (WebCore::FrameView::resetScrollbars):
        (WebCore::FrameView::clear):
        (WebCore::FrameView::layout):
        (WebCore::FrameView::restoreScrollbar):
        (WebCore::FrameView::windowResizerRect):
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::init):
        (WebCore::ScrollView::resizerOverlapsContent):
        (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
        (WebCore::ScrollView::setParent):
        (WebCore::ScrollView::setScrollbarsSuppressed):
        (WebCore::ScrollView::platformSetScrollbarsSuppressed):
        * platform/ScrollView.h:
        (WebCore::ScrollView::scrollbarsSuppressed):
        (WebCore::ScrollView::windowResizerRect):
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::setFrameRect):
        (WebCore::Scrollbar::setParent):
        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::paint):
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::ScrollView):
        (WebCore::ScrollView::~ScrollView):
        (WebCore::ScrollView::platformSetScrollbarsSuppressed):
        (WebCore::ScrollView::setScrollPosition):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
        (WebCore::ScrollView::frameRectsChanged):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::paint):
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::paint):
        * platform/wx/ScrollViewWx.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoUpdate a layout test result to add console.trace.
timothy@apple.com [Sat, 27 Sep 2008 23:58:28 +0000 (23:58 +0000)]
Update a layout test result to add console.trace.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Sat, 27 Sep 2008 23:46:50 +0000 (23:46 +0000)]
2008-09-27  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber-stamped by Anders Carlsson.

        Compile fix.

        * plugins/PluginView.cpp:
        (WebCore::PluginView::load):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37017 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix <https://bugs.webkit.org/show_bug.cgi?id=21184>.
mrowe@apple.com [Sat, 27 Sep 2008 23:23:24 +0000 (23:23 +0000)]
Fix <https://bugs.webkit.org/show_bug.cgi?id=21184>.
Bug 21184: REGRESSION: Reproducible crash below StringImpl::hash while running editing/deleting/5408255.html

Remove an assertion that was incorrect and that if made correct would have duplicated a check that occurred earlier in the function.

Rubber-stamped by Sam Weinig.

* loader/CachedResource.cpp:
(WebCore::CachedResource::~CachedResource):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 Marco Barisione <marco.barisione@collabora.co.uk>
zecke@webkit.org [Sat, 27 Sep 2008 22:56:56 +0000 (22:56 +0000)]
2008-09-27  Marco Barisione  <marco.barisione@collabora.co.uk>

        Reviewed by Holger Freyther.

        http://bugs.webkit.org/show_bug.cgi?id=21174
        [GTK][AUTOTOOLS] Enable large file support at configure time

        * configure.ac: Enable large file support with AC_SYS_LARGEFILE.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago[qt] Use QImageReader to figure out which image formats are supported
zecke@webkit.org [Sat, 27 Sep 2008 22:46:55 +0000 (22:46 +0000)]
[qt] Use QImageReader to figure out which image formats are supported
    - Qt can have many different plugins for different image formats. Instead
      of checking only for a few in WebCore use Qt to determine if this data
      can be treated as an image.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago[qt] Clean the pattern code
zecke@webkit.org [Sat, 27 Sep 2008 22:45:21 +0000 (22:45 +0000)]
[qt] Clean the pattern code
    - Use save/restore on the painter after manipulating the
      pen/brush
    - Make the context and object null checking consistent. CG is using
      the object unconditionally so the Qt webkit platform can do the
      same.
    - Move code below the early exit. Only use the m_ownerElement before
      the early exit as the CG code is doing it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37013 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoAdded support for console.trace.
timothy@apple.com [Sat, 27 Sep 2008 22:18:35 +0000 (22:18 +0000)]
Added support for console.trace.

JavaScriptCore:

2008-09-27  Keishi Hattori  <casey.hattori@gmail.com>

        Added Machine::retrieveCaller to the export list.

        Reviewed by Kevin McCullough and Tim Hatcher.

        * JavaScriptCore.exp: Added Machine::retrieveCaller.

WebCore:

2008-09-27  Keishi Hattori  <casey.hattori@gmail.com>

        Added support for console.trace.

        https://bugs.webkit.org/show_bug.cgi?id=19157

        Reviewed by Kevin McCullough and Tim Hatcher.

        * bindings/js/JSConsoleCustom.cpp:
        (WebCore::JSConsole::trace):
        * page/Console.cpp:
        (WebCore::Console::trace): Calls Machine::retrieveCaller to
        get a stack trace.
        * page/Console.h:
        (WebCore::): Added TraceMessageLevel.
        * page/Console.idl: Added console.trace.
        * page/inspector/Console.js:
        (ConsoleMessage): Added case for TraceMessageLevel.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Sat, 27 Sep 2008 22:18:20 +0000 (22:18 +0000)]
2008-09-27  David Hyatt  <hyatt@apple.com>

        Fix for https://bugs.webkit.org/show_bug.cgi?id=21182

        Make sure Mac null checks the view like the other platforms do now that Mac goes through WebCore
        to call setAllowsScrolling.

        Reviewed by Mark Rowe

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::createFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWebKit/qt:
hyatt@apple.com [Sat, 27 Sep 2008 22:15:57 +0000 (22:15 +0000)]
WebKit/qt:

2008-09-27  David Hyatt  <hyatt@apple.com>

        Forgot to land renaming changes in WebKit.

        * Api/qwebframe.cpp:
        (QWebFrame::render):
        (QWebFrame::pos):
        (QWebFrame::geometry):
        * Api/qwebpage.cpp:
        (QWebPage::viewportSize):
        (QWebPage::setViewportSize):

WebKit/win:

2008-09-27  David Hyatt  <hyatt@apple.com>

        Land the frameGeometry->frameRect changes that I forgot to land in WebKit.

        * Interfaces/IWebScrollBarPrivate.idl:
        * WebCoreSupport/EmbeddedWidget.cpp:
        (EmbeddedWidget::setFrameRect):
        (EmbeddedWidget::frameRectsChanged):
        * WebCoreSupport/EmbeddedWidget.h:
        * WebScrollBar.cpp:
        (WebScrollBar::setRect):
        (WebScrollBar::frameRect):
        * WebScrollBar.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago Rubber-stamped by Sam Weinig.
mitz@apple.com [Sat, 27 Sep 2008 21:30:45 +0000 (21:30 +0000)]
    Rubber-stamped by Sam Weinig.

        - fix typo in test name

        * media/video-click-dblckick-standalone-expected.txt: Copied from media/video-click-dlbclick-standalone-expected.txt.
        * media/video-click-dblckick-standalone.html: Copied from media/video-click-dlbclick-standalone.html.
        * media/video-click-dlbclick-standalone-expected.txt: Removed.
        * media/video-click-dlbclick-standalone.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoWebCore:
andersca@apple.com [Sat, 27 Sep 2008 21:28:40 +0000 (21:28 +0000)]
WebCore:

2008-09-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21178
        <rdar://problem/6248651>

        Check if the plug-in is allowed to load the resource. This matches Firefox.

        Test: http/tests/plugins/local-geturl-from-remote.html

        * plugins/PluginView.cpp:
        (WebCore::PluginView::load):

WebKit/mac:

2008-09-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21178
        <rdar://problem/6248651>

        Check if the plug-in is allowed to load the resource. This matches Firefox.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):

WebKitTools:

2008-09-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21178
        <rdar://problem/6248651>

        Return the result value from getURL.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
        (getURL):

LayoutTests:

2008-09-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21178
        <rdar://problem/6248651>

        Add tests.

        * http/tests/plugins/local-geturl-from-remote-expected.txt: Added.
        * http/tests/plugins/local-geturl-from-remote.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-27 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Sat, 27 Sep 2008 21:13:36 +0000 (21:13 +0000)]
2008-09-27  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * WebCoreSupport/EmbeddedWidget.cpp:
        (EmbeddedWidget::setFrameRect):
        (EmbeddedWidget::frameRectsChanged):
        * WebCoreSupport/EmbeddedWidget.h:
        * WebScrollBar.cpp:
        (WebScrollBar::setRect):
        (WebScrollBar::frameGeometry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2008-09-22 Dirk Schulze <vbs85@gmx.de>
zecke@webkit.org [Sat, 27 Sep 2008 21:06:35 +0000 (21:06 +0000)]
2008-09-22  Dirk Schulze  <vbs85@gmx.de>

        Reviewed by Eric Seidel.

        Added SVG pattern support to Qt.

        [Qt] SVG patterns are missing
        https://bugs.webkit.org/show_bug.cgi?id=20973

        * svg/graphics/qt/SVGPaintServerPatternQt.cpp:
        (WebCore::SVGPaintServerPattern::setup):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37006 268f45cc-cd09-0410-ab3c-d52691b4dbfc