kdecker [Fri, 4 Jun 2004 22:16:48 +0000 (22:16 +0000)]
Reviewed by Darin
- fixed <rdar://problem/
3680594>
* kjs/object.cpp:
(KJS::Error::create):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6774
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 4 Jun 2004 22:01:59 +0000 (22:01 +0000)]
change version number to '144u'. the tree is open.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6773
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 4 Jun 2004 21:55:13 +0000 (21:55 +0000)]
Safari 2.0 (v143) stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6771
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 4 Jun 2004 20:19:12 +0000 (20:19 +0000)]
* kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6769
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 4 Jun 2004 18:49:54 +0000 (18:49 +0000)]
JavaScriptCore:
Reviewed by Dave.
- ObjC bindings do not (yet) pass along sourceurl or line numbers
- we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript
- changed the wording of an error message
- the lexer, parser, and interpreter have been made "sourceURL aware"
- stored the url into Error
* bindings/NP_jsobject.cpp:
(NPN_Evaluate):
* bindings/jni/jni_jsobject.cpp:
(JSObject::eval):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject evaluateWebScript:]):
* kjs/function.cpp:
(GlobalFuncImp::call):
* kjs/function_object.cpp:
(FunctionObjectImp::construct):
* kjs/internal.cpp:
(Parser::parse):
(InterpreterImp::checkSyntax):
(InterpreterImp::evaluate):
* kjs/internal.h:
* kjs/interpreter.cpp:
(Interpreter::evaluate):
* kjs/interpreter.h:
* kjs/lexer.cpp:
(Lexer::setCode):
* kjs/lexer.h:
(KJS::Lexer::sourceURL):
* kjs/nodes.cpp:
(Node::Node):
(Node::throwError):
(FunctionCallNode::evaluate):
* kjs/nodes.h:
* kjs/object.cpp:
(KJS::Error::create):
* kjs/object.h:
WebCore:
Reviewed by Dave.
- kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
- khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url,
so we leave this blank
- khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
- khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
- khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent):
(JSLazyEventListener::handleEvent):
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate):
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript):
(ScheduledAction::execute):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::open):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::addMessageToConsole):
WebBrowser:
Reviewed by Dave.
- model is now source url aware
- refined the ui with custom NSCells that now display error messages,
line numbers, and source urls
- increased the row size to 35 pixels to accomimdate for ErrorCells
* Debug/ErrorCell.h: Added.
* Debug/ErrorCell.m: Added.
(-[ErrorCell setURL:]):
(-[ErrorCell setErrorMessasge:]):
(-[ErrorCell setLineNumber:]):
(-[ErrorCell drawInteriorWithFrame:inView:]):
* Debug/ErrorConsole.nib:
* Debug/ErrorConsoleController.m:
(-[ErrorConsoleController init]):
(-[ErrorConsoleController awakeFromNib]):
* Debug/ErrorConsoleModel.h:
* Debug/ErrorConsoleModel.m:
(-[ErrorConsoleModel tableView:willDisplayCell:forTableColumn:row:]):
(-[ErrorConsoleModel count]):
(-[ErrorConsoleModel selectedURL]):
* WebBrowser.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6768
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 4 Jun 2004 18:35:45 +0000 (18:35 +0000)]
Reviewed by Hyatt
Fix a comical little bug where the style-applying code did not take into
account deleting content from the start of a block. After the deletion,
the caret is placed in the node before the deleted content and so
inserting a styled fragment after the deletion position works great.
The problem is that if the selectionis at the start of a block, there
is no "position before the deletion" and the caret is placed in the new
first child of the block. Inserting the styled content after this
node is just plain wrong. Now, this case is handled correctly, and the
styled content is inserted in the proper position.
* khtml/editing/htmlediting_impl.cpp:
(khtml::ApplyStyleCommandImpl::insertFragment):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6767
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 4 Jun 2004 18:21:48 +0000 (18:21 +0000)]
Reviewed by Hyatt
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren): Only add additional line height
in for root editable elements. This helps to keep layout from deviating too
much from the intended page layout, but still gives an empty document a line
in which it can blink the caret.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6766
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 4 Jun 2004 18:17:26 +0000 (18:17 +0000)]
Reviewed by Hyatt
Made some progress on this set of related bugs:
<rdar://problem/
3675867>: "Make execCommand work as specified in the Javascript execCommand Compatibility Plan"
<rdar://problem/
3675898>: "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan"
<rdar://problem/
3675899>: "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan"
<rdar://problem/
3675901>: "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan"
<rdar://problem/
3675903>: "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan"
<rdar://problem/
3675904>: "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan"
I did several things to move the ahead with the plan:
1. The latter five methods did not appear in the tree at all. Now they do, although
2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved
them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp
is glue to call over to the new JSEditor object defined in the new files.
3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values.
For others, I just return place-holder values. I have added some comments to describe what has been done and
what still needs to be done.
* WebCore.pbproj/project.pbxproj:
* khtml/dom/dom_doc.cpp: Add call-overs for these methods.
(DOM::Document::queryCommandEnabled):
(DOM::Document::queryCommandIndeterm):
(DOM::Document::queryCommandState):
(DOM::Document::queryCommandSupported):
(DOM::Document::queryCommandValue):
* khtml/dom/dom_doc.h:
* khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology.
(DOMDocumentProtoFunc::tryCall):
* khtml/ecma/kjs_dom.h:
(KJS::DOMDocument::):
* khtml/ecma/kjs_dom.lut.h:
(KJS::):
* khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods.
(DOM::execCommandNotImplemented):
(DOM::queryBoolNotImplemented):
(DOM::queryValueNotImplemented):
(DOM::JSEditor::commandDict):
(DOM::JSEditor::JSEditor):
(DOM::JSEditor::~JSEditor):
(DOM::JSEditor::commandIdentifier):
(DOM::JSEditor::addCommand):
(DOM::JSEditor::initDict):
(DOM::JSEditor::execCommand):
(DOM::JSEditor::queryCommandEnabled):
(DOM::JSEditor::queryCommandIndeterm):
(DOM::JSEditor::queryCommandState):
(DOM::JSEditor::queryCommandSupported):
(DOM::JSEditor::queryCommandValue):
(DOM::JSEditor::execCommandCopy):
(DOM::JSEditor::execCommandCut):
(DOM::JSEditor::execCommandDelete):
(DOM::JSEditor::execCommandInsertText):
(DOM::JSEditor::execCommandPaste):
(DOM::JSEditor::execCommandRedo):
(DOM::JSEditor::execCommandSelectAll):
(DOM::JSEditor::execCommandUndo):
(DOM::JSEditor::enabledIfPartNotNull):
(DOM::JSEditor::enabledIfSelectionNotEmpty):
(DOM::JSEditor::enabledIfSelectionIsRange):
(DOM::JSEditor::commandSupported):
* khtml/editing/jsediting.h: Added.
(DOM::JSEditor::CommandIdentifier::CommandIdentifier):
(DOM::JSEditor::document):
(DOM::JSEditor::part):
* khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object.
(DocumentImpl::DocumentImpl):
(DocumentImpl::~DocumentImpl):
(DocumentImpl::jsEditor):
(DocumentImpl::execCommand):
(DocumentImpl::queryCommandEnabled):
(DocumentImpl::queryCommandIndeterm):
(DocumentImpl::queryCommandState):
(DocumentImpl::queryCommandSupported):
(DocumentImpl::queryCommandValue):
* khtml/xml/dom_docimpl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6765
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 4 Jun 2004 18:02:19 +0000 (18:02 +0000)]
Fixed: <rdar://problem/
3674921>: (can't drag an image from Desktop to Blot document)
Reviewed by mjs.
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _imageElementWithImageResource:]): factored out from _documentFragmentWithImageResource:
(-[WebDataSource _documentFragmentWithImageResource:]): call _imageElementWithImageResource:
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _imageExistsAtPaths:]): new
(-[WebHTMLView _documentFragmentWithPaths:]): new
(-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): handle NSFilenamesPboardType
(+[WebHTMLView _insertablePasteboardTypes]): include NSFilenamesPboardType
(-[WebHTMLView _canProcessDragWithDraggingInfo:]): check for NSFilenamesPboardType and check that the files are images
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6764
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 4 Jun 2004 17:54:29 +0000 (17:54 +0000)]
Fixed crash when attempting to access properties on nil
object.
Reviewed by John.
* bindings/objc/objc_instance.mm:
(ObjcInstance::getClass):
* bindings/runtime_object.cpp:
(RuntimeObjectImp::get):
* bindings/testM.js:
* bindings/testbindings.mm:
(-[MyFirstInterface getString]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6763
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 4 Jun 2004 16:12:37 +0000 (16:12 +0000)]
Fixed crasher from last checkin.
Reviewed by Ken.
* Plugins.subproj/WebPluginDatabase.m:
(+[WebPluginDatabase setAdditionalWebPlugInPaths:]):
(pluginLocations):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6762
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 4 Jun 2004 01:36:34 +0000 (01:36 +0000)]
Added setCompositeOperation method to Context2D.
Actually pass composite operation to drawPixmap (instead of 1).
Reviewed by jay lo.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::compositeOperatorFromString):
(QPainter::drawPixmap):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6760
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 4 Jun 2004 01:01:36 +0000 (01:01 +0000)]
Add SPI to allow setting of plugin load path.
Reviewed by Hyatt.
* Plugins.subproj/WebPluginDatabase.h:
* Plugins.subproj/WebPluginDatabase.m:
(+[WebPluginDatabase setAdditionalWebPlugInPaths:]):
(pluginLocations):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6759
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 4 Jun 2004 00:39:23 +0000 (00:39 +0000)]
Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly
complicated flexing layouts in HTML.
This is Stage 1 - wire up the CSS property and make it get parsed into front-end data. Nobody actually looks
at this data yet.
Reviewed by darin
* khtml/css/css_valueimpl.cpp:
(CSSInheritedValueImpl::cssText):
(ShadowValueImpl::cssText):
(length):
(FlexGroupTransitionValueImpl::~FlexGroupTransitionValueImpl):
(FlexGroupTransitionValueImpl::cssText):
* khtml/css/css_valueimpl.h:
(DOM::FlexGroupTransitionValueImpl::cssValueType):
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
(CSSParser::parseShadow):
(FlexGroupTransitionParseContext::length):
(FlexGroupTransitionParseContext::~FlexGroupTransitionParseContext):
(FlexGroupTransitionParseContext::failed):
(FlexGroupTransitionParseContext::allowGroup):
(FlexGroupTransitionParseContext::commitGroup):
(FlexGroupTransitionParseContext::commitSlash):
(FlexGroupTransitionParseContext::commitLength):
(FlexGroupTransitionParseContext::commitValue):
(CSSParser::parseFlexGroupTransition):
* khtml/css/cssparser.h:
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/rendering/render_style.cpp:
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(StyleFlexibleBoxData::operator==):
(StyleFlexibleBoxData::transitionDataEquivalent):
(StyleCSS3InheritedData::operator==):
(StyleCSS3InheritedData::shadowDataEquivalent):
(ShadowData::operator==):
(RenderStyle::setBoxFlexGroupTransition):
(length):
(FlexGroupTransitionData::operator==):
* khtml/rendering/render_style.h:
(khtml::FlexGroupTransitionData::next):
(khtml::FlexGroupTransitionData::~FlexGroupTransitionData):
(khtml::FlexGroupTransitionData::operator!=):
(khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
(khtml::RenderStyle::boxFlexGroupTransition):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6758
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 4 Jun 2004 00:21:53 +0000 (00:21 +0000)]
Add extra sanity check to Image parameter of drawImage...
Reviewed by Hyatt.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6757
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 3 Jun 2004 21:36:15 +0000 (21:36 +0000)]
Fix for
3673931, negative margins on objects that dodge floats not handled correctly.
Reviewed by darin
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlockChildren):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6756
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 3 Jun 2004 21:24:45 +0000 (21:24 +0000)]
Reviewed by Chris.
- fixed <rdar://problem/
3677038>: (Need SPI to get URL of favicon for a site)
* Misc.subproj/WebIconDatabase.h: Add iconURLForURL: method.
* Misc.subproj/WebIconDatabase.m: (-[WebIconDatabase iconURLForURL:]): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6755
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 3 Jun 2004 21:17:56 +0000 (21:17 +0000)]
Removed some tabs from the ChangeLog.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6754
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 3 Jun 2004 15:22:34 +0000 (15:22 +0000)]
Reviewed by John
Fix for these bugs:
<rdar://problem/
3675806>: "Make API name change for -webViewShouldBeginEditing:inDOMRange:"
<rdar://problem/
3675809>: "Make API name change for -webViewShouldEndEditing:inDOMRange:"
New names are -webView:shouldBeginEditingInDOMRange: and -webView:shouldEndEditingInDOMRange:,
respectively.
* WebView.subproj/WebDefaultEditingDelegate.m:
(-[WebDefaultEditingDelegate webView:shouldBeginEditingInDOMRange:]):
(-[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]):
* WebView.subproj/WebEditingDelegate.h:
* WebView.subproj/WebView.m:
(-[WebView _shouldBeginEditingInDOMRange:]):
(-[WebView _shouldEndEditingInDOMRange:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6753
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 3 Jun 2004 14:38:25 +0000 (14:38 +0000)]
Reviewed by Hyatt
Fix for layout regression I caused when fixing:
<rdar://problem/
3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
Extra height is added to empty blocks that are editable, so we can click to place
the caret in them. This extra height was erroneously being added to non-editable
blocks as a result of my earlier change. After looking at this and doing some
code review, there are the following changes:
Change away from "containingBlock" terminology in the NodeImpl class. The
operation we are doing in NodeImpl is not the same as what is done in CSS
when it uses the term "containingBlock" so:
containingBlock changes to enclosingBlockFlowElement, and
rootEditableBlock changes to rootEditableElement
The vast majority of changes here are to make these name changes. The other
significant piece of work, and the fix for the regression, is to change
bidi.cpp to only include this extra line height if a block is empty
and is content-editable.
* khtml/editing/htmlediting_impl.cpp:
(khtml::leadingWhitespacePosition):
(khtml::trailingWhitespacePosition):
(khtml::DeleteSelectionCommandImpl::doApply):
(khtml::InputNewlineCommandImpl::doApply):
(khtml::RemoveNodeAndPruneCommandImpl::doApply):
(khtml::TypingCommandImpl::issueCommandForDeleteKey):
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::relinquishesEditingFocus):
(DocumentImpl::acceptsEditingFocus):
* khtml/xml/dom_nodeimpl.cpp:
* khtml/xml/dom_nodeimpl.h:
* khtml/xml/dom_position.cpp:
(DOM::Position::equivalentLeafPosition):
(DOM::Position::previousCharacterPosition):
(DOM::Position::nextCharacterPosition):
(DOM::Position::previousLinePosition):
(DOM::Position::nextLinePosition):
(DOM::Position::equivalentUpstreamPosition):
(DOM::Position::equivalentDownstreamPosition):
(DOM::Position::atStartOfRootEditableElement):
(DOM::Position::inRenderedContent):
(DOM::Position::rendersOnSameLine):
(DOM::Position::rendersInDifferentPosition):
(DOM::Position::isLastRenderedPositionInEditableBlock):
(DOM::Position::inFirstEditableInRootEditableElement):
(DOM::Position::inLastEditableInRootEditableElement):
(DOM::Position::inFirstEditableInContainingEditableBlock):
(DOM::Position::inLastEditableInContainingEditableBlock):
* khtml/xml/dom_position.h:
* khtml/xml/dom_selection.cpp:
(DOM::Selection::moveToRenderedContent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6752
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Thu, 3 Jun 2004 07:01:13 +0000 (07:01 +0000)]
Ooops, missed one small change from code review in previous checkin.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6751
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Thu, 3 Jun 2004 06:57:50 +0000 (06:57 +0000)]
Added types property to JS clipboard object.
Reviewed by Richard.
* khtml/ecma/kjs_events.cpp:
(Clipboard::getValueProperty): Create JS array for strings coming from the clipboard impl.
* khtml/ecma/kjs_events.h:
(KJS::Clipboard::):
* khtml/ecma/kjs_events.lut.h:
* kwq/KWQClipboard.mm:
(MIMETypeFromCocoaType): New helper routine to map types.
(KWQClipboard::types): Implement based on NSPasteboard's types.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6750
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 3 Jun 2004 02:48:21 +0000 (02:48 +0000)]
conformsToProtocol:@protocol(WebPlugin) becomes
respondsToSelector:@selector(webPlugInInitialize) because
protocol was changed to an informal protocol.
Reviewed by Kevin.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge frameRequiredForMIMEType:URL:]):
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView addSubview:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6749
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 2 Jun 2004 23:39:29 +0000 (23:39 +0000)]
Corrected typo ID_IMG should have been ID_CANVAS when
checking for the canvas composite operator.
Reviewed by Ken.
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::paint):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6748
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 2 Jun 2004 23:24:02 +0000 (23:24 +0000)]
Correctly size the <CANVAS> if margins, borders, or
padding is added.
Reviewed by Trey.
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::createDrawingContext):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6747
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Wed, 2 Jun 2004 21:12:07 +0000 (21:12 +0000)]
WebCore:
First cut at the source side of DHTML dragging. Following IE, new events are added:
ondragstart, ondrag, ondragend. The recently added CSS property -khtml-user-drag can
be used to make an element draggable. event.dataTransfer.setDragImage(ImageObject,x,y)
can be used from ondragstart to set a static image for the dragImage. x,y is the location
of the mouse within the image from the upper right corner. clipboard methods setdata
and cleardata are implemented.
Reviewed by hyatt.
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty): Boilerplate for new events
(DOMNode::putValue): Boilerplate for new events
* khtml/ecma/kjs_dom.h:
(KJS::DOMNode::): Boilerplate for new events
* khtml/ecma/kjs_dom.lut.h:
* khtml/ecma/kjs_events.cpp:
(DOMMouseEvent::getValueProperty): Return undefined for clipboard when its not a drag event.
(ClipboardProtoFunc::tryCall): setDragImage glue to clipboard routine.
* khtml/ecma/kjs_events.h:
(KJS::Clipboard::):
* khtml/ecma/kjs_events.lut.h:
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
* khtml/khtml_part.cpp:
(KHTMLPart::shouldDragAutoNode): Empty impl of new method, where UA determines
draggability for events with -khtml-user-drag=auto
* khtml/khtml_part.h:
* khtml/misc/htmlattrs.c:
* khtml/misc/htmlattrs.h:
* khtml/misc/htmlattrs.in: Boilerplate for new events
* khtml/rendering/render_object.cpp:
(RenderObject::draggableNode): Find the node or parent node which might be dragged.
* khtml/rendering/render_object.h:
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Boilerplate for new events
(EventImpl::idToType): Boilerplate for new events
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::): Boilerplate for new events
* kwq/KWQClipboard.h:
* kwq/KWQClipboard.mm:
(KWQClipboard::clearData): Implemented to call NSPasteboard
(KWQClipboard::clearAllData): ditto
(KWQClipboard::getData): fix corner case that came up testing
(KWQClipboard::setData): Implemented to call NSPasteboard
(KWQClipboard::dragLocation): Simple setter/getters
(KWQClipboard::setDragLocation):
(KWQClipboard::dragImage):
(KWQClipboard::setDragImage):
(KWQClipboard::dragNSImage):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): init new member var
(KWQKHTMLPart::dragHysteresisExceeded): Hysteresis moved here from WebKit
(KWQKHTMLPart::dispatchDragSrcEvent): Send a dragging event to the current dragSource
(KWQKHTMLPart::khtmlMouseMoveEvent): Initiate dragging, now including consulting DHTML,
hysteresis and sending ondragstart.
(KWQKHTMLPart::dragSourceMovedTo): simple passthrough
(KWQKHTMLPart::dragSourceEndedAt): simple passthrough
(KWQKHTMLPart::mouseDown): salt away _mouseDownX, _mouseDownY
(KWQKHTMLPart::shouldDragAutoNode): Called for -khtml-user-drag=auto. We just call
out to WebKit.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dragSourceMovedTo:]): New glue to drive new dragging events.
(-[WebCoreBridge dragSourceEndedAt:operation:]):
WebKit:
First cut at source side of DHTML dragging. Most of the work is in WebCore.
Reviewed by hyatt.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge startDraggingImage:at:event:]): Added image and loc args for
when WC tells WK to start a drag.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _startDraggingImage:at:event:]): New image and loc args coming
from WebCore. Hysteresis is moved to WC.
(-[WebHTMLView mouseDragged:]): Call new _startDragging method.
(-[WebHTMLView draggedImage:movedTo:]): Pass event to WC.
(-[WebHTMLView draggedImage:endedAt:operation:]): Pass event to WC.
(-[WebHTMLView mouseUp:]): Reset firstMouseDownEvent. Fixes bug where
we would occasionally short-circuit WC event handling due to aliasing
problem with this event.
* WebView.subproj/WebHTMLViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6746
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 2 Jun 2004 20:45:59 +0000 (20:45 +0000)]
WebKit:
Reviewed by John.
- fixed problem with timing of delegate callbacks in the back/forward cache case
* WebView.subproj/WebFrame.m:
(-[WebFrame _transitionToCommitted:]): Move code to indicate page is done loading in the
back/forward cache case from here ...
(-[WebFrame _opened]): ... to here.
WebBrowser:
Reviewed by John.
- removed workaround for bad timing of delegate callbacks in the back/forward cache case
* BrowserWindowController.m: (-[BrowserWindowController webFrameLoadFinished:]):
Removed delays that had been added to work around bad ordering of delegate callbacks
in the back/forward cache case. The bug is now fixed in WebKit.
* LocationChangeHandler.m: (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]):
More of the same.
* AppController.m: (-[AppController safariSyndication]): Changed to use objc_getClass
because I can't leave well-enough alone.
* DownloadProgressEntry.m: (BOMCopierNew): Changed () to (void) in one place where it means
"no parameters" rather than "unknown number of parameters".
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6745
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 2 Jun 2004 14:42:57 +0000 (14:42 +0000)]
Reviewed by me
Finish off name change from previous check-in by changing dom_edititerator
file names to dom_positioniterator. Files copied and renamed in repository.
Includes updated as needed.
* ForwardingHeaders/xml/dom_edititerator.h: Removed.
* ForwardingHeaders/xml/dom_positioniterator.h: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/editing/htmlediting_impl.cpp:
* khtml/xml/dom_edititerator.cpp: Removed.
* khtml/xml/dom_edititerator.h: Removed.
* khtml/xml/dom_position.cpp:
* khtml/xml/dom_positioniterator.cpp: Added.
(DOM::PositionIterator::peekPrevious):
(DOM::PositionIterator::peekNext):
(DOM::PositionIterator::atStart):
(DOM::PositionIterator::atEnd):
* khtml/xml/dom_positioniterator.h: Added.
(DOM::PositionIterator::PositionIterator):
(DOM::PositionIterator::current):
(DOM::PositionIterator::previous):
(DOM::PositionIterator::next):
(DOM::PositionIterator::setPosition):
(DOM::PositionIterator::isEmpty):
* khtml/xml/dom_selection.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6744
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 2 Jun 2004 14:30:49 +0000 (14:30 +0000)]
Reviewed by Darin
Probable fix for this bug:
<rdar://problem/
3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
I could not reproduce the bug myself, which is why I call the fix
as probable.
Darin and I did some code inspection and found some problems
with the equivalentUpstreamPosition and
equivalentDownstreamPosition functions on DOM::Position and how
these functions dealt with changing from editable to
non-editable content. As a result of these discoveries, I went
over this code and the helpers and functions which support them,
and made some corrections and simplifications. The big changes
are as follows:
1. Rename EditIterator class to PositionIterator. This class needs
to run code for selections in non-editable content, so the name
change is appropriate.
2. Change containingEditableBlock to containingBlock. It turns out
that none of the editing code relies on the distinction between
editable blocks and non-editable blocks. The important distinction
is the block boundary. The notion of rootEditableBlock remains.
* khtml/editing/htmlediting_impl.cpp:
(khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): PositionIterator name change.
(khtml::DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Ditto.
(khtml::DeleteSelectionCommandImpl::containsOnlyWhitespace): Ditto.
(khtml::DeleteSelectionCommandImpl::doApply): Ditto.
(khtml::InputNewlineCommandImpl::doApply): Ditto.
(khtml::RemoveNodeAndPruneCommandImpl::doApply): Ditto.
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren): Ditto.
* khtml/xml/dom_edititerator.cpp:
(DOM::PositionIterator::peekPrevious): Call for previousLeafNode instead of previousEditable.
Editable check is not appropriate as this class is used for non-editable content.
(DOM::PositionIterator::peekNext): Call nextLeafNode instead of nextEditable, as above.
(DOM::PositionIterator::atStart): Call for previousLeafNode instead of previousEditable, as above.
(DOM::PositionIterator::atEnd): Call nextLeafNode instead of nextEditable, as above.
* khtml/xml/dom_edititerator.h:
(DOM::PositionIterator::PositionIterator): PositionIterator name change. Remove unused and unneeded constructors.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::previousEditable): Simplify. Rely on previousLeafNode as a helper.
(NodeImpl::nextEditable): Ditto, but rely on nextLeafNode.
(NodeImpl::previousLeafNode): Remove tree-walking code. Rely on traversePreviousNode as a helper.
(NodeImpl::nextLeafNode): Ditto, but rely on traverseNextNode.
(NodeImpl::containingBlock): Renamed replacement for containingEditableBlock.
(NodeImpl::inSameContainingEditableBlock): Call renamed containingBlock.
* khtml/xml/dom_nodeimpl.h:
* khtml/xml/dom_position.cpp:
(DOM::Position::previousCharacterPosition): Various name changes, as described above.
(DOM::Position::nextCharacterPosition): Ditto.
(DOM::Position::previousWordPosition): Ditto.
(DOM::Position::nextWordPosition): Ditto.
(DOM::Position::previousLinePosition): Ditto.
(DOM::Position::nextLinePosition): Ditto.
(DOM::Position::equivalentUpstreamPosition): Remove bogus check for editable node in loop. Perform
improved block-crossing check at start of loop which works for editable and non-editable content.
This is the crux of the fix for the bug.
(DOM::Position::equivalentDownstreamPosition): Ditto.
(DOM::Position::inRenderedContent): Various name changes, as described above.
(DOM::Position::rendersOnSameLine): Ditto.
(DOM::Position::rendersInDifferentPosition): Ditto.
(DOM::Position::isFirstRenderedPositionOnLine): Ditto.
(DOM::Position::isLastRenderedPositionOnLine): Ditto.
(DOM::Position::isLastRenderedPositionInEditableBlock): Ditto.
(DOM::Position::inFirstEditableInRootEditableBlock): Ditto.
(DOM::Position::inLastEditableInRootEditableBlock): Ditto.
(DOM::Position::inFirstEditableInContainingEditableBlock): Ditto.
(DOM::Position::inLastEditableInContainingEditableBlock): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6743
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 2 Jun 2004 05:16:49 +0000 (05:16 +0000)]
WebCore:
Fixed deployment build warning.
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::paint):
WebKit:
Fixed deployment build warning.
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6742
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 2 Jun 2004 02:12:10 +0000 (02:12 +0000)]
WebCore:
Added support for composite attribute to <CANVAS>
Added support for drawImage and drawImageFromRect to <CANVAS>, i.e.:
<html>
<head>
<script>
var img = new Image(600,600);
function drawImage()
{
var aCanvas = document.getElementById ("canvas1");
var context = aCanvas.getContext("context-2d");
context.drawImage (img, 0, 0, 600, 600, "copy");
}
img.onload = drawImage;
img.src = "http://www.google.com/images/logo.gif";
</script>
</head>
<body>
<canvas id="canvas1" width=600 height=600>
</body>
<html>
Reviewed by Trey.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
(Context2D::Context2D):
* khtml/ecma/kjs_html.h:
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::paint):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::getCompositeOperation):
(QPainter::setCompositeOperation):
(QPainter::drawPixmap):
(QPainter::drawTiledPixmap):
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(QPixmap::flushRasterCache):
* kwq/WebCoreImageRenderer.h:
* kwq/WebCoreImageRendererFactory.h:
WebKit:
Added support for drawImage and drawImageFromRect to <CANVAS>
Added support for composite attribute to <CANVAS>
Reviewed by Trey.
* WebCoreSupport.subproj/WebImageRenderer.h:
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageContext initWithBounds:context:]):
(-[WebImageContext dealloc]):
(-[WebImageContext saveGraphicsState]):
(-[WebImageContext restoreGraphicsState]):
(-[WebImageContext isDrawingToScreen]):
(-[WebImageContext focusStack]):
(-[WebImageContext setFocusStack:]):
(-[WebImageContext bounds]):
(-[WebImageContext isFlipped]):
(-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
(-[WebImageRenderer dealloc]):
(-[WebImageRenderer _beginRedirectContext:]):
(-[WebImageRenderer _endRedirectContext:]):
(-[WebImageRenderer _needsRasterFlush]):
(-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
(-[WebImageRenderer drawImageInRect:fromRect:]):
(-[WebImageRenderer flushRasterCache]):
(-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
(-[WebImageRenderer tileInRect:fromPoint:context:]):
* WebCoreSupport.subproj/WebImageRendererFactory.m:
(-[WebImageRendererFactory imageRendererWithMIMEType:]):
(-[WebImageRendererFactory imageRendererWithName:]):
(-[WebImageRendererFactory CGCompositeOperationInContext:]):
(-[WebImageRendererFactory setCGCompositeOperation:inContext:]):
(-[WebImageRendererFactory setCGCompositeOperationFromString:inContext:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6741
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Wed, 2 Jun 2004 00:09:08 +0000 (00:09 +0000)]
Reviewed by Trey.
Work on text-align API. Marked these bugs fixed:
<rdar://problem/
3655380>: (Editing:�alignCenter:�ethod�nimplemented�WebKit�diting�PI))
<rdar://problem/
3655381>: (Editing:�alignJustified:�ethod�nimplemented�WebKit�diting�PI))
<rdar://problem/
3655383>: (Editing:�alignLeft:�ethod�nimplemented�WebKit�diting�PI))
<rdar://problem/
3655384>: (Editing:�alignRight:�ethod�nimplemented�WebKit�diting�PI))
in favor of opening this bug:
<rdar://problem/
3675191>: (Editing: -alignLeft: and friends mostly implemented but not
yet working (WebKit editing API))
* English.lproj/StringsNotToBeLocalized.txt:
updated for these changes
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView changeDocumentBackgroundColor:]):
added a FIXME about why this is still not quite right
(-[WebHTMLView _alignSelectionUsingCSSValue:]):
new method, bottleneck for the various values
(-[WebHTMLView alignCenter:]):
call _alignSelectionUsingCSSValue:@"center"
(-[WebHTMLView alignJustified:]):
call _alignSelectionUsingCSSValue:@"justify"
(-[WebHTMLView alignLeft:]):
call _alignSelectionUsingCSSValue:@"left"
(-[WebHTMLView alignRight:]):
call _alignSelectionUsingCSSValue:@"right"
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6740
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Tue, 1 Jun 2004 23:08:20 +0000 (23:08 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3655378>: (Editing:�changeDocumentBackgroundColor:� method�nimplemented�WebKit�diting�PI))
- made startSpeaking: actually work; previous implementation raised a DOMException
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
added range parameter
(-[WebHTMLView _entireDOMRange]):
new convenience method
(-[WebHTMLView changeDocumentBackgroundColor:]):
now affects entire document, not just selected range, a la NSTextView
(-[WebHTMLView changeColor:]):
now passes in a range to _changeCSSColorUsingSelector:inRange:
(-[WebHTMLView startSpeaking:]):
now uses _entireDOMRange
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6739
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 1 Jun 2004 22:31:50 +0000 (22:31 +0000)]
Fixed: <rdar://problem/
3661505>: (REGRESSION (Safari-140) can't drag standalone images more than once)
Reviewed by john.
* WebView.subproj/WebImageView.m:
(-[WebImageView mouseDown:]): set ignoringMouseDraggedEvents to NO. This line of code was deleted somehow.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6738
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Tue, 1 Jun 2004 21:21:07 +0000 (21:21 +0000)]
Reviewed by Darin.
- fixed <rdar://problem/
3657003>: (HTML Editing: Color panel doesn't work)
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _colorPanelColorAsStyleUsingSelector:]):
new method, returns a DOMCSSStyleDeclaration *
(-[WebHTMLView _changeCSSColorUsingSelector:]):
new method, sets a color-related style attribute on the selection
(-[WebHTMLView changeDocumentBackgroundColor:]):
call _changeCSSColorUsingSelector: with @selector(setBackgroundColor:)
(-[WebHTMLView changeColor:]):
call _changeCSSColorUsingSelector: with @selector(setColor:); also added
comments explaining why changeDocumentBackgroundColor: will never actually
be called until an AppKit code-incest mess is straighted out.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6737
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 1 Jun 2004 20:58:31 +0000 (20:58 +0000)]
Reviewed by Darin
Fix for these bugs:
<rdar://problem/
3655028>: "Text styles have hard-coded values making bold the only supported text style"
<rdar://problem/
3656969>: "HTML Editing: Font panel doesn't work"
* khtml/css/css_valueimpl.cpp:
(FontFamilyValueImpl::cssText): Added implementation for this subclass. Returns parsedFontName.
* khtml/css/css_valueimpl.h: Declare cssText() on FontFamilyValueImpl.
(DOM::CSSProperty::value):
* khtml/editing/htmlediting.cpp:
(khtml::ApplyStyleCommand::ApplyStyleCommand): Changed signature to take a CSSStyleDeclarationImpl.
(khtml::ApplyStyleCommand::style): Added accessor.
* khtml/editing/htmlediting.h: Changed constructor signature to take a CSSStyleDeclarationImpl.
* khtml/editing/htmlediting_impl.cpp:
(khtml::styleSpanClassString): Added helper to return attribute used to tag spans we add to apply styles.
(khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): Ref style passed in.
(khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): Deref style passed in.
(khtml::ApplyStyleCommandImpl::doApply): m_removingStyle is obsolete. Removed.
(khtml::ApplyStyleCommandImpl::isHTMLStyleNode): Now checks all properties in the object's declaration.
(khtml::ApplyStyleCommandImpl::removeCSSStyle): Again, now is multi-property-savvy. Will now remove an empty span
if we added it.
(khtml::ApplyStyleCommandImpl::currentlyHasStyle): Replaced, bold-only code with code that can handle all styles.
(khtml::ApplyStyleCommandImpl::computeStyleChange): Helper which helps to determine whether we want to apply
HTML-style markup for bold and italic, and gathers up all style changes that need to be done.
(khtml::ApplyStyleCommandImpl::positionInsertionPoint): Added comment explaining possible optimization that might be
done in the future.
(khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Significant reworking; now handles applying multiple styles.
(khtml::ApplyStyleCommandImpl::cloneSelection): Assert fragment has at least one child. Don't want to work
on empty fragments.
(khtml::ApplyStyleCommandImpl::surroundContentsWithElement): New helper.
(khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): Juggle asserts and lifecycle methods to be
more like other commands.
(khtml::RemoveCSSPropertyCommandImpl::doApply): Ditto.
(khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): Ditto.
(khtml::RemoveNodeAttributeCommandImpl::doApply):Ditto.
* khtml/editing/htmlediting_impl.h:
(khtml::ApplyStyleCommandImpl::style): Added.
(khtml::ApplyStyleCommandImpl::StyleChange::StyleChange): Added.
* kwq/DOM-CSS.mm:
(-[DOMCSSStyleDeclaration setProperty:::]): Fix problem where passing an empty NSString to a function expecting a boolean
made all properties important priority.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge applyStyle:]): Remove provisional code and comment. Now pass along style, following the intended design.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6736
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 1 Jun 2004 20:57:57 +0000 (20:57 +0000)]
Reviewed by Darin
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _fontManagerOperationAsStyle]): Fixed typo in family-name code that caused
family names to match when they should not.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6735
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 1 Jun 2004 20:53:33 +0000 (20:53 +0000)]
WebCore:
Reviewed by kocienda.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dragCaretDOMRange]): new, lets WebKit pass the drag caret DOM range to the editing delegate
WebKit:
Made paste and drop ask the delegate before making any replacements.
Reviewed by kocienda.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): renamed, now calls _shouldInsertFragment:replacingDOMRange:givenAction:
(-[WebHTMLView _shouldInsertFragment:replacingDOMRange:givenAction:]): new, asks delegate
(-[WebHTMLView concludeDragForDraggingInfo:]): now calls _shouldInsertFragment:replacingDOMRange:givenAction:
(-[WebHTMLView paste:]): call renamed _pasteWithPasteboard:allowPlainText:
(-[WebHTMLView pasteAsRichText:]): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6734
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ouch [Sat, 29 May 2004 04:23:22 +0000 (04:23 +0000)]
Reviewed by gramps.
- removed setShadowWithColor and change setShadow to work with optional attributes
it follows the same rules as setFill/StrokeColor
- Fixed bug in setFillColor and setStrokeColor for CMYK colors (missing break in case).
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6733
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 29 May 2004 00:07:44 +0000 (00:07 +0000)]
Reviewed by Maciej.
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView _fontManagerOperationAsStyle]):
First cut at figuring out what operation the font manager is doing without
digging into its private data structures.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6732
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 28 May 2004 23:26:30 +0000 (23:26 +0000)]
WebCore:
Reviewed by Ken.
- various editing-related improvements
* khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity.
* khtml/xml/dom_selection.cpp:
(DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement
between lines happen when granularity is LINE. Added a new unimplemented granularity:
PARAGRAPH.
(DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd.
(DOM::Selection::debugPosition): Ditto.
* kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph.
Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline
to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge stringForRange:]): Added.
(-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added.
(-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand
that vertical movement is based on granularity now, not direction.
(-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible
from the WebKit down here. I think perhaps this should go down even further in WebCore.
(-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here.
(-[WebCoreBridge insertText:]): Moved ensureCaretVisible here.
(-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here.
* khtml/xml/dom_position.cpp: Some ifdef tweaks.
* khtml/misc/helper.cpp: Namespace and formatting tweaks.
* khtml/misc/helper.h: Removed some unused stuff.
* khtml/dom/dom2_range.h: Make range constructor public so that anyone with
a RangeImpl can easily make a Range.
WebKit:
Reviewed by Ken.
- various editing-related improvements
- fixed <rdar://problem/
3655366>: (Editing: -selectParagraph: method unimplemented (WebKit editing API))
- fixed <rdar://problem/
3655367>: (Editing: -selectLine: method unimplemented (WebKit editing API))
- fixed <rdar://problem/
3655369>: (Editing: -selectWord: method unimplemented (WebKit editing API))
- fixed <rdar://problem/
3655392>: (Editing: -uppercaseWord: method unimplemented (WebKit editing API))
- fixed <rdar://problem/
3655393>: (Editing: -lowercaseWord: method unimplemented (WebKit editing API))
- fixed <rdar://problem/
3655394>: (Editing: -capitalizeWord: method unimplemented (WebKit editing API))
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _alterCurrentSelection:direction:granularity:]): Removed the call to
ensureCaretVisible. This is now handled on the other side of the bridge.
(-[WebHTMLView moveDown:]): Changed to use WebSelectByLine granularity instead of
WebSelectDown direction.
(-[WebHTMLView moveDownAndModifySelection:]): Ditto.
(-[WebHTMLView moveUp:]): Ditto.
(-[WebHTMLView moveUpAndModifySelection:]): Ditto.
(-[WebHTMLView _expandSelectionToGranularity:]): Added.
(-[WebHTMLView selectParagraph:]): Implemented by calling _expandSelectionToGranularity.
(-[WebHTMLView selectLine:]): Ditto.
(-[WebHTMLView selectWord:]): Ditto.
(-[WebHTMLView _fontManagerOperationAsStyle]): Added. Placeholder for the job of figuring
out what style change to make based on NSFontManager.
(-[WebHTMLView changeFont:]): Implemented, but not really tested because guts are still
missing due to lack of above method.
(-[WebHTMLView insertTab:]): Removed the call to ensureCaretVisible.
(-[WebHTMLView insertNewline:]): Removed the call to ensureCaretVisible.
(-[WebHTMLView insertParagraphSeparator:]): Made this insert a newline for now.
(-[WebHTMLView _changeWordCaseWithSelector:]): Added.
(-[WebHTMLView uppercaseWord:]): Implemented by calling _changeWordCaseWithSelector.
(-[WebHTMLView lowercaseWord:]): Ditto.
(-[WebHTMLView capitalizeWord:]): Ditto.
(-[WebHTMLView deleteBackward:]): Removed the call to ensureCaretVisible.
(-[WebHTMLView checkSpelling:]): Put a pile of AppKit code in here as a placeholder.
(-[WebHTMLView startSpeaking:]): Use the new stringForRange: method instead of outerText.
That way we can handle cases where the entire document is selected.
(-[WebHTMLView insertText:]): Removed the call to ensureCaretVisible.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6731
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 28 May 2004 21:40:42 +0000 (21:40 +0000)]
setStrokeColor and setFillColor now support
old school web color string, oswcs+alpha, gray, gray+alpha,
rgba, and cmyka.
Reviewed by jay-lo.
* khtml/css/cssparser.cpp:
(CSSParser::parseColor):
(CSSParser::parseColorFromValue):
* khtml/css/cssparser.h: Made parseColor static public class method
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6730
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 28 May 2004 19:41:48 +0000 (19:41 +0000)]
Fixed: <rdar://problem/
3672129>: (selection deselects when clicking editable WebView in background window)
Fixed this problem by using NSTextView's approach of only allowing dragging on first mouse down.
Reviewed by john.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView acceptsFirstMouse:]): store the first mouse down
(-[WebHTMLView mouseDown:]): Don't tell WebCore about the first mouse down event since only dragging can occur on the first mouse down.
(-[WebHTMLView mouseDragged:]): Don't tell WebCore about the drags that occur after the first mouse down since only dragging can occur after the first mouse down.
* WebView.subproj/WebHTMLViewInternal.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6729
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 28 May 2004 19:33:46 +0000 (19:33 +0000)]
Implement -khtml-user-select and add support for the property -khtml-user-drag (although someone will still
need to wire it up).
Reviewed by rjw
* 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/khtml_part.cpp:
(KHTMLPart::handleMousePressEventDoubleClick):
(KHTMLPart::handleMousePressEventTripleClick):
(KHTMLPart::handleMousePressEventSingleClick):
(KHTMLPart::handleMouseMoveEventSelection):
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::setSelection):
* khtml/rendering/render_object.cpp:
(RenderObject::shouldSelect):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(userSelect):
(StyleCSS3NonInheritedData::operator==):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::RenderStyle::userDrag):
(khtml::RenderStyle::userSelect):
(khtml::RenderStyle::setUserDrag):
(khtml::RenderStyle::setUserSelect):
(khtml::RenderStyle::initialUserDrag):
(khtml::RenderStyle::initialUserSelect):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6728
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ouch [Fri, 28 May 2004 18:33:39 +0000 (18:33 +0000)]
added addArc and clip path routines.
Reviewed by sullivan.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6727
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 18:00:05 +0000 (18:00 +0000)]
* WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
use _cmd rather than explicit selector names in the forwarding methods.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6726
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 17:57:23 +0000 (17:57 +0000)]
* WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
use _cmd rather than explicit selector names in the forwarding methods.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6725
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 17:47:57 +0000 (17:47 +0000)]
Reviewed by Ken.
-revised generated error message content
* kjs/error_object.cpp:
(ErrorProtoFuncImp::call):
* kjs/internal.cpp:
(Parser::parse):
* kjs/object.cpp:
(KJS::Error::create):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6724
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 28 May 2004 17:21:58 +0000 (17:21 +0000)]
* WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
use _cmd rather than explicit selector names in the forwarding methods.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6723
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 17:21:35 +0000 (17:21 +0000)]
Added addArcToPoint and addRect path routines.
Reviewed by sullivan.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6722
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 28 May 2004 17:14:37 +0000 (17:14 +0000)]
Reviewed by Ken.
- implemented a few more editing operations, moved code from WebView to WebHTMLView
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge respondToChangedContents]): Call _updateFontPanel on the WebHTMLView, not the WebView.
(-[WebBridge respondToChangedSelection]): Ditto.
* WebView.subproj/WebHTMLView.m: Moved WebElementOrTextFilter class here from WebView and
gave it a prefix so it won't conflict with developers' class names.
(-[WebHTMLView _updateFontPanel]): Moved here from WebView.
* WebView.subproj/WebView.m:
(-[WebView toggleSmartInsertDelete:]): Added.
(-[WebView toggleContinuousSpellChecking:]): Added.
(-[WebView isContinuousGrammarCheckingEnabled]): Added.
(-[WebView setContinuousGrammarCheckingEnabled:]): Added.
(-[WebView toggleContinuousGrammarChecking:]): Added.
(-[WebView setSmartInsertDeleteEnabled:]): Implemented. We have the flag now, although we
still don't actually have smart insert and delete implemented.
(-[WebView smartInsertDeleteEnabled]): Ditto.
(-[WebView setContinuousSpellCheckingEnabled:]): Implemented.
(-[WebView isContinuousSpellCheckingEnabled]): Implemented.
(-[WebView spellCheckerDocumentTag]): Implemented.
(-[WebView _preflightSpellCheckerNow:]): Added.
(-[WebView _preflightSpellChecker]): Added.
(-[WebView _continuousCheckingAllowed]): Added.
* WebView.subproj/WebHTMLViewInternal.h: Added. We'll things here from WebHTMLViewPrivate so
they are internal to the framework, rather than SPI.
* WebKit.pbproj/project.pbxproj: Added WebHTMLViewInternal.h.
* WebView.subproj/WebHTMLViewPrivate.h: Moved WebHTMLViewPrivate into the internal header.
Despite its name, it's internal, not SPI.
* WebView.subproj/WebViewPrivate.h: Moved WebViewPrivate into the internal header.
Despite its name, it's internal, not SPI. Added a number of new operations which should
be public API. We'll have to figure out what to do about API review and the WWDC deadline.
* WebView.subproj/WebViewInternal.h: Removed _updateFontPanel method.
* English.lproj/StringsNotToBeLocalized.txt: Update.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6721
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ouch [Fri, 28 May 2004 15:54:26 +0000 (15:54 +0000)]
Added addArcToPoint and addRect path routines.
Reviewed by sullivan.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6720
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 28 May 2004 14:19:48 +0000 (14:19 +0000)]
Tests:
Reviewed by Maciej.
- moved to new symlink technique for embedding frameworks
* Blot/Blot.xcode/project.pbxproj: Call the new create-framework-symlinks script
instead of copy-frameworks-to-dstroot.sh.
* Blot/embed-frameworks.sh: Removed.
* PDFViewer/PDFViewer.pbproj/project.pbxproj: Call the new create-framework-symlinks
script instead using a copy files phase.
WebCore:
Reviewed by John
* khtml/xml/dom_selection.cpp:
(DOM::Selection::toRange): Add call to update document layout before returning a Range.
This is done to ensure recently-done editing changes are reflected in the calculation
of the Range. This change solves a specific problem with updating the font panel, where
the wrong Range was used, resulting in an incorrect font. Also, defer converting
positions to be range-compliant positions. The nodeIsBeforeNode function is not
range-compliant-position-savvy.
WebKit:
Reviewed by John
The font panel now updates correctly, reflecting the current selection. There may
still be some bugs and corner cases to handle, but this will work for a general
implementation of the feature.
* WebView.subproj/WebView.m:
(+[ElementOrTextFilter filter]): Added. This filter will accept DOM elements and
text nodes and skip everything else. This filter is used when walking a selection
to determine the fonts in use.
(-[ElementOrTextFilter acceptNode:]): DOM node filter implementation method.
(-[WebView _fontFromStyle]): Removed, in lieu of new fontForCurrentPosition call on the bridge.
(-[WebView _updateFontPanel]): Reworked to use a TreeWalker instead of a NodeIterator. This
was done since the iterator must be rooted at the document root, but start iterating
at the start of the selection. TreeWalker's setCurrentNode allows this to be done.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6719
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 03:02:45 +0000 (03:02 +0000)]
WebBrowser:
Reviewed by Ken.
-added the Error Console feature
* ChangeLog:
* Debug/ErrorConsoleController.h: Added.
* Debug/ErrorConsoleController.m: Added.
(+[ErrorConsoleController sharedController]):
(-[ErrorConsoleController init]):
(-[ErrorConsoleController windowNibName]):
(-[ErrorConsoleController awakeFromNib]):
(-[ErrorConsoleController addMessage:]):
* Debug/ErrorConsoleModel.h: Added.
* Debug/ErrorConsoleModel.m: Added.
(-[ErrorConsoleModel init]):
(-[ErrorConsoleModel addErrorToModel:]):
(-[ErrorConsoleModel setTable:]):
(-[ErrorConsoleModel numberOfRowsInTableView:]):
(-[ErrorConsoleModel tableView:objectValueForTableColumn:row:]):
(-[ErrorConsoleModel tableView:willDisplayCell:forTableColumn:row:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6718
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 28 May 2004 02:06:05 +0000 (02:06 +0000)]
JavaScriptCore:
Reviewed by Ken.
-revised generated error message content
* kjs/error_object.cpp:
(ErrorProtoFuncImp::call):
* kjs/internal.cpp:
(Parser::parse):
* kjs/object.cpp:
(KJS::Error::create):
WebCore:
Reviewed by Ken.
-wired up JavaScript error message handling to
the WebCoreBridge
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent):
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate):
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript):
(ScheduledAction::execute):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::addMessageToConsole):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
WebKit:
Reviewed by Ken.
-wired up JavaScript error message handling through
the WebCoreBridge
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge addMessageToConsole:]):
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebUIDelegatePrivate.h:
WebBrowser:
Reviewed by Ken.
-added the JavaScript Console feature
* BrowserWebController.m:
(-[BrowserWebView setWindowFocusDisabled:]):
(-[BrowserWebView webView:addMessageToConsole:]):
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]):
(-[BrowserDocument showJavaScriptConsole:]):
* WebBrowser.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6717
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Fri, 28 May 2004 00:14:45 +0000 (00:14 +0000)]
Two dragging tweaks: ondragleave events are sent before ondragenter events when
going across element boundaries, to match WinIE.
For compatibility with WinIE, we honor MIME types of "Text" and "URL".
Reviewed by rjw.
* khtml/khtmlview.cpp:
(KHTMLView::updateDragAndDrop):
* kwq/KWQClipboard.mm:
(cocoaTypeFromMIMEType):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6716
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 27 May 2004 23:28:06 +0000 (23:28 +0000)]
- Change version number to '143u'. The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6715
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 27 May 2004 23:22:42 +0000 (23:22 +0000)]
Safari-142 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6713
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 27 May 2004 23:05:15 +0000 (23:05 +0000)]
Reviewed by Darin.
- Fix Tiger build failure. Rename constant "S" to "WHITESPACE",
and change all instances of S to WHITESPACE.
* khtml/css/cssparser.cpp:
(DOM::CSSParser::lex): S to WHITESPACE
* khtml/css/parser.cpp: regenerated file
* khtml/css/parser.h: regenerated file
* khtml/css/parser.y: S to WHITESPACE
* khtml/css/tokenizer.cpp: regenerated file
* khtml/css/tokenizer.flex: S to WHITESPACE
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6712
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 27 May 2004 22:46:53 +0000 (22:46 +0000)]
Renamed WebScriptMethods to WebScripting based on feedback
from Nancy.
Reviewed by Chris.
* bindings/objc/WebScriptObject.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6711
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ouch [Thu, 27 May 2004 18:28:36 +0000 (18:28 +0000)]
Added support for fillRect, strokeRect, and setAlpha.
reviewed by richard.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6710
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Thu, 27 May 2004 17:11:32 +0000 (17:11 +0000)]
WebCore:
First cut at DHTML dragging, destination side. Dragging text, files
and URLs onto elements works. Type conversion from NSPasteboard to
MIME types is hardwired. No JS access yet to modifier keys, or
drag operations mask.
Per IE's dragging API, we have the new DOM events ondragenter,
ondragover, ondragleave and ondrop.
We also have an event.dataTransfer object providing access to the
NSPasteboard bearing the incoming data.
Reviewed by rjw.
* WebCore.pbproj/project.pbxproj: add 2 new files.
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty): JS access to ondragenter and pals
(DOMNode::putValue): Ditto
* khtml/ecma/kjs_dom.h:
(KJS::DOMNode::): New attr enum values.
* khtml/ecma/kjs_dom.lut.h:
(KJS::):
* khtml/ecma/kjs_events.cpp:
(DOMMouseEvent::mark): Pass along mark to dataTransfer we hold.
(DOMMouseEvent::getValueProperty): Create and return dataTransfer.
(Clipboard::Clipboard): New class exposed in JS.
(Clipboard::~Clipboard):
(Clipboard::tryGet): Boilerplate.
(Clipboard::getValueProperty): Return the clipboard's props.
(Clipboard::tryPut): Boilerplate.
(Clipboard::putValue): Set the clipboard's props.
(ClipboardProtoFunc::tryCall): Implement clipboard's funcs.
* khtml/ecma/kjs_events.h:
(KJS::DOMMouseEvent::DOMMouseEvent): Init clipboard ptr.
(KJS::DOMMouseEvent::):
(KJS::Clipboard::toBoolean):
(KJS::Clipboard::classInfo):
(KJS::Clipboard::):
* khtml/ecma/kjs_events.lut.h:
(KJS::):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseHTMLAttribute): Enable setting ondragenter
and friends as html attributes.
* khtml/khtmlview.cpp:
(KHTMLView::dispatchDragEvent): Send a drag related event to the DOM.
(KHTMLView::updateDragAndDrop): Handle a dragenter or dragupdate.
(KHTMLView::cancelDragAndDrop): Handle a dragexit.
(KHTMLView::performDragAndDrop): Handle an actual drop.
* khtml/khtmlview.h:
* khtml/misc/htmlattrs.c: Generated code.
* khtml/misc/htmlattrs.h: Generated code.
* khtml/misc/htmlattrs.in: Add ondragenter, etc
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Handle new event types for dragging.
(EventImpl::idToType): Ditto.
(MouseEventImpl::MouseEventImpl): Init new clipboard ptr.
(MouseEventImpl::~MouseEventImpl): Deref clipboard.
(ClipboardImpl::ClipboardImpl):
(ClipboardImpl::~ClipboardImpl):
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::): New event enums.
(DOM::MouseEventImpl::clipboard):
* kwq/KWQClipboard.h: Added.
* kwq/KWQClipboard.mm: Added.
(KWQClipboard::KWQClipboard):
(KWQClipboard::~KWQClipboard):
(KWQClipboard::isForDragging): Trivial getter/setters.
(KWQClipboard::dropEffect):
(KWQClipboard::setDropEffect):
(KWQClipboard::dropAllowed):
(KWQClipboard::setDropAllowed):
(cocoaTypeFromMIMEType): Convert MIME pboard type to Cocoa type.
(KWQClipboard::clearData): OSX specific clipboard impl. of IE func
(KWQClipboard::clearAllData): Ditto
(KWQClipboard::getData): Ditto
(KWQClipboard::setData): Ditto
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dragOperationForDraggingInfo:]): Passthrough from WebKit to khtmlpart
(-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
(-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
WebKit:
First cut at DHTML dragging, destination side. Dragging text, files and URLs onto
elements works. Type conversion from NSPasteboard to MIME types is hardwired.
No JS access yet to modifier keys, or operations mask.
Reviewed by Chris.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView draggingUpdatedWithDraggingInfo:]): Call DHTML dragging via bridge.
(-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto.
(-[WebHTMLView concludeDragForDraggingInfo:]): Ditto.
* WebView.subproj/WebHTMLViewPrivate.h:
* WebView.subproj/WebView.m:
(-[WebView _setWebKitDragRespondsToDragging:]): New SPI for finer grained control than the
delegate currently has.
(-[WebView _webKitDragRespondsToDragging]): Ditto.
(-[WebView _commonInitializationWithFrameName:groupName:]): Init new flag.
(-[WebView _dragOperationForDraggingInfo:]): Comment.
* WebView.subproj/WebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6709
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 27 May 2004 16:26:59 +0000 (16:26 +0000)]
Reviewed by Gramps
* kwq/KWQKHTMLPart.h: Declare new fontForCurrentPosition helper.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::fontForCurrentPosition): Determines the "current font" in the way that Cocoa
does. Either the font of the character before the caret, when the selection is a caret, or
the font of the first character selected, when the selection is a range.
* kwq/WebCoreBridge.h: Declare bridge method so this can be called from WebKit.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge fontForCurrentPosition]): Calls through to fontForCurrentPosition on KWQKHTMLPart.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6708
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 27 May 2004 16:22:16 +0000 (16:22 +0000)]
Reviewed by Gramps
Adds a typing style member variable to khtml part.
This patch adds basic life-cycle management and
accessors. In addition, one essential piece of
behavior has been added: Clearing the typing style
whenever the selection changes.
Follow-on work will make this typing style a fully
functional part of applying styles to text while typing.
* khtml/khtml_part.cpp:
(KHTMLPart::notifySelectionChanged): Clear typing style.
(KHTMLPart::typingStyle): Getter.
(KHTMLPart::setTypingStyle): Setter.
(KHTMLPart::clearTypingStyle): Convenience. Sets to 0.
* khtml/khtml_part.h: Function declarations.
* khtml/khtmlpart_p.h:
(KHTMLPartPrivate::KHTMLPartPrivate): Initialize member variable.
(KHTMLPartPrivate::~KHTMLPartPrivate): Deref if necessary.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6707
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 27 May 2004 16:18:26 +0000 (16:18 +0000)]
Reviewed by Gramps
Add helper to get the DOM element for a Position.
* khtml/xml/dom_position.cpp:
(DOM::Position::element): Returns the Position's node if it is an element, or
the first ancestor of the node that is an element. Returns 0 if node is not
an element and has no parent that is an element.
* khtml/xml/dom_position.h: Added declaration.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6706
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 08:18:56 +0000 (08:18 +0000)]
* WebView.subproj/WebFrameView.m: (-[WebFrameView _scrollVerticallyBy:]): Added comment.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6705
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 08:14:25 +0000 (08:14 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/
3667948>: (REGRESSION: Page Down key goes down two pages when smooth scrolling is on)
* WebView.subproj/WebFrameView.m:
(-[WebFrameView _scrollVerticallyBy:]): Added return value to indicate if any scrolling was done.
This requires using secret AppKit methods; the public methods don't have a return value.
(-[WebFrameView _pageVertically:]): Added return value to indicate if any scrolling was done.
(-[WebFrameView scrollPageUp:]): Base call through to next responder on whether any scrolling was done,
using return value, rather than looking at new scroll position. This was the cause of the bug,
since with smooth scrolling no scrolling has happened yet when the function returns.
(-[WebFrameView scrollPageDown:]): Ditto.
- removed temporary DOMDocument method from WebView
* WebView.subproj/WebView.m:
(-[WebView computedStyleForElement:pseudoElement:]): Call getComputedStyle on the document that owns the
element rather than on the document that currently contains the selection.
(-[WebView _updateFontPanel]): Get the document from the DOM range rather than using the DOMDocument method.
(-[WebView styleDeclarationWithText:]): Change this method to not use the DOMDocument method, but do the same
job with inline code.
* WebView.subproj/WebViewPrivate.h: Moved a recently-added category that is not SPI out of here.
* WebView.subproj/WebViewInternal.h: Moved the category in here. And removed the DOMDocument method from it.
- other changes
* English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
* copy-webcore-files-to-webkit: Change tabs to spaces. Quiet the script down by
making it no longer echo each command or print messages about what it's doing by default.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6704
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 07:36:28 +0000 (07:36 +0000)]
Reviewed by Maciej.
- moved to new symlink technique for embedding frameworks
* WebKit.pbproj/project.pbxproj: Get rid of embed-frameworks build step
because we don't need it any more.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6703
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 07:32:18 +0000 (07:32 +0000)]
Reviewed by Maciej.
- moved to new symlink technique for embedding frameworks
* WebCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step
because we don't need it any more.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6702
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 07:31:43 +0000 (07:31 +0000)]
Reviewed by Maciej.
- moved to new symlink technique for embedding frameworks
* JavaScriptCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step
because we don't need it any more.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6701
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 07:11:55 +0000 (07:11 +0000)]
- fixed Deployment build
* WebView.subproj/WebView.m: (-[WebView concludeDragOperation:]):
Got rid of ASSERT-only local variable.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6700
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 27 May 2004 07:10:27 +0000 (07:10 +0000)]
- fixed bug where all pages with images would cause a crash
- fixed Deployment build
* kwq/KWQPainter.mm: (QPainter::drawPixmap): Put #if 0 around placeholder code
for setting up the graphics context.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6699
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 27 May 2004 06:35:59 +0000 (06:35 +0000)]
Added shadow support (w/ Louch).
Added infrastructure for drawing images.
New context methods:
setShadow
setShadowWithColor
clearShadow
Reviewed by me and Louch.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Image::image):
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawPixmap):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6698
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 27 May 2004 06:32:27 +0000 (06:32 +0000)]
Reviewed by Dave.
- fix further problems with Emerson feed: redirection for RSS feeds
This is done by removing removing the calls to defer callbacks
while waiting for
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient continueAfterNavigationPolicy:formState:]):
(-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
(-[WebMainResourceClient continueAfterContentPolicy:response:]):
(-[WebMainResourceClient checkContentPolicyForResponse:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6697
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Thu, 27 May 2004 01:02:40 +0000 (01:02 +0000)]
Added and implemented proposed dragging API changes. These changes are necessary to make JS dragging work properly.
Reviewed by trey.
* WebView.subproj/WebDefaultUIDelegate.m:
(-[WebDefaultUIDelegate webView:shouldDetermineDragOperationForDraggingInfo:dragOperation:]): instead of calling back to the WebView to get the default drag operation, return YES. Return NO in order to return a custom drag operation. Removed element parameter since another new API provides a way to get that.
(-[WebDefaultUIDelegate webView:shouldProcessDragWithDraggingInfo:]): Removed element parameter since another new API provides a way to get that.
* WebView.subproj/WebDocumentInternal.h:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView draggingUpdatedWithDraggingInfo:]): now returns a drag operation
(-[WebHTMLView draggingCancelledWithDraggingInfo:]): moved
* WebView.subproj/WebUIDelegatePrivate.h:
* WebView.subproj/WebView.m:
(-[WebView elementAtPoint:]): new proposed API
(-[WebView dragOperationForDraggingInfo:]): removed code from this API that should be removed
(-[WebView _dragOperationForDraggingInfo:]): call new API
(-[WebView concludeDragOperation:]): call new API
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6695
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 27 May 2004 00:23:56 +0000 (00:23 +0000)]
Fixed build snafu.
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6694
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 26 May 2004 23:58:25 +0000 (23:58 +0000)]
Part 2 of the new <CANVAS> tag implementation. This adds the
basic machinery and draw operations for the <CANVAS> tag. Pretty cool.
function drawLine() {
var canvas1 = document.getElementById ("canvas1");
var context = canvas1.getContext("context-2d");
context.setStrokeColor ("red");
context.setLineWidth (10);
context.beginPath();
context.moveToPoint (0,0);
context.addLineToPoint (400,400);
context.strokePath();
}
...
<canvas id="canvas1" width="400" height="400">
Currently supported operations on the 2D context are:
Save, Restore,
Scale, Rotate, Translate,
BeginPath, ClosePath,
SetStrokeColor, SetFillColor, SetLineWidth, SetLineCap, SetLineJoin, SetMiterLimit,
FillPath, StrokePath,
MoveToPoint, AddLineToPoint, AddQuadraticCurveToPoint, AddBezierCurveToPoint,
ClearRect
More to come.
Reviewed by Dave.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElementFunction::tryCall):
(KJS::Context2DFunction::tryCall):
(Context2D::tryGet):
(Context2D::getValueProperty):
(Context2D::tryPut):
(Context2D::putValue):
(Context2D::Context2D):
(Context2D::~Context2D):
* khtml/ecma/kjs_html.h:
(KJS::Context2D::toBoolean):
(KJS::Context2D::classInfo):
(KJS::Context2D::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
* khtml/html/html_canvasimpl.cpp:
(HTMLCanvasElementImpl::HTMLCanvasElementImpl):
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::RenderCanvasImage):
(RenderCanvasImage::~RenderCanvasImage):
(RenderCanvasImage::createDrawingContext):
(RenderCanvasImage::drawingContext):
(RenderCanvasImage::setNeedsImageUpdate):
(RenderCanvasImage::updateDrawnImage):
(RenderCanvasImage::drawnImage):
(RenderCanvasImage::paint):
(RenderCanvasImage::layout):
* khtml/rendering/render_canvasimage.h:
* khtml/rendering/render_image.cpp:
(RenderImage::paint):
* khtml/rendering/render_image.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::shouldPaint):
(RenderWidget::paint):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::currentContext):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6693
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 26 May 2004 21:16:30 +0000 (21:16 +0000)]
Reviewed by John.
- moved HTML editing operations from WebView to WebHTMLView, leaving only forwarding machinery
at the WebView level
- fixed <rdar://problem/
3655412>: (Editing:�startSpeaking:�ethod�nimplemented�WebKit�diting�PI))
- fixed <rdar://problem/
3655414>: (Editing:�stopSpeaking:�ethod�nimplemented�WebKit�diting�PI))
- fixed <rdar://problem/
3655375>: (Editing:�pasteAsRichText:�ethod�nimplemented�WebKit�diting�PI))
* WebView.subproj/WebView.h: Added missing declaration of selectionAffinity. I think this
omission was an editorial mistake.
* WebView.subproj/WebView.m:
(-[WebView searchFor:direction:caseSensitive:wrap:]): Use _frameForCurrentSelection directly,
since it no longer returns nil.
(-[WebView pasteboardTypesForSelection]): Use _frameForCurrentSelection instead of going through the bridge.
(-[WebView _frameForCurrentSelection]): Renamed from _currentFrame and changed to return main frame
rather than nil when called on WebView that has no current selection.
(-[WebView _bridgeForCurrentSelection]): Moved in file.
(-[WebView _updateFontPanel]): Removed the one call to _currentSelectionIsEditable here, since
it was the only one left in this file. Eventually this code will move to WebHTMLView.
(-[WebView _performResponderOperation:with:]): Name change.
* WebView.subproj/WebDataSource.m: (-[WebDataSource _documentFragmentWithImageResource:]):
Build document fragment using DOM instead of composing HTML text.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): Added allowPlainText boolean,
moved method into new location in file so it can be in the right category, changed link pasting
to use DOM instead of composing HTML text.
(-[WebHTMLView _replaceSelectionWithPasteboard:selectReplacement:allowPlainText:]): Added allowPlainText
boolean, moved method into new location in file so it can be in the right category.
(-[WebHTMLView concludeDragForDraggingInfo:]): Pass YES for allowPlainText.
(-[WebHTMLView centerSelectionInVisibleArea:]): Moved here from WebView.
(-[WebHTMLView _alterCurrentSelection:direction:granularity:]): Ditto.
(-[WebHTMLView moveBackward:]): Ditto.
(-[WebHTMLView moveBackwardAndModifySelection:]): Ditto.
(-[WebHTMLView moveDown:]): Ditto.
(-[WebHTMLView moveDownAndModifySelection:]): Ditto.
(-[WebHTMLView moveForward:]): Ditto.
(-[WebHTMLView moveForwardAndModifySelection:]): Ditto.
(-[WebHTMLView moveLeft:]): Ditto.
(-[WebHTMLView moveLeftAndModifySelection:]): Ditto.
(-[WebHTMLView moveRight:]): Ditto.
(-[WebHTMLView moveRightAndModifySelection:]): Ditto.
(-[WebHTMLView moveToBeginningOfDocument:]): Ditto.
(-[WebHTMLView moveToBeginningOfLine:]): Ditto.
(-[WebHTMLView moveToBeginningOfParagraph:]): Ditto.
(-[WebHTMLView moveToEndOfDocument:]): Ditto.
(-[WebHTMLView moveToEndOfLine:]): Ditto.
(-[WebHTMLView moveToEndOfParagraph:]): Ditto.
(-[WebHTMLView moveUp:]): Ditto.
(-[WebHTMLView moveUpAndModifySelection:]): Ditto.
(-[WebHTMLView moveWordBackward:]): Ditto.
(-[WebHTMLView moveWordBackwardAndModifySelection:]): Ditto.
(-[WebHTMLView moveWordForward:]): Ditto.
(-[WebHTMLView moveWordForwardAndModifySelection:]): Ditto.
(-[WebHTMLView moveWordLeft:]): Ditto.
(-[WebHTMLView moveWordLeftAndModifySelection:]): Ditto.
(-[WebHTMLView moveWordRight:]): Ditto.
(-[WebHTMLView moveWordRightAndModifySelection:]): Ditto.
(-[WebHTMLView pageDown:]): Ditto.
(-[WebHTMLView pageUp:]): Ditto.
(-[WebHTMLView selectParagraph:]): Ditto.
(-[WebHTMLView selectLine:]): Ditto.
(-[WebHTMLView selectWord:]): Ditto.
(-[WebHTMLView copy:]): Moved down in file so it's in the right category.
(-[WebHTMLView cut:]): Ditto.
(-[WebHTMLView delete:]): Ditto.
(-[WebHTMLView paste:]): Ditto.
(-[WebHTMLView copyFont:]): Moved here from WebView.
(-[WebHTMLView pasteFont:]): Ditto.
(-[WebHTMLView pasteAsPlainText:]): Ditto.
(-[WebHTMLView pasteAsRichText:]): Implemented this by calling the paste code with
allowPlainText:NO; believe it or not, that's what this means in NSTextView.
(-[WebHTMLView changeFont:]): Moved here from WebView.
(-[WebHTMLView changeAttributes:]): Ditto.
(-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
(-[WebHTMLView changeColor:]): Ditto.
(-[WebHTMLView alignCenter:]): Ditto.
(-[WebHTMLView alignJustified:]): Ditto.
(-[WebHTMLView alignLeft:]): Ditto.
(-[WebHTMLView alignRight:]): Ditto.
(-[WebHTMLView indent:]): Ditto.
(-[WebHTMLView insertTab:]): Moved here from WebView, also call insertText rather than
replaceSelectionWithText so it's undoable like a typed character.
(-[WebHTMLView insertBacktab:]): Moved here from WebView.
(-[WebHTMLView insertNewline:]): Moved here from WebView, also call insertText rather than
replaceSelectionWithText so it's undoable like a typed character.
(-[WebHTMLView insertParagraphSeparator:]): Moved here from WebView.
(-[WebHTMLView changeCaseOfLetter:]): Ditto.
(-[WebHTMLView uppercaseWord:]): Ditto.
(-[WebHTMLView lowercaseWord:]): Ditto.
(-[WebHTMLView capitalizeWord:]): Ditto.
(-[WebHTMLView deleteForward:]): Ditto.
(-[WebHTMLView deleteBackward:]): Ditto.
(-[WebHTMLView deleteBackwardByDecomposingPreviousCharacter:]): Ditto.
(-[WebHTMLView deleteWordForward:]): Ditto.
(-[WebHTMLView deleteWordBackward:]): Ditto.
(-[WebHTMLView deleteToBeginningOfLine:]): Ditto.
(-[WebHTMLView deleteToEndOfLine:]): Ditto.
(-[WebHTMLView deleteToBeginningOfParagraph:]): Ditto.
(-[WebHTMLView deleteToEndOfParagraph:]): Ditto.
(-[WebHTMLView complete:]): Ditto.
(-[WebHTMLView checkSpelling:]): Ditto.
(-[WebHTMLView showGuessPanel:]): Ditto.
(-[WebHTMLView performFindPanelAction:]): Ditto.
(-[WebHTMLView startSpeaking:]): Implemented this.
(-[WebHTMLView stopSpeaking:]): Implemented this.
(-[WebHTMLView insertText:]): Moved here from WebView.
* WebView.subproj/WebHTMLViewPrivate.h: Removed declarations of methods that are neither
SPI nor needed outside WebHTMLView.m.
* WebView.subproj/WebViewInternal.h: Removed _currentFrame, and added _frameForCurrentSelection and
_bridgeForCurrentSelection.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6692
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 26 May 2004 16:05:29 +0000 (16:05 +0000)]
- fixed warning that prevents Deployment build from compiling
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent):
Moved use of single-click boolean outside the scope of the "block exceptions" macros.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6691
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 26 May 2004 07:17:03 +0000 (07:17 +0000)]
Reviewed by Richard.
<rdar://problem/
3652498>: new sniffing support is crashing
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient checkContentPolicyForResponse:]): Retain
listener around call, in case delegate does something that ends up
invalidating it, like navigating to a new URL.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6690
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 25 May 2004 23:45:07 +0000 (23:45 +0000)]
Fixed a regression where selections that were created via double or triple were not draggable.
Reviewed by darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMousePressEvent): if the click count is greater than 1, don't allow drags
(KWQKHTMLPart::khtmlMouseMoveEvent): allow drags to occur even if the selection was originally created via double or triple click
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6689
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 25 May 2004 23:05:45 +0000 (23:05 +0000)]
WebCore:
Fixed regression where undoing typing would undo character-by-character.
Reviewed by kocienda.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge insertText:]): new, this method used to be replaceSelectionWithText, but replaceSelectionWithText now is one operation whereas calls to insertText: are coalesced
WebKit:
Fixed regression where undoing typing would undo character-by-character.
Reviewed by kocienda.
* WebView.subproj/WebView.m:
(-[WebView insertText:]): call insertText: rather than replaceSelectionWithText:: since text insertion via insertText: is coalesced and this is the behavior we want here
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6688
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 25 May 2004 21:56:04 +0000 (21:56 +0000)]
WebCore:
Reviewed by John
Change postDidChangeSelectionNotification and postDidChangeNotification tp
respondToChangedSelection and respondToChangedContents, respectively, to
account for the fact that we do work in these calls other than post a
notification.
* khtml/khtml_part.cpp:
(KHTMLPart::notifySelectionChanged): Use new names.
(KHTMLPart::appliedEditing): Ditto.
(KHTMLPart::unappliedEditing): Ditto.
(KHTMLPart::reappliedEditing): Ditto.
* kwq/KWQKHTMLPart.h: Change name of functions as described.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::respondToChangedSelection): Ditto.
(KWQKHTMLPart::respondToChangedContents): Ditto.
* kwq/WebCoreBridge.h: Ditto.
WebKit:
Reviewed by John
Change postDidChangeSelectionNotification and postDidChangeNotification tp
respondToChangedSelection and respondToChangedContents, respectively, to
account for the fact that we do work in these calls other than post a
notification. The need to clear the typing style on both kinds of changes
inspired the name change.
Add in support to set and access typing style. We don't do anything with it yet
except store and return it. Using the typing style is still to come.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge respondToChangedContents]): Change name of functions as described.
(-[WebBridge respondToChangedSelection]): Change name of functions as described.
* WebView.subproj/WebView.m:
(-[WebView dealloc:]): Dealloc typing style ivar.
(-[WebView setTypingStyle:]): Change to set typing style ivar.
(-[WebView typingStyle]): Return new typing style ivar.
* WebView.subproj/WebViewPrivate.h: Add ivar for typing style.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6687
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 25 May 2004 21:51:22 +0000 (21:51 +0000)]
Fixed build.
* ForwardingHeaders/misc/khtml_text_operations.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6686
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 25 May 2004 21:37:44 +0000 (21:37 +0000)]
Part 1 of the new <CANVAS> tag implementation. This patch
adds the boiler plate for the new element.
Reviewed by Dave.
* ForwardingHeaders/html/html_canvasimpl.h: Added.
* ForwardingHeaders/rendering/render_canvasimage.h: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::classInfo):
(KJS::HTMLElementFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::HTMLElement::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_canvasimpl.cpp: Added.
(HTMLCanvasElementImpl::HTMLCanvasElementImpl):
(HTMLCanvasElementImpl::~HTMLCanvasElementImpl):
(HTMLCanvasElementImpl::id):
(HTMLCanvasElementImpl::mapToEntry):
(HTMLCanvasElementImpl::parseHTMLAttribute):
(HTMLCanvasElementImpl::createRenderer):
(HTMLCanvasElementImpl::attach):
(HTMLCanvasElementImpl::detach):
(HTMLCanvasElementImpl::isURLAttribute):
* khtml/html/html_canvasimpl.h: Added.
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
* khtml/misc/htmltags.c:
(hash_tag):
(findTag):
* khtml/misc/htmltags.h:
* khtml/misc/htmltags.in:
* khtml/rendering/render_canvasimage.cpp: Added.
(RenderCanvasImage::RenderCanvasImage):
(RenderCanvasImage::~RenderCanvasImage):
(RenderCanvasImage::paint):
(RenderCanvasImage::layout):
* khtml/rendering/render_canvasimage.h: Added.
(khtml::RenderCanvasImage::renderName):
(khtml::RenderCanvasImage::element):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6685
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 25 May 2004 21:30:07 +0000 (21:30 +0000)]
Fixed: <rdar://problem/
3546418>: (when dragging text within an editable HTML doc, the selection should be moved not copied)
Reviewed by kocienda.
* khtml/editing/htmlediting_impl.cpp:
(khtml::MoveSelectionCommandImpl::doApply): implemented
* khtml/khtml_part.cpp:
(KHTMLPart::setDragCaret): make the old drag cursor rect dirty
* khtml/khtml_part.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6684
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 25 May 2004 21:00:02 +0000 (21:00 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3657363>: (Editing: export innerText, innerHTML, outerText, outerHTML and setters to Objective-C)
- partial fix for <rdar://problem/
3656706>: (Fix innerText and setInnerText DOM extensions)
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::innerText): Use plainText() to make the text, to
match other browsers.
(HTMLElementImpl::outerText): Extended comment.
* khtml/misc/khtml_text_operations.h:
* kwq/DOMExtensions.h:
* kwq/DOMHTML.mm:
(-[DOMHTMLElement outerText]): Added new ObjC wrapper for this.
(-[DOMHTMLElement setOuterText:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6683
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 25 May 2004 20:29:56 +0000 (20:29 +0000)]
Reviewed by Chris
Defer setting the selection to delete when none has been passed in to the
time that the command is run. This fixes a problem where a command nested
in a composite was not correctly picking up the right selection to begin
its work. Now, the command will correctly use the ending selection of
its parent when no selection has been passed in.
* khtml/editing/htmlediting_impl.cpp:
(khtml::DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl):
(khtml::DeleteCollapsibleWhitespaceCommandImpl::doApply):
(khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl):
(khtml::DeleteSelectionCommandImpl::doApply):
* khtml/editing/htmlediting_impl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6682
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 25 May 2004 18:27:23 +0000 (18:27 +0000)]
Reviewed by John
Improve _bridgeForCurrentSelection so that it is frame-savvy.
Fixup setSelectedDOMRange:affinity: so that it uses the right bridge.
* WebView.subproj/WebView.m:
(-[WebView _bridgeForCurrentSelection]): Use _currentFrame not mainFrame.
(-[WebView _currentFrame]): Moved to WebView (WebInternal) category so _bridgeForCurrentSelection can use it.
(-[WebView setSelectedDOMRange:affinity:]): Derive the bridge to use from the range passed in; _bridgeForCurrentSelection
is not the right way to get at the document for the range.
* WebView.subproj/WebViewInternal.h: Add _currentFrame declaration.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6681
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 25 May 2004 00:25:03 +0000 (00:25 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3666022>: (REGRESSION: crash from infinite regress in -[WebFrameView(WebPrivate) scrollPageDown:])
* WebView.subproj/WebView.m:
(-[WebView _performResponderOperation:sender:]): Helper method that knows how to pass on operations
to the responder chain, allowing us to implement operations that will get passed to views inside
us as necessary. Moved a few methods to this, and soon will move even more.
(-[WebView scrollLineDown:]): Use the above method.
(-[WebView scrollLineUp:]): Ditto.
(-[WebView scrollPageDown:]): Ditto.
(-[WebView scrollPageUp:]): Ditto.
(-[WebView copy:]): Ditto.
(-[WebView cut:]): Ditto.
(-[WebView paste:]): Ditto.
(-[WebView delete:]): Ditto.
(-[WebView insertBacktab:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6680
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 25 May 2004 00:18:18 +0000 (00:18 +0000)]
Reviewed by Dave.
Added a new simple layout test for outerText.
* layout-tests/fast/dom/outerText-expected.txt: Added.
* layout-tests/fast/dom/outerText.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6679
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 24 May 2004 22:53:06 +0000 (22:53 +0000)]
Reviewed by Vicki.
- fixed <rdar://problem/
3665813>: (iBench is crashing in TOT)
* khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::HTMLSelectElementImpl):
Initialize m_options to 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6678
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 24 May 2004 22:19:02 +0000 (22:19 +0000)]
Changed RuntimeArrayImp to inherit from ArrayInstanceImp and
fixed ClassInfo to correctly reflect inheritance. This is required
because of the runtime checks in JSC for arrays, i.e. in
the Function objects apply method.
Reviewed by Ken.
* bindings/jni/jni_runtime.cpp:
(JavaArray::convertJObjectToArray):
* bindings/objc/objc_utility.mm:
(KJS::Bindings::convertObjcValueToValue):
* bindings/runtime_array.cpp:
(RuntimeArrayImp::RuntimeArrayImp):
* bindings/runtime_array.h:
* bindings/testM.js: Added.
* bindings/testbindings.mm:
(+[MyFirstInterface webScriptNameForSelector:]):
(-[MyFirstInterface logMessages:]):
(-[MyFirstInterface logMessage:prefix:]):
(-[MyFirstInterface callJSObject::]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6677
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 24 May 2004 22:18:27 +0000 (22:18 +0000)]
Reviewed by Richard
* khtml/xml/dom_selection.cpp:
(DOM::Selection::toRange): Improved the code to return ranges that are
convenient to use by WebKit code which needs to perform text-editor-like
operations with ranges. Comments in the code describe this behavior.
(DOM::Selection::nodeIsBeforeNode): Make this method const.
* khtml/xml/dom_selection.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6676
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 24 May 2004 21:55:47 +0000 (21:55 +0000)]
WebCore:
Improved editing via drag.
Reviewed by kocienda.
* khtml/editing/htmlediting.cpp: Renamed PasteMarkupCommand to ReplaceSelectionCommand
(khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::impl):
(khtml::MoveSelectionCommand::MoveSelectionCommand):
(khtml::MoveSelectionCommand::~MoveSelectionCommand):
(khtml::MoveSelectionCommand::impl):
* khtml/editing/htmlediting.h:
(khtml::):
* khtml/editing/htmlediting_impl.cpp:
(khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl):
(khtml::ReplaceSelectionCommandImpl::~ReplaceSelectionCommandImpl):
(khtml::ReplaceSelectionCommandImpl::commandID):
(khtml::ReplaceSelectionCommandImpl::doApply):
(khtml::MoveSelectionCommandImpl::MoveSelectionCommandImpl): new command
(khtml::MoveSelectionCommandImpl::~MoveSelectionCommandImpl):
(khtml::MoveSelectionCommandImpl::commandID):
(khtml::MoveSelectionCommandImpl::doApply):
* khtml/editing/htmlediting_impl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::dragCaret): new
(KHTMLPart::setDragCaret): new
(KHTMLPart::notifyDragCaretChanged): new
(KHTMLPart::paintDragCaret): new
* khtml/khtml_part.h:
* khtml/khtmlpart_p.h:
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paintObject): paint the drag caret
* kwq/DOM.mm:
(+[DOMDocumentFragment _documentFragmentWithImpl:]): made internally available
(-[DOMDocumentFragment _fragmentImpl]):
* kwq/DOMInternal.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): new
(-[WebCoreBridge documentFragmentWithText:]): new
(-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): new
(-[WebCoreBridge replaceSelectionWithNode:selectReplacement:]): renamed to take the selectReplacement BOOL
(-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:]): ditto
(-[WebCoreBridge replaceSelectionWithText:selectReplacement:]): ditto
(-[WebCoreBridge replaceSelectionWithNewline]): moved
(-[WebCoreBridge setSelectionToDragCaret]): new
(-[WebCoreBridge moveSelectionToDragCaret:]): new
(-[WebCoreBridge moveDragCaretToPoint:]): set the drag caret, not the selection
(-[WebCoreBridge removeDragCaret]): new
WebKit:
Improved editing via drag
Reviewed by kocienda.
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _documentFragmentWithImageResource:]): made this method return a fragment instead of replace the selection so that the caller do other things with the fragment
(-[WebDataSource _documentFragmentWithArchive:]): ditto
(-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): call renamed methods
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDocumentInternal.h:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _documentFragmentFromPasteboard:]): made this method return a fragment instead of replace the selection so that the caller do other things with the fragment
(-[WebHTMLView _replaceSelectionWithPasteboard:selectReplacement:]): new
(-[WebHTMLView paste:]): call _replaceSelectionWithPasteboard:selectReplacement:
(-[WebHTMLView dragOperationForDraggingInfo:]): handle the case where the destination is editable, but the source is not
(-[WebHTMLView draggingCancelledWithDraggingInfo:]): new, removes drag caret
(-[WebHTMLView draggingUpdatedWithDraggingInfo:]): remove drag caret when we can't handle the drag
(-[WebHTMLView concludeDragForDraggingInfo:]): instead of calling paste, move the selection when doing a move and replace the drag caret when doing a copy
* WebView.subproj/WebHTMLViewPrivate.h:
* WebView.subproj/WebView.m:
(-[WebViewPrivate dealloc]):
(-[WebView _setDraggingDocumentView:]): new
(-[WebView _dragOperationForDraggingInfo:]): if the current dragging document view changes, tell the previous dragging document view that dragging cancelled
(-[WebView draggingExited:]): new, tell the previous dragging document view that dragging cancelled
(-[WebView concludeDragOperation:]): release the dragging document view
(-[WebView replaceSelectionWithNode:]): pass the selectReplacement BOOL to the bridge
(-[WebView replaceSelectionWithText:]): ditto
(-[WebView replaceSelectionWithMarkupString:]): ditto
(-[WebView replaceSelectionWithArchive:]): ditto
(-[WebView pasteAsPlainText:]): ditto
(-[WebView insertTab:]): ditto
(-[WebView insertText:]): ditto
* WebView.subproj/WebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6675
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 24 May 2004 20:40:30 +0000 (20:40 +0000)]
Reviewed by John
Fixed some life-cycle issues with node iterators and detaching. Big deal is
to detach in DOMNodeIterator dealloc. Otherwise, NodeIterators created from
obj-c leak.
* khtml/xml/dom2_traversalimpl.cpp:
(DOM::NodeIteratorImpl::detach): Only detach if not yet detached.
* khtml/xml/dom2_traversalimpl.h:
(DOM::NodeIteratorImpl::setDetached): New convenience.
* kwq/DOM.mm:
(-[DOMNodeIterator dealloc]): Detach here, if not yet detached; fixes leak.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6674
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 24 May 2004 20:14:26 +0000 (20:14 +0000)]
Reviewed by Hyatt
* khtml/css/css_computedstyle.cpp:
(DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Fixed to return the property value,
as it should, instead of the whole property, as it was doing before.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6673
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 24 May 2004 20:01:11 +0000 (20:01 +0000)]
WebKit:
Reviewed by Dave.
- added private RSSFeedReferrer field to WebHistoryItem so RSS feeds in the
back/forward list can remember what page (if any) they were initiated from.
* History.subproj/WebHistoryItem.m:
new RSSFeedReferrer ivar in private structure
(-[WebHistoryItemPrivate dealloc]):
release RSSFeedReferrer
(-[WebHistoryItem copyWithZone:]):
copy RSSFeedReferrer
(-[WebHistoryItem RSSFeedReferrer]):
return RSSFeedReferrer
(-[WebHistoryItem setRSSFeedReferrer:]):
set RSSFeedReferrer
* History.subproj/WebHistoryItemPrivate.h:
declare -RSSFeedReferrer and -setRSSFeedReferrer:
WebBrowser:
Reviewed by Dave.
More work on Emerson show/hide button. Now when the "Show RSS Feed" button
is clicked, we stash away the URL we are expecting to load. When (if) that URL
is loaded, we find the previous URL from the back list and store that in the
RSS feed's history item, so that if we revisit this RSS feed using the back/forward
list, we'll correctly display the "Hide RSS Feed" button. (If the RSS feed's URL
is visited some other way, it won't have a corresponding URL to "return" to, and
the "Hide RSS Feed" button will not appear.)
* BrowserWebController.h:
new ivar and getter/setter for pendingRSSFeedURLString
* BrowserWebController.m:
(-[BrowserWebView dealloc]):
release _pendingRSSFeedURLString
(-[BrowserWebView pendingRSSFeedURLString]):
get _pendingRSSFeedURLString
(-[BrowserWebView setPendingRSSFeedURLString:]):
set _pendingRSSFeedURLString
(-[BrowserWebView counterpartURLForRSS]):
get RSS feed referrer from current back/forward list history item
* BrowserWindowController.m:
(-[BrowserWindowController windowShouldGoToURL:]):
cleanup noticed in passing: use [[self currentWebView] goToURL:URL] instead of
[[self browserDocument] goToURL:URL] because it seems clearer (and does the same thing)
(-[BrowserWindowController performQuickSearch:]):
ditto
(-[BrowserWindowController updateRSSButton]):
added comment
(-[BrowserWindowController goToCounterpartURLForRSS]):
when going to an RSS feed, call setPendingRSSFeedURLString so we will set
the referrer on the history item in the upcoming commit
* LocationChangeHandler.m:
(-[LocationChangeHandler webView:didCommitLoadForFrame:]):
if the incoming URL matches the pending RSS feed, set the RSS feed referrer on the
history item for the incoming URL
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6672
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 24 May 2004 04:45:26 +0000 (04:45 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3259919>: (Shift click should extend selection)
* khtml/khtmlpart_p.h: Renamed m_textElement to m_selectionGranularity and
m_mouseMovedSinceLastMousePress to m_beganSelectingText.
* khtml/khtml_part.cpp:
(KHTMLPart::handleMousePressEventDoubleClick): Set m_beganSelectingText if the double-click
began selecting text.
(KHTMLPart::handleMousePressEventTripleClick): Ditto.
(KHTMLPart::handleMousePressEventSingleClick): Added code to extend selection if shift is down.
(KHTMLPart::khtmlMousePressEvent): Remove code that sets the selection granularity to
"by character". We only want to do that if we start selecting with a single click.
Otherwise we want to leave the selection granularity alone.
(KHTMLPart::khtmlMouseReleaseEvent): Change the code that clears the selection on a plain old
click to check the m_beganSelectingText boolean so it won't run when you shift-click, for example.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): Updated for m_textElement
name change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6671
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 23 May 2004 22:45:28 +0000 (22:45 +0000)]
Reviewed by Ken.
- went through things marked "unimplemented" or "not implemented" and removed
or implemented as many as possible
* kwq/DOM.mm: (-[DOMNode dispatchEvent:]): Implemented.
Also moved DOMAbstractView and DOMDocumentView into DOMViews.mm.
* kwq/DOM-CSS.mm: (-[DOMDocument getComputedStyle::]): Implemented.
* kwq/DOMEventsInternal.h: Added.
* kwq/DOMEvents.mm:
(-[DOMEvent type]): Implemented.
(-[DOMEvent target]): Implemented.
(-[DOMEvent currentTarget]): Implemented.
(-[DOMEvent eventPhase]): Implemented.
(-[DOMEvent bubbles]): Implemented.
(-[DOMEvent cancelable]): Implemented.
(-[DOMEvent timeStamp]): Implemented.
(-[DOMEvent stopPropagation]): Implemented.
(-[DOMEvent preventDefault]): Implemented.
(-[DOMEvent initEvent:::]): Implemented.
(-[DOMEvent _eventImpl]): Added.
(-[DOMEvent _initWithEventImpl:]): Added.
(+[DOMEvent _eventWithImpl:]): Added.
(-[DOMMouseEvent _mouseEventImpl]): Added.
(-[DOMMouseEvent screenX]): Implemented.
(-[DOMMouseEvent screenY]): Implemented.
(-[DOMMouseEvent clientX]): Implemented.
(-[DOMMouseEvent clientY]): Implemented.
(-[DOMMouseEvent ctrlKey]): Implemented.
(-[DOMMouseEvent shiftKey]): Implemented.
(-[DOMMouseEvent altKey]): Implemented.
(-[DOMMouseEvent metaKey]): Implemented.
(-[DOMMouseEvent button]): Implemented.
(-[DOMMouseEvent relatedTarget]): Implemented.
(-[DOMMouseEvent initMouseEvent:::::::::::::::]): Implemented.
(-[DOMMutationEvent _mutationEventImpl]): Added.
(-[DOMMutationEvent relatedNode]): Implemented.
(-[DOMMutationEvent prevValue]): Implemented.
(-[DOMMutationEvent newValue]): Implemented.
(-[DOMMutationEvent attrName]): Implemented.
(-[DOMMutationEvent attrChange]): Implemented.
(-[DOMMutationEvent initMutationEvent::::::::]):
(-[DOMUIEvent _UIEventImpl]): Added.
(-[DOMUIEvent view]): Implemented.
(-[DOMUIEvent detail]): Implemented.
(-[DOMUIEvent initUIEvent:::::]): Implemented.
(-[DOMDocument createEvent:]): Implemented.
* kwq/DOMHTMLInternal.h: Added.
* kwq/DOMHTML.mm:
(+[DOMHTMLOptionsCollection _optionsCollectionWithImpl:]): Added.
(-[DOMHTMLOptionsCollection length]): Implemented.
(-[DOMHTMLOptionsCollection setLength:]): Implemented.
(-[DOMHTMLOptionsCollection item:]): Implemented.
(-[DOMHTMLOptionsCollection namedItem:]): Implemented.
(-[DOMHTMLSelectElement options]): Implemented.
* kwq/DOMViews.h: Changed DOMDocumentView to be a category on DOMDocument
rather than a separate class.
* kwq/DOMViewsInternal.h: Added.
* kwq/DOMViews.mm: Added.
(-[DOMAbstractView document]): Implemnted.
(-[DOMAbstractView _abstractViewImpl]): Added.
(-[DOMAbstractView _initWithAbstractViewImpl:]): Added.
(+[DOMAbstractView _abstractViewWithImpl:]): Added.
(-[DOMDocument defaultView]): Implemented.
* khtml/dom/dom2_views.h: Made AbstractView constructor public to allow creation in
the bindings. Would not be necessary if the impl classes were used consistently.
* khtml/html/html_formimpl.h: Added options() function to HTMLSelectElementImpl.
Added HTMLOptionsCollectionImpl class.
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::~HTMLSelectElementImpl): Added code to detach and deref the
options collection.
(HTMLSelectElementImpl::options): Create an options collection if needed.
(HTMLOptionsCollectionImpl::length): Added. Not yet implemented.
(HTMLOptionsCollectionImpl::setLength): Ditto.
(HTMLOptionsCollectionImpl::item): Ditto.
(HTMLOptionsCollectionImpl::namedItem): Ditto.
* khtml/khtmlview.h: Move unused focusNextPrevChild virtual function inside !APPLE_CHANGES.
* khtml/khtmlview.cpp: Put the tp, paintBuffer, and formCompletions fields entirely
inside !APPLE_CHANGES. Also made QT_NO_TOOLTIP entirely disable the tooltip field.
Also put focusNextPrevChild and formCompletionItems functions inside !APPLE_CHANGES.
* khtml/rendering/render_text.h: Removed unused isFixedWidthFont member function.
* khtml/rendering/render_text.cpp: Ditto.
* kwq/KWQCursor.h: Removed unused pos member function.
* kwq/KWQCursor.mm: Ditto.
* kwq/KWQFontMetrics.h: Removed unused rightBearing and leftBearing member functions.
* kwq/KWQFontMetrics.mm: Ditto.
* kwq/KWQKComboBox.h: Removed KCompletionBase as a base class.
* kwq/KWQKConfigBase.h: Removed unused readBoolEntry, writeEntry, and readListEntry
member functions.
* kwq/KWQKConfigBase.mm: Ditto.
(KConfig::readEntry): Improved "not implemented" message to indicate which key is uinimplemented.
(KConfig::readNumEntry): Ditto.
(KConfig::readUnsignedNumEntry): Ditto.
* kwq/KWQKLineEdit.h: Removed everything, since all the KLineEdit stuff was unused.
Changed KLineEdit to just be a typedef for QLineEdit.
* kwq/KWQSlot.mm: Removed slotAutoScroll.
(KWQSlot::KWQSlot): And from here.
(KWQSlot::call): And from here.
* kwq/KWQTextStream.h: Removed unused QTextOStream and QTextIStream.
* kwq/KWQTextStream.mm: Removed unused QTextIStream function. Also made buffer sizes larger
so we don't have any problems on 64-bit systems. 10 bytes might not be long enough to sprintf an
integer or a long or a pointer, but 100 bytes surely will.
* kwq/KWQWidget.h: Removed unused focusNextPrevChild.
* kwq/KWQWidget.mm: Ditto.
* WebCore.pbproj/project.pbxproj: Removed some files, added others.
* ForwardingHeaders/kcompletionbox.h: Emptied out, no KWQKCompletionBox.h any more.
* ForwardingHeaders/kiconloader.h: Emptied out, no KWQKIconLoader.h any more.
* ForwardingHeaders/kmimetype.h: Emptied out, no KWQKMimeType.h any more.
* ForwardingHeaders/ksimpleconfig.h: Emptied out, no KWQKSimpleConfig.h any more.
* ForwardingHeaders/qfontinfo.h: Emptied out, no KWQFontInfo.h any more.
* ForwardingHeaders/qtooltip.h: Replaced with define of QT_NO_TOOLTIP, no
KWQToolTip.h any more.
* kwq/KWQCompletion.h: Removed.
* kwq/KWQCompletion.mm: Removed.
* kwq/KWQFontInfo.h: Removed.
* kwq/KWQFontInfo.mm: Removed.
* kwq/KWQKCompletionBox.h: Removed.
* kwq/KWQKIconLoader.h: Removed.
* kwq/KWQKIconLoader.mm: Removed.
* kwq/KWQKMimeType.h: Removed.
* kwq/KWQKMimeType.mm: Removed.
* kwq/KWQKSimpleConfig.h: Removed.
* kwq/KWQKSimpleConfig.mm: Removed.
* kwq/KWQToolTip.h: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6670
268f45cc-cd09-0410-ab3c-
d52691b4dbfc