WebKit-https.git
13 years ago2006-12-03 Mark Rowe <bdash@webkit.org>
bdash [Mon, 4 Dec 2006 00:16:07 +0000 (00:16 +0000)]
2006-12-03  Mark Rowe  <bdash@webkit.org>

        Reviewed by Alexey.

        http://bugs.webkit.org/show_bug.cgi?id=11730
        Bug 11730: Meta HTTP Refresh that contains a fraction / decimal get ignored.

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv): Parse the refresh interval as a double rather than an integer.

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

13 years agoReviewed by Oliver.
zimmermann [Sun, 3 Dec 2006 13:36:37 +0000 (13:36 +0000)]
Reviewed by Oliver.

Fix following bugs:
http://bugs.webkit.org/show_bug.cgi?id=11734
http://bugs.webkit.org/show_bug.cgi?id=11685

SVGPoint/SVGRect/SVGNumber were missing put() support.
SVGPoint.matrixTransform() was missing.

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

13 years agoReviewed by Dave.
zimmermann [Sun, 3 Dec 2006 12:19:50 +0000 (12:19 +0000)]
Reviewed by Dave.
Another missing piece in the platform/graphics move.

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

13 years ago Reviewed by Oliver.
rwlbuis [Sun, 3 Dec 2006 12:02:26 +0000 (12:02 +0000)]
    Reviewed by Oliver.

        http://bugs.webkit.org/show_bug.cgi?id=11667
        SVG: method .getTransformToElement(elt) in SVGLocatable not implemented

        Implement getTransformToElement functionality. Introduce virtual
        baseclass SVGLocatable to allow one implementation of the functionality.
        Finally cleanup some code.

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

13 years agoReviewed by Rob.
zimmermann [Sun, 3 Dec 2006 11:55:12 +0000 (11:55 +0000)]
Reviewed by Rob.
Move some files around, which have been forgotton in the platform/graphics move.

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

13 years agoReviewed by Mitz.
zimmermann [Sun, 3 Dec 2006 11:39:10 +0000 (11:39 +0000)]
Reviewed by Mitz.
Fix non-svg build. (At least hope BuildBot doesn't moan anymore :-)

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

13 years ago Reviewed by Mitz.
ap [Sun, 3 Dec 2006 09:07:31 +0000 (09:07 +0000)]
    Reviewed by Mitz.

        This test used to be a pixel one, but without pixel results provided - converted to text.

        * http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt:
        * http/tests/xmlhttprequest/frame-load-cancelled-abort.html:

        * http/tests/xmlhttprequest/resources/frame-load-to-cancel.html: Added a parameter to send()
        to make the test work in Firefox.

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

13 years ago Reviewed by Tim Omernick
sullivan [Sat, 2 Dec 2006 14:48:50 +0000 (14:48 +0000)]
    Reviewed by Tim Omernick

        Removed a couple of big chunks of duplicated code from the spelling and grammar stuff by merging
        the find-next-instance functions with the mark-all-instances functions.

        * bridge/mac/FrameMac.mm:
        (WebCore::findFirstMisspellingInRange):
        added markAll parameter, and reworked loop so that if markAll parameter is true, this function loops
        through the entire range and marks each misspelling
        (WebCore::findFirstGrammarDetailInRange):
        extracted from findFirstBadGrammarInRange; loops through the potentially-multiple details in a given
        ungrammatical phrase (e.g., multiple grammar errors in one sentence). Has a markAll parameter akin
        to the one in findFirstMisspellingInRange.
        (WebCore::findFirstBadGrammarInRange):
        added markAll parameter like the one in findFirstMisspellingInRange, and extracted findFirstGrammarDetailInRange
        (WebCore::FrameMac::advanceToNextMisspelling):
        pass "false" for new markAll parameters
        (WebCore::markAllMisspellingsInRange):
        now just calls findFirstMisspellingInRange with markAll = true, thus removing a big hunk of duplicated code
        (WebCore::markAllBadGrammarInRange):
        now just calls findFirstBadGrammarInRange with markAll = true, thus removing a big hunk of duplicated code

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

13 years ago2006-12-02 Mitz Pettel <mitz@webkit.org>
ap [Sat, 2 Dec 2006 14:02:57 +0000 (14:02 +0000)]
2006-12-02  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11672
          REGRESSION (r17068): Repro crash due to painting without layout

        Test: fast/dynamic/containing-block-change.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::setStyle): Changed the logic used
        to find absolutely positioned descendant's current containing block to
        match the changes made to containingBlock() in the fix for bug 9347.

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

13 years ago2006-12-02 MorganL <morganl.webkit@yahoo.com>
ap [Sat, 2 Dec 2006 13:41:18 +0000 (13:41 +0000)]
2006-12-02  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=11709
        DeprecatedString::format is broken on Windows

        Use _vscprintf on Windows to compute the length of the buffer that
        vsnprintf would need.

        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedString::format):
        * platform/String.cpp:
        (WebCore::String::format):

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

13 years agoWebCore:
bdakin [Sat, 2 Dec 2006 02:35:12 +0000 (02:35 +0000)]
WebCore:
        Reviewed by Adam.

        Support for sub-menus in WebCore context menus. This also re-
        architects the ContextMenuItem class so that it is more like
        ContextMenu in that the class is now really just a wrapper for the
        platformDescription

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): Add
        place-holders for new tags for the sub-menu items. I will flesh
        these out in a separate check-in.
        * platform/ContextMenu.cpp:
        (WebCore::createFontSubMenu):
        (WebCore::createSpellingAndGrammarSubMenu):
        (WebCore::createSpellingSubMenu):
        (WebCore::createSpeechSubMenu):
        (WebCore::createWritingDirectionSubMenu):
        (WebCore::ContextMenu::populate): Call the above functions to add
        the appropriate sub-menus to editing context menus.
        * platform/ContextMenu.h:
        * platform/ContextMenuItem.h:
        (WebCore::): New tags in the ContextMenuAction enumeration.
        (WebCore::ContextMenuItem::parentMenu):
        (WebCore::ContextMenuItem::setType):
        * platform/PlatformMenuDescription.h: Added. This defines
        PlatformMenuDesciption. It needs to be its own header because we
       have to include it from ContextMenu.h and ContextMenuItem.h
        * platform/mac/ContextMenuItemMac.mm: Lots of adjustments here to
        make this class basically just be a wrapper for NSMenuItem.
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::~ContextMenuItem):
        (WebCore::ContextMenuItem::platformDescription):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::title):
        (WebCore::ContextMenuItem::platformSubMenu):
        (WebCore::ContextMenuItem::setAction):
        (WebCore::ContextMenuItem::setTitle):
        (WebCore::ContextMenuItem::setSubMenu):
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::getNSMenuItem): Now we only have to get the
        platformDescription of the ContextMenuItem and then set its target
        and action.
        (WebCore::ContextMenu::itemCount):

WebKit:
        Reviewed by Adam.

        Changes to support sub-menus in WebCore ContextMenus.

        * WebCoreSupport/WebContextMenuClient.mm:
        (WebContextMenuClient::contextMenuItemSelected):
        ContextMenuItem::menu() is now called parentMenu()
        * WebView/WebUIDelegatePrivate.h: New not-yet-API tags.

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

13 years ago Reviewed by .
kmccullo [Sat, 2 Dec 2006 00:36:58 +0000 (00:36 +0000)]
    Reviewed by .

        - accidentally checked in with previous checkin

        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::keyEvent):

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

13 years ago Reviewed by Adam.
kmccullo [Sat, 2 Dec 2006 00:23:49 +0000 (00:23 +0000)]
    Reviewed by Adam.

        - better solution to the ambiguous reference

        * platform/Widget.h:
        (WebCore::Widget::handleMouseMoveEvent):
        (WebCore::Widget::handleMouseReleaseEvent):
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::keyEvent):
        * platform/win/PlatformScrollBar.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::PlatformScrollbar::handleMouseMoveEvent):
        (WebCore::PlatformScrollbar::handleMouseReleaseEvent):

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

13 years agoLayoutTests:
justing [Fri, 1 Dec 2006 23:40:35 +0000 (23:40 +0000)]
LayoutTests:

        Reviewed by john

        <rdar://problem/4826940>
        Selection change performed even when delete delegate replies NO (11415)

        Removed unnecessary shouldChangeSelection calls;
        * editing/deleting/delete-at-start-or-end-expected.txt:
        * editing/deleting/delete-br-002-expected.txt:
        * editing/deleting/delete-br-004-expected.txt:
        * editing/deleting/delete-br-005-expected.txt:
        * editing/deleting/delete-br-006-expected.txt:
        * editing/deleting/delete-br-009-expected.txt:
        * editing/deleting/delete-br-010-expected.txt:
        * editing/deleting/delete-br-012-expected.txt:
        * editing/deleting/delete-hr-expected.txt:
        * editing/deleting/delete-tab-004-expected.txt:
        * editing/deleting/forward-delete-expected.txt:
        * editing/deleting/merge-into-empty-block-1-expected.txt:
        * editing/deleting/merge-into-empty-block-2-expected.txt:
        * editing/execCommand/format-block-expected.txt:
        * editing/execCommand/outdent-selection-expected.txt:
        * editing/inserting/editing-empty-divs-expected.txt:
        * editing/inserting/insert-3800346-fix-expected.txt:
        * editing/inserting/insert-br-004-expected.txt:
        * editing/inserting/insert-br-005-expected.txt:
        * editing/inserting/insert-br-006-expected.txt:
        * editing/inserting/insert-br-008-expected.txt:
        * editing/inserting/insert-div-006-expected.txt:
        * editing/inserting/insert-div-008-expected.txt:
        * editing/inserting/insert-div-010-expected.txt:
        * editing/inserting/insert-div-011-expected.txt:
        * editing/inserting/insert-div-013-expected.txt:
        * editing/inserting/insert-div-015-expected.txt:
        * editing/inserting/insert-div-019-expected.txt:
        * editing/inserting/insert-div-021-expected.txt:
        * editing/inserting/insert-paragraph-01-expected.txt:
        * editing/inserting/insert-paragraph-03-expected.txt:
        * editing/inserting/insert-tab-004-expected.txt:
        * editing/inserting/insert-text-with-newlines-expected.txt:
        * editing/inserting/line-break-expected.txt:
        * editing/pasteboard/3976872-expected.txt:
        * editing/pasteboard/paste-text-005-expected.txt:
        * editing/pasteboard/paste-text-006-expected.txt:
        * editing/pasteboard/paste-text-007-expected.txt:
        * editing/pasteboard/paste-text-010-expected.txt:
        * editing/pasteboard/paste-text-014-expected.txt:
        * editing/pasteboard/paste-text-016-expected.txt:
        * editing/pasteboard/quirks-mode-br-2-expected.txt:
        * editing/style/apple-style-editable-mix-expected.txt:
        * editing/style/block-style-001-expected.txt:
        * editing/style/block-style-002-expected.txt:
        * editing/style/block-style-003-expected.txt:
        * editing/style/block-style-006-expected.txt:
        * editing/style/create-block-for-style-005-expected.txt:
        * editing/style/create-block-for-style-006-expected.txt:
        * editing/style/create-block-for-style-008-expected.txt:
        * editing/style/relative-font-size-change-002-expected.txt:
        * editing/style/relative-font-size-change-003-expected.txt:
        * editing/style/relative-font-size-change-004-expected.txt:
        * editing/style/table-selection-expected.txt:

WebCore:

        Reviewed by john

        <rdar://problem/4826940>
        Selection change performed even when delete delegate replies NO (11415)

        No layout test for the bug fix, because there's no way to register a custom
        editing delegate from a layout test.  Layout tests are effected by the change
        to avoid sending unnecessary shouldChangeSelections, however.

        * editing/Editor.cpp:
        (WebCore::Editor::appliedEditing): Don't bother sending shouldChangeSelection
        if the editing operation didn't change the selection.  Still call
        setSelection though, because it does work in this case that's necessary,
        like clearing the typing style.
        (WebCore::Editor::unappliedEditing): Ditto.
        (WebCore::Editor::reappliedEditing): Ditto.
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::deleteKeyPressed): Don't set the starting
        selection if the editing delegate returns NO from shouldDeleteRange.
        Notice we now call setStartingSelection in the case where
        the current selection was a range selection.  This is fine because
        it's a no-op (the starting selection is already the current selection).
        (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.

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

13 years ago Reviewed by Darin
sullivan [Fri, 1 Dec 2006 23:32:56 +0000 (23:32 +0000)]
    Reviewed by Darin

        Move subrange helper function from spellchecking code to TextIterator

        * editing/TextIterator.h:
        added TextIterator::subrange
        * editing/TextIterator.cpp:
        (WebCore::CharacterIterator::advance):
        early return if count is <= 0; assert that it's not < 0
        (WebCore::TextIterator::subrange):
        new function, moved from FrameMac.mmm

        * bridge/mac/FrameMac.mm:
        moved subrange() function to TextIterator
        (WebCore::FrameMac::advanceToNextMisspelling):
        use TextIterator::subrange
        (WebCore::markAllMisspellingsInRange):
        ditto
        (WebCore::markAllBadGrammarInRange):
        ditto

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

13 years agoWebCore:
darin [Fri, 1 Dec 2006 22:46:21 +0000 (22:46 +0000)]
WebCore:

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11628
          REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window

        I couldn't think of an easy way to make a regression test for this, but maybe
        I'll get an idea later about how to do it.

        The main thing I did was add a concept of a DOM event having an "underlying event".
        That allows the DOM activate event to contain inside it the original keyboard event
        that triggered the form submission, and thus allows WebKit to see the modifier keys
        from that original event. The code that uses the underlying event is in WebKit, but
        the code to set it up is here in WebCore.

        - also do some clean-up to related event handling code

        * bindings/js/kjs_events.cpp: (KJS::DOMEvent::getValueProperty): Updated for the
        name change of cancelBubble.

        * dom/Event.h: Removed a useless comment. Fixed some whitespace and formatting.
        Renamed getCancelBubble to cancelBubble to match the DOM -- I suspect the old
        name predated the use of the m_ prefix on data members. Added the underlying event,
        and a getter and setter.
        * dom/Event.cpp:
        (WebCore::Event::setTarget): Updated to take a PassRefPtr.
        (WebCore::Event::setUnderlyingEvent): Added.

        * dom/EventTargetNode.h: Added an optional underlyingEvent parameter to
        dispatchUIEvent, one of the overloads of dispatchMouseEvent, and
        dispatchSimulatedMouseEvent. Added a new dispatchSimulatedClick function here that
        mostly replaces the click function in HTMLElement.
        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchGenericEvent): Updated for the name change
        of cancelBubble.
        (WebCore::EventTargetNode::dispatchUIEvent): Added an underlying event parameter,
        which gets attached to the UIEvent object after it's created.
        (WebCore::EventTargetNode::dispatchMouseEvent): Tweaked formatting and parameter
        name for the version that creates a mouse event for a real platform mouse event.
        Added an underlying event parameter to the main version, and attached it to all
        three of the events that can be dispatched.
        (WebCore::EventTargetNode::dispatchSimulatedMouseEvent): Added an underlying
        event parameter, passed it along to dispatchMouseEvent.
        (WebCore::EventTargetNode::dispatchSimulatedClick): Moved this here from HTMLElement
        and renamed it from click. Added an underlyingEvent parameter, and passed that along
        in all three of the calls to dispatchSimulatedMouseEvent.

        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::shouldClose): Updated call to
        setTarget that no longer needs a get().
        * ksvg2/svg/SVGElement.cpp: (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler): Converted a call to click
        to a call to dispatchSimulatedClick.
        (WebCore::HTMLAnchorElement::accessKeyAction): Ditto.
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::accessKeyAction): Ditto.
        * html/HTMLElement.h: Removed the parameters to click and made it non-virtual.
        We could move it down to the input and button elements, now that it's just
        a single function call, but it's also OK to just leave it here.
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::click): Removed the parameters and changed this to just
        call dispatchSimulatedClick. The real work is now in dispatchSimulatedClick.
        (WebCore::HTMLElement::accessKeyAction): Converted a call to click to a call to
        dispatchSimulatedClick.
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submitClick): Ditto. But unlike accessKeyAction callers,
        pass the event along as the underlying event.
        * html/HTMLInputElement.h:
        * html/HTMLInputElement.cpp: Removed override of virtual click function. The
        special cases for the file control and hidden input elements aren't needed.
        (WebCore::HTMLInputElement::accessKeyAction): Converted a call to click to a call to
        dispatchSimulatedClick.
        (WebCore::HTMLInputElement::defaultEventHandler): Converted calls to click to calls to
        dispatchSimulatedClick, passing along the event as the underlying event.
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::defaultEventHandler): Converted a call to click to a call
        to dispatchSimulatedClick, passing the event along as the underlying event. Also
        changed the local variable for the element to a RefPtr since the code assumes it's
        still around after calling arbitrary JavaScript code.
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::accessKeyAction): Converted a call to click to a call to
        dispatchSimulatedClick.

        * rendering/RenderFileUploadControl.h:
        * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::click):
        Removed unneeded ignored parameter to the click function, and also made it non-virtual.

        * loader/NavigationAction.h: Removed unneeded includes.
        * loader/NavigationAction.cpp: Moved all the code here from NavigationActionMac.mm,
        since none of it is Mac-specific any more.
        * loader/mac/NavigationActionMac.mm: Removed.
        * WebCore.xcodeproj/project.pbxproj: Updated for removed file.

        * ksvg2/svg/SVGAElement.cpp: Removed an unnecessary include.

        * loader/FrameLoader.cpp: Added a newly-needed incluude.
        * loader/mac/DocumentLoaderMac.mm: Ditto.
        * loader/mac/FrameLoaderMac.mm: Ditto.
        * rendering/RenderWidget.cpp: Ditto.

WebKit:

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11628
          REGRESSION (r17597): Command-return in native text fields doesn't open a new tab or window

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (findKeyStateEvent): Added. Helper that finds the mouse or keyboard event in a chain
        of events and their underlying events.
        (findMouseEvent): Added. Same, but specifically for mouse events.
        (WebFrameLoaderClient::actionDictionary): Rewrote to use the above functions. This means we
        use the modifiers from the underlying events rather than just the one from the event itself.
        So if the event is a DOM activate event, we can still see the modifiers from the original
        keyboard event that triggered it. Has no effect if the event is already the right type or
        if there is no underlying event.

        * WebView/WebFrame.mm: Added a newly-needed include.

        * WebKit.xcodeproj/project.pbxproj: Xcode wants what it wants.

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

13 years ago Reviewed by Darin
sullivan [Fri, 1 Dec 2006 22:12:40 +0000 (22:12 +0000)]
    Reviewed by Darin

        - fixed <rdar://problem/4811175> Many false reports of bad grammar appear, caused by
          insufficient context passed to grammar checker

        * bridge/mac/FrameMac.mm:
        (WebCore::markAllMisspellingsInRange):
        new function, extracted from markMisspellings -- ignores grammar
        (WebCore::markAllBadGrammarInRange):
        new function, extracted from markMisspellings -- ignores spelling, and operates on
        appropriately-sized chunks of text
        (WebCore::FrameMac::markMisspellings):
        now calls markAllMisspellingsInRange and (optionally) markAllBadGrammarInRange rather
        than trying to interweave the spelling and grammar logic

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

13 years agoRemoved stray conflict marker.
sullivan [Fri, 1 Dec 2006 21:31:50 +0000 (21:31 +0000)]
Removed stray conflict marker.

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

13 years ago Reviewed by Darin
sullivan [Fri, 1 Dec 2006 21:25:09 +0000 (21:25 +0000)]
    Reviewed by Darin

        With these changes, grammar checking works correctly for the one-by-one case.
        It still doesn't work correctly for the check-as-you-type case; I need to make these
        same kinds of changes in markMisspellings, and refactor to share more code between
        the two cases, but I wanted to get this working code in before modifying it further.

        The major change here is that advanceToNextMisspelling used to look at small chunks of
        text at a time, checking each one for both misspellings and questionable grammar. But
        grammar checking needs at least paragraph-sized chunks of text to have enough context
        to work correctly, so the old mechanism was causing many spurious complaints of bad
        grammar (e.g., almost every word seemed to be at the start of a sentence so the checker
        would complain about missing capitalization). So now the spell checker runs in the
        specified range first. Then the grammar checker runs on the same range (stopping at the
        next misspelling, if any), but expanded to paragraph-aligned boundaries.

        * bridge/mac/FrameMac.mm:
        (WebCore::findFirstMisspellingInRange):
        new function, extracted from advanceToNextMisspelling, and ignores grammar
        (WebCore::paragraphAlignedRangeForRange):
        new function, used by findNextBadGrammarInRange
        (WebCore::findFirstBadGrammarInRange):
        new function, extracted from advanceToNextMisspelling, and rewritten to use paragraph-aligned
        chunks, and ignores spelling
        (WebCore::subrange):
        new helper function, used by advanceToNextMisspelling
        (WebCore::FrameMac::advanceToNextMisspelling):
        now calls out to both findFirstMisspellingInRange and findFirstBadGrammarInRange separately
        instead of trying to interweave the spelling and grammar logic

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

13 years ago Reviewed by Mitz.
rwlbuis [Fri, 1 Dec 2006 21:21:07 +0000 (21:21 +0000)]
    Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=11732:
        Windows build bustage.

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

13 years ago Reviewed by Adam.
thatcher [Fri, 1 Dec 2006 18:44:41 +0000 (18:44 +0000)]
    Reviewed by Adam.

        <rdar://problem/4841432> 9A312: iWeb crashes on launch; _WebReportError missing from WebKit

        Added back WebReportAssertionFailure and WebReportError for apps that still need these symbols.

        * Misc/OldWebAssertions.c: Added.
        (WebReportAssertionFailure):
        (WebReportError):
        * WebKit.LP64.exp: added the new symbols, and sorted the file
        * WebKit.exp: added the new symbols, and sorted the file
        * WebKit.xcodeproj/project.pbxproj:

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

13 years agoCorrecting the copyright date since these are new files.
thatcher [Fri, 1 Dec 2006 18:34:33 +0000 (18:34 +0000)]
Correcting the copyright date since these are new files.

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

13 years ago2006-11-30 Steve Falkenburg <sfalken@apple.com>
sfalken [Fri, 1 Dec 2006 05:42:19 +0000 (05:42 +0000)]
2006-11-30  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Oliver.

        Move WTF from JavaScriptCore project into a new WTF project.

        * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WTF.vcproj to sln
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove WTF source files
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added.
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add dependency on WTF.lib

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

13 years agoWebCore:
ggaren [Fri, 1 Dec 2006 04:15:19 +0000 (04:15 +0000)]
WebCore:

        Rubber Stamped by Anders Carlsson.

        Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
        suggested a command, and conflicted with a different meaning for 'focusNode'
        in the Mozilla selection API.

WebKit:

        Rubber Stamped by Anders Carlsson.

        Global rename of Document::focusNode to Document::focusedNode. 'focusNode'
        suggested a command, and conflicted with a different meaning for 'focusNode'
        in the Mozilla selection API.

        * WebView/WebHTMLView.m:
        (-[NSArray clearFocus]):

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

13 years agoLayoutTests:
sullivan [Fri, 1 Dec 2006 00:55:56 +0000 (00:55 +0000)]
LayoutTests:

        Reviewed by Justin

        * 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:
        This test's results were broken by using rangeCompliantEquivalent at
        appropriate places in CompositeEditCommand.cpp::moveParagraphs(), presumably
        by revealing a different bug. Justin is going to look into this; for now I've
        updated the result so that it won't appear to fail for others.

        * editing/execCommand/create-list-with-hr-expected.checksum:
        * editing/execCommand/create-list-with-hr-expected.png:
        * editing/execCommand/create-list-with-hr-expected.txt:
        * editing/execCommand/create-list-with-hr.html:
        This test's results were improved by using rangeCompliantEquivalent at
        appropriate places in CompositeEditCommand.cpp::moveParagraphs() -- it used
        to create an extra <div>, and now it does not.

WebCore:

        Reviewed by Justin

        With Darin, fixed a problem in the Range constructors found while implementing grammar checking.
        That revealed another problem in the layout tests involving bad parameters passed to the Range
        constructors.

        With these fixes in place, one layout test (editing/execCommand/create-list-from-range-selection.html)
        no longer works as intended. This is apparently due to yet another bug being flushed out somewhere.
        I'm going to update the results for that test and file a separate radar about it, which Justin will
        investigate.

        * dom/Position.h:
        removed equivalentRangeCompliantPosition(), which was declared but not implemented or called.

        * dom/Range.cpp:
        (WebCore::Range::Range):
        Call setStart and setEnd in the two Range constructors that take parameters, rather than just
        directly setting the instance variables. This makes Range perform the boundary checks and
        compensations that the DOM spec requires.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs):
        Use rangeCompliantEquivalent() on "editing-style" Positions before creating Ranges from them.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator):
        Assert that the boundary points of the range are valid.

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

13 years ago Reviewed by Mitz.
thatcher [Fri, 1 Dec 2006 00:14:17 +0000 (00:14 +0000)]
    Reviewed by Mitz.

        Bug 10698: Scroll wheel causes inspector to shift up
        http://bugs.webkit.org/show_bug.cgi?id=10698

        Remove size attribute from the tree popup as a workaround for
        http://bugs.webkit.org/show_bug.cgi?id=11362 Bug 11362: Native popup with size="1" wraps options

        * WebInspector/webInspector/inspector.css:
        * WebInspector/webInspector/inspector.html:

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

13 years ago Reviewed by Tim H.
thatcher [Fri, 1 Dec 2006 00:11:18 +0000 (00:11 +0000)]
    Reviewed by Tim H.

        Move web inspector style markup to javascript to fix http://bugs.webkit.org/show_bug.cgi?id=6724
        Bug 6724: Text copied from Web Inspector is different from actual text

        * WebInspector/webInspector/inspector.css:
        * WebInspector/webInspector/inspector.js:

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

13 years agoRemoving the conflict marker.
thatcher [Fri, 1 Dec 2006 00:03:50 +0000 (00:03 +0000)]
Removing the conflict marker.

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

13 years ago2006-11-30 Lou Amadio <lamadio@apple.com>
lamadio [Thu, 30 Nov 2006 22:29:32 +0000 (22:29 +0000)]
2006-11-30  Lou Amadio  <lamadio@apple.com>

        Reviewed by Dave Hyatt
        Cleaned up generated files.

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

13 years agoWebCore:
aroben [Thu, 30 Nov 2006 22:07:17 +0000 (22:07 +0000)]
WebCore:

        Reviewed by Beth.

        Store ContextMenu's NSMutableArray inside a RetainPtr so that we
        will retain/release it correctly.

        * WebCore.exp:
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::populate): Added a FIXME.
        * platform/ContextMenu.h:
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::~ContextMenu):
        (WebCore::getNSMenuItem):
        (WebCore::ContextMenu::appendItem):
        (WebCore::ContextMenu::itemCount):
        (WebCore::ContextMenu::insertItem):
        (WebCore::ContextMenu::setPlatformDescription):
        (WebCore::ContextMenu::platformDescription):

WebKit:

        Reviewed by Beth.

        Put code in place to use WebCore context menus when they are turned
        on.

        * WebView/WebHTMLView.m:
        (-[NSArray menuForEvent:]):

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

13 years agoReviewed by Eric. Rubber stamped by Oliver.
zimmermann [Thu, 30 Nov 2006 21:47:57 +0000 (21:47 +0000)]
Reviewed by Eric. Rubber stamped by Oliver.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=10383

This is the final patch after the long "die kcanvas" journey.

All old kcanvas code is gone now, and properly integrated within
WebCore (stuff like GraphicsContext changes etc.). It shares
the platform/ design concept: no subclassing, but instead
implementing parts of the classes/methods per-platform.

This commit removes the last pieces: KRenderingDevice & KRenderingDeviceContext.
This layer was just obsolete, given the powerful GraphicsContext API we have
since quite a while now. All the ugly pushContext/popContext stuff is gone now.

The naming issues Cg vs. CG will be fixed in one shot, when moving the whole
platform/graphics/svg directory down into ksvg2/graphics - as discussed with Darin.

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

13 years agoJavaScriptCore:
ggaren [Thu, 30 Nov 2006 21:06:14 +0000 (21:06 +0000)]
JavaScriptCore:

        Reviewed by Beth Dakin.

        Fixed up garbage collection at window close time.

        * kjs/interpreter.cpp:
        (KJS::Interpreter::~Interpreter): Garbage collect here, since
        destroying the interpreter frees the global object and
        therefore creates a lot of garbage.

WebCore:

        Reviewed by Beth Dakin.

        Fixed up garbage collection at window close time.

        * bindings/js/kjs_proxy.cpp: Don't garbage collect in the KJSProxy
        destructor, since the global object hasn't been freed yet.
        * bindings/js/kjs_proxy.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::detachFromParent): Made this function cross-
        platform.
        * loader/FrameLoader.h:
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::setTitle): Moved this function to FrameLoaderMac,
        since it's Mac-only.
        (WebCore::FrameLoader::closeBridge):
        * page/Page.cpp:
        (WebCore::Page::~Page): Don't garbage collect in the Page destructor,
        since the Interpreter destructor will do it for us.

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

13 years ago Reviewed by Tim's rubberstamp
beidson [Thu, 30 Nov 2006 19:23:01 +0000 (19:23 +0000)]
    Reviewed by Tim's rubberstamp

        Amazingly, DocumentLoader.h survived all this time without a header guard...

        * loader/DocumentLoader.h:  Added header guard

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

13 years ago Reviewed by Brady and Eric.
thatcher [Thu, 30 Nov 2006 17:37:47 +0000 (17:37 +0000)]
    Reviewed by Brady and Eric.

        XMLHttpRequest fails in a page loaded with WebFrame's loadHTMLString: or loadData:
        http://bugs.webkit.org/show_bug.cgi?id=11723

        Allow cross-domain XMLHTTPRequest for applewebdata URLs. No automated way to test,
        tested in Safari's debug Snippet Editor.

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):

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

13 years ago Reviewed by Brady.
andersca [Thu, 30 Nov 2006 03:26:15 +0000 (03:26 +0000)]
    Reviewed by Brady.

        Get rid of PlatformResponse, the platform specific response object is stored inside of
        the ResourceResponse object now. This also gets rid of receivedResponse in ResourceHandleClient.

        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getData:andResponse:forURL:]):
        (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::~CachedResource):
        * loader/CachedResource.h:
        (WebCore::CachedResource::response):
        * loader/loader.cpp:
        * loader/loader.h:
        * loader/mac/ImageDocumentMac.mm:
        (WebCore::finishImageLoad):
        * loader/mac/LoaderFunctionsMac.mm:
        (WebCore::CheckCacheObjectStatus):
        * loader/mac/SubresourceLoaderMac.mm:
        (WebCore::SubresourceLoader::didReceiveResponse):
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceResponse.h:
        (WebCore::ResourceResponse::nsURLResponse):
        (WebCore::ResourceResponse::cfURLResponse):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::didReceiveResponse):

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

13 years agoLayoutTests:
justing [Thu, 30 Nov 2006 02:54:19 +0000 (02:54 +0000)]
LayoutTests:

        Reviewed by sullivan

        <rdar://problem/4845371>
        In Mail, a crash occurs at WebCore::Node::traverseNextNode() when cutting selected text from a HTML message

        * editing/deleting/4845371-expected.checksum: Added.
        * editing/deleting/4845371-expected.png: Added.
        * editing/deleting/4845371-expected.txt: Added.
        * editing/deleting/4845371.html: Added.

WebCore:

        Reviewed by sullivan

        <rdar://problem/4845371>
        In Mail, a crash occurs at WebCore::Node::traverseNextNode() when cutting selected text from a HTML message

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializeStartEnd): The start/end were
        being inflated even when they were the start/end of a partially selected
        special element.

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

13 years agoBuild fix: ResourceRequestMac.h was removed in r17911.
bdash [Thu, 30 Nov 2006 02:01:24 +0000 (02:01 +0000)]
Build fix:  ResourceRequestMac.h was removed in r17911.

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

13 years ago Reviewed by Oliver.
thatcher [Thu, 30 Nov 2006 00:59:37 +0000 (00:59 +0000)]
    Reviewed by Oliver.

        Keep preferences separate from the rest of the client, making sure we are using expected preference values.
        This lets the inspector work when plugins are disabled for the WebView.

        * WebInspector/WebInspector.m:
        (-[NSWindow window]):

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

13 years ago Reviewed by Oliver.
andersca [Wed, 29 Nov 2006 22:42:37 +0000 (22:42 +0000)]
    Reviewed by Oliver.

        Fix fast/dom/xmlhttprequest-get layout test failure.

        * platform/network/mac/ResourceResponseMac.mm:
        Initialize the status code to 0 for non-http responses.

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

13 years ago Reviewed by Anders Carlsson.
ggaren [Wed, 29 Nov 2006 22:14:22 +0000 (22:14 +0000)]
    Reviewed by Anders Carlsson.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=11712
        REGRESSION: Crash when clicking JS link on crateandbarrel.com (window.open("http[...]"))

        This was an accidental commit by Anders.

        Chrome can't use the FrameView at window.open time, because it doesn't
        exist yet.

        * page/Chrome.cpp:
        (WebCore::Chrome::pageRect):

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

13 years ago Reviewed by Mitz Pettel.
ggaren [Wed, 29 Nov 2006 21:58:41 +0000 (21:58 +0000)]
    Reviewed by Mitz Pettel.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=11710
        REGRESSION (r17906): Crash in WebCore::FrameMac

        Added null checks for EditorClient, since it can be NULL when the page
        has been destroyed. Removed external access to EditorClient, since it's
        an implementation detail of the Editor.

        No test case because this crash depends on window tear-down. Layout tests
        pass.

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

13 years ago Reviewed by Tim.
andersca [Wed, 29 Nov 2006 18:47:11 +0000 (18:47 +0000)]
    Reviewed by Tim.

        Add back methods in WebCoreStatistics that are still used by Tiger Safari.

        * Misc/WebCoreStatistics.h:
        * Misc/WebCoreStatistics.m:
        (+[WebCoreStatistics emptyCache]):
        (+[WebCoreStatistics setCacheDisabled:]):

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

13 years ago Fix build.
andersca [Wed, 29 Nov 2006 18:38:17 +0000 (18:38 +0000)]
    Fix build.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::receivedResponse):
        Fix tyop.

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

13 years ago Reviewed by Darin.
andersca [Wed, 29 Nov 2006 18:29:08 +0000 (18:29 +0000)]
    Reviewed by Darin.

        Have ResourceResponse hold on to the platform object and do lazy
        initialization of the data members.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::loadResourceSynchronously):
        * platform/network/ResourceRequest.cpp:
        (WebCore::ResourceRequest::updatePlatformRequest):
        (WebCore::ResourceRequest::updateResourceRequest):
        * platform/network/ResourceResponse.cpp: Added.
        (WebCore::ResourceResponse::url):
        (WebCore::ResourceResponse::mimeType):
        (WebCore::ResourceResponse::expectedContentLength):
        (WebCore::ResourceResponse::textEncodingName):
        (WebCore::ResourceResponse::suggestedFilename):
        (WebCore::ResourceResponse::httpStatusCode):
        (WebCore::ResourceResponse::setHTTPStatusCode):
        (WebCore::ResourceResponse::httpStatusText):
        (WebCore::ResourceResponse::setHTTPStatusText):
        (WebCore::ResourceResponse::httpHeaderField):
        (WebCore::ResourceResponse::httpHeaderFields):
        (WebCore::ResourceResponse::setExpirationDate):
        (WebCore::ResourceResponse::expirationDate):
        (WebCore::ResourceResponse::setLastModifiedDate):
        (WebCore::ResourceResponse::lastModifiedDate):
        (WebCore::ResourceResponse::updateResourceResponse):
        * platform/network/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):
        (WebCore::ResourceResponse::isMultipart):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::receivedResponse):
        (WebCore::ResourceHandle::willSendRequest):
        * platform/network/mac/ResourceResponseMac.h: Removed.
        * platform/network/mac/ResourceResponseMac.mm:
        (-[NSURLResponse WebCore]):

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

13 years agoWebCore:
aliceli1 [Wed, 29 Nov 2006 07:25:53 +0000 (07:25 +0000)]
WebCore:

        Reviewed by Maciej.

        A fix for a couple failing layout tests involving copy/cut in iframes.

        * bridge/EditorClient.h:
        Add frame parameter to dataForArchivedSelectionInFrame instead of
        just getting the webview's selectedFrame.

        * platform/mac/PasteboardMac.mm:
        (Pasteboard::writeSelection):
        Pass in the frame

WebKit:

        Reviewed by Maciej.

        A fix for a couple failing layout tests involving copy/cut in iframes.

        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::dataForArchivedSelection):
        Use the frame parameter instead of using the webview's selectedFrame.

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

13 years ago Reviewed by Geoffff.
bdakin [Wed, 29 Nov 2006 06:42:26 +0000 (06:42 +0000)]
    Reviewed by Geoffff.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11691 REGRESSION
        (r17399, r17511): WebElementDictionary no longer returns nil
        NSStrings

        String's NSString* operator converts null Strings to empty
        NSStrings for compatibility with AppKit. We need to work around
        that here.

        * Misc/WebElementDictionary.m:
        (NSStringOrNil):
        (-[WebElementDictionary _altDisplayString]):
        (-[WebElementDictionary _spellingToolTip]):
        (-[WebElementDictionary _title]):
        (-[WebElementDictionary _titleDisplayString]):
        (-[WebElementDictionary _textContent]):

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

13 years agoWebCore:
ggaren [Wed, 29 Nov 2006 06:11:14 +0000 (06:11 +0000)]
WebCore:

        Reviewed by Beth Dakin.

        Fixed <rdar://problem/4844855> Should clarify when to create clients in
        the WebCore client API

        All clients must now be supplied as constructor arguments. This clarifies
        when you need to create clients, and also guarantees that objects can't
        (for the most part) be in a clientless state.

        Layout tests pass. No leaks reported.

        * bridge/mac/WebCoreFrameBridge.mm: I had to move some initialization up into
        WebKit to resolve circular dependencies at init time.

WebKit:

        Reviewed by Beth Dakin.

        Fixed <rdar://problem/4844855> Should clarify when to create clients in
        the WebCore client API

        All clients must now be supplied as constructor arguments. This clarifies
        when you need to create clients, and also guarantees that objects can't
        (for the most part) be in a clientless state.

        Layout tests pass. No leaks reported.

        * WebCoreSupport/WebFrameBridge.mm: Shuffled around initialization and changed
        some arguments to resolve ciruclar dependencies at init time.
        (-[WebFrame _initWithWebFrameView:webView:bridge:]): We no longer call setClient
        here, because the client is set up at construction time.

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

13 years ago Reviewed by Ada.
aroben [Wed, 29 Nov 2006 04:19:21 +0000 (04:19 +0000)]
    Reviewed by Ada.

        Add platform-specific constructor/destructor to ContextMenu so we can
        properly retain/release the platform menu description.

        * platform/ContextMenu.h:
        (WebCore::ContextMenu::platformDescription):
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::~ContextMenu):
        (WebCore::getNSMenuItem):
        (WebCore::ContextMenu::appendItem):
        (WebCore::ContextMenu::itemCount):
        (WebCore::ContextMenu::insertItem):
        (WebCore::ContextMenu::setPlatformDescription):

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

13 years ago Build fix.
aroben [Wed, 29 Nov 2006 01:51:39 +0000 (01:51 +0000)]
    Build fix.

        * platform/network/mac/ResourceRequestMac.mm:

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

13 years agoLayoutTests:
harrison [Wed, 29 Nov 2006 01:24:47 +0000 (01:24 +0000)]
LayoutTests:

        Reviewed by Adele.

        <rdar://problem/4852804> selection color does not get drawn over the missing image rectangle

        * editing/selection/select-missing-image-expected.checksum: Added.
        * editing/selection/select-missing-image-expected.png: Added.
        * editing/selection/select-missing-image-expected.txt: Added.
        * editing/selection/select-missing-image.html: Added.

WebCore:

        Reviewed by Adele.

        <rdar://problem/4852804> selection color does not get drawn over the missing image rectangle

        Test:
        * editing/selection/select-missing-image.html: Added.

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paint):
        Draw the selection tint even if the image itself is not available.

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

13 years agoWebCore:
andersca [Wed, 29 Nov 2006 01:15:46 +0000 (01:15 +0000)]
WebCore:

        Reviewed by Maciej.

        Have ResourceRequest hold on to the platform object so we don't
        have to convert back and forth when nothing in the object changes.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::continueAfterNavigationPolicy):
        * page/Chrome.cpp:
        (WebCore::Chrome::pageRect):
        * platform/network/ResourceRequest.cpp: Added.
        (WebCore::ResourceRequest::isEmpty):
        (WebCore::ResourceRequest::url):
        (WebCore::ResourceRequest::setURL):
        (WebCore::ResourceRequest::cachePolicy):
        (WebCore::ResourceRequest::setCachePolicy):
        (WebCore::ResourceRequest::timeoutInterval):
        (WebCore::ResourceRequest::setTimeoutInterval):
        (WebCore::ResourceRequest::mainDocumentURL):
        (WebCore::ResourceRequest::setMainDocumentURL):
        (WebCore::ResourceRequest::httpMethod):
        (WebCore::ResourceRequest::setHTTPMethod):
        (WebCore::ResourceRequest::httpHeaderFields):
        (WebCore::ResourceRequest::httpHeaderField):
        (WebCore::ResourceRequest::setHTTPHeaderField):
        (WebCore::ResourceRequest::httpBody):
        (WebCore::ResourceRequest::setHTTPBody):
        (WebCore::ResourceRequest::allowHTTPCookies):
        (WebCore::ResourceRequest::setAllowHTTPCookies):
        (WebCore::ResourceRequest::updatePlatformRequest):
        (WebCore::ResourceRequest::updateResourceRequest):
        (WebCore::ResourceRequest::addHTTPHeaderField):
        (WebCore::ResourceRequest::addHTTPHeaderFields):
        * platform/network/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::willSendRequest):
        * platform/network/mac/ResourceRequestMac.h: Removed.
        * platform/network/mac/ResourceRequestMac.mm:
        (WebCore::ResourceRequest::nsURLRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

WebKit:

        Reviewed by Maciej.

        Update for changes to ResourceRequest.

        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::createWindow):
        (WebChromeClient::createModalDialog):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::canHandleRequest):

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

13 years agoWebCore:
aroben [Wed, 29 Nov 2006 00:42:45 +0000 (00:42 +0000)]
WebCore:

        Reviewed by Beth.

        More WebCore context menu work (still not turned on, however).

        Split ContextMenuItem into its own files and make it a class.

        * WebCore.exp: Updated symbols.
        * WebCore.xcodeproj/project.pbxproj: Added new ContextMenuItem files.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::populate): Code cleanup.
        * platform/ContextMenu.h: Split ContextMenuItem into a separate file,
        removed redundant "Menu" part of platformMenuDescription(),
        setPlatformMenuDescription().
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::hitTestResult):
        (WebCore::ContextMenu::platformDescription):
        * platform/ContextMenuItem.h: Added. Made ContextMenuItem a
        full-fledged class.
        (WebCore::):
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::menu):
        (WebCore::ContextMenuItem::platformDescription):
        (WebCore::ContextMenuItem::type):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::title):
        * platform/mac/ContextMenuItemMac.mm: Added.
        (WebCore::ContextMenuItem::ContextMenuItem):
        * platform/mac/ContextMenuMac.mm: Updated for ContextMenuItem changes.
        (-[MenuTarget forwardContextMenuAction:]):
        (getNSMenuItem): Handle separator items.
        (ContextMenu::appendItem):
        (ContextMenu::itemCount):
        (ContextMenu::insertItem):
        (ContextMenu::setPlatformDescription):
        * page/ContextMenuController.h: Updated declaration, added getter.
        (WebCore::ContextMenuController::contextMenu):

        Added some more context menu plumbing.

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::defaultEventHandler): Added code to call the
        ContextMenuController when a context menu event is received.
        * page/ContextMenuClient.h: New client method declaration.
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Set the event
        defaultHandled after handling it.
        (WebCore::ContextMenuController::contextMenuItemSelected): Take a
        ContextMenuItem instead of a separate action and title.

        Changed event-handling methods to return bools to signify whether the
        event was handled or not. This is needed so we can know whether to hand
        the event off to the OS. Also restructured some code to use early
        returns instead of nesting ifs.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEventDoubleClick):
        (WebCore::EventHandler::handleMousePressEventTripleClick):
        (WebCore::EventHandler::handleMousePressEventSingleClick):
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::handleMouseDoubleClickEvent):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::canMouseDownStartSelect):
        * page/EventHandler.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::handleMouseMoveEvent):
        (WebCore::FrameView::handleMouseReleaseEvent):
        * page/FrameView.h:
        * platform/ScrollBar.h: More bool return values.
        (WebCore::Scrollbar::handleMouseMoveEvent):
        (WebCore::Scrollbar::handleMouseOutEvent):
        * platform/Widget.h: Ditto.
        (WebCore::Widget::handleMouseMoveEvent):
        (WebCore::Widget::handleMouseReleaseEvent):

        Reverted the changes made in r17805 so that we can have fewer header
        #includes.

        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/Page.h: Ditto.
        (WebCore::Page::dragCaretController):
        (WebCore::Page::chrome):
        (WebCore::Page::contextMenuController):

WebKit:

        Reviewed by Beth.

        More WebCore context menu work.

        * DefaultDelegates/WebDefaultUIDelegate.m: New stub delegate method implementation.
        (-[NSApplication webView:contextMenuItemSelected:forElement:]):
        * WebCoreSupport/WebContextMenuClient.h: Updated to match ContextMenuClient.h changes.
        * WebCoreSupport/WebContextMenuClient.mm:
        (WebContextMenuClient::addCustomContextMenuItems): Updated for method name changes.
        (WebContextMenuClient::contextMenuItemSelected): Added new client method.
        * WebView/WebUIDelegatePrivate.h: New private delegate method declaration.

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

13 years agoWebCore:
aliceli1 [Tue, 28 Nov 2006 22:02:12 +0000 (22:02 +0000)]
WebCore:

        Reviewed by Justin and Adam.

        All layout tests pass as they do without this patch

        * WebCore.exp:
        Exposed functions in Editor and removed functions in FrameMac due to changes in WebHTMLView.m

        * WebCore.xcodeproj/project.pbxproj:
        Added Pasteboard.h, PasteboardMac.mm, WebNSAttributedStringExtras.h&mm, EditorMac.mm

        * bridge/EditorClient.h:
        Added smartInsertDeleteEnabled and shouldInsertNode and some mac-specific functions

        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        Removed dispatchCPPEvent and [can|try]DHTML[cut|copy|paste] since the Editor's are called now

        * dom/CharacterData.h:
        (WebCore::CharacterData::isCharacterDataNode):
        * dom/Node.h:
        (WebCore::Node::isCharacterDataNode):
        Added a type-identifying function to Node and the proper subclass

        * dom/Clipboard.h:
        Exposed setAccessPolicy as public

        * editing/Editor.h:
        * editing/Editor.cpp:
        Implemented the following
        (WebCore::Editor::canDHTMLCut):
        (WebCore::Editor::canDHTMLCopy):
        (WebCore::Editor::canDHTMLPaste):
        (WebCore::Editor::canSmartCopyOrDelete):
        (WebCore::Editor::deleteSelection):
        (WebCore::Editor::pasteAsPlainTextWithPasteboard):
        (WebCore::Editor::pasteWithPasteboard):
        (WebCore::Editor::canSmartReplaceWithPasteboard):
        (WebCore::Editor::shouldInsertFragment):
        (WebCore::Editor::replaceSelectionWithFragment):
        (WebCore::Editor::replaceSelectionWithText):
        (WebCore::Editor::selectedRange):
        (WebCore::Editor::shouldDeleteRange):
        (WebCore::Editor::tryDHTMLCopy):
        (WebCore::Editor::tryDHTMLCut):
        (WebCore::Editor::tryDHTMLPaste):
        (WebCore::Editor::writeSelectionToPasteboard):
        (WebCore::Editor::dispatchCPPEvent):
        (WebCore::Editor::cut):
        (WebCore::Editor::copy):
        (WebCore::Editor::paste):

        * platform/mac/ClipboardAccessPolicy.h: Removed.
        Not removed, but moved to dom/ClipboardAccessPolicy.h

        * platform/mac/EditorMac.mm: Added.
        (WebCore::Editor::newGeneralClipboard):

        * platform/Pasteboard.h: Added.
        * platform/mac/PasteboardMac.mm: Added.
        The pasteboard class follows a singleton pattern
        (Pasteboard::generalPasteboard):
        (Pasteboard::~Pasteboard):
        (Pasteboard::Pasteboard):
        (Pasteboard::clearTypes):
        (Pasteboard::writeSelection):
        (Pasteboard::selectionPasteboardTypes):
        (Pasteboard::canSmartReplace):
        (Pasteboard::plainText):
        (Pasteboard::documentFragment):

        * platform/mac/WebNSAttributedStringExtras.h: Added.
        * platform/mac/WebNSAttributedStringExtras.mm: Added.
        Added select portions of this file from WebKit because the pasteboard needed the following function:
        (-[NSAttributedString _web_attributedStringByStrippingAttachmentCharacters]):

WebKit:

        Reviewed by Justin and Adam.

        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        added the following
        (WebEditorClient::smartInsertDeleteEnabled):
        (WebEditorClient::dataForArchivedSelectionInFrame):
        (WebEditorClient::_web_userVisibleString):
        (WebEditorClient::shouldInsertNode):

        * WebKitPrefix.h:
        Added flags to control whether WebCore cut/copy/paste is enabled.
        Turned on Cut and Copy, left Paste and Delete off

        * WebView/WebHTMLViewPrivate.h:
        * WebView/WebHTMLView.m:
        removed _can[Cut|Copy|Paste|Delete]
        (-[NSArray validateUserInterfaceItem:]):
        call the editor for canDHTML[C|C|P|D] and _can[C|C|P|D] instead
        (-[NSArray delete:]):
        added code to call the editor's delete instead (not turned on)
        (-[WebHTMLView copy:]):
        added code to call the editor's copy (turned on)
        (-[WebHTMLView cut:]):
        added code to call the editor's cut (turned on)
        (-[WebHTMLView paste:]):
        added code to call the editor's paste (not turned on)

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

13 years agoLayoutTests:
justing [Tue, 28 Nov 2006 21:25:28 +0000 (21:25 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4397952>
        Cannot select buttons at the end of a document, preventing copy/paste

        * editing/selection/4397952-expected.checksum: Added.
        * editing/selection/4397952-expected.png: Added.
        * editing/selection/4397952-expected.txt: Added.
        * editing/selection/4397952.html: Added.

WebCore:

        Reviewed by harrison

        <rdar://problem/4397952>
        Cannot select buttons at the end of a document, preventing copy/paste

        There were no VisiblePositions before/after buttons because editingIgnoresContent
        returned false for buttons.

        * dom/Position.cpp:
        (WebCore::Position::upstream): Fixed a comment.
        (WebCore::Position::downstream): Ditto.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializeStartEnd): Ditto.
        * editing/htmlediting.cpp:
        (WebCore::editingIgnoresContent): It's unnecessary to prefer renderer
        checks over tag name checks because it seems that a node of a tag name
        that we do not ignore content for can't have a renderer of a type that we do.
        (WebCore::canHaveChildrenForEditing): Added selects, buttons, applets, and embeds.
        * editing/visible_units.cpp:
        (WebCore::previousLinePosition): Migrate to enclosingBlock.  Fixes a bug where the
        caret would get stuck moving up/down a line from a caret just before an
        input element.
        (WebCore::nextLinePosition): Ditto.

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

13 years agoWebCore:
ggaren [Tue, 28 Nov 2006 18:54:03 +0000 (18:54 +0000)]
WebCore:

        Reviewed by Adam.

        Fixed <rdar://problem/4844848> REGRESSION: extra cross-library ref/deref
        calls cause .5% PLT regression.

        Changed ref/deref calls to a single 'xxxDestroyed' call. Moved EditorClient
        from the Frame to the Page, since it's only responsible for
        Webview-level delegate calls.

        I don't really love this design, but it fixes the regression and allows
        a single WebKit object to implement multiple client interfaces.

        Layout tests pass.

WebKit:

        Reviewed by Adam.

        Fixed <rdar://problem/4844848> REGRESSION: extra cross-library ref/deref
        calls cause .5% PLT regression.

        Changed ref/deref calls to a single 'xxxDestroyed' call. Moved EditorClient
        from the Frame to the Page, since it's only responsible for
        Webview-level delegate calls.

        I don't really love this design, but it fixes the regression and allows
        a single WebKit object to implement multiple client interfaces.

        Layout tests pass.

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

13 years ago2006-11-27 Anders Carlsson <acarlsson@apple.com>
andersca [Tue, 28 Nov 2006 07:06:57 +0000 (07:06 +0000)]
2006-11-27  Anders Carlsson  <acarlsson@apple.com>

        Try fixing the build.

        * platform/graphics/IntRect.cpp:
        (WebCore::IntRect::IntRect):

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

13 years agoWebCore:
bdakin [Tue, 28 Nov 2006 06:26:51 +0000 (06:26 +0000)]
WebCore:
        Reviewed by Adam.

        Getting rid of some of the critical FIXMEs in ContextMenu.cpp.

        * bridge/mac/FrameMac.h: Two new spell checker functions from
        WebKit. (We will be able to delete the WebKit versions once we
        switch over to WebCore context menus.)
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::isSelectionMisspelled):
        (WebCore::core): Convert from NSArray of Strings to a Vector of
        Strings.
        (WebCore::FrameMac::guessesForMisspelledSelection):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::canHandleRequest):
        * loader/FrameLoader.h: Make canHandleRequest available through the
        FrameLoader.
        * loader/FrameLoaderClient.h: canHandleRequest takes a
        ResourceRequest instead of an NSURLRequest.
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::continueAfterNavigationPolicy): Same
        * page/Frame.h: New spell checker functions moved to Frame. These
        should be moved some place better some day, but FrameMac currently
        seems to be the place to be for spell checker stuff.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::populate): Use new FrameLoader and spell
        checking functionality to get rid of two if (true) statements. Also
        add spelling guesses to the editing context menus.

WebKit:
        Reviewed by Adam.

        WebKit half of getting rid of the FixMes in ContextMenu.cpp

        * WebCoreSupport/WebFrameLoaderClient.h: canHandleRequest takes a
        ResourceRequest now.
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::canHandleRequest): Same.
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _isSelectionMisspelled]): Call into WebCore.

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

13 years ago Reviewed by Hyatt.
ap [Tue, 28 Nov 2006 05:33:18 +0000 (05:33 +0000)]
    Reviewed by Hyatt.

        http://bugs.webkit.org/show_bug.cgi?id=11694
        XSLT output method does not default to HTML when the target document is HTML

        Test: fast/xsl/default-html.html

        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::transformToString): Make mimeType an input/output parameter,
        serving as a hint when the stylesheet doesn't specify the output method.
        (WebCore::XSLTProcessor::transformToFragment): Set mimeType to text/html if the target
        document is HTML.

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

13 years ago2006-11-27 Oliver Hunt <oliver@apple.com>
oliver [Tue, 28 Nov 2006 04:33:23 +0000 (04:33 +0000)]
2006-11-27  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fixes a crash in SVG caused by an attempt to
        perform css overflow clipping by preventing
        the css overflow clip from being set in SVG.

        <rdar:/problems/4839568>

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

13 years ago Reviewed by Adam.
andersca [Tue, 28 Nov 2006 03:01:11 +0000 (03:01 +0000)]
    Reviewed by Adam.

        Add an explicit IntRect constructor that takes a FloatRect.

        * platform/graphics/IntRect.cpp:
        (WebCore::IntRect::IntRect):
        * platform/graphics/IntRect.h:

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

13 years agoWebCore:
adachan [Tue, 28 Nov 2006 02:18:43 +0000 (02:18 +0000)]
WebCore:

        Reviewed by Adam.

        Moved WebCoreCache up to WebKit.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreCache.h: Removed.
        * bridge/mac/WebCoreCache.mm: Removed.

WebKit:

        Reviewed by Adam.

        Part of the change to move WebCoreCache into WebKit:
        Added WebCache which handles emptying and enable/disabling the cache.
        emptyCache and setCacheDisabled have been removed from WebCoreStatistics.

        * Misc/WebCache.h: Added.
        * Misc/WebCache.mm: Added.
        * Misc/WebCoreStatistics.h:
        * Misc/WebCoreStatistics.m:
        (+[WebCoreStatistics statistics]):
        * WebKit.exp:
        * WebKit.xcodeproj/project.pbxproj:

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

13 years ago Reviewed by Adam.
kmccullo [Tue, 28 Nov 2006 01:06:19 +0000 (01:06 +0000)]
    Reviewed by Adam.

        * fast/forms/resources/success.html: Removed.
        * fast/forms/targeted-frame-submission-expected.checksum:
        * fast/forms/targeted-frame-submission-expected.png:
        * fast/forms/targeted-frame-submission-expected.txt:
        * fast/forms/targeted-frame-submission.html:

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

13 years agoBuild fix. Use the CGPDFPage APIs to get the media rect, crop rect and rotation.
thatcher [Tue, 28 Nov 2006 00:29:50 +0000 (00:29 +0000)]
Build fix. Use the CGPDFPage APIs to get the media rect, crop rect and rotation.

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

13 years ago Reviewed by Adam and Anders.
kmccullo [Mon, 27 Nov 2006 23:01:33 +0000 (23:01 +0000)]
    Reviewed by Adam and Anders.

        Testcase for:
        Targeted frame submission.

        * fast/forms/resources/success.html: Added.
        * fast/forms/targeted-frame-submission-expected.checksum: Added.
        * fast/forms/targeted-frame-submission-expected.png: Added.
        * fast/forms/targeted-frame-submission-expected.txt: Added.
        * fast/forms/targeted-frame-submission.html: Added.

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

13 years agoWebCore:
andersca [Mon, 27 Nov 2006 22:59:58 +0000 (22:59 +0000)]
WebCore:

        Reviewed by Adam.

        Move addMessageToConsole to Chrome.

        * bindings/js/kjs_events.cpp:
        (KJS::JSAbstractEventListener::handleEvent):
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::evaluate):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        (KJS::ScheduledAction::execute):
        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        * bridge/mac/WebCoreFrameBridge.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::addMessageToConsole):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/Frame.h:

WebKit:

        Reviewed by Adam.

        Move addMessageToConsole to Chrome.

        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::addMessageToConsole):
        * WebCoreSupport/WebFrameBridge.mm:

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

13 years ago Reviewed by Hyatt.
adele [Mon, 27 Nov 2006 21:30:37 +0000 (21:30 +0000)]
    Reviewed by Hyatt.

        - Fix for http://bugs.webkit.org/show_bug.cgi?id=8062
          Caret color in new text field should take background color and foreground color into consideration

        * editing/SelectionController.cpp: (WebCore::SelectionController::paintCaret):
          Use the foreground color of the rootEditableElement to determine the caret color.  This will work well for text controls in web pages (since the root is always the actual form control)
          as well as in editable WebViews, like in Mail, which will just pick up the color from the body element.

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

13 years ago Reviewed by Anders
beidson [Mon, 27 Nov 2006 20:53:29 +0000 (20:53 +0000)]
    Reviewed by Anders

        Moved unused Private SPI to Internal and pruned other unused code

        * Misc/WebIconDatabase.m:
        * Misc/WebIconDatabasePrivate.h:

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

13 years ago Reviewed by Maciej.
rwlbuis [Sun, 26 Nov 2006 13:09:00 +0000 (13:09 +0000)]
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11693
        Fix the Qt build, adapt to various enum/class renamings.

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

13 years ago Reviewed by Mitz.
rwlbuis [Fri, 24 Nov 2006 22:39:24 +0000 (22:39 +0000)]
    Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=11666
        .getScreenCTM() returns wrong values

        Take into account the local transform matrix too and
        so fix getScreenCTM/getCTM for <text>.

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

13 years ago Reviewed by Eric.
rwlbuis [Wed, 22 Nov 2006 21:24:32 +0000 (21:24 +0000)]
    Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=11661
        SVG: stroke not sensitive to mouse events (hit testing fails)

        Use mapAbsolutePointToLocal when hit-testing strokes.

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

13 years ago Reviewed by Mitz.
andersca [Wed, 22 Nov 2006 00:03:31 +0000 (00:03 +0000)]
    Reviewed by Mitz.

        General SVG cleanup. Change some enums to match the style guidelines, use PLATFORM(CG) instead of PLATFORM(MAC).
        Remove config.h inluce from AffineTransform.h

        * kcanvas/device/quartz/KRenderingDeviceQuartz.cpp:
        (WebCore::KRenderingDeviceQuartz::createPaintServer):
        (WebCore::KRenderingDeviceQuartz::createResource):
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        (WebCore::sharedSolidPaintServer):
        * ksvg2/svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::canvasResource):
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::buildGradient):
        * ksvg2/svg/SVGLinearGradientElement.h:
        (WebCore::SVGLinearGradientElement::gradientType):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
        (WebCore::SVGPatternElement::canvasResource):
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * ksvg2/svg/SVGRadialGradientElement.h:
        (WebCore::SVGRadialGradientElement::gradientType):
        * platform/graphics/AffineTransform.h:
        * platform/graphics/svg/SVGPaintServer.h:
        (WebCore::):
        * platform/graphics/svg/SVGPaintServerGradient.cpp:
        (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
        (WebCore::SVGPaintServerGradient::~SVGPaintServerGradient):
        * platform/graphics/svg/SVGPaintServerGradient.h:
        * platform/graphics/svg/SVGPaintServerLinearGradient.h:
        (WebCore::SVGPaintServerLinearGradient::type):
        * platform/graphics/svg/SVGPaintServerPattern.h:
        (WebCore::SVGPaintServerPattern::type):
        * platform/graphics/svg/SVGPaintServerRadialGradient.h:
        (WebCore::SVGPaintServerRadialGradient::type):
        * platform/graphics/svg/SVGPaintServerSolid.h:
        (WebCore::SVGPaintServerSolid::type):
        * platform/graphics/svg/SVGResource.h:
        (WebCore::):
        * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
        (WebCore::SVGPaintServer::renderPath):
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::updateQuartzGradientCache):
        (WebCore::SVGPaintServerGradient::teardown):
        (WebCore::SVGPaintServerGradient::renderPath):
        (WebCore::SVGPaintServerGradient::setup):
        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
        (WebCore::SVGPaintServerSolid::setup):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        * rendering/SVGInlineFlowBox.cpp:
        (WebCore::paintSVGInlineFlow):

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

13 years agoWebKit:
darin [Tue, 21 Nov 2006 18:14:07 +0000 (18:14 +0000)]
WebKit:

        Reviewed by Maciej.

        - make the close method do a more-complete job to prevent world leaks seen when
          running some of the layout tests

        * WebView/WebHTMLViewInternal.h: Added declaration of -[WebHTMLViewPrivate clear].
        * WebView/WebHTMLView.m:
        (-[WebHTMLViewPrivate clear]): Added method to drop references to other objects.
        We want to do this at "close" time, rather than waiting for deallocation time.
        This is especially important for the data source, which indirectly keeps a number of
        objects alive.
        (-[WebHTMLView close]): Added an explicit call to clear out the data source on the
        plug-in controller. Without this, we'd see the plug-in controller making calls to
        a deallocated data source during the layout tests. Added a call to the new clear method
        on the private object so that we release the objects at close time instead of waiting
        for deallocation time.

        * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way with the project file,
        because I can't fight the power.

WebKitTools:

        Reviewed by Maciej.

        - a couple changes to reduce the chance of false positives on the leakbot

        * DumpRenderTree/DumpRenderTree.m:
        (dumpRenderTree): Move the main function into a separate function so we can run
        a final garbage collect afterward without any stray values on the stack. Replaced
        the old way of closing down a WebView (setting the delegates to nil) with the new
        way (calling the close method), which does a more complete job of shutting
        everything down without waiting for the WebView object to be deallocated.
        (main): Put auto-release pool here and added an explicit call to garbage collect.
        With a separate function, we greatly reduce the chance that a stray address on the
        stack will keep an object alive.

        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Let Xcode do its thing,
        because I don't have what it takes to fight the power.

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

13 years agoReviewed by Oliver.
zimmermann [Tue, 21 Nov 2006 12:22:27 +0000 (12:22 +0000)]
Reviewed by Oliver.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=11658

Move KRenderingPaintServer* classes to the location
of all other resources (platform/graphics/svg).

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

13 years ago2006-11-21 Alex Taylor <darwin@techvisual.co.nz>
bdash [Tue, 21 Nov 2006 12:08:13 +0000 (12:08 +0000)]
2006-11-21  Alex Taylor  <darwin@techvisual.co.nz>

        Reviewed by Mitz.

        Pixel tests for border radius rendering bug
        - http://bugs.webkit.org/show_bug.cgi?id=11587

        * fast/borders/borderRadiusArcs01-expected.checksum: Added.
        * fast/borders/borderRadiusArcs01-expected.png: Added.
        * fast/borders/borderRadiusArcs01-expected.txt: Added.
        * fast/borders/borderRadiusArcs01.html: Added.
2006-11-21  Alex Taylor  <darwin@techvisual.co.nz>

        Reviewed by Mitz.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11587

        Adds calculations for bottom right radius's position
        which was being drawn incorrectly.

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paintBorder):

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

13 years ago2006-11-21 Matt Lilek <pewtermoose@gmail.com>
bdash [Tue, 21 Nov 2006 11:58:36 +0000 (11:58 +0000)]
2006-11-21  Matt Lilek  <pewtermoose@gmail.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11652
        Bug 11652: Mailing list address and URL are incorrect

        This also removes a lot of bit rot from the KWQ-era.

        * coding/contributing.html:
        * contact.html:
        * projects/css/index.html:
        * projects/editing/index.html:
        * projects/forms/index.html:
        * projects/html/index.html:
        * projects/portability/index.html:
        * projects/xslt/index.html:
        * quality/lifecycle.html:
        * quality/testwriting.html:

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

13 years ago Reviewed by Maciej.
rwlbuis [Tue, 21 Nov 2006 09:28:37 +0000 (09:28 +0000)]
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11519
        REGRESSION: Disabled file upload control doesn't have disabled appearance, failing fast/forms/file-input-disabled.html

        Transport disabled state from DOM element to the shadow
        DOM/render object.

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

13 years agoBuild fix: silence warning about use before initialization.
bdash [Tue, 21 Nov 2006 07:23:02 +0000 (07:23 +0000)]
Build fix: silence warning about use before initialization.

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

13 years ago Reviewed by Maciej.
andersca [Mon, 20 Nov 2006 23:27:46 +0000 (23:27 +0000)]
    Reviewed by Maciej.

        * loader/TextResourceDecoder.cpp:
        (WebCore::findXMLEncoding):
        Use CString instead of DeprecatedCString.

        * platform/CString.cpp:
        (WebCore::CString::find):
        * platform/CString.h:
        (WebCore::CString::data):
        Add find method, make data method inline.

        * platform/TextStream.cpp:
        * platform/TextStream.h:
        Remove DeprecatedCString functions.

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

13 years ago Reviewed by Maciej.
andersca [Mon, 20 Nov 2006 22:35:06 +0000 (22:35 +0000)]
    Reviewed by Maciej.

        Use CString instead of DeprecatedCString.

        * html/FormDataList.cpp:
        (WebCore::FormDataList::appendString):
        (WebCore::fixLineBreaks):
        (WebCore::FormDataList::appendFile):

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

13 years ago2006-11-20 W. Andy Carrel <wac@google.com>
ap [Mon, 20 Nov 2006 20:24:22 +0000 (20:24 +0000)]
2006-11-20  W. Andy Carrel  <wac@google.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11501
        REGRESSION: \u no longer escapes metacharacters in RegExps
        http://bugs.webkit.org/show_bug.cgi?id=11502
        Serializing RegExps doesn't preserve Unicode escapes

JavaScriptCore:
        * kjs/lexer.cpp:
        (Lexer::Lexer):
        (Lexer::setCode):
        (Lexer::shift):
        (Lexer::scanRegExp):
        Push \u parsing back down into the RegExp object rather than in the
        parser. This backs out r17354 in favor of a new fix that better
        matches the behavior of other browsers.

        * kjs/lexer.h:
        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp):
        (KJS::sanitizePattern):
        (KJS::isHexDigit):
        (KJS::convertHex):
        (KJS::convertUnicode):
        * kjs/regexp.h:
        Translate \u escaped unicode characters for the benefit of pcre.

        * kjs/ustring.cpp:
        (KJS::UString::append):
        Fix failure to increment length on the first UChar appended to a
        UString that was copy-on-write.

        * tests/mozilla/ecma_2/RegExp/properties-001.js:
        Adjust tests back to the uniform standards.

LayoutTests:
        * fast/js/kde/RegExp-expected.txt:
        * fast/js/regexp-unicode-handling-expected.txt:
        Adjust these test results to passing as a result of other included
        changes in this revision.

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

13 years ago2006-11-20 Samuel Weinig <sam@webkit.org>
bdash [Mon, 20 Nov 2006 19:58:34 +0000 (19:58 +0000)]
2006-11-20  Samuel Weinig  <sam@webkit.org>

        Reviewed by Alexey.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11656
        Fix Windows build

        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * bridge/win/ContextMenuClientWin.h:
        * bridge/win/EditorClientWin.h:
        * bridge/win/FrameWin.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::ContextMenu::show):
        (WebCore::ContextMenuClientWin::copyLinkToClipboard):
        (WebCore::ContextMenuClientWin::downloadURL):
        (WebCore::ContextMenuClientWin::copyImageToClipboard):
        (WebCore::ContextMenuClientWin::lookUpInDictionary):
        (WebCore::EditorClientWin::shouldInsertText):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameWin::ignoreSpelling):
        (WebCore::FrameWin::learnSpelling):
2006-11-20  Samuel Weinig  <sam@webkit.org>

        Reviewed by Alexey.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11656
        Fix Windows build

        * WebKit.vcproj/WebKit.vcproj: don't include directories that no
        longer exist.

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

13 years ago Reviewed by Maciej.
ap [Mon, 20 Nov 2006 19:56:38 +0000 (19:56 +0000)]
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=10736
        XMLHttpRequest.responseXML should be null on error

WebCore:
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::wellFormed):
        * dom/XMLTokenizer.h:
        (WebCore::Tokenizer::wellFormed):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::implicitClose):
        * dom/Document.h:
        (WebCore::Document::wellFormed):
        Tell whether XMLTokenizer saw an error. Always true (success) for HTML.

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::getResponseXML): Set the document to null if it's not well-formed.

LayoutTests:
        * http/tests/xmlhttprequest/zero-length-response-expected.txt:
        * http/tests/xmlhttprequest/zero-length-response-sync-expected.txt:
        Updated the results for the new behavior.

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

13 years ago Reviewed by Sam Weinig.
ap [Mon, 20 Nov 2006 18:59:12 +0000 (18:59 +0000)]
    Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=11633
        Implement XMLDocument properties xmlEncoding, xmlVersion, xmlStandalone

WebCore:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::setXMLVersion):
        (WebCore::Document::setXMLStandalone):
        * dom/Document.h:
        (WebCore::Document::xmlEncoding):
        (WebCore::Document::xmlVersion):
        (WebCore::Document::xmlStandalone):
        (WebCore::Document::setXMLEncoding):
        * dom/Document.idl:
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::startDocument):
        (WebCore::startDocumentHandler):
        (WebCore::XMLTokenizer::initializeParserContext):
        Added support for these properties, getting them from an libxml2 context.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument):
        HTMLDocument is the only kind of document that doesn't have xmlVersion default to "1.0".

        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        Added WK_ucfirst to properly uppercase xmlVersion and xmlStandalone.

LayoutTests:
        * dom/xhtml/level3/core/documentgetxmlencoding01-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlencoding03-expected.txt
        * dom/xhtml/level3/core/documentgetxmlstandalone04-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion01-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion02-expected.txt:
        * dom/xhtml/level3/core/documentgetxmlversion03-expected.txt:
        These now pass.

        * dom/xhtml/level3/core/documentgetxmlencoding03.xhtml: Re-added a correct test.

        * fast/dom/Window/window-properties-expected.txt: Added these new properties.

        * http/tests/xmlhttprequest/xml-encoding-expected.txt: Added.
        * http/tests/xmlhttprequest/xml-encoding.html: Added.
        * http/tests/xmlhttprequest/resources/xml-encoding.xml: Added.
        * http/tests/xmlhttprequest/resources/post-echo-as-utf-8.cgi: Added.
        Test how xmlEncoding interacts with XMLHttpRequest.

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

13 years agoReviewed by Rob.
zimmermann [Mon, 20 Nov 2006 16:12:30 +0000 (16:12 +0000)]
Reviewed by Rob.
Fix Qt/Linux build.

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

13 years agoQt build fix after r17853: add missing SVGResourceFilterQt.cpp.
bdash [Mon, 20 Nov 2006 13:14:08 +0000 (13:14 +0000)]
Qt build fix after r17853: add missing SVGResourceFilterQt.cpp.

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

13 years ago2006-11-20 Samuel Weinig <sam@webkit.org>
bdash [Mon, 20 Nov 2006 12:59:36 +0000 (12:59 +0000)]
2006-11-20  Samuel Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
        Fix Win32 build

        * kjs/config.h: define NOMINMAX instead of min/max
        as themselves.
        * wtf/Vector.h: put back hack to ensure that min/max
        are not defined as macros.
2006-11-20  Samuel Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
        Fix Win32 build

        * config.h: add #define NOMINMAX for windows build
        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::createFontPlatformData):
        * platform/win/TemporaryLinkStubs.cpp: add definitions for
        new cursors.
        (WebCore::aliasCursor):
        (WebCore::noDropCursor):
        (WebCore::progressCursor):

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

13 years agoWebCore:
bdakin [Mon, 20 Nov 2006 01:21:56 +0000 (01:21 +0000)]
WebCore:
        Reviewed by Adam.

        Implementation of actions for the new context menus.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/EditorClient.h: Declaration of shouldInsertText.
        * bridge/mac/FrameMac.h: Two new spelling functions.
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::ignoreSpelling):
        (WebCore::FrameMac::learnSpelling):
        * editing/Editor.cpp:
        (WebCore::Editor::shouldInsertText): Call into the client.
        * editing/Editor.h:
        * editing/EditorInsertAction.h: Added.
        (WebCore::): The WebCore equivalent of WebViewInsertAction. This is
        defined in its own header so that we can use it from Editor.h and
        EditorClient.h without having one of the above include the other.
        * page/ContextMenuClient.h: A few currently WebKit-implemented
        function needed for menu actions.
        * page/ContextMenuController.cpp:
        (WebCore::makeGoogleSearchURL):
        (WebCore::ContextMenuController::contextMenuActionSelected): The
        actions!
        * page/ContextMenuController.h:
        * page/Frame.h: New pure-virtual spelling functions.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::controller): Get the controller from the
        menu.
        * platform/ContextMenu.h:
        * platform/mac/ContextMenuMac.mm:
        (-[MenuTarget
        forwardContextMenuAction:initWithContextMenuController:WebCore::]):
        Use the controller instead of the menu
        (-[MenuTarget WebCore::]):
        (-[MenuTarget setMenuController:WebCore::]):
        (-[MenuTarget forwardContextMenuAction:]):
        (getNSMenuItem):
        (ContextMenu::show):
        (ContextMenu::hide):

WebKit:
        Reviewed by Adam.

        WebKit side of new context menu actions.

        * WebCoreSupport/WebContextMenuClient.h: These are for the
        currently-WebKit-dependent menu actions.
        * WebCoreSupport/WebContextMenuClient.mm:
        (WebContextMenuClient::copyLinkToClipboard):
        (WebContextMenuClient::downloadURL):
        (WebContextMenuClient::copyImageToClipboard):
        (WebContextMenuClient::searchWithSpotlight):
        (WebContextMenuClient::lookUpInDictionary):
        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (core): These are to convert between WebViewInsertAction and
        EditorInsertAction.
        (kit):
        (WebEditorClient::shouldInsertText): Added implementation for
        shouldInsertText.
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]): Moved
        _lookUpInDictionary to be within the implementation of WebHTMLView
        internal.
        * WebView/WebHTMLViewInternal.h: Add _lookUpInDictionaryFromMenu
        * WebView/WebViewInternal.h: Add _searchWithSpotlightFromMenu

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

13 years ago Removed parts of an incorrectly committed test, to be re-added later.
ap [Sun, 19 Nov 2006 22:22:16 +0000 (22:22 +0000)]
    Removed parts of an incorrectly committed test, to be re-added later.

        * dom/xhtml/level3/core/documentgetxmlencoding03-expected.png: Removed.
        * dom/xhtml/level3/core/documentgetxmlencoding03-expected.checksum: Removed.
        * dom/xhtml/level3/core/documentgetxmlencoding03.xhtml: Removed.

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

13 years agotop level:
staikos [Sun, 19 Nov 2006 18:39:14 +0000 (18:39 +0000)]
top level:

        Reviewed by Zack.

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

        * CMakeLists.txt: Fix Qt-only build without KDE cmake files

JavaScriptCore:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix CMake Qt-only build without KDE CMake files

        * CMakeLists.txt:
        * pcre/CMakeLists.txt:

WebCore:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix CMake files for Qt-only build without KDE cmake files.
        Fix Qt/KDE build for the SVG support.
        Fix Qt-only build in the resource handler.

        * CMakeLists.txt:
        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added.
        (WebCore::SVGResourceFilter::SVGResourceFilter):
        (WebCore::SVGResourceFilter::~SVGResourceFilter):
        (WebCore::SVGResourceFilter::prepareFilter):
        (WebCore::SVGResourceFilter::applyFilter):
        * platform/network/qt/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::cancel):
        (WebCore::ResourceHandleManager::slotData):
        (WebCore::ResourceHandleManager::slotMimetype):
        (WebCore::ResourceHandleManager::slotResult):
        (WebCore::ResourceHandleManager::deliverJobData):
        * platform/network/qt/ResourceHandleManager.h:
        * platform/network/qt/ResourceHandleQt.cpp:
        * platform/qt/CursorQt.cpp:
        (WebCore::noDropCursor):
        (WebCore::progressCursor):
        (WebCore::aliasCursor):

WebKitQt:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix Qt-only build

        * QtLauncher/CMakeLists.txt:

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

13 years ago2006-11-19 Mitz Pettel <mitz@webkit.org>
ap [Sun, 19 Nov 2006 09:12:01 +0000 (09:12 +0000)]
2006-11-19  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - http://bugs.webkit.org/show_bug.cgi?id=11626
          Automate test for rdar://problem/4056100

WebCore:
        * manual-tests/delete-into-nested-block.html: Removed.

LayoutTests:
        * fast/repaint/delete-into-nested-block-expected.checksum: Added.
        * fast/repaint/delete-into-nested-block-expected.png: Added.
        * fast/repaint/delete-into-nested-block-expected.txt: Added.
        * fast/repaint/delete-into-nested-block.html: Added.

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

13 years agoReviewed by Oliver.
zimmermann [Sun, 19 Nov 2006 02:44:41 +0000 (02:44 +0000)]
Reviewed by Oliver.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=11596

Split up KCanvasFilters & KCanvasFilterQuartz into several
new classes (SVGFEBlend, SVGFEComposite...) and move them
into platform/graphics/svg. This is still a temporary location,
as discussed with Darin; the whole platform/graphics/svg directory
will probably be moved into ksvg2/ in near future.

This commit removes the duplicated enumerations in the svg filter
classes and within kcanvas. ksvg2/ and platform/graphics/svg share
their enums now.

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

13 years ago Reviewed by Darin.
andersca [Sun, 19 Nov 2006 00:47:25 +0000 (00:47 +0000)]
    Reviewed by Darin.

        Add tests for crash when garbage collecting node iterators and tree walkers
        without a node filter.

        * fast/dom/node-filter-gc-expected.txt: Added.
        * fast/dom/node-filter-gc.html: Added.

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

13 years agoLayoutTests:
rwlbuis [Sat, 18 Nov 2006 22:59:50 +0000 (22:59 +0000)]
LayoutTests:
        Reviewed by Maciej.

        Testcase for:
        http://bugs.webkit.org/show_bug.cgi?id=11321
        Element with :target pseudo-class still matched after fragment identifier change

        * fast/css/target-fragment-match-expected.checksum: Added.
        * fast/css/target-fragment-match-expected.png: Added.
        * fast/css/target-fragment-match-expected.txt: Added.
        * fast/css/target-fragment-match.html: Added.

WebCore:
        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=11321
        Element with :target pseudo-class still matched after fragment identifier change

        Make sure the page does a style recalculation and possible rendering
        when navigating back from a page with an anchor to a page without
        an anchor.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor):

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

13 years ago2006-11-18 Don Gibson <dgibson77@gmail.com>
ap [Sat, 18 Nov 2006 20:58:43 +0000 (20:58 +0000)]
2006-11-18  Don Gibson  <dgibson77@gmail.com>

        Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=11634:
        Fix segfault on startup for Windows build.  Also fix segfault when
        typing in a URL.
        Clean up some of the style of the patch that landed in r17816.

WebCore:
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * bridge/win/ChromeClientWin.h:
        (WebCore::ChromeClientWin::~ChromeClientWin):
        (WebCore::ChromeClientWin::ref):
        (WebCore::ChromeClientWin::deref):
        * bridge/win/ContextMenuClientWin.h:
        (WebCore::ContextMenuClientWin::~ContextMenuClientWin):
        (WebCore::ContextMenuClientWin::ref):
        (WebCore::ContextMenuClientWin::deref):
        * bridge/win/EditorClientWin.h:
        (WebCore::EditorClientWin::~EditorClientWin):
        (WebCore::EditorClientWin::ref):
        (WebCore::EditorClientWin::deref):
        * bridge/win/FrameWin.cpp:
        (WebCore::FrameWin::FrameWin):
        * bridge/win/FrameWin.h:
        (WebCore::Win):
        * loader/win/FrameLoaderClientWin.h: Added.
        (WebCore::FrameLoaderClientWin::~FrameLoaderClientWin):
        (WebCore::FrameLoaderClientWin::ref):
        (WebCore::FrameLoaderClientWin::deref):
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::ChromeClientWin::createWindow):
        (WebCore::ChromeClientWin::createModalDialog):
        (WebCore::EditorClientWin::selectWordBeforeMenuEvent):
        (WebCore::EditorClientWin::isEditable):
        (WebCore::EditorClientWin::shouldBeginEditing):
        (WebCore::EditorClientWin::shouldEndEditing):
        (WebCore::EditorClientWin::shouldApplyStyle):
        (WebCore::EditorClientWin::didBeginEditing):
        (WebCore::EditorClientWin::respondToChangedContents):
        (WebCore::EditorClientWin::didEndEditing):
        (WebCore::EditorClientWin::registerCommandForUndo):
        (WebCore::EditorClientWin::registerCommandForRedo):
        (WebCore::EditorClientWin::clearUndoRedoOperations):
        (WebCore::EditorClientWin::canUndo):
        (WebCore::EditorClientWin::canRedo):
        (WebCore::EditorClientWin::undo):
        (WebCore::EditorClientWin::redo):
        (WebCore::FrameLoader::createFrame):
        (WebCore::FrameLoader::createPlugin):
        (WebCore::FrameLoaderClientWin::hasWebView):
        (WebCore::FrameLoaderClientWin::hasFrameView):
        (WebCore::FrameLoaderClientWin::hasBackForwardList):
        (WebCore::FrameLoaderClientWin::resetBackForwardList):
        (WebCore::FrameLoaderClientWin::provisionalItemIsTarget):
        (WebCore::FrameLoaderClientWin::loadProvisionalItemFromPageCache):
        (WebCore::FrameLoaderClientWin::invalidateCurrentItemPageCache):
        (WebCore::FrameLoaderClientWin::privateBrowsingEnabled):
        (WebCore::FrameLoaderClientWin::makeDocumentView):
        (WebCore::FrameLoaderClientWin::makeRepresentation):
        (WebCore::FrameLoaderClientWin::forceLayout):
        (WebCore::FrameLoaderClientWin::forceLayoutForNonHTML):
        (WebCore::FrameLoaderClientWin::updateHistoryForCommit):
        (WebCore::FrameLoaderClientWin::updateHistoryForBackForwardNavigation):
        (WebCore::FrameLoaderClientWin::updateHistoryForReload):
        (WebCore::FrameLoaderClientWin::updateHistoryForStandardLoad):
        (WebCore::FrameLoaderClientWin::updateHistoryForInternalLoad):
        (WebCore::FrameLoaderClientWin::updateHistoryAfterClientRedirect):
        (WebCore::FrameLoaderClientWin::setCopiesOnScroll):
        (WebCore::FrameLoaderClientWin::tokenForLoadErrorReset):
        (WebCore::FrameLoaderClientWin::resetAfterLoadError):
        (WebCore::FrameLoaderClientWin::doNotResetAfterLoadError):
        (WebCore::FrameLoaderClientWin::willCloseDocument):
        (WebCore::FrameLoaderClientWin::detachedFromParent1):
        (WebCore::FrameLoaderClientWin::detachedFromParent2):
        (WebCore::FrameLoaderClientWin::detachedFromParent3):
        (WebCore::FrameLoaderClientWin::detachedFromParent4):
        (WebCore::FrameLoaderClientWin::loadedFromPageCache):
        (WebCore::FrameLoaderClientWin::dispatchDidHandleOnloadEvents):
        (WebCore::FrameLoaderClientWin::dispatchDidReceiveServerRedirectForProvisionalLoad):
        (WebCore::FrameLoaderClientWin::dispatchDidCancelClientRedirect):
        (WebCore::FrameLoaderClientWin::dispatchWillPerformClientRedirect):
        (WebCore::FrameLoaderClientWin::dispatchDidChangeLocationWithinPage):
        (WebCore::FrameLoaderClientWin::dispatchWillClose):
        (WebCore::FrameLoaderClientWin::dispatchDidReceiveIcon):
        (WebCore::FrameLoaderClientWin::dispatchDidStartProvisionalLoad):
        (WebCore::FrameLoaderClientWin::dispatchDidReceiveTitle):
        (WebCore::FrameLoaderClientWin::dispatchDidCommitLoad):
        (WebCore::FrameLoaderClientWin::dispatchDidFinishLoad):
        (WebCore::FrameLoaderClientWin::dispatchDidFirstLayout):
        (WebCore::FrameLoaderClientWin::dispatchShow):
        (WebCore::FrameLoaderClientWin::cancelPolicyCheck):
        (WebCore::FrameLoaderClientWin::dispatchWillSubmitForm):
        (WebCore::FrameLoaderClientWin::dispatchDidLoadMainResource):
        (WebCore::FrameLoaderClientWin::clearLoadingFromPageCache):
        (WebCore::FrameLoaderClientWin::isLoadingFromPageCache):
        (WebCore::FrameLoaderClientWin::revertToProvisionalState):
        (WebCore::FrameLoaderClientWin::clearUnarchivingState):
        (WebCore::FrameLoaderClientWin::progressStarted):
        (WebCore::FrameLoaderClientWin::progressCompleted):
        (WebCore::FrameLoaderClientWin::setMainFrameDocumentReady):
        (WebCore::FrameLoaderClientWin::willChangeTitle):
        (WebCore::FrameLoaderClientWin::didChangeTitle):
        (WebCore::FrameLoaderClientWin::finishedLoading):
        (WebCore::FrameLoaderClientWin::finalSetupForReplace):
        (WebCore::FrameLoaderClientWin::setDefersLoading):
        (WebCore::FrameLoaderClientWin::isArchiveLoadPending):
        (WebCore::FrameLoaderClientWin::cancelPendingArchiveLoad):
        (WebCore::FrameLoaderClientWin::clearArchivedResources):
        (WebCore::FrameLoaderClientWin::canShowMIMEType):
        (WebCore::FrameLoaderClientWin::representationExistsForURLScheme):
        (WebCore::FrameLoaderClientWin::generatedMIMETypeForURLScheme):
        (WebCore::FrameLoaderClientWin::frameLoadCompleted):
        (WebCore::FrameLoaderClientWin::restoreScrollPositionAndViewState):
        (WebCore::FrameLoaderClientWin::provisionalLoadStarted):
        (WebCore::FrameLoaderClientWin::shouldTreatURLAsSameAsCurrent):
        (WebCore::FrameLoaderClientWin::addHistoryItemForFragmentScroll):
        (WebCore::FrameLoaderClientWin::didFinishLoad):
        (WebCore::FrameLoaderClientWin::prepareForDataSourceReplacement):
        (WebCore::FrameLoaderClientWin::setTitle):
        (WebCore::FrameLoaderClientWin::userAgent):

WebKit:
        * COM/WebFrame.cpp:
        (WebFrame::initWithName):

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

13 years ago Reviewed by Rob (yay!).
ap [Sat, 18 Nov 2006 13:52:36 +0000 (13:52 +0000)]
    Reviewed by Rob (yay!).

        http://bugs.webkit.org/show_bug.cgi?id=11640
        XMLHttpRequest produces undefined:undefined HTTP authentication

WebCore:
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
        Treat undefined credentials as missing ones.

LayoutTests:
        * http/tests/xmlhttprequest/basic-auth-expected.txt:
        * http/tests/xmlhttprequest/basic-auth.html:
        Added tests for undefined.

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

13 years ago2006-11-17 Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
ap [Sat, 18 Nov 2006 10:00:31 +0000 (10:00 +0000)]
2006-11-17  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>

        Reviewed by Tim H.

        http://bugs.webkit.org/show_bug.cgi?id=11638
        [CSS 2.1+3] add support for alias, progress, no-drop and not-allowed cursor styles

        * Resources/aliasCursor.png: Added.
        * Resources/noDropCursor.png: Added.
        * Resources/progressCursor.png: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSValueKeywords.in:
        * manual-tests/cursor.html:
        * page/EventHandler.cpp:
        (WebCore::selectCursor):
        * platform/Cursor.h:
        * platform/mac/CursorMac.mm:
        (WebCore::handCursor):
        (WebCore::aliasCursor):
        (WebCore::progressCursor):
        (WebCore::noDropCursor):
        * rendering/RenderStyle.h:
        (WebCore::):

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

13 years ago2006-11-18 Mitz Pettel <mitz@webkit.org>
ap [Sat, 18 Nov 2006 09:30:58 +0000 (09:30 +0000)]
2006-11-18  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        Gender-neutrality fix.

        * coding/contributing.html:

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

13 years ago2006-11-18 Steve Falkenburg <sfalken@apple.com>
sfalken [Sat, 18 Nov 2006 09:29:27 +0000 (09:29 +0000)]
2006-11-18  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Adam.

        Properly adjust CFAbsoluteTime to time_t to fix date calculations.

        Compare lastModified w/ MAX_TIME_T when setting last modified date
        instead of comparing expiration against MAX_TIME_T.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::getResourceResponse): Add kCFAbsoluteTimeIntervalSince1970 in assignment

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

13 years ago Reviewed by Geoff.
andersca [Sat, 18 Nov 2006 05:57:13 +0000 (05:57 +0000)]
    Reviewed by Geoff.

        More conversions from DeprecatedValueList to Vector and HashSet.

        * css/CSSValueList.cpp:
        (WebCore::CSSValueList::~CSSValueList):
        (WebCore::CSSValueList::append):
        (WebCore::CSSValueList::cssText):
        * css/CSSValueList.h:
        (WebCore::CSSValueList::length):
        (WebCore::CSSValueList::item):
        * dom/Document.cpp:
        (WebCore::Document::attachNodeIterator):
        (WebCore::Document::notifyBeforeNodeRemoval):
        * dom/Document.h:
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::notifyAttributeChange):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::notifyClientsToRepaint):
        * platform/graphics/svg/SVGResource.cpp:
        (WebCore::SVGResource::invalidate):
        (WebCore::SVGResource::addClient):
        * platform/graphics/svg/SVGResource.h:
        * rendering/RenderBlock.h:

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

13 years ago2006-11-17 Anders Carlsson <acarlsson@apple.com>
andersca [Sat, 18 Nov 2006 03:15:42 +0000 (03:15 +0000)]
2006-11-17  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Adam.

        Make sure that we always use std::min and std::max instead of macros.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * kjs/config.h:
        * wtf/Vector.h:

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