2006-01-30  Anders Carlsson  <andersca@mac.com>

        Reviewed by Darin.

        Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6907
        REGRESSION: United.com menus messed up due to document.all/MSIE sniff
        
        * kjs/nodes.cpp:
        (typeStringForValue):
        Return "undefined" if the given object should masquerade as undefined.
        
        * kjs/object.h:
        (KJS::JSObject::masqueradeAsUndefined):
        Rename from isEqualToNull.
        
        * kjs/operations.cpp:
        (KJS::equal):
        Update for name change.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2006-01-30  Anders Carlsson  <andersca@mac.com>

        Reviewed by Darin.

        Update test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6907
        REGRESSION: United.com menus messed up due to document.all/MSIE sniff
        
        * fast/dom/undetectable-document-all.html:
        Test that typeof document.all is undefined.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Added test case I forgot to commit earlier.

        - test case for crash if a node is removed from the DOM before being reparented due to residual style
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6778
        
        * fast/parser/remove-block-in-residual-style.html: Added.
        * fast/parser/remove-block-in-residual-style-expected.checksum: Added.
        * fast/parser/remove-block-in-residual-style-expected.png: Added.
        * fast/parser/remove-block-in-residual-style-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore:

        Reviewed by Hyatt.

        - added a Timer class
        - used the Timer class for the redirection timer
        - moved Frame, FrameView, MacFrame, and FrameNodeTree into WebCore namespace
        - removed more KWQ

        * ForwardingHeaders/khtml_factory.h: Removed.
        * kwq/KWQKHTMLFactory.cpp: Removed.
        * kwq/KWQKHTMLFactory.h: Removed.

        * platform/Timer.h: Added.
        * platform/mac/Timer.cpp: Added.

        * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for added and removed files.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * page/Frame.h:
        * page/Frame.cpp:
        (WebCore::Frame::init): Remove code to set up slotRedirect.
        (WebCore::Frame::checkCompleted): Call start/stopRedirectionTimer instead of using
        the redirection timer directly.
        (WebCore::Frame::scheduleRedirection): Ditto.
        (WebCore::Frame::scheduleLocationChange): Ditto.
        (WebCore::Frame::scheduleHistoryNavigation): Ditto.
        (WebCore::Frame::cancelRedirection): Ditto.
        (WebCore::Frame::redirectionTimerFired): Renamed from slotRedirect.
        (WebCore::Frame::slotParentCompleted): More startRedirectionTimer.
        (WebCore::Frame::startRedirectionTimer): Added. Virtual bottleneck to start the
        redirection timer.
        (WebCore::Frame::stopRedirectionTimer): Added. Virtual bottleneck to stop the
        redirection timer.

        * page/FramePrivate.h: Changed m_redirectionTimer from a QTimer to a Timer.

        * bridge/mac/MacFrame.mm:
        (WebCore::MacFrame::startRedirectionTimer): Added. Avoids the need for the QTimer
        "monitor" feature that I had added a while back to implement the client-redirected
        callback.
        (WebCore::MacFrame::stopRedirectionTimer): Ditto.

        * kwq/KWQSlot.cpp: Removed slotRedirected.

        * ForwardingHeaders/ksvg2/KSVGPart.h: Removed using to put Frame into various
        namespaces (all of which are WebCore now anyway).

        * bindings/objc/DOMInternal.mm:
        * bridge/mac/BrowserExtensionMac.h:
        * bridge/mac/KWQKHTMLView.cpp:
        * bridge/mac/MacFrame.h:
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        * bridge/mac/WebCorePageBridge.h:
        * bridge/mac/WebCorePageBridge.mm:
        * css/cssstyleselector.cpp:
        * css/cssstyleselector.h:
        * khtml/ecma/kjs_binding.cpp:
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_navigator.cpp:
        * khtml/ecma/kjs_navigator.h:
        * khtml/ecma/kjs_proxy.h:
        * khtml/ecma/kjs_window.h:
        * khtml/editing/SelectionController.h:
        * khtml/editing/jsediting.h:
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_documentimpl.cpp:
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_headimpl.h:
        * khtml/html/htmlparser.h:
        * khtml/html/htmltokenizer.h:
        * khtml/xml/DOMImplementationImpl.h:
        * khtml/xml/DocumentImpl.h:
        * khtml/xml/dom2_eventsimpl.h:
        * khtml/xml/xml_tokenizer.h:
        * khtml/xsl/xslt_processorimpl.h:
        * ksvg2/svg/SVGDocumentImpl.cpp:
        * kwq/KWQClipboard.h:
        * kwq/KWQComboBox.mm:
        * kwq/KWQFileButton.h:
        * kwq/KWQFrame.mm:
        * kwq/KWQKJavaAppletWidget.h:
        * kwq/KWQListBox.mm:
        * kwq/KWQSignalStubs.cpp:
        * kwq/KWQSlider.mm:
        * kwq/KWQTextField.mm:
        * kwq/KWQWidget.mm:
        * kwq/WebCoreSettings.mm:
        * kwq/WebCoreTextRendererFactory.mm:
        * loader/DocLoader.h:
        * page/FrameTreeNode.cpp:
        * page/FrameTreeNode.h:
        * page/FrameView.cpp:
        * page/FrameView.h:
        * page/Page.cpp:
        * page/Page.h:
        * rendering/InlineTextBox.h:
        * rendering/font.cpp:
        * rendering/render_canvas.h:
        * rendering/render_frames.h:
        * rendering/render_object.h:
        * rendering/render_replaced.h:
        Updated for namespace and header changes.

WebKit:

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebFrameBridge.m:
        (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
        Updated for name change.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2006-01-31  Anders Carlsson  <andersca@mac.com>

        Reviewed by John.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6964
        ImagePatterns are always rendered mirrored
        
        * khtml/ecma/kjs_html.cpp:
        (KJS::ImagePattern::createPattern):
        Don't mirror the x coordinate when creating the pattern.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6960
          REGRESSION: Assertion failure in table_layout.cpp:216 calcWidthArray()

        * rendering/table_layout.cpp: (WebCore::FixedTableLayout::calcWidthArray):
        Remove the assertion.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6960
          REGRESSION: Assertion failure in table_layout.cpp:216 calcWidthArray()

        * fast/table/fixed-table-non-cell-in-row.html: Added.
        * fast/table/fixed-table-non-cell-in-row-expected.txt: Added.
        * fast/table/fixed-table-non-cell-in-row-expected.png: Added.
        * fast/table/fixed-table-non-cell-in-row-expected.checksum: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Test: fast/parser/script-after-frameset-assert.html

        Reviewed by Darin.
        
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6959
          REGRESSION: Assertion failure in HTMLTokenizer::parseTag (!scriptNode) on page with ignored scripts

        * khtml/html/htmltokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptHandler): Reset scriptNode to 0 if the
        script is being skipped.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Darin.
        
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6959
          REGRESSION: Assertion failure in HTMLTokenizer::parseTag (!scriptNode) on page with ignored scripts

        * fast/parser/script-after-frameset-assert-expected.txt: Added.
        * fast/parser/script-after-frameset-assert.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Hyatt.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6584
          REGRESSION: button after unclosed button gives trouble

        * khtml/html/htmlparser.cpp: (HTMLParser::getNode):
        Add buttonTag to error handling table to take care of unclosed tags.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Hyatt.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6584
          REGRESSION: button after unclosed button gives trouble

        * fast/forms/button-cannot-be-nested-expected.checksum: Added.
        * fast/forms/button-cannot-be-nested-expected.png: Added.
        * fast/forms/button-cannot-be-nested-expected.txt: Added.
        * fast/forms/button-cannot-be-nested.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Adele.

        Fixing build bustage. Removing include of khtml_factory.h since it 
        has been removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests:

        Reviewed by Adele.
        
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6942
          Assertion failure in HTMLSelectElementImpl::selectedIndex (m_multiple)

        * fast/forms/selected-index-assert-expected.txt: Added.
        * fast/forms/selected-index-assert.html: Added.

WebCore:

        Test: fast/forms/selected-index-assert.html.

        Reviewed by Adele.
        
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6942
          Assertion failure in HTMLSelectElementImpl::selectedIndex (m_multiple)

        * khtml/html/HTMLSelectElementImpl.cpp:
        (WebCore::HTMLSelectElementImpl::selectedIndex): Removed bogus assert.
        -1 is the correct value to return if no option is selected.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by John.
        <rdar://problem/4423922> TOT REGRESSION (r12358): first iframe in pair fails to copy

        Layout test added:
        * editing/pasteboard/paste-empty-startcontainer.html
        
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::startNode):
        - use empty non-textual m_startContainer itself if m_startOffset is 0, rather then nextSibling()



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Adding test cases for:
        <rdar://problem/4423922> TOT REGRESSION (r12358): first iframe in pair fails to copy
        
        * editing/pasteboard/paste-empty-startcontainer-expected.png: Added.
        * editing/pasteboard/paste-empty-startcontainer-expected.checksum: Added.
        * editing/pasteboard/paste-empty-startcontainer-expected.txt: Added.
        * editing/pasteboard/paste-empty-startcontainer.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Geoff.

        - fix <rdar://problem/4426668> REGRESSION: sometimes URLs with named anchors in a
        page don't jump to proper location in document (6916). Added test cases for this
        fix and past link jumping bug fixes.

        * khtml/xml/ContainerNodeImpl.cpp:
        (WebCore::ContainerNodeImpl::getUpperLeftCorner): Traverse up the parent node chain
        until you find one that has a sibling.
        * manual-tests/linkjump-1.html: Added a note here - the bug for this test case is
        still broken in TOT.
        * manual-tests/linkjump-2.html: Added. Renamed scrollToAnchor.html, to group it with the
        rest of the link jumping tests.
        * manual-tests/linkjump-3.html: Added. Test case for this bug, <rdar://problem/4426668>.
        * manual-tests/linkjump-4.html: Added. Test case for past fix, <rdar://problem/4247537>.
        * manual-tests/linkjump-5.html: Added. Test case for past fix, <rdar://problem/4256060>.
        * manual-tests/scrollToAnchor.html: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Geoff Garen.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertUTF8ToUTF16):
	Fixed an invalid assertion that UTF8Chars is not NULL.  It is valid for it to be NULL as long as
	UTF8Length is 0.
	This fixes an assertion failure on TOT at <http://www.musicindiaonline.com/p/x/tJO0OOBME9.As1NMvHdW/>,
	where JavaScript is getting a NULL string back from some call on the Real Player plugin.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Tim Omernick.
        
        Support for programmatic scrolling one line at a time for PDFs. (We already had support for
        programmatic scrolling one page at a time, and to top/end.)

        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
        generalized comment
        (-[WebPDFView scrollLineDown:]):
        pass a faked arrow-down key event
        (-[WebPDFView scrollLineUp:]):
        pass a faked arrow-up key event



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding -Wno-long-double to avoid a warning.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests:

        Adding test cases for:
        http://bugzilla.opendarwin.org/show_bug.cgi?id=4959
        Bug 4959: inline style not terminated properly after <form>

        Updated older tests/results to work with the patch.
        Some of the tests had an open <span> with no close.

        * editing/deleting/delete-image-003-expected.txt:
        * editing/deleting/delete-image-003.html:
        * editing/undo/redo-typing-001-expected.txt:
        * editing/undo/redo-typing-001.html:
        * editing/undo/undo-typing-001-expected.txt:
        * editing/undo/undo-typing-001.html:
        * fast/block/float/031.html:
        * fast/parser/residual-style-span-form-expected.checksum: Added.
        * fast/parser/residual-style-span-form-expected.png: Added.
        * fast/parser/residual-style-span-form-expected.txt: Added.
        * fast/parser/residual-style-span-form.html: Added.
        * fast/text/whitespace/006-expected.txt:

WebCore:

        Reviewed by Dave Hyatt.
        Landed by Timothy Hatcher.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=4959
        Bug 4959: inline style not terminated properly after <form>

        * khtml/html/htmlparser.cpp:
        (HTMLParser::isResidualStyleTag): add <span> as residual style tag
        (HTMLParser::isAffectedByResidualStyle): add <form> as tag affected by residual style



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