WebKit-https.git
15 years ago Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
hyatt [Tue, 4 Jan 2005 22:34:43 +0000 (22:34 +0000)]
Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.

        Reviewed by john

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement):
        * kwq/KWQLineEdit.mm:
        (QLineEdit::setPlaceholderString):

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

15 years ago Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not...
hyatt [Tue, 4 Jan 2005 20:08:21 +0000 (20:08 +0000)]
Fix for 3830936, hang on changeforamerica.com.  Make sure to ignore the style not yet available option when
returning pseudo-styles.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::matchRulesForList):
        (khtml::CSSStyleSelector::pseudoStyleForElement):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::addPseudoStyle):

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

15 years ago - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
darin [Tue, 4 Jan 2005 19:12:41 +0000 (19:12 +0000)]
    - rolled out my custom tag name change again -- it caused a 1 ms PLT regression

        * khtml/css/cssstyleselector.cpp:
        * khtml/editing/htmlediting.cpp:
        * khtml/editing/selection.cpp:
        * khtml/editing/visible_position.cpp:
        * khtml/html/dtd.cpp:
        * khtml/html/htmlparser.cpp:
        * khtml/html/htmlparser.h:
        * khtml/html/htmltokenizer.cpp:
        * khtml/misc/htmlhashes.cpp:
        * khtml/misc/htmlhashes.h:
        * khtml/misc/htmltags.c:
        * khtml/misc/htmltags.h:
        * khtml/misc/maketags:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_position.cpp:
        * kwq/KWQRenderTreeDebug.cpp:

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

15 years ago Reviewed by John
kocienda [Tue, 4 Jan 2005 18:35:11 +0000 (18:35 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
        a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
        to be applied. Now the code will detect when at the end of a style run and will not move and apply
        that ending style to the new paragraph, though it will place that style into the typing style. This
        seems to match NSText behavior.
        * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
        here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
        not have any visible effect on the document.
        * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-022.html: Added.

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

15 years ago Fix for 3904562, make sure to clear the outline dictionary when drawing so that...
hyatt [Tue, 4 Jan 2005 18:11:55 +0000 (18:11 +0000)]
Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
all over the place.

        Reviewed by john

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

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

15 years ago Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint...
hyatt [Tue, 4 Jan 2005 06:04:37 +0000 (06:04 +0000)]
Fix for float painting regressions 3932524, 3931664, and 3933068.  Make the noPaint flag setting more
robust and make it work regardless of which objects get a layout or not.

        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::insertFloatingObject):
        (khtml::RenderBlock::addOverhangingFloats):
        (khtml::RenderBlock::addIntrudingFloats):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::FloatingObject::FloatingObject):

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

15 years ago Reviewed by Kevin.
mjs [Tue, 4 Jan 2005 03:24:00 +0000 (03:24 +0000)]
    Reviewed by Kevin.

<rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode

* khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
it should not ever be (now).
        (HTMLCollectionImpl::item): When traversing items stop when we hit
nil, meaning the end to avoid triggering above assert (formerly crash).

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

15 years ago Reviewed by John and Kevin.
mjs [Tue, 4 Jan 2005 03:10:28 +0000 (03:10 +0000)]
    Reviewed by John and Kevin.

<rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to

* khtml/ecma/kjs_window.cpp:
        (Window::get): Look up frame names before buitin window properties
to match other browsers. This regressed because we added a builtin
"toolbar" property but this site had a frame with that name.

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

15 years agoBack out accidentally committed change.
mjs [Tue, 4 Jan 2005 01:44:08 +0000 (01:44 +0000)]
Back out accidentally committed change.

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

15 years agoWebCore:
mjs [Tue, 4 Jan 2005 01:28:51 +0000 (01:28 +0000)]
WebCore:

        Reviewed by Darin.

<rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another

Added opener bridge method to help WebKit implement security check
for named frame visibility.

* khtml/khtml_part.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge opener]):

WebKit:

        Reviewed by Darin.

<rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another

        Implement a security check on name frame visbility. This is the
same rule as mozilla. You can only target frames by name if you
are in the same window, have the same domain as the frame or an
ancestor, or if it's a top level window have the same domain as
the opener.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _shouldAllowAccessFrom:]):
        (-[WebFrame _descendantFrameNamed:sourceFrame:]):
        (-[WebFrame findFrameNamed:]):
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _findFrameInThisWindowNamed:sourceFrame:]):
        (-[WebView _findFrameNamed:sourceFrame:]):
        * WebView.subproj/WebViewPrivate.h:

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

15 years ago Reviewed by John
kocienda [Mon, 3 Jan 2005 22:08:47 +0000 (22:08 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.

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

15 years ago Reviewed by NOBODY (OOPS!).
hyatt [Mon, 3 Jan 2005 21:43:09 +0000 (21:43 +0000)]
    Reviewed by NOBODY (OOPS!).

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

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

15 years ago Reviewed by Harrison
kocienda [Mon, 3 Jan 2005 21:38:26 +0000 (21:38 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
        (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
        (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
        (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
        (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
        (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
        insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
        of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
        (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
        (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
         * khtml/editing/htmlediting.h: Declare new functions.

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

15 years ago Reviewed by Hyatt.
kdecker [Mon, 3 Jan 2005 19:49:05 +0000 (19:49 +0000)]
    Reviewed by Hyatt.

Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)

        * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements.  Malformed HTML (ugh) is the only reason why we need to do this.

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

15 years ago Reviewed by Ken.
darin [Fri, 24 Dec 2004 00:06:50 +0000 (00:06 +0000)]
    Reviewed by Ken.

        - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)

        * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
        some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.

        * khtml/editing/htmlediting.cpp:
        (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
        per-document tags and is just better all around for things like the document.
        (khtml::debugNode): Ditto.
        * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
        * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
        * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.

        * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
        non-HTML elements to be nested as desired.

        * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
        the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
        much larger number.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
        sense to just have the array be a member so we don't have to use new and delete on it. Also needed
        to eliminate code that used ID_CLOSE_TAG for an array size.
        (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
        that manages isindex to use deref instead of delete.
        (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
        mistake of using ID_CLOSE_TAG for the array size too.
        (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
        there and it would prevent custom tags from working. Added range check before using the forbidden
        tag array with the token ID since custom tags will use index values past the end of the array.
        (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
        inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
        createElement call is still here. Last time I left out a few form element types from this switch;
        fixed now.
        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
        document if getTagID fails; this creates a unique per-document ID.

        * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
        * khtml/misc/htmlhashes.cpp:
        (khtml::getTagID): Changed return type to unsigned short.
        (khtml::getAttrID): Ditto.

        * khtml/misc/htmltags.c: Regenerated.
        * khtml/misc/htmltags.h: Regenerated.

        * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
        Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
        Also rewrote getTagName to work with the new scheme.

        * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
        Also updated for a few tags that the parser handled but this did not.

        * kwq/KWQRenderTreeDebug.cpp:
        (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
        the tag ID directly, which only works for standard nodes.
        (operator<<): Update to call getTagName.
        (nodePositionRelativeToRoot): Ditto.
        (writeSelection): Ditto.

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

15 years agoSafari-177 stamp
adele [Thu, 23 Dec 2004 00:45:45 +0000 (00:45 +0000)]
Safari-177 stamp

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

15 years ago - rolled out my custom tag name change -- it broke amazon.com
darin [Wed, 22 Dec 2004 23:18:19 +0000 (23:18 +0000)]
    - rolled out my custom tag name change -- it broke amazon.com

        * khtml/css/cssstyleselector.cpp:
        * khtml/editing/htmlediting.cpp:
        * khtml/editing/selection.cpp:
        * khtml/editing/visible_position.cpp:
        * khtml/html/dtd.cpp:
        * khtml/html/htmlparser.cpp:
        * khtml/html/htmlparser.h:
        * khtml/html/htmltokenizer.cpp:
        * khtml/misc/htmlhashes.cpp:
        * khtml/misc/htmlhashes.h:
        * khtml/misc/htmltags.c:
        * khtml/misc/htmltags.h:
        * khtml/misc/maketags:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_position.cpp:
        * kwq/KWQRenderTreeDebug.cpp:

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

15 years ago Reviewed by Darin Adler.
harrison [Wed, 22 Dec 2004 21:37:15 +0000 (21:37 +0000)]
    Reviewed by Darin Adler.

        * khtml/editing/selection.cpp:
        (khtml::Selection::validate):
        The selecting/deselecting bad behavior is because the Selection code that expands by words
        had an inaccurate test for being at the end of the document (where double-clicking needs
        to select the last word).  Fixed that check.

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

15 years ago Reviewed by Chris.
adele [Wed, 22 Dec 2004 18:23:55 +0000 (18:23 +0000)]
    Reviewed by Chris.

        Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
          so that we match Firefox and WinIE behavior.

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

15 years ago Reviewed by Ken.
darin [Wed, 22 Dec 2004 17:58:20 +0000 (17:58 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)

        * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
        some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.

        * khtml/editing/htmlediting.cpp:
        (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
        per-document tags and is just better all around for things like the document.
        (khtml::debugNode): Ditto.
        * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
        * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
        * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.

        * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
        non-HTML elements to be nested as desired.

        * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
        the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
        much larger number.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
        sense to just have the array be a member so we don't have to use new and delete on it. Also needed
        to eliminate code that used ID_CLOSE_TAG for an array size.
        (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
        that manages isindex to use deref instead of delete.
        (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
        mistake of using ID_CLOSE_TAG for the array size too.
        (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
        there and it would prevent custom tags from working. Added range check before using the forbidden
        tag array with the token ID since custom tags will use index values past the end of the array.
        (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
        inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
        createElement call is still here.
        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
        document if getTagID fails; this creates a unique per-document ID.

        * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
        * khtml/misc/htmlhashes.cpp:
        (khtml::getTagID): Changed return type to unsigned short.
        (khtml::getAttrID): Ditto.

        * khtml/misc/htmltags.c: Regenerated.
        * khtml/misc/htmltags.h: Regenerated.

        * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
        Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
        Also rewrote getTagName to work with the new scheme.

        * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
        Also updated for a few tags that the parser handled but this did not.

        * kwq/KWQRenderTreeDebug.cpp:
        (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
        the tag ID directly, which only works for standard nodes.
        (operator<<): Update to call getTagName.
        (nodePositionRelativeToRoot): Ditto.
        (writeSelection): Ditto.

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

15 years ago Reviewed by Ken Kocienda.
harrison [Wed, 22 Dec 2004 01:05:16 +0000 (01:05 +0000)]
    Reviewed by Ken Kocienda.

        <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line

        Problem was the TextIterator was not handling exitNode() from a P block properly.

        * khtml/editing/visible_text.cpp:
        (khtml::TextIterator::TextIterator):
        Add new param that specifies whether the iterator is for content or for searching.
        Search iterators do not prevent newlines at the beginning.
        (khtml::TextIterator::advance):
        Added some comments.
        (khtml::TextIterator::handleTextNode):
        Added some comments.
        (khtml::TextIterator::exitNode):
        Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
        (khtml::TextIterator::emitCharacter):
        Added some comments.
        (khtml::TextIterator::range):
        Added some comments.
        (khtml::CharacterIterator::CharacterIterator):
        Specify search type TextIterator.
        (khtml::CharacterIterator::advance):
        * khtml/editing/visible_text.h:
        (khtml::):
        Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
        * khtml/editing/visible_units.cpp:
        (khtml::nextWordBoundary):
        Specify search type TextIterator.

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

15 years ago Reviewed by Ken Kocienda.
harrison [Wed, 22 Dec 2004 00:52:02 +0000 (00:52 +0000)]
    Reviewed by Ken Kocienda.

        <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL

        Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
        Fixed by pretending the start == end-1 in that situation, as long as end > 0.

        * khtml/rendering/render_text.cpp:
        (RenderText::setSelectionState)

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

15 years ago Reviewed by John.
mjs [Wed, 22 Dec 2004 00:44:10 +0000 (00:44 +0000)]
    Reviewed by John.

<rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain

* khtml/ecma/kjs_window.cpp:
        (Window::get): Change most window functions to be restricted by
XSS domain check.

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

15 years ago Reviewed by John
kocienda [Tue, 21 Dec 2004 19:45:47 +0000 (19:45 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
        formerly undetected and unhandled. This is the crux of the bug fix.
        (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
        execution of command.
        * khtml/editing/htmlediting.h: Declare new function.
        * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3928305-fix.html: Added.

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

15 years ago Reviewed by me
kocienda [Tue, 21 Dec 2004 19:29:26 +0000 (19:29 +0000)]
    Reviewed by me

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
        checking in (aka must return false from function returning bool).

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

15 years ago Reviewed by John
kocienda [Tue, 21 Dec 2004 19:23:39 +0000 (19:23 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.

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

15 years ago Reviewed by Darin
kocienda [Tue, 21 Dec 2004 19:05:36 +0000 (19:05 +0000)]
    Reviewed by Darin

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
        further experiements.
        (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
        be done if the insertion point is in an empty block.
        * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-012.html: Added.
        * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-013.html: Added.
        * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-014.html: Added.

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

15 years ago Reviewed by Ken.
darin [Tue, 21 Dec 2004 17:38:35 +0000 (17:38 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)

        * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
        add a field to track it. Must make a few things mutable so we can update them in the range accessor.
        * khtml/editing/visible_text.cpp:
        (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
        using the node's index. We only compute the node index if actually asked for the range.
        (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
        up the offsets.
        (khtml::TextIterator::handleTextBox): Ditto.
        (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
        nodeIndex.
        (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
        (khtml::TextIterator::exitNode): More of the same.
        (khtml::TextIterator::emitCharacter): Ditto.
        (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
        add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.

        - another small fix

        * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.

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

15 years agoversioning for TOT, Safari 2.0 (176+)
vicki [Tue, 21 Dec 2004 03:01:01 +0000 (03:01 +0000)]
versioning for TOT, Safari 2.0 (176+)

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

15 years agoSafari-176 stamp
vicki [Tue, 21 Dec 2004 02:34:23 +0000 (02:34 +0000)]
Safari-176 stamp

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

15 years ago Add call to new API. ImageIO deprecated some older (although
rjw [Tue, 21 Dec 2004 01:15:38 +0000 (01:15 +0000)]
Add call to new API.  ImageIO deprecated some older (although
quite new!) API.   This caused us to fail to build on 337 or later.

Developers wanting to build on older versions of Tiger must define
USE_DEPRECATED_IMAGESOURCE_API in WebImageData.m.

        Reviewed by Vicki.

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData propertiesAtIndex:]):

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

15 years ago Don't call Tiger SPI on Panther.
rjw [Tue, 21 Dec 2004 01:03:47 +0000 (01:03 +0000)]
Don't call Tiger SPI on Panther.

        Reviewed by Vicki.

        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (+[WebTextRendererFactory createSharedFactory]):

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

15 years ago Reviewed by Darin
kocienda [Tue, 21 Dec 2004 00:25:17 +0000 (00:25 +0000)]
    Reviewed by Darin

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
        regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
        Rolling out until I can develop a real fix.

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

15 years ago Reviewed by Dave Hyatt.
harrison [Mon, 20 Dec 2004 23:54:54 +0000 (23:54 +0000)]
    Reviewed by Dave Hyatt.

        Initial checkin of AXTextMarkerRef support.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection):
        (DocumentImpl::setFocusNode):
        * kwq/KWQAccObject.h:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject detach]):
        (-[KWQAccObject anchorElement]):
        (-[KWQAccObject addChildrenToArray:]):
        (-[KWQAccObject accessibilityAttributeNames]):
        (-[KWQAccObject accessibilityActionDescription:]):
        (-[KWQAccObject accessibilityPerformAction:]):
        (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
        (-[KWQAccObject textMarkerForVisiblePosition:]):
        (-[KWQAccObject visiblePositionForTextMarker:]):
        (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
        (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
        (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
        (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
        (-[KWQAccObject accessibilityAttributeValue:]):
        (-[KWQAccObject accessibilityParameterizedAttributeNames]):
        (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
        (-[KWQAccObject getSelectedTextMarkerRange]):
        (-[KWQAccObject doAXLineForTextMarker:]):
        (-[KWQAccObject doAXTextMarkerRangeForLine:]):
        (-[KWQAccObject doAXStringForTextMarkerRange:]):
        (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
        (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
        (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
        (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
        (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
        (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
        (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
        (-[KWQAccObject accessibilityFocusedUIElement]):
        (-[KWQAccObject clearChildren]):
        (-[KWQAccObject accObjectID]):
        (-[KWQAccObject setAccObjectID:]):
        (-[KWQAccObject removeAccObjectID]):
        * kwq/KWQAccObjectCache.h:
        * kwq/KWQAccObjectCache.mm:
        (KWQAccObjectCache::KWQAccObjectCache):
        (KWQAccObjectCache::~KWQAccObjectCache):
        (KWQAccObjectCache::getAccObjectID):
        (KWQAccObjectCache::removeAccObjectID):
        (KWQAccObjectCache::textMarkerForVisiblePosition):
        (KWQAccObjectCache::visiblePositionForTextMarker):

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

15 years agoChangeLog
harrison [Mon, 20 Dec 2004 23:51:52 +0000 (23:51 +0000)]
ChangeLog

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

15 years ago Fixed <rdar://problem/3884448> WebKit should turn on CG local font cache
rjw [Mon, 20 Dec 2004 23:36:49 +0000 (23:36 +0000)]
Fixed <rdar://problem/3884448> WebKit should turn on CG local font cache

Enable mutli-tier font caching.  We should see a performance boost with this
change.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (+[WebTextRendererFactory createSharedFactory]):

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

15 years ago Fix image decoding to separately decode image meta data from actual image bits. I
rjw [Mon, 20 Dec 2004 22:34:31 +0000 (22:34 +0000)]
Fix image decoding to separately decode image meta data from actual image bits.  I
incorrectly consolidated decode of meta data and image bits resulting in a huge
performance regression.

Double size of WebCore cache on lower end machines.  On the PLT run on machines with
256MB of memory, too many images were being evicted, causing a re-decode on the PLT.
Upping the lower limit of the cache size ensure that no images are evicted (this
goes hand-in-hand with the change to the minimum object size from 32K to 40K).

        Reviewed by Ken.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (+[WebImageData initialize]):
        (-[WebImageData _commonTermination]):
        (-[WebImageData _invalidateImages]):
        (-[WebImageData _invalidateImageProperties]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _cacheImages:allImages:]):
        (-[WebImageData decodeData:isComplete:callback:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):

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

15 years ago Fixed build problem caused by change to ImageIO API.
rjw [Mon, 20 Dec 2004 20:34:36 +0000 (20:34 +0000)]
Fixed build problem caused by change to ImageIO API.

        Reviewed by Adele.

        * WebCoreSupport.subproj/WebImageData.m:

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

15 years ago Reviewed by Kevin.
darin [Sun, 19 Dec 2004 20:40:34 +0000 (20:40 +0000)]
    Reviewed by Kevin.

        - some garbage collection fixes

        * Misc.subproj/WebNSObjectExtras.h: (WebCFAutorelease): Replaced the old WebNSRetainCFRelease with this
        much-easier-to-understand function cribbed from what David Harrison did in WebCore.

        * Misc.subproj/WebKitNSStringExtras.m: (+[NSString _web_encodingForResource:]): Use CFRelease here to
        get rid of an unnecessary use of WebNSRetainCFRelease.
        * Misc.subproj/WebNSURLExtras.m:
        (+[NSURL _web_URLWithData:relativeToURL:]): Use WebCFAutorelease instead of WebNSRetainCFRelease and autorelease.
        (-[NSURL _web_URLWithLowercasedScheme]): Ditto.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Use WebCFAutorelease here; the old code would not
        work correctly under GC.
        * Plugins.subproj/WebNetscapePluginPackage.m: (+[WebNetscapePluginPackage preferredLocalizationName]):
        Use WebCFAutorelease here; the old code would not work correctly under GC.

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

15 years ago * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
darin [Sun, 19 Dec 2004 20:35:38 +0000 (20:35 +0000)]
    * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.

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

15 years ago Reviewed by Kevin.
darin [Sun, 19 Dec 2004 20:30:49 +0000 (20:30 +0000)]
    Reviewed by Kevin.

        - a garbage collection fix

        * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
        #ifndef to use #if (in practice, either is OK).
        * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.

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

15 years ago Fixed: <rdar://problem/3766915> PDF content needs search to work
cblu [Sun, 19 Dec 2004 19:09:10 +0000 (19:09 +0000)]
Fixed: <rdar://problem/3766915> PDF content needs search to work

        Reviewed by kevin, john.

        * WebView.subproj/WebPDFView.m:
(-[WebPDFView searchFor:direction:caseSensitive:wrap:]): implemented
        (-[WebPDFView takeFindStringFromSelection:]): new
        (-[WebPDFView jumpToSelection:]): new
        (-[WebPDFView validateUserInterfaceItem:]): new

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

15 years agoUse 40K, not 40MB as min max cacheable object size.
rjw [Sat, 18 Dec 2004 03:30:08 +0000 (03:30 +0000)]
Use 40K, not 40MB as min max cacheable object size.

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

15 years ago Fix for 3923255, specified percentage heights of divs with overflow auto inside...
hyatt [Sat, 18 Dec 2004 01:31:42 +0000 (01:31 +0000)]
Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.

        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcPercentageHeight):
        * khtml/rendering/render_table.cpp:
        (RenderTableSection::layoutRows):

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

15 years ago Reviewed by Kevin.
mjs [Sat, 18 Dec 2004 00:43:37 +0000 (00:43 +0000)]
    Reviewed by Kevin.

<rdar://problem/3926869> Opening caches window after running PLT causes crash

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in
the protected value table.
        (KJS::ProtectedValues::increaseProtectCount): Ditto.
        (KJS::ProtectedValues::decreaseProtectCount): Ditto.

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

15 years ago Reviewed by Ken Kocienda.
harrison [Sat, 18 Dec 2004 00:38:27 +0000 (00:38 +0000)]
    Reviewed by Ken Kocienda.

        <rdar://problem/3924930> REGRESSION: triple click does not select to end of line

        * khtml/editing/visible_units.cpp:
        (khtml::endOfParagraph):
        When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.

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

15 years agoFix Panther build bustage.
hyatt [Sat, 18 Dec 2004 00:16:03 +0000 (00:16 +0000)]
Fix Panther build bustage.

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

15 years ago Reviewed by Vicki
kocienda [Fri, 17 Dec 2004 23:32:31 +0000 (23:32 +0000)]
    Reviewed by Vicki

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
        codes when I added the createBreakElement() function.

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

15 years ago Make image decoding as lazy as possible for non-threaded case; in some cases
rjw [Fri, 17 Dec 2004 23:01:02 +0000 (23:01 +0000)]
Make image decoding as lazy as possible for non-threaded case; in some cases
can avoid unnecessary decoding work.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):

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

15 years ago Set the floor of max cacheable object size to 40K. This restores
rjw [Fri, 17 Dec 2004 22:56:34 +0000 (22:56 +0000)]
Set the floor of max cacheable object size to 40K.  This restores
the long standing floor.  Lower floor deleteriously impacts the PLT.
        Reviewed by Hyatt.

        * khtml/khtml_part.cpp:
        (KHTMLPart::checkCompleted):
        * khtml/misc/loader.cpp:
        (Cache::setSize):

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

15 years ago Reviewed by Hyatt
kocienda [Fri, 17 Dec 2004 22:21:44 +0000 (22:21 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
        Formerly checked only for block boundary.

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

15 years ago Reviewed by Darin.
harrison [Fri, 17 Dec 2004 21:58:19 +0000 (21:58 +0000)]
    Reviewed by Darin.

Add KWQCFAutorelease for autoreleasing CF objects.
        * kwq/KWQFoundationExtras.h:
        (KWQCFAutorelease):
        New.

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

15 years ago Reviewed by Darin.
harrison [Fri, 17 Dec 2004 21:56:03 +0000 (21:56 +0000)]
    Reviewed by Darin.

Fix GC compatibility in getNSString.

        * kwq/KWQString.mm:
        (QString::getNSString):
Use NSString allocator instead of CFString, so that autorelease works under GC.

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

15 years ago Reviewed by Hyatt
kocienda [Fri, 17 Dec 2004 19:58:01 +0000 (19:58 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
        move it after the <body> element.

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

15 years ago Reviewed by me
kocienda [Fri, 17 Dec 2004 18:57:58 +0000 (18:57 +0000)]
    Reviewed by me

        Added new layout tests covering cases from recent bug fixes.

        * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-018.html: Added.
        * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-019.html: Added.
        * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-020.html: Added.
        * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-021.html: Added.

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

15 years ago Reviewed by me
kocienda [Fri, 17 Dec 2004 18:31:49 +0000 (18:31 +0000)]
    Reviewed by me

        Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.

        * layout-tests/editing/inserting/insert-div-013-expected.txt
        * layout-tests/editing/inserting/insert-div-014-expected.txt

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

15 years ago Reviewed by John
kocienda [Fri, 17 Dec 2004 18:01:32 +0000 (18:01 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply):
        * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
        block as the reference node for the insertion of the new block.
        (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
        I worked this all out on the whiteboard this time. This should be the last tweak.

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

15 years ago Reviewed by Ken.
kdecker [Fri, 17 Dec 2004 16:29:28 +0000 (16:29 +0000)]
    Reviewed by Ken.

Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs

        * khtml/xml/xml_tokenizer.cpp:
        (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.

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

15 years ago Reviewed by Chris
kocienda [Fri, 17 Dec 2004 01:05:23 +0000 (01:05 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
        it checks the downstream node for the starting position.

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

15 years ago Reviewed by Chris
kocienda [Fri, 17 Dec 2004 00:57:30 +0000 (00:57 +0000)]
    Reviewed by Chris

        Added new createBreakElement() function that makes creating a <br> element a one-liner.
        Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
        over to this new helper.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
        (khtml::InsertLineBreakCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
        (khtml::ReplaceSelectionCommand::doApply): Ditto.
        (khtml::createBreakElement): New helper.
        * khtml/editing/htmlediting.h: Ditto.

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

15 years ago Reviewed by Maciej.
darin [Fri, 17 Dec 2004 00:10:25 +0000 (00:10 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3920764> Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase

        * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase.
        * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the
        non-locale-specific versions.
        * kjs/string_object.lut.h: Regenerated.

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

15 years ago Fix a bug where vertical-align values that depended on their parent's value went...
hyatt [Fri, 17 Dec 2004 00:03:44 +0000 (00:03 +0000)]
Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
vertical-align top or bottom.  The bug is 3771007, bankofamerica's ebills page.

        Reviewed by kocienda

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

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

15 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 23:39:50 +0000 (23:39 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
        <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
        make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
        a check which may move the node used as the reference node for the insertion. Also change this code to
        insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
        to want to shift into the new <p>.

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

15 years ago Reviewed by Chris.
sullivan [Thu, 16 Dec 2004 22:44:15 +0000 (22:44 +0000)]
    Reviewed by Chris.

        One of the assertions from my previous checkin fired, so
        I made this code more robust.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge _preferences]):
        new helper method, returns global preferences if webView is nil,
        otherwise returns webView's preferences
        (-[WebBridge getObjectCacheSize]):
        use new helper method, remove now-unnecessary assert
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
        ditto

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

15 years ago Reviewed by Ken.
darin [Thu, 16 Dec 2004 22:10:56 +0000 (22:10 +0000)]
    Reviewed by Ken.

        - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
          after talking this over with Dave and Ken

        * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
        helper so this can share code with the plain-text conversion code.
        (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
        helper so this can share code with the plain-text conversion code.
        (khtml::createDefaultParagraphElement): Added.
        (khtml::createBlockPlaceholderElement): Added.

        * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
        <br> elements for pasting plain text.

        - regenerated these files with the newer gperf

        * khtml/css/cssproperties.c: Regenerated.
        * khtml/css/cssvalues.c: Regenerated.
        * khtml/misc/htmlattrs.c: Regenerated.
        * khtml/misc/htmltags.c: Regenerated.

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

15 years ago Reviewed by Darin.
sullivan [Thu, 16 Dec 2004 21:33:09 +0000 (21:33 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3913523> Mail needs SPI for adding tooltips to links
        - cleaned up some calls to +[WebPreferences standardPreferences] that should
          have been using -[WebView preferences]

        This adds a (currently SPI-only) new feature that shows the URL of the link
        under the mouse in a toolTip. I tested this in Safari, but we're adding this
        feature for Mail, and Safari won't use it (unless of course you know the
        magic defaults command)

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView start]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getObjectCacheSize]):
        ditto
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
        ditto

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willCacheResponse:]):
        ditto

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        ditto
        (-[WebFrame _loadItem:withLoadType:]):
        ditto

        * WebView.subproj/WebHTMLViewInternal.h:
        private struct now keeps ivar for cached value of showsURLsInToolTips
        so it doesn't have look it up in preferences a zillion times

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        if private->showsURLsInToolTips is true, set the toolTip from the URL.
        Fall back to showing the title attribute in case some element has a title
        attribute but no URL.
        (-[WebHTMLView _mayStartDragAtEventLocation:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]
        (-[WebHTMLView _resetCachedWebPreferences:]):
        get a fresh value for private->showsURLsInToolTips
        (-[WebHTMLView initWithFrame:]):
        call _resetCachedWebPreferences the first time, and listen for WebPreferencesChanged notifications
        (-[WebHTMLView _handleStyleKeyEquivalent:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebView.subproj/WebPreferenceKeysPrivate.h:
        added WebKitShowsURLsInToolTipsPreferenceKey

        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):
        initialize WebKitShowsURLsInToolTipsPreferenceKey to 0
        (-[WebPreferences showsURLsInToolTips]):
        return WebKitShowsURLsInToolTipsPreferenceKey value
        (-[WebPreferences setShowsURLsInToolTips:]):
        set WebKitShowsURLsInToolTipsPreferenceKey value

        * WebView.subproj/WebPreferencesPrivate.h:
        add declarations for showsURLsInToolTips and setter

        * WebView.subproj/WebTextView.m:
        (-[WebTextView _preferences]):
        new helper method that gets preferences from webView if there is a webView,
        otherwise gets global preferences
        (-[WebTextView setFixedWidthFont]):
        use new helper method rather than always using global preferences
        (-[WebTextView initWithFrame:]):
        observe WebPreferencesChangedNotification instead of unnecessarily general
        NSUserDefaultsChangedNotification

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

15 years ago Reviewed by Hyatt
kocienda [Thu, 16 Dec 2004 21:15:57 +0000 (21:15 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
        parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
        it stops looking in this situation. This problem eventually caused the delete code to try to
        merge a node under a descendent.

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

15 years ago Change by Richard, reviewed by me.
adele [Thu, 16 Dec 2004 19:21:57 +0000 (19:21 +0000)]
    Change by Richard, reviewed by me.

Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load

        * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.

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

15 years ago Reviewed by Chris.
adele [Thu, 16 Dec 2004 18:53:39 +0000 (18:53 +0000)]
    Reviewed by Chris.

        Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk

        Added a call to ObjectImp::get before Window::get just returns Undefined.
        This was preventing us from getting the toString function from a Window object.

        * khtml/ecma/kjs_window.cpp: (Window::get):

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

15 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 18:46:13 +0000 (18:46 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
        to do a better job than it was doing before. Added several test cases to prove I am on a
        better track.
        * khtml/editing/visible_position.cpp:
        (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
        leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
        This function was returning true for the first position in "bar". Wrong. Also tightened up other
        rule: Should not report true when relationship between blocks cannot be determined.
        (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
        when relationship between blocks cannot be determined.
        * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-010.html: Added.
        * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-011.html: Added.
        * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-012.html: Added.
        * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-013.html: Added.
        * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-014.html: Added.
        * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-015.html: Added.
        * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-016.html: Added.
        * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-017.html: Added.

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

15 years agoFailed to check in this file after changing it; I hate having too many changes in...
kocienda [Thu, 16 Dec 2004 18:18:06 +0000 (18:18 +0000)]
Failed to check in this file after changing it; I hate having too many changes in my tree at once

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

15 years ago Reviewed by me
kocienda [Thu, 16 Dec 2004 18:04:58 +0000 (18:04 +0000)]
    Reviewed by me

        Added a layout test based on my last checkin.

        * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
        * layout-tests/editing/selection/move-by-word-001.html: Added.

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

15 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 17:57:54 +0000 (17:57 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps

        * khtml/editing/visible_text.cpp:
        (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
        backwards into a different block that is an descendent of the block containing the text node (as in leaving
        the "bar" node in this example: <p>foo</p>bar).
        (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
        (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
        it is called from there, and now also from advance().

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

15 years ago Reviewed by Ken.
darin [Thu, 16 Dec 2004 01:02:30 +0000 (01:02 +0000)]
    Reviewed by Ken.

        - fixed problem where plain-text would put a blank line between each <p> even when they have no margins

        * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
        "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
        type altogether and use the render tree instead.

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

15 years agoWebCore:
sullivan [Wed, 15 Dec 2004 19:13:48 +0000 (19:13 +0000)]
WebCore:

        Reviewed by Ken.

        - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
        in the menu, no specific action names

        * khtml/editing/edit_actions.h: new header, contains EditAction enum
        (renamed from HTMLEditAction, formerly in htmlediting.h)

        * ForwardingHeaders/editing/edit_actions.h: new forwarding header

        * khtml/editing/htmlediting.h:
        removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
        namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand

        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommandPtr::editingAction):
        update for enum name change
        (khtml::EditCommand::editingAction):
        ditto
        (khtml::ApplyStyleCommand::ApplyStyleCommand):
        added editingAction parameter to this constructor
        (khtml::ApplyStyleCommand::editingAction):
        return new ivar
        (khtml::DeleteSelectionCommand::editingAction):
        update for enum name change
        (khtml::MoveSelectionCommand::editingAction):
        ditto
        (khtml::TypingCommand::editingAction):
        ditto
        (khtml::ReplaceSelectionCommand::editingAction):
        ditto

        * khtml/khtml_part.h:
        added EditAction parameter to applyStyle and computeAndSetTypingStyle
        * khtml/khtml_part.cpp:
        (KHTMLPart::computeAndSetTypingStyle):
        added EditAction parameter
        (KHTMLPart::applyStyle):
        ditto

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::registerCommandForUndoOrRedo):
        do the cast from EditAction to WebUndoAction a different way to match other code

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setTypingStyle:withUndoAction:]):
        added WebUndoAction parameter, passed into ApplyStyleCommand constructor
        (-[WebCoreBridge applyStyle:withUndoAction:]):
        ditto

        * WebCore.pbproj/project.pbxproj:
        updated for new files

WebKit:

        Reviewed by Ken.

        - rest of WebKit fix for <rdar://problem/3790011> undoable operations all say "Undo"
        in the menu, no specific action names

        I only know of one loose end currently, which I wrote up as <rdar://problem/3920971> Edit menu
        says "Undo Change Attributes" when it should say "Undo Set Color", from font panel

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
        use WebUndoActionSetColor when dragging color swatch
        (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
        new WebUndoAction parameter, passed across bridge
        (-[WebHTMLView _toggleBold]):
        use WebUndoActionSetFont
        (-[WebHTMLView _toggleItalic]):
        use WebUndoActionSetFont
        (-[WebHTMLView pasteFont:]):
        use WebUndoActionPasteFont
        (-[WebHTMLView changeFont:]):
        use WebUndoActionSetFont
        (-[WebHTMLView changeAttributes:]):
        use WebUndoActionChangeAttributes
        (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
        new method, returns WebUndoActionSetBackgroundColor or WebUndoActionSetColor
        (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
        now calls _undoActionFromColorPanelWithSelector
        (-[WebHTMLView changeColor:]):
        use WebUndoActionSetColor
        (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
        new WebUndoAction parameter, passed through
        (-[WebHTMLView alignCenter:]):
        use WebUndoActionCenter
        (-[WebHTMLView alignJustified:]):
        use WebUndoActionJustify
        (-[WebHTMLView alignLeft:]):
        use WebUndoActionAlignLeft
        (-[WebHTMLView alignRight:]):
        use WebUndoActionAlignRight
        (-[WebHTMLView subscript:]):
        use WebUndoActionAlignSubscript
        (-[WebHTMLView superscript:]):
        use WebUndoActionAlignSuperscript
        (-[WebHTMLView unscript:]):
        use WebUndoActionAlignUnscript
        (-[WebHTMLView underline:]):
        use WebUndoActionAlignUnderline

        * WebView.subproj/WebView.m:
        (-[WebView setTypingStyle:]):
        pass WebUndoActionUnspecified through as new parameter since we don't have any more specific info
        (-[WebView applyStyle:]):
        ditto

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

15 years agoAdd layout test for large rowspans.
hyatt [Wed, 15 Dec 2004 02:42:25 +0000 (02:42 +0000)]
Add layout test for large rowspans.

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

15 years ago Fix for 3562458, rowspan and colspan converted to ints so that large values will...
hyatt [Wed, 15 Dec 2004 02:41:38 +0000 (02:41 +0000)]
Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them.  Remove
the ridiculous 1024 limit on the span values.

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableCellElementImpl::parseHTMLAttribute):
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::collapsedBottomBorder):
        * khtml/rendering/render_table.h:
        (khtml::RenderTableCell::colSpan):
        (khtml::RenderTableCell::setColSpan):
        (khtml::RenderTableCell::rowSpan):
        (khtml::RenderTableCell::setRowSpan):
        (khtml::RenderTableCol::span):
        (khtml::RenderTableCol::setSpan):

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

15 years ago Make sure <col> and <colgroup> can have spans updated dynamically as well.
hyatt [Wed, 15 Dec 2004 02:27:27 +0000 (02:27 +0000)]
Make sure <col> and <colgroup> can have spans updated dynamically as well.

        Reviewed by rjw

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableColElementImpl::parseHTMLAttribute):
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::updateFromElement):
        (RenderTableCol::updateFromElement):

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

15 years agoFix crasher caused by lack of null style check.
hyatt [Wed, 15 Dec 2004 02:20:51 +0000 (02:20 +0000)]
Fix crasher caused by lack of null style check.

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

15 years ago Fix for 3833123, setting a cell's colspan does not update rendering like it should.
hyatt [Wed, 15 Dec 2004 02:09:19 +0000 (02:09 +0000)]
Fix for 3833123, setting a cell's colspan does not update rendering like it should.

        Reviewed by rjw

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableCellElementImpl::parseHTMLAttribute):
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::RenderTableCell):
        (RenderTableCell::updateFromElement):

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

15 years agoWebKit:
rjw [Wed, 15 Dec 2004 02:00:34 +0000 (02:00 +0000)]
WebKit:
Helper method to get URL of plugin view.

        Reviewed by Chris.

        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _webViewURL]):

JavaScriptCore:
Pass URL of plugin view when call into JNI.

        Reviewed by Chris.

        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall):

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

15 years ago Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in...
cblu [Wed, 15 Dec 2004 01:53:43 +0000 (01:53 +0000)]
Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard

        Reviewed by hyatt.

        * khtml/editing/markup.cpp:
        (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it

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

15 years ago Fix for 3785211. Make sure to do a layout with the old position before doing a layou...
hyatt [Wed, 15 Dec 2004 01:13:40 +0000 (01:13 +0000)]
Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
This is actually a regression from my positioned object DHTML optimization.

        Reviewed by kocienda

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

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

15 years ago Make sure the class attribute works when newlines are present in the attribute.
hyatt [Wed, 15 Dec 2004 00:36:32 +0000 (00:36 +0000)]
Make sure the class attribute works when newlines are present in the attribute.

        Reviewed by kocienda

        * khtml/html/html_elementimpl.cpp:
        (HTMLNamedAttrMapImpl::parseClassAttribute):

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

15 years ago Reviewed by rjw.
vicki [Tue, 14 Dec 2004 22:34:54 +0000 (22:34 +0000)]
    Reviewed by rjw.

<rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments

        * Plugins.subproj/WebPlugin.h: changed instances of "WebScriptMethods" to "WebScripting" in this
file as well, as requested in the bug report

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

15 years ago Reviewed by John.
mjs [Tue, 14 Dec 2004 21:23:07 +0000 (21:23 +0000)]
    Reviewed by John.

<rdar://problem/3912488> Mail throws an exception after backspacing "away" inline input

* WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView setMarkedText:selectedRange:]): Don't try to set a selection if
we end up with no marked text, since that case fails and is unnecessary.

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

15 years ago Reviewed by Ken.
sullivan [Tue, 14 Dec 2004 19:52:06 +0000 (19:52 +0000)]
    Reviewed by Ken.

        - added Undo action names for Cut, Paste, and Drag

        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::editingAction):
        overridden to return HTMLEditActionCut
        (khtml::MoveSelectionCommand::editingAction):
        overridden to return HTMLEditActionDrag
        (khtml::ReplaceSelectionCommand::editingAction):
        overridden to return HTMLEditActionPaste

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

15 years agoWebCore:
sullivan [Tue, 14 Dec 2004 19:17:31 +0000 (19:17 +0000)]
WebCore:

        Reviewed by Ken.

        - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
        no specific action names

        The remaining step is to make each EditCommand subclass override editingAction() to return an
        appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
        is not completely straightforward, so this next step isn't trivial.)

        * khtml/editing/htmlediting.h:
        new enum for HTMLEditAction

        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommandPtr::editingAction):
        new method, calls through to EditCommand
        (khtml::EditCommand::editingAction):
        new method for subclasses to override, returns HTMLEditActionUnspecified at this level
        (khtml::TypingCommand::editingAction):
        proof of concept override, returns HTMLEditActionTyping

        * kwq/KWQKHTMLPart.h:
        declare new private bottleneck method registerCommandForUndoOrRedo
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::registerCommandForUndoOrRedo):
        new bottleneck method to reduce code duplication; now calls over the bridge
        to get the localized string to use for the Undo action name
        (KWQKHTMLPart::registerCommandForUndo):
        now calls new bottleneck method
        (KWQKHTMLPart::registerCommandForRedo):
        now calls new bottleneck method

        * kwq/WebCoreBridge.h:
        new enum for WebUndoAction, maps directly to HTMLEditAction.
        Declaration of nameForUndoAction:

WebKit:

        Reviewed by Ken.

        - WebKit part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
        no specific action names

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge nameForUndoAction:]):
        renamed from setUndoActionNamePlaceholder, replaced arbitrary integers with enum values, and
        handled new "unspecified" case as a fallback

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

15 years ago Reviewed by John.
darin [Tue, 14 Dec 2004 17:26:28 +0000 (17:26 +0000)]
    Reviewed by John.

        - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident)

        * khtml/rendering/render_frames.cpp:
        (RenderPart::~RenderPart): Check widget for nil.
        (RenderPart::setWidget): Ditto.
        (RenderFrame::slotViewCleared): Ditto.
        (RenderPartObject::slotViewCleared): Ditto.

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

15 years ago Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under...
rjw [Tue, 14 Dec 2004 02:44:45 +0000 (02:44 +0000)]
Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related)

Add support for calling static Java methods from JavaScript.

        Reviewed by Maciej.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_runtime.cpp:
        (JavaMethod::JavaMethod):
        * bindings/jni/jni_runtime.h:
        (KJS::Bindings::JavaMethod::isStatic):
        * bindings/jni/jni_utility.cpp:
        (callJNIStaticMethod):
        (KJS::Bindings::callJNIBooleanMethod):
        (KJS::Bindings::callJNIStaticBooleanMethod):
        * bindings/jni/jni_utility.h:

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

15 years agoWebKit:
rjw [Tue, 14 Dec 2004 00:29:51 +0000 (00:29 +0000)]
WebKit:
Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)

        Reviewed by John.

        * Plugins.subproj/WebJavaPlugIn.h:

JavaScriptCore:
Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)

        Reviewed by John.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall):
        * bindings/jni/jni_runtime.h:
        * bindings/jni/jni_utility.h:

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

15 years ago Reviewed by Maciej.
sullivan [Tue, 14 Dec 2004 00:15:02 +0000 (00:15 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3744583> Safari can not quit when a webpage has a login sheet
        that can't be cancelled.

        The proper fix for this would be to change the class of the NSPanel in the nib file.
        But since this would require a localization change, I did a run-time hack instead.
        I'll file a bug about fixing this when we're out of localization freeze.

        * Panels.subproj/WebAuthenticationPanel.m:
        (-[WebAuthenticationPanel replacePanelWithSubclassHack]):
        new method, creates a new panel that is identical to the original one except that
        it's our subclass, and moves all the subviews of the original panel into the new one.
        (-[WebAuthenticationPanel loadNib]):
        call replacePanelWithSubclassHack
        (-[NonBlockingPanel _blocksActionWhenModal:]):
        only method of new NSPanel subclass; overrides this SPI to allow the user to quit
        when one of these panels/sheets is on-screen

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

15 years ago Reviewed by Ken.
darin [Tue, 14 Dec 2004 00:10:19 +0000 (00:10 +0000)]
    Reviewed by Ken.

        - moved markup-related functions into new sources files in the editing directory
        - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster

        * ForwardingHeaders/editing/markup.h: Added.
        * khtml/editing/markup.h: Added.
        * khtml/editing/markup.cpp: Added.

        * WebCore.pbproj/project.pbxproj: Added markup.h/cpp.

        * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerHTML): Changed to call createMarkup.
        (HTMLElementImpl::outerHTML): Ditto.

        * khtml/ecma/kjs_window.cpp:
        (Window::retrieveWindow): Comment out assert that uses dynamic_cast.
        (Window::retrieveActive): Ditto.

        * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere.
        * khtml/xml/dom_docimpl.h: Ditto.

        * khtml/khtml_part.cpp:
        (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML.
        (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast.

        * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code
        still works even with the additional replace overloads added to QString.
        * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto.

        * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object
        base pointer, because it used dynamic_cast in its implementation. Made the other version public.
        * khtml/rendering/render_object.cpp: Ditto.
        * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete.

        * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations.
        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all
        the support code into markup.cpp.

        * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp.
        * khtml/xml/dom_nodeimpl.cpp: Ditto.

        * khtml/xml/dom_position.cpp:
        (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks
        so these return null positions rather than raising exceptions.
        (DOM::endPosition): Ditto.

        * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast.
        * kwq/KWQFrame.h: Ditto.
        * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto.
        * kwq/KWQKPartsPart.h: Ditto.
        * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto.
        * kwq/KWQScrollView.h: Ditto.
        * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto.
        * kwq/KWQKHTMLPart.h: Ditto.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLView::isKHTMLView): Ditto.
        (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional
        replace overloads added to QString.
        (KWQKHTMLPart::setStatusBarText): Ditto.
        (KWQKHTMLPart::runJavaScriptAlert): Ditto.
        (KWQKHTMLPart::runJavaScriptConfirm): Ditto.
        (KWQKHTMLPart::runJavaScriptPrompt): Ditto.
        (KWQKHTMLPart::attributedString): Ditto.
        (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto.
        (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above).

        * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior.
        * kwq/KWQObject.mm:
        (QObject::inherits): Changed to not use dynamic cast.
        (QObject::isKHTMLPart): Added. Returns false.
        (QObject::isKHTMLView): Ditto.
        (QObject::isKPartsReadOnlyPart): Ditto.
        (QObject::isQFrame): Ditto.
        (QObject::isQScrollView): Ditto.

        * kwq/KWQRenderTreeDebug.cpp:
        (write): Changed to use inherits rather than dynamic_cast.
        (writeSelection): Ditto.

        * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather
        than going straight on to the "no parameters at all" version.

        * kwq/KWQString.h:
        * kwq/KWQString.mm: (QString::replace): Added overloads.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h.
        (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto.
        (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with
        the additional replace overloads added to QString.
        (-[WebCoreBridge stringForRange:]): Ditto.
        (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h.
        (-[WebCoreBridge elementAtPoint:]): QChar conversion.
        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h.
        (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h.

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

15 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 23:17:57 +0000 (23:17 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on
        leading and trailing whitespace positions was reversed! I must have introduced this error recently
        when changing around this code.

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

15 years ago Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the...
hyatt [Mon, 13 Dec 2004 22:59:48 +0000 (22:59 +0000)]
Fix for 3915787, macobserver doesn't paint.  floatRect() needed to be const in the base class.  Also hit-testing
and painting was using the wrong rect when setting up the x/y of the rect.

        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paint):
        (khtml::RenderBlock::nodeAtPoint):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::floatRect):

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

15 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 22:41:27 +0000 (22:41 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles

        Code to figuire out the end node to merge was missing the font tag in the second paragraph
        written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted
        looking for the node that is the last inline in the last block of the fragment. The old algorithm was
        insufficiently powerful.
        (khtml::ReplacementFragment::enclosingBlock): New helper function.
        * khtml/editing/htmlediting.h: Add declaration for new helper function.
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-011.html: Added.

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

15 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 21:01:02 +0000 (21:01 +0000)]
    Reviewed by John

        WebCore side of fix for this bug:

        <rdar://problem/3768372> REGRESSION (Mail): paste of text ending in whitespace loses whitespace

        Note that we are coordinating with Doug Davidson on the AppKit team to make a complete fix for this
        bug. This change involves our half of the needed changes.

        Note that a lot of this change has to do with changing code to use a <br> element instead of
        a comment node as the mechanism to annotate HTML with information used to fix the bug. In some
        other places, code to handle comments in markup can be removed since we do not use comments for
        such annotations after this change.

        * khtml/editing/htmlediting.cpp: Remove isComment() helper; no longer needed.
        (khtml::ReplacementFragment::ReplacementFragment): Change m_hasInterchangeNewlineComment name to m_hasInterchangeNewline.
        (khtml::ReplacementFragment::isInterchangeNewlineNode): Name changed from isInterchangeNewlineComment.
        (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): Local variable name convertedSpaceSpanClass changed to
        convertedSpaceSpanClassString to match other uses of the idiom used here.
        (khtml::ReplaceSelectionCommand::doApply): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
        * khtml/editing/htmlediting.h: Change names as noted in .cpp file. Remove isComment() helper; no longer needed.
        (khtml::ReplacementFragment::hasInterchangeNewline):  Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): No longer has includeCommentsInDOM flag; no longer needed as we do not
        annotate fragments with comments any longer.
        * khtml/html/html_elementimpl.h: Ditto.
        * khtml/xml/dom2_rangeimpl.cpp: Remove addCommentToHTMLMarkup() helper. No longer needed.
        (DOM::interchangeNewlineMarkupString): New helper to return <br> element markup we use to annotate content for interchange.
        (DOM::RangeImpl::toHTML): No longer uses addCommentToHTMLMarkup; now calls interchangeNewlineMarkupString(). Remove
        spurious semi-colon.
        * khtml/xml/dom2_rangeimpl.h: Remove obsolete addCommentToHTMLMarkup() function and EAddToMarkup enum.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): No longer pass bool to ask for including comments
        in DOM when calling createContextualFragment().

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

15 years agoVersions were backwards in TOT. They should read Safari 2.0 (175+), not Safari 175...
vicki [Mon, 13 Dec 2004 20:59:44 +0000 (20:59 +0000)]
Versions were backwards in TOT.  They should read Safari 2.0 (175+), not Safari 175+ (2.0).

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

15 years ago fixed deployment build bustage that John Louch ran into
sullivan [Sat, 11 Dec 2004 01:48:44 +0000 (01:48 +0000)]
    fixed deployment build bustage that John Louch ran into

        * kwq/KWQTextEdit.mm:
        (QTextEdit::setScrollBarModes):
        move bool declaration inside exception-handling block to avoid obscure
        compiler error

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

15 years ago Reviewed by Richard.
mjs [Fri, 10 Dec 2004 23:15:35 +0000 (23:15 +0000)]
    Reviewed by Richard.

<rdar://problem/3907484> REGRESSION (125-173): crash when KWQTextField is dealloc'ed while setting focus (profoundlearning.com)

        * kwq/KWQWidget.mm:
        (QWidget::setFocus): Handle the case where setting focus removed
us from the superview - this can happen due to style changes on
focus change.

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