WebCore will now generate a default drag image when an element serves as a drag
	source.  The basic idea is the image contains the element and all its children.

	As for the implementation, instead of adding a new paintAction I added a new
	field to the paintInfo struct, "paintingRoot".  If this field is set, painting will
	only paint that root's descendants.

	Some code also moved from the bridge to the part, to be available within WebCore.

        Reviewed by hyatt.

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject):  Pass along paintingRoot to kids.
        (khtml::RenderBlock::paintFloats):  Pass along paintingRoot to kids.
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintBoxDecorations):  Test paintingRoot before painting.
        * khtml/rendering/render_canvasimage.cpp:
        (RenderCanvasImage::paint):    Test paintingRoot before painting.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLineBoxBackgroundBorder):    Test paintingRoot before painting.
        (RenderFlow::paintLineBoxDecorations):    Test paintingRoot before painting.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paint):    Test paintingRoot before painting.
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paint):    Pass along paintingRoot to kids.
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):   Pass along paintingRoot to kids.
        (RenderLayer:: paintLayer):  Pass along paintingRoot to kids.  Test if we are within the
	paintingRoot to decide whether to pass the root to our renderer.
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::hasAncestor):  New utility.
        (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect
        (RenderObject::addAbsoluteRectForLayer):  Helper for paintingRootRect
        (RenderObject::paintingRootRect):  Return rect that will be painted if we are
	the painting root.
        (RenderObject::draggableNode):  Add test to avoid rare NULL ptr crash.
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::PaintInfo::PaintInfo):  Add paintingRoot field.
        (khtml::RenderObject::paintingRootForChildren):  New utility.  Return the current
	paintingRoot, or nil if we are the root (so kids draw normally).
        (khtml::RenderObject::shouldPaintWithinRoot):  New utility.  We can paint if we
	are the paintingRoot, or no root is set.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::shouldPaint):  Pass along paintingRoot to kids.
        * khtml/rendering/render_table.cpp:
        (RenderTable::paint):   Pass along paintingRoot to kids.
        * khtml/rendering/render_text.cpp:
        (RenderText::paint):  Test paintingRoot before painting.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init new _elementToDraw member.
        (KWQKHTMLPart::paint):  Generalized to handle cases of painting selection or a
	given element.
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Make a default image if dragSrc didn't
	provide one.
        (KWQKHTMLPart::selectionRect):  Moved from bridge.
        (KWQKHTMLPart::visibleSelectionRect):  Ditto.
        (KWQKHTMLPart::imageFromRect):  Newly factored code, from bridge.
        (KWQKHTMLPart::selectionImage):  Moved from bridge, wrapper around imageFromRect.
        (KWQKHTMLPart::elementImage):  New method, wrapper around imageFromRect.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:withPainter:]):  Just call part to draw.
        (-[WebCoreBridge visibleSelectionRect]):  Guts moved to part.
        (-[WebCoreBridge selectionImage]):  Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by me

        * khtml/editing/jsediting.cpp:
        (DOM::EditorCommand::): Stray capital letter in "selectAll" command static
        initializer prevented the command from ever working since the command
        strings are lower-cased when trying to find a match, but not when they
        are inserted into the dictionary. This is a one character change to make
        the string "selectall" in the initializer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Clipboard access during DHTML dragging is made secure.

        Reviewed by John.

        * kwq/KWQClipboard.h:
        (KWQClipboard::):
        * kwq/KWQClipboard.mm:
        (KWQClipboard::KWQClipboard):    Init new policy and changeCount members.
        (KWQClipboard::becomeNumb):  Set policy to numb.
        (KWQClipboard::clearData):   Check policy.
        (KWQClipboard::clearAllData):   Check policy.
        (KWQClipboard::getData):   Check policy and changeCount.
        (KWQClipboard::setData):   Check policy.
        (KWQClipboard::types):   Check policy and ChangeCount.
        (KWQClipboard::setDragLocation):   Check policy.
        (KWQClipboard::setDragImage):   Check policy.
        (KWQClipboard::setDropEffect):   Check policy.
        (KWQClipboard::setEffectAllowed):   Check policy.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dispatchDragSrcEvent):  Set policy when creating clipboard,
	and numb-ify it when we're done.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard,
	and numb-ify it when we're done.
        (-[WebCoreBridge dragExitedWithDraggingInfo:]):  Ditto
        (-[WebCoreBridge concludeDragForDraggingInfo:]):  Ditto


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3654841>: "Hitting delete key with start of block selected
        does not merge content with preceding block"

        Selections that span blocks now work correctly for deleting the selection and inserting
        over the selection. The largest part of the change is adding a new field to the
        RemoveNodeAndPruneCommand and its impl version. This was done since the starting block
        for a multi-block selection should always be preserved when deleting, and this was
        a convenient way to express this using the code structure already in place.

        * khtml/editing/htmlediting.cpp:
        (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to
        take two nodes: the node to remove and a node to stop at when pruning back up the tree.
        (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor.
        (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described
        above.
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a
        rootEditableElement.
        (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the
        name of the existing node argument to pruneNode to distinguish it.
        (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the
        selection to removeNodeAndPrune in each case. Also, add one little loop to move all
        the content from the block containing the end of the selection if that block is different
        than the start block.
        (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the
        pruneNode/stopNode design already described.
        (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the
        lifecycle of stopNode.
        (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop
        node while pruning.
        * khtml/editing/htmlediting_impl.h:
        (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor.
        (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Fixed: <rdar://problem/3640423>: (REGRESSION: can't paste text copied from web page into Excel (due to HTML on the pasteboard?))

        Reviewed by darin.

        * WebView.subproj/WebHTMLView.m:
        (+[WebHTMLView _selectionPasteboardTypes]): don't include NSHTMLPboardType
        (-[WebHTMLView _selectedArchive]): removed markup string parameter
        (_selectionPasteboardTypes::if): don't put NSHTMLPboardType on the pasteboard
        * WebView.subproj/WebHTMLViewPrivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Hyatt

        Changes to the selection state for these tests as a result of my previous
        checkin. The changes are minor to a couple of offsets. I looked at the
        changes and approve them.

        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore:

	A DHTML drag source can now change the dragging image during the drag.  Currently
	it may only be set to a static image.

        Reviewed by John

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dragSourceMovedTo):  If the ondrag event handler set an image,
	pass it to WebKit.
        * kwq/WebCoreBridge.h:

WebKit:

	A DHTML drag source can now change the dragging image during the drag.  Currently
	it may only be set to a static image.

        Reviewed by John

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge setDraggingImage:at:]):  Typical bridge glue.
        * WebView.subproj/WebHTMLView.m:
        (FlipImageSpec):  New utility, copied from AppKit.
        (-[WebHTMLView _setDraggingImage:at:]):  Mostly copied from AppKit.  Sets the drag
	image using CG API.
        * WebView.subproj/WebHTMLViewPrivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Vicki.

        - our part of fix to <rdar://problem/3629334>: (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses)

        * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping.
        In the current version of Tiger I am using, this is not implemented yet.

        - a couple of other unrelated changes

        * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code
        inside the APPLE_CHANGES ifdef.
        * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat
        function an inline for slightly smaller code size.
        * kwq/KWQTextEdit.mm: Ditto.
        * kwq/KWQTextField.mm: Update copyright date.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nit build fix for deployment build style.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	In DHTML dragging there is no notion of registering for types, so we'd
	like to just pass all types down to WebCore.  It turns out that the per-type
	registration doesn't matter as far as the underlying drag service is
	concerned, so Cocoa is already getting called for any type.  We just hack and
	override a private method to ensure we accept any type.

        Reviewed by Chris.

        * WebView.subproj/WebView.m:
        (-[WebView _hitTest:dragTypes:]):  We accept any drag type if it is within
	our view, without overriding a subview's decision.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Maciej.

        - implemented a bunch more execCommand commands
        - fixed <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
        - fixed <rdar://problem/3675898>: (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675903>: (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan)
        - about half of <rdar://problem/3685231>: (execCommand italic is not implemented)
        - about half of <rdar://problem/3685232>: (execCommand bold is not implemented)

        * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions
        that are now just private functions inside jsediting.cpp.

        * khtml/editing/jsediting.cpp:
        (commandImp): Changed this around, so the dictionary is a static local to this function,
        and initialized with C++ "first time initialization" rule.
        (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const.
        (DOM::JSEditor::queryCommandEnabled): Ditto.
        (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const,
        and use a common three-state state function rather than a separate "indeterm" function.
        (DOM::JSEditor::queryCommandState): Ditto.
        (DOM::JSEditor::queryCommandValue): More of the same.
        (execNotImplemented): Added. Used for unimplemented commands; there are only a few left.
        (execCopy): Renamed.
        (execCut): Renamed.
        (execDelete): Renamed.
        (execInsertText): Renamed.
        (execPaste): Renamed, and disabled.
        (execRedo): Renamed.
        (execSelectAll): Renamed.
        (execUndo): Renamed.
        (execStyleChange): Added. Helper function for commands that are style changes.
        (execBold): Added.
        (execItalic): Added.
        (execJustifyCenter): Added.
        (execJustifyFull): Added.
        (execJustifyLeft): Added.
        (execJustifyRight): Added.
        (execSubscript): Added.
        (execSuperscript): Added.
        (execUnselect): Added.
        (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left.
        (noState): Added.
        (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left.
        (nullStringValue): Added.
        (createCommandDictionary): Changed the initDict function into this function. Added implementations
        for many commands and condensed format so it's easier to work with.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Ken.

        - implemented still more execCommand commands

        * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit:
        Implemented PDF rendering for the drawImage() function
        in Context2D.  This allows PDF files to be drawn in scaled
        or rotated context without rasterization artifacts.

        The PDF image is currently NOT cached.  Caching can/will be added
        as an optimization.  The hooks are already in place to flush
        the cache as necessary.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer _needsRasterFlush]):
        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
        (-[WebImageRenderer _PDFDocumentRef]):
        (-[WebImageRenderer _PDFDraw]):
        (-[WebImageRenderer _PDFDrawFromRect:toRect:operation:alpha:flipped:]):
        (-[WebImageRenderer MIMEType]):
        (ReleasePDFDocumentData):
        (-[WebPDFDocument initWithData:]):
        (-[WebPDFDocument dealloc]):
        (-[WebPDFDocument documentRef]):
        (-[WebPDFDocument mediaBox]):
        (-[WebPDFDocument bounds]):
        (-[WebPDFDocument adjustCTM:]):
        (-[WebPDFDocument setCurrentPage:]):
        (-[WebPDFDocument currentPage]):
        (-[WebPDFDocument pageCount]):

        Added back check for old plugin API.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge frameRequiredForMIMEType:URL:]):

WebCore:
	Added support for drawing un-rasterized transformed PDFs.

        Reviewed by John.

        * khtml/ecma/kjs_html.cpp:
        (KJS::Context2DFunction::tryCall):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Fix for 3678031, implement better flexing for Emerson headers.  This involved adding support for max-width: intrinsic,
	fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment
	so that boxes can be aligned vertically along their interior baselines.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        (CSSParser::parseShadow):
        * khtml/css/cssparser.h:
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/misc/khtmllayout.h:
        (khtml::):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::baselinePosition):
        (khtml::RenderBlock::getBaselineOfFirstLineBox):
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::RenderBox):
        (RenderBox::overrideWidth):
        (RenderBox::overrideHeight):
        (RenderBox::calcWidth):
        (RenderBox::calcHeight):
        * khtml/rendering/render_box.h:
        (khtml::RenderBox::overrideSize):
        (khtml::RenderBox::setOverrideSize):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::calcMinMaxWidth):
        (khtml::RenderFlexibleBox::layoutBlock):
        (khtml::RenderFlexibleBox::layoutHorizontalBox):
        (khtml::RenderFlexibleBox::layoutVerticalBox):
        (khtml::RenderFlexibleBox::placeChild):
        (khtml::RenderFlexibleBox::allowedChildFlex):
        * khtml/rendering/render_flexbox.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::isWidthSpecified):
        (RenderImage::isHeightSpecified):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::getBaselineOfFirstLineBox):
        (khtml::RenderObject::overrideSize):
        (khtml::RenderObject::overrideWidth):
        (khtml::RenderObject::overrideHeight):
        (khtml::RenderObject::setOverrideSize):
        * khtml/rendering/render_style.cpp:
        (StyleFlexibleBoxData::StyleFlexibleBoxData):
        (StyleFlexibleBoxData::operator==):
        (ShadowData::operator==):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::boxPack):
        (khtml::RenderStyle::setBoxPack):
        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Implement parsing and setting of the text-overflow CSS3 property.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/render_style.cpp:
        (textOverflow):
        (StyleCSS3NonInheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::textOverflow):
        (khtml::RenderStyle::setTextOverflow):
        (khtml::RenderStyle::initialTextOverflow):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Implemented drag destination portion of the new drag & drop API.

        Reviewed by trey.

        * WebView.subproj/WebDefaultUIDelegate.m:
        (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]): new delegate implementation
        (-[WebDefaultUIDelegate webView:willPerformDragDestinationAction:forDraggingInfo:]): ditto
        * WebView.subproj/WebDocumentInternal.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): handle the action mask
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
        * WebView.subproj/WebUIDelegate.h:
        * WebView.subproj/WebUIDelegatePrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _dragOperationForDraggingInfo:]): call new delegate methods
        (-[WebView performDragOperation:]): ditto
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
	Fix for 3607091, implement a style that prevents zoom and min font size from taking effect.
	The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto."  The default
	is "auto."

        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement):
        (khtml::CSSStyleSelector::pseudoStyleForElement):
        (khtml::CSSStyleSelector::applyDeclarations):
        (khtml::CSSStyleSelector::applyProperty):
        (khtml::CSSStyleSelector::checkForTextSizeAdjust):
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_style.cpp:
        (textSizeAdjust):
        (StyleCSS3InheritedData):
        (StyleCSS3InheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::lineClamp):
        (khtml::RenderStyle::textSizeAdjust):
        (khtml::RenderStyle::setTextSizeAdjust):
        (khtml::RenderStyle::initialTextSizeAdjust):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Dave.

	<rdar://problem/3671555>: Blot scrolls to the top every time you type

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3672088>: "Editable WebViews should maintain a selection even when they're not firstResponder"

        Add some code to determine whether a WebHTMLView should maintain an
        inactive selection when the view is not first responder. Traditionally,
        these views have not maintained such selections, clearing them when the
        view was not first responder. However, for appls embedding this view as
        an editing widget, it is desirable to act more like an NSTextView. For
        now, however, the view only acts in this way when the web view is set to
        be editable with -[WebView setEditable:YES]. This will maintain
        traditional behavior for WebKit clients dating back to before this
        change, and will likely be a decent switch for the long term, since
        clients to ste the web view to be editable probably want it to act like
        a "regular" Cocoa view in terms of its selection behavior.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView updateTextBackgroundColor]): Add code to tell whether the view is resigning first responder,
        and if it is, use the inactive text background color.
        (-[WebHTMLView maintainsInactiveSelection]): New helper which does checks to see if the new selection
        behavior should be used, or whether we should continue with traditional WebKit behavior.
        (-[WebHTMLView resignFirstResponder]): Call new maintainsInactiveSelection helper. If true,
        do not clear the selection.
        * WebView.subproj/WebHTMLViewInternal.h: Add resigningFirstResponder flag.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore:

        Reviewed by Ken.

        - filled out execCommand a lot more
        - fixed <rdar://problem/3685231>: (execCommand italic is not implemented)
        - fixed <rdar://problem/3685232>: (execCommand bold is not implemented)
        - fixed <rdar://problem/3675899>: (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675901>: (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675904>: (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan)

        * khtml/editing/jsediting.cpp:
        (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState.
        (DOM::JSEditor::queryCommandState): Ditto.
        (execStyleChange): Changed to use KHTMLPart::applyStyle.
        (stateStyle): Used KHTMLPart::selectionHasStyle for this.
        (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this.
        (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this.
        (execBold): Implemented toggling, using selectionStartHasStyle.
        (execItalic): Implemented toggling, using selectionStartHasStyle.
        (execPrint): Implemented.
        (enabledRedo): Implemented, using canRedo.
        (enabledUndo): Implemented, using canUndo.
        (stateNone): Renamed from stateNo.
        (valueBackColor): Implemented, using valueStyle.
        (valueFontName): Implemented, using valueStyle.
        (valueFontSize): Implemented, using valueStyle.
        (valueForeColor): Implemented, using valueStyle.
        (valueFontSize): Implemented, using valueStyle.

        * khtml/khtml_part.h: Added editing operations.
        * khtml/khtml_part.cpp:
        (KHTMLPart::copyToPasteboard): Added.
        (KHTMLPart::cutToPasteboard): Added.
        (KHTMLPart::redo): Added.
        (KHTMLPart::undo): Added.
        (KHTMLPart::applyStyle): Added.
        (updateState): Added.
        (KHTMLPart::selectionHasStyle): Added.
        (KHTMLPart::selectionStartHasStyle): Added.
        (KHTMLPart::selectionStartStylePropertyValue): Added.
        (KHTMLPart::selectionComputedStyle): Added.
        (KHTMLPart::print): Added.

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part).

        * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart.
        (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge.
        (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge.
        (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge.
        (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge.
        (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge.
        (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge.
        (KHTMLPart::canUndo): Added.
        (KHTMLPart::canRedo): Added.

        * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call
        KHTMLPart::applyStyle.

        * WebCore.pbproj/.cvsignore: Updated for new Xcode files.

WebKit:

        Reviewed by Ken.

        * WebCoreSupport.subproj/WebBridge.m: Removed undo-related methods.
        (-[WebBridge undoManager]): Added.

        * WebKit.pbproj/.cvsignore: Updated for new Xcode files.


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