WebKit-https.git
17 years ago Reviewed by me
kocienda [Fri, 23 Jul 2004 14:39:45 +0000 (14:39 +0000)]
    Reviewed by me

        Updated layout tests with new expected results.

        * layout-tests/editing/execCommand/boldSelection-expected.txt
        * layout-tests/editing/selection/extend-by-character-001-expected.txt
        * layout-tests/editing/selection/extend-by-character-003-expected.txt
        * layout-tests/editing/selection/unrendered-005-expected.txt

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

17 years ago Reviewed by Kevin.
mjs [Fri, 23 Jul 2004 07:25:13 +0000 (07:25 +0000)]
    Reviewed by Kevin.

<rdar://problem/3725467> REGRESSION(140-142) nothing displayed at http://Ye-Olde-Movies.tripod.com
<rdar://problem/3599494> REGRESSION (100-125): Frame does not refresh until user clicks on browser.

        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::layout): When returning early because there are
no children, make sure to mark self as no longer needing
layout. Otherwise, when children are added, we'll fail to
propagate childrenNeedLayout to our own parent! This is almost
certainly a long-standing bug that was just masked by our old
layout tomfoolery.

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

17 years ago Reviewed by Darin
kdecker [Thu, 22 Jul 2004 23:43:29 +0000 (23:43 +0000)]
Reviewed by Darin

Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).

        * khtml/ecma/kjs_events.cpp:
        (JSLazyEventListener::JSLazyEventListener):
        (JSLazyEventListener::parseCode):
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::createHTMLEventHandler):
        * khtml/ecma/kjs_window.cpp:
        (Window::getJSLazyEventListener):
        * khtml/ecma/kjs_window.h:

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

17 years ago Reviewed by Darin
kdecker [Thu, 22 Jul 2004 23:30:52 +0000 (23:30 +0000)]
    Reviewed by Darin

Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).

        * kjs/function_object.cpp:
        (FunctionObjectImp::construct):
        * kjs/function_object.h:
        * kjs/object.cpp:
        (KJS::ObjectImp::construct):
        * kjs/object.h:
        (KJS::Object::construct):

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

17 years ago Reviewed by Hyatt
kocienda [Thu, 22 Jul 2004 23:04:39 +0000 (23:04 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3724344> Bolding and unbolding creates extraneous tags

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::ApplyStyleCommandImpl::doApply): Move the start of the selection upstream
        before calling removeStyle. This makes sure we remove all styles that could apply to the
        selection, and not just ones in from the start position of the selection passed to us.
        This fixes the bug.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::validate): Related fix to "constrain" the selection to be the
        smallest equivalent range of nodes, in effect making a "canonical" version of the
        selection. While this is not strictly necessary to fix the bug, it is a step I have been
        wanting to take this step for a long time, and some recent improvements made it
        possible for me to do now in just two lines of code.

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

17 years ago Reviewed by Hyatt
kocienda [Thu, 22 Jul 2004 22:41:05 +0000 (22:41 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3711264> difficult (impossible?) to get cursor in an editable webview containing only tags

        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): Don't assume you can pass off
        the check to a first child if there is one, since the child can be an element
        we do not want to place the caret in, like a table row with no cells (the case
        in the bug above). So now, we iterate of the renderer's children looking for
        the closest one, but only consider those renderers which either have children
        themselves, or are render block flows or are render inlines.

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

17 years ago - remove a bunch of now-unused code
darin [Thu, 22 Jul 2004 22:26:11 +0000 (22:26 +0000)]
    - remove a bunch of now-unused code

        * ForwardingHeaders/qxml.h: Removed.
        * kwq/KWQXmlAttributes.h: Removed.
        * kwq/KWQXmlAttributes.mm: Removed.
        * kwq/KWQXmlDefaultHandler.h: Removed.
        * kwq/KWQXmlDefaultHandler.mm: Removed.
        * kwq/KWQXmlSimpleReader.h: Removed.
        * kwq/KWQXmlSimpleReader.mm: Removed.

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

17 years ago * Plugins.subproj/npruntime.h: Update with new version from newer JavaScriptCore.
darin [Thu, 22 Jul 2004 22:14:06 +0000 (22:14 +0000)]
    * Plugins.subproj/npruntime.h: Update with new version from newer JavaScriptCore.

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

17 years ago Reviewed by Dave.
darin [Thu, 22 Jul 2004 20:50:10 +0000 (20:50 +0000)]
    Reviewed by Dave.

        - got rid of QXml classes and changed XML parsing to use libxml directly

        This is the first step toward more direct use of libxml and libxslt.
        Dave is planning to build on this to implement XSLT and to improve our handling
        of XML documents (faster and more feature complete, including DTDs).

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment):
        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::HTMLTokenizer):
        * khtml/html/htmltokenizer.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createTokenizer):
        (DocumentImpl::open):
        * khtml/xml/dom_docimpl.h:
        (DOM::DocumentImpl::tokenizer):
        * khtml/xml/dom_xmlimpl.cpp:
        (DOM::ProcessingInstructionImpl::checkStyleSheet):
        * khtml/xml/dom_xmlimpl.h:
        * khtml/xml/xml_tokenizer.h:
        * khtml/xml/xml_tokenizer.cpp: Redid this all to use libxml directly.

        * WebCore.pbproj/project.pbxproj: Removed a bunch of files.

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

17 years ago DHTML dragging should use UTI for MIME-pboard type conversion
trey [Thu, 22 Jul 2004 16:37:38 +0000 (16:37 +0000)]
DHTML dragging should use UTI for MIME-pboard type conversion

        Reviewed by NOBODY (OOPS!).

        * kwq/KWQClipboard.mm:
        (cocoaTypeFromMIMEType):  Use UTI, except for cases we need to hardwire.  Only cut off
MIME args following a semi-colon for text/plain.
        (MIMETypeFromCocoaType): Use UTI, except for cases we need to hardwire.
        (KWQClipboard::types):  Filter out ancient NSAsciiPboardType so DHTML never sees this cruft.

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

17 years agoWebCore:
kocienda [Thu, 22 Jul 2004 14:56:53 +0000 (14:56 +0000)]
WebCore:

        Reviewed by Trey

        Remove handling of HTML editing key events from WebCore.
        This now happens in WebKit if an event passes all the
        way through WebCore without being handled by the DOM.

        In each case below, function were removed, as their
        only purpose was to handle editing key events.

        * khtml/xml/dom_elementimpl.cpp
        * khtml/xml/dom_elementimpl.h
        * kwq/KWQKHTMLPart.h
        * kwq/KWQKHTMLPart.mm
        * kwq/WebCoreBridge.h

WebKit:

        Reviewed by Trey

        * WebCoreSupport.subproj/WebBridge.m: Remove interceptEditingKeyEvent
        bridge call over. This method of handling editing key events is now
        obsolete.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView performKeyEquivalent:]): Send key event over to the
        DOM if this view is or contains the first responder. This now
        happens unconditionally.
        (-[WebHTMLView keyDown:]): Send key event to the DOM, then see if
        the web view wants to interpret it an an editing key event. This
        is the new place to intercept key events for editing.

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

17 years agoWebCore:
kocienda [Wed, 21 Jul 2004 18:42:33 +0000 (18:42 +0000)]
WebCore:

        Reviewed by John

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modifyExtendingRightForward): Add LINE_BOUNDARY case to the switch statement in this
        function. Use the startAndEndLineNodesIncludingNode helper which already existed to get the right
        position.
        (DOM::Selection::modifyMovingRightForward): Ditto
        (DOM::Selection::modifyExtendingLeftBackward): Ditto
        (DOM::Selection::modifyMovingLeftBackward): Ditto
        * khtml/xml/dom_selection.h:
        (DOM::Selection::): Add LINE_BOUNDARY constant to ETextGranularity enum. This
        specifies a new kind of movement that we need to implement the "move-to beggining/end of line"
        behavior which AppKit binds to cmd+left/right arrow keys.
        * kwq/WebCoreBridge.h: Add WebSelectToLineBoundary constant. This matches

WebKit:

        Reviewed by John

        Add implementations for these methods. Formerly, they logged an error.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView moveToBeginningOfLine:]):
        (-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
        (-[WebHTMLView moveToEndOfLine:]):
        (-[WebHTMLView moveToEndOfLineAndModifySelection:]):

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

17 years ago Reviewed by John
kocienda [Wed, 21 Jul 2004 17:47:53 +0000 (17:47 +0000)]
    Reviewed by John

        Added some more handlers for standard Cocoa key bindings.
        These are "secrets" of NSText, meaning they are not public API, but we choose to mimic.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]):
        (-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
        (-[WebHTMLView moveToBeginningOfParagraphAndModifySelection:]):
        (-[WebHTMLView moveToEndOfDocumentAndModifySelection:]):
        (-[WebHTMLView moveToEndOfLineAndModifySelection:]):
        (-[WebHTMLView moveToEndOfParagraph:]):
        (-[WebHTMLView moveToEndOfParagraphAndModifySelection:]):
        * WebView.subproj/WebView.h: Add these declarations to the comment in the header listing
        the responder-like methods we support.
        * WebView.subproj/WebView.m:
        (-[WebView moveToBeginningOfParagraphAndModifySelection:]):
        (-[WebView moveToEndOfParagraphAndModifySelection:]):
        (-[WebView moveToBeginningOfLineAndModifySelection:]):
        (-[WebView moveToEndOfLineAndModifySelection:]):
        (-[WebView moveToBeginningOfDocumentAndModifySelection:]):
        (-[WebView moveToEndOfDocumentAndModifySelection:]):

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

17 years ago * bindings/npruntime.h: Fixed typo.
darin [Wed, 21 Jul 2004 16:09:00 +0000 (16:09 +0000)]
    * bindings/npruntime.h: Fixed typo.

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

17 years ago Fix for 3714434, user stylesheet is always parsed in strict mode, when it should...
hyatt [Tue, 20 Jul 2004 23:52:56 +0000 (23:52 +0000)]
Fix for 3714434, user stylesheet is always parsed in strict mode, when it should honor the document's setting.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::CSSStyleSelector):

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

17 years agoWebCore:
kocienda [Tue, 20 Jul 2004 23:32:08 +0000 (23:32 +0000)]
WebCore:

        Reviewed by Richard

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::defaultEventHandler): No longer check whether
        the command key is modifying the key event. This check is
        now done elsewhere in the code. See the WebKit checkin that
        added the _web_keyBindingManagerHasBinding method to
        WebNSEventExtras.

WebKit:

        Reviewed by Richard

        * Misc.subproj/WebNSEventExtras.h: Added helper that returns whether
        a key event has a binding in the key binding manager.
        * Misc.subproj/WebNSEventExtras.m:
        (-[NSEvent _web_keyBindingManagerHasBinding]): New helper mentioned above.
        * Plugins.subproj/npruntime.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView performKeyEquivalent:]): Add a check of whether the key event
        has a binding in the key binding manager. This works around the fact that
        NSResponder's interpretKeyEvents does not return a value telling whether
        or not the key was handled. This now makes it possible for us to trap
        modified key events we know we can handle (like those command-key + arrow events
        used for text navigation), while letting all others pass.

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

17 years agoWebCore:
cblu [Tue, 20 Jul 2004 22:27:27 +0000 (22:27 +0000)]
WebCore:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway

WebKit:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides "Copy Image"
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): don't drag an image with an actual image
        (-[WebHTMLView _mayStartDragAtEventLocation:]): ditto

WebBrowser:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides copy and save menu items.
        * WebBrowser.pbproj/project.pbxproj:

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

17 years agoReduced size of error images which affects test and fixed alt scaling bugs.
hyatt [Tue, 20 Jul 2004 22:11:53 +0000 (22:11 +0000)]
Reduced size of error images which affects test and fixed alt scaling bugs.

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

17 years ago Reviewed by Chris.
mjs [Tue, 20 Jul 2004 21:58:28 +0000 (21:58 +0000)]
    Reviewed by Chris.

<rdar://problem/3721690> REGRESSION (125.7-148u) clicking on links at macosx.apple.com/Builds does not load new page in frame

        * Plugins.subproj/npruntime.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): Don't apply the restrictions to frames
that are in the same window (Mozilla does this too).

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

17 years ago Fix for alt text not working on images.
hyatt [Tue, 20 Jul 2004 21:54:13 +0000 (21:54 +0000)]
Fix for alt text not working on images.

        Reviewed by john

        * khtml/rendering/render_image.cpp:
        (RenderImage::RenderImage):
        (RenderImage::setPixmap):
        (RenderImage::paint):
        (RenderImage::calcReplacedWidth):
        (RenderImage::calcReplacedHeight):

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

17 years ago Reviewed by Dave.
mjs [Tue, 20 Jul 2004 20:45:22 +0000 (20:45 +0000)]
    Reviewed by Dave.

<rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
        (khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
active prependingSrc variable on the stack, the better to handle weird cases
of scripts writing out additional script tags and so forth.
        (khtml::HTMLTokenizer::write): Deal with the above.
        * khtml/html/htmltokenizer.h: Declare new member field.

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

17 years ago Fix for 3728558. Fixed the key event handling in the carbon/cocoa
rjw [Tue, 20 Jul 2004 20:41:44 +0000 (20:41 +0000)]
Fix for 3728558.  Fixed the key event handling in the carbon/cocoa
integration code.  This does not fix the arrow keys not working on
initial focus problem also mentioned in the bug.

Bumped the version of the NP function structures.

        Reviewed by John.

        * Carbon.subproj/CarbonUtils.m:
        (WebInitForCarbon):
        (PoolCleaner):
        * Carbon.subproj/HIWebView.m:
        (OwningWindowChanged):
        (WindowHandler):
        * Plugins.subproj/npapi.h:

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

17 years agoAdd overflow test and fix rss test to not be rss.
hyatt [Tue, 20 Jul 2004 20:39:14 +0000 (20:39 +0000)]
Add overflow test and fix rss test to not be rss.

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

17 years ago Fix for layer positioning error that occurs when absolute positioned blocks are...
hyatt [Tue, 20 Jul 2004 20:35:21 +0000 (20:35 +0000)]
Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
elements.

        Reviewed by john

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):

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

17 years ago 3733698 REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion
trey [Tue, 20 Jul 2004 19:05:41 +0000 (19:05 +0000)]
3733698 REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion

Relax an assertion, as we ran into a valid case where it's not true.

        Reviewed by Chris.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Removing this assert allows for the oddball case of a drag gesture that
starts on one element, but then the element is no longer there when
the drag is about to start.

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

17 years ago 3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
trey [Tue, 20 Jul 2004 18:56:37 +0000 (18:56 +0000)]
3705624 REGRESSION: can't rearrange photos on homepage.mac.com album

A subtle problem stemming from some interaction between focus handing and
event propagation.  We previously made it so when a focus shift fails we
don't propagate the event to KHTML.  The fix is to get rid of the inverse
effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
the page already canceled default behavior.

In this specific case, the page is cancelling default behavior since it
does its own dragging, and the bug was our new system dragging was
kicking in.

        Reviewed by Ken.

        * khtml/khtmlview.cpp:
        (KHTMLView::dispatchMouseEvent):  What he said.

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

17 years ago Reviewed by Darin
kocienda [Tue, 20 Jul 2004 18:06:24 +0000 (18:06 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
        line endings into BR elements.

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

17 years agoWebCore:
kocienda [Tue, 20 Jul 2004 15:38:14 +0000 (15:38 +0000)]
WebCore:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body

        * khtml/khtml_part.cpp:
        (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
        on the caret, this seems like a better name.
        * khtml/khtml_part.h:
        * khtml/khtmlview.cpp:
        (KHTMLView::focusInEvent): Call setCaretVisible(true)
        (KHTMLView::focusOutEvent): Call setCaretVisible(false)
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
        * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setCaretVisible:]): Ditto.

WebKit:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView setCaretVisible:]): New helper. Calls over bridge to do the work.
        (-[WebHTMLView windowDidBecomeKey:]): This function cannot just assume that self is first responder
        (and do things like adjusting text background color and restoring focus rings).
        First-responder-ness needs to be checked first. Now it is.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView becomeFirstResponder]): Call new helper to make caret visible.
        (-[WebHTMLView resignFirstResponder]): Call new helper to make caret invisible.

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

17 years ago Reviewed by Trey.
mjs [Tue, 20 Jul 2004 08:12:08 +0000 (08:12 +0000)]
    Reviewed by Trey.

<rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)

* khtml/misc/stringit.h:
        (khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
stableUnicode() method to get the unicode pointer.
        * kwq/KWQString.h:
        * kwq/KWQString.mm:
        (QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
It does not leave around a zombie internal data handle but rather destroys it right away,
and leaves the object pointing to the new handle (which it can then deref). This makes
the code more clear.
        (QString::~QString): Simplify.
        (QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
is internal to a string besides this one. This guarantees that if you get the unicode()
pointer, it won't go bad so long as this string is still alive.

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

17 years ago Reviewed by Maciej.
sullivan [Mon, 19 Jul 2004 23:43:54 +0000 (23:43 +0000)]
    Reviewed by Maciej.

        - bulletproofed array.slice() against NAN arguments. Harri noticed this
        vulnerability in my patch for 3714644

        * kjs/array_object.cpp:
        (ArrayProtoFuncImp::call):
        handle NAN parameters passed to slice() by clamping to 0 and length.

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

17 years ago*** empty log message ***
hyatt [Mon, 19 Jul 2004 23:34:41 +0000 (23:34 +0000)]
*** empty log message ***

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

17 years ago Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and...
hyatt [Mon, 19 Jul 2004 23:33:50 +0000 (23:33 +0000)]
Fix for 3715117, crash from a bug in removeChildren.  Clean up node removal and fix an n-squared removal
bug.  Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
make node removal more efficient.

        Reviewed by kocienda

        * khtml/xml/dom_nodeimpl.cpp:

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

17 years ago Reviewed by Trey.
sullivan [Mon, 19 Jul 2004 22:40:57 +0000 (22:40 +0000)]
    Reviewed by Trey.

        - fixed <rdar://problem/3141150> can't undo in form textarea fields

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]):
        call setAllowsUndo:YES. My, wasn't this easy?

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

17 years ago Fixed 3733349. Prevent Java applet callbacks into JavaScript after applet
rjw [Mon, 19 Jul 2004 22:32:48 +0000 (22:32 +0000)]
Fixed 3733349.  Prevent Java applet callbacks into JavaScript after applet
has been destroyed.

        Reviewed by John.

        * bindings/jni/jni_jsobject.cpp:
        (JSObject::invoke):
        (JSObject::JSObject):

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

17 years ago Fixed 3721917. The RealPlayer plugin doesn't support the new
rjw [Mon, 19 Jul 2004 22:32:15 +0000 (22:32 +0000)]
    Fixed 3721917.  The RealPlayer plugin doesn't support the new
        NPPVpluginScriptableNPObject variable passed to NPP_GetValue and
        incorrectly returns NPERR_NO_ERROR.  We interpret this to the
        mean the variable has been set.  The variable has not been set
        and will consequently be uninitialized.

        Reviewed by NOBODY (OOPS!).

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]):

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

17 years ago Merge @import fix for CSS1 test suite from Stephan Kulow.
hyatt [Mon, 19 Jul 2004 21:50:40 +0000 (21:50 +0000)]
Merge @import fix for CSS1 test suite from Stephan Kulow.

        Reviewed by hyatt

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * layout-tests/css1/basic/containment-expected.txt:

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

17 years ago Fix for 3718697, crash clicking on JS tab at alaskaair.com.
hyatt [Mon, 19 Jul 2004 21:40:43 +0000 (21:40 +0000)]
Fix for 3718697, crash clicking on JS tab at alaskaair.com.

        Reviewed by kocienda

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::detach):
        (RenderFlow::dirtyLinesFromChangedChild):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::dirtyLinesFromChangedChild):
        * khtml/rendering/render_object.h:

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

17 years ago Reviewed by Richard
kocienda [Mon, 19 Jul 2004 20:58:08 +0000 (20:58 +0000)]
    Reviewed by Richard

        Fix for this bug:

        <rdar://problem/3707504> HTMLCompose: key events are stolen by Web(HTML)View

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView firstResponderIsSelfOrDescendantView]): New helper to
        (-[WebHTMLView performKeyEquivalent:]): Do not pass key events through to the editing
        key handler unless the WebHTMLView is first responder or contains the first responder.
        This prevents the "stealing" of key events mentioned in the bug.
        * WebView.subproj/WebView.m:
        (-[WebView _performResponderOperation:with:]): Uses the new firstResponderIsSelfOrDescendantView
        helper. The code I replaced used the same logic as the new helper.

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

17 years ago Reviewed by Maciej.
sullivan [Fri, 16 Jul 2004 22:56:24 +0000 (22:56 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link
        hangs browser with javascript

        * kjs/array_object.cpp:
        (ArrayProtoFuncImp::call):
        Check for undefined type for args[0] the same way we were already checking
        for args[1]. In this case, args was zero-length, but we were treating
        args[0] like an integer anyway. Resulted in some code looping from a NAN
        value to 4, taking approximately forever.

        * JavaScriptCore.pbproj/project.pbxproj:
        version wars

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

17 years ago Fix for 3726471, need to ensure that it's safe to do updateRendering from within...
hyatt [Fri, 16 Jul 2004 22:20:35 +0000 (22:20 +0000)]
Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
relies on it.  The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
will be up-to-date.

        Reviewed by john

        * khtml/khtmlview.cpp:
        (KHTMLView::layout):

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 21:19:18 +0000 (21:19 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
        more robust. I do not understand how Grant ended up with null start or end
        blocks in the case of his bug report, but by adding two null checks, the code is
        now hardened a bit in case it happens again.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 21:14:17 +0000 (21:14 +0000)]
    Reviewed by Hyatt

        Fix for these bugs:

        <rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
        <rdar://problem/3730790> Caret does not blink when placed in empty table cell

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
        don't block the painting of the caret in this case. This was the case in 3730790.
        We had the right geometry for the caret but blocked its painting.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousLinePosition): Rework the logic here. This function asserted
        that the new position we would navigate to had a line box, but empty table cells, for
        instance will not. So, deal with this situation as well. The end result is a
        function that worked like it did before in cases where the previous line position has
        a line box, but now also will allow navigation to work when it does not.
        (DOM::Position::nextLinePosition): Ditto.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 20:37:56 +0000 (20:37 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3687216> editable inline causes crash when focused

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
        (DocumentImpl::acceptsEditingFocus): Ditto.

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

17 years agoReturn Panther baseline to layout tests.
hyatt [Fri, 16 Jul 2004 20:25:03 +0000 (20:25 +0000)]
Return Panther baseline to layout tests.

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

17 years agoAdd a layout test for the crashing compact case.
hyatt [Fri, 16 Jul 2004 20:17:01 +0000 (20:17 +0000)]
Add a layout test for the crashing compact case.

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

17 years ago Fix for 3709337, crash when using display: compact. Need to make sure that the...
hyatt [Fri, 16 Jul 2004 20:15:34 +0000 (20:15 +0000)]
Fix for 3709337, crash when using display: compact.  Need to make sure that the isCompact() check in bidi.cpp is
also checking for RenderBlocks, since otherwise you match text nodes (and that's just wrong).

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):

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

17 years agochange version number to '153u'. the tree is open!
vicki [Fri, 16 Jul 2004 18:00:03 +0000 (18:00 +0000)]
change version number to '153u'.  the tree is open!

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

17 years agoSafari-152 stamp
vicki [Fri, 16 Jul 2004 17:55:33 +0000 (17:55 +0000)]
Safari-152 stamp

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

17 years ago Fix for 3625611, images offset on first visit to page. The method for determining...
hyatt [Fri, 16 Jul 2004 00:05:42 +0000 (00:05 +0000)]
Fix for 3625611, images offset on first visit to page.  The method for determining the last clean line was
flawed and would incorrectly miss dirty lines that occurred after the first clean line.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::determineEndPosition):

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

17 years ago Reviewed by John
kocienda [Thu, 15 Jul 2004 17:20:50 +0000 (17:20 +0000)]
    Reviewed by John

        Fix for this bug:
        <rdar://problem/3587601> reproducible assertion failure in Blot deleting text, then image at Yahoo.com

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Relax assertion
        that nodes are text nodes during the walk of eligible nodes that could possibly be
        deleted. Change the assertion to an conditional check for text nodes. We may have
        unrendered nodes in the mix here (as is the case in the bug where the assertion
        failed on an AREA element), and the conditional check is sufficient to
        skip them while leaving the delete logic we want unperturbed.

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

17 years ago Reviewed by John.
mjs [Thu, 15 Jul 2004 00:14:51 +0000 (00:14 +0000)]
    Reviewed by John.

<rdar://problem/3711474>: (REGRESSION (125-146): JavaScript 'toString(16)' is broken)
<rdar://problem/3644873>: (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com)

        * kjs/number_object.cpp:
        (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself!

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

17 years ago Reviewed by John
kocienda [Wed, 14 Jul 2004 23:35:17 +0000 (23:35 +0000)]
    Reviewed by John

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Add null check on DOM node before
        asking if it is contentEditable.

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

17 years ago Fix for 3595073, setting innerHTML on a <table> should work.
hyatt [Wed, 14 Jul 2004 23:03:15 +0000 (23:03 +0000)]
Fix for 3595073, setting innerHTML on a <table> should work.

        Reviewed by rjw

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment):

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 14 Jul 2004 21:45:30 +0000 (21:45 +0000)]
    Reviewed by Hyatt

        Updated these layout tests as a result of the last patch.
        These results are better.

        * layout-tests/editing/execCommand/selectAll-expected.txt
        * layout-tests/editing/selection/extend-by-character-006-expected.txt
        * layout-tests/editing/selection/unrendered-001-expected.txt
        * layout-tests/editing/selection/unrendered-003-expected.txt

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 14 Jul 2004 21:43:25 +0000 (21:43 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Change back to start() from caretPosition().
        Since the policy is now to move the selection to rendered content, if possible,
        when the selection is set, there is no longer any reason to have the additional
        caretPosition() function to store where the caret should be drawn.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): No longer any need to call closestRenderedPosition here.
        This is done in Selection::validate.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::closestRenderedPosition): Improved algorithm. Now much simpler.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): caretPosition() and m_caretPosition now obsolete.
        (DOM::Selection::init): Ditto.
        (DOM::Selection::modifyExtendingRightForward): No longer any need to call
        closestRenderedPosition here. This is done in Selection::validate.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::layoutCaret): Ditto.
        (DOM::Selection::validate): Add code to move the selection to rendered content if possible.
        * khtml/xml/dom_selection.h: caretPosition() and m_caretPosition now obsolete.

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

17 years agoAdd layout test for dynamic float/position change.
hyatt [Wed, 14 Jul 2004 21:01:37 +0000 (21:01 +0000)]
Add layout test for dynamic float/position change.

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

17 years ago Fix for 3716082, assert when you dynamically remove float or position styles.
hyatt [Wed, 14 Jul 2004 20:13:54 +0000 (20:13 +0000)]
Fix for 3716082, assert when you dynamically remove float or position styles.

        Reviewed by kevin

        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

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

17 years agonew layout test to cover percentage heights inside auto tables.
hyatt [Wed, 14 Jul 2004 19:56:18 +0000 (19:56 +0000)]
new layout test to cover percentage heights inside auto tables.

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

17 years ago Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com)...
hyatt [Wed, 14 Jul 2004 19:49:48 +0000 (19:49 +0000)]
Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com) involving bungling of
percentage heights.

        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcPercentageHeight):
        (RenderBox::availableHeightUsing):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (RenderTableCell::updateFromElement):
        * khtml/rendering/render_table.h:

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

17 years ago Reviewed by John
kocienda [Wed, 14 Jul 2004 19:48:59 +0000 (19:48 +0000)]
    Reviewed by John

        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
        Soon, I plan to land some changes that use this new function.
        * khtml/xml/dom_position.h:

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

17 years ago Reviewed by Vicki
kocienda [Wed, 14 Jul 2004 17:32:49 +0000 (17:32 +0000)]
    Reviewed by Vicki

        * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
        data formatting change that is to come.
        * WebCore-tests.exp:

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

17 years agoReviewed by mjs
kdecker [Wed, 14 Jul 2004 05:27:47 +0000 (05:27 +0000)]
Reviewed by mjs

  - Modified the test driver to spew out each test as it processes it.  This is such a good thing to see from a performance perspective because it illustrates which tests JavaScriptCore chokes heavily.

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

17 years ago - added a necessary support library for jsDriver.pl
kdecker [Wed, 14 Jul 2004 00:57:30 +0000 (00:57 +0000)]
 - added a necessary support library for jsDriver.pl

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

17 years ago*** empty log message ***
kdecker [Wed, 14 Jul 2004 00:38:38 +0000 (00:38 +0000)]
*** empty log message ***

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

17 years agoReviewed by mjs
kdecker [Tue, 13 Jul 2004 23:21:28 +0000 (23:21 +0000)]
Reviewed by mjs

- added support for the kjs engine type

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

17 years ago Reviewed by kocienda.
kdecker [Tue, 13 Jul 2004 23:00:39 +0000 (23:00 +0000)]
    Reviewed by kocienda.

- made testkjs and JavaScriptCore a subtarget of 'All'
- testkjs now builds in $SYMROOTS

        * JavaScriptCore.pbproj/project.pbxproj:

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

17 years ago Reviewed by Ken.
sullivan [Tue, 13 Jul 2004 21:50:53 +0000 (21:50 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3705500> REGRESSION (125.8-146): Cmd-E on an
        HTML page puts a trailing space on Find pasteboard

        * khtml/misc/khtml_text_operations.cpp:
        (khtml::TextIterator::handleTextBox):
        In the case where a subrun doesn't extend to the end of the text box,
        the well-commented code was supposed to return from this routine, but
        the wrong variable was being compared. This would send us through another
        pass of the loop, which would end up worrying about collapsed space at the
        end of the current box, even though we only cared about the beginning of the
        current box.

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

17 years ago Reviewed by Kevin.
mjs [Tue, 13 Jul 2004 06:40:36 +0000 (06:40 +0000)]
    Reviewed by Kevin.

<rdar://problem/3673988>: (REGRESSION(141-144): connection assertion failure at http://traffic.511.org/sfgate)

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
Don't check connection consistency if this load got cancelled
while finishing, because in this case we have cleared the
connection field already. This can happen when a redirect fires
from an onload handler.

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

17 years ago Reviewed by John.
mjs [Tue, 13 Jul 2004 00:26:18 +0000 (00:26 +0000)]
    Reviewed by John.

<rdar://problem/3632570>: (REGRESSION: SocialText.net wiki keeps asking for auth, even though pages load)

        * Misc.subproj/WebIconLoader.m:
        (-[WebIconLoader didReceiveAuthenticationChallenge:]): Ignore the challenge - we don't
want an auth panel for favicons.
        (-[WebIconLoader didCancelAuthenticationChallenge:]): Ignore cancel, since we are ignoring
the challenge.

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

17 years ago Fixed 3717982. Implemented navigator.language!
rjw [Mon, 12 Jul 2004 23:33:10 +0000 (23:33 +0000)]
Fixed 3717982.  Implemented navigator.language!

        Reviewed by John.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):

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

17 years agoReviewed by Dave
kdecker [Mon, 12 Jul 2004 23:01:08 +0000 (23:01 +0000)]
Reviewed by Dave

Added a layout test for css 'width:auto'

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

17 years agoBack out my changes to the fix for my previous checkin, since it broke the inline...
hyatt [Mon, 12 Jul 2004 22:58:42 +0000 (22:58 +0000)]
Back out my changes to the fix for my previous checkin, since it broke the inline-block layout test.

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

17 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 22:30:09 +0000 (22:30 +0000)]
    Reviewed by me

        Remove cvs conflict indicators from ChangeLog

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

17 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 22:29:20 +0000 (22:29 +0000)]
    Reviewed by Hyatt

        * khtml/xml/dom_position.cpp:
        (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
        function is now used in selection drawing, and it was making an unneeded check to see
        that content was editable to answer whether or not is was rendered. Bad. Fixed.

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

17 years ago Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects...
hyatt [Mon, 12 Jul 2004 22:26:57 +0000 (22:26 +0000)]
Fix for 3621138, crash on hrweb.apple.com.  Make sure that in the case where objects get pulled up from merging
blocks that we just delete all line boxes.

        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::removeChild):

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

17 years ago Reviewed by John.
mjs [Mon, 12 Jul 2004 22:03:21 +0000 (22:03 +0000)]
    Reviewed by John.

<rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
<rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)

        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (CGColorFromNSColor):
        (QPainter::drawEllipse):
        (QPainter::setShadow):

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

17 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 21:57:34 +0000 (21:57 +0000)]
    Reviewed by me

        Added new editing-related layout tests

        * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
        * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-001.html: Added.
        * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-002.html: Added.
        * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-003.html: Added.
        * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-004.html: Added.
        * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-005.html: Added.
        * layout-tests/traversal/node-iterator-008-expected.txt: Added.
        * layout-tests/traversal/node-iterator-008.html: Added.
        * layout-tests/traversal/tree-walker-005-expected.txt: Added.
        * layout-tests/traversal/tree-walker-005.html: Added.

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

17 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 21:51:02 +0000 (21:51 +0000)]
    Reviewed by Hyatt

        Fixes for these bugs:

        <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
        <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
        only in the special case. It was throwing its net too widely, catching the case described in 3724626.
        By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
        the bug is fixed.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
        to figure out the start and end positions for selection drawing.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
        (DOM::Position::equivalentDownstreamPosition): Ditto.
        (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
        (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
        Add check for this.
        (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
        The equivalence case is new, and fixes 3723359.

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

17 years agoFix the fast layout tests.
hyatt [Mon, 12 Jul 2004 20:13:10 +0000 (20:13 +0000)]
Fix the fast layout tests.

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

17 years ago Reviewed by Hyatt.
kdecker [Fri, 9 Jul 2004 23:50:20 +0000 (23:50 +0000)]
    Reviewed by Hyatt.

        fixes the width:auto problem in
        <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):

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

17 years ago Reviewed by me
kocienda [Fri, 9 Jul 2004 23:23:06 +0000 (23:23 +0000)]
    Reviewed by me

        Updated some layout test results.

        * layout-tests/editing/deleting/delete-image-004-expected.txt:
        * layout-tests/editing/selection/extend-by-character-006-expected.txt:

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

17 years agoWebCore:
cblu [Fri, 9 Jul 2004 21:24:00 +0000 (21:24 +0000)]
WebCore:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar

WebKit:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): don't use the DOM API since it doesn't exist on Jaguar, instead call the new domain method on the bridge

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 9 Jul 2004 18:31:01 +0000 (18:31 +0000)]
    Reviewed by Hyatt

        Some improvements to fix:

        <rdar://problem/3723111> Caret not drawn when selection set to unrendered content

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
        selected position is not rendered.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
        figure out whether to paint.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousCharacterPosition): Now correctly deals with a start
        position that is not rendered.
        (DOM::Position::nextCharacterPosition): Ditto.
        (DOM::Position::closestRenderedPosition): New helper.
        * khtml/xml/dom_position.h:
        (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
        after a caret layout. This may be different from start or end if start and end are not rendered.
        (DOM::Selection::init):
        (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Use new helpers to make this more readble.
        (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
        content.
        (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
        * khtml/xml/dom_selection.h:
        (DOM::Selection::caretPosition): New accessor.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.

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

17 years ago Reviewed by John
kocienda [Fri, 9 Jul 2004 17:40:10 +0000 (17:40 +0000)]
    Reviewed by John

        * Plugins.subproj/npruntime.h: Updated license to lawyer-approved
        joint Apple-Mozilla BSD-style license.

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

17 years ago Fix for the table layout test that failed because of a change in how innerText worke...
hyatt [Thu, 8 Jul 2004 22:54:49 +0000 (22:54 +0000)]
Fix for the table layout test that failed because of a change in how innerText worked.  We need to do
updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
that might otherwise be out of date.

        Reviewed by kocienda

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerText):

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

17 years ago Reviewed by Ken.
sullivan [Thu, 8 Jul 2004 21:31:58 +0000 (21:31 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
        now also extends selection (even if there wasn't one before)

        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventSingleClick):
        if there's a URL associated with the event, don't extend the selection

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

17 years ago Reviewed by Vicki
kocienda [Thu, 8 Jul 2004 21:08:03 +0000 (21:08 +0000)]
    Reviewed by Vicki

        Added some helper functions which provide strings to display in the
        Xcode debugger's variable inspector window. These functions are called
        from the LabyrinthDataFormatter debugger plugin I just checked in to
        the Labyrinth/Tools directory.

        Note that these functions are compiled in on Development builds only.

        * WebCore-combined.exp:
        * WebCore-tests.exp: Export all the formatForDebugger symbols so the
        debugger program can link with them.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::formatForDebugger):
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::formatForDebugger):
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::formatForDebugger):
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::formatForDebugger):
        * khtml/xml/dom_selection.h:
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::formatForDebugger):
        * khtml/xml/dom_textimpl.h:

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

17 years ago Reviewed by Vicki.
sullivan [Thu, 8 Jul 2004 21:01:38 +0000 (21:01 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/3721544> crash increasing font size;
        entrezeroetun.com (works in IE and Firefox)

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::updateFirstLetter):
        Check for nil originalString() before dereffing

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

17 years ago Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over...
cblu [Thu, 8 Jul 2004 20:49:12 +0000 (20:49 +0000)]
Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over plugin at manray-photo.com

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]): don't call NPP_GetValue unless the plug-in implements it

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

17 years ago Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari
cblu [Thu, 8 Jul 2004 20:28:24 +0000 (20:28 +0000)]
Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari

        Reviewed by kocienda.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage launchRealPlayer]): don't release a NULL appURL

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

17 years ago Fix for 3721453, CSS3 initial property caused crashes because the macros were not...
hyatt [Thu, 8 Jul 2004 20:22:01 +0000 (20:22 +0000)]
Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:

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

17 years ago Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page...
cblu [Thu, 8 Jul 2004 19:33:15 +0000 (19:33 +0000)]
Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page with JavaScript disabled

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.

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

17 years agochange the version number from '151' to '152u'
vicki [Thu, 8 Jul 2004 18:46:41 +0000 (18:46 +0000)]
change the version number from '151' to '152u'

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

17 years agoSafari-151 stamp!
vicki [Thu, 8 Jul 2004 18:38:17 +0000 (18:38 +0000)]
Safari-151 stamp!

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

17 years ago Fix for 3712133, crash from first-line pseudo-style use.
hyatt [Wed, 7 Jul 2004 23:24:25 +0000 (23:24 +0000)]
Fix for 3712133, crash from first-line pseudo-style use.

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement):
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::getPseudoStyle):

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

17 years ago 3719051 - Safari doesn't update form inputs when a page was refreshed by javascript...
trey [Wed, 7 Jul 2004 21:36:48 +0000 (21:36 +0000)]
3719051 - Safari doesn't update form inputs when a page was refreshed by javascript window.location
... and at least 5 other cases in Radar

Very similar problem to the Harvard PIN bug.  We need to be sure
to not carry any state over when we are processing a client
redirect, which reuses the same WebHistoryItem.

        Reviewed by John.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):  Comment
        (-[WebFrame _opened]):  Clear form and scroll state on client redirect.

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 7 Jul 2004 20:13:00 +0000 (20:13 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash

        The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
        Formerly, new TypingCommands would apply themselves (which was a no-op) and then
        do their action in some code a way different than other commands. This type of command
        application is different than for all other commands since TypingCommands can be coalesced.
        The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
        consequence of causing editing delegate notifications to be sent before the command
        has actually run. This change takes a small step towards making TypingCommandImpl function like
        other commands, where the command work is done in doApply. This makes the notification
        happen in the right order.

        * khtml/editing/htmlediting.cpp:
        (khtml::TypingCommand::TypingCommand):
        (khtml::TypingCommand::insertText):
        (khtml::TypingCommand::insertNewline):
        (khtml::TypingCommand::deleteKeyPressed):
        * khtml/editing/htmlediting.h:
        (khtml::TypingCommand::):
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::TypingCommandImpl):
        (khtml::TypingCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:

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

17 years ago Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported...
cblu [Tue, 6 Jul 2004 23:11:23 +0000 (23:11 +0000)]
Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported by Secunia, affects almost all browsers

        Reviewed by john, trey, kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): new method, return YES if the requesting frame is local, the target frame is an entire window or if the domain of the parent of the targeted frame equals this domain
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): call canTargetLoadInFrame: to make sure we can load the request
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto

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

17 years ago Reviewed by me
kocienda [Tue, 6 Jul 2004 22:18:06 +0000 (22:18 +0000)]
    Reviewed by me

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild): Added a better comment in the
        code I just checked in a few minutes ago.

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

17 years ago Reviewed by Hyatt
kocienda [Tue, 6 Jul 2004 22:07:11 +0000 (22:07 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
        due to non-0 exception code trying to insert a DIV markup string

        The solution was to revert to the code that was rolled out, and removing
        the child checks from NodeImpl::checkAddChild. However, this time, I added
        code very similar to this check into the code that runs while HTML is
        being parsed to build up tables. This code relies on child-add failure
        to ensure the proper construction of well-formed tables (as gross as that
        sounds), so the check needs to be retained there. No other code seems to
        be so affected. Layout tests are unchanged by this patch.

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::checkAddChild):

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