WebKit-https.git
15 years ago Reviewed by John
kocienda [Wed, 13 Oct 2004 23:21:42 +0000 (23:21 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3816768> REGRESSION (Mail): Deleting last character in block incorrectly
        moves caret out of block.

        The issue here is that an empty block with no explicit height set by style collapses
        to zero height, and does so immediately after the last bit of content is removed from
        it (as a result of deleting text with the delete key for instance). Since zero-height
        blocks are not eligible caret positions, the caret jumped to the closest eligible spot.

        The fix is to detect when a block has not been removed itself, but has had all its
        contents removed. In this case, a BR element is placed in the block, one that is
        specially marked as a placeholder. Later, if the block ever receives content, this
        placeholder is removed.

        * khtml/editing/htmlediting.cpp:
        (khtml::blockPlaceholerClassString): String which acts as a placeholder marker class.
        (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Adds a placeholder BR if needed.
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Removes a placeholder BR if needed.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Call removeBlockPlaceholderIfNeeded.
        Also, do some cleanup on some old, crufty code in the move logic that is just so clearly wrong
        (it's very clear that we needs to be able to move more than just text nodes). This may expose
        bugs, but these bugs needs to be filed and fixed, not ducked. Besides, undoing this silliness
        made the test case in the bug work.
        (khtml::DeleteSelectionCommand::doApply): Call insertBlockPlaceholderIfNeeded and
        removeBlockPlaceholderIfNeeded.
        (khtml::InputTextCommand::input): Call removeBlockPlaceholderIfNeeded.
        (khtml::ReplaceSelectionCommand::doApply): Call removeBlockPlaceholderIfNeeded.
        * khtml/editing/htmlediting.h: Declare new functions.

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

15 years ago Don't fill background with transparency unless debug flag
rjw [Wed, 13 Oct 2004 22:00:44 +0000 (22:00 +0000)]
Don't fill background with transparency unless debug flag
is enabled.

        Reviewed by Hyatt.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView drawRect:]):

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

15 years ago Moved boolean checks prior to NSNumber checks. booleans are
rjw [Wed, 13 Oct 2004 21:40:47 +0000 (21:40 +0000)]
Moved boolean checks prior to NSNumber checks.  booleans are
NSNumbers.

Follow on to <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number.

        Reviewed by John.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):

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

15 years ago Added support for -apple-dashboard-region:none. And fixed
rjw [Wed, 13 Oct 2004 21:31:02 +0000 (21:31 +0000)]
    Added support for -apple-dashboard-region:none.  And fixed
a few computed style problems.

        Fixed <rdar://problem/3833532> -apple-dashboard-region: none; is needed
        Reviewed by Hyatt.

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::cssText):
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        (CSSParser::parseDashboardRegions):
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::noneDashboardRegions):
        * khtml/rendering/render_style.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dashboardRegionsDictionary):

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

15 years agoMake the review fixes from kocienda's review.
hyatt [Wed, 13 Oct 2004 08:14:46 +0000 (08:14 +0000)]
Make the review fixes from kocienda's review.

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

15 years ago Rework block layout to clean it up and simplify it (r=kocienda).
hyatt [Wed, 13 Oct 2004 08:04:38 +0000 (08:04 +0000)]
Rework block layout to clean it up and simplify it (r=kocienda).

Also fixing the style sharing bug (r=mjs).

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::MarginInfo::MarginInfo):
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::adjustPositionedBlock):
        (khtml::RenderBlock::adjustFloatingBlock):
        (khtml::RenderBlock::handleSpecialChild):
        (khtml::RenderBlock::handleFloatingOrPositionedChild):
        (khtml::RenderBlock::handleCompactChild):
        (khtml::RenderBlock::insertCompactIfNeeded):
        (khtml::RenderBlock::handleRunInChild):
        (khtml::RenderBlock::collapseMargins):
        (khtml::RenderBlock::clearFloatsIfNeeded):
        (khtml::RenderBlock::estimateVerticalPosition):
        (khtml::RenderBlock::determineHorizontalPosition):
        (khtml::RenderBlock::setCollapsedBottomMargin):
        (khtml::RenderBlock::adjustChildIfOverhangingFloatsExist):
        (khtml::RenderBlock::handleBottomOfBlock):
        (khtml::RenderBlock::layoutBlockChildren):
        (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
        (khtml::RenderBlock::addOverHangingFloats):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::maxTopMargin):
        (khtml::RenderBlock::maxBottomMargin):
        (khtml::RenderBlock::CompactInfo::compact):
        (khtml::RenderBlock::CompactInfo::block):
        (khtml::RenderBlock::CompactInfo::matches):
        (khtml::RenderBlock::CompactInfo::clear):
        (khtml::RenderBlock::CompactInfo::set):
        (khtml::RenderBlock::CompactInfo::CompactInfo):
        (khtml::RenderBlock::MarginInfo::setAtTopOfBlock):
        (khtml::RenderBlock::MarginInfo::setAtBottomOfBlock):
        (khtml::RenderBlock::MarginInfo::clearMargin):
        (khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat):
        (khtml::RenderBlock::MarginInfo::setTopQuirk):
        (khtml::RenderBlock::MarginInfo::setBottomQuirk):
        (khtml::RenderBlock::MarginInfo::setDeterminedTopQuirk):
        (khtml::RenderBlock::MarginInfo::setPosMargin):
        (khtml::RenderBlock::MarginInfo::setNegMargin):
        (khtml::RenderBlock::MarginInfo::setPosMarginIfLarger):
        (khtml::RenderBlock::MarginInfo::setNegMarginIfLarger):
        (khtml::RenderBlock::MarginInfo::setMargin):
        (khtml::RenderBlock::MarginInfo::atTopOfBlock):
        (khtml::RenderBlock::MarginInfo::canCollapseWithTop):
        (khtml::RenderBlock::MarginInfo::canCollapseWithBottom):
        (khtml::RenderBlock::MarginInfo::canCollapseTopWithChildren):
        (khtml::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
        (khtml::RenderBlock::MarginInfo::selfCollapsingBlockClearedFloat):
        (khtml::RenderBlock::MarginInfo::quirkContainer):
        (khtml::RenderBlock::MarginInfo::determinedTopQuirk):
        (khtml::RenderBlock::MarginInfo::topQuirk):
        (khtml::RenderBlock::MarginInfo::bottomQuirk):
        (khtml::RenderBlock::MarginInfo::posMargin):
        (khtml::RenderBlock::MarginInfo::negMargin):
        (khtml::RenderBlock::MarginInfo::margin):
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        (khtml::RenderBox::marginTop):
        (khtml::RenderBox::marginBottom):
        (khtml::RenderBox::marginLeft):
        (khtml::RenderBox::marginRight):
        * khtml/rendering/render_image.cpp:
        (RenderImage::setImage):
        * khtml/rendering/render_object.cpp:
        (RenderObject::sizesToMaxWidth):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::collapsedMarginTop):
        (khtml::RenderObject::collapsedMarginBottom):
        (khtml::RenderObject::maxTopMargin):
        (khtml::RenderObject::maxBottomMargin):
        (khtml::RenderObject::marginTop):
        (khtml::RenderObject::marginBottom):
        (khtml::RenderObject::marginLeft):
        (khtml::RenderObject::marginRight):
        * khtml/rendering/render_text.h:
        (khtml::RenderText::marginLeft):
        (khtml::RenderText::marginRight):
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):

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

15 years ago Reviewed by John
kocienda [Wed, 13 Oct 2004 00:09:43 +0000 (00:09 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3836158> REGRESSION (Mail): command-right-arrow moves to beginning of next line

        * khtml/editing/selection.cpp:
        (khtml::endOfLastRunAt): Do not let the end of the last run on a line be a BR.
        This will make it seem like the run ends on the next line.

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

15 years ago Reviewed by Hyatt
kocienda [Tue, 12 Oct 2004 23:25:44 +0000 (23:25 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3836986> Delete code removes elements of table structure; can result in very broken-looking web pages

        * khtml/editing/htmlediting.cpp:
        (khtml::isTableStructureNode): New helper. Determines whether a node is a table cell,
        row, section, or column.
        (khtml::CompositeEditCommand::removeFullySelectedNode): New helper that recurses into elements
        of table structure when doing deletes, rather than deleting the structure elements themselves.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Do not move content between elements
        of table structure. We may want to revisit this some day, but this seems like the best behavior
        to me now.
        (khtml::DeleteSelectionCommand::doApply): Call removeFullySelectedNode instead of removeNode
        where needed.
        * khtml/editing/htmlediting.h: Add declarations for new functions.

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

15 years agoWebKit:
rjw [Tue, 12 Oct 2004 23:24:28 +0000 (23:24 +0000)]
WebKit:
        Fixed <rdar://problem/3829705> Need to remove filling w/ transparency when not drawing backgroundy.

        Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _transparentBackground]):
        (-[WebHTMLView _setTransparentBackground:]):
        (-[WebHTMLView drawRect:]):
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebHTMLViewPrivate.h:

WebBrowser:
As part of fix <rdar://problem/3829705> Need to remove filling w/ transparency when not drawing backgroundy, we can no longer rely on WebHTMLView filling with transparency, so added additional flag to indicate that we should.

        * Debug/DebugUtilities.m:
        (-[BrowserDocument toggleTransparentWindow:]):
        * LocationChangeHandler.m:
Removed #define to prevent console spew.

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

15 years agoJavaScriptCore
rjw [Tue, 12 Oct 2004 22:43:55 +0000 (22:43 +0000)]
JavaScriptCore
        Fixed access to DOM object via WebScriptObject API.
        The execution context for DOM objects wasn't being found.
        <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.

        Reviewed by Chris.

        * bindings/objc/WebScriptObject.mm:
        (_didExecute):
        (-[WebScriptObject KJS::Bindings::]):
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):
        (-[WebScriptObject setValue:forKey:]):
        (-[WebScriptObject valueForKey:]):
        (-[WebScriptObject stringRepresentation]):
        * bindings/objc/WebScriptObjectPrivate.h:

WebCore:
        Fixed access to DOM object via WebScriptObject API.
        The execution context for DOM objects wasn't being found.
        <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
        Reviewed by Chris

        Fixed <rdar://problem/3831063> regions use left offset instead of top offset
Reviewed by John

        * khtml/khtml_part.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::addDashboardRegions):
        * kwq/DOM.mm:
        (-[DOMNode isContentEditable]):
        (-[DOMNode KJS::Bindings::]):
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::executionContextForDOM):

WebBrowser:
        Added debugging code (disable) to assist in debugging DOM/WebScriptObjects.

        Reviewed by Chris.

        * LocationChangeHandler.m:
        (-[Logger logMessage:]):
        (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]):

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

15 years ago Reviewed by Hyatt
kocienda [Tue, 12 Oct 2004 22:25:54 +0000 (22:25 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3834779> Mail crashes when editing HTML message - khtml::Selection::layout()

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::styleForSelectionStart): Table code seems to be more robust when the call to
        insert our style-checking node is done with an appendChild rather than an insertBefore. Note
        that this table-related problem was exposed by fixing Selection::layout(), which I did
        yesterday. This change simply improves things even more so that we do not crash in the
        scenario described in the bug.

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

15 years ago Reviewed by John
kocienda [Mon, 11 Oct 2004 17:49:24 +0000 (17:49 +0000)]
    Reviewed by John

        This is a partial fix to this bug:

        <rdar://problem/3832886> increase quote level on new mail document leads to immediate
        crash in caret painting code

        To eliminate the bad behavior for good, I have done some investigations in Mail code,
        and I have sent a suggested code change on to Grant. Basically, Mail can't add empty
        blocks (like blockquote elements used for quoting) to documents without giving those
        blocks some content (so they have a height).

        I added some other crash protections below.

        * khtml/editing/selection.cpp:
        (khtml::Selection::layout): Check for non-null position after calls to VisiblePosition, since
        the VisiblePosition constructors may fail to find a visible spot in the document. Also, add
        a couple position-has-renderer assertion checks.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::styleForSelectionStart): Take out pos.isNotNull() assertion since VisiblePosition
        may not yield a position. This assertion is a holdover from before we had VisiblePosition.
        (KWQKHTMLPart::fontForSelection): Rearrange the code a little to deal with possible null results from
        calls to helpers.

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

15 years ago Reviewed by John.
darin [Mon, 11 Oct 2004 17:34:22 +0000 (17:34 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3834230> empty table can result in division by 0

        * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows):
        Added 0 check; rolled in from KDE.

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

15 years ago Fixed: <rdar://problem/3802039> 8A259: Can't use Grab services to grab selection...
cblu [Mon, 11 Oct 2004 17:20:44 +0000 (17:20 +0000)]
Fixed: <rdar://problem/3802039> 8A259: Can't use Grab services to grab selection from screen

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (+[WebHTMLView initialize]): register service "return types" which are types that can be inserted into a WebView
        (-[WebHTMLView writeSelectionToPasteboard:types:]): service protocol method, be sure to only write specified types
        (-[WebHTMLView readSelectionFromPasteboard:]): new, service protocol method, insert types
        (-[WebHTMLView validRequestorForSendType:returnType:]): moved, handle return types

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

15 years agoAdded layout test for <input> value bug I just fixed.
darin [Mon, 11 Oct 2004 17:13:55 +0000 (17:13 +0000)]
Added layout test for <input> value bug I just fixed.

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

15 years ago Reviewed by John.
darin [Mon, 11 Oct 2004 17:10:01 +0000 (17:10 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3818712> form checkbox value property is read only

        The underlying problem was that we were storing two separate values for all
        form elements; one for the value property (JavaScript) and the other for the
        value attribute (DOM). This is a good idea for text input, but not for other types.

        * khtml/html/html_formimpl.h: Changed setValue to take a const DOMString reference.
        Added private storesValueSeparateFromAttribute function.
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::setType): Handle type changes, including detaching and re-attaching
        if type changed, and moving value from m_value to ATTR_VALUE and vice versa.
        (DOM::HTMLInputElementImpl::type): Added a case for ISINDEX and moved the default out of the
        switch so that we will get a warning if a type is left out.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Tweaked comment format.
        (DOM::HTMLInputElementImpl::reset): Changed to only nuke the value if the value property is stored
        separately from the attribute. Otherwise, we just want to lave it alone
        (DOM::HTMLInputElementImpl::value): Changed to always use m_value if it's not null, then fall back
        on the attribute, and finally fall back to the "on" for the checkbox only if both are null.
        (DOM::HTMLInputElementImpl::setValue): Changed to set the attribute unless the value property is
        supposed to be stored separate from the attribute.
        (DOM::HTMLInputElementImpl::storesValueSeparateFromAttribute): Added. Returns true for text-type
        input elements, and false for the others.

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

15 years ago Reviewed by John.
darin [Mon, 11 Oct 2004 16:38:12 +0000 (16:38 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3834130> nil-object-in-dictionary exception seen in -[WebView _elementAtWindowPoint:]

        * WebView.subproj/WebView.m: (-[WebView _elementAtWindowPoint:]): Added a check for nil frame.

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

15 years ago Reviewed by John.
darin [Mon, 11 Oct 2004 16:34:22 +0000 (16:34 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3296652> checkbox input type does not respond to onchange

        * khtml/rendering/render_form.cpp:
        (RenderFormElement::updateFromElement): Some new code, commented out, for form element colors.
        (RenderCheckBox::slotStateChanged): Added call to onChange.

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

15 years ago Reviewed by John.
darin [Mon, 11 Oct 2004 16:28:24 +0000 (16:28 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3834166> <input type=file> sends onchange even when the same file is chosen twice

        * WebCoreSupport.subproj/WebFileButton.m: (-[WebFileButton chooseFilename:]):
        Do nothing if filename is the same as before.

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

15 years agoWebCore:
kocienda [Mon, 11 Oct 2004 16:04:11 +0000 (16:04 +0000)]
WebCore:

        Reviewed by Darin

        Finish selection affinity implementation. This includes code to set the
        affinity correctly when clicking with the mouse, and clearing the
        affinity when altering the selection using any of the Selection object
        mutation functions.

        Each instance of the positionForCoordinates, inlineBox and caretRect
        functions have been changed to include an EAffinity argument to give results
        which take this bit into account.

        * khtml/editing/selection.cpp:
        (khtml::Selection::init): Default affinity is now UPSTREAM, to match AppKit.
        (khtml::Selection::modifyAffinity): New function to compute affinity based on
        modification constants.
        (khtml::Selection::moveTo): Reset affinity to UPSTREAM.
        (khtml::Selection::modifyExtendingRightForward): Ditto.
        (khtml::Selection::modifyMovingRightForward): Ditto.
        (khtml::Selection::modifyExtendingLeftBackward): Ditto.
        (khtml::Selection::modifyMovingLeftBackward): Ditto.
        (khtml::Selection::modify): Support saving, restoring, and then calculating new
        affinity value as needed.
        (khtml::Selection::xPosForVerticalArrowNavigation):
        (khtml::Selection::clear): Reset affinity to UPSTREAM.
        (khtml::Selection::setBase): Ditto.
        (khtml::Selection::setExtent): Ditto.
        (khtml::Selection::setBaseAndExtent): Ditto.
        (khtml::Selection::layout): Pass affinity to caretRect().
        (khtml::Selection::validate): Pass along affinity parameter to new functions that
        require it.
        (khtml::startOfFirstRunAt): Changed the way that the y-coordinate search is done, to
        keep this code working with changes made in selectionForLine().
        (khtml::endOfLastRunAt): Ditto.
        (khtml::selectionForLine): Make this function work for all renderers, not just text
        renderers.
        * khtml/editing/selection.h:
        (khtml::operator==): Consider affinity in equality check.
        * khtml/editing/visible_units.cpp:
        (khtml::previousLinePosition): Pass affinity argument to function so it can take this
        information into account while processing.
        (khtml::nextLinePosition): Ditto.
        (khtml::previousParagraphPosition): Ditto.
        (khtml::nextParagraphPosition): Ditto.
        * khtml/editing/visible_units.h: Ditto, for each of the functions listed.
        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset): Rework code to remove dependence on NodeImpl::positionForCoordinates,
        as this function is being removed.
        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointInsideSelection): Ditto.
        (KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::handleMousePressEventSingleClick): Ditto. Plus, pass affinity argument in
        call to positionForCoordinates, and set resulting affinity on the selection.
        (KHTMLPart::handleMouseMoveEventSelection): Rework code to remove dependence on
        NodeImpl::positionForCoordinates, as this function is being removed.
        (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Now takes an affinity argument.
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::caretRect): Ditto.
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_br.cpp:
        (RenderBR::positionForCoordinates): Ditto.
        (RenderBR::caretRect): Ditto.
        (RenderBR::inlineBox): Ditto.
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): Ditto.
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::caretRect): Ditto.
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::positionForCoordinates): Ditto.
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::caretRect): Ditto.
        (RenderObject::positionForCoordinates): Ditto.
        (RenderObject::inlineBox): Ditto.
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::positionForCoordinates): Ditto.
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::positionForCoordinates): Ditto.
        (firstRendererOnNextLine): New helper used by caretRect().
        (RenderText::caretRect): Now takes an affinity argument.
        (RenderText::inlineBox): Ditto.
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_nodeimpl.cpp: Remove positionForCoordinates helper.
        * khtml/xml/dom_nodeimpl.h: Ditto.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousLinePosition): Now takes an affinity argument.
        (DOM::Position::nextLinePosition): Ditto.
        * khtml/xml/dom_position.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge caretRectAtNode:offset:affinity:]): Ditto.
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
        (-[WebCoreBridge _positionForPoint:]): Rework code to remove dependence on
        NodeImpl::positionForCoordinates, as this function is being removed.

WebKit:

        Reviewed by Darin

        * WebView.subproj/WebHTMLView.m:
        (-[WebTextCompleteController doCompletion]): bridge call to get caret rect at a node
        now takes an affinity: caretRectAtNode:offset:affinity:.

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

15 years ago Reviewed by Ken.
darin [Mon, 11 Oct 2004 15:17:01 +0000 (15:17 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3670280> scroll position on overflowed textareas resets when leaving the tab

        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]):
        Scroll to reveal the text area, don't scroll to reveal the text view itself.
        Scrolling the text view ended up putting it at the top left, regardless of
        where the insertion point is.

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

15 years ago Reviewed by Ken.
darin [Mon, 11 Oct 2004 15:08:15 +0000 (15:08 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3831546> More text is copied than is visually selected

        The bug here is that upstream was moving a position too far.

        * khtml/xml/dom_position.cpp:
        (DOM::Position::upstream): Use the "deep equivalent" node rather than the original node passed
        in for various checks. Also use local variables a bit more for slightly more efficiency.
        (DOM::Position::downstream): Ditto.

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

15 years agoRemoved stray conflict marker
kocienda [Mon, 11 Oct 2004 14:58:33 +0000 (14:58 +0000)]
Removed stray conflict marker

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

15 years ago Reviewed by Chris
kocienda [Mon, 11 Oct 2004 14:57:59 +0000 (14:57 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3814236> REGRESSION (Mail): Can't set the color of text in Mail compose window using drag/drag from color panel

        * WebView.subproj/WebHTMLView.m:
        (+[WebHTMLView _insertablePasteboardTypes]): Add NSColorPboardType to list.
        (-[WebHTMLView _isNSColorDrag:]): New helper. Determines if drag is an NSColor drag.
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Add a case for NSColor drags,
        else do what we did before.
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Add a case for NSColor drags, which creates
        a CSS style containing color info and calls the bridge to apply the style. Otherwise, do what we did before.

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

15 years ago Reviewed by Ken.
darin [Mon, 11 Oct 2004 14:55:28 +0000 (14:55 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3833841> adding an event listener for keypress events does not work

        * khtml/xml/dom2_eventsimpl.h: Added numEventIds and made typeToId take a const DOMString &.
        * khtml/xml/dom2_eventsimpl.cpp:
        (EventImpl::typeToId): Changed to use table. Added "keypress", otherwise, the same as before.
        (EventImpl::idToType): Changed to use table.

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

15 years ago Reviewed by Ken.
darin [Mon, 11 Oct 2004 14:51:46 +0000 (14:51 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3833848> REGRESSION (133-134): each keydown event is getting sent multiple times

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView performKeyEquivalent:]):
        Don't send an event through WebCore if it has already been through once.

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

15 years ago Reviewed by Ken.
sullivan [Sun, 10 Oct 2004 15:14:31 +0000 (15:14 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3777253> Crash in redirect mechanism trying to display error page for bad scheme

        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
        add retain/autorelease to the request returned from call to super. In this case, the return value
        was being dealloc'ed before being returned.

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

15 years ago - fixed <rdar://problem/3664375> repro crash in -[KWQAccObject accessibilityA...
sullivan [Sun, 10 Oct 2004 15:13:52 +0000 (15:13 +0000)]
    - fixed <rdar://problem/3664375> repro crash in -[KWQAccObject accessibilityAttributeNames]

        (-[KWQAccObject accessibilityActionNames]):
        check for nil m_renderer

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

15 years ago Reviewed by Kevin.
darin [Sat, 9 Oct 2004 23:32:48 +0000 (23:32 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3828147> REGRESSION: textareas with wrap="off" show their contents in a thin vertical line of text

        * kwq/KWQTextArea.h: Added setTextColor and setBackgroundColor methods. This is really for another fix
        I'm landing later, but it does no harm to add these now.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _configureTextViewForWordWrapMode]): Set the container size after changing the flag that
        determines if the width tracks the text view. Otherwise, we won't successfully set the width in the case
        where we don't want it to track the text view. This caused the bug.
        (-[KWQTextArea _createTextView]): Remove unneeded call to setMaxSize. The above method already does that.
        (-[KWQTextArea setTextColor:]): Added.
        (-[KWQTextArea setBackgroundColor:]): Added.

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

15 years ago Reviewed by Adele.
darin [Sat, 9 Oct 2004 22:44:32 +0000 (22:44 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/3829452> REGRESSION (156-157): onload handler doesn't run on page with meta refresh of 0 duration (new Apple start page)

        The fix for <rdar://problem/3773150> made it so <meta> redirects prevent tokenizing the rest of the page.
        This is incorrect; the reason the JavaScript-triggered loads prevent tokenizing is that they take place
        "right away" in other browsers, but that is not true of <meta> redirect. We fixed this by using a separate
        call for <meta> redirect and not preventing tokenizing when that's in effect.

        * khtml/khtml_part.h: Removed userGesture parameter from scheduleRedirection. Renamed
        isImmediateRedirectPending to isScheduledLocationChangePending. Added scheduleLocationChange.
        * khtml/khtml_part.cpp:
        (KHTMLPart::openURL): Updated for new constant name.
        (KHTMLPart::scheduleRedirection): Removed now-unneeded userGesture parameter, and removed code that
        does the special case for redirection during load; a <meta> refresh can never be one of those special
        redirects during a load because it redirects the frame itself, not another frame. Also tightened up
        the logic by always stopping the redirect timer even if we aren't restarting it.
        (KHTMLPart::scheduleLocationChange): Added. Like scheduleRedirection, but with a different constant
        so we can tell it apart and always a delay of 0. The "redirection during load" case was moved in here
        and renamed to locationChangeScheduledDuringLoad.
        (KHTMLPart::isScheduledLocationChangePending): Renamed from isImmediateRedirectPending. This now
        returns true only for location changes and history navigation, not <meta> redirects.
        (KHTMLPart::scheduleHistoryNavigation): Tightened up logic to do the stop() outside the if as above,
        and got rid of a silly timer delay computation that always resulted in 0.

        * khtml/khtmlpart_p.h: Added a new value to the RedirectionScheduled enum for scheduleLocationChange
        and also renamed one of the existing values.

        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::write): Changed to use isScheduledLocationChangePending instead
        of isImmediateRedirectPending, because we do want to continue tokenizing if it's actually a redirect.

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): Changed to call the new scheduleLocationChange
        instead of calling scheduleRedirection with delay of 0.
        * khtml/ecma/kjs_window.cpp:
        (Window::put): Ditto.
        (WindowFunc::tryCall): Ditto.
        (Location::put): Ditto.
        (LocationFunc::tryCall): Ditto.

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

15 years ago Reviewed by Kevin.
darin [Sat, 9 Oct 2004 22:36:41 +0000 (22:36 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3658277> REGRESSION (1.1-1.2): form submission should either not simulate a click at all or use (0,0) the way Mozilla does

        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::click): Use 0,0 for the coordinates.

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

15 years ago Reviewed by Kevin.
darin [Sat, 9 Oct 2004 22:17:44 +0000 (22:17 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3804661> REGRESSION: JavaScriptCore framework now has two init routines

        * bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was
        creating an init routine.

        * kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not
        require a global constructor that creates an init routine.

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

15 years ago Reviewed by Kevin.
darin [Sat, 9 Oct 2004 21:46:47 +0000 (21:46 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3804665> REGRESSION: WebCore framework now has many init routines

        * khtml/xml/dom_nodeimpl.h: Changed anyQName declaration to not use the inline function
        makeId. Surprisingly, the inline function was not "constant-folded" and we ended up with
        a copy of the function in each file as an init routine for the framework.

        * khtml/ecma/kjs_html.cpp: (Gradient::colorStops): Get rid of initialized ColorStop
        globals; their constructors were showing up as init routines for the framework.

        * khtml/rendering/render_style.h: Got rid of inline initialDashboardRegions function.
        * khtml/rendering/render_style.cpp: (RenderStyle::initialDashboardRegions): Made this
        a normal function. When it was an inline function, the constructors for the per-file
        copies of the globals were showing up as init routines for the framework.

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

15 years agoAdded layout test for just-fixed JavaScriptCore bug.
darin [Sat, 9 Oct 2004 21:39:51 +0000 (21:39 +0000)]
Added layout test for just-fixed JavaScriptCore bug.

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

15 years agoForgot to include that I also fixed <rdar://problem/3397658> scroll wheel does not...
cblu [Sat, 9 Oct 2004 21:30:41 +0000 (21:30 +0000)]
Forgot to include that I also fixed <rdar://problem/3397658> scroll wheel does not work to scroll overflow:auto/scroll/overlay areas (RSS)

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

15 years agoWebCore:
cblu [Sat, 9 Oct 2004 21:25:28 +0000 (21:25 +0000)]
WebCore:

Fixed:
<rdar://problem/3625352> up and down arrow and page up/down keys don't work to scroll overflow:auto/scroll/overlay areas
<rdar://problem/3822027> REGRESSION (Mail): When selection moves out of visible area, should center as NSText does

        Reviewed by hyatt, kocienda.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::scroll): new
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::scroll): new
        * khtml/rendering/render_object.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::scrollOverflow): new
        (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent): new
        (KWQKHTMLPart::khtmlMousePressEvent): store pressed node so we know where the focus is
        * kwq/KWQScrollBar.h:
        * kwq/KWQScrollBar.mm:
        (QScrollBar::setValue): return a bool
        (QScrollBar::scrollbarHit): ditto
        (QScrollBar::scroll): new
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge scrollOverflowInDirection:granularity:]): new
        (-[WebCoreBridge scrollOverflowWithScrollWheelEvent:]): new
        (-[WebCoreBridge ensureSelectionVisible]): visually center the extent of the selection

WebKit:

Fixed: <rdar://problem/3625352> up and down arrow and page up/down keys don't work to scroll overflow:auto/scroll/overlay areas

        Reviewed by hyatt.

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream initWithRequestURL:pluginPointer:notifyData:sendNotification:]): fixed typo in comment
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): ditto
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _bridge]): new
        (-[WebFrameView scrollToBeginningOfDocument:]): call the bridge to scroll, if that fails, scroll the document view
        (-[WebFrameView scrollToEndOfDocument:]): ditto
        (-[WebFrameView _pageVertically:]): ditto
        (-[WebFrameView _pageHorizontally:]): ditto
        (-[WebFrameView _scrollLineVertically:]): ditto
        (-[WebFrameView _scrollLineHorizontally:]): ditto
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView scrollWheel:]): call the bridge to scroll, if that fails, pass to next responder

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

15 years ago Reviewed by Kevin.
darin [Sat, 9 Oct 2004 21:22:43 +0000 (21:22 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3822618> REGRESSION (164-165): expedia.com's popup help doesn't work

        * kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object
        work with the window object of the page the function is in, not the page of the caller. This
        is what all other browsers do. This code was hidden before by the "everything is defined on
        window object" hack in WebCore.

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

15 years agoFixed build error.
rjw [Thu, 7 Oct 2004 22:05:06 +0000 (22:05 +0000)]
Fixed build error.

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

15 years ago Added simple JavaScript call tracing. Very useful for
rjw [Thu, 7 Oct 2004 21:30:47 +0000 (21:30 +0000)]
Added simple JavaScript call tracing.  Very useful for
        debugging complex pages.

Tracing is only available in development builds and is
enabled by:

(gdb) set traceJavaScript = 1

or programatically

setTraceJavaScript(true)

Function, args, and return values are printed to console.  Very
verbose.

        Reviewed by Ken.

        * kjs/function_object.cpp:
        (FunctionProtoFuncImp::call):
        * kjs/object.cpp:
        (KJS::Object::call):

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

15 years ago Back out style sharing perf fix.
hyatt [Thu, 7 Oct 2004 02:03:19 +0000 (02:03 +0000)]
Back out style sharing perf fix.

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::locateCousinList):
        (khtml::CSSStyleSelector::canShareStyleWithElement):
        (khtml::CSSStyleSelector::locateSharedStyle):
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_elementimpl.h:
        (DOM::HTMLElementImpl::inlineStyleDecl):
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_elementimpl.h:

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

15 years agoReally bring the new code in line with the old style sharing code.
hyatt [Wed, 6 Oct 2004 23:27:21 +0000 (23:27 +0000)]
Really bring the new code in line with the old style sharing code.

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

15 years agoreversion JSC, for the -Wno-long-double changes
vicki [Wed, 6 Oct 2004 16:50:02 +0000 (16:50 +0000)]
reversion JSC, for the -Wno-long-double changes

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

15 years agoAdd -Wno-long-double back to our warning flags. Without it, the x86 build fails.
vicki [Wed, 6 Oct 2004 16:39:50 +0000 (16:39 +0000)]
Add -Wno-long-double back to our warning flags.  Without it, the x86 build fails.

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

15 years agoversioning for TOT, Safari 2.0 (v167u)
vicki [Wed, 6 Oct 2004 05:52:03 +0000 (05:52 +0000)]
versioning for TOT, Safari 2.0 (v167u)

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

15 years agoSafari-166 stamp for everything except WebBrowser. In these projects, CFBundleShortV...
vicki [Wed, 6 Oct 2004 05:13:54 +0000 (05:13 +0000)]
Safari-166 stamp for everything except WebBrowser.  In these projects, CFBundleShortVersionString matches CFBundleVersion (166 for both).

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

15 years ago Fix a bug in the iteration of locateCousinList and clean up the style sharing stats...
hyatt [Wed, 6 Oct 2004 01:43:59 +0000 (01:43 +0000)]
Fix a bug in the iteration of locateCousinList and clean up the style sharing stats code.

        Reviewed by NOBODY (OOPS!).

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

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

15 years agoJavaScriptCore:
rjw [Tue, 5 Oct 2004 23:19:20 +0000 (23:19 +0000)]
JavaScriptCore:
        Fixed <rdar://problem/3819234> NPN_SetException (and throwException:) isn't implemented

        Reviewed by Chris.

        * bindings/NP_jsobject.cpp:
        (_NPN_SetException):
        * bindings/npruntime.cpp:
        (_NPN_SetExceptionWithUTF8):
        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject throwException:]):
        * kjs/internal.h:
        (KJS::InterpreterImp::context):

WebBrowser:
Added debugging support for:

        Fixed <rdar://problem/3819234> NPN_SetException (and throwException:) isn't implemented

        Logging is not enabled in either development or deployment build.

        Reviewed by Chris.

        * LocationChangeHandler.m:
        (+[Logger isSelectorExcludedFromWebScript:]):
        (-[Logger logMessage:]):
        (-[LocationChangeHandler webView:windowScriptObjectAvailable:]):
        (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]):

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

15 years ago Reviewed by Hyatt
kocienda [Tue, 5 Oct 2004 23:06:58 +0000 (23:06 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::computeHorizontalPositionsForLine): Fix coding mistake that
        broke layout tests involving compacts.

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

15 years ago Fix style sharing optimization to be fast again. Go back to using pointer compariso...
hyatt [Tue, 5 Oct 2004 23:02:59 +0000 (23:02 +0000)]
Fix style sharing optimization to be fast again.  Go back to using pointer comparisons when looking for
cousins to share.

        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::locateCousinList):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyleInternal):
        * khtml/rendering/render_object.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):

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

15 years ago Fixed: <rdar://problem/3827002> assertion failure in WebBaseNetscapePluginStream...
cblu [Tue, 5 Oct 2004 22:45:49 +0000 (22:45 +0000)]
Fixed: <rdar://problem/3827002> assertion failure in WebBaseNetscapePluginStream on abc.go.com

        Reviewed by rjw.

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream initWithRequestURL:pluginPointer:notifyData:sendNotification:]): avoid assertion failure in dealloc by temporarily setting isTerminated to YES in case we are released in this method
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): ditto

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

15 years ago Fix lists so that they properly participate in line layout as though they are text...
hyatt [Tue, 5 Oct 2004 22:19:36 +0000 (22:19 +0000)]
Fix lists so that they properly participate in line layout as though they are text (when text bullets are
used) and as images (when image bullets are used).

        Reviewed by kocienda

        * khtml/rendering/render_list.cpp:
        (RenderListMarker::createInlineBox):
        * khtml/rendering/render_list.h:
        (khtml::ListMarkerBox:::InlineBox):
        (khtml::ListMarkerBox::isText):

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

15 years ago * WebCoreSupport.subproj/WebBridge.m:
sullivan [Tue, 5 Oct 2004 22:14:40 +0000 (22:14 +0000)]
    * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]):
        initialize "arguments" var to nil to satisfy compiler on deployment build.

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

15 years ago Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools...
rjw [Tue, 5 Oct 2004 21:38:13 +0000 (21:38 +0000)]
    Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number

        Reviewed by Ken.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):

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

15 years ago Fixed <rdar://problem/3825442> first click lost for Dashboard
rjw [Tue, 5 Oct 2004 21:16:50 +0000 (21:16 +0000)]
    Fixed <rdar://problem/3825442> first click lost for Dashboard
Allow dashboard to force acceptsFirstMouse:

        Reviewed by Chris.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView acceptsFirstMouse:]):
        * WebView.subproj/WebView.m:
        (-[WebView _dashboardBehavior:]):
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

        * WebCoreSupport.subproj/WebImageRenderer.h:
        Comment change only

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

15 years agoBack out the assertion.
hyatt [Tue, 5 Oct 2004 21:08:51 +0000 (21:08 +0000)]
Back out the assertion.

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

15 years ago Fixed: <rdar://problem/3760920> Need to record plugin view instances
cblu [Tue, 5 Oct 2004 20:42:54 +0000 (20:42 +0000)]
Fixed: <rdar://problem/3760920> Need to record plugin view instances

        Reviewed by rjw.

        * Plugins.subproj/WebPluginController.h:
        * Plugins.subproj/WebPluginController.m:
        (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): new, creates plug-in view and adds it to global list
        (+[WebPluginController isPlugInView:]): new, checks if the plug-in view is in the global list
        (-[WebPluginController destroyAllPlugins]): remove the plug-in from the global list
        * Plugins.subproj/WebPluginDocumentView.m:
        (-[WebPluginDocumentView setDataSource:]): call [WebPluginController plugInViewWithArguments:fromPluginPackage:]
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): ditto
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]): call [WebPluginController isPlugInView:]
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]): ditto

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

15 years ago Reviewed by Darin
kocienda [Tue, 5 Oct 2004 20:37:50 +0000 (20:37 +0000)]
    Reviewed by Darin

        Recent checkin adding upstreamDeepEquivalent had it backwards. The helper
        we want is downstreamDeepEquivalent, as the deepEquivalent function returns
        an upstream position.

        * khtml/editing/selection.cpp:
        (khtml::Selection::layout): DOWNSTREAM case now uses downstreamDeepEquivalent.
        UPSTREAM uses deepEquivalent.
        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::downstreamDeepEquivalent): New helper, replacing
        upstreamDeepEquivalent.
        * khtml/editing/visible_position.h

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

15 years ago New selection gap-filling architecture. Makes the gap-filling much more like NSText...
hyatt [Tue, 5 Oct 2004 20:25:19 +0000 (20:25 +0000)]
New selection gap-filling architecture.  Makes the gap-filling much more like NSTextView and puts the responsibility
for gap-filling in the block.  Fixes numerous bugs with selection drawing including bidi issues, incorrect old
horizontal gap filling, and selection performance issues.

        Reviewed by kocienda

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageLoader::notifyFinished):
        * khtml/misc/khtmllayout.h:
        (khtml::GapRects::left):
        (khtml::GapRects::center):
        (khtml::GapRects::right):
        (khtml::GapRects::uniteLeft):
        (khtml::GapRects::uniteCenter):
        (khtml::GapRects::uniteRight):
        (khtml::GapRects::unite):
        (khtml::GapRects::operator QRect):
        (khtml::GapRects::operator==):
        (khtml::GapRects::operator!=):
        * khtml/rendering/font.cpp:
        (Font::drawHighlightForText):
        * khtml/rendering/font.h:
        * khtml/rendering/render_block.cpp:
        (khtml:::RenderFlow):
        (khtml::RenderBlock::removeChild):
        (khtml::RenderBlock::paintObject):
        (khtml::RenderBlock::paintEllipsisBoxes):
        (khtml::RenderBlock::setSelectionState):
        (khtml::RenderBlock::shouldPaintSelectionGaps):
        (khtml::RenderBlock::isSelectionRoot):
        (khtml::RenderBlock::selectionGapRects):
        (khtml::RenderBlock::paintSelection):
        (khtml::RenderBlock::fillSelectionGaps):
        (khtml::RenderBlock::fillInlineSelectionGaps):
        (khtml::RenderBlock::fillBlockSelectionGaps):
        (khtml::RenderBlock::fillHorizontalSelectionGap):
        (khtml::RenderBlock::fillVerticalSelectionGap):
        (khtml::RenderBlock::fillLeftSelectionGap):
        (khtml::RenderBlock::fillRightSelectionGap):
        (khtml::RenderBlock::getHorizontalSelectionGapInfo):
        (khtml::RenderBlock::leftSelectionOffset):
        (khtml::RenderBlock::rightSelectionOffset):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::hasSelectedChildren):
        (khtml::RenderBlock::selectionState):
        (khtml::RenderBlock::BlockSelectionInfo::BlockSelectionInfo):
        (khtml::RenderBlock::BlockSelectionInfo::rects):
        (khtml::RenderBlock::BlockSelectionInfo::state):
        (khtml::RenderBlock::BlockSelectionInfo::block):
        (khtml::RenderBlock::selectionRect):
        * khtml/rendering/render_box.cpp:
        (RenderBox::position):
        * khtml/rendering/render_br.cpp:
        (RenderBR::inlineBox):
        * khtml/rendering/render_br.h:
        (khtml::RenderBR::selectionRect):
        (khtml::RenderBR::paint):
        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::selectionRect):
        (RenderCanvas::setSelection):
        * khtml/rendering/render_canvasimage.cpp:
        (RenderCanvasImage::paint):
        * khtml/rendering/render_image.cpp:
        (RenderImage::paint):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_line.cpp:
        (khtml::InlineBox::nextLeafChild):
        (khtml::InlineBox::prevLeafChild):
        (khtml::InlineBox::selectionState):
        (khtml::InlineFlowBox::addToLine):
        (khtml::InlineFlowBox::firstLeafChild):
        (khtml::InlineFlowBox::lastLeafChild):
        (khtml::InlineFlowBox::firstLeafChildAfterBox):
        (khtml::InlineFlowBox::lastLeafChildBeforeBox):
        (khtml::InlineFlowBox::selectionState):
        (khtml::RootInlineBox::fillLineSelectionGap):
        (khtml::RootInlineBox::setHasSelectedChildren):
        (khtml::RootInlineBox::selectionState):
        (khtml::RootInlineBox::firstSelectedBox):
        (khtml::RootInlineBox::lastSelectedBox):
        (khtml::RootInlineBox::selectionTop):
        (khtml::RootInlineBox::block):
        * khtml/rendering/render_line.h:
        (khtml::RootInlineBox::RootInlineBox):
        (khtml::RootInlineBox::hasSelectedChildren):
        (khtml::RootInlineBox::selectionHeight):
        * khtml/rendering/render_object.cpp:
        (RenderObject::selectionColor):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::):
        (khtml::RenderObject::selectionState):
        (khtml::RenderObject::setSelectionState):
        (khtml::RenderObject::selectionRect):
        (khtml::RenderObject::canBeSelectionLeaf):
        (khtml::RenderObject::hasSelectedChildren):
        (khtml::RenderObject::hasDirtySelectionState):
        (khtml::RenderObject::setHasDirtySelectionState):
        (khtml::RenderObject::shouldPaintSelectionGaps):
        (khtml::RenderObject::SelectionInfo::SelectionInfo):
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::RenderReplaced):
        (RenderReplaced::shouldPaint):
        (RenderReplaced::selectionRect):
        (RenderReplaced::setSelectionState):
        (RenderReplaced::selectionColor):
        (RenderWidget::paint):
        (RenderWidget::setSelectionState):
        * khtml/rendering/render_replaced.h:
        (khtml::RenderReplaced::canBeSelectionLeaf):
        (khtml::RenderReplaced::selectionState):
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::checkVerticalPoint):
        (InlineTextBox::isSelected):
        (InlineTextBox::selectionState):
        (InlineTextBox::selectionRect):
        (InlineTextBox::paintSelection):
        (InlineTextBox::paintMarkedTextBackground):
        (RenderText::paint):
        (RenderText::setSelectionState):
        (RenderText::selectionRect):
        * khtml/rendering/render_text.h:
        (khtml::RenderText::canBeSelectionLeaf):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawHighlightForText):
        * kwq/KWQPtrDict.h:
        (QPtrDictIterator::toFirst):
        * kwq/KWQRect.mm:
        (QRect::unite):
        * kwq/WebCoreTextRenderer.h:
        * kwq/WebCoreTextRendererFactory.mm:
        (WebCoreInitializeEmptyTextGeometry):

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

15 years ago Fix to make selection more like NSTextView. All gap painting is now done by WebCore...
hyatt [Tue, 5 Oct 2004 20:11:51 +0000 (20:11 +0000)]
Fix to make selection more like NSTextView.  All gap painting is now done by WebCore, so WebKit no longer
needs to try to fill gaps around text.

        Reviewed by kocienda

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]):
        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):

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

15 years ago Reviewed by Darin
kocienda [Tue, 5 Oct 2004 20:05:38 +0000 (20:05 +0000)]
    Reviewed by Darin

        Use the new CSS properties I added with my previous check-in. Also makes
        some changes to caret positioning and drawing to make the proper editing
        end-of-line behavior work correctly.

        * khtml/editing/selection.cpp:
        (khtml::Selection::layout): Caret drawing now takes affinity into account
        when deciding where to paint the caret (finally!).
        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::previousVisiblePosition): Move off Position::rendersInDifferentPosition
        to determine the result. Use a simpler test involving comparisons between
        downstream positions while iterating. This is cheaper to do and easier to understand.
        (khtml::VisiblePosition::nextVisiblePosition): Ditto.
        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::current): Do not return non-breaking spaces for empty
        text renderers and for non-text renderers. Return a null Qchar instead. Returning
        non-breaking spaces was causing errors when the new -khtml-nbsp-mode was set to "space".
        (khtml::RenderBlock::computeHorizontalPositionsForLine): Shrink line boxes that
        contain with more spaces than can fit on the end of a line.
        (khtml::RenderBlock::skipWhitespace): Factor this out from findNextLineBreak.
        (khtml::RenderBlock::findNextLineBreak): Use new skipWhitespace function. Add
        in code to check and use new CSS properties.
        * khtml/rendering/break_lines.cpp:
        (khtml::isBreakable): Consider a non-breaking space a breakable character based
        on setting of new -khtml-nbsp-mode property.
        * khtml/rendering/break_lines.h: Ditto.
        * khtml/rendering/render_block.h: Declare skipWhitespace function.
        * khtml/rendering/render_text.cpp:
        (RenderText::caretRect): Do not draw the caret beyond the right edge of the
        window when in white-space normal mode.

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

15 years ago Reviewed by Darin
kocienda [Tue, 5 Oct 2004 18:24:01 +0000 (18:24 +0000)]
    Reviewed by Darin

        Fix for these bugs:

        In this patch, I add two new CSS properties and their associated behavior.
        This is to support end-of-line and word-wrapping features that match the
        conventions of text editors.

        There are also some other small changes here which begin to lay the groundwork
        for using these new properties to bring about the desired editing behavior.

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue): Add support for new CSS properties.
        * khtml/css/cssproperties.c: Generated file.
        * khtml/css/cssproperties.h: Ditto.
        * khtml/css/cssproperties.in: Add new properties.
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty): Add support for new CSS properties.
        * khtml/css/cssvalues.c: Generated file.
        * khtml/css/cssvalues.h: Ditto.
        * khtml/css/cssvalues.in:  Add support for new CSS properties.
        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::upstreamDeepEquivalent): Added new helper.
        * khtml/editing/visible_position.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::deleteLineBoxWrapper): Zero out inlineBoxWrapper.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach): Zero out inlineBoxWrapper.
        * khtml/rendering/render_style.cpp:
        (StyleCSS3InheritedData):
        (StyleCSS3InheritedData::operator==): Add support for new CSS properties.
        (RenderStyle::diff): Ditto.
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::nbspMode): Ditto.
        (khtml::RenderStyle::khtmlLineBreak): Ditto.
        (khtml::RenderStyle::setNBSPMode): Ditto.
        (khtml::RenderStyle::setKHTMLLineBreak): Ditto.
        (khtml::RenderStyle::initialNBSPMode): Ditto.
        (khtml::RenderStyle::initialKHTMLLineBreak): Ditto.

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

15 years ago Reviewed by John.
darin [Tue, 5 Oct 2004 15:44:58 +0000 (15:44 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3577255> custom file icon shows up upside down in <input type=file>

        * WebCoreSupport.subproj/WebFileButton.m: (-[WebFileButton setFilename:]): Added a call to
        setFlipped that fixes the problem, even though I don't know why.

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

15 years ago Reviewed by John.
darin [Tue, 5 Oct 2004 15:43:50 +0000 (15:43 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3673150> Pasting string from clipboard that is longer than input box will accept fails rather than truncating

        * kwq/KWQTextField.mm:
        (-[KWQTextFieldFormatter isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:]):
        Wrote a new version of this method that truncates incoming strings rather than rejecting them
        out of hand.

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

15 years ago Reviewed by Maciej.
darin [Tue, 5 Oct 2004 07:03:55 +0000 (07:03 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectionStartFontAttributesAsRTF]): Changed to call new bridge method
        named fontAttributesForSelectionStart, deleted the method this used to use, and renamed
        this to have the word "start" in it.
        (-[WebHTMLView copyFont:]): Updated for name change.

        * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

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

15 years ago Reviewed by Maciej.
darin [Tue, 5 Oct 2004 07:01:21 +0000 (07:01 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3826343> crash in KHTMLParser::setCurrent parsing document fragment (happens in Calendar widget)

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Initialized currentIsReferenced to false (fixes bug).
        (KHTMLParser::reset): Use doc() to make code easier to read.
        (KHTMLParser::setCurrent): Ditto.
        (KHTMLParser::parseToken): Ditto.
        (KHTMLParser::insertNode): Ditto.
        (KHTMLParser::getElement): Ditto.
        (KHTMLParser::popOneBlock): Ditto.

        - fixed <rdar://problem/3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window

        * kwq/KWQKHTMLPart.h: Added fontAttributesForSelectionStart.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::styleForSelectionStart): Factored out most of fontForSelection.
        (KWQKHTMLPart::fontAttributesForSelectionStart): Added.
        (KWQKHTMLPart::fontAttributesForSelectionStart): Added.
        (KWQKHTMLPart::registerCommandForUndo): Updated for name change (see below).
        (KWQKHTMLPart::registerCommandForRedo): Ditto.

        * kwq/WebCoreBridge.h: Added fontAttributesForSelectionStart.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge undoEditing:]): Updated for name change (see below).
        (-[WebCoreBridge redoEditing:]): Ditto.
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): Got rid of named temporary
        EditCommandPtr variable to make things slightly more terse.
        (-[WebCoreBridge moveSelectionToDragCaret:smartMove:]): Ditto.
        (-[WebCoreBridge deleteSelectionWithSmartDelete:]): Ditto.
        (-[WebCoreBridge fontAttributesForSelectionStart]): Added.

        - fix compile on Panther and other cleanup

        * khtml/khtml_part.cpp: Removed unneeded include.
        * kwq/KWQEditCommand.h: Got rid of use of "impl" when referring to EditCommand pointers.
        * kwq/KWQEditCommand.mm: Added include so we compile on Panther.
        (-[KWQEditCommand initWithEditCommand:]): Changed name.
        (-[KWQEditCommand dealloc]): Updated for m_impl change to m_command.
        (-[KWQEditCommand finalize]): Ditto.
        (+[KWQEditCommand commandWithEditCommand:]): Changed name.
        (-[KWQEditCommand command]): Changed name.

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

15 years ago * WebView.subproj/WebFrameInternal.h: removed constant declarations that...
cblu [Mon, 4 Oct 2004 23:20:52 +0000 (23:20 +0000)]
    * WebView.subproj/WebFrameInternal.h: removed constant declarations that I committed by mistake

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

15 years ago Reviewed by John.
darin [Mon, 4 Oct 2004 22:54:51 +0000 (22:54 +0000)]
    Reviewed by John.

        - did a more-robust version of the fix I just landed

        * khtml/html/htmlparser.h: Added currentIsReferenced boolean.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Initializes currentIsReferenced.
        (KHTMLParser::setCurrent): Changed to respect and set currentIsReferenced.

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

15 years ago Reviewed by John.
darin [Mon, 4 Oct 2004 22:45:22 +0000 (22:45 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3824393> REGRESSION (165-TOT): Crash in KHTMLParser::popOneBlock closing window (bose.com)

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::~KHTMLParser): Move call to setCurrent(0) after the call to freeBlock, since freeBlock doesn't
        work well when current is 0, and there's no reason we need to reset the current block first.
        (KHTMLParser::setCurrent): Don't ever hold a reference to the document. This prevents a situation where there
        would be a reference cycle. In the test case from the bug above, this cycle actually happened and resulted
        in a double-delete of the document, tokenizer, and parser.

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

15 years ago Fixed: <rdar://problem/3798948> NPP_URLNotify is not called if plug-in calls NPN_...
cblu [Mon, 4 Oct 2004 22:14:54 +0000 (22:14 +0000)]
Fixed: <rdar://problem/3798948> NPP_URLNotify is not called if plug-in calls NPN_*URLNotfy
Fixed a number of FIXME's related to notifying plug-ins of loaded pages.

        Reviewed by rjw.

        * Plugins.subproj/WebBaseNetscapePluginStream.h:
- replaced URL ivar with requestURL and responseURL ivars since we need to pass both to plug-ins
         - added sendNotification boolean. Relying on notifyData not being NULL was not information to know whether to call NPP_URLNotify or not.
- added isTerminated boolean because determining whether or not stream.ndata is NULL is not enough to know if the stream has been cancelled.
* Plugins.subproj/WebBaseNetscapePluginStream.m:
        (+[WebBaseNetscapePluginStream reasonForError:]): new, factored out from receivedError:
        (-[WebBaseNetscapePluginStream initWithRequestURL:pluginPointer:notifyData:sendNotification:]): new
        (-[WebBaseNetscapePluginStream dealloc]): release new ivars
        (-[WebBaseNetscapePluginStream finalize]): added assert
        (-[WebBaseNetscapePluginStream setRequestURL:]): new
        (-[WebBaseNetscapePluginStream setResponseURL:]): new
        (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): renamed, use responseURL as it basically did before
        (-[WebBaseNetscapePluginStream startStreamWithResponse:]): call renamed method
        (-[WebBaseNetscapePluginStream destroyStream]):
- do nothing if terminated
- call NPP_StreamAsFile and NPP_DestroyStream if stream.ndata is not NULL
- call NPP_URLNotify if sendNotification is YES regardless of value of notifyData
        (-[WebBaseNetscapePluginStream receivedError:]): call reasonForError
        (-[WebBaseNetscapePluginStream deliverData]): use renamed ivar
        * Plugins.subproj/WebBaseNetscapePluginView.h:
- added observingFrameLoadNotification boolean
- renamed dictionary ivar to pendingFrameLoads which has WebFrame keys and WebPluginRequest values
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView addFrameLoadObserver]): new
        (-[WebBaseNetscapePluginView removeFrameLoadObserver]): new
        (-[WebBaseNetscapePluginView stop]): call removeFrameLoadObserver
        (-[WebBaseNetscapePluginView initWithFrame:]): use renamed pendingFrameLoads ivar
        (-[WebBaseNetscapePluginView dealloc]): ditto
        (-[WebBaseNetscapePluginView requestWithURLCString:]): set referrer on the request just as IE does
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
- call NPP_URLNotify depending of value of sendNotification
- call new init method on WebBaseNetscapePluginStream rather then setting variables individually
        (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): new, calls NPP_URLNotify at the right time with the right value
        (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]): new, delegate method called from WebFrame
        (-[WebBaseNetscapePluginView loadPluginRequest:]): call addFrameLoadObserver
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): take new sendNotification parameter and pass it
        (-[WebBaseNetscapePluginView getURLNotify:target:notifyData:]): pass YES for sendNotification
        (-[WebBaseNetscapePluginView getURL:target:]): pass NO for sendNotification
        (-[WebBaseNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]): take new sendNotification parameter and pass it
        (-[WebBaseNetscapePluginView postURLNotify:target:len:buf:file:notifyData:]): pass YES for sendNotification
        (-[WebBaseNetscapePluginView postURL:target:len:buf:file:]): pass NO for sendNotification
        (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:]): take new sendNotification parameter
        (-[WebPluginRequest sendNotification]): new
        * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
        * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
        (-[WebNetscapePluginEmbeddedView didStart]): set referrer on the request just as IE does
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        (-[WebNetscapePluginRepresentation receivedData:withDataSource:]): set the request URL on the stream
        * Plugins.subproj/WebNetscapePluginStream.h:
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): take new sendNotification parameter and pass it
        (-[WebNetscapePluginStream dealloc]): use renamed ivar
        (-[WebNetscapePluginStream start]): ditto
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _setState:]): removed notification posting code. This was only used by WebBaseNetscapePluginView and it was the wrong notification to send.
        (-[WebFrame _checkLoadCompleteForThisFrame]): call internal load delegate to tell it that the load has finished
        (-[WebFrame _loadItem:withLoadType:]): ditto
        (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]): ditto
        (-[WebFrame _setInternalLoadDelegate:]): new
        (-[WebFrame _internalLoadDelegate]): new
        * WebView.subproj/WebFrameInternal.h:
        * WebView.subproj/WebFramePrivate.h:

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

15 years ago Reviewed by Maciej.
darin [Mon, 4 Oct 2004 21:32:56 +0000 (21:32 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3825429> onclick handler called when mouse down on another element (affects Dashboard Movies widget, test case enclosed)

        * khtml/khtmlview.cpp:
        (KHTMLViewPrivate::KHTMLViewPrivate): Initialize the click node to 0.
        (KHTMLViewPrivate::~KHTMLViewPrivate): Deref the click node.
        (KHTMLViewPrivate::reset): Clear the click node.
        (KHTMLView::viewportMousePressEvent): Call invalidateClick when we pass the event to a subframe to
        reduce the chance that we'll hold on to an old click node for a long time. Set the click node to
        the node we we are clicking on.
        (KHTMLView::viewportMouseDoubleClickEvent): Only send a click even if the node is the same one from
        the original click. Call invalidateClick when done to reduce the chance that we'll hold on to an
        old click node for a long time.
        (KHTMLView::invalidateClick): Clear the click node.
        (KHTMLView::viewportMouseReleaseEvent): Only send a click even if the node is the same one from
        the original click. Call invalidateClick when done to reduce the chance that we'll hold on to an
        old click node for a long time.
        (KHTMLView::keyPressEvent): Remove code that sets the originalNode field, which is never used.

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

15 years ago Reviewed by Hyatt
kocienda [Mon, 4 Oct 2004 18:52:39 +0000 (18:52 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3825289> REGRESSION (Mail): Crash in fontForSelection in empty window

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::previousPosition): Switch to node iteration instead "leaf"
        iteration. I have been wanting to make this change for a long time, but couldn't
        since other code relied on the leaf behavior. That is no longer true. Plus, the
        bug fix requires the new behavior.
        (khtml::VisiblePosition::nextPosition): Ditto.
        (khtml::VisiblePosition::isCandidate): Empty blocks needed a height to be a candidate,
        but we make a special case for the body element. This fixes the bug.

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

15 years ago Fixed: <rdar://problem/3758113> REGRESSION: Macromedia ColdFusion page doesn't show...
cblu [Mon, 4 Oct 2004 18:01:26 +0000 (18:01 +0000)]
Fixed: <rdar://problem/3758113> REGRESSION: Macromedia ColdFusion page doesn't show main content

After bumping up our plug-in version, Flash now sends 2 CRLF's between the headers and body of their POST request. Our code was not prepared for this.

        Reviewed by darin.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[NSData _web_locationAfterFirstBlankLine]): looks for 2 CRLF's, not for 2 LF's

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

15 years ago Reviewed by Ken.
darin [Mon, 4 Oct 2004 17:43:49 +0000 (17:43 +0000)]
    Reviewed by Ken.

        - fixed a potential storage leak when we turn on CGImageRef image rendering

        * WebCoreSupport.subproj/WebImageRenderer.m: (-[WebImageRenderer dealloc]): Fix potential storage leak
        by adding [super dealloc], but leak was not real yet because the code is commented out.

        - make paste style work with color as part of fix to <rdar://problem/3814237> REGRESSION (Mail):
          Copy/paste style does not set color in Mail compose window

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectionFontAttributes]): Change structure so it's easy to add more attributes.
        For now I haven't added any yet.
        (-[WebHTMLView _colorAsString:]): Moved this earlier in the file.
        (-[WebHTMLView _shadowAsString:]): Ditto.
        (-[WebHTMLView _styleFromFontAttributes:]): Add background color, foreground color, and text shadow.

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

15 years ago Reviewed by Ken.
darin [Mon, 4 Oct 2004 17:40:13 +0000 (17:40 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3800667> REGRESSION (Mail): double-clicking multiple spaces only selects two spaces

        * kwq/KWQTextUtilities.mm: (KWQFindWordBoundary): Moved here from the .cpp file. Changed to use the
        doubleClickAtIndex: method from NSAttributedString rather than using Unicode Utilities.
        * kwq/KWQTextUtilities.cpp: Removed.
        * WebCore.pbproj/project.pbxproj: Removed KWQTextUtilities.cpp.

        - fixed a problem that would show up using HTML editing under garbage collection

        * kwq/KWQEditCommand.mm: (-[KWQEditCommand finalize]): Fixed a [super dealloc] that should have been a
        [super finalize].

        - another small change

        * khtml/editing/visible_units.cpp: (khtml::nextWordBoundary): Tweaked a comment.

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

15 years ago Reviewed by Ken.
darin [Mon, 4 Oct 2004 17:34:12 +0000 (17:34 +0000)]
    Reviewed by Ken.

        - rolled in a fix the KDE folks did for the operations that generate HTML fragments

        * kjs/string_object.cpp: (StringProtoFuncImp::call): Added quote marks to generated HTML.

        - rolled out an old workaround we don't need any more

        * JavaScriptCore.pbproj/project.pbxproj: Remove -Wno-long-double because the <math.h> issue that
        required it is no longer there.

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

15 years ago Reviewed by Ken (or arguably done by Ken, reviewed by Darin).
darin [Fri, 1 Oct 2004 17:25:20 +0000 (17:25 +0000)]
    Reviewed by Ken (or arguably done by Ken, reviewed by Darin).

        - fixed <rdar://problem/3823828> REGRESSION (Mail): Clicking past end of any line puts insertion point at beginning of next line

        * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::VisiblePosition):
        Check for an offset of 0 and a <br> and use UPSTREAM affinity in that case.
        This is a short term fix for something that needs a better longer-term fix.

        - fixed <rdar://problem/3823816> REGRESSION (Mail): double-clicking first word on line also selects previous empty line

        * khtml/editing/visible_units.cpp: (khtml::previousWordBoundary): Added a special
        case for <br>. While I'm not sure why this regressed, I'm sure this fix is good.

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

15 years ago Reviewed by John.
darin [Fri, 1 Oct 2004 15:18:31 +0000 (15:18 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3782117> CrashTracer: ..722 crashes at com.apple.WebCore: DOM::HTMLBodyElementImpl::insertedIntoDocument + 0x2c (AOL website)

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::insertedIntoDocument): Check for nil document case.
        (HTMLFrameElementImpl::isURLAllowed): Ditto.
        (HTMLFrameElementImpl::openURL): Ditto.

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

15 years ago Reviewed by Maciej.
darin [Fri, 1 Oct 2004 08:02:28 +0000 (08:02 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3822218> REGRESSION (164-165): images don't update on rollover on directv.com page

        I introduced a major regression where various JavaScript window properties would not be found when I
        fixed bug 3809600.

        * khtml/ecma/kjs_window.h: Added hasProperty.
        * khtml/ecma/kjs_window.cpp: (Window::hasProperty): Return true in all the cases where get returns something.

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

15 years ago Reviewed by Maciej.
darin [Fri, 1 Oct 2004 06:43:37 +0000 (06:43 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3461499> JavaScript function document.open() is buggy with 2nd argument "replace"

        Experiments with Firefox indicate that document.open() should not be treated as window.open() unless there
        are more than two parameters. Also, Firefox does not implement the "replace" behavior, so we don't have
        to worry about it either.

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): Only forward to window if there are more than
        two parameters, rather than if there are more than one.

        - fixed <rdar://problem/3672933> oninput is firing at page load time for <input type=range>

        * kwq/KWQSlider.mm: (QSlider::setValue): Don't emit a signal here. This follows the usual pattern, where
        a signal is only emitted for changes that are not explicitly requested by the caller.

        - fixed <rdar://problem/3821167> leaks of something allocated by recalcStyle after loading altavista page from cvs-base

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Ref and deref the style we allocate so it's
        not left floating if setStyle decides not to ref it.

        - fixed <rdar://problem/3821172> leak of HTML attribute string after loading the ESPN page from cvs-base

        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Use the DOMString version of
        the lower() operation so we don't end up leaving a DOMStringImpl * floating if AtomicString decides not
        to ref it.

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

15 years agoWebKit:
rjw [Fri, 1 Oct 2004 00:24:39 +0000 (00:24 +0000)]
WebKit:
Fixed <rdar://problem/3821215> NPN hasMethod and hasProperty functions should take NPObjects, not NPClass

Also changed dashboard regions dictionary to use "control"
for scroller region label, instead of "scroller, per
request from ouch.

        Reviewed by Chris.

        * Plugins.subproj/npruntime.h:
        * WebView.subproj/WebView.m:
        (-[WebView _addScrollerDashboardRegions:from:]):

JavaScriptCore:
Fixed <rdar://problem/3821215> NPN hasMethod and hasProperty functions should take NPObjects, not NPClass

        Reviewed by Chris.

        * bindings/NP_jsobject.cpp:
        (_NPN_GetProperty):
        (_NPN_HasProperty):
        (_NPN_HasMethod):
        * bindings/c/c_class.cpp:
        (CClass::methodsNamed):
        (CClass::fieldNamed):
        * bindings/c/c_class.h:
        * bindings/c/c_instance.cpp:
        (CInstance::invokeMethod):
        * bindings/jni/jni_class.cpp:
        (JavaClass::methodsNamed):
        * bindings/jni/jni_class.h:
        * bindings/npruntime.h:
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_class.mm:
        (ObjcClass::methodsNamed):
        * bindings/runtime.h:
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::hasProperty):

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

15 years ago Fixed: <rdar://problem/3498680> switching back and forth between tabs stops calling...
cblu [Fri, 1 Oct 2004 00:18:47 +0000 (00:18 +0000)]
Fixed: <rdar://problem/3498680> switching back and forth between tabs stops calling anything in a plug-in

        Reviewed by darin.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView sendEvent:]): call setWindowIfNecessary because the window may have changed
        (-[WebBaseNetscapePluginView updateAndSetWindow]): new
        (-[WebBaseNetscapePluginView setWindowIfNecessary]): was setWindow, this method now just sets the window
        (-[WebBaseNetscapePluginView start]): call updateAndSetWindow
        (-[WebBaseNetscapePluginView viewDidMoveToWindow]): ditto
        (-[WebBaseNetscapePluginView viewHasMoved:]): ditto

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

15 years ago Fixed: <rdar://problem/3498668> switching out of tab doesn't send loseFocusEvent...
cblu [Thu, 30 Sep 2004 23:14:47 +0000 (23:14 +0000)]
Fixed: <rdar://problem/3498668> switching out of tab doesn't send loseFocusEvent to plug-in

        Reviewed by rjw.

        * Plugins.subproj/WebBaseNetscapePluginView.h:
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView setHasFocus:]): new, sends events to plug-in
        (-[WebBaseNetscapePluginView becomeFirstResponder]): call setHasFocus
        (-[WebBaseNetscapePluginView resignFirstResponder]): ditto
        (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): ditto

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

15 years ago Fixed <rdar://problem/3822330> REGRESSION: crash on launch when homepage is set...
rjw [Thu, 30 Sep 2004 20:04:48 +0000 (20:04 +0000)]
Fixed <rdar://problem/3822330> REGRESSION: crash on launch when homepage is set to about:blank

Added nil check.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setDisplaysWithFocusAttributes):

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

15 years ago Fixed: <rdar://problem/3792822> Safari is calling the Cocoa QuickTime plugin twice...
cblu [Thu, 30 Sep 2004 19:48:13 +0000 (19:48 +0000)]
Fixed: <rdar://problem/3792822> Safari is calling the Cocoa QuickTime plugin twice for the OBJECT and EMBED tags

        Reviewed by hyatt.

        * khtml/html/html_objectimpl.cpp:
        (HTMLObjectElementImpl::attach): call dispatchHTMLEvent after updateWidget instead of every time this method is called
        (HTMLObjectElementImpl::recalcStyle): ditto

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

15 years ago - rolled out bad image change that caused performance regression
darin [Thu, 30 Sep 2004 18:56:45 +0000 (18:56 +0000)]
    - rolled out bad image change that caused performance regression

        * khtml/rendering/render_image.cpp: (RenderImage::setPixmap):
        Don't reference the new image before doing the assignment.
        This forced an unwanted.

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

15 years ago Fixed:
cblu [Thu, 30 Sep 2004 17:52:27 +0000 (17:52 +0000)]
Fixed:
Assertion failure when loading standalone netscape plug-in content.
Document loads of WebKit plug-in content should be cancelled since the plug-in does its own loading.

        Reviewed by john.

        * Misc.subproj/WebKitErrors.m: removed deprecated method
        * Misc.subproj/WebKitErrorsPrivate.h:
        * Plugins.subproj/WebNetscapePluginDocumentView.m:
        (-[WebNetscapePluginDocumentView setDataSource:]): fixed the assertion statement
        * Plugins.subproj/WebPluginDocumentView.h:
        * Plugins.subproj/WebPluginDocumentView.m:
        (-[WebPluginDocumentView dealloc]): remove retained plug-in
        (-[WebPluginDocumentView setDataSource:]): retain the plug-in, cancel the laod

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

15 years ago Reviewed by me, coded by Darin
kocienda [Thu, 30 Sep 2004 16:59:50 +0000 (16:59 +0000)]
    Reviewed by me, coded by Darin

        - fixed <rdar://problem/3818305> REGRESSION (Mail): Shift + page up has no effect; should modify selection

        * khtml/editing/selection.cpp: (khtml::Selection::modify): Fix problem where vertical distance
        was used as a distance threshold, but was a negative number. Now make it positive at the start
        of the function (and make a couple related changes).

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

15 years ago Fixed:
cblu [Thu, 30 Sep 2004 01:32:15 +0000 (01:32 +0000)]
Fixed:
<rdar://problem/3763832> Safari-155: Non-Embeded movies fail to open in Cocoa QT plug-in
<rdar://problem/3820517> "*** -[WebPluginPackage NPP_New]: selector not recognized [self = 0x5552c10]"

        Reviewed by rjw.

        * History.subproj/WebHistoryItem.m:
        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_firstResponderCausesFocusDisplay]):
        (-[NSView _webView]):
        (-[NSView _frame]):
        (-[NSView _bridge]):
        (-[NSView _dataSource]):
        * Plugins.subproj/WebBasePluginPackage.h:
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage hash]):
        (-[WebBasePluginPackage isQuickTimePlugIn]):
        * Plugins.subproj/WebNetscapePluginDocumentView.m:
        (-[WebNetscapePluginDocumentView setDataSource:]):
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        * Plugins.subproj/WebPluginController.h:
        * Plugins.subproj/WebPluginController.m:
        (-[WebPluginController initWithDocumentView:]):
        (-[WebPluginController addPlugin:]):
        (-[WebPluginController destroyAllPlugins]):
        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
        (-[WebPluginController webPlugInContainerShowStatus:]):
        (-[WebPluginController webPlugInContainerSelectionColor]):
        (-[WebPluginController webFrame]):
        * Plugins.subproj/WebPluginDatabase.h:
        * Plugins.subproj/WebPluginDatabase.m:
        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
        (-[WebPluginDatabase refresh]):
        (WebPluginDocumentView::while):
        * Plugins.subproj/WebPluginDocumentView.h: Added.
        * Plugins.subproj/WebPluginDocumentView.m: Added.
        (-[WebPluginDocumentView initWithFrame:]):
        (-[WebPluginDocumentView dealloc]):
        (-[WebPluginDocumentView drawRect:]):
        (-[WebPluginDocumentView setDataSource:]):
        (-[WebPluginDocumentView setNeedsLayout:]):
        (-[WebPluginDocumentView layout]):
        (-[WebPluginDocumentView currentWindow]):
        (-[WebPluginDocumentView viewWillMoveToWindow:]):
        (-[WebPluginDocumentView viewDidMoveToWindow]):
        (-[WebPluginDocumentView viewWillMoveToHostWindow:]):
        (-[WebPluginDocumentView viewDidMoveToHostWindow]):
        (-[WebPluginDocumentView receivedData:withDataSource:]):
        (-[WebPluginDocumentView receivedError:withDataSource:]):
        (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
        (-[WebPluginDocumentView canProvideDocumentSource]):
        (-[WebPluginDocumentView documentSource]):
        (-[WebPluginDocumentView title]):
        * Plugins.subproj/npapi.m:
        (NPN_ReleaseVariantValue):
        (NPN_GetStringIdentifier):
        (NPN_GetStringIdentifiers):
        (NPN_GetIntIdentifier):
        (NPN_IdentifierIsString):
        (NPN_UTF8FromIdentifier):
        (NPN_IntFromIdentifier):
        (NPN_CreateObject):
        (NPN_RetainObject):
        (NPN_ReleaseObject):
        (NPN_Invoke):
        (NPN_InvokeDefault):
        (NPN_Evaluate):
        (NPN_GetProperty):
        (NPN_SetProperty):
        (NPN_RemoveProperty):
        (NPN_HasProperty):
        (NPN_HasMethod):
        (NPN_SetException):
        (NPN_Call):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge frameRequiredForMIMEType:URL:]):
        * WebCoreSupport.subproj/WebViewFactory.m:
        * WebKit.exp:
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebDebugDOMNode.m:
        * WebView.subproj/WebDocumentInternal.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView initWithFrame:]):
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebRenderNode.m:
        * WebView.subproj/WebView.m:

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

15 years ago Prepended underscores to NPN methods so that when the QT plug-in loads these symbols...
cblu [Thu, 30 Sep 2004 01:32:04 +0000 (01:32 +0000)]
Prepended underscores to NPN methods so that when the QT plug-in loads these symbols, it uses the non-underscore versions in WebKit. Without this, the QT plug-in was failing to load when launching Safari from the command-line.

        Reviewed by rjw.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.cpp:
        (_NPN_CreateScriptObject):
        (_NPN_InvokeDefault):
        (_NPN_Invoke):
        (_NPN_Evaluate):
        (_NPN_GetProperty):
        (_NPN_SetProperty):
        (_NPN_RemoveProperty):
        (_NPN_HasProperty):
        (_NPN_HasMethod):
        * bindings/c/c_class.cpp:
        (CClass::methodsNamed):
        (CClass::fieldNamed):
        * bindings/c/c_instance.cpp:
        (CInstance::CInstance):
        (CInstance::~CInstance):
        (CInstance::operator=):
        (CInstance::invokeMethod):
        (CInstance::invokeDefaultMethod):
        * bindings/c/c_runtime.cpp:
        * bindings/c/c_runtime.h:
        (KJS::Bindings::CField::name):
        (KJS::Bindings::CMethod::name):
        * bindings/npruntime.cpp:
        (_NPN_GetStringIdentifier):
        (_NPN_GetStringIdentifiers):
        (_NPN_GetIntIdentifier):
        (_NPN_IdentifierIsString):
        (_NPN_UTF8FromIdentifier):
        (_NPN_IntFromIdentifier):
        (NPN_InitializeVariantWithObject):
        (_NPN_ReleaseVariantValue):
        (_NPN_CreateObject):
        (_NPN_RetainObject):
        (_NPN_ReleaseObject):
        (_NPN_SetExceptionWithUTF8):
        (_NPN_SetException):

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

15 years agoWebKit:
rjw [Thu, 30 Sep 2004 00:39:53 +0000 (00:39 +0000)]
WebKit:
Fixed <rdar://problem/3779998> bringing window to front or sending to back does not send focus/blur events to JavaScript window object

The fix has two parts, 1) make onblur and onfocus work for windows,
        and 2), allow the dashboard to override WebKit's special key/non-key
        behaviors.

        Reviewed by Maciej.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView restartNullEvents]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addMouseMovedObserver]):
        (-[WebHTMLView removeMouseMovedObserver]):
        * WebView.subproj/WebView.m:
        (-[WebView _dashboardBehavior:]):
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

WebCore:
Fixed <rdar://problem/3779998> bringing window to front or sending to back does not send focus/blur events to JavaScript window object

The fix has two parts, 1) make onblur and onfocus work for windows,
        and 2), allow the dashboard to override WebKit's special key/non-key
        behaviors.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setDisplaysWithFocusAttributes):

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 29 Sep 2004 21:55:48 +0000 (21:55 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3705894> REGRESSION (Mail): if a single word is wider than the window,
        it doesn't break and just runs off the right side

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support for CSS_PROP_WORD_WRAP.
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue): Ditto.
        * khtml/css/cssproperties.c: Generated file.
        * khtml/css/cssproperties.h: Ditto.
        * khtml/css/cssproperties.in: Add word-wrap property.
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty): Add support for CSS_PROP_WORD_WRAP.
        * khtml/css/cssvalues.c: Generated file.
        * khtml/css/cssvalues.h: Ditto.
        * khtml/css/cssvalues.in: Add break-word value.
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::findNextLineBreak): Add code to implement new word wrapping feature.
        * khtml/rendering/render_style.cpp:
        (StyleCSS3InheritedData): Add support for new wordWrap property.
        (StyleCSS3InheritedData::operator==): Ditto.
        (RenderStyle::diff): Ditto.
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::wordWrap): Ditto.
        (khtml::RenderStyle::setWordWrap): Ditto.
        (khtml::RenderStyle::initialWordWrap): Ditto.

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

15 years agoWebCore:
mjs [Wed, 29 Sep 2004 20:40:13 +0000 (20:40 +0000)]
WebCore:

        Reviewed by John.

- consolidated OS version checks into prefix header

        * WebCorePrefix.h:
        * khtml/rendering/render_canvasimage.cpp:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject roleDescription]):
        (-[KWQAccObject accessibilityActionDescription:]):
        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox):
        * kwq/KWQFoundationExtras.h:

WebKit:

        Reviewed by John.

- consolidated OS version checks into prefix header

        * Misc.subproj/WebFileDatabase.m:
        (-[WebFileDatabase _createLRUList:]):
        (+[WebFileDatabase _syncLoop:]):
        * Misc.subproj/WebKitErrors.m:
        (registerErrors):
        * Misc.subproj/WebNSObjectExtras.h:
        (WebNSRetainCFRelease):
        * Misc.subproj/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
        * Misc.subproj/WebUnicode.m:
        (_unicodeDirection):
        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebNewKeyGeneration.c:
        * WebKitPrefix.h:
        * WebView.subproj/WebDataSource.m:
        (+[WebDataSource _repTypesAllowImageTypeOmission:]):
        (-[WebDataSource isLoading]):
        * WebView.subproj/WebFrameView.m:
        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
        * WebView.subproj/WebHTMLView.m:
        * WebView.subproj/WebPDFRepresentation.h:
        * WebView.subproj/WebPDFRepresentation.m:
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:

WebBrowser:

        Reviewed by John.

- consolidated OS version checks into prefix header

        * AddressBarContentsManager.h:
        * AddressBarContentsManager.m:
        * AddressBarController.m:
        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        * BookmarkCollections.m:
        * BookmarksController.h:
        * BookmarksController.m:
        * BookmarksViewController.m:
        * BrowserDocument.h:
        * BrowserDocument.m:
        * BrowserDocumentController.h:
        * BrowserDocumentController.m:
        * BrowserNSNetServiceExtras.m:
        * BrowserWebBookmarkExtras.m:
        * BrowserWebController.m:
        * BrowserWebViewPrinting.m:
        * BrowserWindow.m:
        (-[BrowserWindow performKeyEquivalent:]):
        * BrowserWindowController.h:
        * BrowserWindowController.m:
        (-[BrowserWindowController locationField]):
        (-[BrowserWindowController searchField]):
        (-[BrowserWindowController locationBarIsShowing]):
        (-[BrowserWindowController setUpLocationBar]):
        (-[BrowserWindowController isShowingBar:]):
        (-[BrowserWindowController updateKeyboardLoop]):
        (-[BrowserWindowController windowDidLoad]):
        (-[BrowserWindowController dealloc]):
        (-[BrowserWindowController setDocument:]):
        (-[BrowserWindowController showLocationBarTemporarilyIfHidden]):
        (-[BrowserWindowController makeLocationBarPermanentIfTemporary]):
        (-[BrowserWindowController hideLocationBarIfTemporary]):
        (-[BrowserWindowController selectSearchField:]):
        (-[BrowserWindowController canShowInputFields]):
        (-[BrowserWindowController updateStopAndReloadButton]):
        (-[BrowserWindowController toggleLocationBar:]):
        (-[BrowserWindowController setToolbarsVisible:]):
        (-[BrowserWindowController closeTab:]):
        (-[BrowserWindowController fixFocusRingAroundLocationField]):
        (-[BrowserWindowController validateMenuItem:]):
        (-[BrowserWindowController showWindow:]):
        * ContextMenuHandler.m:
        * Debug/DebugUtilities.m:
        * DownloadProgressEntry.m:
        (-[NSFileManager setMetadataURL:referrer:atPath:]):
        * InternetConfigUtilities.m:
        * LoadProgressMonitor.m:
        * LocationChangeError.m:
        * NetworkController.h:
        * NetworkController.m:
        * OutlineViewPlus.h:
        * OutlineViewPlus.m:
        * Preferences.subproj/ISyncController.h:
        * Preferences.subproj/RSSPreferences.h:
        * Preferences.subproj/RSSPreferences.m:
        * Preferences.subproj/SecurityPreferences.m:
        * Preferences.subproj/WBPreferences.m:
        * PrintingAccessoryViewController.m:
        * SyndicationController.m:
        * TableViewPlus.m:
        * Test/PageLoadTestRunner.m:
        (-[PageLoadTestRunner setSingleTestURL:]):
        * ToolbarController.h:
        * ToolbarController.m:
        * WebBookmark.h:
        * WebBookmark.m:
        * WebBookmarkGroup.h:
        * WebBookmarkGroup.m:
        * WebBookmarkGroupPrivate.h:
        * WebBookmarkLeaf.m:
        * WebBookmarkList.m:
        * WebBookmarkPrivate.h:
        * WebBrowserPrefix.h:

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

15 years agoFix remaining fast tests to handle br changes.
hyatt [Wed, 29 Sep 2004 18:07:43 +0000 (18:07 +0000)]
Fix remaining fast tests to handle br changes.

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

15 years agoFix positioning tests to account for br changes.
hyatt [Wed, 29 Sep 2004 18:05:15 +0000 (18:05 +0000)]
Fix positioning tests to account for br changes.

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

15 years agoFix float 15 test to accurately reflect the image loading regression in that test.
hyatt [Wed, 29 Sep 2004 18:04:09 +0000 (18:04 +0000)]
Fix float 15 test to accurately reflect the image loading regression in that test.

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

15 years agoFix float tests to account for br changes.
hyatt [Wed, 29 Sep 2004 18:02:16 +0000 (18:02 +0000)]
Fix float tests to account for br changes.

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

15 years agoFix doctypes tests for list item changes.
hyatt [Wed, 29 Sep 2004 18:01:37 +0000 (18:01 +0000)]
Fix doctypes tests for list item changes.

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

15 years agoLand changes to CSS1 suite from <br> patch.
hyatt [Wed, 29 Sep 2004 17:59:43 +0000 (17:59 +0000)]
Land changes to CSS1 suite from <br> patch.

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

15 years agoLand changes to editing test from <br> patch.
hyatt [Wed, 29 Sep 2004 17:58:13 +0000 (17:58 +0000)]
Land changes to editing test from <br> patch.

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

15 years ago Make sure <br>s always get line boxes. Also prevent the creation of RenderTexts...
hyatt [Wed, 29 Sep 2004 17:55:00 +0000 (17:55 +0000)]
Make sure <br>s always get line boxes.  Also prevent the creation of RenderTexts for whitespace normal/nowrap nodes
that follow <br>s.

        Reviewed by kocienda

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::isCandidate):
        * khtml/rendering/render_br.cpp:
        (RenderBR::RenderBR):
        (RenderBR::createInlineBox):
        (RenderBR::baselinePosition):
        (RenderBR::lineHeight):
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_line.cpp:
        (khtml::InlineFlowBox::placeBoxesVertically):
        * khtml/rendering/render_line.h:
        (khtml::InlineBox::isText):
        (khtml::InlineFlowBox::addToLine):
        * khtml/rendering/render_text.cpp:
        (RenderText::detach):
        * khtml/rendering/render_text.h:
        (khtml::InlineTextBox:::InlineRunBox):
        (khtml::InlineTextBox::isInlineTextBox):
        (khtml::InlineTextBox::isText):
        (khtml::InlineTextBox::setIsText):
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::rendererIsNeeded):
        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<):

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