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

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

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

        SVG exhibits double-text-selection behavior

        Fix selection height of the inline text boxes for svg.

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

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

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

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

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

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

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

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

        Reviewed by Maciej

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

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

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

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

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

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

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

        Reviewed by oliver

        REGRESSION (r19039): Drag caret isn't cleared after a drop

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


        Reviewed by oliver

        REGRESSION (r19039): Drag caret isn't cleared after a drop

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

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

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

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

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

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

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

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

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

        Fixed: <rdar://problem/4946922> WebBaseNetscapePluginView leaks memory

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

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

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

        Reviewed by Geoffrey Garen.

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

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

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


        Reviewed and landed by Geoffrey Garen.

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

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

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

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

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

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

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

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

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

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

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

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

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

        * html/HTMLTokenizer.cpp:

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

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

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

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

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

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

        Reviewed by Maciej.

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

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


        Reviewed by Maciej.

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

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

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

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

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

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

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

        Should fix quite a few test cases :)

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

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

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

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

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

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

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

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

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

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

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

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

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

        SVG containers with viewports should respect overflow when hit testing
        Take into account the overflow property when hit testing <svg>.

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

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

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

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

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

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

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

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

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

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

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

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

        Remove the old tests-skipped.txt from Qts DumpRenderTree

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

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

        Reviewed by Maciej.

        added test for
        <rdar://problem/4808039> REGRESSION: eBay ID check never completes
        also known as

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


        Reviewed by Maciej.

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

        * bindings/js/kjs_window.cpp:
        It's not necessary to check safeScript when doing a location.replace, .reload, or .assign

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

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

        Reviewed by Geoff and Adele

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

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


        Reviewed by Geoff and Adele.

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

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

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

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

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

        Reviewed by Brady and Oliver.

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

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


        Reviewed by Brady and Oliver.

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

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

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

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

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

        - fix crash seen in layout tests

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

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

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

        Build fix

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

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

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

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

        * API/JSStringRef.cpp:


        New forwarding header. No review necessary.

        * ForwardingHeaders/kjs/ustring.h: Added.

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

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

        Migrating more drag state information to WebCore

        * page/DragController.cpp:
        * page/DragController.h:
        Reviewed by Maciej.

        Migrating more drag state information to WebCore

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

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

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

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

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

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

        Reviewed by Adele.

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

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


        Reviewed by Adele.

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

        Test: fast/events/autoscroll.html

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

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

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

        - changed dragMode to be a property instead of a function

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

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

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

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

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

        Reviewed by Geoff.

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

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

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

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

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

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

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

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

        - removed file that shouldn't be there

        * Image Viewer/Image Viewer.aps: Removed.

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

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

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

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

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

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

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

        Reviewed by Geoff and Adam.

        http://galeri.milliyet.com.tr/ reproducibly crashes Safari

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


        Reviewed by Geoff and Adam.

        http://galeri.milliyet.com.tr/ reproducibly crashes Safari

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

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

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

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

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

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

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

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

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

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

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

        Reviewed by Darin.

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

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


        Reviewed by Darin.

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

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

        Test: fast/events/arrow-navigation.html

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

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

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

        Reviewed by Maciej.

        * Info.plist: Update copyright string.

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

        Reviewed by Darin.

        * Info.plist: Update copyright string.

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

        Reviewed by Maciej.

        * Info.plist: Update copyright string.

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

        Reviewed by Darin.

        * Info.plist: Update copyright string.

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

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

        Fix tests and update test results.

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

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

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

        Reviewed by harrison


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


        Reviewed by harrison

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

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

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

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

        Reviewed by Mark Rowe.

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


        Reviewed by Mark Rowe.

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


        Reviewed by Mark Rowe.

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

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

16 years ago Reviewed by Adele.
darin [Thu, 25 Jan 2007 00:16:44 +0000 (00:16 +0000)]
    Reviewed by Adele.

        - a couple minor tweaks to recently-changed things

        * dom/Document.h: Use HTMLHeadElement as type for the head function.
        * dom/Document.cpp: (WebCore::Document::head):

        * ksvg2/svg/SVGElementInstance.cpp:
        (WebCore::SVGElementInstance::~SVGElementInstance): Change loop to
        a for loop and use a local variable for document.

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

16 years agoMinor edit of previous changelog entry
oliver [Wed, 24 Jan 2007 22:45:18 +0000 (22:45 +0000)]
Minor edit of previous changelog entry

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

16 years ago2007-01-24 Oliver Hunt <oliver@apple.com>
oliver [Wed, 24 Jan 2007 22:40:47 +0000 (22:40 +0000)]
2007-01-24  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adele.

        Fixes DragController to allow a null target Document.
        This is encountered in new tabs/windows that have not
        loaded any page (including about:blank)

        * page/DragController.cpp:
        * page/mac/DragControllerMac.mm:

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

16 years ago Reviewed by Mitz.
weinig [Wed, 24 Jan 2007 21:28:33 +0000 (21:28 +0000)]
    Reviewed by Mitz.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=12394
        Cleanup RenderBox

        No functionality changes, just a good old fashion cleanup,
        thus no tests.

        * rendering/RenderBox.cpp:
        * rendering/RenderBox.h:

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

16 years ago Reviewed by Adele.
darin [Wed, 24 Jan 2007 18:48:25 +0000 (18:48 +0000)]
    Reviewed by Adele.

        - fix small regression and GC problems noticed by code inspection

        * WebView/WebHTMLView.mm: Move global declarations to the start of the file.
        (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
        Add a CFRetain here for GC compatibility.
        (+[WebHTMLView _insertablePasteboardTypes]): Ditto.
        (-[WebHTMLView performKeyEquivalent:]): Fix small logic mistake that prevents
        super from being called if EventHandler::keyEvent returns false. Reformatted
        the code a bit and added a local variable for the frame.
        (-[WebHTMLView _interceptEditingKeyEvent:]): Added some comments.
        (-[WebHTMLView validAttributesForMarkedText]): Add a CFRetain here for
        GC compatibility.

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

16 years ago2007-01-24 Eric Seidel <eric@webkit.org>
eseidel [Wed, 24 Jan 2007 18:46:06 +0000 (18:46 +0000)]
2007-01-24  Eric Seidel  <eric@webkit.org>

        Reviewed by ap.

        Converted SVGTransform from being Shared<T> to a POD type.

        No functional changes, thus no tests.

        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/CodeGeneratorJS.pm:
        * ksvg2/misc/SVGTimer.cpp:
        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        * ksvg2/svg/SVGAnimateTransformElement.h:
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        * ksvg2/svg/SVGPatternElement.cpp:
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        * ksvg2/svg/SVGSVGElement.cpp:
        * ksvg2/svg/SVGSVGElement.h:
        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        * ksvg2/svg/SVGTextElement.cpp:
        * ksvg2/svg/SVGTransform.cpp:
        * ksvg2/svg/SVGTransform.h:
        * ksvg2/svg/SVGTransform.idl:
        * ksvg2/svg/SVGTransformList.cpp:
        * ksvg2/svg/SVGTransformList.h:
        * ksvg2/svg/SVGTransformable.cpp:

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

16 years ago Reviewed by Zack
lars [Wed, 24 Jan 2007 13:09:59 +0000 (13:09 +0000)]
    Reviewed by Zack

        Implement some bits and pieces required by the loader.
        Fixes quite a few crashes and hangs in the lyout tests

        Add a signal handler, always dump immediately if we get an
        error during a page load and raise the timeout to 5 seconds
        (as we get a lot less such failures now)

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

16 years ago2007-01-24 Mark Rowe <mrowe@apple.com>
bdash [Wed, 24 Jan 2007 11:04:53 +0000 (11:04 +0000)]
2007-01-24  Mark Rowe  <mrowe@apple.com>

        Reviewed by Eric.

        Plug another bunch of SVG memory leaks.

        * ksvg2/misc/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): Delete memory we have allocated.
        (WebCore::SVGDocumentExtensions::removePendingResource): Return an auto_ptr to show that we are transferring ownership.
        * ksvg2/misc/SVGDocumentExtensions.h:
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::insertedIntoDocument): Update for use of auto_ptr.

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

16 years agoFix compilation again.
lars [Wed, 24 Jan 2007 07:05:01 +0000 (07:05 +0000)]
Fix compilation again.

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

16 years ago2007-01-23 Mark Rowe <mrowe@apple.com>
bdash [Wed, 24 Jan 2007 06:16:01 +0000 (06:16 +0000)]
2007-01-23  Mark Rowe  <mrowe@apple.com>

        Reviewed by Brady.

        Plug thousands of node leaks seen running layout tests.

        * ksvg2/svg/SVGElementInstance.cpp:
        (WebCore::SVGElementInstance::~SVGElementInstance): Disassociate ourselves from our children so they will
        be destroyed if we were the only thing referencing them.
        * ksvg2/svg/SVGUseElement.cpp:
        * ksvg2/svg/SVGUseElement.h:

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

16 years ago Reviewed by Brady.
aliceli1 [Wed, 24 Jan 2007 05:33:57 +0000 (05:33 +0000)]
    Reviewed by Brady.

        * editing/Editor.cpp:
        minor change.  removing unnecessary call to frame to fetch editor

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

16 years ago release build fix
aliceli1 [Wed, 24 Jan 2007 05:08:18 +0000 (05:08 +0000)]
    release build fix

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy APICasts.h

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

16 years ago2007-01-23 Mark Rowe <mrowe@apple.com>
bdash [Wed, 24 Jan 2007 03:44:47 +0000 (03:44 +0000)]
2007-01-23  Mark Rowe  <mrowe@apple.com>

        Reviewed by Adele.

        Bug 12375: REGRESSION(r19038): fast/dom/title-text-property-2.html failing

        Fix regression by making setTitle/updateTitle/removeTitle logic match document.title
        specification at http://whatwg.org/specs/web-apps/current-work/#the-title1.

        * dom/Document.cpp:
        (WebCore::Document::setTitle): Materialize a title element into the head if one doesn't exist when setting
        document.title.  Also update the contents of the title element when the title is set via document.title.
        (WebCore::Document::removeTitle): Update the title based on first title element in the head, if one exists.
        (WebCore::Document::head): Convenience method to retrieve the head element in an HTML document.
        * dom/Document.h:

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

        Reviewed by Adele.

        Layout tests for http://bugs.webkit.org/show_bug.cgi?id=12375
        Bug 12375: REGRESSION(r19038): fast/dom/title-text-property-2.html failing

        * fast/dom/Document/title-property-creates-title-element-expected.txt: Added.
        * fast/dom/Document/title-property-creates-title-element.html: Added.
        * fast/dom/Document/title-property-set-multiple-times-expected.txt: Added.
        * fast/dom/Document/title-property-set-multiple-times.html: Added.
        * fast/dom/title-text-property-2.html: Remove in reverse order to preserve test behaviour when removing title elements.
        * svg/custom/multiple-title-elements.svg: Added.

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

16 years ago Reviewed by Adam.
adele [Wed, 24 Jan 2007 02:16:56 +0000 (02:16 +0000)]
    Reviewed by Adam.

        Fixed 2 layout tests that I broke with my last checkin.

        * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): Use the selected frame to get the WebHTMLView.
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView performKeyEquivalent:]): Added global to keep track of NSEvent used here.
        (-[WebHTMLView _interceptEditingKeyEvent:]): Check NSEvent against the event used in performKeyEquivalent.
          We don't want to intercept these events.

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

16 years ago build fix
ggaren [Wed, 24 Jan 2007 01:24:38 +0000 (01:24 +0000)]
    build fix

        * API/JSStringRef.h:
        * JavaScriptCore.xcodeproj/project.pbxproj:

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

16 years agoFix typo.
bdash [Wed, 24 Jan 2007 00:17:38 +0000 (00:17 +0000)]
Fix typo.

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

16 years ago2007-01-24 Mark Rowe <mrowe@apple.com>
bdash [Wed, 24 Jan 2007 00:17:11 +0000 (00:17 +0000)]
2007-01-24  Mark Rowe  <mrowe@apple.com>

        Build fix for DumpRenderTree.

        * JavaScriptCore.xcodeproj/project.pbxproj: Make JSStringRefCF.h public so it's copied into build framework.

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

16 years agoWebCore:
bdakin [Tue, 23 Jan 2007 23:38:17 +0000 (23:38 +0000)]
        Reviewed by Hyatt.

        Follow-up to the fix below for 4843226.

        * rendering/RenderLayer.cpp:
        (WebCore::transparencyClipBox): Has to be recursive or we will miss
        out on grandchildren!

        Reviewed by Hyatt.

        Updated test for 4843226 to include a grandchild.

        * fast/clip/nestedTransparencyClip-expected.checksum:
        * fast/clip/nestedTransparencyClip-expected.png:
        * fast/clip/nestedTransparencyClip-expected.txt:
        * fast/clip/nestedTransparencyClip.html:

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

16 years ago2007-01-23 Oliver Hunt <oliver@apple.com>
oliver [Tue, 23 Jan 2007 23:23:32 +0000 (23:23 +0000)]
2007-01-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fixes dropping of files into safari

        * page/DragController.cpp:

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

16 years ago Reviewed by Darin.
andersca [Tue, 23 Jan 2007 22:47:47 +0000 (22:47 +0000)]
    Reviewed by Darin.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy APICasts.h

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

16 years ago Reviewed by john
justing [Tue, 23 Jan 2007 22:47:10 +0000 (22:47 +0000)]
    Reviewed by john

        REGRESSION: Items duplicated when moved inside contenteditable element (11766)

        * editing/pasteboard/4947130-expected.checksum: Added.
        * editing/pasteboard/4947130-expected.png: Added.
        * editing/pasteboard/4947130-expected.txt: Added.
        * editing/pasteboard/4947130.html: Added.

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

16 years ago Reviewed by Darin
beidson [Tue, 23 Jan 2007 22:32:29 +0000 (22:32 +0000)]
    Reviewed by Darin

        Added a couple of CF things previously missed

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

16 years ago Reviewed by Maciej Stachowiak.
ggaren [Tue, 23 Jan 2007 22:23:09 +0000 (22:23 +0000)]
    Reviewed by Maciej Stachowiak.

        Fixed <rdar://problem/4885131> Move CFString function declarations from
        JSStringRef.h to JSStringRefCF.h

        Also removed remaining API FIXMEs and changed them into Radars.

        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion.

        * API/JSContextRef.cpp:
        (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number.

        * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header.

        * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp.
        (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number.
        * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added
        #include of JSStringRefCF.h as a stopgap until clients start #including
        it as needed by themselves.

        * API/JSStringRefCF.cpp: Added.
        (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is
        more appropriate for a CF call.
        * API/JSStringRefCF.h: Added.
        * JavaScriptCore.xcodeproj/project.pbxproj:

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

16 years agoReviewed by Maciej.
zimmermann [Tue, 23 Jan 2007 22:11:15 +0000 (22:11 +0000)]
Reviewed by Maciej.

Fix evil genericContext() assertion, which occours sometimes when running DRT.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=12379
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
bdakin [Tue, 23 Jan 2007 21:45:50 +0000 (21:45 +0000)]
        Reviewed by Hyatt.

        Fix for <rdar://problem/4843226> REGRESSION: Pull down menu appears
        clipped at http://istweb.apple.com/

        * rendering/RenderLayer.cpp:
        (WebCore::transparencyClipBox): Always unite with sibling rects.

        Reviewed by Hyatt.

        Test for <rdar://problem/4843226> REGRESSION: Pull down menu
        appears clipped at http://istweb.apple.com/

        * fast/clip/nestedTransparencyClip-expected.checksum: Added.
        * fast/clip/nestedTransparencyClip-expected.png: Added.
        * fast/clip/nestedTransparencyClip-expected.txt: Added.
        * fast/clip/nestedTransparencyClip.html: Added.

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

16 years agoLayoutTests:
justing [Tue, 23 Jan 2007 21:10:28 +0000 (21:10 +0000)]

        Reviewed by john

        REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteEx


        Reviewed by john

        REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteExtract()

        * dom/Range.cpp:
        (WebCore::Range::checkDeleteExtract): Return if there is no
        commonAncestor container or if commonAncestorContainer() throws
        an exception.
        * editing/Editor.cpp:
        (WebCore::Editor::removeFormattingAndStyle): Fixed a bug that reversed
        the order of the selected paragraphs.

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

16 years agoReviewed by Sam.
zimmermann [Tue, 23 Jan 2007 20:04:20 +0000 (20:04 +0000)]
Reviewed by Sam.

Fix dynamic creation/updates of markers, masks, clipPaths, and several tiny pattern issues.
Added 16 (!) new layout tests covering quite some weird scenerios - Batik & Opera do have problems, we don't.

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

16 years agoWebCore:
adele [Tue, 23 Jan 2007 19:37:35 +0000 (19:37 +0000)]

        Reviewed by Darin.

        WebCore part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail

        In addition to this fix, I also reorganized some event handling code for keyPress events to
        prepare for another fix.  There's also just a little bit of unrelated cleanup.

        * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler):
          Move tab focus behavior into new defaultKeyboardEventHandler method.

        * bridge/EditorClient.h: Added handleKeyPress.
        * editing/Editor.cpp:
        (WebCore::Editor::handleKeyPress): Added. Calls over to the client method.
        (WebCore::Editor::deleteRange): Removed unnecessary propogateDOMException.
        * editing/Editor.h: Added handleKeyPress.
        (WebCore::Editor::addToKillRing): Formatting cleanup.
        * editing/mac/EditorMac.mm: Removed unnecessary propogateDOMException.

        * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Added. Checks
          the tabKeyCyclesThroughElements setting before advancing focus for tab key events.  Calls handleKeyPress.
        * page/EventHandler.h: Added defaultKeyboardEventHandler.

        * page/Page.cpp: (WebCore::Page::Page): Initialize m_tabKeyCyclesThroughElements to true.
        * page/Page.h: Added m_tabKeyCyclesThroughElements.
        (WebCore::Page::setTabKeyCyclesThroughElements): Added.
        (WebCore::Page::tabKeyCyclesThroughElements): Added.

        * platform/PlatformKeyboardEvent.h: Added ability to get NSEvent from PlatformKeyboardEvent.
        * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
          Initialize m_macEvent to the NSEvent.

        * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): Added.


        Reviewed by Darin.

        WebKit part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail

        In addition to this fix, I also reorganized some event handling code for keyPress events to
        prepare for another fix.

        * WebCoreSupport/WebEditorClient.h: Added handleKeyPress method.
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::handleKeyPress): Added.  Code moved from WebHTMLView keyDown method.
         This is called from the defaultEventHandler so that in the future, we can make the right
         decision about which selection the keyPress should apply to.
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView keyDown:]): Moved _interceptEditingKeyEvent call to handleKeyPress.
        (-[WebHTMLView _interceptEditingKeyEvent:]): Prevents intercepting keys for cmd-modified events. Removed tabCycling checks
         since this is now handled in WebCore.
        * WebView/WebHTMLViewInternal.h: Made _interceptEditingKeyEvent SPI.
        * WebView/WebView.mm: Use new tabKeyCyclesThroughElements methods on the page.
        (-[WebViewPrivate init]): ditto.
        (-[WebView setTabKeyCyclesThroughElements:]): ditto.
        (-[WebView tabKeyCyclesThroughElements]): ditto.
        (-[WebView setEditable:]): ditto

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

16 years agoTemporary measure to make it possible to use the Qt port until the official Qt
staikos [Tue, 23 Jan 2007 18:36:22 +0000 (18:36 +0000)]
Temporary measure to make it possible to use the Qt port until the official Qt
API is done

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

16 years agoCompile with a released Qt.
staikos [Tue, 23 Jan 2007 18:18:19 +0000 (18:18 +0000)]
Compile with a released Qt.

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

16 years ago Reviewed by Zack
lars [Tue, 23 Jan 2007 16:35:12 +0000 (16:35 +0000)]
    Reviewed by Zack

        Widget and ScrollView do not own the Qt widgets
        anymore. Make sure they can handle the case of
        a null QWidget and never delete them.

        Fix refcounting of FrameViews (they get created with a
        refcount of 1) and add a few safety checks to the

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

16 years agoForgot to add this file to the build (fix the build for real)
zack [Tue, 23 Jan 2007 14:35:26 +0000 (14:35 +0000)]
Forgot to add this file to the build (fix the build for real)

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

16 years agoAdjust the DragClient to latest changes.
zack [Tue, 23 Jan 2007 13:39:37 +0000 (13:39 +0000)]
Adjust the DragClient to latest changes.

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

16 years agoFix the Qt build
zack [Tue, 23 Jan 2007 10:32:58 +0000 (10:32 +0000)]
Fix the Qt build

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

16 years ago Reviewed by Maciej
lars [Tue, 23 Jan 2007 10:28:38 +0000 (10:28 +0000)]
    Reviewed by Maciej

        Make the last remaining pieces of the FrameLoader platform
        independent. Move most of the code over to WebFrameLoaderClient.
        Some smaller cleanups in the WebFrameBridge, and moved some
        platform independent functionality over to the shared code
        in WebCore.

        Add support for Frames to the Qt build and fix some issues
        in the API classes.

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

16 years ago2007-01-23 Oliver Hunt <oliver@apple.com>
oliver [Tue, 23 Jan 2007 09:15:55 +0000 (09:15 +0000)]
2007-01-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Qt build stubs for Drop logic

        * WebCoreSupport/DragClientQt.cpp: Added.
        * WebCoreSupport/DragClientQt.h: Added.
        * WebKitPart/WebKitPart.cpp:

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

16 years ago2007-01-23 Oliver Hunt <oliver@apple.com>
oliver [Tue, 23 Jan 2007 09:14:51 +0000 (09:14 +0000)]
2007-01-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Drop logic bindings for WebKit

        * WebCoreSupport/WebDragClient.h: Added.
        * WebCoreSupport/WebDragClient.mm: Added.
          Standard client impl
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
          Updated to use DragController to track drag state

        * WebCoreSupport/WebPasteboardHelper.h: Added.
          A *temporary* Helper class to access NSPasteboard access and
          manipulation functions present in WebKit
        * WebCoreSupport/WebPasteboardHelper.mm: Added.
          See header comment
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebDocumentInternal.h:
          Remove unnecessary protocol
        * WebView/WebFrameView.mm:
        (-[WebFrameView _setDocumentView:]):
          Updating to use DragController to track drag state
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
        (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
        (-[WebHTMLView draggedImage:endedAt:operation:]):
        (-[WebHTMLView _documentFragmentForPasteboard:]):
          Helper method to generate DocumentFragment from NSPasteboard without regressing
        (-[WebHTMLView _canProcessDragWithDraggingInfo:]):
          Updating to use DragController to track drag state
        (-[WebHTMLView _isMoveDrag:]):
        (-[WebHTMLView _isNSColorDrag:]):
        * WebView/WebHTMLViewInternal.h:
          Removing unnecessary fields and methods
        * WebView/WebView.mm:
        (-[WebViewPrivate dealloc]):
          Remove obsolete ASSERT
        (-[WebView _setInitiatedDrag:]):
          Now passes directly through to DragController
        (-[WebView _commonInitializationWithFrameName:groupName:]):
        (-[WebView _loadingDragOperationForDraggingInfo:]):
        (-[WebView draggingEntered:]):
          Updated to use DragController
        (-[WebView draggingUpdated:]):
        (-[WebView draggingExited:]):
        (-[WebView performDragOperation:]):
        (-[WebView _hitTest:dragTypes:]):
        * WebView/WebViewInternal.h:
          remove unnecessary method def

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

16 years ago2007-01-23 Oliver Hunt <oliver@apple.com>
oliver [Tue, 23 Jan 2007 09:12:36 +0000 (09:12 +0000)]
2007-01-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Added DragController to handled drag and drop state and control logic.
        Currently this only handles logic for Dragging and Dropping, and is
        unable to initialise a drag itself.

        platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac,
        QMimeType in Qt).  This provides methods to pull data out the drag data as a String,
        a URL, a DocumentFragment (for rich content), or a Colour.

        * WebCore.exp:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Clipboard.cpp: Added.
          move platform independent functions from ClipboardMac to Clipboard

        * dom/Clipboard.h:
          as above -- also removed virtual modifier from now
          platform independent methods

        * editing/Editor.cpp:
        * editing/Editor.h:
          adding calls through to EditorClient

        * page/DragActions.h: Added.
          Replicates a number of NS* enums in the WebCore namespace

        * page/DragClient.h: Added.
          Standard client interface for dragging UIDelegate

        * page/DragController.cpp: Added.
          Class to handle state and logic for dragging and dropping

        * page/DragController.h: Added.
          See above

        * page/Page.cpp:
          Update Page to have DragController

        * page/Page.h:

        * page/mac/DragControllerMac.mm: Added.
          Platform specific portions of the DragController

        * page/mac/EventHandlerMac.mm:
          Convert from NSDragOperation to WebCore::DragOperation

        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
          Remove obsolete Drag functions

        * page/qt/DragControllerQt.cpp: Added.
          Basic stubs to maintain Qt  build

        * platform/DragData.cpp: Added.
        * platform/DragData.h: Added.
          DragData class to encapsulate platform drag data/event

        * platform/graphics/svg/SVGImage.cpp:
          Addition of dummy DragClient

        * platform/graphics/svg/SVGImageEmptyClients.h:

        * platform/mac/ClipboardMac.h:
        * platform/mac/ClipboardMac.mm:
         Moving platform independent logic to Clipboard, and updating
         platform specific methods to use appropriate accessors rather than
         directly manipulating data they no longer own

        * platform/mac/DragDataMac.mm: Added.
          Mac implementations of DragData methods.  A number of these use
          a Helper class that accesses WebKit functionality.  That functionality
          should be migrated to WebCore in the future.

        * platform/mac/PasteboardHelper.h: Added.
          Temporary, and Mac only, helper class to access WebKit functionality
          from WebCore

        * platform/qt/DragDataQt.cpp: Added.
         Basic stubs to maintain Qt build

        * rendering/HitTestResult.cpp:
         Correct HitTestResult copy contructor to copy localPoint

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

16 years ago2007-01-22 Mark Rowe <mrowe@apple.com>
bdash [Tue, 23 Jan 2007 04:00:54 +0000 (04:00 +0000)]
2007-01-22  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        Bug 11692: REGRESSION(r17352): Disappearing page title

        * dom/Document.cpp:
        (WebCore::Document::setTitle): If the title has already been set explicitly via JavaScript,
        ignore any changes to it due to encountering <title> tags.

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

16 years agoLayoutTests:
weinig [Tue, 23 Jan 2007 01:36:22 +0000 (01:36 +0000)]

        Reviewed by Darin.

        - test for http://bugs.webkit.org/show_bug.cgi?id=12344
          NativeListBox: item hit testing does not account for top padding and border

        * fast/forms/listbox-selection-2-expected.checksum: Added.
        * fast/forms/listbox-selection-2-expected.png: Added.
        * fast/forms/listbox-selection-2-expected.txt: Added.
        * fast/forms/listbox-selection-2.html: Added.


        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12344
          NativeListBox: item hit testing does not account for top padding and border

        Test: fast/forms/listbox-selection-2.html

        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::numVisibleItems): Changed height() to contentHeight()
        since items are visible only in the content box.
        (WebCore::RenderListBox::listIndexAtOffset): Adjusted for vertical padding and
        borders. Changed to return -1 instead of the last item's index if the given offset
        is below the last item.
        (WebCore::RenderListBox::autoscroll): Adjusted for vertical padding and borders.
        (WebCore::RenderListBox::controlClipRect): Changed to return the content box since
        items should not spill into the padding box. This change is the reason the test
        generates pixel results.

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

16 years agoLayoutTests:
justing [Tue, 23 Jan 2007 01:30:50 +0000 (01:30 +0000)]

        Reviewed by darin

        editing/pasteboard/4641033 layout test is broken (12328)

        The fixes not only make this test pass, but also fix a bug that
        was reflected in the results checked in for this test.  The caret
        was in the wrong position:
        * editing/pasteboard/4641033-expected.checksum:
        * editing/pasteboard/4641033-expected.png:
        * editing/pasteboard/4641033-expected.txt:
        * editing/pasteboard/4944770-1-expected.checksum: Added.
        * editing/pasteboard/4944770-1-expected.png: Added.
        * editing/pasteboard/4944770-1-expected.txt: Added.
        * editing/pasteboard/4944770-1.html: Added.
        * editing/pasteboard/4944770-2-expected.checksum: Added.
        * editing/pasteboard/4944770-2-expected.png: Added.
        * editing/pasteboard/4944770-2-expected.txt: Added.
        * editing/pasteboard/4944770-2.html: Added.
        * editing/pasteboard/4944770-expected.checksum: Added.
        * editing/pasteboard/4944770-expected.png: Added.
        * editing/pasteboard/4944770-expected.txt: Added.
        Equivalent render trees:
        * editing/execCommand/format-block-from-range-selection-expected.txt:
        * editing/pasteboard/drag-drop-modifies-page-expected.txt:
        * editing/pasteboard/nested-blocks-with-text-area-expected.checksum:
        * editing/pasteboard/nested-blocks-with-text-area-expected.png:
        * editing/pasteboard/nested-blocks-with-text-area-expected.txt:
        * editing/pasteboard/nested-blocks-with-text-field-expected.checksum:
        * editing/pasteboard/nested-blocks-with-text-field-expected.png:
        * editing/pasteboard/nested-blocks-with-text-field-expected.txt:


        Reviewed by darin

        editing/pasteboard/4641033 layout test is broken (12328)

        This layout test failure demonstrates three bugs:
        Smart replace shouldn't be turned on, but is because a word
        selection granularity from the previous test isn't cleared.
        Smart replace shouldn't add any spaces because the paste is performed
        in an empty paragraph.
        Smart replace spaces are added to the text of options inside
        the select element instead of before/after the select element.

        This patch fixes the second two problems.  During a
        ReplaceSelectionCommand, the VisiblePosition for the end of
        the inserted content is the last position in the last leaf
        inserted.  This is a problem when the last leaf is inside a
        select element, since VP creation is inconsistent there.
        Second, smart spaces were inserted inside the last leaf, not
        at the endOfInsertedContent.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::shouldMergeStart): Renamed
        m_lastNodeInserted to m_lastLeafInserted.  Use the
        start/endOfInsertedContent getters.
        (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Ditto.
        (WebCore::ReplaceSelectionCommand::removeNodePreservingChildren): Ditto.
        (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Ditto.
        (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Added.
        Special case for when the last leaf inserted is inside a select
        element: return the VisiblePosition after the select element.
        (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Added.
        (WebCore::ReplaceSelectionCommand::doApply): Did renaming.  Used
        the start/endOfInsertedContent getters.  Insert smart replace spaces
        into the right nodes.
        (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renaming.
        (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
        (WebCore::ReplaceSelectionCommand::updateNodesInserted): Ditto.
        * editing/ReplaceSelectionCommand.h:

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

16 years ago Reviewed by Adam.
darin [Tue, 23 Jan 2007 00:40:55 +0000 (00:40 +0000)]
    Reviewed by Adam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12273
          REGRESSION: File input value invisible after removing and re-appending

        - made more of the file chooser code cross-platform

        - fixed an Objective-C garbage collection problem in FileChooser

        - tried to remove layering violations where FileChooser in the platform
          directory knows about the rendering and DOM trees (but wasn't able to
          do it entirely)

        * platform/FileChooser.cpp: Added.
        (WebCore::FileChooser::create): Changed parameters.
        (WebCore::FileChooser::chooseFile): Changed to call chooseIcon function.
        (WebCore::FileChooser::chooseIcon): Added.

        * platform/FileChooser.h: Added FileChooserClient so this file doesn't have
        to know about RenderFileUploadControl. Used RetainPtr instead of retain/release
        so this works properly with Objective-C GC. Replaced disconnectUploadControl
        with disconnectClient, which has a simple inline implementation. Moved the
        Document parameter from the constructor to openFileChooser, along with a comment
        about why it should not be there. Added a filename parameter to the constructor
        for the initial filename. Added a font parameter to basenameForWidth so we don't
        depend on having a pointer to the renderer. Removed the uploadControl() and
        document() functions since no one calls either of them.

        * platform/mac/FileChooserMac.mm: Removed code that is now cross-platform.
        (-[OpenPanelController beginSheetWithFrame:]): Added frame parameter, instead
        of storing a document pointer in the FileChooser.
        (WebCore::FileChooser::FileChooser): Updated for changed parameters. Also added
        code to choose the icon based on the initial filename. Pass the adopt parameter
        to the constructor of the RetainPtr.
        (WebCore::FileChooser::~FileChooser): Removed the release call, since the
        RetainPtr will take care of it. Added a call to disconnectFileChooser here.
        There's no need to disconnect at disconnectClient time, and that lets us have
        one more cross-platform function.
        (WebCore::FileChooser::openFileChooser): Added document parameter. Added code
        to get the frame from the document. And added a nil check since there's no
        ironclad guarantee the document won't have outlived its frame.
        (WebCore::FileChooser::basenameForWidth): Added font parameter. Use that instead
        of going at the upload control's style. The caller can handle that now.

        * rendering/RenderFileUploadControl.h: Removed unnecessary includes.
        Made class inherit privately from FileChooserClient. Changed constructor
        parameter to HTMLInputElement rather than Node. Made protected members be
        private instead, and made a couple function members const.
        * rendering/RenderFileUploadControl.cpp: Moved constants to the top of the file,
        but after the "using namespace"
        (WebCore::RenderFileUploadControl::RenderFileUploadControl): Updated for changes
        to the FileChooser::create function and the parameter types.
        (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed unneeded
        null check -- there's no case where the FileChooser fails to be created.
        (WebCore::RenderFileUploadControl::click): Pass document to openFileChooser.
        (WebCore::RenderFileUploadControl::updateFromElement): Tweaked code a bit by
        using updateFromElement and setValue instead of casting the renderer to a
        RenderButton and calling setText directly. Put setInputType call here.
        (WebCore::RenderFileUploadControl::maxFilenameWidth): Made const. Broke long line.
        (WebCore::RenderFileUploadControl::createButtonStyle): Made const.
        (WebCore::RenderFileUploadControl::paintObject): Moved buttonShadowHeight constant
        to the top of the file. Call isEmpty instead of checking width and height of
        IntRect for 0. Computed font to pass to FileChooser::basenameForWidth. Broke
        long lines.
        Moved the setInputType call to the caller; concept here is that this class is
        as simple as possible, rather than doing as much of the button job as possible.

        * WebCore.xcodeproj/project.pbxproj: Added FileChooser.cpp.
        * WebCore.pro: Ditto.
        * CMakeLists.txt: Ditto.
        * WebCoreSources.bkl: Ditto.

        * platform/gdk/TemporaryLinkStubs.cpp: Updated stubs.
        * platform/qt/FileChooserQt.cpp: Updated stubs.

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

16 years ago Reviewed by Darin.
bdakin [Mon, 22 Jan 2007 22:51:21 +0000 (22:51 +0000)]
    Reviewed by Darin.

        Darin and I looked into these tests that are adding an empty
        RenderText, and we think they just need new results. Here they are!

        * editing/execCommand/find-after-replace-expected.txt:
        * fast/css/beforeSelectorOnCodeElement-expected.txt:
        * fast/forms/control-restrict-line-height-expected.txt:
        * fast/forms/select-size-expected.txt:

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

16 years agoLayoutTests:
weinig [Mon, 22 Jan 2007 21:37:34 +0000 (21:37 +0000)]

        Reviewed by Darin.

        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=12364
          REGRESSSION (NativeListBox): Selected option's background is not clipped to the list box

        * fast/forms/select-item-background-clip-expected.checksum: Added.
        * fast/forms/select-item-background-clip-expected.png: Added.
        * fast/forms/select-item-background-clip-expected.txt: Added.
        * fast/forms/select-item-background-clip.html: Added.


        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12364
          REGRESSSION (NativeListBox): Selected option's background is not clipped to the list box

        Test: fast/forms/select-item-background-clip.html

        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemBackground): Intersect the item's rect with
        the list box's clip rect.

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

16 years ago * WebView/WebHTMLView.mm:
sullivan [Mon, 22 Jan 2007 21:28:37 +0000 (21:28 +0000)]
    * WebView/WebHTMLView.mm:
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
        Tiger build fix: remove unused variable for return value of dictionaryServiceWindowShow

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

16 years ago Reviewed by Beth.
darin [Mon, 22 Jan 2007 21:15:37 +0000 (21:15 +0000)]
    Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12369
          REGRESSION (r19027): amazon.com home page crashes WebKit r19028 debug build

        I caused this a few hours ago. Oops!

        * rendering/RenderText.cpp: (WebCore::RenderText::setStyle):
        Compute whether the font changed before calling RenderObject::setStyle.

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

16 years ago Reviewed by Adam and Darin
sullivan [Mon, 22 Jan 2007 21:09:40 +0000 (21:09 +0000)]
    Reviewed by Adam and Darin

        - fixed <rdar://problem/4794320> "Look Up in Dictionary" does nothing in WebKit
        (need to adopt new API)

        * Misc/WebNSURLExtras.m:
        (-[NSString _web_isUserVisibleURL]):
        random typo correction in comment

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for these changes

        * WebView/WebHTMLView.mm:
        new function to convert an AppKit screen point to a CG screen point
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
        on Leopard now uses new API. There's something of an impedance mismatch between
        this API and WebKit, but that was true for the SPI we were using in Tiger also.
        Bug 4945808 covers the ways in which this is not perfect.

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

16 years ago Reviewed by Maciej.
bdakin [Mon, 22 Jan 2007 20:54:22 +0000 (20:54 +0000)]
    Reviewed by Maciej.

        Fix for <rdar://problem/4912129> REGRESSION: Crash occurs at
        WebCore::Frame::eventHandler() after clicking to dismiss a
        contextual menu on the page

        * page/EventHandler.cpp:
        (WebCore::EventHandler::stopAutoscrollTimer): Added nil-check.

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

16 years ago Reviewed by Mitz.
darin [Mon, 22 Jan 2007 17:39:53 +0000 (17:39 +0000)]
    Reviewed by Mitz.

        - a couple tiny tweaks to make --reset-results work better

        * Scripts/run-webkit-tests: Always generate results when --reset-results is specified.
        Don't make a separate "new" entry while generating results when --reset-results
        is specified since new results are the norm in that case.

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

16 years agoLayoutTests:
darin [Mon, 22 Jan 2007 17:28:57 +0000 (17:28 +0000)]

        Test by Andrew Wellington <proton@wiretapped.net>.
        Reviewed by Darin.

        - test for fix to http://bugs.webkit.org/show_bug.cgi?id=11197
          REGRESSION: Specifying a counter for a CODE tag's content style
          property on before or after causes a crash.

        * fast/css/beforeSelectorOnCodeElement-expected.checksum: Added.
        * fast/css/beforeSelectorOnCodeElement-expected.png: Added.
        * fast/css/beforeSelectorOnCodeElement-expected.txt: Added.
        * fast/css/beforeSelectorOnCodeElement.html: Added.

        Test by Mitz.
        Reviewed by Darin.

        - test for monospace problem mentioned in the above bug

        * fast/text/monospace-width-cache-expected.checksum: Added.
        * fast/text/monospace-width-cache-expected.png: Added.
        * fast/text/monospace-width-cache-expected.txt: Added.
        * fast/text/monospace-width-cache.html: Added.


        Reviewed by Mitz.

        Inspired by a much simpler patch by Andrew Wellington <proton@wiretapped.net>.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11197
          REGRESSION: Specifying a counter for a CODE tag's content style property
          on before or after causes a crash.

        Test: fast/css/beforeSelectorOnCodeElement.html

        - fix regression I recently introduced where the monospace cache could be
          used for text that was not ASCII, if text was changed after the style was set

        Test: fast/text/monospace-width-cache.html

        - streamline RenderText.h -- remove unneeded functions, make some needlessly
          virtual functions non-virtual, remove unneeded header includes, replace use
          of Font* with Font& for consistency with RenderStyle, use "text" consistently
          instead of "string"

        * rendering/RenderText.h: Removed unneeded include of "Text.h", declarations of
        SOFT_HYPHEN, DocumentMarker, InlineBox, Position, String. Got rid of friend
        declaration for InlineTextBox. Changed constructor to take a PassRefPtr since
        we do take owership of the passed-in text. Made deleteTextBoxes() private.
        Removed unneeded data(). Made override of length() private so people will use
        the faster textLength() instead. Renamed string() to text() so it matches up
        better with setText(). Same for stringLength(), originalString(), and
        setInternalString(), which are now textLength(), originalText(), and
        setTextInternal(). Renamed the old text() function to characters(), since it
        returns a pointer as StringImpl::characters does. Changed Font* to Font& everywhere.
        Renamed the internal calcMinMaxWidth() function to calcMinMaxWidthInternal() and
        made it non-virtual since it's not overriden anywhere. Also made the
        trimmedMinMaxWidth() function non-virtual. Made containsOnlyWhitespace() private.
        Removed both font() functions (one was needlessly virtual) and element().
        Renamed cacheWidths() to updateMonospaceCharacterWidth() and removed the
        shouldUseMonospaceCache() function. Renamed allAscii() to isAllASCII() and made
        it an inline function. Removed the m_allAsciiChecked flag and renamed the
        m_allAscii flag to m_isAllASCII.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::RenderText): Removed initialization of m_allAsciiChecked.
        Initialize m_isAllASCII. Changed all occurrences of m_str->length() and
        m_str->characters () to use the stringLength() and characters() inline functions
        (WebCore::RenderText::setStyle): Replaced the unconditional call to cacheWidths
        with a conditional call to updateMonospaceCharacterWidth. This speeds up the common
        case where style is changed without changing the font.
        (WebCore::RenderText::originalText): Changed code to not depend on overridden
        element() function with casts to a Text node -- this was one of only two call sites.
        Also renamed.
        (WebCore::RenderText::positionForCoordinates): Name change.
        (WebCore::RenderText::caretRect): Ditto.
        (WebCore::RenderText::updateMonospaceCharacterWidth): Renamed from cacheWidths and
        incorporate the check that was formerly in a separate shouldUseMonospaceCache
        (WebCore::RenderText::widthFromCache): Changed to take a Font& instead of Font*.
        Changed to take advantage of the fact that the string is known to be all ASCII in
        the m_monospaceCharacterWidth code path.
        (WebCore::RenderText::trimmedMinMaxWidth): Ditto. Also use style()->font() instead
        of font(false).
        (WebCore::RenderText::calcMinMaxWidth): Ditto. Also changed to use softHyphen instead
        of SOFT_HYPHEN.
        (WebCore::RenderText::containsOnlyWhitespace): More of the same.
        (WebCore::RenderText::setSelectionState): Ditto.
        (WebCore::RenderText::setTextWithOffset): Ditto.
        (WebCore::isInlineFlowOrEmptyText): Ditto.
        (WebCore::RenderText::setTextInternal): Updated for name changes. Also changed to
        set the m_isAllASCII flag every time, in the more-efficient way we use elsewhere
        (or'ing all the characters together), and to call updateMonospaceCharacterWidth
        if the "all ASCII"-ness of the text changes.
        (WebCore::RenderText::setText): Updated for name changes.
        (WebCore::RenderText::width): More like above.
        (WebCore::RenderText::selectionRect): Ditto.
        (WebCore::RenderText::caretMaxOffset): Ditto.
        (WebCore::RenderText::previousOffset): Ditto.
        (WebCore::RenderText::nextOffset): Ditto.

        * dom/Position.cpp:
        * dom/Range.cpp:
        * editing/CompositeEditCommand.cpp:
        * editing/DeleteSelectionCommand.cpp:
        * editing/VisiblePosition.cpp:
        * html/HTMLElement.cpp:
        Added now-needed include of "Text.h" which is no longer included by "RenderText.h".

        * editing/SelectionController.cpp:
        * editing/TextIterator.cpp:
        Update for name changes of stringLength(), string(), and originalString() to
        textLength(), text(), and originalText(), and to always use textLength() instead
        of length() when we have a RenderText* rather than a RenderObject*.
        * editing/visible_units.cpp:
        (WebCore::startOfParagraph): Ditto.
        (WebCore::endOfParagraph): Ditto.
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxesHorizontally): Ditto. Also removed use of the
        RenderObject::font() function and replaced it with explicit access to the style.
        (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionRect): Ditto.
        (WebCore::InlineTextBox::isLineBreak): Ditto.
        (WebCore::InlineTextBox::paint): Ditto.
        (WebCore::InlineTextBox::selectionStartEnd): Ditto.
        (WebCore::InlineTextBox::paintSelection): Ditto.
        (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
        (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
        (WebCore::InlineTextBox::offsetForPosition): Ditto.
        (WebCore::InlineTextBox::positionForOffset): Ditto.
        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::addChild): Ditto.
        * rendering/RenderCounter.cpp:
        (WebCore::RenderCounter::originalText): Ditto.
        (WebCore::RenderCounter::calcMinMaxWidth): Ditto.
        * rendering/RenderCounter.h: Ditto.
        * rendering/RenderTextFragment.cpp:
        (WebCore::RenderTextFragment::originalText): Ditto.
        * rendering/RenderTextFragment.h: Ditto.
        * rendering/SVGInlineFlowBox.cpp:
        (WebCore::placePositionedBoxesHorizontally): Ditto.
        (WebCore::placeBoxesVerticallyWithAbsBaseline): Ditto.
        * rendering/bidi.cpp:
        (WebCore::BidiIterator::increment): Ditto.
        (WebCore::BidiIterator::current): Ditto.
        (WebCore::BidiIterator::direction): Ditto.
        (WebCore::addRun): Ditto.
        (WebCore::checkMidpoints): Ditto.
        (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto.
        (WebCore::RenderBlock::skipWhitespace): Ditto.
        (WebCore::RenderBlock::findNextLineBreak): Ditto.

        * rendering/RenderBR.h: Updated signature of width function which now takes a
        Font& instead of a Font*.

        * rendering/RenderBlock.cpp: (WebCore::stripTrailingSpace): Updated to no longer
        use the RenderObject::font() function, and added a comment about first-line, which
        is not handled properly here.

        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::text):
        * rendering/RenderTreeAsText.cpp: (WebCore::writeTextRun):
        Eliminated use of RenderText::data().

        * rendering/RenderObject.h: Removed RenderObject::font(). This had the bad effect of
        having everyone pass in a boolean rather than using the cleaner style() and
        firstLineStyle() functions in cases where there's no a firstLineStyle boolean.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::getVerticalPosition): Replaced use of RenderObject::font()
        with direct use of the style instead, which is arguably easier to understand anyway.
        (WebCore::RenderObject::baselinePosition): Ditto.

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