WebKit-https.git
15 years ago Fixed a broken test to actually work (and fail).
ap [Sun, 28 Jan 2007 19:35:43 +0000 (19:35 +0000)]
    Fixed a broken test to actually work (and fail).

        * dom/svg/level3/xpath/Conformance_ID-expected.checksum: Removed.
        * dom/svg/level3/xpath/Conformance_ID-expected.png: Removed.
        * dom/svg/level3/xpath/Conformance_ID-expected.txt:
        * dom/svg/level3/xpath/Conformance_ID.svg:

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

15 years ago Reviewed by Ada.
aroben [Sun, 28 Jan 2007 06:00:23 +0000 (06:00 +0000)]
    Reviewed by Ada.

        Fix <rdar://problem/4957184> REGRESSION: After creating a new mail
        message, the caret is automatically in message body

        -[WebHTMLView _updateActiveState] was calling
        FocusController::focusedOrMainFrame, which had the surprising
        side-effect of setting the focused frame if there was none. The fix
        was to remove this side-effect.

        No tests possible, as this bug involves focus outside the WebView,
        which we have no support for in DRT.

        Change inspired by Dave Harrison.

        * page/FocusController.cpp:
        (WebCore::FocusController::focusedOrMainFrame): Removed this method's
        non-obvious side-effect of setting the focused frame.
        * WebCore.xcodeproj/project.pbxproj: Version wars.

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

15 years agoWebCore:
ddkilzer [Sun, 28 Jan 2007 04:39:15 +0000 (04:39 +0000)]
WebCore:

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11880: Improve some egregious
        Windows form control drawing issues:
        Provide Classic mode fallbacks for the button/textfield drawing
        routines.
        Provide some basic drawing of menulists (still relatively broken).
        Some cleanup.

        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::RenderThemeWin::systemFont):
        * rendering/RenderThemeWin.cpp:
        (WebCore::m_menuListTheme):
        (WebCore::RenderThemeWin::close):
        (WebCore::RenderThemeWin::determineClassicState):
        (WebCore::RenderThemeWin::getThemeData):
        (WebCore::RenderThemeWin::paintButton):
        (WebCore::RenderThemeWin::paintTextField):
        (WebCore::RenderThemeWin::paintMenuList):
        (WebCore::RenderThemeWin::paintMenuListButton):
        * rendering/RenderThemeWin.h:
        (WebCore::ThemeData::m_classicState):
        (WebCore::RenderThemeWin::setRadioSize):
        (WebCore::RenderThemeWin::paintTextArea):

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

15 years agoWebCore:
ddkilzer [Sun, 28 Jan 2007 04:34:26 +0000 (04:34 +0000)]
WebCore:

        Reviewed by Adam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12260
          Windows platform build is not maintained

        * loader/win/FrameLoaderWin.cpp:
        * platform/network/win/ResourceHandleWin.cpp:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::contextMenuItemTagOpenLinkInNewWindow):
        (WebCore::contextMenuItemTagDownloadLinkToDisk):
        (WebCore::contextMenuItemTagCopyLinkToClipboard):
        (WebCore::contextMenuItemTagOpenImageInNewWindow):
        (WebCore::contextMenuItemTagDownloadImageToDisk):
        (WebCore::contextMenuItemTagCopyImageToClipboard):
        (WebCore::contextMenuItemTagOpenFrameInNewWindow):
        (WebCore::contextMenuItemTagCopy):
        (WebCore::contextMenuItemTagGoBack):
        (WebCore::contextMenuItemTagGoForward):
        (WebCore::contextMenuItemTagStop):
        (WebCore::contextMenuItemTagReload):
        (WebCore::contextMenuItemTagCut):
        (WebCore::contextMenuItemTagPaste):
        (WebCore::contextMenuItemTagNoGuessesFound):
        (WebCore::contextMenuItemTagIgnoreSpelling):
        (WebCore::contextMenuItemTagLearnSpelling):
        (WebCore::contextMenuItemTagSearchWeb):
        (WebCore::contextMenuItemTagLookUpInDictionary):
        (WebCore::contextMenuItemTagOpenLink):
        (WebCore::contextMenuItemTagIgnoreGrammar):
        (WebCore::contextMenuItemTagSpellingMenu):
        (WebCore::contextMenuItemTagShowSpellingPanel):
        (WebCore::contextMenuItemTagCheckSpelling):
        (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
        (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
        (WebCore::contextMenuItemTagFontMenu):
        (WebCore::contextMenuItemTagBold):
        (WebCore::contextMenuItemTagItalic):
        (WebCore::contextMenuItemTagUnderline):
        (WebCore::contextMenuItemTagOutline):
        (WebCore::contextMenuItemTagWritingDirectionMenu):
        (WebCore::contextMenuItemTagDefaultDirection):
        (WebCore::contextMenuItemTagLeftToRight):
        (WebCore::contextMenuItemTagRightToLeft):
        (WebCore::DocumentLoader::unreachableURL):
        (WebCore::FrameLoader::redirectDataToPlugin):
        (WebCore::FrameLoader::partClearedInBegin):
        (WebCore::FrameLoader::createPlugin):

WebKit:

        Reviewed by Adam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12260
          Windows platform build is not maintained

        * COM/ChromeClientWin.cpp:
        (ChromeClientWin::canTakeFocus):
        (ChromeClientWin::takeFocus):
        * COM/ChromeClientWin.h:
        * COM/ContextMenuClientWin.cpp:
        (ContextMenuClientWin::getCustomMenuFromDefaultItems):
        (ContextMenuClientWin::searchWithGoogle):
        * COM/ContextMenuClientWin.h:
        * COM/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::assignIdentifierToInitialRequest):
        (WebFrameLoaderClient::dispatchWillSendRequest):
        (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
        (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
        (WebFrameLoaderClient::dispatchDidReceiveResponse):
        (WebFrameLoaderClient::dispatchDidReceiveContentLength):
        (WebFrameLoaderClient::dispatchDidFinishLoading):
        (WebFrameLoaderClient::dispatchDidFailLoading):
        (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
        (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
        (WebFrameLoaderClient::dispatchDidFailLoad):
        (WebFrameLoaderClient::dispatchCreatePage):
        (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
        (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
        (WebFrameLoaderClient::setMainDocumentError):
        (WebFrameLoaderClient::incrementProgress):
        (WebFrameLoaderClient::completeProgress):
        (WebFrameLoaderClient::startDownload):
        (WebFrameLoaderClient::committedLoad):
        (WebFrameLoaderClient::cancelledError):
        (WebFrameLoaderClient::cannotShowURLError):
        (WebFrameLoaderClient::interruptForPolicyChangeError):
        (WebFrameLoaderClient::cannotShowMIMETypeError):
        (WebFrameLoaderClient::fileDoesNotExistError):
        (WebFrameLoaderClient::shouldFallBack):
        (WebFrameLoaderClient::willUseArchive):
        (WebFrameLoaderClient::createDocumentLoader):
        (WebFrameLoaderClient::download):
        * COM/WebFrameLoaderClient.h:

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

15 years agoLayoutTests:
ddkilzer [Sun, 28 Jan 2007 04:29:06 +0000 (04:29 +0000)]
LayoutTests:

        Reviewed by NOBODY (missing pixel test results).

        * fast/dom/gc-10-expected.checksum: Added.
        * fast/dom/gc-10-expected.png: Added.
        * http/tests/misc/location-replace-crossdomain-expected.checksum: Added.
        * http/tests/misc/location-replace-crossdomain-expected.png: Added.

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

15 years ago Reviewed by Beth Dakin.
ggaren [Sun, 28 Jan 2007 02:58:47 +0000 (02:58 +0000)]
    Reviewed by Beth Dakin.

        Added some missing JSLocks, which might fix <rdar://problem/4889707>.

        We need to lock whenever we might allocate memory because our FastMalloc
        implementation requires clients to register their threads, which we do
        through JSLock.

        We also need to lock whenever modifying ref-counts because they're not
        thread-safe.

        * API/JSObjectRef.cpp:
        (JSClassCreate): Allocates memory
        (JSClassRetain): Modifies a ref-count
        (JSClassRelease): Modifies a ref-count
        (JSPropertyNameArrayRetain): Modifies a ref-count
        (JSPropertyNameArrayRelease): Modifies a ref-count
        * API/JSStringRef.cpp:
        (JSStringRetain): Modifies a ref-count
        * API/JSValueRef.cpp:
        (JSValueIsInstanceOfConstructor): Might allocate memory if an exception
        is thrown.

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

15 years agoLayoutTests:
weinig [Sat, 27 Jan 2007 22:37:08 +0000 (22:37 +0000)]
LayoutTests:

        Reviewed by Mitz.

        - Test for http://bugs.webkit.org/show_bug.cgi?id=11957
          Unordered List Bullets too big and changing from size

        * fast/lists/big-list-marker-expected.checksum: Added.
        * fast/lists/big-list-marker-expected.png: Added.
        * fast/lists/big-list-marker-expected.txt: Added.
        * fast/lists/big-list-marker.html: Added.

WebCore:

        Reviewed by Mitz.

        - Patch for http://bugs.webkit.org/show_bug.cgi?id=11957
          REGRESSION: Unordered List Bullets too big and changing from size

        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint): Explicitly set the stroke size to 1.0f.

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

15 years ago Reviewed by Kevin.
harrison [Sat, 27 Jan 2007 21:01:46 +0000 (21:01 +0000)]
    Reviewed by Kevin.

        <rdar://problem/4958902> REGRESSION: Dashboard widgets fail to load

        This was caused by the WebView preferences rework in r18417. Specifically, in
        _updateWebCoreSettingsFromPreferences when calling setUserStyleSheetLocation,
        [NSURL URLWithString:] is now messaged directly with the result of
        [[preferences userStyleSheetLocation] _web_originalDataAsString]], which will
        be nil if the userStyleSheetLocation has not been set yet. [NSURL URLWithString:]
        throws an exception when the string is nil. DashboardClient.app calls
        setUserStyleSheetEnabled *before* calling setUserStyleSheetLocation.

        * WebView/WebView.mm:
        (-[WebView _updateWebCoreSettingsFromPreferences:]):
        Pass empty string instead of nil string to [NSURL URLWithString:].

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

15 years ago Fix the Qt build and disable the usage
lars [Sat, 27 Jan 2007 20:34:46 +0000 (20:34 +0000)]
    Fix the Qt build and disable the usage
        of QScrollbars for PlatformScrollBar for
        now as it causes crashes in the layout tests.

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

15 years agoWebCore:
ddkilzer [Sat, 27 Jan 2007 15:52:16 +0000 (15:52 +0000)]
WebCore:

        Reviewed by NOBODY (buildbot build fix).

        * ksvg2/svg/ColorDistance.cpp:
        (WebCore::ColorDistance::scaledDistance): Added static cast of arguments to int.

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

15 years ago Reviewed by NOBODY (typo in method name fix).
rwlbuis [Sat, 27 Jan 2007 15:00:34 +0000 (15:00 +0000)]
    Reviewed by NOBODY (typo in method name fix).

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

15 years ago2007-01-27 Eric Seidel <eric@webkit.org>
eseidel [Sat, 27 Jan 2007 11:24:55 +0000 (11:24 +0000)]
2007-01-27  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Fix support for SVG's <set> element.

        Manual test added.

        * ksvg2/svg/SVGSetElement.cpp:
        (WebCore::SVGSetElement::updateAnimatedValue):
        (WebCore::SVGSetElement::calculateFromAndToValues):
        * ksvg2/svg/SVGSetElement.h:
        * manual-tests/animation/set-to.svg: Added.

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

15 years ago Release build fix.
ap [Sat, 27 Jan 2007 10:16:09 +0000 (10:16 +0000)]
    Release build fix.

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset):

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

15 years ago Reviewed by Darin.
ap [Sat, 27 Jan 2007 10:02:30 +0000 (10:02 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12389
        Chinese decoding error at hk.antispam.yahoo.com

        Test: fast/encoding/noscript-in-head.html

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): We were already allowing
        NOSCRIPT tags in head, let's actually skip over their content.

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

15 years ago Added forgotten Radar reference.
aroben [Sat, 27 Jan 2007 07:53:48 +0000 (07:53 +0000)]
Added forgotten Radar reference.

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

15 years agoJavaScriptCore:
ggaren [Sat, 27 Jan 2007 04:50:17 +0000 (04:50 +0000)]
JavaScriptCore:

        Reviewed by Maciej Stachowiak.

        Fixed <rdar://problem/4608404> WebScriptObject's _rootObject lack
        of ownership policy causes crashes (e.g., in Dashcode)

        The old model for RootObject ownership was either to (1) leak them or (2) assign
        them to a single owner -- the WebCore::Frame -- which would destroy them
        when it believed that all of its plug-ins had unloaded.

        This model was broken because of (1) and also because plug-ins are not the only
        RootObject clients. All Bindings clients are RootObjects clients, including
        applications, which outlive any particular WebCore::Frame.

        The new model for RootObject ownership is to reference-count them, with a
        throw-back to the old model: The WebCore::Frame tracks the RootObjects
        it creates, and invalidates them when it believes that all of its plug-ins
        have unloaded.

        We maintain this throw-back to avoid plug-in leaks, particularly from Java.
        Java is completely broken when it comes to releasing JavaScript objects.
        Comments in our code allege that Java does not always call finalize when
        collecting objects. Moreoever, my own testing reveals that, when Java does
        notify JavaScript of a finalize, the data it provides is totally bogus.

        This setup is far from ideal, but I don't think we can do better without
        completely rewriting the bindings code, and possibly part of the Java
        plug-in / VM.

        Layout tests pass. No additional leaks reported. WebCore/manual-tests/*liveconnect*
        and a few LiveConnect demos on the web also run without a hitch.

        const RootObject* => RootObject*, since we need to ref/deref

        * bindings/NP_jsobject.cpp:
        (jsDeallocate): deref our RootObjects. Also unprotect or JSObject, instead
        of just relying on the RootObject to do it for us when it's invalidated.
        (_isSafeScript): Check RootObject validity.
        (_NPN_CreateScriptObject): ditto
        (_NPN_Invoke): ditto
        (_NPN_Evaluate): ditto
        (_NPN_GetProperty): ditto
        (_NPN_SetProperty): ditto
        (_NPN_RemoveProperty): ditto
        (_NPN_HasProperty): ditto
        (_NPN_HasMethod): ditto
        (_NPN_SetException): ditto

        * bindings/runtime_root.cpp:
        Revived bit-rotted LIAR LIAR LIAR comment.

        LOOK: Added support for invalidating RootObjects without deleting them,
        which is the main goal of this patch.

        Moved protect counting into the RootObject class, to emphasize that
        the RootObject protects the JSObject, and unprotects it upon being invalidated.
            addNativeReference => RootObject::gcProtect
            removeNativeReference => RootObject::gcUnprotect
            ProtectCountSet::contains => RootObject::gcIsProtected

        I know we'll all be sad to see the word "native" go.

        * bindings/runtime_root.h: Added ref-counting support to RootObject, with
        all the standard accoutrements.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertValueToNPVariant): If we can't find a valid RootObject,
        return void instead of just leaking.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::JavaInstance): Don't take a RootObject in our constructor;
        be like other Instances and require the caller to call setRootObject. This
        reduces the number of ownership code paths.
        (JavaInstance::invokeMethod): Check RootObject for validity.
        * bindings/jni/jni_instance.h: Removed private no-arg constructor. Having
        an arg constructor accomplishes the same thing.

        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::invoke): No need to call findProtectCountSet, because finalize()
        checks for RootObject validity.
        (JavaJSObject::JavaJSObject): check RootObject for validity
        (JavaJSObject::call): ditto
        (JavaJSObject::eval): ditto
        (JavaJSObject::getMember): ditto
        (JavaJSObject::setMember): ditto
        (JavaJSObject::removeMember): ditto
        (JavaJSObject::getSlot): ditto
        (JavaJSObject::setSlot): ditto
        (JavaJSObject::toString): ditto
        (JavaJSObject::finalize): ditto
        (JavaJSObject::createNative): No need to tell the RootObject to protect
        the global object, since the RootObject already owns the interpreter.

        * bindings/jni/jni_runtime.cpp:
        (JavaArray::JavaArray): Removed copy construcutor becaue it was unused.
        Dead code is dangerous code.

        * bindings/objc/objc_runtime.mm: Added WebUndefined protocol. Previous use
        of WebScriptObject was bogus, because WebUndefined is not a subclass of
        WebScriptObject.
        (convertValueToObjcObject): If we can't find a valid RootObject,
        return nil instead of just leaking.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue): If we can't find a valid RootObject,
        return nil instead of just leaking.

LayoutTests:

        Reviewed by Maciej Stachowiak.

        Added test for <rdar://problem/4608404> WebScriptObject's _rootObject lack
        of ownership policy causes crashes (e.g., in Dashcode)

        No test for Java or NPP versions of this bug because there's no reliable way to
        make Java and NPP objects outlive their RootObjects (although Java objects
        sometimes do).

        * plugins/root-object-premature-delete-crash-expected.txt: Added.
        * plugins/root-object-premature-delete-crash.html: Added.

WebCore:

        Reviewed by Maciej Stachowiak.

        Fixed <rdar://problem/4608404> WebScriptObject's _executionContext lack
        of ownership policy causes crashes (e.g., in Dashcode)

        Added RootObject ref-counting goodness.

        * page/mac/FrameMac.h:
        * page/mac/FrameMac.mm:
        (WebCore::FrameMac::cleanupPluginObjects): Invalidate our RootObjects
        instead of detroying them. Track _bindingRootObject separately from the
        rest of our RootObjects, since it has its own variable.

        * page/mac/WebCoreFrameBridge.mm:
        (createRootObject): Use the Frame's new, more encapsulated function to
        create a RootObject.

        * bindings/objc/WebScriptObject.mm: Nixed rootObject setters, since they
        were unused and they complicated reference-counting.

WebKitTools:

        Reviewed by Maciej Stachowiak.

        Added support for test for <rdar://problem/4608404> WebScriptObject's
        _rootObject lack of ownership policy causes crashes (e.g., in Dashcode)

        * DumpRenderTree/DumpRenderTree.m:
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (+[LayoutTestController webScriptNameForSelector:]):
        (-[LayoutTestController storeWebScriptObject:]):
        (-[LayoutTestController accessStoredWebScriptObject]):
        (-[LayoutTestController dealloc]):

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

15 years agoWebKit:
ddkilzer [Sat, 27 Jan 2007 04:28:18 +0000 (04:28 +0000)]
WebKit:

        Reviewed by Timothy.

        Fixes crash drawing avatar on mail.yahoo.com.

        * Plugins/WebBaseNetscapePluginStream.m: Retain the object since destroyStreamWithError: might
        release the last reference to it.

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

15 years agoWebCore:
ddkilzer [Sat, 27 Jan 2007 03:51:18 +0000 (03:51 +0000)]
WebCore:

        Reviewed by Eric.

        Release build fix.

        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast): Added static cast
        to unsigned when calculating flooredValueIndex.

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

15 years agoJavaScriptCore:
aliceli1 [Sat, 27 Jan 2007 02:31:28 +0000 (02:31 +0000)]
JavaScriptCore:

        Reviewed by Maciej.

        Fix for Repeated string concatenation results in OOM crash
        http://bugs.webkit.org/show_bug.cgi?id=11131

        * kjs/operations.cpp:
        (KJS::add): Throw exception if string addition result is null
        * kjs/ustring.cpp:
        (KJS::UString::UString): Don't call memcpy when malloc failed

LayoutTests:

        Reviewed by Maciej.

        Test for "Repeated string concatenation results in OOM crash"
        http://bugs.webkit.org/show_bug.cgi?id=11131

        * fast/js/resources/string-concatenate-outofmemory.js: Added.
        * fast/js/string-concatenate-outofmemory-expected.txt: Added.
        * fast/js/string-concatenate-outofmemory.html: Added.

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

15 years ago - checked in slightly newer revision of the patch below
darin [Sat, 27 Jan 2007 02:21:49 +0000 (02:21 +0000)]
    - checked in slightly newer revision of the patch below

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        Grouped all the unimplemented values at the bottom. Fixed the ifdef for
        CSS_PROP__WEBKIT_DASHBOARD_REGION so that it compiles on all platforms.

        * css/cssparser.cpp: (WebCore::CSSParser::parseValue): Removed default
        case and added type so that the compiler warns about missing properties.
        * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::applyProperty): Ditto.

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

15 years agoLayoutTests:
weinig [Sat, 27 Jan 2007 02:13:39 +0000 (02:13 +0000)]
LayoutTests:

        Reviewed by Beth.

        - updated test results for change to computed style

        * editing/pasteboard/paste-table-002-expected.txt:
        Updated for change to order of style properties.

        * fast/css/computed-style-expected.txt:
        Updated for change to order of style properties and to add new ones.

WebCore:

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12412
          "unimplemented propertyID: 46" seen at dojotoolkit.org

        Covered by fast/css/computed-style.html

        * css/CSSPropertyNames.in: Sorted the file into two separate sections, one
        for properties without the -webkit- prefix and another for properties with.

        * css/makeprop: Generate a CSSPropertyID enum instead of a set of #defines.
        Removed unused CSS_PROP_MIN and CSS_PROP_MAX. Renamed CSS_PROP_TOTAL to
        numCSSProperties and changed it to a const int instead of #define.
        Added a declaration of getPropertyName in the header. Changed the return
        type of getPropertyName to const char* and the parameter type to CSSPropertyID.

        * css/CSSComputedStyleDeclaration.cpp: Sort the lists of properties in
        an easier to maintain order -- properties without a WebKit prefix first.
        (WebCore::valueForLength): Changed return value to PassRefPtr.
        (WebCore::valueForMaxLength): Ditto.
        (WebCore::valueForBorderStyle): Ditto.
        (WebCore::valueForTextAlign): Ditto.
        (WebCore::valueForAppearance): Added.
        (WebCore::valueForMarginCollapse): Added.
        (WebCore::valueForShadow): Changed return value to PassRefPtr.
        (WebCore::getPositionOffsetValue): Ditto.
        (WebCore::currentColorOrValidColor): Ditto.
        (WebCore::CSSComputedStyleDeclaration::cssText): Added cast since
        getPropertyName now takes an enum value.
        (WebCore::primitiveValueFromLength): Changed return value to PassRefPtr.
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        Added cast to CSSPropertyID so that gcc will detect missing enums in the
        switch statement. Simplified the background-size and border-spacing
        implementations so they don't have local variables. Added lots of cases
        to the switch statement for unimplemented properties. Implemented the
        outline-width, box-sizing, -webkit-appearance, -webkit-rtl-ordering,
        -webkit-user-drag, and -webkit-user-select properties.
        (WebCore::CSSComputedStyleDeclaration::item): Added cast since
        getPropertyName now takes an enum value.

        * css/CSSMutableStyleDeclaration.cpp: Removed declaration of getPropertyName.
        (WebCore::CSSMutableStyleDeclaration::item): Added cast since
        getPropertyName now takes an enum value.

        * css/CSSProperty.cpp: Removed declaration of getPropertyName.
        (WebCore::CSSProperty::cssText): Added cast since
        getPropertyName now takes an enum value and returns a const char*.

        * css/CSSStyleDeclaration.cpp: Removed declaration of getPropertyName.
        (WebCore::CSSStyleDeclaration::getPropertyShorthand): Added cast since
        getPropertyName now takes an enum value and returns a const char*.

WebKit:

        Reviewed by Beth.

        * WebInspector/webInspector/inspector.js: Updated for new computed style properties.

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

15 years ago Reviewed by Brady.
aliceli1 [Sat, 27 Jan 2007 02:11:15 +0000 (02:11 +0000)]
    Reviewed by Brady.

        Fixed <rdar://problem/4838076> CrashTracer: 10 crashes in Mail at com.apple.WebCore: WTF::HashMap<WebCore::String

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestResource):
        Added nil check around resource from cache.

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

15 years ago Reviewed by Oliver.
aroben [Sat, 27 Jan 2007 02:05:52 +0000 (02:05 +0000)]
    Reviewed by Oliver.

        Build fix.

        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast):
        Keep index variables as unsigned until we need to convert to float.

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

15 years agoLayoutTests:
aliceli1 [Sat, 27 Jan 2007 02:04:41 +0000 (02:04 +0000)]
LayoutTests:

        Reviewed by Ada.

        Added tests for <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)

        * editing/pasteboard/emacs-ctrl-a-k-y-expected.checksum: Added.
        * editing/pasteboard/emacs-ctrl-a-k-y-expected.png: Added.
        * editing/pasteboard/emacs-ctrl-a-k-y-expected.txt: Added.
        * editing/pasteboard/emacs-ctrl-a-k-y.html: Added.
        Test for <rdar://problem/4919097>

        * editing/deleting/delete-by-word-001-expected.txt:
        * editing/deleting/delete-by-word-002-expected.txt:
        * editing/deleting/delete-to-end-of-paragraph-expected.txt:
        * editing/pasteboard/emacs-cntl-y-001-expected.txt:
        The expected results of these tests were affected by the WebCore checkin of the same number.  The results are the same, but there were more editing delegates that were called, as expected.  I suspect these tests were created during the time that <rdar://problem/4919097> was broken

WebCore:

        Reviewed by Ada.

        Fixed <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)

        * editing/Editor.cpp:
        (WebCore::Editor::deleteWithDirection):
        If there's no selection, locally create a range that is to the end of the granularity unit and pass that to deleteRange().

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

15 years ago Reviewed by Maciej.
weinig [Sat, 27 Jan 2007 01:55:00 +0000 (01:55 +0000)]
    Reviewed by Maciej.

        Qt build fix.

        * page/qt/EventHandlerQt.cpp:

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

15 years ago Reviewed by Hyatt.
weinig [Sat, 27 Jan 2007 01:43:28 +0000 (01:43 +0000)]
    Reviewed by Hyatt.

        Fix so that we only relayout frameset children on calls to layout.

        * page/FrameView.cpp:
        (WebCore::FrameView::layout):

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

15 years ago2007-01-26 Oliver Hunt <oliver@apple.com>
oliver [Sat, 27 Jan 2007 01:35:06 +0000 (01:35 +0000)]
2007-01-26  Oliver Hunt  <oliver@apple.com>

        Build Fix

        * ksvg2/svg/ColorDistance.cpp:
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::handleTimerEvent):

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

15 years ago2007-01-26 Eric Seidel <eric@webkit.org>
eseidel [Sat, 27 Jan 2007 00:59:58 +0000 (00:59 +0000)]
2007-01-26  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Add support for calcMode, keyTimes and (nearly) keySplines.
        http://bugs.webkit.org/show_bug.cgi?id=12350
        Re-architect much of the animation system to remove huge sections of code.
        Added new ColorDistance, SVGTransformDistance to simplify animateColor, animateTransform calculations.
        I also added basic <animateMotion> support since it was so easy w/ the new architecture.

        Adding manual animation tests until bug 12074 is fixed.

        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/misc/SVGTimer.cpp:
        (WebCore::SVGTimer::applyAnimations):
        * ksvg2/svg/ColorDistance.cpp: Added.
        (WebCore::ColorDistance::ColorDistance):
        (WebCore::clampColorValue):
        (WebCore::ColorDistance::scaledDistance):
        (WebCore::ColorDistance::addColorsAndClamp):
        (WebCore::ColorDistance::addToColorAndClamp):
        (WebCore::ColorDistance::isZero):
        (WebCore::ColorDistance::distance):
        * ksvg2/svg/ColorDistance.h: Added.
        * ksvg2/svg/SVGAnimateColorElement.cpp:
        (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
        (WebCore::SVGAnimateColorElement::updateAnimationBaseValueFromElement):
        (WebCore::SVGAnimateColorElement::applyAnimatedValueToElement):
        (WebCore::SVGAnimateColorElement::updateAnimatedValue):
        (WebCore::SVGAnimateColorElement::calculateFromAndToValues):
        * ksvg2/svg/SVGAnimateColorElement.h:
        (WebCore::SVGAnimateColorElement::contextElement):
        * ksvg2/svg/SVGAnimateElement.h:
        (WebCore::SVGAnimateElement::updateAnimatedValue):
        (WebCore::SVGAnimateElement::calculateFromAndToValues):
        * ksvg2/svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::hasValidTarget):
        (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
        (WebCore::parsePoint):
        (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
        (WebCore::SVGAnimateMotionElement::updateAnimationBaseValueFromElement):
        (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
        * ksvg2/svg/SVGAnimateMotionElement.h:
        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
        (WebCore::SVGAnimateTransformElement::updateAnimatedValue):
        (WebCore::SVGAnimateTransformElement::updateAnimationBaseValueFromElement):
        (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
        (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
        (WebCore::SVGAnimateTransformElement::parseTransformValue):
        * ksvg2/svg/SVGAnimateTransformElement.h:
        (WebCore::SVGAnimateTransformElement::contextElement):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseKeyNumbers):
        (WebCore::parseValues):
        (WebCore::parseKeySplines):
        (WebCore::SVGAnimationElement::parseMappedAttribute):
        (WebCore::SVGAnimationElement::targetAttributeAnimatedValue):
        (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
        (WebCore::SVGAnimationElement::detectAnimationMode):
        (WebCore::adjustPercentagePastForKeySplines):
        (WebCore::SVGAnimationElement::valueIndexAndPercentagePastForDistance):
        (WebCore::SVGAnimationElement::calculateTotalDistance):
        (WebCore::caculateValueIndexForKeyTimes):
        (WebCore::SVGAnimationElement::isValidAnimation):
        (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast):
        (WebCore::SVGAnimationElement::updateAnimationBaseValueFromElement):
        (WebCore::SVGAnimationElement::applyAnimatedValueToElement):
        (WebCore::SVGAnimationElement::handleTimerEvent):
        (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::SVGPolyParser::parsePoints):
        * ksvg2/svg/SVGParserUtilities.h:
        * ksvg2/svg/SVGSetElement.cpp:
        * ksvg2/svg/SVGSetElement.h:
        (WebCore::SVGSetElement::updateAnimatedValue):
        (WebCore::SVGSetElement::calculateFromAndToValues):
        * ksvg2/svg/SVGTransform.cpp:
        (SVGTransform::type):
        (SVGTransform::translate):
        (SVGTransform::scale):
        (SVGTransform::setSkewX):
        (SVGTransform::setSkewY):
        * ksvg2/svg/SVGTransform.h:
        (WebCore::operator==):
        (WebCore::operator!=):
        * ksvg2/svg/SVGTransformDistance.cpp: Added.
        (WebCore::SVGTransformDistance::SVGTransformDistance):
        (WebCore::SVGTransformDistance::scaledDistance):
        (WebCore::SVGTransformDistance::addSVGTransforms):
        (WebCore::SVGTransformDistance::addSVGTransform):
        (WebCore::SVGTransformDistance::addToSVGTransform):
        (WebCore::SVGTransformDistance::isZero):
        (WebCore::SVGTransformDistance::distance):
        * ksvg2/svg/SVGTransformDistance.h: Added.
        * ksvg2/svg/SVGTransformList.cpp:
        (SVGTransformList::concatenateForType):
        * ksvg2/svg/SVGTransformList.h:
        * manual-tests/animation/animateColor-by.svg: Added.
        * manual-tests/animation/animateColor-from-by.svg: Added.
        * manual-tests/animation/animateColor-repeat-indefinite.svg: Added.
        * manual-tests/animation/animateColor-to-from.svg: Added.
        * manual-tests/animation/animateColor-to.svg: Added.
        * manual-tests/animation/animateColor-values-simple.svg: Added.
        * manual-tests/animation/animateMotion-to.svg: Added.
        * manual-tests/animation/animateTransform-keyTimes.svg: Added.
        * manual-tests/animation/animateTransform-repeat-once.svg: Added.

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

15 years ago Reviewed by andersca.
kdecker [Sat, 27 Jan 2007 00:52:16 +0000 (00:52 +0000)]
    Reviewed by andersca.

        Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
        http://bugs.webkit.org/show_bug.cgi?id=11523

        * Plugins/WebBaseNetscapePluginStream.m:
       (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView disconnectStream:]
        * Plugins/WebBaseNetscapePluginView.h: Added disconnectStream: to header.
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView stop]): Make a copy of the streams collection prior to calling stop all streams.
        This is necessary because calling stop has the side effect of removing the stream from this same collection.
        (-[WebBaseNetscapePluginView disconnectStream:]): Added. Removes the stream from the streams collection.

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

15 years ago Reviewed by Darin.
bdakin [Sat, 27 Jan 2007 00:03:56 +0000 (00:03 +0000)]
    Reviewed by Darin.

        Fix for <rdar://problem/4956565> REGRESSION: After scrolling frame,
        hovering over link in this frame doesn't change cursor to pointing
        hand

        The mouseMove event was not being propagated correctly after using
        the mouse to scroll the frame because m_mousePressed was never
        getting set to false.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent): This code does not
        belong here.
        * page/EventHandler.h: lastEventIsMouseUp() is only ever relevant
        in EventHandlerMac, so it can just be a static function there.
        * page/mac/EventHandlerMac.mm:
        (WebCore::lastEventIsMouseUp): Make this static.
        (WebCore::EventHandler::passMouseDownEventToWidget): Here is where
        we need to set m_mousePressed to false if lastEventIsMouseUp() is
        true.

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

15 years agoAdd layout test for orphaned CSS unit coalescing.
hyatt [Fri, 26 Jan 2007 22:47:58 +0000 (22:47 +0000)]
Add layout test for orphaned CSS unit coalescing.

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

15 years ago Fix for style regression caused by strictness checking of the number of prope...
hyatt [Fri, 26 Jan 2007 22:45:42 +0000 (22:45 +0000)]
    Fix for style regression caused by strictness checking of the number of properties.  This caused code like:
        "width: 20 px" to fail, because we interpreted it as two values and rejected it.  Our old code allowed 20 to be
        used like a pixel value and then ignored the orphaned unit.

        This patch actually scans the list of values looking for orphaned units and reattaches them to the numeric
        values that they should correspond to.  This means rules like "width: 5 em" will now work in quirks mdoe and
        the "em" unit type will be honored.

        Reviewed by beth

        * WebCore.xcodeproj/project.pbxproj:
        * css/cssparser.cpp:
        (WebCore::unitFromString):
        (WebCore::CSSParser::checkForOrphanedUnits):
        (WebCore::CSSParser::parseValue):
        * css/cssparser.h:
        (WebCore::ValueList::valueAt):
        (WebCore::ValueList::deleteValueAt):

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

15 years agoWhat's left of my trashed work to add more Qt functionality
staikos [Fri, 26 Jan 2007 22:19:16 +0000 (22:19 +0000)]
What's left of my trashed work to add more Qt functionality

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

15 years agoFixed build that use RetainPtr::adoptCFReference(CFTypeRef)
beidson [Fri, 26 Jan 2007 22:02:04 +0000 (22:02 +0000)]
Fixed build that use RetainPtr::adoptCFReference(CFTypeRef)

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

15 years ago Make it compile again with Qt 4.2 and add the copyright
lars [Fri, 26 Jan 2007 21:13:14 +0000 (21:13 +0000)]
    Make it compile again with Qt 4.2 and add the copyright
        headers where forgotten in the last submit.

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

15 years ago Reviewed by Brady.
darin [Fri, 26 Jan 2007 19:31:00 +0000 (19:31 +0000)]
    Reviewed by Brady.

        - fix <rdar://problem/4956688> move Mac-specific part of icon code into IconMac
        - fix a GC-compatibility problem in the icon code I noticed by code inspection

        * platform/FileChooser.cpp: (WebCore::FileChooser::chooseIcon): Removed Mac-specific
        path check -- that's in newIconForFile now.

        * platform/graphics/Icon.h: Changed the image to be a RetainPtr. The old code was
        using -[NSObject retain] which is not good enough for a pointer in a C++ object.
        * platform/graphics/mac/IconMac.mm:
        (WebCore::Icon::Icon): Got rid of unneeded code to do what RetainPtr does for us.
        (WebCore::Icon::~Icon): Ditto.
        (WebCore::Icon::newIconForFile): Added check for non-absolute file names. Updated
        for use of RetainPtr. Use constructor that takes NSImage.
        (WebCore::Icon::paint): Add get() calls needed now that we are using a RetainPtr.

        * WebCore.xcodeproj/project.pbxproj: Let Xcode do its thing.

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

15 years ago Reviewed by Maciej.
ap [Fri, 26 Jan 2007 18:10:41 +0000 (18:10 +0000)]
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12385
        Assertion failure when loading subresources from "data:" frames

        Test: fast/loader/opaque-base-url.html

        * platform/KURL.cpp:
        (WebCore::KURL::init): Make the URL invalid if it's relative, but has an opaque or empty base.

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

15 years agoLayoutTests:
darin [Fri, 26 Jan 2007 17:20:21 +0000 (17:20 +0000)]
LayoutTests:

        * fast/events/objc-event-api-expected.txt: Updated test result now that we no
        longer invalidate clicks when the mouse moves a bit.

WebCore:

        Reviewed by Darin.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseMoveEvent):
        Removed a call to invalidateClick(), since we don't want to cancel a
        click if the mouse moves.

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

15 years ago * css/MediaQueryEvaluator.cpp:
darin [Fri, 26 Jan 2007 17:14:22 +0000 (17:14 +0000)]
    * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific):
        Oops, forgot a !.

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

15 years ago Patch by Nate Begeman.
darin [Fri, 26 Jan 2007 17:10:18 +0000 (17:10 +0000)]
    Patch by Nate Begeman.
        Reviewed by Darin and Maciej.

        - <rdar://problem/4946877> Avoid unnecessary allocations in CSS, patch attached (12401)
          http://bugs.webkit.org/show_bug.cgi?id=12401

        * css/MediaQueryEvaluator.h: Add mediaTypeMatchSpecific, a function that
        takes a char* to avoid creating and destroying a String for simple media
        type queries.
        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Added. Besides
        avoiding the conversion to String, this also doesn't have the special
        case code to handle "" and "all".

        * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::matchUARules):
        Call mediaTypeMatchSpecific here when deciding whether to use the
        print version of the user agent style sheet.

        * loader/Cache.cpp: (WebCore::Cache::requestResource): Don't convert to
        a string and back to a KURL when calling createResource. Avoids reparsing
        the URL string.

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

15 years agoHistory support on platform Qt. r=lars
zack [Fri, 26 Jan 2007 13:13:48 +0000 (13:13 +0000)]
History support on platform Qt. r=lars
We might switch to a model but for now this is ok.

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

15 years agointroduce platform scrollbars on Qt platform
zack [Fri, 26 Jan 2007 13:01:03 +0000 (13:01 +0000)]
introduce platform scrollbars on Qt platform

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

15 years ago2007-01-26 Mitz Pettel <mitz@webkit.org>
bdash [Fri, 26 Jan 2007 11:40:01 +0000 (11:40 +0000)]
2007-01-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11109
          REGRESSION (r15471): menus are offset on eink.com
          <rdar://problem/4824760>

        Changed offset{Left,Top} to match Firefox. If the body element is statically
        positioned, it is still returned as the offsetParent of elements whose containing
        block is the initial containing block (the root), but their offset{Left,Top} are
        relative to the root. If the body element is positioned, then offsets are relative
        to it. The body's own offset{Left,Top} are always 0.

        Test: fast/dom/Element/offsetLeft-offsetTop-body-quirk.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetLeft):
        (WebCore::RenderObject::offsetTop):

2007-01-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - test and updated tests and results for
          http://bugs.webkit.org/show_bug.cgi?id=11109
          REGRESSION (r15471): menus are offset on eink.com
          <rdar://problem/4824760>

        * editing/execCommand/findString-2.html:
        * editing/pasteboard/4947130.html:
        * editing/pasteboard/drop-text-without-selection.html:
        * editing/selection/anchor-focus1-expected.txt:
        * editing/selection/click-before-and-after-table.html:
        * editing/selection/drag-select-1.html:
        * editing/selection/editable-links-expected.txt:
        * editing/selection/mixed-editability-1.html:
        * editing/selection/paragraph-granularity.html:
        * editing/selection/selection-actions.html:
        * editing/selection/word-granularity.html:
        * fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt: Added.
        * fast/dom/Element/offsetLeft-offsetTop-body-quirk.html: Added.
        * fast/forms/drag-into-textarea.html:
        * fast/forms/listbox-selection-2.html:
        * fast/forms/listbox-selection.html:
        * fast/table/click-near-anonymous-table-expected.txt:
        * fast/table/click-near-anonymous-table.html:

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

15 years ago2007-01-26 Mitz Pettel <mitz@webkit.org>
bdash [Fri, 26 Jan 2007 11:35:51 +0000 (11:35 +0000)]
2007-01-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Reviewed by Darin and Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=10983
          REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown

        Test: fast/dynamic/staticY.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutPositionedObjects): Avoid marking the object's
        parents, since they have already been laid out.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setStaticY): Added a call to setChildNeedsLayout() to
        ensure relayout by this box's container (third and fourth cases in the
        layout test).
        * rendering/RenderBox.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::markContainingBlocksForLayout): For positioned objects
        with static y, also mark the object's parent to ensure that it recomputes
        the static y value (first case in the layout test).

2007-01-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin and Maciej.

        - test for http://bugs.webkit.org/show_bug.cgi?id=10983
          REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown

        Tests three cases that the patch fixes and another one that was fixed in
        r8284 but did not have a test.

        * fast/dynamic/staticY-expected.checksum: Added.
        * fast/dynamic/staticY-expected.png: Added.
        * fast/dynamic/staticY-expected.txt: Added.
        * fast/dynamic/staticY.html: Added.

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

15 years ago Get rid of FrameQtClient. It's unused since we moved over
lars [Fri, 26 Jan 2007 11:16:08 +0000 (11:16 +0000)]
    Get rid of FrameQtClient. It's unused since we moved over
        to the loader.

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

15 years agoCorrectly position child frames within the
zack [Fri, 26 Jan 2007 11:14:31 +0000 (11:14 +0000)]
Correctly position child frames within the
toplevel frame (put them on the viewport). r=lars

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

15 years ago Update the test cases after the last change to
lars [Fri, 26 Jan 2007 09:57:31 +0000 (09:57 +0000)]
    Update the test cases after the last change to
        DumpRenderTree. Hope this will not be needed again.

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

15 years agofix the compile
zack [Fri, 26 Jan 2007 09:50:36 +0000 (09:50 +0000)]
fix the compile

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

15 years ago Reviewed by Maciej.
aroben [Fri, 26 Jan 2007 09:44:57 +0000 (09:44 +0000)]
    Reviewed by Maciej.

        Fixed an issue on tivofaq.com where you could never tab forward into
        the left frame after tabbing out of the document.

        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocus): Clear the focused frame
        before passing off focus to Chrome so that when we re-enter the
        document we start at the main frame instead of the last focused frame.

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

15 years ago Reviewed by Zack
lars [Fri, 26 Jan 2007 09:22:09 +0000 (09:22 +0000)]
    Reviewed by Zack

        WebKitQt:
        Make sure we resize the HTML when resizing a
        QWebFrame. Also ensure that the render tree
        is up to date before dumping it.

        DumpRenderTree:
        Small hack to ensure that our top level frame actually has the
        correct size. Unfortunately this means I'll have to regenerate
        all test cases :/

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

15 years ago Minor update, skip two test case that are hanging
lars [Fri, 26 Jan 2007 09:20:16 +0000 (09:20 +0000)]
    Minor update, skip two test case that are hanging
        forever.

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

15 years ago Reviewed by olliej.
rwlbuis [Fri, 26 Jan 2007 09:03:43 +0000 (09:03 +0000)]
    Reviewed by olliej.

        http://bugs.webkit.org/show_bug.cgi?id=11911
        SVG exhibits double-text-selection behavior

        Fix selection height of the inline text boxes for svg.

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

15 years agoDisplay pages inside a mainwindow instead of a custom qwidget
zack [Fri, 26 Jan 2007 09:00:44 +0000 (09:00 +0000)]
Display pages inside a mainwindow instead of a custom qwidget
in the qtlauncher.

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

15 years agoFix drawing of tiled images. r=lars
zack [Fri, 26 Jan 2007 08:54:19 +0000 (08:54 +0000)]
Fix drawing of tiled images. r=lars

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

15 years agoFix image loading and implement icon class
zack [Fri, 26 Jan 2007 08:25:32 +0000 (08:25 +0000)]
Fix image loading and implement icon class

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

15 years ago Patch from Jan Kraemer.
lars [Fri, 26 Jan 2007 07:30:21 +0000 (07:30 +0000)]
Patch from Jan Kraemer.

        Reviewed by Maciej

        Fix for http://bugs.webkit.org/show_bug.cgi?id=12382

        Fix crash on architectures with 32 bit ints and
        64 bit longs (For example Linux on AMD64)

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

15 years ago Backed out my last patch because it crashes espn.com. Stay tuned for a newer...
kdecker [Thu, 25 Jan 2007 23:51:27 +0000 (23:51 +0000)]
    Backed out my last patch because it crashes espn.com. Stay tuned for a newer version..

        * Plugins/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream setPlugin:]): Removed call to streamIsDead.
        * Plugins/WebBaseNetscapePluginView.h: Removed streamIsDead.
        * Plugins/WebBaseNetscapePluginView.mm: Ditto.

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

15 years agoLayoutTests:
justing [Thu, 25 Jan 2007 23:05:21 +0000 (23:05 +0000)]
LayoutTests:

        Reviewed by oliver

        <http://bugs.webkit.org/show_bug.cgi?id=12409>
        REGRESSION (r19039): Drag caret isn't cleared after a drop

        * editing/pasteboard/4947130-expected.checksum:
        * editing/pasteboard/4947130-expected.png:

WebCore:

        Reviewed by oliver

        <http://bugs.webkit.org/show_bug.cgi?id=12409>
        REGRESSION (r19039): Drag caret isn't cleared after a drop

        No new layout tests because the regression was
        caught by current layout tests.

        * page/DragController.cpp:
        (WebCore::DragController::concludeDrag): Clear the drag caret.

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

15 years ago Reviewed by Beth.
darin [Thu, 25 Jan 2007 22:46:01 +0000 (22:46 +0000)]
    Reviewed by Beth.

        - fix <rdar://problem/4952766> Safari has a top secret color picker that can be used to... uhh... I don't know

        * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Let Interface Builder have its way.
        * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Remove the NSColorWell that was
        in here (for no good reason).

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

15 years ago Reviewed by andersca.
kdecker [Thu, 25 Jan 2007 21:30:22 +0000 (21:30 +0000)]
    Reviewed by andersca.

        A few tweaks with of a fix done by Steve Gehrman.

        Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory
               http://bugs.webkit.org/show_bug.cgi?id=11523

        * Plugins/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream setPlugin:]): Calls -[WebBaseNetscapePluginView streamIsDead:]
        * Plugins/WebBaseNetscapePluginView.h: Added streamIsDead to header.
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView streamIsDead:]): Added. Removes the stream from the streams collection.

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

15 years agoLayoutTests:
ggaren [Thu, 25 Jan 2007 20:21:34 +0000 (20:21 +0000)]
LayoutTests:

        Reviewed by Geoffrey Garen.

        Added tests for http://bugs.webkit.org/show_bug.cgi?id=12342
        REGRESSION: destroying a frame from its own script causes various crashes

        Thanks to Alexey Proskuryakov for the original versions of these tests.

        * fast/dom/exception-no-frame-inline-script-crash-expected.txt: Added.
        * fast/dom/exception-no-frame-inline-script-crash.html: Added.
        * fast/dom/exception-no-frame-timeout-crash-expected.txt: Added.
        * fast/dom/exception-no-frame-timeout-crash.html: Added.

WebCore:

        Reviewed and landed by Geoffrey Garen.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12342
          REGRESSION: destroying a frame from its own script causes various crashes

        * bindings/js/kjs_window.cpp: (KJS::ScheduledAction::execute):
        Use RefPtr for the frame and the interpreter object so they don't get deleted
        out from underneath us.

        * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate):
        Add a check for a page of 0. This was the only call site for the
        addMessageToConsole function that did not have a check for a page of 0.

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

15 years ago Add the next 100 test cases.
lars [Thu, 25 Jan 2007 19:52:22 +0000 (19:52 +0000)]
    Add the next 100 test cases.

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

15 years ago Add more test cases that pass on the Qt build.
lars [Thu, 25 Jan 2007 19:27:07 +0000 (19:27 +0000)]
    Add more test cases that pass on the Qt build.

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

15 years ago The tests in dom/svg and dom/xhtml as well as
lars [Thu, 25 Jan 2007 18:42:19 +0000 (18:42 +0000)]
    The tests in dom/svg and dom/xhtml as well as
        most of the remaining tests in tables/ pass now as
        well, so lets run the test suite over them.

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

15 years agoWebCore:
bdakin [Thu, 25 Jan 2007 18:13:19 +0000 (18:13 +0000)]
WebCore:
        Reviewed and merged by Beth.

        Fix for <rdar://problem/4921692> not processing comments inside a
        title element leads to XSS (for at least BlogSpot)

        This is equivalent to commit 626791 in the KDE tree. Basically, the
        patch allows comment parsing in titles to avoid capturing a
        <script> tag by accident.

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseSpecial):
        (WebCore::HTMLTokenizer::parseComment):

LayoutTests:
        Test for <rdar://problem/4921692> not processing comments inside a
        title element leads to XSS (for at least BlogSpot)

        * fast/parser/parseCommentsInTitles-expected.checksum: Added.
        * fast/parser/parseCommentsInTitles-expected.png: Added.
        * fast/parser/parseCommentsInTitles-expected.txt: Added.
        * fast/parser/parseCommentsInTitles.html: Added.

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

15 years ago * ksvg2/svg/SVGPreserveAspectRatio.cpp: Add a couple of comments.
darin [Thu, 25 Jan 2007 15:39:56 +0000 (15:39 +0000)]
    * ksvg2/svg/SVGPreserveAspectRatio.cpp: Add a couple of comments.

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

15 years agoLayoutTests:
darin [Thu, 25 Jan 2007 15:33:28 +0000 (15:33 +0000)]
LayoutTests:

        Reviewed by Maciej.

        - test for bugs found by code inspection in the SVGPreserveAspectRatio parser

        * svg/dom/preserve-aspect-ratio-parser-expected.txt: Added.
        * svg/dom/preserve-aspect-ratio-parser.html: Added.

WebCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12365
          Reproducible crash in WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio
          in svg/W3C-SVG-1.1/animate-elem-40-t.svg under guard malloc
        - fix bug where the parser accepts "meet" or "slice" as an entire string
        - fix bug where "slice" is ignored if the old alignment was "none"
          even if the newly-parsed alignment is something other than "none", and
          "slice" is not ignored if the old alignment was not "none", but the
          newly-parsed alignment is "none"
        - optimize to only call notifyAttributeChange if the attribute actually changed

        Test: svg/dom/preserve-aspect-ratio-parser-test.html

        * ksvg2/svg/SVGPreserveAspectRatio.cpp:
        (WebCore::checkString): Added an overload for using char* constants which is
        much simpler than the old one, and almost as fast.
        (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Fail if there's no
        more text after "defer". Fail if there's neither "none" nor an x/y specified.
        Check that there's more text before looking at the "m" and "s" for "meet" and
        "slice". Merged the failure and success cases. Only call notifyAttributeChange
        if something changed.

        I think all the "optimized" code where we check the first character before
        calling checkString isn't really helpful, but I decided to leave it as-is
        for now.

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

15 years ago Reviewed by Zack
lars [Thu, 25 Jan 2007 14:54:19 +0000 (14:54 +0000)]
    Reviewed by Zack

        Trivial implementation of getMIMETypeForExtension.
        Use the above method in the ResourceHandleManager to set
        a mimetype on Resources that don't have one set (which
        includes everything loaded from local disk).

        Should fix quite a few test cases :)

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

15 years ago Reviewed by Kevin, Geoff, Brady, and Darin
sullivan [Thu, 25 Jan 2007 14:20:16 +0000 (14:20 +0000)]
    Reviewed by Kevin, Geoff, Brady, and Darin

        - fixed <rdar://problem/4918446> Safari's temp files (PDF's) should be in a sub-folder when calling Preview

        * WebView/WebPDFView.mm:
        (-[WebPDFView _path]):
        use _temporaryPDFDirectoryPath method instead of #defines for hardwiring strings; stop bad practice
        of modifying the const char* returned by fileSystemRepresentation
        (-[WebPDFView _temporaryPDFDirectoryPath]):
        new method, lazily creates and returns a secure temporary directory created with NSTemporaryDirectory()
        and mkdtemp

        * English.lproj/StringsNotToBeLocalized.txt:
        Updated for these and other recent changes

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

15 years agoAdd more test results for the Qt build.
lars [Thu, 25 Jan 2007 14:03:17 +0000 (14:03 +0000)]
Add more test results for the Qt build.

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

15 years agoPath from Harald Fernengel to fix compile on platforms
zack [Thu, 25 Jan 2007 13:06:50 +0000 (13:06 +0000)]
Path from Harald Fernengel to fix compile on platforms
where qreal is not a double.
r=me

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

15 years agoimplement wheel event handling and use eventhandler explictly.
zack [Thu, 25 Jan 2007 12:48:51 +0000 (12:48 +0000)]
implement wheel event handling and use eventhandler explictly.
r=lars

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

15 years ago Reviewed by Maciej.
rwlbuis [Thu, 25 Jan 2007 10:54:24 +0000 (10:54 +0000)]
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12391
        SVG containers with viewports should respect overflow when hit testing
        Take into account the overflow property when hit testing <svg>.

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

15 years ago Reviewed by Zack
lars [Thu, 25 Jan 2007 10:04:53 +0000 (10:04 +0000)]
    Reviewed by Zack

        Emit the loadDone() signal from teh onload event callback
        again. This hangs on one or two test cases, but removes
        hundreds of failures elsewhere.

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

15 years ago remove dom/html/level2/html from skipped tests.
lars [Thu, 25 Jan 2007 10:04:16 +0000 (10:04 +0000)]
    remove dom/html/level2/html from skipped tests.

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

15 years ago Add css1 and css2.1 test results for the Qt build
lars [Thu, 25 Jan 2007 08:56:07 +0000 (08:56 +0000)]
    Add css1 and css2.1 test results for the Qt build

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

15 years ago Reviewed by Darin and Zack
lars [Thu, 25 Jan 2007 08:54:42 +0000 (08:54 +0000)]
    Reviewed by Darin and Zack

        Fix http://bugs.webkit.org/show_bug.cgi?id=12398

        Move the test results for Qt into a directory of it's own
        (WebKit/LayoutTestResults/qt). Leave the Mac results where
        they are for now and share the text only results between
        Mac and Qt.

        Add support for a LayoutTestResults/platform/Skipped file
        to run-webkit-tests to be able to ignore certain tests

        Remove the old tests-skipped.txt from Qts DumpRenderTree
        implementation.

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

15 years agoLayoutTests:
aliceli1 [Thu, 25 Jan 2007 08:38:32 +0000 (08:38 +0000)]
LayoutTests:

        Reviewed by Maciej.

        added test for
        <rdar://problem/4808039> REGRESSION: eBay ID check never completes
        also known as
        http://bugs.webkit.org/show_bug.cgi?id=11230

        * http/tests/misc/location-replace-crossdomain-expected.txt: Added.
        * http/tests/misc/location-replace-crossdomain.html: Added.
        * http/tests/misc/resources/failure.html: Added.
        * http/tests/misc/resources/success.html: Added.

WebCore:

        Reviewed by Maciej.

        fixed <rdar://problem/4808039> REGRESSION: eBay ID check never completes
        Also known as http://bugs.webkit.org/show_bug.cgi?id=11230

        * bindings/js/kjs_window.cpp:
        It's not necessary to check safeScript when doing a location.replace, .reload, or .assign
        (KJS::Location::getOwnPropertySlot):
        (KJS::LocationFunc::callAsFunction):

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

15 years agoLayoutTests:
aliceli1 [Thu, 25 Jan 2007 08:34:20 +0000 (08:34 +0000)]
LayoutTests:

        Reviewed by Geoff and Adele

        added test for <rdar://problem/4866655> REGRESSION: Copying out of Calculator & CIFIlterWidget is broken on 9A320

        * editing/execCommand/copy-without-selection-expected.txt: Added.
        * editing/execCommand/copy-without-selection.html: Added.

WebCore:

        Reviewed by Geoff and Adele.

        fixed <rdar://problem/4866655> REGRESSION: Copying out of Calculator & CIFIlterWidget is broken on 9A320

        * editing/Editor.cpp:
        (WebCore::Editor::canDHTMLCut):
        (WebCore::Editor::canDHTMLCopy):
        (WebCore::Editor::tryDHTMLCopy):
        (WebCore::Editor::tryDHTMLCut):
        Reverting some mistakes made in r17504:
        Anything in r17503 that used to call mayDHTML* still calls canDHTML* as it was changed in r17504, where canDHTML* now calls !selectionController::isInPasswordField instead of editor::canCopy
        Anything else in r17503 that used to call mayCopy now calls (!)selectionController::isInPasswordField.

        * editing/JSEditor.cpp:
        copy via JS should be enabled as long as selection is not in a password field.  a range selection shouldn't be required.

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

15 years agoLayoutTests:
adele [Thu, 25 Jan 2007 07:12:12 +0000 (07:12 +0000)]
LayoutTests:

        Reviewed by Brady and Oliver.

        Test for <rdar://problem/4953504> When the keydown event changes focus, the keypress event should go to the new focused node

        * fast/events/keydown-keypress-focus-change-expected.txt: Added.
        * fast/events/keydown-keypress-focus-change.html: Added.

WebCore:

        Reviewed by Brady and Oliver.

        Fix for <rdar://problem/4953504> When the keydown event changes focus, the keypress event should go to the new focused node

        Test: fast/events/keydown-keypress-focus-change.html

        * page/EventHandler.cpp:
        (WebCore::eventTargetNodeForDocument): Added for convenience.
        (WebCore::EventHandler::keyEvent): Moved from EventHandlerMac.mm.  After dispatching the keyDown event,
         recheck the target node for the keyPress event in case its changed.
        * page/EventHandler.h:
        * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::keyEvent):
          Moved the bulk of this code to EventHandler.cpp.

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

15 years ago Reviewed by Oliver.
darin [Thu, 25 Jan 2007 06:07:42 +0000 (06:07 +0000)]
    Reviewed by Oliver.

        - fix crash seen in layout tests

        * DumpRenderTree/EventSendingController.m: (-[EventSendingController dealloc]):
        Add back the line of code that sets savedMouseEvents to nil. I thought it was
        a field of the EventSendingController, but it's actually a global.

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

15 years ago2007-01-24 Oliver Hunt <oliver@apple.com>
oliver [Thu, 25 Jan 2007 05:10:28 +0000 (05:10 +0000)]
2007-01-24  Oliver Hunt  <oliver@apple.com>

        Build fix

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
        (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):

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

15 years agoJavaScriptCore:
ggaren [Thu, 25 Jan 2007 04:38:38 +0000 (04:38 +0000)]
JavaScriptCore:

        Fixed up #include order for style. No review necessary.

        * API/JSStringRef.cpp:

WebCore:

        New forwarding header. No review necessary.

        * ForwardingHeaders/kjs/ustring.h: Added.

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

15 years agoOliver Hunt <oliver@apple.com>
oliver [Thu, 25 Jan 2007 04:36:48 +0000 (04:36 +0000)]
Oliver Hunt  <oliver@apple.com>
WebCore:
        Reviewed by Maciej.

        Migrating more drag state information to WebCore

        * page/DragController.cpp:
        * page/DragController.h:
        (WebCore::DragController::dragOperation):
        (WebCore::DragController::setDraggingImageURL):
        (WebCore::DragController::draggingImageURL):
        (WebCore::DragController::setDragOffset):
        (WebCore::DragController::dragOffset):
WebKit:
        Reviewed by Maciej.

        Migrating more drag state information to WebCore

        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLViewPrivate dealloc]):
        (-[WebHTMLViewPrivate clear]):
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
        (-[WebHTMLView _mayStartDragAtEventLocation:]):
        (-[WebHTMLView close]):
        (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
        (-[WebHTMLView _delegateDragSourceActionMask]):
        * WebView/WebHTMLViewInternal.h:

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

15 years ago Reviewed by Maciej Stachowiak.
ggaren [Thu, 25 Jan 2007 04:36:30 +0000 (04:36 +0000)]
    Reviewed by Maciej Stachowiak.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy JSStringRefCF, in case anybody wants to use it. (I just added
        it recently.)

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

15 years agoLayoutTests:
darin [Thu, 25 Jan 2007 04:34:37 +0000 (04:34 +0000)]
LayoutTests:

        Reviewed by Adele.

        - test for one of the symptoms of http://bugs.webkit.org/show_bug.cgi?id=12331
          REGRESSION(r18951): Selecting text in a textarea makes the page scroll

        * fast/events/autoscroll-expected.checksum: Added.
        * fast/events/autoscroll-expected.png: Added.
        * fast/events/autoscroll-expected.txt: Added.
        * fast/events/autoscroll.html: Added.

WebCore:

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12331
          REGRESSION(r18951): Selecting text in a textarea makes the page scroll

        Test: fast/events/autoscroll.html

        * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll):
        Adjust position to be relative to the object's corner for the hit test, but not for the
        scrollRectToVisible call. The previous version accidentally re-used the version that was
        adjusted for the hit test.

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

15 years ago Reviewed by Maciej.
darin [Thu, 25 Jan 2007 04:27:31 +0000 (04:27 +0000)]
    Reviewed by Maciej.

        - changed dragMode to be a property instead of a function

        * DumpRenderTree/EventSendingController.h: Renamed inDragMode to dragMode.
        * DumpRenderTree/EventSendingController.m:
        (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed setDragMode.
        (+[EventSendingController isKeyExcludedFromWebScript:]): Added dragMode.
        (-[EventSendingController init]): Updated for name change.
        (-[EventSendingController leapForward:]): Ditto.
        (-[EventSendingController mouseUp]): Ditto.
        (-[EventSendingController mouseMoveToX:Y:]): Ditto.

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

15 years agoWebCore:
bdakin [Thu, 25 Jan 2007 04:17:24 +0000 (04:17 +0000)]
WebCore:
        Reviewed by Geoff.

        Fix for <rdar://problem/4948128> REGRESSION: A crash occurs at
        WebCore::Frame::view() after completing a query at mapquest.com
        then switching to Bookmarks view

        This is just a null-check. If you are in strict mode and ask for
        the clientWidth or clientHeight after the document was removed from
        it's parent, we no longer have a frameView, so we have to null-
        check it. I added null checks for the FrameView in some other
        places where it seems like we could potentially run into this
        issue.

LayoutTests:
        Reviewed by Geoff.

        Test for <rdar://problem/4948128> REGRESSION: A crash occurs at
        WebCore::Frame::view() after completing a query at mapquest.com
        then switching to Bookmarks view

        * fast/dom/clientWidthAfterDocumentIsRemoved-expected.checksum: Added.
        * fast/dom/clientWidthAfterDocumentIsRemoved-expected.png: Added.
        * fast/dom/clientWidthAfterDocumentIsRemoved-expected.txt: Added.
        * fast/dom/clientWidthAfterDocumentIsRemoved.html: Added.

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

15 years ago Reviewed by Maciej.
darin [Thu, 25 Jan 2007 04:12:45 +0000 (04:12 +0000)]
    Reviewed by Maciej.

        - made the deferral of mouse events until drag completes conditional
          it's needed for drag testing, and harmful for selection testing

        * DumpRenderTree/EventSendingController.h: Added inDragMode boolean.
        * DumpRenderTree/EventSendingController.m:
        (+[EventSendingController isSelectorExcludedFromWebScript:]): Added setDragMode:.
        (+[EventSendingController webScriptNameForSelector:]): Added name for setDragMode,
        and remove unneeded clearKillRing name.
        (-[EventSendingController init]): Initialize inDragMode to true.
        (-[EventSendingController dealloc]): Removed overzealous assertions -- we should
        not be asserting things that are dependent on the test content!
        (-[EventSendingController leapForward:]): Only queue events in drag mode.
        (-[EventSendingController setDragMode:]): Added.
        (-[EventSendingController mouseDown]): Removed overzealous assertion.
        (-[EventSendingController mouseUp]): Removed overzealous assertions.
        Only queue events in drag mode.
        (-[EventSendingController mouseMoveToX:Y:]): Only queue events in drag mode.

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

15 years ago Not reviewed, just removing accidentally committed file.
mjs [Thu, 25 Jan 2007 04:03:28 +0000 (04:03 +0000)]
    Not reviewed, just removing accidentally committed file.

        - removed file that shouldn't be there

        * Image Viewer/Image Viewer.aps: Removed.

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

15 years ago Not reviewed, trivial property change.
mjs [Thu, 25 Jan 2007 04:01:27 +0000 (04:01 +0000)]
    Not reviewed, trivial property change.

        * JavaScriptCore.vcproj/JavaScriptCore.sln: remove svn:mime-type
        property which made this binary.

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

15 years agoUpdating with correct bug number
adele [Thu, 25 Jan 2007 02:31:35 +0000 (02:31 +0000)]
Updating with correct bug number

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

15 years agoLayoutTests:
andersca [Thu, 25 Jan 2007 02:20:59 +0000 (02:20 +0000)]
LayoutTests:

        Reviewed by Geoff and Adam.

        <rdar://problem/4922655>
        http://galeri.milliyet.com.tr/ reproducibly crashes Safari

        * fast/dom/resources/set-frame-src-while-running-script-in-frame.html: Added.
        * fast/dom/set-frame-src-while-running-script-in-frame-expected.txt: Added.
        * fast/dom/set-frame-src-while-running-script-in-frame.html: Added.

WebCore:

        Reviewed by Geoff and Adam.

        <rdar://problem/4922655>
        http://galeri.milliyet.com.tr/ reproducibly crashes Safari

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestFrame):
        If the frame already exists, defer the navigation so that we won't end up replacing the document
        while we're parsing it. This is similar to what setting window.location ends up doing.

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

15 years ago Reviewed by Darin.
adele [Thu, 25 Jan 2007 02:07:33 +0000 (02:07 +0000)]
    Reviewed by Darin.

        Small improvement to my last checkin to prevent the keyEventWasInterpreted bool from
        being overwritten by reentrancy.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _interceptEditingKeyEvent:]): Point keyEventWasInterpreted pointer to local variable.
        (-[WebHTMLView doCommandBySelector:]):
        (-[WebHTMLView insertText:]):
        * WebView/WebHTMLViewInternal.h: Added BOOL pointer that will point to the local variable on the stack in _interceptEditingKeyEvent

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

15 years ago Reviewed by harrison
justing [Thu, 25 Jan 2007 01:38:20 +0000 (01:38 +0000)]
    Reviewed by harrison

        Adding this layout test for a bug fixed by the changes
        in r19088.

        * editing/execCommand/4916402-expected.checksum: Added.
        * editing/execCommand/4916402-expected.png: Added.
        * editing/execCommand/4916402-expected.txt: Added.
        * editing/execCommand/4916402.html: Added.

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

15 years agoLayoutTests:
adele [Thu, 25 Jan 2007 01:34:15 +0000 (01:34 +0000)]
LayoutTests:

        Reviewed by Darin.

        Test for <rdar://problem/4943650> REGRESSION: insertion point blink in form field redraws entire web page, making everything slow

        * fast/events/arrow-navigation-expected.txt: Added.
        * fast/events/arrow-navigation.html: Added.

WebKit:

        Reviewed by Darin.

        - Fix for <rdar://problem/4943650> REGRESSION: insertion point blink in form field redraws entire web page, making everything slow

        Keep track of whether interpretKeyEvents handles the key event based on whether or not we get
        called in insertText or doCommandBySelector.

        Test: fast/events/arrow-navigation.html

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView performKeyEquivalent:]):
        (-[WebHTMLView _interceptEditingKeyEvent:]):
        (-[WebHTMLView doCommandBySelector:]):
        (-[WebHTMLView insertText:]):
        * WebView/WebHTMLViewInternal.h:

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

15 years ago2007-01-25 Mark Rowe <mrowe@apple.com>
bdash [Thu, 25 Jan 2007 01:25:41 +0000 (01:25 +0000)]
2007-01-25  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        * Info.plist: Update copyright string.

2007-01-25  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        * Info.plist: Update copyright string.

2007-01-25  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        * Info.plist: Update copyright string.

2007-01-25  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        * Info.plist: Update copyright string.

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

15 years ago Reviewed by Maciej.
andersca [Thu, 25 Jan 2007 01:10:07 +0000 (01:10 +0000)]
    Reviewed by Maciej.

        Fix tests and update test results.

        * fast/dom/gc-6-expected.txt:
        * fast/dom/gc-6.html:
        * fast/dom/gc-7-expected.txt:
        * fast/dom/gc-7.html:

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

15 years agoLayoutTests:
justing [Thu, 25 Jan 2007 01:00:36 +0000 (01:00 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4916235>
        <rdar://problem/4857269>
        <rdar://problem/4916583>
        <rdar://problem/4928635>

        Fixed and removed FIXME:
        * editing/execCommand/create-list-from-range-selection-expected.checksum:
        * editing/execCommand/create-list-from-range-selection-expected.png:
        * editing/execCommand/create-list-from-range-selection-expected.txt:
        * editing/execCommand/create-list-from-range-selection.html:
        Added:
        * editing/deleting/4916235-1-expected.txt: Added.
        * editing/deleting/4916235-1.html: Added.
        * editing/execCommand/4916235-expected.txt: Added.
        * editing/execCommand/4916235.html: Added.
        * editing/execCommand/4916583-expected.checksum: Added.
        * editing/execCommand/4916583-expected.png: Added.
        * editing/execCommand/4916583-expected.txt: Added.
        * editing/execCommand/4916583.html: Added.
        * editing/execCommand/4928635-expected.txt: Added.
        * editing/execCommand/4928635.html: Added.
        Equivalent trees:
        * editing/execCommand/remove-list-item-1-expected.txt:
        * editing/execCommand/remove-list-items-expected.txt:
        * editing/execCommand/switch-list-type-expected.txt:
        Introduced an extraneous newline because of the poor substitute for
        VisiblePosition creation in shouldEmitNewlineAfterNode:
        * dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt:
        * dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt:
        * dom/xhtml/level3/core/nodeinsertbefore09-expected.txt:

WebCore:

        Reviewed by harrison

        <rdar://problem/4916235>
        eBay Editor: Crash occurs at WebCore::Range::startPosition() after applying ordered list styling to selected text
        <rdar://problem/4857269>
        REGRESSION: editing/execCommand/create-list-from-range-selection.html no longer works as intended
        <rdar://problem/4916583>
        eBay Editor: Removing a indent from a list item actually deletes the list item instead
        <rdar://problem/4928635>
        designMode outdent causes crash (11750)

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Fixed br insertion
        after the pruning of empty containers left over after the paragraph
        to move is removed.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): There are
        bugs that leave the wrong number of line breaks after a deletion
        that expands to include special elements (lists/tables).  Added
        a workaround so that moveParagraphs can avoid these until they
        are fixed.
        (WebCore::DeleteSelectionCommand::initializeStartEnd): Ditto.
        (WebCore::DeleteSelectionCommand::initializePositionData): Ditto.
        * editing/DeleteSelectionCommand.h:
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::advance): We used to not call exitNode for
        ancestors of a node where the next node in a pre-order traversal is
        the ranges's pastEndNode().  This is only correct for ancestors that
        contain the end of the range.
        (WebCore::shouldEmitNewlineAfterNode): Added, we should only emit newlines
        after blocks that have VisiblePositions after them.  VisiblePosition creation
        though is too expensive to do here, what I added here is an OK substitute.
        (WebCore::shouldEmitNewlineBeforeNode): Added.  No special logic yet.
        (WebCore::TextIterator::handleNonTextNode): Call shouldEmitNewlineBeforeNode.
        (WebCore::TextIterator::exitNode): Call shouldEmitNewlineAfterNode.
        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Call
        shouldEmitNewlineAfterNode.

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

15 years agoJavaScriptCore:
darin [Thu, 25 Jan 2007 00:22:36 +0000 (00:22 +0000)]
JavaScriptCore:

        Reviewed by Mark Rowe.

        * JavaScriptCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
        so we don't rely on people's paths.

WebCore:

        Reviewed by Mark Rowe.

        * WebCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
        so we don't rely on people's paths.

WebKit:

        Reviewed by Mark Rowe.

        * WebKit.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
        so we don't rely on people's paths.

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