WebKit-https.git
15 years ago Reviewed by John.
darin [Fri, 4 Mar 2005 17:54:28 +0000 (17:54 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3965666> IDN spoofing vulnerability caused by Unicode characters that look like ASCII characters

        * Misc.subproj/WebNSURLExtras.m:
        (readIDNScriptWhiteListFile): Added. Reads file and parses script names.
        (readIDNScriptWhiteList): Added. Calls readIDNScriptWhiteList on each of the white list locations in succession.
        (allCharactersInIDNScriptWhiteList): Renamed from containsPossibleLatinLookalikes and changed sense.
        Now calls readIDNScriptWhiteList first time, and then uses the read-in list to check the scripts.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call allCharactersInIDNScriptWhiteList instead of
        containsPossibleLatinLookalikes.
        * Resources/IDNScriptWhiteList.txt: Added.
        * WebKit.pbproj/project.pbxproj: Added IDNScriptWhiteList.txt file.

        * Misc.subproj/WebKitLocalizableStrings.m: Removed. This is simply unused.
        * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

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

15 years ago Reviewed by John.
darin [Fri, 4 Mar 2005 17:37:26 +0000 (17:37 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3937667> REGRESSION (Mail): Zooming a window from titlebar button doesn't paint newly-exposed portions of window

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
        Re-set-up the visRect if the bounds changes due to layout.

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

15 years ago Reviewed by John
kocienda [Fri, 4 Mar 2005 17:18:27 +0000 (17:18 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor
        was failing to yield a position for a node just pasted into the document since a layout was needed
        for the calculation to come out right. Layout added. Crash gone.

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

15 years ago- made RenderText::caretRect handle BIDI text correctly in its calculations (3587614)
kali [Fri, 4 Mar 2005 08:58:20 +0000 (08:58 +0000)]
- made RenderText::caretRect handle BIDI text correctly in its calculations (3587614)

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

15 years agoversioning for TOT, Safari 2.0 (v402+). The tree is open.
vicki [Fri, 4 Mar 2005 07:45:05 +0000 (07:45 +0000)]
versioning for TOT, Safari 2.0 (v402+).  The tree is open.

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

15 years agoversioning for SUPanWheat, Safari 1.3 (v302)
vicki [Fri, 4 Mar 2005 07:38:08 +0000 (07:38 +0000)]
versioning for SUPanWheat, Safari 1.3 (v302)

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

15 years agoSafari-402 stamp
vicki [Fri, 4 Mar 2005 07:29:43 +0000 (07:29 +0000)]
Safari-402 stamp

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

15 years ago Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard...
cblu [Fri, 4 Mar 2005 01:22:40 +0000 (01:22 +0000)]
Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out

        Reviewed by harrison.

        * khtml/rendering/render_line.cpp:
        (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position.

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

15 years ago<rdar://problem/3991818> REGRESSION: Images scale while loading
jens [Fri, 4 Mar 2005 00:05:43 +0000 (00:05 +0000)]
<rdar://problem/3991818> REGRESSION: Images scale while loading

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

15 years ago Fix for 3841186, scrollbar shows up disabled when it should not appear at all. ...
hyatt [Thu, 3 Mar 2005 23:54:13 +0000 (23:54 +0000)]
Fix for 3841186, scrollbar shows up disabled when it should not appear at all.  Make sure updateScrollers
is never allowed to be re-entrant from any call point by moving the guard inside the function itself.

        Reviewed by John Sullivan

        * WebView.subproj/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView updateScrollers]):
        (-[WebDynamicScrollBarsView reflectScrolledClipView:]):

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

15 years ago Reviewed by John
kocienda [Thu, 3 Mar 2005 23:08:16 +0000 (23:08 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4035198> Pasting text with different styles does not get reproducible results

        I had a good idea yesterday to improve the way we "fixup" styles after
        pasting, but i chose a poor data structure to do it, a map of
        nodes-to-styles. In the fixup step, I iterated over the map elements and
        did the fixup. However, since the order in which the items would come
        out of the map is indeterminate, we got unpredictable results.

        So, the concept was good, but the implementation was flawed. I have
        fixed this mapping to be a list instead, so the order that nodes are
        evaluated in the fixup step is document order. This works nicely.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and
        styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class.
        (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle,
        function renamed from mapDesiredStyleForNode.
        Now accepts a QValueList<NodeDesiredStyle> in place of the old map.
        (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping.
        (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto.
        (khtml::NodeDesiredStyle::operator=): Ditto.
        (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle,
        function renamed from mapDesiredStyleForNode.
        (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in
        place of the old map.
        (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode.  Now operates on a
        QValueList<NodeDesiredStyle> in place of the old map.
        * khtml/editing/htmlediting.h:
        (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping.
        (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map.

        * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way.

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

15 years ago Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView...
cblu [Thu, 3 Mar 2005 01:13:06 +0000 (01:13 +0000)]
Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView's selection

        Reviewed by sullivan.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): call _selectionDraggingImage
        (-[WebHTMLView _selectionDraggingImage]): new SPI for Mail, factored from previous method
        (-[WebHTMLView _selectionDraggingRect]): new SPI for Mail
        * WebView.subproj/WebHTMLViewPrivate.h:

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

15 years ago Reviewed by Maciej.
darin [Thu, 3 Mar 2005 01:12:05 +0000 (01:12 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them

        * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since
        both have m_valueMatchesRenderer flags.
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away.
        (DOM::HTMLTextAreaElementImpl::detach): Ditto.

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

15 years ago Reviewed by Hyatt
kocienda [Thu, 3 Mar 2005 01:00:56 +0000 (01:00 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the
        function. In some situations, the render tree can get confused when we do this removal up front.
        I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and
        fixes the bug.

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

15 years agoRoll out two files I just checked in by accident.
darin [Thu, 3 Mar 2005 00:59:38 +0000 (00:59 +0000)]
Roll out two files I just checked in by accident.

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

15 years ago Reviewed by Maciej.
darin [Thu, 3 Mar 2005 00:58:35 +0000 (00:58 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8

        Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
        rather than relying on high level assumptions about which calls can and can't destroy the HTML element
        (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
        We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
        because this just avoids nil-dereferencing.

        * kwq/KWQButton.mm:
        (-[KWQButton becomeFirstResponder]):
        (-[KWQButton nextKeyView]):
        (-[KWQButton previousKeyView]):
        * kwq/KWQListBox.mm:
        (-[KWQTableView mouseDown:]):
        (-[KWQTableView becomeFirstResponder]):
        (-[KWQTableView numberOfRowsInTableView:]):
        (-[KWQTableView tableViewSelectionDidChange:]):
        (-[KWQTableView tableView:shouldSelectRow:]):
        (-[KWQTableView selectionShouldChangeInTableView:]):
        * kwq/KWQScrollBar.mm:
        (-[KWQScrollBar scroll:]):
        * kwq/KWQSlider.mm:
        (-[KWQSlider mouseDown:]):
        (-[KWQSlider slide:]):
        (-[KWQSlider becomeFirstResponder]):
        (-[KWQSlider nextKeyView]):
        (-[KWQSlider previousKeyView]):
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]):
        (-[KWQTextAreaTextView resignFirstResponder]):
        (-[KWQTextAreaTextView mouseDown:]):
        * kwq/KWQTextField.mm:
        (-[KWQTextFieldController action:]):
        (-[KWQTextFieldController controlTextDidEndEditing:]):
        (-[KWQTextFieldController controlTextDidChange:]):
        (-[KWQTextFieldController textView:didHandleEvent:]):
        (-[KWQTextFieldController setHasFocus:]):

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

15 years ago Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible...
rjw [Thu, 3 Mar 2005 00:38:24 +0000 (00:38 +0000)]
Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget

We were leaking inline block line boxes.  Argh!

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::dirtyLineBoxes):
        * khtml/rendering/render_line.cpp:
        (khtml::InlineBox::deleteLine):

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

15 years ago Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get...
cblu [Thu, 3 Mar 2005 00:31:22 +0000 (00:31 +0000)]
Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion
        (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar
        (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle  ivar
        (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style
        * khtml/editing/htmlediting.h:

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

15 years ago Reviewed by Darin.
mjs [Thu, 3 Mar 2005 00:30:32 +0000 (00:30 +0000)]
    Reviewed by Darin.

<rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb

* khtml/ecma/kjs_events.cpp:
(JSLazyEventListener::parseCode): If originalNode is NULL, don't
mess with the scope chain.

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are
delcared on body but set on the document, pass NULL to avoid
swizzling the scope chain. It turns out that this is what browsers
do, and it finesses the crash.

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

15 years ago Reviewed by Adele.
sullivan [Thu, 3 Mar 2005 00:10:41 +0000 (00:10 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/4023337> Safari stops loading any page (-[NSCFDictionary setObject:forKey:]:
        attempt to insert nil key)

        It is very likely that the exception being hit is caused by the same problem as WebFoundation
        bug 4018486. This change makes the code robust against this kind of problem regardless.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate saveResource]):
        Don't call addSubresource if newly-created resource is nil (but do assert on debug builds).
        Also assert that originalURL and MIMEType are not nil.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource addSubresource:]):
        Don't add nil subresource to dictionary, but do assert on debug builds.

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

15 years ago Reviewed by Ken.
harrison [Wed, 2 Mar 2005 22:59:29 +0000 (22:59 +0000)]
    Reviewed by Ken.

        <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply):

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

15 years agoFixed comment in ChangeLog.
rjw [Wed, 2 Mar 2005 22:05:49 +0000 (22:05 +0000)]
Fixed comment in ChangeLog.

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

15 years ago Reviewed by John
kocienda [Wed, 2 Mar 2005 20:58:48 +0000 (20:58 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style

        The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the
        style of these moved nodes. I have generalized some of the functions that compute and preserve styles
        for nodes and then apply these styles after a DOM operation.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function
        in place of old code that had this deref'ing inline.
        (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper
        function place of old code that had this style computation inline.
        (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name.
        (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed,
        or in place of pre-refactored inline code.
        (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized
        to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps,
        and that is needed to fix the bug.
        (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node
        and map this style to the given node in the given map. This function now also includes the code that was
        in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed.
        (khtml::derefNodesAndStylesInMap): Simple helper to deref map members.
        * khtml/editing/htmlediting.h:
        (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles.

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

15 years agomove changes for rdar://problem/4003774 and rdar://problem/3990258 above the Safari...
vicki [Wed, 2 Mar 2005 19:52:00 +0000 (19:52 +0000)]
move changes for rdar://problem/4003774 and rdar://problem/3990258 above the Safari-401 release marker -- neither of these changes are included in Safari-401

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 2 Mar 2005 17:12:49 +0000 (17:12 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
        check here after deleting all the content in the body element. The special "empty block"
        needs to add check for DOM children. A block may have straggling anonymous render children in
        some cases, and so the check needs to be (!DOM-kids || !render-kids).

        Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests
        got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin.

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 2 Mar 2005 17:08:53 +0000 (17:08 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
        check here after deleting all the content in the body element. The special "empty block"
        needs to add check for DOM children. A block may have straggling anonymous render children in
        some cases, and so the check needs to be (!DOM-kids || !render-kids).

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

15 years ago 2005-03-01 Ken Kocienda <kocienda@apple.com>
kocienda [Wed, 2 Mar 2005 17:04:57 +0000 (17:04 +0000)]
 2005-03-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

        Improved fix for this bug:

        <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML

        Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
        "last in block" situation. Remove special case for "downstream node is in different block" and handle
        this case with a little bit of special code in the general insertion case.

        Results studied to make sure there were no problems.

        * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
        * layout-tests/editing/inserting/insert-div-001-expected.txt
        * layout-tests/editing/inserting/insert-div-002-expected.txt
        * layout-tests/editing/inserting/insert-div-004-expected.txt
        * layout-tests/editing/inserting/insert-div-005-expected.txt
        * layout-tests/editing/inserting/insert-div-009-expected.txt
        * layout-tests/editing/inserting/insert-div-014-expected.txt
        * layout-tests/editing/inserting/insert-div-018-expected.txt
        * layout-tests/editing/inserting/insert-div-024-expected.txt
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt
        * layout-tests/editing/pasteboard/paste-text-013-expected.txt
        * layout-tests/editing/pasteboard/paste-text-015-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt

        New test:

        * layout-tests/editing/inserting/insert-div-027.html
        * layout-tests/editing/inserting/insert-div-027-expected.txt

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

15 years ago Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison...
hyatt [Wed, 2 Mar 2005 04:33:50 +0000 (04:33 +0000)]
Fix for 4030890, regression with <sup> on Google.  Fix some bogus != comparison checks in verticalPositionHint.

        Reviewed by John

        (RenderObject::getVerticalPosition):

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

15 years ago Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted...
cblu [Wed, 2 Mar 2005 03:38:43 +0000 (03:38 +0000)]
Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content

        Reviewed by rjw.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
        * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
        * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-001.html: Added.
        * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-002.html: Added.

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

15 years ago Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove...
rjw [Wed, 2 Mar 2005 02:17:59 +0000 (02:17 +0000)]
Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane

The string objects created by KWQHeaderStringFromDictionary() leaked.

        Reviewed by John Louch.

        * kwq/KWQLoader.mm:
        (KWQHeaderStringFromDictionary):

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

15 years ago<rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run
jens [Wed, 2 Mar 2005 01:38:17 +0000 (01:38 +0000)]
<rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run

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

15 years agoRe-checkin after previously backing out:
rjw [Wed, 2 Mar 2005 01:21:49 +0000 (01:21 +0000)]
Re-checkin after previously backing out:

Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari

The problem was due to incorrect "object truncation" in  RenderFlow::paintLines.
We attempt to push objects down if they don't fit on a page at
paint time.  If the attempt to push object down failed we just
didn't paint at all.

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLines):

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

15 years agoversioning for TOT, Safari 2.0 (401+) -- the tree is open!
vicki [Wed, 2 Mar 2005 01:18:02 +0000 (01:18 +0000)]
versioning for TOT, Safari 2.0 (401+) -- the tree is open!

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

15 years agoversioning for SUPanWheat, Safari 1.3 (v301)
vicki [Wed, 2 Mar 2005 01:12:02 +0000 (01:12 +0000)]
versioning for SUPanWheat, Safari 1.3 (v301)

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

15 years agoSafari-401 stamp
vicki [Wed, 2 Mar 2005 01:07:20 +0000 (01:07 +0000)]
Safari-401 stamp

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

15 years ago Backed out my patch since the tree was closed.
cblu [Wed, 2 Mar 2005 01:00:02 +0000 (01:00 +0000)]
Backed out my patch since the tree was closed.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData):
        * khtml/editing/jsediting.cpp:

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

15 years agoBacked out change. Tree is closed.
rjw [Wed, 2 Mar 2005 00:49:19 +0000 (00:49 +0000)]
Backed out change.  Tree is closed.

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

15 years ago Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans...
rjw [Wed, 2 Mar 2005 00:47:48 +0000 (00:47 +0000)]
Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari

The problem was due to incorrect "object truncation" in  RenderFlow::paintLines.
We attempt to push objects down if they don't fit on a page at
paint time.  If the attempt to push object down failed we just
didn't paint at all.

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLines):

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

15 years ago Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted...
cblu [Tue, 1 Mar 2005 23:26:37 +0000 (23:26 +0000)]
Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content

        Reviewed by rjw.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
        * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
        * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-001.html: Added.
        * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-002.html: Added.

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

15 years ago Reviewed by Vicki
kocienda [Tue, 1 Mar 2005 22:46:08 +0000 (22:46 +0000)]
    Reviewed by Vicki

        Fix for this bug:

        <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case.

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

15 years ago Reviewed by Vicki.
mjs [Tue, 1 Mar 2005 22:42:40 +0000 (22:42 +0000)]
    Reviewed by Vicki.

<rdar://problem/4003774> REGRESSION(125-181): JavaScript problems @ Yankee/Dixie quiz

Reworked how scopes are set up for event handlers to match other
browser. This includes the following changes:

- Special scope entries are set up at the time the event handler
is created, not at the time it fires.

- Special scope is only set up for event handlers set in the html
source through an html attribute, not for handlers set using
addEventHandler or setting JS properties like onclick through
JavaScript.

- Special scope is based on the DOM node on which the handler is
an attribute, not the event target.

This fixes the regression while allowing the fix to
<rdar://problem/3798453> (DIG: getting variable with same name as
DOM element attribute gets attribute value instead) to keep
working correctly.

* khtml/ecma/kjs_events.cpp:
        (JSEventListener::handleEvent):
        (JSLazyEventListener::JSLazyEventListener):
        (JSLazyEventListener::parseCode):
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::createHTMLEventHandler):
        * khtml/ecma/kjs_proxy.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::getJSLazyEventListener):
        * khtml/ecma/kjs_window.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseHTMLAttribute):
        (HTMLFrameElementImpl::parseHTMLAttribute):
        (HTMLFrameSetElementImpl::parseHTMLAttribute):
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::parseHTMLAttribute):
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLFormElementImpl::parseHTMLAttribute):
        (DOM::HTMLButtonElementImpl::parseHTMLAttribute):
        (DOM::HTMLInputElementImpl::parseHTMLAttribute):
        (DOM::HTMLLabelElementImpl::parseHTMLAttribute):
        (DOM::HTMLSelectElementImpl::parseHTMLAttribute):
        (DOM::HTMLTextAreaElementImpl::parseHTMLAttribute):
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseHTMLAttribute):
        * khtml/html/html_objectimpl.cpp:
        (HTMLObjectElementImpl::parseHTMLAttribute):
        * khtml/khtml_part.cpp:
        (KHTMLPart::createHTMLEventListener):
        * khtml/khtml_part.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLEventListener):
        * khtml/xml/dom_docimpl.h:

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

15 years ago Reviewed by Darin.
sullivan [Tue, 1 Mar 2005 22:27:42 +0000 (22:27 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3987482> Format>Style>Italic is not enabled when a
        compose window is empty (works in Blot)

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView becomeFirstResponder]):
        call _updateFontPanel here so NSFontManager knows the right font for the menu
        items and the font panel

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

15 years ago Reviewed by Chris.
harrison [Tue, 1 Mar 2005 21:53:55 +0000 (21:53 +0000)]
    Reviewed by Chris.

        <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _smartDeleteRangeForProposedRange:]):
        (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]):
        New.

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

15 years ago Reviewed by Chris.
harrison [Tue, 1 Mar 2005 21:53:44 +0000 (21:53 +0000)]
    Reviewed by Chris.

        <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
        (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]):
        New.

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

15 years ago Fixed: <rdar://problem/4030404> selection granularity should be set when extending...
cblu [Tue, 1 Mar 2005 21:15:05 +0000 (21:15 +0000)]
Fixed: <rdar://problem/4030404> selection granularity should be set when extending selection via JS

        Reviewed by kocienda.

        * khtml/ecma/kjs_window.cpp:
        (SelectionFunc::tryCall): set the granularity on the part. This will allow us to write smart paste layout tests.
        * layout-tests/editing/pasteboard/smart-paste-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-001.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-002-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-002.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-003-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-003.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-004-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-004.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-005-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-005.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-006-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-006.html: Added.
        * layout-tests/editing/pasteboard/smart-paste-007-expected.txt: Added.
        * layout-tests/editing/pasteboard/smart-paste-007.html: Added.

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

15 years ago Fixed: <rdar://problem/4029934> smart paste with plain text can add too many spaces
cblu [Tue, 1 Mar 2005 19:16:45 +0000 (19:16 +0000)]
Fixed: <rdar://problem/4029934> smart paste with plain text can add too many spaces

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): pass true for treatNBSPAsWhitespace to leadingWhitespacePosition and trailingWhitespacePosition
        * khtml/xml/dom_position.cpp:
        (DOM::isWS): take treatNBSPAsWhitespace param
        (DOM::Position::leadingWhitespacePosition): ditto
        (DOM::Position::trailingWhitespacePosition): ditto
        * khtml/xml/dom_position.h:

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

15 years ago Reviewed by John
kocienda [Tue, 1 Mar 2005 17:48:57 +0000 (17:48 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Look for the upstream-most block to insert after
        when at the visible end of a block. This helps to avoid some undesirable sequences of markup which
        Dave says will be vary hard to render. Changing the command in this way avoids the "limitations"
        of the render tree by not asking it to render markup we do not want to make anyway.

        All these tests change, but either in insignificant ways, or for the better.

        * layout-tests/editing/deleting/delete-3959464-fix-expected.txt:
        * layout-tests/editing/inserting/insert-div-001-expected.txt:
        * layout-tests/editing/inserting/insert-div-002-expected.txt:
        * layout-tests/editing/inserting/insert-div-004-expected.txt:
        * layout-tests/editing/inserting/insert-div-005-expected.txt:
        * layout-tests/editing/inserting/insert-div-009-expected.txt:
        * layout-tests/editing/inserting/insert-div-024-expected.txt:
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt:
        * layout-tests/editing/pasteboard/paste-text-013-expected.txt:
        * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
        * layout-tests/editing/style/block-style-004-expected.txt:
        * layout-tests/editing/style/block-style-005-expected.txt:
        * layout-tests/editing/style/block-style-006-expected.txt:
        * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
        * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
        * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
        * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:

        New test to check specific problem mentioned in the bug.

        * layout-tests/editing/inserting/insert-div-026-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-026.html: Added.

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

15 years ago Reviewed by Darin.
mjs [Tue, 1 Mar 2005 01:58:34 +0000 (01:58 +0000)]
    Reviewed by Darin.

<rdar://problem/4002864> REGRESSION(125-146) getElementById in onload fails in a test case involving external resources

Moved management of elementById hashtable from attach/detach to
insertedIntoDocument/removedFromDocument, to avoid being thrown
off by temporary detaches due to style recalcs.

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::insertedIntoDocument):
        (ElementImpl::removedFromDocument):
        (ElementImpl::attach):
        (ElementImpl::updateId):
        * khtml/xml/dom_elementimpl.h:

Make sure that insertedIntoDocument is called before firing any
DOM events.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::dispatchChildInsertedEvents):

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

15 years ago Fix for 4028999, safari crashes when resetting if mallocsribble is on. Clip rects...
hyatt [Tue, 1 Mar 2005 01:45:11 +0000 (01:45 +0000)]
Fix for 4028999, safari crashes when resetting if mallocsribble is on.  Clip rects were being cleared using dead
render objects.  Change the ordering.

        Reviewed by rjw

        * khtml/rendering/render_box.cpp:
        (RenderBox::detach):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::~RenderLayer):

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

15 years ago Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word...
cblu [Tue, 1 Mar 2005 00:49:14 +0000 (00:49 +0000)]
Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Call updateLayout so caretMinOffset and caretMaxOffset return correct values.

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

15 years agoWebCore:
sullivan [Tue, 1 Mar 2005 00:07:16 +0000 (00:07 +0000)]
WebCore:

        Reviewed by Ken.

        - WebCore part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links
        on frameset page gets stuck at end (tivofaq.com)

        * kwq/WebCoreBridge.h:
        add nextValidKeyViewOutsideWebFrameViews (code is in WebKit)

WebKit:

        Reviewed by Ken.

        - WebKit part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links
        on frameset page gets stuck at end (tivofaq.com)

        This tab-to-links stuff has been in shaky condition ever since AppKit futzed with
        tabbing behavior in Tiger to add support for including the toolbar in the key loop.
        I made some changes months ago to compensate for that, but some cases, such as this
        one, still weren't fixed.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge _nextKeyViewOutsideWebFrameViewsWithValidityCheck:]):
        new bottleneck method, extracted from nextKeyViewOutsideWebFrameViews; handles
        nextKeyView or nextValidKeyView depending on parameter.
        (-[WebBridge nextKeyViewOutsideWebFrameViews]):
        now calls extracted method
        (-[WebBridge nextValidKeyViewOutsideWebFrameViews]):
        new method, calls new bottleneck method

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView nextValidKeyView]):
        when we're stuck at the end of a nextKeyView chain inside a nexted frame, use
        nextValidKeyViewOutsideWebFrameViews. Make sure we don't end up looking inside
        the web frame views while doing this.

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

15 years ago Reviewed by John
kocienda [Mon, 28 Feb 2005 23:43:26 +0000 (23:43 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor

        * khtml/css/css_computedstyle.cpp: inheritableProperties array now defined in css_valueimpl.cpp.
        * khtml/css/css_valueimpl.cpp: Define inheritableProperties array here.
        (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Use new name for blockProperties, and use the new
        constant for the number of items in the array.
        (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto.
        (DOM::CSSMutableStyleDeclarationImpl::removeInheritableProperties): New function.
        * khtml/css/css_valueimpl.h: Declare inheritableProperties array and numInheritableProperties extern so they
        can be defined in css_valueimpl.cpp and used in css_computedstyle.cpp.
        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::removeStyleNodes): This code was misguided, and removed too much style from HTML
        elements. Now, it removes from HTML elements only the styles that we replace later with a call to applyStyle().
        Also, add ID_B to list of inline "style" nodes we are willing to remove. Leaving it off was an oversight.

        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: ID_B fix made this result change, without any
        visible change in the test.

        New test:

        * layout-tests/editing/style/smoosh-styles-003.html
        * layout-tests/editing/style/smoosh-styles-003-expected.txt

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

15 years ago Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore:...
rjw [Mon, 28 Feb 2005 23:10:43 +0000 (23:10 +0000)]
Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore: -[KWQPageState invalidate] + 32

Added more nil checking and ASSERTS.
Without a reproducible case this is hard to definitively resolve.

        Reviewed by John Sullivan.

        * kwq/KWQPageState.mm:
        (-[KWQPageState invalidate]):

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

15 years ago Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safar...
rjw [Mon, 28 Feb 2005 22:51:25 +0000 (22:51 +0000)]
Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safari-400

I inadvertently checked in some debugging code that disabled
style sharing.  Backed out that change.

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

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

15 years ago Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari
cblu [Mon, 28 Feb 2005 21:16:54 +0000 (21:16 +0000)]
Fixed: <rdar://problem/4026639> bmw.ca configurator does not work with Safari

        Reviewed by john.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child

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

15 years ago Reviewed by Chris
kocienda [Mon, 28 Feb 2005 17:51:12 +0000 (17:51 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/4026906> Paste of HTML table content can break table structure

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::pruneEmptyNodes): Call new isProbablyTableStructureNode() function to prevent
        removal of empty table structure nodes.
        (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto.
        (khtml::isProbablyTableStructureNode): New helper function.
        * khtml/editing/htmlediting.h: Declare new helper.

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

15 years ago Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragme...
cblu [Mon, 28 Feb 2005 17:11:26 +0000 (17:11 +0000)]
Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): ref and deref the element while it is "floating"
        (khtml::ReplacementFragment::insertFragmentForTestRendering): ditto
        (khtml::floatRefdElement): new, keeps an element alive while its ref count is 0
        (khtml::createDefaultParagraphElement): removed commented out code
        (khtml::createBlockPlaceholderElement): ref the element and return it as "floating"
        (khtml::createFontElement): ditto
        (khtml::createStyleSpanElement): ditto
        * khtml/editing/htmlediting.h:

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

15 years ago Reviewed by Vicki.
mjs [Mon, 28 Feb 2005 04:21:39 +0000 (04:21 +0000)]
    Reviewed by Vicki.

<rdar://problem/3993557> REGRESSION (125-180-ish): getElementsByTagName no longer works with namespace designations

* khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::getElementsByTagNameNS): When no namespace is specified, find elements
of the specified name in any namespace to match Mozilla and earlier Safari behavior.

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

15 years ago Reviewed by Adele.
darin [Sat, 26 Feb 2005 01:41:13 +0000 (01:41 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/4025618> Crash while searching at hollywoodvideo.com

        * khtml/html/html_formimpl.h: Added valueWithDefault.
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::appendFormData): Call valueWithDefault instead of going at the render object
        to try to get the default value; there may be no render object if this is display:none.
        (DOM::HTMLInputElementImpl::valueWithDefault): Added. Knows about the defaults for "submit" and "reset"
        buttons; otherwise just returns the value as-is.

        * khtml/rendering/render_form.h: Removed the defaultLabel member functions.
        * khtml/rendering/render_form.cpp:
        (RenderSubmitButton::rawText): Call valueWithDefault instead of using defaultLabel function here on
        the render side. The DOM needs to know how to deal with the default anyway for form submission.
        (RenderSubmitButton::defaultLabel): Removed.
        (RenderResetButton::defaultLabel): Removed.
        (RenderPushButton::defaultLabel): Removed.

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

15 years agoWebCore:
darin [Sat, 26 Feb 2005 01:03:45 +0000 (01:03 +0000)]
WebCore:

        Reviewed by John.

        - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus

        * kwq/KWQKHTMLPart.h: Added setWindowHasFocus function and m_windowHasFocus data member.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): Took out the code that sends the focus and blur events.
        (KWQKHTMLPart::setWindowHasFocus): Put that code here instead.

        * kwq/WebCoreBridge.h: Added setWindowHasFocus: method to the bridge.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge setWindowHasFocus:]): Added. Calls method on the part.

WebKit:

        Reviewed by John.

        - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView updateFocusState]): Renamed from updateFocusDisplay. Added call to setWindowHasFocus: method.
        (-[WebHTMLView viewDidMoveToWindow]): Call method by new name.
        (-[WebHTMLView windowDidBecomeKey:]): Ditto.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView becomeFirstResponder]): Ditto.
        (-[WebHTMLView resignFirstResponder]): Ditto.

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

15 years ago Reviewed by John.
darin [Sat, 26 Feb 2005 00:43:58 +0000 (00:43 +0000)]
    Reviewed by John.

        - re-fixed <rdar://problem/3665430> horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode

        * kwq/KWQTextArea.mm: (-[KWQTextArea _updateTextViewWidth]): Don't change the text view width
        to match the text area's width in the "wrap" case.

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

15 years ago Reviewed by Hyatt
kocienda [Fri, 25 Feb 2005 23:51:01 +0000 (23:51 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4021518> 8A394 Mail crashes during paste: khtml::RootInlineBox::closestLeafChildForXPos

        * khtml/editing/visible_units.cpp:
        (khtml::previousLinePosition): Adding an updateLayout call at the start of the function fixes the crash, since
        we caught line boxes in a not-completely-updated state.
        (khtml::nextLinePosition): Ditto.

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

15 years ago Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is...
hyatt [Fri, 25 Feb 2005 23:49:20 +0000 (23:49 +0000)]
Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is triggered when large
DOM subtrees are inserted into documents via one insert/append call.

        Reviewed by kocienda

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::nextRenderer):

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

15 years ago Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled corre...
rjw [Fri, 25 Feb 2005 23:41:39 +0000 (23:41 +0000)]
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

Second pass at fixing 3382926 w/o causing layout regressions.  Same concept:
if directionality of text's element is RTL and first character has neutral directionality
then set the initial directionality to RTL.

        Reviewed by Hyatt.

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::bidiReorderLine):
        (khtml::RenderBlock::determineStartPosition):

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

15 years agoversioning for TOT, Safari 2.0 (400+)
vicki [Fri, 25 Feb 2005 22:16:51 +0000 (22:16 +0000)]
versioning for TOT, Safari 2.0 (400+)

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

15 years agoSafari 1.3 (300) stamp, for 10.3 Panther
vicki [Fri, 25 Feb 2005 22:10:57 +0000 (22:10 +0000)]
Safari 1.3 (300) stamp, for 10.3 Panther

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

15 years agoSafari-400 stamp
vicki [Fri, 25 Feb 2005 22:05:51 +0000 (22:05 +0000)]
Safari-400 stamp

This is our first build with the new versioning scheme.  Versions are Safari 2.0 (400) on 10.4, and Safari (1.3) 300 for 10.3.  See this bug for details:

<rdar://problem/3962707> upgrade install of Tiger over SUPanWheat leaves Panther version of WebKit (need new version numbering scheme)

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

15 years ago Reviewed by me
kocienda [Fri, 25 Feb 2005 21:33:09 +0000 (21:33 +0000)]
    Reviewed by me

        Roll out Chris' change to fix this bug:

        <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        That code change is responsible for all these new crashers:

        <rdar://problem/4025177> crash copying safari.apple.com into Blot document
        <rdar://problem/4025184> crash in DOM::NodeImpl::parentNode copying "New!" from google.com to Blot
        <rdar://problem/4025214> crash in DOM::NodeImpl::getRect loading paste-match-style-001.html

        Since we wish to close the tree for a build right now, I am rolling out rather than investigating.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded)
        (khtml::ReplacementFragment::insertFragmentForTestRendering)
        (khtml::createDefaultParagraphElement)
        (khtml::createBlockPlaceholderElement)
        (khtml::createFontElement)
        (khtml::createStyleSpanElement)
        * khtml/editing/htmlediting.h

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

15 years ago Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi...
rjw [Fri, 25 Feb 2005 20:54:19 +0000 (20:54 +0000)]
Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi-voiced characters strangely (characters don't seem to be composed)

Added special case for voiced marks.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (widthForNextCharacter):

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

15 years ago Reviewed by John
kocienda [Fri, 25 Feb 2005 19:42:18 +0000 (19:42 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4020108> Pasting text into message makes Mail crash reproducibly

        Note that, even with this fix, development build will crash until this bug is fixed:
        <rdar://problem/4024996> Applying block styles can cause assertion failure in inline style removal

        This will not crash deployment builds, so I am going to land.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyBlockStyle): Applying block styles can make the loop to reach beyondEnd
        fail since the structure of the document can change. Cache the next node first before operating on it,
        as we do elsewhere.

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

15 years ago - recommit this change, since rolling it out did NOT fix the performance regression!
vicki [Fri, 25 Feb 2005 19:38:59 +0000 (19:38 +0000)]
- recommit this change, since rolling it out did NOT fix the performance regression!

    2005-02-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves

        The key was to change things around so that we don't push text from the DOM to the widget
        unless the DOM has actually been changed. This prevents the code path that wipes out inline input
        during the blur process.

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
        new value is set here.
        (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
        is set here.
        (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
        to true, and also sends out the input event. It's better to have this here than in the renderer code.
        (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
        m_dirtyvalue) and m_valueMatchesRenderer as false.
        (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
        the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
        where the value came from.
        (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
        (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
        (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.

        * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
        and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
        by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
        is true.
        (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
        directly.
        (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
        (RenderTextArea::handleFocusOut): Ditto.
        (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
        DOM if valueMatchesRenderer is true.
        (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.

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

15 years ago Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragme...
cblu [Fri, 25 Feb 2005 19:34:52 +0000 (19:34 +0000)]
Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        Reviewed by darin.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
        (khtml::ReplacementFragment::insertFragmentForTestRendering):
        (khtml::floatRefdElement):
        (khtml::createDefaultParagraphElement):
        (khtml::createBlockPlaceholderElement):
        (khtml::createFontElement):
        (khtml::createStyleSpanElement):
        * khtml/editing/htmlediting.h:

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

15 years ago Reviewed by John.
darin [Fri, 25 Feb 2005 18:48:12 +0000 (18:48 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4019823> Seed: Control-Y doesn't work

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Call _handleKillRing
        after setting the selection, since it uses the selection to get the text.
        (-[WebHTMLView _insertText:selectInsertedText:]): Check for empty string to avoid an assertion
        on the other side of the bridge when you yank the empty string.

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

15 years ago * kwq/character-sets.txt: Checked in updated file. This new file has no effec...
darin [Fri, 25 Feb 2005 18:38:08 +0000 (18:38 +0000)]
    * kwq/character-sets.txt: Checked in updated file. This new file has no effect, because none of the
        changes affect character sets that we support, but it's good to have the latest file in here, and
        completely safe because I checked that the generated files have not changed.

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

15 years ago Reviewed by Darin.
vicki [Fri, 25 Feb 2005 18:36:44 +0000 (18:36 +0000)]
    Reviewed by Darin.

- back out this change, since it causes a 3.5% performance regression

    2005-02-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves

        The key was to change things around so that we don't push text from the DOM to the widget
        unless the DOM has actually been changed. This prevents the code path that wipes out inline input
        during the blur process.

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
        new value is set here.
        (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
        is set here.
        (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
        to true, and also sends out the input event. It's better to have this here than in the renderer code.
        (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
        m_dirtyvalue) and m_valueMatchesRenderer as false.
        (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
        the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
        where the value came from.
        (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
        (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
        (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.

        * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
        and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
        by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
        is true.
        (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
        directly.
        (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
        (RenderTextArea::handleFocusOut): Ditto.
        (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
        DOM if valueMatchesRenderer is true.
        (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.

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

15 years ago Reviewed by Chris.
darin [Fri, 25 Feb 2005 18:29:40 +0000 (18:29 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced

        * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply):
        Use the insertNodeAfterAndUpdateNodesInserted and insertNodeBeforeAndUpdateNodesInserted
        functions to add the leading and trailing spaces for smart paste.

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

15 years ago Back out fix for 3382926, since it breaks LTR text inside RTL contexts.
hyatt [Fri, 25 Feb 2005 17:43:16 +0000 (17:43 +0000)]
Back out fix for 3382926, since it breaks LTR text inside RTL contexts.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::direction):

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

15 years ago Fix for 3975039, scrolling is slow in huge RSS views. Optimize the calculation...
hyatt [Fri, 25 Feb 2005 17:33:10 +0000 (17:33 +0000)]
Fix for 3975039, scrolling is slow in huge RSS views.  Optimize the calculation of clip rects for overflow:hidden
layers.  Also optimize layer movement when scrolling overflow sections.

        Reviewed by darin

        * khtml/rendering/render_layer.cpp:
        (throw):
        (ClipRects::operator delete):
        (ClipRects::detach):
        (RenderLayer::RenderLayer):
        (RenderLayer::~RenderLayer):
        (RenderLayer::updateLayerPosition):
        (RenderLayer::removeOnlyThisLayer):
        (RenderLayer::insertOnlyThisLayer):
        (RenderLayer::scrollToOffset):
        (RenderLayer::hitTest):
        (RenderLayer::calculateClipRects):
        (RenderLayer::calculateRects):
        (RenderLayer::containsPoint):
        (RenderLayer::clearClipRects):
        (RenderLayer::clearClipRect):
        * khtml/rendering/render_layer.h:
        (khtml::ClipRects::m_refCnt):
        (khtml::ClipRects::overflowClipRect):
        (khtml::ClipRects::fixedClipRect):
        (khtml::ClipRects::posClipRect):
        (khtml::ClipRects::ref):
        (khtml::ClipRects::deref):
        (khtml::RenderLayer::clipRects):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

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

15 years ago Reviewed by Darin and Dave a while ago.
mjs [Fri, 25 Feb 2005 03:41:55 +0000 (03:41 +0000)]
    Reviewed by Darin and Dave a while ago.

<rdar://problem/3996685> REGRESSION: Crash in KWQVectorImpl::at loading http://maps.google.com/mapfiles/homepanel.xsl

* kwq/WebCoreBridge.mm:
        (formElementFromDOMElement): Check for isHTMLElement() as well as
id() == ID_FORM. This seems like an impossible situation, but
papering over it seems more expedient for the time being.

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

15 years agoFixed panther build problem.
rjw [Fri, 25 Feb 2005 01:33:07 +0000 (01:33 +0000)]
Fixed panther build problem.

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

15 years agoWebCore
rjw [Fri, 25 Feb 2005 00:50:27 +0000 (00:50 +0000)]
WebCore
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

Use mirror characters correctly when rendering with RTL directionality.

        Reviewed by Hyatt.

        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::direction):

WebKit
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

If directionality is specified use that as initial directionality,
rather than neutral directionality.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (widthForNextCharacter):

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

15 years ago Reviewed by Chris.
adele [Fri, 25 Feb 2005 00:33:01 +0000 (00:33 +0000)]
    Reviewed by Chris.

        Fix for <rdar://problem/4023393> Safari crashed in khtml::RenderObject::repaintAfterLayoutIfNeeded(QRect const&, QRect const&)

        We were crashing after hitting PageDown when viewing a pdf because
        WebKit was calling over to WebCore to scroll overflow areas.
        Since this only needs to be done if we're dealing with a WebHTMLView,
        I added a wrapper function to check the documentView before calling
        over to WebCore.

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _scrollOverflowInDirection:granularity:]): added wrapper function that checks if documentView is a WebHTMLView
        (-[WebFrameView scrollToBeginningOfDocument:]): uses new wrapper function now
        (-[WebFrameView scrollToEndOfDocument:]): uses new wrapper function now
        (-[WebFrameView _pageVertically:]): uses new wrapper function now
        (-[WebFrameView _pageHorizontally:]): uses new wrapper function now
        (-[WebFrameView _scrollLineVertically:]): uses new wrapper function now
        (-[WebFrameView _scrollLineHorizontally:]): uses new wrapper function now

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

15 years agoWebCore:
rjw [Fri, 25 Feb 2005 00:25:12 +0000 (00:25 +0000)]
WebCore:
Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame

        Reviewed by Hyatt.

        * WebCore.pbproj/project.pbxproj:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageLoader::updateFromElement):
        * khtml/rendering/render_image.cpp:
        (RenderImage::resetAnimation):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::setStyle):
        (RenderListMarker::paint):
        * khtml/rendering/render_list.h:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:

WebKit:
Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData resetAnimation]):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer resetAnimation]):
        (-[WebInternalImage resetAnimation]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):

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

15 years ago Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a www...
cblu [Fri, 25 Feb 2005 00:00:43 +0000 (00:00 +0000)]
Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a zoomerang.com survey

        Reviewed by rjw.

        * kwq/KWQResourceLoader.mm:
        (-[KWQResourceLoader finishJobAndHandle:]): clear the job after we've deleted to avoid reentrancy

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

15 years ago Reviewed by John.
kdecker [Thu, 24 Feb 2005 23:07:44 +0000 (23:07 +0000)]
    Reviewed by John.

Fixed <rdar://problem/3962401> Don't load multipart/x-mixed-replace content to prevent memory leak

Since we're not going to fix <rdar://problem/3087535> for Tiger, we should not load multipart/x-mixed-replace content.  Pages with such content contain what is essentially an infinite load and therefore may leak.

        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]):  Disabled loading of multipart/x-mixed-replace content until we fully implement server side push.
      * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didReceiveResponse:]): Ditto. Same exact thing for sub resources.

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

15 years ago Reviewed by Vicki.
darin [Thu, 24 Feb 2005 22:35:46 +0000 (22:35 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/4023360> REGRESSION (186-187): image file upload is broken at pep.apple.com

        * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Return true after
        setting up the form data for an uploaded file. The old code would fall through to the ISINDEX
        case and send double form data (the filename instead of the file contents the second time).

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

15 years ago Reviewed by Ken.
harrison [Thu, 24 Feb 2005 22:17:27 +0000 (22:17 +0000)]
    Reviewed by Ken.

        <rdar://problem/3990849> AX: textMarkerRange for an AXUIElement within an AXWebArea

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject textMarkerRange]):
        (-[KWQAccObject accessibilityParameterizedAttributeNames]):
        (-[KWQAccObject doAXTextMarkerRangeForUIElement:]):
        (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
        Added AXTextMarkerRangeForUIElement, or you can send textMarkerRange to the UIElement itself.

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

15 years ago Reviewed by Vicki.
harrison [Thu, 24 Feb 2005 21:28:58 +0000 (21:28 +0000)]
    Reviewed by Vicki.

        <rdar://problem/4004279> 3 AXSelectedTextChanged notifications are firing each time I type a character

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection):
        Send notification only if the selection is not null.  This safely ignores transitory selections set during editing.

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

15 years ago Reviewed by John.
darin [Thu, 24 Feb 2005 17:59:39 +0000 (17:59 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3987619> in some cases, text doesn't resize with Format->Style->Bigger/Smaller

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): Only call nodeFullySelected for non-text nodes.
        Text nodes are already split so they're either in the range and full selected or out of the range.
        And nodeFullySelected doesn't work for text nodes.
        (khtml::ApplyStyleCommand::nodeFullySelected): Add an assertion, since this function only works for elements,
        not text nodes.
        (khtml::ApplyStyleCommand::nodeFullyUnselected): Ditto.

        - make big improvement in <rdar://problem/3953636> Mail hung for ~10sec changing font of 84328 characters: khtml::ApplyStyleCommand::nodeFullySelected

        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): Improve algorithm based on suggestion
        from Nate Begeman.

        - fixed <rdar://problem/4020305> REGRESSION (185-186): loading image in new window using document.write fails

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): If there is no parent document, don't blow away the base URL.

        - fixed <rdar://problem/4021701> REGRESSION (188-188+): form not submitted after pressing <return> at http://hrweb.apple.com

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchMouseEvent): Send activate event in the case where the event
        sent is a KHTML_CLICK_EVENT, not CLICK_EVENT.

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

15 years ago Reviewed by mjs
kdecker [Thu, 24 Feb 2005 15:30:03 +0000 (15:30 +0000)]
    Reviewed by mjs

        Fixed <rdar://problem/4020747> REGRESSION: stray </applet> tags crash Safari

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::processCloseTag):  Made a typesafe check that prevents crashes
        whenever there is a closing applet tag without an actual <applet> in the first place.
        Now verifies the current token is ID_APPLET before casting it to an HTMLAppletElementImpl.

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

15 years ago Reviewed by John
kocienda [Thu, 24 Feb 2005 00:35:01 +0000 (00:35 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3977962> font loses bold style after pasting next to existing text and pressing return

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Problem here was
        that we were doing work in cases where we should not, and content whose style would have
        been correct if we had done nothing was getting clobbered. It turns out that extra work
        to apply style to the new paragraph added in this command only needs to be done if we're
        at the boundaries of a paragraph. Otherwise, content that is moved as part of the work
        of the command will lend their styles to the new paragraph without any extra work needed.
        So, make this position check and return unless at a paragraph boundary.

        New test:

        * layout-tests/editing/style/block-styles-007-expected.txt
        * layout-tests/editing/style/block-styles-007.html

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

15 years ago Reviewed by Ken.
sullivan [Wed, 23 Feb 2005 22:59:33 +0000 (22:59 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for
        shift-tab on tivofaq doing the wrong thing

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView becomeFirstResponder]):
        If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
        look out of the box and get the previousValidKeyView of our webview.

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 23 Feb 2005 22:11:16 +0000 (22:11 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4017641> REGRESSION (Mail): you can only bold/unbold a selection starting from end of line once

        Problem is with the way we figure out whether to add or remove a style based on
        the current selection. In this case, the code is looking at the end of the
        previous line, which is not bold, and deduces incorrectly that the operation is
        a "make bold". Then the style code runs to make bold, but there is nothing on
        the end of the previous line to embolden, so we get into a cycle where the same
        thing happens each time cmd-b is hit.

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectionComputedStyle):  Call editingStartPosition() to get the right position for the font determination.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::editingStartPosition): New helper function that "does the right thing" based on whether the
        selection is a caret or a range, moving upstream for the former, and downstream for the latter.
        * khtml/xml/dom2_rangeimpl.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::fontForSelection): Call editingStartPosition() to get the right position for the font determination.

        New tests:

        * layout-tests/editing/style/style-boundary-001-expected.txt
        * layout-tests/editing/style/style-boundary-001.html
        * layout-tests/editing/style/style-boundary-002-expected.txt
        * layout-tests/editing/style/style-boundary-002.html
        * layout-tests/editing/style/style-boundary-003-expected.txt
        * layout-tests/editing/style/style-boundary-003.html
        * layout-tests/editing/style/style-boundary-004-expected.txt
        * layout-tests/editing/style/style-boundary-004.html

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

15 years ago Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click...
rjw [Wed, 23 Feb 2005 22:04:12 +0000 (22:04 +0000)]
Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click remove to remove single char ticker symbol

Explicitly remove scroll bar views when removing them from
the overflow.

Don't paint synchronously when the scroll position changes,
this caused funky clip problems.

        Reviewed by Hyatt.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::scrollToOffset):
        (RenderLayer::setHasHorizontalScrollbar):
        (RenderLayer::setHasVerticalScrollbar):
        (RenderLayer::updateScrollInfoAfterLayout):

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 23 Feb 2005 21:38:20 +0000 (21:38 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3959996> REGRESSION (Mail): cursor moves to beginning of document when click is past end

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Skip blocks that are invisible or have no height when
        looking for a child to pass off to. And save away the last visible block with a height to pass off
        to if there is no child at the right y-coordinate.

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

15 years ago Reviewed by Darin.
harrison [Wed, 23 Feb 2005 21:25:11 +0000 (21:25 +0000)]
    Reviewed by Darin.

        <rdar://problem/4010059> BoundsForTextMarkerRange does not update with scrolled web area

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
        Adjust for scrolling.

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

15 years ago Reviewed by Ken.
mjs [Wed, 23 Feb 2005 20:22:59 +0000 (20:22 +0000)]
    Reviewed by Ken.

<rdar://problem/3949790> hitting return after pasted styled line results in extra content getting the style

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): In the case
where the start block is the root, insert the newly created DIV at
the end of the root block instead of after the last sibling in the
start node, since the start node could be inside other
style-affecting nodes and we don't want to reparent its cousins
into that.

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

15 years ago Reviewed by Vicki.
harrison [Wed, 23 Feb 2005 20:09:17 +0000 (20:09 +0000)]
    Reviewed by Vicki.

        <rdar://problem/4014691> switch to correctly spelled NSAccessibilityForegroundColorTextAttribute constant

        Also removed two older, now unneeded, wrappers.

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
        (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
        Removed these older, now unneeded, wrappers.

        (NSAccessibilityForegroundColorTextAttributeWrapper):
        New wrapper for NSAccessibilityForegroundColorTextAttribute.

        (AXAttributeStringSetStyle):
        Use NSAccessibilityForegroundColorTextAttributeWrapper.

        (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
        Remove uses of visiblePositionForStartOfTextMarkerRange and visiblePositionForEndOfTextMarkerRange.

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

15 years ago Reviewed by Vicki.
harrison [Wed, 23 Feb 2005 19:07:53 +0000 (19:07 +0000)]
    Reviewed by Vicki.

        <rdar://problem/3524784> AX hit test doesn't return info when done in empty space of content area

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject accessibilityHitTest:]):
        Return unignored object.

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

15 years ago Reviewed by Hyatt.
darin [Wed, 23 Feb 2005 19:06:56 +0000 (19:06 +0000)]
    Reviewed by Hyatt.

        - fixed <rdar://problem/4010196> REGRESSION (125-186+): 8-character timestamps in gmail wrap to 2 lines (width:8ex; font-size:80%)

        * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer xHeight]): Return the maximum
        of the "x" height and width. Comment in the code explains why in more detail.

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