18 years ago More dashboard region work.
rjw [Wed, 22 Sep 2004 01:13:10 +0000 (01:13 +0000)]
More dashboard region work.

Added support for computed style and cssText for new region property.
Added restriction on length types allowed in region functions.
Added initial and inheritance support for -apple-dashboard-region.

        Reviewed by Hyatt.

        * khtml/css/css_computedstyle.cpp:
        * khtml/css/css_valueimpl.cpp:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago Reviewed by Ken.
darin [Wed, 22 Sep 2004 00:41:01 +0000 (00:41 +0000)]
    Reviewed by Ken.

        - fixed problem where our updateLayout call ignores pending stylesheets all the time

        * khtml/xml/dom_docimpl.h: Added updateLayoutIgnorePendingStylesheets.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateLayout): Took out the "ignore pending stylesheets" business here.
        (DocumentImpl::updateLayoutIgnorePendingStylesheets): Put it in here.

        * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Call the new
        updateLayoutIgnorePendingStylesheets function.
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty): Ditto.
        (KJS::HTMLElement::putValue): Ditto.
        * khtml/ecma/kjs_views.cpp: (DOMAbstractViewFunc::tryCall): Ditto.
        * khtml/ecma/kjs_window.cpp:
        (Window::updateLayout): Ditto.
        (Selection::get): Ditto.
        (SelectionFunc::tryCall): Ditto.

        * khtml/html/html_imageimpl.h: Add ignorePendingStylesheets boolean parameter.
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::width): Respect new parameter.
        (HTMLImageElementImpl::height): Ditto.

        - tweaks

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Removed unneeded
        explicit "true" parameter to setSelection.
        (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Ditto.

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

18 years ago Reviewed by Ken.
darin [Wed, 22 Sep 2004 00:38:27 +0000 (00:38 +0000)]
    Reviewed by Ken.

        - fix crash when pasting text at the end of the document and then doing an undo

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::EditCommandImpl::apply): Call markMisspellingsInSelection before doing
        the editing operation, and we'll tell setSelection not to unmark the old selection.
        Also call updateLayout before calling appliedEditing so DOM operations in the
        code responding to the selection change will work.
        (khtml::EditCommandImpl::unapply): Ditto.
        (khtml::EditCommandImpl::reapply): Ditto.

        * khtml/khtml_part.h: Added a third parameter to setSelection to tell it whether
        to unmark the old selection. We must pass false when editing, because the old
        selection might have now-invalid offsets inside it.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Add unmarkOldSelection parameter, and respect it.
        (KHTMLPart::appliedEditing): Pass false for unmarkOldSelection.
        (KHTMLPart::unappliedEditing): Ditto.
        (KHTMLPart::reappliedEditing): Ditto.

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

18 years ago Part 2 of the feature requested in
rjw [Tue, 21 Sep 2004 22:12:14 +0000 (22:12 +0000)]
    Part 2 of the feature requested in
        <rdar://problem/3752791> Dashboard: Need a better solution for control regions

        This patch actually collections the regions and converts to absolute coordinates.
        Only remaining piece is to pass over the bridge and up the alley to WebKit
        UI delegate.

        Reviewed by Ken.

        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/khtmlview.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:

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

18 years agoWebCore:
sullivan [Tue, 21 Sep 2004 22:09:48 +0000 (22:09 +0000)]

        Reviewed by Darin.

        - WebCore part of fix for <rdar://problem/3618274> REGRESSION (125-135):
        Option-tab doesn't always work as expected

        * kwq/KWQKHTMLPart.mm:
        reworked logic to match what we promise in the UI; this worked correctly
        before for regular tabbing, but not for option-tabbing.

        * kwq/KWQButton.mm:
        check tabsToAllControls() rather than just WebCoreKeyboardAccessFull

        * kwq/KWQComboBox.mm:

        * kwq/KWQFileButton.mm:

        * kwq/KWQListBox.mm:


        Reviewed by Darin.

        - WebKit part of fix for <rdar://problem/3618274> REGRESSION (125-135):
        Option-tab doesn't always work as expected

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
        Don't set WebCoreKeyboardAccessFull when setting WebCoreKeyboardAccessTabsToLinks
        after all; these need to be tested independently to get the option-tab behavior


Fixed: <rdar://problem/3807365> REGRSSION (8A259): drag bookmark to Finder does not appear in Finder

        Reviewed by john.

        * BookmarksViewController.m:
        (-[BookmarksViewController outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:]): new, must implement this method on Tiger for promised drags to work

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

18 years ago * WebView.subproj/WebHTMLView.m:
sullivan [Tue, 21 Sep 2004 21:53:57 +0000 (21:53 +0000)]
    * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView doCommandBySelector:]):
        Commented out part of previous change; it breaks Mail editing until Mail
        fixes bug 3810158.

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

18 years ago * khtml/xml/dom_selection.cpp:
sullivan [Tue, 21 Sep 2004 21:18:35 +0000 (21:18 +0000)]
    * khtml/xml/dom_selection.cpp:
        initialize xPos to make compiler happy in deployment builds

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

18 years ago Reviewed by Ken.
sullivan [Tue, 21 Sep 2004 19:00:12 +0000 (19:00 +0000)]
    Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView doCommandBySelector:]):
        Fix build failure from previous checkin, d'oh! Didn't set up webview variable.

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

18 years ago Reviewed by Ken.
darin [Tue, 21 Sep 2004 18:31:16 +0000 (18:31 +0000)]
    Reviewed by Ken.

        - some small mechanical improvements to the position and selection classes

        * khtml/xml/dom_position.h: Added clear(), startPosition(), and endPosition().
        * khtml/xml/dom_position.cpp:
        (DOM::Position::clear): Added.
        (DOM::startPosition): Added.
        (DOM::endPosition): Added.

        * khtml/xml/dom_caretposition.h: Changed m_position to m_deepPosition. Added clear(),
        removed node() and offset().
        * khtml/xml/dom_caretposition.cpp:
        (DOM::CaretPosition::init): Updated for name change of m_position to m_deepPosition.
        (DOM::CaretPosition::isLastInBlock): Ditto.
        (DOM::CaretPosition::next): Ditto.
        (DOM::CaretPosition::previous): Ditto.
        (DOM::CaretPosition::debugPosition): Ditto.
        (DOM::CaretPosition::formatForDebugger): Ditto.

        * khtml/xml/dom_selection.h: Remove setStart, setEnd, setStartAndEnd, rangeStart, rangeEnd,
        and all the assignXXX functions.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Wean from assign functions, get and set data members directly.
        (DOM::Selection::init): Don't clear base, extent, start, and end, since they have constructors.
        (DOM::Selection::operator=): Wean from assign functions, get and set data members directly.
        (DOM::Selection::moveTo): Ditto.
        (DOM::Selection::setModifyBias): Ditto.
        (DOM::Selection::modifyExtendingRightForward): Ditto.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Ditto.
        (DOM::Selection::xPosForVerticalArrowNavigation): Ditto.
        (DOM::Selection::clear): Ditto.
        (DOM::Selection::setBase): Ditto.
        (DOM::Selection::setExtent): Ditto.
        (DOM::Selection::setBaseAndExtent): Ditto.
        (DOM::Selection::toRange): Ditto.
        (DOM::Selection::layoutCaret): Ditto.
        (DOM::Selection::needsCaretRepaint): Ditto.
        (DOM::Selection::validate): Ditto.
        (DOM::Selection::debugRenderer): Ditto.
        (DOM::Selection::debugPosition): Ditto.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::advanceToNextMisspelling): Tweaked whitespace.

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

18 years ago Reviewed by Ken.
sullivan [Tue, 21 Sep 2004 18:08:25 +0000 (18:08 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3809477> WebHTMLView needs to pass doCommandBySelector through delegate

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView doCommandBySelector:]):
        Call through to editing delegate. If editing delegate returns YES, don't call super.

        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webView:doCommandBySelector:]):
        default implementation (which was never called) was returning YES, but it should
        return NO to signal that it didn't handle the selector.

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

18 years agoWebCore:
cblu [Tue, 21 Sep 2004 17:06:47 +0000 (17:06 +0000)]

Fixed: <rdar://problem/3647229> Safari does not play inline Windows Media Content on some sites (miggy.net and ministryofsound.com)

        Reviewed by john.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): when no MIME type is specified map from the WMP CLASSID to the WMP MIME type, look for the URL of the content in the URL PARAM tag


Fixed: <rdar://problem/3647229> Safari does not play inline Windows Media Content on some sites (miggy.net and ministryofsound.com)

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
        (-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:]): set the plug-in before calling setting the attributes, so we can avoid passing certain attributes to the WMP plug-in that cause it to crash

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

18 years ago Reviewed by Maciej.
darin [Tue, 21 Sep 2004 01:16:39 +0000 (01:16 +0000)]
    Reviewed by Maciej.

        - fixed regression from my recent check-in where misspelled words do not get unmarked when moving the caret
        - changed CaretPosition to hold a Position instead of a node and offset
        - renamed isEmpty to isNull, etc.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::jumpToSelection): Updated for name changes.
        (KWQKHTMLPart::advanceToNextMisspelling): Ditto.
        (KWQKHTMLPart::fontForSelection): Ditto.
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): Ditto.
        (KWQKHTMLPart::markMisspellingsInSelection): Ditto.
        (KWQKHTMLPart::updateSpellChecking): Fixed bug by using LeftWordIfOnBoundary.

        * khtml/xml/dom_position.h: Updated for name changes.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::element): Change to not use a separate null check.
        (DOM::Position::computedStyle): Updated for name changes.
        (DOM::Position::previousCharacterPosition): Ditto.
        (DOM::Position::nextCharacterPosition): Ditto.
        (DOM::Position::equivalentRangeCompliantPosition): Ditto.
        (DOM::Position::equivalentShallowPosition): Ditto.
        (DOM::Position::equivalentDeepPosition): Ditto.
        (DOM::Position::closestRenderedPosition): Ditto.
        (DOM::Position::inRenderedContent): Ditto.
        (DOM::Position::inRenderedText): Ditto.
        (DOM::Position::isRenderedCharacter): Ditto.
        (DOM::Position::rendersInDifferentPosition): Ditto.
        (DOM::Position::isFirstRenderedPositionOnLine): Ditto.
        (DOM::Position::isLastRenderedPositionOnLine): Ditto.
        (DOM::Position::inFirstEditableInRootEditableElement): Ditto.
        (DOM::Position::leadingWhitespacePosition): Ditto.
        (DOM::Position::trailingWhitespacePosition): Ditto.
        (DOM::Position::debugPosition): Ditto.
        (DOM::Position::formatForDebugger): Ditto.

        * khtml/xml/dom_caretposition.h: Change to use m_position, and change names.
        * khtml/xml/dom_caretposition.cpp:
        (DOM::CaretPosition::CaretPosition): Remove code to set up m_node.
        (DOM::CaretPosition::init): Set m_position directly.
        (DOM::CaretPosition::isLastInBlock): Updated for name changes.
        (DOM::CaretPosition::next): Set m_position directly.
        (DOM::CaretPosition::previous): Set m_position directly.
        (DOM::CaretPosition::previousCaretPosition): Updated for name changes.
        (DOM::CaretPosition::nextCaretPosition): Ditto.
        (DOM::CaretPosition::previousPosition): Ditto.
        (DOM::CaretPosition::nextPosition): Ditto.
        (DOM::CaretPosition::atStart): Ditto.
        (DOM::CaretPosition::atEnd): Ditto.
        (DOM::CaretPosition::isCandidate): Ditto.
        (DOM::CaretPosition::debugPosition): Ditto.
        (DOM::CaretPosition::formatForDebugger): Ditto.
        (DOM::startOfWord): Ditto.
        (DOM::endOfWord): Ditto.
        (DOM::previousParagraphPosition): Ditto.
        (DOM::nextParagraphPosition): Ditto.

        * khtml/xml/dom_selection.h: Updated names. Added isCaret and isRange.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modifyMovingRightForward): Updated for name changes.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Ditto.
        (DOM::Selection::expandUsingGranularity): Ditto.
        (DOM::Selection::xPosForVerticalArrowNavigation): Ditto.
        (DOM::Selection::toRange): Ditto.
        (DOM::Selection::layoutCaret): Ditto.
        (DOM::Selection::needsCaretRepaint): Ditto.
        (DOM::Selection::validate): Ditto.
        (DOM::startOfFirstRunAt): Ditto.
        (DOM::endOfLastRunAt): Ditto.
        (DOM::selectionForLine): Ditto.
        (DOM::Selection::formatForDebugger): Ditto.

        * khtml/ecma/kjs_window.cpp:
        (Selection::get): Updated for name changes.
        (Selection::toString): Ditto.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::debugPosition): Ditto.
        (khtml::StyleChange::init): Ditto.
        (khtml::StyleChange::currentlyHasStyle): Ditto.
        (khtml::CompositeEditCommandImpl::deleteSelection): Ditto.
        (khtml::CompositeEditCommandImpl::deleteUnrenderedText): Ditto.
        (khtml::ApplyStyleCommandImpl::doApply): Ditto.
        (khtml::DeleteSelectionCommandImpl::doApply): Ditto.
        (khtml::InputNewlineCommandImpl::doApply): Ditto.
        (khtml::InputTextCommandImpl::prepareForTextInsertion): Ditto.
        (khtml::InputTextCommandImpl::input): Ditto.
        (khtml::ReplaceSelectionCommandImpl::doApply): Ditto.
        (khtml::MoveSelectionCommandImpl::doApply): Ditto.
        (khtml::TypingCommandImpl::doApply): Ditto.
        (khtml::TypingCommandImpl::markMisspellingsAfterTyping): Ditto.
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): Ditto.
        * khtml/editing/jsediting.cpp:
        (enabledAnySelection): Ditto.
        (enabledRangeSelection): Ditto.
        * khtml/khtml_part.cpp:
        (KHTMLPart::hasSelection): Ditto.
        (KHTMLPart::setFocusNodeIfNeeded): Ditto.
        (KHTMLPart::selectionLayoutChanged): Ditto.
        (KHTMLPart::timerEvent): Ditto.
        (KHTMLPart::isPointInsideSelection): Ditto.
        (KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::handleMousePressEventSingleClick): Ditto.
        (KHTMLPart::handleMouseMoveEventSelection): Ditto.
        (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
        (KHTMLPart::selectionHasStyle): Ditto.
        (KHTMLPart::selectionComputedStyle): Ditto.
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): Ditto.
        * khtml/xml/dom_positioniterator.cpp:
        (DOM::PositionIterator::peekPrevious): Ditto.
        (DOM::PositionIterator::peekNext): Ditto.
        (DOM::PositionIterator::atStart): Ditto.
        (DOM::PositionIterator::atEnd): Ditto.
        * khtml/xml/dom_positioniterator.h:
        (DOM::PositionIterator::isEmpty): Ditto.
        * kwq/KWQRenderTreeDebug.cpp:
        (writeSelection): Ditto.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge editableDOMRangeForPoint:]): Ditto.
        (-[WebCoreBridge deleteSelection]): Ditto.
        (-[WebCoreBridge ensureCaretVisible]): Ditto.
        (-[WebCoreBridge rangeOfCharactersAroundCaret]): Ditto.

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

18 years ago Reviewed by Maciej.
darin [Tue, 21 Sep 2004 00:28:00 +0000 (00:28 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3808073> find is broken

        * khtml/misc/khtml_text_operations.h: Add m_pastEndNode and change name of m_endNode to
        m_endContainer to more accurately reflect its purpose.
        * khtml/misc/khtml_text_operations.cpp:
        (khtml::TextIterator::TextIterator): Use pastEnd() for end of iteration, and change to
        handle bad ranges better: just return an empty iterator instead of raising an exception.
        (khtml::TextIterator::advance): Change to use m_pastEndNode to detect the end of iteration.
        (khtml::TextIterator::handleTextNode): Update for name change.
        (khtml::TextIterator::handleTextBox): Ditto.
        (khtml::TextIterator::range): Handle case where m_endContainer is nil.

        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::surroundContents): Use offsetInCharacters.
        (DOM::RangeImpl::startNode): Added check for nil start container and use offsetInCharacters.
        (DOM::RangeImpl::pastEndNode): Ditto.

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

18 years agoWebCore:
cblu [Mon, 20 Sep 2004 23:56:20 +0000 (23:56 +0000)]

Fixed: <rdar://problem/3781290> REGRESSION (Mail): Crash in ReplaceSelectionCommandImpl attaching file to new message

        Reviewed by kocienda.

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): setFocusNodeIfNeeded now works on the current selection so call setFocusNodeIfNeeded after setting the selection
        (KHTMLPart::clearSelection): don't call setFocusNodeIfNeeded with the current selection
        (KHTMLPart::setCaretVisible): ditto
        (KHTMLPart::setFocusNodeIfNeeded): do nothing if the part isn't focused, work with the current selection
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        (KHTMLPartPrivate::KHTMLPartPrivate): added m_isFocused
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): removed _displaysWithFocusAttributes this is replaced by m_isFocused
        (KWQKHTMLPart::setSelectionFromNone): new, code factored out from setDisplaysWithFocusAttributes
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): call setSelectionFromNone
        (KWQKHTMLPart::displaysWithFocusAttributes): now returns m_isFocused
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectionFromNone]): new


Fixed: <rdar://problem/3781290> REGRESSION (Mail): Crash in ReplaceSelectionCommandImpl attaching file to new message

        Reviewed by kocienda.

        * WebView.subproj/WebView.m:
        (-[WebView setEditable:]): call updateSelectionFromEmpty on the bridge if there is no selection

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

18 years ago Reviewed by Dave.
darin [Mon, 20 Sep 2004 23:26:23 +0000 (23:26 +0000)]
    Reviewed by Dave.

        - fixed nil-deref happening often in Mail when I delete

        * khtml/rendering/render_br.cpp: (RenderBR::selectionRect): Check for nil lastLeafChild.
        Dave may want to figure out why it's nil and do a different fix later.

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

18 years ago Reviewed by Richard.
mjs [Mon, 20 Sep 2004 21:53:19 +0000 (21:53 +0000)]
    Reviewed by Richard.

<rdar://problem/3672101> HANG: typing into login field at dws-direkt.deutsche-bank.de (infinite recursion)

* khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::defaultEventHandler): Copy the list of handlers
before firing any of them, in case a handler affects the list of
event handlers.

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

18 years agoWebCore:
cblu [Mon, 20 Sep 2004 21:36:27 +0000 (21:36 +0000)]

<rdar://problem/3429921> obey PARAM tags inside of OBJECT tags when necessary
<rdar://problem/3515685> Object tag in Java 1.4.1 / Safari doesn't recognize params

        Reviewed by darin.

        * khtml/khtml_part.cpp:
        (KHTMLPart::requestFrame): take 2 parameter arrays rather than 1 which will have to be parsed
        (KHTMLPart::requestObject): ditto
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): use PARAM tags when there is no EMBED specified
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): call renamed bridge method
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::KJavaAppletWidget): ditto
        * kwq/KWQStringList.h:
        * kwq/KWQStringList.mm:
        (QStringList::getNSArray): return a const array
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge URLWithAttributeString:]): renamed to match API


Changes to implement renamed bridge methods.

        Reviewed by darin.

        * ChangeLog:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMDocument URLWithAttributeString:]): call renamed bridge method
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): take 2 parameter arrays rather than 1 which will have to be parsed
        (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]): ditto

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

18 years ago Reviewed by Chris.
darin [Mon, 20 Sep 2004 20:21:16 +0000 (20:21 +0000)]
    Reviewed by Chris.

        * WebView.subproj/WebFramePrivate.h: Added back.
        * WebView.subproj/WebFrameViewPrivate.h: Removed.

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

18 years agoWebCore:
darin [Mon, 20 Sep 2004 18:54:11 +0000 (18:54 +0000)]

        Reviewed by Ken.

        - fixed <rdar://problem/3655360> REGRESSION (Mail): Ctrl-V emacs key binding, -pageDown: method, unimplemented (and pageUp, and selection-modifying versions)
        - fixed <rdar://problem/3735055> REGRESSION (Mail): WebCore double click rules treat style change as a boundary
        - fixed <rdar://problem/3789939> REGRESSION (Mail): double-clicking on border whitespace selects space plus word before/after
        - fixed <rdar://problem/3792138> REGRESSION (Mail): Spell checker doesn't check current selected word
        - fixed <rdar://problem/3806604> REGRESSION (164): Triple-click sometimes selects extra characters
        - fixed <rdar://problem/3806996> REGRESSION (125-162): Triple-click in <pre> tagged text behaves oddly (leuf.net)

        * khtml/xml/dom_caretposition.h: Added a lot of new functions. Removed implicit conversion operator
        that converts from CaretPosition to Position.
        * khtml/xml/dom_caretposition.cpp:
        (DOM::CaretPosition::CaretPosition): Change to call deepEquivalent so it works without the implicit
        Position conversion operator.
        (DOM::CaretPosition::operator=): Ditto.
        (DOM::CaretPosition::next): Ditto.
        (DOM::CaretPosition::previous): Ditto.
        (DOM::CaretPosition::setPosition): Added an assertion.
        (DOM::start): Added.
        (DOM::end): Added.
        (DOM::setStart): Added.
        (DOM::setEnd): Added.
        (DOM::previousWordBoundary): Added.
        (DOM::nextWordBoundary): Added.
        (DOM::startWordBoundary): Added.
        (DOM::startOfWord): Added.
        (DOM::endWordBoundary): Added.
        (DOM::endOfWord): Added.
        (DOM::previousWordPositionBoundary): Added.
        (DOM::previousWordPosition): Added.
        (DOM::nextWordPositionBoundary): Added.
        (DOM::nextWordPosition): Added.
        (DOM::previousLinePosition): Added.
        (DOM::nextLinePosition): Added.
        (DOM::startOfParagraph): Changed function name.
        (DOM::endOfParagraph): Changed function name. Fixed code in includeLineBreak to work around
        the CaretPosition constructor issue for <br>, pass the right parameter for the block flow case,
        and handle <pre> properly.
        (DOM::inSameParagraph): Added.
        (DOM::previousParagraphPosition): Added.
        (DOM::nextParagraphPosition): Added.

        * khtml/xml/dom_position.h: Removed a number of functions no longer used; also made some private.
        * khtml/xml/dom_position.cpp: Removed a number of functions no longer used.

        * khtml/xml/dom_selection.h: Replaced DOCUMENT with DOCUMENT_BOUNDARY. Added overloads of lots
        of functions that take CaretPosition directly. Added overload of modify that takes a parameter
        for vertical distance to help implement pageDown: and friends. Replaced getRepaintRect with
        two new functions named caretRect and caretRepaintRect. Removed nodeIsBeforeNode.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Added constructor that takes two CaretPosition objects.
        (DOM::Selection::setModifyBias): Added. Helper function.
        (DOM::Selection::modifyExtendingRightForward): Don't set modify bias, since that's now the caller's
        responsibility. Reimplement WORD and LINE in terms of new CaretPosition functions. Implement PARAGRAPH
        and change PARAGRAPH_BOUNDARY to use CaretPosition function by its new name.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Call setModifyBias, and use a switch statement instead of if.
        (DOM::caretY): Added. Helper for the new modify function that implements moving a pixel distance,
        used by pageDown: and friends.
        (DOM::Selection::modify): Added.
        (DOM::Selection::toRange): Use RangeImpl::compareBoundaryPoints instead of nodeIsBeforeNode.
        (DOM::Selection::caretRect): Added. Replaces getRepaintRect, but does not add slop.
        (DOM::Selection::caretRepaintRect): Added. Replaces getRepaintRect; still adds slop.
        (DOM::Selection::needsCaretRepaint): Call caretRepaintRect.
        (DOM::Selection::validate): Use RangeImpl::compareBoundaryPoints instead of nodeIsBeforeNode.
        Reimplement WORD to use new CaretPosition functions; this fixes the double-clicking problems.
        Change paragraph calls to use new names.

        * ForwardingHeaders/dom/dom_position.h: Removed. This was in the wrong location.
        * khtml/editing/htmlediting.cpp: Fixed include that said "dom/dom_position.h".
        * khtml/editing/htmlediting_impl.cpp: Fixed include that said "dom/dom_position.h".
        (khtml::TypingCommandImpl::markMisspellingsAfterTyping): Rewrote this to use the new CaretPosition
        functions instead of the old Position functions.

        * khtml/misc/helper.h: Added const to character pointer parameter. Also put invertedColor inside
        an !APPLE_CHANGES since it doesn't do us any good.
        * khtml/misc/helper.cpp:
        (khtml::findWordBoundary): Added const to character pointer parameter.
        (khtml::nextWordFromIndex): Ditto.

        * kwq/KWQTextUtilities.h: Change parameters to const.
        * kwq/KWQTextUtilities.cpp: (KWQFindWordBoundary): Change parameter to const.
        * kwq/KWQTextUtilities.mm: (KWQFindNextWordFromIndex): Change parameter to const.

        * khtml/css/cssstyleselector.cpp: Disable code that uses invertedColor when APPLE_CHANGES, since it
        won't work for us.

        * khtml/rendering/render_canvas.cpp: (RenderCanvas::setSelection): Added checks for selection end
        so we can set the selection end to nodes that are not leaf nodes and it will still work. Also took
        out bogus firstChild/lastChild loops for the same reason.

        * kwq/KWQKHTMLPart.h: Add "start before selection" flag to advanceToNextMisspelling.
        Needed to fix bug with spell checking.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::findString): Changed to use CaretPosition.
        (KWQKHTMLPart::advanceToNextMisspelling): Added code to handle "start before selection" flag
        and changed to use CaretPosition and new helper functions.
        (KWQKHTMLPart::markMisspellingsInSelection): More changes to use CaretPosition.
        (KWQKHTMLPart::updateSpellChecking): Ditto.

        * kwq/WebCoreBridge.h: Replaced WebSelectByDocument with WebSelectToDocumentBoundary.
        Added advanceToNextMisspellingStartingJustBeforeSelection,
        rangeByAlteringCurrentSelection:verticalDistance:, and

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge advanceToNextMisspellingStartingJustBeforeSelection]): Added.
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Added case for selecting by
        paragraph to save X position.
        (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]): Added.
        (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Added.
        (-[WebCoreBridge ensureCaretVisible]): Call caretRect instead of getRepaintRect.


        Reviewed by Ken.

        - fixed <rdar://problem/3655360> REGRESSION (Mail): Ctrl-V emacs key binding, -pageDown: method, unimplemented (and pageUp, and selection-modifying versions)
        - fixed <rdar://problem/3792138> REGRESSION (Mail): Spell checker doesn't check current selected word

        * WebView.subproj/WebFrameViewInternal.h: Moved WebFrameViewPrivate inside the WebFrameView.m file.
        Removed a bunch of methods that don't need to be seen in other files, and added _verticalPageScrollDistance.
        * WebView.subproj/WebFrameViewPrivate.h: Removed. Renamed to WebFrameViewInternal.h.
        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _verticalKeyboardScrollDistance]): Move in the file because of internal vs. private.
        (-[WebFrameView _shouldDrawBorder]): Ditto.
        (-[WebFrameView _tile]): Ditto.
        (-[WebFrameView _verticalPageScrollDistance]): Added. Separate method so it can be called
        by the code to implement pageDown:.
        (-[WebFrameView _drawBorder]): Move in the file because of internal vs. private.
        (-[WebFrameView _goBack]): Ditto.
        (-[WebFrameView _goForward]): Ditto.
        (-[WebFrameView _scrollVerticallyBy:]): Ditto.
        (-[WebFrameView _scrollHorizontallyBy:]): Ditto.
        (-[WebFrameView _horizontalKeyboardScrollDistance]): Ditto.
        (-[WebFrameView _horizontalPageScrollDistance]): Added. Separate method for consistency with
        vertical method above.
        (-[WebFrameView _pageVertically:]): Moved and changed to use _verticalPageScrollDistance.
        (-[WebFrameView _pageHorizontally:]): Moved and changed to use _horizontalPageScrollDistance.
        (-[WebFrameView _scrollLineVertically:]): Move in the file because of internal vs. private.
        (-[WebFrameView _scrollLineHorizontally:]): Ditto.
        (-[WebFrameView scrollPageUp:]): Ditto.
        (-[WebFrameView scrollPageDown:]): Ditto.
        (-[WebFrameView scrollLineUp:]): Ditto.
        (-[WebFrameView scrollLineDown:]): Ditto.
        (-[WebFrameView _firstResponderIsControl]): Ditto.
        (-[WebFrameView keyDown:]): Changed to eliminate _pageLeft, _lineLeft, _pageRight, and _lineRight.

        * WebView.subproj/WebDataSource.m: Use WebFrameView.h instead of WebFrameViewPrivate.h.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _alterCurrentSelection:verticalDistance:]): Added.
        (-[WebHTMLView moveToBeginningOfDocument:]): Use WebSelectToDocumentBoundary.
        (-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]): Ditto.
        (-[WebHTMLView moveToEndOfDocument:]): Ditto.
        (-[WebHTMLView moveToEndOfDocumentAndModifySelection:]): Ditto.
        (-[WebHTMLView moveParagraphBackwardAndModifySelection:]): Added.
        (-[WebHTMLView moveParagraphForwardAndModifySelection:]): Added.
        (-[WebHTMLView pageUp:]): Added.
        (-[WebHTMLView pageDown:]): Added.
        (-[WebHTMLView pageUpAndModifySelection:]): Added.
        (-[WebHTMLView pageDownAndModifySelection:]): Added.
        (-[WebHTMLView showGuessPanel:]): Changed to call advanceToNextMisspellingStartingJustBeforeSelection.
        This fixes the problem with spell checking.

        * WebView.subproj/WebImageView.m:
        (-[WebImageView webView]): Changed to use _web_parentWebView.
        (-[WebImageView menuForEvent:]): Changed to use [self webView].
        (-[WebImageView mouseDown:]): Ditto.
        (-[WebImageView mouseDragged:]): Ditto.
        (-[WebImageView draggedImage:endedAt:operation:]): Ditto.

        * WebView.subproj/WebTextView.m:
        (-[WebTextView _textSizeMultiplierFromWebView]): Changed to use _web_parentWebView.
        (-[WebTextView menuForEvent:]): Ditto.
        (-[WebTextView drawPageBorderWithSize:]): Ditto.
        (-[WebTextView knowsPageRange:]): Ditto.

        * Plugins.subproj/WebPluginDatabase.m: Updated filename of WebFrameViewInternal.h.
        * WebCoreSupport.subproj/WebBridge.m: Ditto.
        * WebKit.pbproj/project.pbxproj: Ditto.
        * WebView.subproj/WebFrame.m: Ditto.
        * WebView.subproj/WebView.m: Ditto.
        * Misc.subproj/WebNSViewExtras.m: Ditto.

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

18 years ago Reviewed by Ken.
darin [Mon, 20 Sep 2004 18:52:21 +0000 (18:52 +0000)]
    Reviewed by Ken.

        - cleaned up DOM::RangeImpl a little so compareBoundaryPoints can be used outside the class

        * khtml/xml/dom2_rangeimpl.h: Added const to many of the member functions and made the
        compareBoundaryPoints that works on parameters be a const member function.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::commonAncestorContainer): Added const.
        (DOM::RangeImpl::compareBoundaryPoints): Added const.
        (DOM::RangeImpl::boundaryPointsValid): Added const, and wrote cleaner version.
        (DOM::RangeImpl::insertNode): Simplified by calling containedByReadOnly.
        (DOM::RangeImpl::toString): Added const.
        (DOM::RangeImpl::toHTML): Added const.
        (DOM::RangeImpl::createContextualFragment): Added const.
        (DOM::RangeImpl::cloneRange): Added const.
        (DOM::RangeImpl::surroundContents): Simplified by calling containedByReadOnly.

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

18 years ago Reviewed by Ken.
darin [Mon, 20 Sep 2004 18:51:24 +0000 (18:51 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3806990> REGRESSION (125-162): Crash on Select All at http://leuf.net/cgi/wikidn?PerlConvertEolScript

        * khtml/rendering/render_replaced.cpp: (RenderWidget::setSelectionState): Added nil check for the

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

18 years ago Reviewed by Ken.
darin [Mon, 20 Sep 2004 18:50:49 +0000 (18:50 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3773740> calling addEventListener on a frame that hasn't loaded yet crashes

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Add nil checks for the document.
        The nil check prevents the crash but there's still a bug here; I filed 3807059 about that.

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

18 years ago Reviewed by Ken.
darin [Mon, 20 Sep 2004 18:49:50 +0000 (18:49 +0000)]
    Reviewed by Ken.

        - fixed problem where up and down arrow keys are not preserving X position

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectionLayoutChanged): Moved code to clear m_xPosForVerticalArrowNavigation out of here.
        (KHTMLPart::notifySelectionChanged): Moved it into here.

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

18 years agoFix filename.
darin [Mon, 20 Sep 2004 18:48:31 +0000 (18:48 +0000)]
Fix filename.

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

18 years ago Reviewed by Ken.
darin [Mon, 20 Sep 2004 18:47:32 +0000 (18:47 +0000)]
    Reviewed by Ken.

        - added helper method _web_parentWebView so fewer files need to get at WebFrame private methods

        * Misc.subproj/WebNSViewExtras.h: Added _web_parentWebView.
        * Misc.subproj/WebNSViewExtras.m: (-[NSView _web_parentWebView]): Added.

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

18 years ago Reviewed by Maciej.
darin [Sun, 19 Sep 2004 01:12:53 +0000 (01:12 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3805627> -[DOMRange _text] sometimes includes all text to the end of the document for certain ranges

        * khtml/misc/khtml_text_operations.cpp: (khtml::TextIterator::advance):
        Correctly handle the case when we are already on m_endNode. The concept here is that
        m_endNode is a node you must never "leave" when iterating.

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

18 years agochange version number to 2.0, 165u for TOT
vicki [Fri, 17 Sep 2004 19:22:35 +0000 (19:22 +0000)]
change version number to 2.0, 165u for TOT

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

18 years agoSafari-164 stamp for everything except WebBrowser. In these projects, CFBundleShortV...
vicki [Fri, 17 Sep 2004 19:06:13 +0000 (19:06 +0000)]
Safari-164 stamp for everything except WebBrowser.  In these projects, CFBundleShortVersionString matches CFBundleVersion (164 for both).

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

18 years ago Fixed:
cblu [Fri, 17 Sep 2004 18:10:10 +0000 (18:10 +0000)]
<rdar://problem/3805757> don't unnecessarily put RTFD on the pasteboard
<rdar://problem/3805756> strip attachments before generating RTF

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]): only put RTFD on the pasteboard if it has attachments, strip attachments when writing RTF

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

18 years ago Reviewed by me
kocienda [Fri, 17 Sep 2004 16:49:42 +0000 (16:49 +0000)]
    Reviewed by me

        * layout-tests/editing/selection/unrendered-004-expected.txt: Updated expected results.

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

18 years ago Reviewed by Darin
kocienda [Fri, 17 Sep 2004 16:44:24 +0000 (16:44 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3780245> REGRESSION (Mail): some lines are skipped when doing arrow navigation

        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousLinePosition): One-line fix. Make sure that BRs at the end of blocks
        are not skipped.

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

18 years ago Reviewed by Darin
kocienda [Fri, 17 Sep 2004 16:42:39 +0000 (16:42 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3805594> REGRESSION (Mail): Second return key stroke does not work when first was in blockquote

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::toRange): Code to convert caret positions moved the position upstream
        before making a range-compliant position, but erroneously would allow the position
        to cross blocks. Now it will no longer do so.

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

18 years ago Part 1 of the feature requested in
rjw [Fri, 17 Sep 2004 00:58:41 +0000 (00:58 +0000)]
    Part 1 of the feature requested in
        <rdar://problem/3752791> Dashboard: Need a better solution for control regions

        This patch implements the CSS parsing necessary for dashboard regions.
        Here's an example of the syntax we support:

        #aDiv {
                dashboard-region-circle(control 0 0 80 0)
                dashboard-region-circle(control 80 0 0 0);

Part 2 will determine the appropriate regions.

        Reviewed by Chris.

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/dom/css_value.h:

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

18 years ago - fixed caret-drawing regression from my last patch
darin [Thu, 16 Sep 2004 23:45:22 +0000 (23:45 +0000)]
    - fixed caret-drawing regression from my last patch

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::xPosForVerticalArrowNavigation): Pass false, meaning "vertical line caret"
        rather than true meaning "big box for overtyping".
        (DOM::Selection::layoutCaret): Ditto.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 23:09:22 +0000 (23:09 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3804648> 8A262: Safari crashed in -[WebView(WebPrivate) _editingDelegateForwarder] inside QuickTime Cocoa Plug-in during WebView deallocation

        * WebView.subproj/WebView.m: (-[WebView _editingDelegateForwarder]):
        Check _private for nil before dereferencing it.

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

18 years ago Reviewed by Ken.
darin [Thu, 16 Sep 2004 22:24:15 +0000 (22:24 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3803280> crash in selectAll on page with no contents

        * khtml/khtml_part.cpp: (KHTMLPart::selectAll): Handle case of 0 for documentElement().
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordPosition): Ditto.
        (DOM::Position::nextWordPosition): Ditto.

        - cleaned up caret code
        - changed DOM::Selection to use CaretPosition more

        * khtml/rendering/render_box.cpp: (RenderBox::caretRect): Change to use empty rectangles
        instead of an X value of -1 to mean no rectangle.
        * khtml/rendering/render_image.cpp: (RenderImage::selectionRect): Take advantage of the
        fixed QRect constructor.
        * khtml/rendering/render_object.cpp: (RenderObject::caretRect): Change to use empty
        rectangle instead of an X value of -1 to mean no rectangle.
        * khtml/rendering/render_text.cpp: (RenderText::caretRect): Cleaned up, and changed to use
        an empty rectangle instead of an X value of -1 to mean no rectangle.

        * khtml/xml/dom_caretposition.h: Made conversion from Position to CaretPosition something you
        can do implicitly, since it's an unambiguous conversion. Conversion in the other direction
        needs to be done explicitly. Moved EIncludeLineBreak here, and added startParagraphBoundary
        and endParagraphBoundary functions.
        * khtml/xml/dom_caretposition.cpp:
        (DOM::startParagraphBoundary): Added. Replaces, and made from, member function of DOM::Position.
        (DOM::endParagraphBoundary): Ditto.

        * khtml/xml/dom_position.h: Removed EIncludeLineBreak and startParagraphBoundary and
        * khtml/xml/dom_position.cpp: Removed startParagraphBoundary and endParagraphBoundary.

        * khtml/xml/dom_selection.h: Use CaretPosition instead of Position in a few places.
        Use a QRect for the caret rect. Change nodeIsBeforeNode to be a static member function.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Change caret to store QRect instead of 3 separate fields.
        (DOM::Selection::init): Ditto.
        (DOM::Selection::operator=): Ditto.
        (DOM::Selection::modifyExtendingRightForward): Change to use CaretPosition instead of Position.
        Check for 0.
        (DOM::Selection::modifyMovingRightForward): Ditto. Check for 0.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Ditto.
        (DOM::Selection::layoutCaret): Change to use a QRect for the caret rect, and use an empty
        one to mean no rectangle.
        (DOM::Selection::getRepaintRect): Ditto.
        (DOM::Selection::paintCaret): Ditto.
        (DOM::Selection::validate): Change to use CaretPosition instead of Position. Also fixed
        PARAGRAPH_BOUNDARY, which was broken and doing the same thing as PARAGRAPH before, but
        it's not really used so that didn't matter. Check for 0.
        (DOM::Selection::nodeIsBeforeNode): Tightened up a bit and added some FIXMEs. This function
        has a number of problems and should probably be discarded in favor of the DOMStringImpl
        method that does the same thing.

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 16 Sep 2004 21:16:25 +0000 (21:16 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3787168> REGRESSION (Mail): Deleting text from the beginning of a quoted range removes the quoting from the rest

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::moveNodesAfterNode): Only move the text nodes (and their siblings) when
        doing this move between blocks. This serves to mimic NSText behavior very well.

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

18 years ago Fixed: <rdar://problem/3779150> REGRESSION: images not copied when copying HTML...
cblu [Thu, 16 Sep 2004 18:38:53 +0000 (18:38 +0000)]
Fixed: <rdar://problem/3779150> REGRESSION: images not copied when copying HTML in Safari and pasting into TextEdit

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]): use RTFDFromRange:: for RTFD
        * WebView.subproj/WebHTMLViewPrivate.h:

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

18 years ago - fixed Panther build
darin [Thu, 16 Sep 2004 04:57:57 +0000 (04:57 +0000)]
    - fixed Panther build

        * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityActionDescription:]): Fixed backwards
        check in #if that was compiling the code on Panther only rather than Tiger only.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 00:57:57 +0000 (00:57 +0000)]
    Reviewed by John.

        - fixed lockFocus exception I observed; perhaps not a real issue in the field due to exception blocking

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::imageFromRect): Put most of the function inside a
        big if statement to avoid the exception we get from lockFocus otherwise.

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

18 years ago Reviewed by Dave.
darin [Thu, 16 Sep 2004 00:57:38 +0000 (00:57 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3786467> REGRESSION (Mail): Reproducible crash replying to an HTML message when your preference is for plain text composing.

        * khtml/rendering/render_block.h: Remove removeChildrenFromLineBoxes.
        * khtml/rendering/render_block.cpp: (khtml::RenderBlock::removeChild): Remove calls
        to removeChildrenFromLineBoxes which was the old way of working around this.
        * khtml/rendering/render_flow.cpp: (RenderFlow::detach): Add comments and code to handle
        removing children from line boxes we are about to delete.

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

18 years ago Fixed <rdar://problem/3781561> REGRESSION (Mail): typing in Mail became suddenly...
rjw [Thu, 16 Sep 2004 00:52:49 +0000 (00:52 +0000)]
Fixed <rdar://problem/3781561> REGRESSION (Mail): typing in Mail became suddenly really sluggish (substitute font code)

A DocumentMarker may begin before the InLineBox that includes
it.  Ensure that we correctly handle that case.  The paintMarker()
method and code that calls it could do with some cleanup to
make it clearer how all the cases are handled, i.e. marker
within box, or intersecting beginning or end of box.

        Reviewed by Darin.

        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintMarker):  Minimal change to ensure that we
handle the case of marker starting before box.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 00:51:29 +0000 (00:51 +0000)]
    Reviewed by John.

        - get rid of some of the localizable strings in here; we still have to figure out
          how we're going to localize the last few role descriptions

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject roleDescription]): Use NSAccessibilityRoleDescription for most
        descriptions instead of a hard-coded string (inside the UI_STRING placeholder).
        (-[KWQAccObject accessibilityActionDescription:]): Same thing, with NSAccessibilityActionDescription.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 00:46:52 +0000 (00:46 +0000)]
    Reviewed by John.

        - did some QRect-related changes to facilitate later bug fixing

        * kwq/KWQPainter.h: Added fillRect overload that takes QRect to match the real Qt one.
        * kwq/KWQPainter.mm: (QPainter::fillRect): Added overload that takes QRect.

        * kwq/KWQRect.mm: (QRect::QRect): Change default constructed QRect to have a width and
        height of 0 rather than 1. Contrary to what we believed earlier, this is what Qt does.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 00:41:40 +0000 (00:41 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3799512> REGRESSION (Mail): caret flashes 1 pixel too far to the left

        * khtml/rendering/render_text.cpp: (RenderText::caretRect): Added one to the horizontal position
        of the caret rect.

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

18 years ago Reviewed by John.
darin [Thu, 16 Sep 2004 00:31:07 +0000 (00:31 +0000)]
    Reviewed by John.

        - fixed assertion I saw using the font panel

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _colorAsString:]):
        Convert color space before trying to get R, G, and B components.

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

18 years ago Reviewed by Hyatt
kocienda [Wed, 15 Sep 2004 20:58:30 +0000 (20:58 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): The whitespace fixup code
        that makes sure proper whitespace renders after deletion was getting confused
        in cases where the deletion merged blocks. Basically, I needed to move some
        whitespace fixup code so it runs before deleting in the case where blocks
        need to be merged. It used to run after, and was getting confused by
        whitespace left over at the ends of the block after the deletion.
        * layout-tests/editing/deleting/delete-block-merge-contents-012-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-012.html: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-013-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-013.html: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-014-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-014.html: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-015-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-015.html: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-016-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-016.html: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-017-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-merge-contents-017.html: Added.

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

18 years ago Fixed: <rdar://problem/3802232> REGRESSION (Mail): WebCore Editing must do smart...
cblu [Wed, 15 Sep 2004 18:26:35 +0000 (18:26 +0000)]
Fixed: <rdar://problem/3802232> REGRESSION (Mail): WebCore Editing must do smart copy

        Reviewed by kocienda.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _writeSelectionToPasteboard:]): call instance method not class method to get pasteboard types since the types depends on the current selection granularity
        (-[WebHTMLView pasteboardTypesForSelection]): if the selection granularity is "word" include the smart pasteboard type
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]): put nil on the pasteboard for smart copy

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

18 years ago Reviewed by Hyatt
kocienda [Wed, 15 Sep 2004 18:02:05 +0000 (18:02 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::moveNodesAfterNode): Renamed from moveNodesToBlock.
        Just some simplification and cleanup in this function.
        (khtml::DeleteSelectionCommandImpl::doApply): Remove a hunk of start-of-block code I thought
        I was going to get around to improving and refining. However, I no longer need this case.
        * khtml/editing/htmlediting_impl.h: Function name change.

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

18 years agoRemove stray change marker.
darin [Wed, 15 Sep 2004 17:36:39 +0000 (17:36 +0000)]
Remove stray change marker.

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

18 years ago Reviewed by Maciej.
darin [Wed, 15 Sep 2004 05:57:49 +0000 (05:57 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3788894> REGRESSION (Mail): ctrl-t emacs key binding does not work (transpose)
        - fixed <rdar://problem/3798946> REGRESSION (Mail): Cursor does not disappear when typing

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView keyDown:]): Hide cursor by calling setHiddenUntilMouseMoves:YES.
        (-[WebHTMLView transpose:]): Added.

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

18 years ago Reviewed by Maciej.
darin [Wed, 15 Sep 2004 05:55:43 +0000 (05:55 +0000)]
    Reviewed by Maciej.

        - added method for fix to <rdar://problem/3788894> REGRESSION (Mail): ctrl-t emacs key binding does not work (transpose)

        * kwq/WebCoreBridge.h: Added rangeOfCharactersAroundCaret.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge rangeOfCharactersAroundCaret]): Added.

        * khtml/xml/dom_caretposition.h: Added range function to make a Range from two CaretPosition objects.
        * khtml/xml/dom_caretposition.cpp:
        (DOM::CaretPosition::rangeCompliantEquivalent): Fixed a bug in this that caused it to screw up
        ranges in text nodes. Also changed it to use offset 0 as Ken and I discussed.
        (DOM::range): Added.

        * kwq/DOM.mm: (-[DOMRange description]): Added.

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

18 years ago Reviewed by John.
darin [Wed, 15 Sep 2004 03:05:23 +0000 (03:05 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3786986> REGRESSION: TEXTAREAs have extra wide right margins where the scrollbars used to be

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _updateTextViewWidth]): Renamed from _frameSizeChanged. Now uses the width of
        the size from the contentSize method rather than trying to compute a size.
        (-[KWQTextArea initWithFrame:]): Call method by new name.
        (-[KWQTextArea tile]): Override this instead of setFrame: to adjust the size as the size of
        the text area changes.

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

18 years ago Fixed typo in header comment.
rjw [Wed, 15 Sep 2004 02:59:01 +0000 (02:59 +0000)]
   Fixed typo in header comment.

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

18 years agoWebKit:
rjw [Wed, 15 Sep 2004 02:48:37 +0000 (02:48 +0000)]
        1.  Add class parameter to object allocation function.  This is somewhat redundant, given that
        the allocation function is in the class function vector, but people wanted to use the same
        allocation function for different classes.

        2.  Renamed NPN_Class to NPN_Invoke to match the name in the function vector.

        3.  Add support for a default function on an object.  This is a feature that ActiveX supports,
        and will allow JavaScript code to be written that will look exactly the same for both ActiveX
        plugins and Netscape or WebKit plugins.  There are implementations included for the 'C' and
        'Objective-C' bindings.

        There bugs are covered by

        <rdar://problem/3776343> Support for default functions in the JavaScript bindings
        <rdar://problem/3779186> NPN_Call needs to be renamed to NPN_Invoke
        <rdar://problem/3674754> Need to implement latest npruntime.h

        Reviewed by John.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]):
        * Plugins.subproj/WebScriptObject.h:
        * Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:

        1.  Add class parameter to object allocation function.  This is somewhat redundant, given that
        the allocation function is in the class function vector, but people wanted to use the same
        allocation function for different classes.

        2.  Renamed NPN_Class to NPN_Invoke to match the name in the function vector.

        3.  Add support for a default function on an object.  This is a feature that ActiveX supports,
        and will allow JavaScript code to be written that will look exactly the same for both ActiveX
        plugins and Netscape or WebKit plugins.  There are implementations included for the 'C' and
        'Objective-C' bindings.

        There bugs are covered by

        <rdar://problem/3776343> Support for default functions in the JavaScript bindings
        <rdar://problem/3779186> NPN_Call needs to be renamed to NPN_Invoke
        <rdar://problem/3674754> Need to implement latest npruntime.h

        Reviewed by John.

        * bindings/NP_jsobject.cpp:
        * bindings/c/c_class.cpp:
        * bindings/c/c_instance.cpp:
        * bindings/c/c_instance.h:
        * bindings/c/c_runtime.cpp:
        * bindings/c/c_runtime.h:
        * bindings/jni/jni_instance.cpp:
        * bindings/jni/jni_instance.h:
        * bindings/npruntime.cpp:
        * bindings/npruntime.h:
        * bindings/objc/WebScriptObject.h:
        * bindings/objc/objc_class.mm:
        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        * bindings/runtime.h:
        * bindings/runtime_object.cpp:
        * bindings/runtime_object.h:

Reworked NetscapeMoviePlugIn to better test and illustrate
scripting APIs.

        Reviewed by John.

        * CarbonWeb/MyWebUIAdapter.m:
        (-[MyWebUIAdapter webView:runJavaScriptAlertPanelWithMessage:]):
        (-[MyWebUIAdapter webView:runJavaScriptConfirmPanelWithMessage:]):
        (-[MyWebUIAdapter webView:runJavaScriptTextInputPanelWithPrompt:defaultText:]):
        * CarbonWeb/TWebWindow.cp:
        * NetscapeMoviePlugIn/MovieObject.c: Added.
        * NetscapeMoviePlugIn/MovieObject.h: Added.
        * NetscapeMoviePlugIn/NetscapeMoviePlugIn.xcode/project.pbxproj:
        * NetscapeMoviePlugIn/PluginObject.c: Added.
        * NetscapeMoviePlugIn/PluginObject.h: Added.
        * NetscapeMoviePlugIn/main.c:
        * NetscapeMoviePlugIn/movie.h: Added.
        * NetscapeMoviePlugIn/movie.html:
        * makefile:

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

18 years ago Reviewed by Darin.
mjs [Wed, 15 Sep 2004 00:16:34 +0000 (00:16 +0000)]
    Reviewed by Darin.

<rdar://problem/3794735> Gmail- sending a very long message with Safari is so slow it seems like a hang

* kjs/string_object.cpp:
        (StringProtoFuncImp::call): Replaced implementation of replace()
method with function below...
(replace): In order to avoid excessive allocation and copying,
figure out the ranges of the original string and replacement
strings to be assembled, instead of constantly creating new
strings at each substitution. The old behavior is basically O(N^2)
for a global replace on a pattern that matches many places in the
        (regExpIsGlobal): Helper function for the above.
        (expandSourceRanges): ditto
        (pushSourceRange): ditto
        (expandReplacements): ditto
        (pushReplacement): ditto
        * kjs/ustring.cpp:
(KJS::UString::spliceSubstringsWithSeparators): New method that
pieces together substring ranges of this string together with
specified separators, all at one go.
        * kjs/ustring.h:
        (KJS::UString::Range::Range): Added new helper class to represent
substring choices.

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

18 years ago Backed out my changes to these files. They were not meant to be checked. (I'm having...
cblu [Tue, 14 Sep 2004 23:41:52 +0000 (23:41 +0000)]
Backed out my changes to these files. They were not meant to be checked. (I'm having a bad CVS day)

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]):
        (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:]):
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:]):
        (-[WebCoreBridge replaceSelectionWithText:selectReplacement:]):

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

18 years ago Fix the crash in the layout tests caused by my recent selection changes. Simply...
hyatt [Tue, 14 Sep 2004 23:41:25 +0000 (23:41 +0000)]
Fix the crash in the layout tests caused by my recent selection changes.  Simply eliminate the buggy
selection border setting code and let isSelectionBorder be implemented in terms of the SelectionState.

        Reviewed by kocienda

        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:

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

18 years ago Fixed: <rdar://problem/3778680> REGRESSION: plug-in content sometimes doesn't show up
cblu [Tue, 14 Sep 2004 23:35:50 +0000 (23:35 +0000)]
Fixed: <rdar://problem/3778680> REGRESSION: plug-in content sometimes doesn't show up

        Reviewed by dave.

        * khtml/html/html_objectimpl.cpp:
        (HTMLObjectElementImpl::parseHTMLAttribute): set needWidgetUpdate to true only if there is a renderer
        (HTMLObjectElementImpl::attach): if needWidgetUpdate is true, call updateWidget

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

18 years agoJavaScriptCore:
mjs [Tue, 14 Sep 2004 22:14:01 +0000 (22:14 +0000)]

        Reviewed by Darin.

- fixed <rdar://problem/3800315> encode-URI-test layout test is failing

        * kjs/function.cpp:
        (KJS::GlobalFuncImp::call): Make sure to escape null
characters. This is a bug in the new code that made part of the
test fail.


        Reviewed by Darin.

- fixed <rdar://problem/3800315> encode-URI-test layout test is failing
- updated escape/encodeURI layout test to match our new, more
compatible behavior.

        * layout-tests/fast/js/global/encode-URI-test.html:

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

18 years ago Reviewed by Richard
kocienda [Tue, 14 Sep 2004 22:03:25 +0000 (22:03 +0000)]
    Reviewed by Richard

        Fix for this bug:

        <rdar://problem/3800834> REGRESSION (Mail): Can't delete backwards past quoted text using HTML editing

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): Use CaretPosition class to get superior
        smarts about the selection to delete in the "start of block" case. This fixes the bug.
        While I was in the neighborhood, I cleaned up this function a bit.
        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3800834-fix.html: Added.

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

18 years ago Reviewed by me
kocienda [Tue, 14 Sep 2004 20:48:12 +0000 (20:48 +0000)]
    Reviewed by me

        * khtml/css/parser.cpp: Did not regenerate this file from parser.y before last checkin.

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

18 years ago Fixed typos in last check-in.
cblu [Tue, 14 Sep 2004 20:34:43 +0000 (20:34 +0000)]
Fixed typos in last check-in.

        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.mm:

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

18 years ago Fix for 3667862, regression where dragging of selection became really slow. This...
hyatt [Tue, 14 Sep 2004 20:16:47 +0000 (20:16 +0000)]
Fix for 3667862, regression where dragging of selection became really slow.  This patch completely rewrites
selection painting and drawing so that the enclosing rect is much more snug.  The containing block rect is no
longer used at all.

        Reviewed by NOBODY (OOPS!).

        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_canvas.h:
        * khtml/rendering/render_container.cpp:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:
        * kwq/KWQPainter.mm:

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 14 Sep 2004 20:16:09 +0000 (20:16 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3794376> vertical formatting lines that show quote level are missing

        Rolling out change Dave made to fix 3787686. It turns out that we do not want this
        change, as it does not appear to have any effect on the bug. In addition, it caused
        the regression in quote bar behavior.

        * khtml/css/parser.cp
        * khtml/css/parser.y

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

18 years ago Fixed: Control-click shouldn't cause deselect when clicking selection.
cblu [Tue, 14 Sep 2004 18:52:52 +0000 (18:52 +0000)]
Fixed: Control-click shouldn't cause deselect when clicking selection.

        Reviewed by rjw.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendContextMenuEvent): don't attempt to select the closest word when the selection is clicked

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

18 years ago Fixed badness that my last patch caused. Because there was a conflict, my last patch...
cblu [Tue, 14 Sep 2004 18:29:56 +0000 (18:29 +0000)]
Fixed badness that my last patch caused. Because there was a conflict, my last patch added stuff that darin had just removed.

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendContextMenuEvent): don't call deref on the view

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

18 years ago Fixed: <rdar://problem/3783595> REGRESSION (Mail): control-click does not select...
cblu [Tue, 14 Sep 2004 18:13:19 +0000 (18:13 +0000)]
Fixed: <rdar://problem/3783595> REGRESSION (Mail): control-click does not select closest word

        Reviewed by kocienda.

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectionGranularity): new getter, need this for an upcoming patch
        (KHTMLPart::selectClosetWordFromMouseEvent): new, factored from handleMousePressEventDoubleClick
        (KHTMLPart::handleMousePressEventDoubleClick): call selectClosetWordFromMouseEvent
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendContextMenuEvent): call selectClosetWordFromMouseEvent if nothing swallows the event

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

18 years ago Reviewed by John
kocienda [Tue, 14 Sep 2004 16:54:12 +0000 (16:54 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3800346> Inserting newline in BR after block not working

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputNewlineCommandImpl::doApply): The code to insert the "extra" BR at the end
        of blocks (hack done to make BRs show up when they appear at the ends of blocks) did not
        cover this one quirky case where the insertion point can be placed in a BR at the end of
        a block that does actually render. Now the input newline code can handle this addtional
        * layout-tests/editing/selection/insert-3800346-fix-expected.txt: Added.
        * layout-tests/editing/selection/insert-3800346-fix.html: Added.

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

18 years ago Reviewed by Ken.
darin [Tue, 14 Sep 2004 16:22:13 +0000 (16:22 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3479392> REGRESSION (Mail): select all does not select all at some pages

        * khtml/xml/dom_caretposition.cpp: (DOM::CaretPosition::deepEquivalent):
        Use caretMaxOffset instead of maxOffset when descending to the last node.
        Also change around the function a bit.

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

18 years ago Reviewed by Maciej.
darin [Tue, 14 Sep 2004 06:03:20 +0000 (06:03 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3710123> Loading iframe that replaces content in the parent document crashes Safari (Oracle Portal)

        This is a more complete fix, but it requires the previous attempt at a fix for this same
        bug below, because this is only the "don't destroy the KHTMLPart" portion; other fixes are
        still needed to survive shutdown of the part.

        * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::interpreter): Call the new keepAlive method.
        This is called whenever we're about to use an interpreter to run some JavaScript, and
        it's JavaScript that might destroy the part, hence the interpreter.

        * khtml/khtml_part.h: Added keepAlive() and slotEndLifeSupport() member functions.
        * khtml/khtmlpart_p.h: Added m_lifeSupportTimer.
        * khtml/khtml_part.cpp:
        (KHTMLPart::init): Connects m_lifeSupportTimer to slotEndLifeSupport.
        (KHTMLPart::write): Removed old attempt to work around this issue.
        (KHTMLPart::end): Ditto.
        (KHTMLPart::keepAlive): Added. References the part, then sets up a one-shot timer.
        (KHTMLPart::slotEndLifeSupport): Added. Stops the timer and then removes the reference
        from the part, possibly destroying it.

        * kwq/KWQSlot.mm:
        (KWQSlot::KWQSlot): Added the new slot to the list of slots.
        (KWQSlot::call): Ditto.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::sendResizeEvent): Removed an old attempt to work around this same issue.
        (KWQKHTMLPart::mouseDown): Ditto.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Ditto.
        (KWQKHTMLPart::sendContextMenuEvent): Ditto.

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

18 years ago Reviewed by Maciej.
darin [Tue, 14 Sep 2004 04:48:02 +0000 (04:48 +0000)]
    Reviewed by Maciej.

        - fixed regression caused by change earlier today

        * khtml/xml/dom_selection.cpp: (DOM::Selection::modifyExtendingRightForward):
        Use CaretPosition for CHARACTER, not WORD.

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

18 years ago Reviewed by Kevin.
darin [Mon, 13 Sep 2004 22:45:15 +0000 (22:45 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3798453> DIG failure: getting variable with same name as DOM element attribute gets attribute value instead

        * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): When adding current target and
        other event handler scope, put it below the existing scope chain. This ensures that things
        found in the function's scope will come before the event handler, as in other browsers.

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

18 years ago Reviewed by Kevin and Maciej.
darin [Mon, 13 Sep 2004 22:44:28 +0000 (22:44 +0000)]
    Reviewed by Kevin and Maciej.

        - new function to support fix for DIG bug in WebCore

        * kjs/scope_chain.h: Added new push function that pushes another entire scope chain.
        * kjs/scope_chain.cpp: (KJS::ScopeChain::push): Ditto.

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

18 years ago Reviewed by Darin
kocienda [Mon, 13 Sep 2004 21:36:27 +0000 (21:36 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3798346> REGRESSION (125-162): crash pushing down arrow key on KLM.com site

        * khtml/xml/dom_position.cpp:
        (DOM::Position::nextLinePosition): This function was being called in a case where it was not expected
        until we traced the code. It has to do with some deeper issues associated with handling arrow keys,
        resulting in the editing arrow-down code running in a case where we are not editing. I discussed this
        with Darin, and we decided to handle the broader issues at a later date. The fix I am checking in
        here to fix the bug is merely avoiding a null-deref.

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

18 years ago D'oh. How many times can I screw up a simple fix!
rjw [Mon, 13 Sep 2004 20:38:08 +0000 (20:38 +0000)]
    D'oh.  How many times can I screw up a simple fix!

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer initWithFont:usingPrinterFont:]):

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

18 years ago Reviewed by John
kocienda [Mon, 13 Sep 2004 20:17:29 +0000 (20:17 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3784840> REGRESSION (Mail): Text is inserted in the wrong place after changing typing style

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputTextCommandImpl::prepareForTextInsertion): Code to handle typing style did not
        check to see if the reference node used for the DOM node insertion operation was a block.
        If it is, then the new node containing the new editing style now is inserted at the start of the block,
        instead of after it.

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

18 years ago Fixed snafu from 3782533 checkin.
rjw [Mon, 13 Sep 2004 19:32:57 +0000 (19:32 +0000)]
    Fixed snafu from 3782533 checkin.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer initWithFont:usingPrinterFont:]):

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

18 years ago Reviewed by me
kocienda [Mon, 13 Sep 2004 18:39:31 +0000 (18:39 +0000)]
    Reviewed by me

        Added a couple new layout tests to cover recent changes.

        * layout-tests/editing/editing.js: Added some new functions to do by-word selection movement.
        * layout-tests/editing/selection/move-backwords-by-word-001-expected.txt: Added.
        * layout-tests/editing/selection/move-backwords-by-word-001.html: Added.
        * layout-tests/editing/selection/selection-3748164-fix-expected.txt: Added.
        * layout-tests/editing/selection/selection-3748164-fix.html: Added.

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

18 years ago Reviewed by John
kocienda [Mon, 13 Sep 2004 18:25:22 +0000 (18:25 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3765519> REGRESSION (Mail): word movement goes too far upstream at start of line

        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordPosition): Use downstream position here when making final placement of caret.

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

18 years ago Reviewed by Darin
kocienda [Mon, 13 Sep 2004 18:06:38 +0000 (18:06 +0000)]
    Reviewed by Darin

        Various editing improvements, many focused on the improvements made possible by the
        new CaretPosition class.

        Includes fixes for these bugs:

        <rdar://problem/3748164> REGRESSION (Mail): Arrow navigation in typical mail message can result in stuck caret
        <rdar://problem/3782062> REGRESSION (Mail): option-delete can delete almost all of a message when it has trouble finding a word
        <rdar://problem/3790456> triple click does not select entire paragraph (folklore.org)

        * WebCore.pbproj/project.pbxproj: Added CaretPosition class files.
        * khtml/dom/dom2_range.h:
        (DOM::offsetInCharacters): Moved this helper here from khtml_text_operations.cpp. This
        function helps to determine how to interpret the offsets used in DOM Ranges.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputNewlineCommandImpl::doApply): Use CaretPosition class to make "end-of-block" determination.
        Also, fix a caret placement glitch in "case 1" in the code: Place the caret in the node after the inserted
        BR. This makes it show up in the right place.
        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventDoubleClick): Don't limit double-click and triple-click handling only to text nodes.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::selectAll): Use CaretPosition class to implement improved selectAll.
        * khtml/misc/khtml_text_operations.cpp:
        (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Make a fix to the initial state setting of
        m_handledChildren. This is true if the offset into the end node is 0, meaning that we do not want to descend
        into its children at all.
        * khtml/xml/dom_caretposition.cpp: Added.
        * khtml/xml/dom_caretposition.h: Added.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::traverseNextNode): Fix bugs with the stayWithin implementation. We could miss nodes we want to test
        due to an erroneous check of stayWithin when no such check is needed.
        (NodeImpl::traverseNextSibling): Ditto.
        (NodeImpl::traversePreviousNodePostOrder): Ditto.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::Position): Remove spurious semi-colon.
        (DOM::Position::upstream): Move incoming Position to its equivalentDeepPosition. This is part of the transition
        that will make this code work better with increased use of CaretPosition.
        (DOM::Position::downstream): Ditto.
        (DOM::Position::atStartOfContainingEditableBlock): Removed. Dead code; was not being called.
        (DOM::Position::atStartOfRootEditableElement): Removed. Dead code; was not being called.
        (DOM::Position::isLastRenderedPositionInEditableBlock): Removed. Replaced with calls to CaretPosition class.
        (DOM::Position::inLastEditableInRootEditableElement): Removed. Dead code; was not being called.
        (DOM::Position::inFirstEditableInRootEditableElement): Removed. Was only being called by other code that has been removed.
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modifyExtendingRightForward): Moved implementation of CHARACTER case to use CaretPosition class instead
        of Position class helpers.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::validate): Made simplifications in code that used to call a concoction of Position class helpers to
        do the right thing. Now calls CaretPosition equivalents.

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

18 years ago Support for: <rdar://problem/3794790> drop rate or time remaining from download...
cblu [Mon, 13 Sep 2004 17:56:28 +0000 (17:56 +0000)]
Support for: <rdar://problem/3794790> drop rate or time remaining from download status when window is too small to fit it

        Reviewed by john.

        * Misc.subproj/WebStringTruncator.h:
        * Misc.subproj/WebStringTruncator.m:
        (+[WebStringTruncator widthOfString:font:]): new

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

18 years ago Reviewed by me
kocienda [Mon, 13 Sep 2004 17:19:35 +0000 (17:19 +0000)]
    Reviewed by me

        This test was broken. The result is that it was not testing what it was supposed to
        be testing. I fixed the test and updated the expected results.

        * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt
        * layout-tests/editing/selection/move-between-blocks-no-001.html

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

18 years ago Reviewed by John
kocienda [Mon, 13 Sep 2004 16:43:38 +0000 (16:43 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/3784835> REGRESSION (Mail): crash in DOM::ElementImpl::tagName inside delete text command code while editing a Mail message
        <rdar://problem/3788015> REGRESSION (Mail): Crash deleting before a blockquote
        <rdar://problem/3796366> REGRESSION (Mail): Crash Mail by deleting the right line from pasted HTML

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): All of these bugs are due to the same problem. When I
        made the delete command run even when the text is a caret (to make block merges work right when the
        caret is at the start of a block), I failed to handle one case when there might be no text to
        delete. This resulted in a call to the DeleteTextCommand with a zero-length deletion request.
        This is not supported. Now, I have added an additional test in this one place in the code that
        was causing all these failures.

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

18 years ago * tests/mozilla/expected.html: Updated test results for 3 more tests that...
darin [Mon, 13 Sep 2004 06:23:52 +0000 (06:23 +0000)]
    * tests/mozilla/expected.html: Updated test results for 3 more tests that pass with the new version
        of escape and unescape.

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

18 years ago Reviewed by Maciej.
darin [Mon, 13 Sep 2004 06:22:56 +0000 (06:22 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3798209> any non-ASCII characters are garbled in the result of toLocaleString

        * kjs/date_object.cpp:
        (formatLocaleDate): Replaced two old functions that used LongDateTime with this one new function that
        uses CFDateFormatter.
        (DateProtoFuncImp::call): Call the new formatLocaleDate instead of both formatLocaleDate and formatLocaleTime.

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

18 years ago Reviewed by Maciej.
darin [Mon, 13 Sep 2004 06:05:54 +0000 (06:05 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3797758> REGRESSION (155-156): Cannot tab between input fields at switchboard.com

        * kwq/KWQLineEdit.mm: (QLineEdit::selectAll): Use setFocus() instead of calling makeFirstResponder
        directly since it handles the case where the field editor has focus.

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

18 years ago Reviewed by Maciej.
darin [Mon, 13 Sep 2004 06:05:36 +0000 (06:05 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3792082> zero character codes in UTF-16 input cause crash

        * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUTF16): Fixed code that was using the wrong variable
        to decrement the input length, causing buffer overrun.

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

18 years ago Reviewed by Maciej.
darin [Mon, 13 Sep 2004 06:04:12 +0000 (06:04 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3798240> computed style error log messages seen with numbers in the range 74-77

        * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):

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

18 years ago * layout-tests/css1/text_properties/text-transform-expected.txt: Removed...
darin [Mon, 13 Sep 2004 06:03:25 +0000 (06:03 +0000)]
    * layout-tests/css1/text_properties/text-transform-expected.txt: Removed unused test result.

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

18 years ago Reviewed by Darin.
mjs [Sat, 11 Sep 2004 08:22:27 +0000 (08:22 +0000)]
    Reviewed by Darin.

<rdar://problem/3787208> can't log in to SAP SDN site (JS parse error)

        * kwq/KWQKURL.mm:
        (KURL::decode_string): Check for find result >= 0 instead of >0,
to handle case of first character in a string being encoded.

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

18 years ago Fixed <rdar://problem/3782533> CrashTracer: .1459 crashes at com.apple.WebKit...
rjw [Fri, 10 Sep 2004 23:26:36 +0000 (23:26 +0000)]
    Fixed <rdar://problem/3782533> CrashTracer: .1459 crashes at com.apple.WebKit: -[WebTextRenderer initWithFont:usingPrinterFont:] + 0x138

        We were explicitly failing when we encountered deprecated fonts.
        (Those with unsupported glyph packings).
        Deprecated fonts should only appear on a system that have
        stuff migrated from OS 9.  Ugh, thats probably why we've never seen
        the problem here.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer initWithFont:usingPrinterFont:]):

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

18 years agoWebKit:
sullivan [Fri, 10 Sep 2004 22:21:11 +0000 (22:21 +0000)]

        Reviewed by Chris.

        - added _isFrameSet as a private method, so it can be used in WebBrowser.
        This is needed to merge the fix for 3123987 to SUPanNavy.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _isFrameSet]):
        new method

        * WebView.subproj/WebFramePrivate.h:
        declare new method


        Reviewed by Chris.

        - changed implementation of -[WebFrameView isFrameset] so that it's more easily
        mergeable back to 10.3.5. This is needed to merge 3123987 to SUPanNavy.

        * BrowserWebViewExtras.m:
        (-[WebFrameView isFrameset]):
        Call private WebFrame method instead of using DOM.

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

18 years ago Fixed previous "Reviewed by" line.
cblu [Fri, 10 Sep 2004 16:18:50 +0000 (16:18 +0000)]
Fixed previous "Reviewed by" line.

        * ChangeLog:

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

18 years agoWebCore:
cblu [Fri, 10 Sep 2004 15:58:39 +0000 (15:58 +0000)]

Support for: <rdar://problem/3795485> debug menu item to enable RSS animation on first layout

        Reviewed by rjw.

        * khtml/khtml_part.h:
        (KHTMLPart::didFirstLayout): new
        * khtml/khtmlview.cpp:
        (KHTMLView::layout): call didFirstLayout
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::didFirstLayout): new
        * kwq/WebCoreBridge.h:


Support for: <rdar://problem/3795485> debug menu item to enable RSS animation on first layout

        Reviewed by NOBODY (OOPS!).

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge didFirstLayout]): new
        * WebView.subproj/WebDefaultFrameLoadDelegate.m:
        (-[WebDefaultFrameLoadDelegate webView:didFirstLayoutInFrame:]): new
        * WebView.subproj/WebViewPrivate.h:


Fixed: <rdar://problem/3795485> debug menu item to enable RSS animation on first layout

        Reviewed by rjw.

        * BrowserWindowController.h:
        * BrowserWindowController.m:
        (-[BrowserWindowController startRSSAnimationForFrame:error:]): new
        (-[BrowserWindowController webFrameLoadDidFirstLayout:]): new
        (-[BrowserWindowController webFrameLoadFinished:withError:]): call startRSSAnimationForFrame:error:
        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]): added toggle for RSS animation
        (-[BrowserDocument toggleRSSAnimateAfterFirstLayout:]): new
        (-[BrowserDocument validate_toggleRSSAnimateAfterFirstLayout:]): new
        * LocationChangeHandler.m:
        (-[LocationChangeHandler webView:didFirstLayoutInFrame:]): new
        * PreferenceKeys.h:

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

18 years ago Alternate implementation of image rendering. Use CGImageRefs instead
rjw [Fri, 10 Sep 2004 02:31:28 +0000 (02:31 +0000)]
    Alternate implementation of image rendering.  Use CGImageRefs instead
        of NSImages.

        Mostly works, but currently disabled because of issues w/ CG.

        Reviewed by Chris.

        * ChangeLog:
        * WebCoreSupport.subproj/WebImageData.h: Added.
        * WebCoreSupport.subproj/WebImageData.m: Added.
        (-[WebImageData _commonTermination]):
        (-[WebImageData dealloc]):
        (-[WebImageData finalize]):
        (-[WebImageData copyWithZone:]):
        (-[WebImageData numberOfImages]):
        (-[WebImageData currentFrame]):
        (-[WebImageData _invalidateImages]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:]):
        (-[WebImageData tileInRect:fromPoint:context:]):
        (-[WebImageData isNull]):
        (-[WebImageData size]):
        (-[WebImageData _frameDuration]):
        (-[WebImageData _repetitionCount]):
        (-[WebImageData isAnimationFinished]):
        (+[WebImageData stopAnimationsInView:]):
        (-[WebImageData addAnimatingRenderer:inView:]):
        (-[WebImageData removeAnimatingRenderer:]):
        (-[WebImageData _stopAnimation]):
        (-[WebImageData _nextFrame:]):
        (-[WebImageData animate]):
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer initWithMIMEType:]):
        (-[WebImageRenderer initWithData:MIMEType:]):
        (-[WebImageRenderer initWithContentsOfFile:]):
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer copyWithZone:]):
        (-[WebImageRenderer retainOrCopyIfNeeded]):
        (-[WebImageRenderer resize:]):
        (-[WebImageRenderer size]):
        (-[WebImageRenderer MIMEType]):
        (-[WebImageRenderer frameCount]):
        (-[WebImageRenderer isNull]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
        (-[WebImageRenderer drawImageInRect:fromRect:]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
        (-[WebImageRenderer tileInRect:fromPoint:context:]):
        (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):
        (+[WebImageRenderer stopAnimationsInView:]):
        (-[WebImageRenderer stopAnimation]):
        (-[WebImageRenderer targetAnimationRect]):
        (-[WebImageRenderer increaseUseCount]):
        (-[WebImageRenderer decreaseUseCount]):
        (-[WebImageRenderer flushRasterCache]):
        (-[WebImageRenderer imageRef]):
        (-[WebImageRenderer TIFFRepresentation]):
        (-[WebImageRenderer image]):
        * WebCoreSupport.subproj/WebImageRendererFactory.m:
        (-[WebImageRendererFactory imageRendererWithMIMEType:]):
        (-[WebImageRendererFactory imageRendererWithData:MIMEType:]):
        (-[WebImageRendererFactory imageRendererWithSize:]):
        (-[WebImageRendererFactory imageRendererWithName:]):
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebImageView.m:
        (-[WebImageView image]):

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

18 years ago Reviewed by Richard.
mjs [Fri, 10 Sep 2004 01:52:24 +0000 (01:52 +0000)]
    Reviewed by Richard.

<rdar://problem/3493140> REGRESSION (85-100): cedille displays %-escaped in JavaScript message at hotmail.com

* kjs/function.cpp:
        (KJS::GlobalFuncImp::call): Replace our escape() and unescape() implementations with
ones from KDE KJS, which have the proper latin-1 behavior to match Win IE.
        * kjs/lexer.cpp:
        (Lexer::isHexDigit): Made static and non-const.
        * kjs/lexer.h:

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

18 years agochange version number to 2.0, 164u for TOT
vicki [Fri, 10 Sep 2004 01:41:44 +0000 (01:41 +0000)]
change version number to 2.0, 164u for TOT

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

18 years agoSafari-163 stamp for everything except WebBrowser. In these projects, CFBundleShortV...
vicki [Fri, 10 Sep 2004 01:29:52 +0000 (01:29 +0000)]
Safari-163 stamp for everything except WebBrowser.  In these projects, CFBundleShortVersionString matches CFBundleVersion (163 in both cases).

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

18 years ago - roll out the last change, it appears to cause a performance regression
mjs [Fri, 10 Sep 2004 01:02:20 +0000 (01:02 +0000)]
    - roll out the last change, it appears to cause a performance regression

        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_br.cpp:
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:

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