hyatt [Tue, 3 Aug 2004 23:22:06 +0000 (23:22 +0000)]
Add the deprecated text/xsl MIME type (introduced by Internet Explorer 5) as an acceptable MIME type for XML
documents.
Reviewed by john
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getValueProperty):
* khtml/khtml_part.cpp:
(KHTMLPart::begin):
* khtml/misc/loader.cpp:
(CachedXBLDocument::CachedXBLDocument):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7186
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Tue, 3 Aug 2004 22:45:51 +0000 (22:45 +0000)]
Reviewed by Darin.
Rolled in changes from the latest KJS sources that support additional
Number.prototype functions.
Specifically this patch covers the follow parts of the ECMA 3 spec:
15.7.4.5, 15.7.4.6, and 15.7.4.7
Fixes:
<rdar://problem/3663716> missing Number.toFixed (and toPrecision, toExponential)
<rdar://problem/3749492> missing Number.toPrecision prototype implementation
<rdar://problem/3749591> missing Number.toExponential prototype implementation
* kjs/identifier.h: Added toFixed, toPrecision, and toExponential to the
list of supported identifiers (a macro).
* kjs/number_object.cpp: Implemented support for toFixed(), toPrecision(),
and toExponential().
(NumberPrototypeImp::NumberPrototypeImp):
(NumberProtoFuncImp::call):
* kjs/number_object.h: Added property names for toFixed, toPrecision,
and toExponential.
(KJS::NumberProtoFuncImp::):
* tests/mozilla/expected.html: Update results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7185
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 3 Aug 2004 22:37:23 +0000 (22:37 +0000)]
Reviewed by Ken.
- implemented enough of the NSTextInput protocol and added the
proper calls to NSInputManager to allow input methods to
work. However, the text is not marked yet.
* WebView.subproj/WebHTMLViewInternal.h: Added new fields to track
marked range.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView markedRange]): Implemented
(-[WebHTMLView conversationIdentifier]): Implemented
(-[WebHTMLView hasMarkedText]): Implemented
(-[WebHTMLView unmarkText]): Implemented
(-[WebHTMLView setMarkedText:selectedRange:]): Implemented - does
not yet handle attributes in attributed strings
(-[WebHTMLView insertText:]): Modified to handle replacing or abandoning
the marked text when set.
(-[WebHTMLView _selectMarkedText]): new helper method, self-explanatory
(-[WebHTMLView _setMarkedDOMRange:]): hitto.
(-[WebHTMLView _selectRangeInMarkedText:]): ditto
(-[WebHTMLView _discardMarkedText]): ditto
(-[WebHTMLView _selectionIsInsideMarkedText]): ditto
(-[WebHTMLView _updateSelectionForInputManager]): ditto
- did a bit of refactoring while I was in here.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]): added this new
helper method to simplify the common case of calling the shouldInsertText: delegate
(-[WebHTMLView pasteAsPlainText:]): use it
(-[WebHTMLView insertTab:]): ditto
(-[WebHTMLView insertNewline:]): ditto
(-[WebHTMLView _changeWordCaseWithSelector:]): ditto
(-[WebHTMLView _changeSpellingToWord:]): ditto
(-[WebHTMLView _selectionChanged]): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7184
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 3 Aug 2004 21:56:33 +0000 (21:56 +0000)]
Fixed: <rdar://problem/3572737> Images not resizing at bmx-test.com (spoof nofix)
Reviewed by darin.
* WebCoreSupport.subproj/WebImageRendererFactory.m:
(-[WebImageRendererFactory supportedMIMETypes]): hard code image/pjpeg to the list of image mime types that we can handle
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7183
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 3 Aug 2004 21:41:23 +0000 (21:41 +0000)]
Reviewed by Ken.
- remove assertions that asserted text is non-empty, just avoid
doing anything for the empty case; this is needed because input
methods like to insert empty text in various cases.
* khtml/editing/htmlediting_impl.cpp:
(khtml::InsertTextCommandImpl::InsertTextCommandImpl):
(khtml::InsertTextCommandImpl::doApply):
(khtml::InsertTextCommandImpl::doUnapply):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7182
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 3 Aug 2004 18:28:43 +0000 (18:28 +0000)]
Reviewed by Ken.
- added support for copying RegExp objects so 7 more Mozilla regexp tests pass
* kjs/regexp_object.cpp: (RegExpObjectImp::construct): Check for case where
we are supposed to just copy the regular expression object, and do so.
Also tighten up arguments check to handle case where an actual "undefined"
is passed rather than just omitting an argument.
* tests/mozilla/expected.html: Update results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7181
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 3 Aug 2004 18:09:44 +0000 (18:09 +0000)]
WebCore:
Reviewed by Ken.
- fixed <rdar://problem/3740937> ER: A way to turn a DOMRange into text (equivalent of -innerText)
* khtml/xml/dom2_rangeimpl.h: Added text function. Like innerText, but on a range.
* khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::text): Added.
* kwq/DOM.mm: (-[DOMRange _text]): Added. Calls DOM::RangeImpl::text.
* kwq/DOMPrivate.h: Added.
* WebCore.pbproj/project.pbxproj: Added DOMPrivate.h, an internal header (private in WebKit, internal here).
WebKit:
Reviewed by Ken.
- fixed <rdar://problem/3740937> ER: A way to turn a DOMRange into text (equivalent of -innerText)
* DOM.subproj/DOMPrivate.h: Added.
* WebKit.pbproj/project.pbxproj: Added DOMPrivate.h.
* copy-webcore-files-to-webkit: Added DOMPrivate.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7180
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 2 Aug 2004 23:49:02 +0000 (23:49 +0000)]
* tests/mozilla/.cvsignore: Added.
* tests/mozilla/expected.html: Update results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7179
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 2 Aug 2004 23:47:18 +0000 (23:47 +0000)]
Reviewed by Ken.
- fixed RegExp.toString so 3 more Mozilla regexp tests pass
* kjs/regexp_object.cpp: (RegExpProtoFuncImp::call):
Append the flags here so more tests paseed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7178
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 2 Aug 2004 23:43:26 +0000 (23:43 +0000)]
Fix the install path so that WebCore will build again in B&I. Looks like some changes to the project file were accidentally committed (I saw "INSTALL_PATH_MODIFIED_BY_SCRIPT_DO_NOT_COMMIT").
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7176
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 2 Aug 2004 23:38:57 +0000 (23:38 +0000)]
Reviewed by Ken.
- fixed a couple things making 5 Mozilla regexp tests pass
* kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): Implement toString
for the prototype.
(RegExpObjectImp::construct): Fix bug where the string "undefined" would
be used as the flags string when no parameter was passed.
* kjs/regexp_object.h: (KJS::RegExpPrototypeImp::classInfo):
Added a class info object for RegExp prototype so it can return
a string instead of raising an exception when converting to a string.
* tests/mozilla/expected.html: Update results.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7175
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 2 Aug 2004 22:31:00 +0000 (22:31 +0000)]
WebCore:
Reviewed by Darin.
WebCore part of fix for <rdar://problem/3631868> NSToolbar adoption:
Tab key should cycle around toolbar and page content
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge nextKeyViewInsideWebFrameViews]):
Made this method start looking from the current focus node. This won't
affect any existing callers because there were no existing callers.
(-[WebCoreBridge previousKeyViewInsideWebFrameViews]):
ditto
WebKit:
Reviewed by Darin.
WebKit part of fix for <rdar://problem/3631868> NSToolbar adoption:
Tab key should cycle around toolbar and page content
* WebView.subproj/WebHTMLView.m:
removed overrides of nextKeyView and previousKeyView
(-[WebHTMLView nextValidKeyView]):
call super only if we can't move the focus within the frame hierarchy
(-[WebHTMLView previousValidKeyView]):
ditto
* WebView.subproj/WebHTMLViewInternal.h:
removed nextKeyViewAccessShouldMoveFocus ivar
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7174
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 2 Aug 2004 22:15:10 +0000 (22:15 +0000)]
Create a #define for XSLT support that at the moment will only be enabled on Tiger.
Reviewed by kocienda
* WebCorePrefix.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7173
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 2 Aug 2004 21:44:42 +0000 (21:44 +0000)]
Reviewed by Kevin.
- fix crashes in mozilla tests due to mishandling NaN
* kjs/array_object.cpp: (ArrayProtoFuncImp::call): Rerranged range checks after
calls to toInteger so that NaN will get turned into something that fits in an integer.
These were the ones John already fixed, but his fix used isnan and the new fix is
more efficient.
* kjs/number_object.cpp: (NumberProtoFuncImp::call): Rearranged radix range checks
after a call to toInteger to handle NaN properly. Also removed separate check
for undefined that's not needed.
* kjs/string_object.cpp: (StringProtoFuncImp::call): More of the same kinds of changes
as in the above two files, but for a lot more functions. Also changed one place with
an explicit check for undefined to instead just check isNaN.
* tests/mozilla/run-mozilla-tests: Changed to invoke jst using $SYMROOTS for people
like me who don't keep $SYMROOTS in their $PATH.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7171
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 2 Aug 2004 18:38:57 +0000 (18:38 +0000)]
Tests:
Reviewed by John
Remove special code that placed the caret when the document loads.
This is now handled by WebKit in a more generalized way.
* Blot/Blot.xcode/project.pbxproj:
* Blot/BlotDocument.m:
(-[BlotDocument webView:didFinishLoadForFrame:]):
WebKit:
Reviewed by John
Update name of firstResponderIsSelfOrDescendantView, adding _web_ prefix to this SPI call.
Do some work to make caret blinking in newly-created editable WebView's that are
similar in structure to Blot more "automatic".
* Misc.subproj/WebNSViewExtras.h: Change name of firstResponderIsSelfOrDescendantView. Add _web_ prefix.
* Misc.subproj/WebNSViewExtras.m:
(-[NSView _web_firstResponderIsSelfOrDescendantView]): Name change.
(-[NSView _web_firstResponderCausesFocusDisplay]): Adds an additional check for whether the view's
is first responder. This helps to make the focus setting in viewDidMoveToWindow work right.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView updateFocusDisplay]): Use _web_firstResponderCausesFocusDisplay now instead of
firstResponderIsSelfOrDescendantView.
(-[WebHTMLView viewDidMoveToWindow]): Schedule call to updateFocusDisplay for the next crank of the
run loop. The reason is that placing the caret in the just-installed view requires the HTML/XML
document to be available on the WebCore side, but it is not at the time this code is running.
However, it will be there on the next crank of the run loop. Doing this helps to make a
blinking caret appear in a new, empty window "automatic".
(-[WebHTMLView performKeyEquivalent:]): _web_firstResponderIsSelfOrDescendantView name change.
* WebView.subproj/WebView.m:
(-[WebView _performResponderOperation:with:]): _web_firstResponderIsSelfOrDescendantView name change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7170
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 2 Aug 2004 18:04:45 +0000 (18:04 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3747945> Deleting replaced element can cause crash
* khtml/xml/dom_selection.cpp:
(DOM::Selection::layoutCaret): The crux of the problem is that
the caret drawing code tries to draw the caret at the image
offset after it has been removed from the document. So, make
sure the start node for the selection is in the document before
trying to lay out the caret using that node.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7169
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Sat, 31 Jul 2004 17:32:45 +0000 (17:32 +0000)]
Reviewed by John
<rdar://problem/3745498> HTMLCompose: Can't edit new empty message (and typing eventually crashes)
<rdar://problem/3746408> HTMLCompose: cannot type in message body of new messages (and tabbing causes a crash.)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setDisplaysWithFocusAttributes): Add in some smarts to look around for
a good place to put the caret if focus is turning "on", the part is contentEditable,
and it does not currently have a selection. This has the effect of flashing the caret
in a contentEditable view automatically without requiring the programmer to set a
selection explicitly. This also fixes the bug listed above. Both are cases where the
bad behavior happened since the editing code tried to process input without an active
selection. I always took the extra step of setting the selection explicitly when
opening new windows in programs like Blot, but it seems silly to require developers to
do this in general. With this patch, they no longer need to.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7168
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Sat, 31 Jul 2004 17:30:46 +0000 (17:30 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/3745498> HTMLCompose: Can't edit new empty message (and typing eventually crashes)
* khtml/xml/dom_selection.cpp:
(DOM::Selection::layoutCaret): Don't bail when the start position of the selection is not in rendered
content. The validate() bottleneck function will do all it can to make sure that the start is
moved to rendered content if at all possible before this function runs. If no rendered position can
be found, like in the case of an empty body element, we still want to flash the caret there.
(DOM::Selection::validate): Look for rendered positions for the base and extent, but save off the
base before making this move, and set the selection to the enclosing block flow element of this
original base if no rendered positions can be found. This has the effect of flashing the caret
someplace in an editable block, even if it does not contain any rendered content.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7167
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 30 Jul 2004 18:09:46 +0000 (18:09 +0000)]
Reviewed by John
Fix a large number of editing layout test regressions.
* khtml/misc/khtml_text_operations.cpp:
(khtml::TextIterator::TextIterator): Use a new way to compute the end offset of a node for
purposes of text iteration. The end offset is either child count of a node with children,
or the maxOffset() of a node that does not.
* khtml/xml/dom_nodeimpl.cpp: Remove maxOffset() implementation from NodeBaseImpl. This
conflicted with the usage of this function that is needed for editing.
* khtml/xml/dom_nodeimpl.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7164
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Fri, 30 Jul 2004 17:32:06 +0000 (17:32 +0000)]
Next steps for spell checking: We have data structures for the marked pieces of
text and the smarts to draw them (although at this point, they just get a green
underline instead of using the real AppKit pattern.)
Note we don't call this code outside of development, since at this point I suspect
it could be made to crash by mixing spelling and editing.
Reviewed by Ken.
* khtml/rendering/render_text.cpp:
(InlineTextBox::paintMarker): Paint one marker's intersection with a text run
(RenderText::paint): Find intersections of all markers and runs, call paintMarker
* khtml/rendering/render_text.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::addMarker): Adds a marker to a DOM Range.
(DocumentImpl::removeMarker): Removes a marker from a DOM Range.
(DocumentImpl::addMarker): Adds a marker to a single DOM Node, merging previous
markers as needed.
(DocumentImpl::removeMarker): Removes a marker from a single DOM Node, breaking
up previous markers as needed.
(DocumentImpl::markersForNode): Return markers for a Node.
* khtml/xml/dom_docimpl.h:
(DOM::DocumentMarker::): New marker struct
(DOM::DocumentMarker::operator == ):
(DOM::DocumentMarker::operator != ):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::advanceToNextMisspelling): Mark misspelled ranges when we find them.
Debug only for now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7163
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Fri, 30 Jul 2004 04:18:19 +0000 (04:18 +0000)]
Reviewed by John.
Added stubbed-out versions of all the NSTextInput protocol
methods, and put comments in places where we will need to call the
input manager to make input methods work 100%.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge respondToChangedSelection]):
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView mouseDown:]):
(-[WebHTMLView mouseDragged:]):
(-[WebHTMLView mouseUp:]):
(-[WebHTMLView _interceptEditingKeyEvent:]):
(-[WebHTMLView keyDown:]):
(-[WebHTMLView _selectionChanged]):
(-[WebHTMLView _delegateDragSourceActionMask]):
(-[WebHTMLView validAttributesForMarkedText]):
(-[WebHTMLView characterIndexForPoint:]):
(-[WebHTMLView firstRectForCharacterRange:]):
(-[WebHTMLView selectedRange]):
(-[WebHTMLView markedRange]):
(-[WebHTMLView attributedSubstringFromRange:]):
(-[WebHTMLView conversationIdentifier]):
(-[WebHTMLView hasMarkedText]):
(-[WebHTMLView unmarkText]):
(-[WebHTMLView setMarkedText:selectedRange:]):
(-[WebHTMLView doCommandBySelector:]):
(-[WebHTMLView insertText:]):
* WebView.subproj/WebHTMLViewInternal.h:
* WebView.subproj/WebView.m:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7160
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Fri, 30 Jul 2004 01:22:18 +0000 (01:22 +0000)]
Reviewed by Darin.
<rdar://problem/3745808> Seed: WebKit: Table's caption broken
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode): When a caption appears in an illegal
place in a table, pop blocks until we hit a place where it's
allowed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7158
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 29 Jul 2004 21:51:02 +0000 (21:51 +0000)]
155u, 2.0 for TOT. The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7157
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 29 Jul 2004 21:45:22 +0000 (21:45 +0000)]
Safari-154 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7155
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 29 Jul 2004 20:18:05 +0000 (20:18 +0000)]
Reviewed by Ken.
- fill in some unimplemented methods
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView moveToBeginningOfDocument:]): Implement, using new document granularity.
(-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]): Ditto.
(-[WebHTMLView moveToBeginningOfParagraph:]): Implement, even though the underlying WebCore
code is not yet implemented.
(-[WebHTMLView moveToBeginningOfParagraphAndModifySelection:]): Ditto.
(-[WebHTMLView moveToEndOfDocument:]): More of the same.
(-[WebHTMLView moveToEndOfDocumentAndModifySelection:]): Ditto.
(-[WebHTMLView moveToEndOfParagraph:]): More of the same.
(-[WebHTMLView moveToEndOfParagraphAndModifySelection:]): Ditto.
(-[WebHTMLView pageDown:]): Added comment describing desired behavior.
(-[WebHTMLView pageUp:]): Ditto.
(-[WebHTMLView copyFont:]): Ditto.
(-[WebHTMLView pasteFont:]): Ditto.
(-[WebHTMLView changeAttributes:]): Ditto.
(-[WebHTMLView indent:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7154
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 29 Jul 2004 20:04:08 +0000 (20:04 +0000)]
Reviewed by Ken.
- added constants for motion across entire document for use in operations like
move to beginning of document
* khtml/xml/dom_selection.h: Added DOCUMENT to ETextGranularity.
* khtml/xml/dom_selection.cpp:
(DOM::Selection::modifyExtendingRightForward): Added case for DOCUMENT.
(DOM::Selection::modifyMovingRightForward): Added case for DOCUMENT.
(DOM::Selection::modifyExtendingLeftBackward): Added case for DOCUMENT.
(DOM::Selection::modifyMovingLeftBackward): Added case for DOCUMENT.
(DOM::Selection::validate): Changed if statements into switch statement,
added case for DOCUMENT.
* kwq/WebCoreBridge.h: Added WebCoreBridge to WebSelectionGranularity.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7153
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Thu, 29 Jul 2004 18:06:34 +0000 (18:06 +0000)]
Small refinement of last checkin. The text iterators now return reasonable values
for range() when atEnd, which gets rid of special cases and pitfalls in the client.
Reviewed by Ken.
* khtml/misc/khtml_text_operations.cpp:
(khtml::TextIterator::TextIterator): Set endOffset to a valid value instead of
using LONG_MAX.
(khtml::TextIterator::range): Implement when atEnd.
(khtml::CharacterIterator::range): Don't massage result when atEnd.
(khtml::WordAwareIterator::WordAwareIterator): Now that this is fixed, we no
longer need this special case.
(khtml::WordAwareIterator::advance): Always set range, even when atEnd, now that
TextIterator::range() always works.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::childNodeCount): Made const
(NodeBaseImpl::maxOffset): Add missing implementation
* khtml/xml/dom_nodeimpl.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::advanceToNextMisspelling): Get rid of special cases, always call
range on our iterator even when it is atEnd.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7152
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Thu, 29 Jul 2004 00:09:19 +0000 (00:09 +0000)]
Fixed: <rdar://problem/3737864> Can not download image from web by using drag and drop
Reviewed by john.
* Misc.subproj/WebNSPasteboardExtras.m:
(-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]): On Tiger, to use NSFilesPromisePboardType with other pasteboard types, set the file types of the promise on the pasteboard as a property list instead of mucking with the NSFilePromiseDragSource class
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7151
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 28 Jul 2004 23:15:02 +0000 (23:15 +0000)]
Reviewed by John.
- avoid triggering an assertion when using dead keys (like option-e)
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView insertText:]): Don't pass zero-length strings to
WebCore. Dead-key input seems to insert empty strings as a side
effect.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7150
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 28 Jul 2004 22:46:21 +0000 (22:46 +0000)]
Reviewed by Trey.
<rdar://problem/3678534> controls on page at http://help.sap.com don't work properly
To fix this I implemented the various JavaScript BarInfo properties in JavaScript.
* khtml/ecma/kjs_window.cpp:
(Window::Window):
(Window::locationbar):
(Window::menubar):
(Window::personalbar):
(Window::statusbar):
(Window::toolbar):
(Window::scrollbars):
(Window::mark):
(Window::get):
(SelectionFunc::tryCall):
(BarInfo::BarInfo):
(BarInfo::~BarInfo):
(BarInfo::get):
(BarInfo::put):
* khtml/ecma/kjs_window.h:
(KJS::Window::):
(KJS::BarInfo::):
(KJS::BarInfo::part):
(KJS::BarInfo::classInfo):
* khtml/ecma/kjs_window.lut.h:
(KJS::):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::locationbarVisible):
(KWQKHTMLPart::menubarVisible):
(KWQKHTMLPart::personalbarVisible):
(KWQKHTMLPart::scrollbarsVisible):
(KWQKHTMLPart::statusbarVisible):
(KWQKHTMLPart::toolbarVisible):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7149
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 22:38:40 +0000 (22:38 +0000)]
Reviewed by me
Added more layout tests.
* layout-tests/editing/style/style-3681552-fix-001-expected.txt: Added.
* layout-tests/editing/style/style-3681552-fix-001.html: Added.
* layout-tests/editing/style/style-3681552-fix-002-expected.txt: Added.
* layout-tests/editing/style/style-3681552-fix-002.html: Added.
* layout-tests/editing/style/style-3690704-fix-expected.txt: Added.
* layout-tests/editing/style/style-3690704-fix.html: Added.
* layout-tests/editing/style/typing-style-001-expected.txt: Added.
* layout-tests/editing/style/typing-style-001.html: Added.
* layout-tests/editing/style/typing-style-002-expected.txt: Added.
* layout-tests/editing/style/typing-style-002.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7148
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 21:52:30 +0000 (21:52 +0000)]
Reviewed by me
Added some layout tests.
* layout-tests/editing/selection/select-all-001-expected.txt: Added.
* layout-tests/editing/selection/select-all-001.html: Added.
* layout-tests/editing/selection/select-all-002-expected.txt: Added.
* layout-tests/editing/selection/select-all-002.html: Added.
* layout-tests/editing/selection/select-all-003-expected.txt: Added.
* layout-tests/editing/selection/select-all-003.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7147
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Wed, 28 Jul 2004 21:24:47 +0000 (21:24 +0000)]
Tests:
Cut out unimplemented spelling methods. WebKit implements them.
Reviewed by Ken
* Blot/BlotDocument.h:
* Blot/BlotDocument.m:
WebCore:
Spellchecking, Part I. Basic spellcheck is working. Spelling panel is hooked up.
At this point, no special marking of misspellings, no grammar check, no context
menu integration, no "check continually" mode.
Much of the TextIterator and CharacterIterator interface got published outside
of khtml_text_operations.cpp, with a little API rationalizing.
Reviewed by Ken.
* khtml/misc/khtml_text_operations.cpp:
(khtml::TextIterator::range): Name changes.
(khtml::CharacterIterator::CharacterIterator): Ditto.
(khtml::CharacterIterator::range): Ditto.
(khtml::CharacterIterator::advance): Ditto.
(khtml::CharacterIterator::string): New method to consume chars into a string.
(khtml::WordAwareIterator::WordAwareIterator): New class that iterates over
the text respecting word boundaries.
(khtml::WordAwareIterator::advance):
(khtml::WordAwareIterator::length):
(khtml::WordAwareIterator::characters):
(khtml::plainText): Name changes.
(khtml::findPlainText): Ditto.
API moved from cpp to header file.
* khtml/misc/khtml_text_operations.h:
(khtml::TextIterator::atEnd):
(khtml::TextIterator::length):
(khtml::TextIterator::characters):
(khtml::CharacterIterator::atBreak):
(khtml::CharacterIterator::atEnd):
(khtml::CharacterIterator::length):
(khtml::CharacterIterator::characters):
(khtml::CharacterIterator::characterOffset):
(khtml::WordAwareIterator::atEnd):
(khtml::WordAwareIterator::range):
* khtml/xml/dom_position.cpp:
(DOM::Position::previousWordBoundary): New name for the old routine. This routines semantics
match the current behavior of this code.
(DOM::Position::nextWordBoundary): Ditto.
(DOM::Position::previousWordPosition): Call old code with the new name. When we fix
word advancement, this routine will have its own impl.
(DOM::Position::nextWordPosition): Ditto.
* khtml/xml/dom_position.h:
* khtml/xml/dom_selection.h:
(DOM::Selection::rangeStart): New convenience methods
(DOM::Selection::rangeEnd):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::findString): Ensure we use range-compatible positions.
(KWQKHTMLPart::advanceToNextMisspelling): Brand new.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge advanceToNextMisspelling]): Typical bridge glue.
WebKit:
Spellchecking, Part I. Basic spellcheck is working. Spelling panel is hooked up.
At this point, no special marking of misspellings, no grammar check, no context
menu integration, no "check continually" mode.
Reviewed by Ken.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge spellCheckerDocumentTag]): Typical bridge glue.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView validateUserInterfaceItem:]): Validate various spelling actions.
(-[WebHTMLView checkSpelling:]): Call WC for real work, update panel.
(-[WebHTMLView showGuessPanel:]): Show panel, call WC for real work.
(-[WebHTMLView _changeSpellingToWord:]): Apply correction to our doc.
(-[WebHTMLView changeSpelling:]): Simple pass through to above method.
(-[WebHTMLView ignoreSpelling:]): Tell checker to ignore the word.
* WebView.subproj/WebView.m:
(-[WebView _close]): Call AK's closeSpellDocumentWithTag: for proper cleanup.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7146
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 21:14:14 +0000 (21:14 +0000)]
Tools:
Reviewed by John
Added debugging summary output for CSSStyleDeclarationImpl
* LabyrinthDataFormatters/CustomDataViews.plist:
* LabyrinthDataFormatters/LabyrinthDataFormatters.cpp:
(LabyrinthDataFormatCSSStyleDeclarationImpl):
* LabyrinthDataFormatters/LabyrinthDataFormatters.h:
* LabyrinthDataFormatters/LabyrinthDataFormatters.xcode/project.pbxproj:
WebCore:
Reviewed by John
Export a couple more symbols for test programs.
* WebCore-combined.exp:
* WebCore-tests.exp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7145
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 28 Jul 2004 20:43:31 +0000 (20:43 +0000)]
We're changing the way color is specified as a parameter in the
<canvas> API. Colors are now specified using the CSS color
functions (or old style names or "#"). For example
'context.setStrokeColor ("rgba(128,128,128,0.5)")'. Most of the
patch is cleanup of duplicated code in cssparser.cpp and a new
static function that'll crank up the CSS parser to parse the
color. This patch leaves the old mechanisms in place for now, so
we don't break any existing gadgets.
Reviewed by John.
* WebCore.pbproj/project.pbxproj:
* khtml/css/cssparser.cpp:
(CSSParser::CSSParser):
(CSSParser::setupParser):
(CSSParser::parseSheet):
(CSSParser::parseRule):
(CSSParser::parseValue):
(CSSParser::parseColor):
(CSSParser::parseDeclaration):
* khtml/css/cssparser.h:
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
* kwq/KWQColor.h:
(QColor::alpha):
Added alpha() function to QColor, use instead of quirky
qAlpha() global function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7144
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 20:28:06 +0000 (20:28 +0000)]
Reviewed by Trey
Only apply the typing style if it is non-null and has a length.
This fixes a problem Trey noticed with my last checkin, where
typed characters were placed in empty "typing style" spans.
* khtml/editing/htmlediting_impl.cpp:
(khtml::InputNewlineCommandImpl::doApply)
(khtml::InputTextCommandImpl::prepareForTextInsertion)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7143
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 18:33:27 +0000 (18:33 +0000)]
Reviewed by Maciej
Fixed this bug:
<rdar://problem/3690704> marking partly bold text italic across blocks wrongly extends the bold section
* khtml/editing/htmlediting_impl.cpp:
(khtml::ApplyStyleCommandImpl::doApply): Fixed loop that gathers up groups of nodes to
pass off to the function that applies styles. While this is meant to be conservative in
order to leave the DOM well-formed in all cases, it contained an error where the set
of nodes to be styled together erroneously could include a node that was meant for
the next set. Fixed.
(khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Unrelated change to remove DOM:: scope
resolution qualifier. Unneeded here.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7137
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 28 Jul 2004 16:36:14 +0000 (16:36 +0000)]
Reviewed by Trey.
- fixed <rdar://problem/3658471> REGRESSION: Node.appendChild( ) fails when parent already contains that child
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::isAncestor): Restore the original meaning of this function.
It returns true if the parameter is an ancestor of this, but had been changed to return true if this
is an ancestor of the parameter. However, we do retain one change we made at the same time, which is
that it does not consider a node an ancestor of itself.
* khtml/editing/htmlediting_impl.cpp: (khtml::ApplyStyleCommandImpl::nodeFullySelected):
* khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeIteratorImpl::notifyBeforeNodeRemoval):
Reverse parameters for callers who wanted the new meaning of isAncestor, with care to not use it in
any cases where the pointer might be 0.
* khtml/xml/dom_nodeimpl.h: Added const to the parameter to make things more symmetric and allow the
new uses to all compile.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7136
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 28 Jul 2004 16:22:45 +0000 (16:22 +0000)]
Reviewed by Darin
Fix for this bug:
<rdar://problem/3681552> html editing needs to preserve typing font when replacing selection
* khtml/css/css_valueimpl.cpp:
(CSSStyleDeclarationImpl::merge): New helper that merges styles together. Helpful for
dealing with typing styles.
* khtml/css/css_valueimpl.h:
* khtml/editing/htmlediting_impl.cpp:
(khtml::DeleteSelectionCommandImpl::computeTypingStyle): New helper that updates the
typing style based on the current selection. This is a convenient bottleneck for all
the code that needs to worry about typing style.
(khtml::DeleteSelectionCommandImpl::doApply): Update typing style before doing the delete.
(khtml::InputNewlineCommandImpl::doApply): No need to redeclare exceptionCode local.
Improve comments.
(khtml::InputTextCommandImpl::prepareForTextInsertion): Remove unneeded complication when
figuring out where to insert style node. Not even sure what I was trying to do here, but
it does not seem to be needed any more.
(khtml::InputTextCommandImpl::execute): Remove unneeded comment.
* khtml/editing/htmlediting_impl.h: Declare new computeTypingStyle helper.
* khtml/khtml_part.cpp:
(KHTMLPart::setCaretVisible): Call selectionLayoutChanged instead of notifySelectionChanged
in this function. The selection did not change simply by calling this function, but it
does need a layout.
(KHTMLPart::notifySelectionChanged): Treat clearing the typing style much like closing typing,
instead of clearing it unconditionally.
(KHTMLPart::applyStyle): In the case where the current selection is a caret, merge the
style being applied with any current typing style that already exists.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7135
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 28 Jul 2004 15:45:53 +0000 (15:45 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/3711080> REGRESSION (125-146): form fields have shrunk by 1 pixel, and now clip descenders
* kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
Compute the size without ever calling cellSize. After talking with Andrew Platzer,
we decided that hard-coding the size of the borders of a text field was the best
way for WebCore to handle this.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7134
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 28 Jul 2004 14:45:03 +0000 (14:45 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/3743204> REGRESSION: crash at startribune.com in InlineBox::root()
* khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild):
Added a check for nil.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7133
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 28 Jul 2004 14:31:55 +0000 (14:31 +0000)]
Reviewed by Trey.
- fixed <rdar://problem/3743138> opaque colors come out of getComputedStyle as "rgba", transparent ones as "rgb"
* khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::cssText): Use "rgb" rather than
"rgba" when alpha is 0xFF, not when alpha is 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7132
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 27 Jul 2004 22:00:32 +0000 (22:00 +0000)]
Reviewed by Hyatt
Fixed the problem where BR elements on lines by themselves don't paint when selected.
* khtml/khtml_part.cpp:
(KHTMLPart::selectAll): Related fix. Include BR's when figuring out what "all" is.
* khtml/rendering/render_br.cpp:
(RenderBR::paint): New function implementation. Teach BR's how to paint selections.
* khtml/rendering/render_br.h:
* khtml/rendering/render_text.cpp:
(InlineTextBox::paintSelection): Fix some geometry calculations to be more readable (i.e. don't
reuse function argument as a local). Also, improve the logic for determining whether to
extend the selection to block boundaries.
(RenderText::paint): Remove extendSelection argument from paintSelection. The logic to figure out
extensions is now fully contained in paintSelection.
* khtml/rendering/render_text.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7131
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Tue, 27 Jul 2004 20:13:14 +0000 (20:13 +0000)]
WebKit:
Reviewed by Trey.
WebKit part of fix for <rdar://problem/3622268> Reload failed pages when a
network problem is corrected, inc. using Network Diagnostics
* WebView.subproj/WebFrame.m:
(-[WebFrame reload]):
This method did not handle unreachableURLs at all. The reason Safari's Reload
did work with unreachableURLs was that Safari does "reloadObeyingLocationField"
which never actually calls -[WebFrame reload]. Fixed by creating a fresh
request for the previously-unreachable URL.
WebBrowser:
Reviewed by Trey.
- part of fix for <rdar://problem/3622268> Reload failed pages when a network
problem is corrected, inc. using Network Diagnostics
We don't actually use Network Diagnostics yet, but we now react to network
configuration changes by reloading any error pages. Using Network Diagnostics
is the remaining part of 3622268.
* NetworkController.h: Added. New file, copied and simplified from Message project.
* NetworkController.m: Added. New file, copied and simplified from Message project.
(+[NetworkController sharedInstance]):
returns singleton instance
(-[NetworkController dealloc]):
release ivars
(-[NetworkController init]):
call _listenForNetworkChanges
(-[NetworkController _postNetworkChangeNotification:]):
post notification that network configuration changed
(_networkChangeCallBack):
call _postNetworkChangeNotification after a delay to coalesce multiple
SystemConfiguration callbacks
(_listenForNetworkChanges):
register with SystemConfiguration for network changes
* BrowserWebController.h:
new ivar _registeredForNetworkConfigurationChanges
* BrowserWebController.m:
(-[BrowserWebView dealloc]):
if registered for network config changes, remove appropriate observer
(-[BrowserWebView networkConfigurationDidChange:]):
reload main frame if it's showing an unreachable URL
(-[BrowserWebView showErrorPageForURL:withTitle:message:]):
register for network config changes if necessary
* WebBrowser.pbproj/project.pbxproj:
updated for new files and for including the SystemConfiguration framework
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7130
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 27 Jul 2004 17:47:40 +0000 (17:47 +0000)]
Fix for 3665211 (again). Make sure not to leave child line boxes pointing to deleted ancestor line boxes.
Reviewed by kocienda
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::removeChild):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7129
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 26 Jul 2004 23:25:19 +0000 (23:25 +0000)]
Fixed 3739737. When setting the focus to a NSView, set the focus
carbon focus to kControlIndicatorPart. kControlIndicatorPart is a
placeholder value for use to indicate that Cocoa has the focus.
Reviewed by Ken.
* Carbon.subproj/CarbonWindowAdapter.m:
(-[CarbonWindowAdapter makeFirstResponder:]):
* Carbon.subproj/HIWebView.m:
(Click):
(SetFocusPart):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7128
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 26 Jul 2004 23:13:48 +0000 (23:13 +0000)]
Fixed: WebView scrolls to the top after making an editing change via drag & drop
Fixed by Ken, reviewed by me.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge ensureCaretVisible]): do nothing if the selection is not a caret
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7127
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 26 Jul 2004 23:13:19 +0000 (23:13 +0000)]
Fixed: <rdar://problem/3689734> dragging to an editable WebView does not scroll document
Reviewed by rjw.
* WebView.subproj/WebView.m:
(-[WebView documentViewAtWindowPoint:]): new, factored from draggingDocumentViewAtWindowPoint:
(-[WebView _draggingDocumentViewAtWindowPoint:]): call documentViewAtWindowPoint:
(-[WebView _autoscrollForDraggingInfo:timeDelta:]): forward call to the document view
(-[WebView _shouldAutoscrollForDraggingInfo:]): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7126
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 26 Jul 2004 23:09:37 +0000 (23:09 +0000)]
change version number to 154u, 2.0
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7125
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 26 Jul 2004 23:01:13 +0000 (23:01 +0000)]
Safari-153 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7123
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Mon, 26 Jul 2004 22:45:51 +0000 (22:45 +0000)]
Reviewed by John.
<rdar://problem/3740855> REGRESSION: Flash incorrectly positioned at macromedia.com
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::scriptExecution): Do the prepending-src
trick as for inline script execution.
Added new layout tests covering this and other recent tokenizer
bugs.
* layout-tests/fast/tokenizer/001-expected.txt: Added.
* layout-tests/fast/tokenizer/001.html: Added.
* layout-tests/fast/tokenizer/002-expected.txt: Added.
* layout-tests/fast/tokenizer/002.html: Added.
* layout-tests/fast/tokenizer/003-expected.txt: Added.
* layout-tests/fast/tokenizer/003.html: Added.
* layout-tests/fast/tokenizer/resources/003-script.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7122
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Mon, 26 Jul 2004 22:31:54 +0000 (22:31 +0000)]
Changes done by Darin, reviewed by Kevin.
- changed testkjs to build in Xcode rather than from Makefile
* .cvsignore: Removed obsolete files from this list.
* Makefile.am: Removed code to build testkjs; we do this in Xcode now.
Changed to build target "All" rather than default target. This makes us
build the testkjs test tool.
* dummy.cpp: Removed.
* kjs/.cvsignore: Removed obsolete files from this list, including
the testkjs tool, which is now built in the symroots directory.
* kjs/testkjs.cpp: Added copyright notice that was missing, since we have
changed this file. Also this has the nice side effect of causing the tool
to be rebuilt in the new location even if there are no other changes in
your tree when you check this out.
* tests/mozilla/run-mozilla-tests: Invoke perl explicitly so this works
without setting the execute bit on jsDriver.pl.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7121
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 23 Jul 2004 23:17:24 +0000 (23:17 +0000)]
WebCore:
Reviewed by Trey
Fix for this bug:
<rdar://problem/3738920> Caret blinks in inactive window
As part of the fix, I cleaned up the way we handle special drawing that needs
to be done in the HTML view that is first responder in the key window (e.g the
drawing of text selection highlight and caret blinking).
* khtml/khtml_part.cpp: Removed setCaretVisible function. Updating caret visibility
is now done in setDisplaysWithFocusAttributes, described below.
* khtml/khtml_part.h: Ditto.
* khtml/khtmlpart_p.h:
(KHTMLPartPrivate::KHTMLPartPrivate): m_caretVisible now defaults to false. This prevents
the caret from blinking when an app is started from the command line and remains in the
background.
* khtml/khtmlview.cpp:
(KHTMLView::focusInEvent): Remove caret code from here. Not needed.
(KHTMLView::focusOutEvent): Ditto.
* kwq/KWQKHTMLPart.h:
(KWQKHTMLPart::displaysWithFocusAttributes): New accessor to return cached value to other code
in WebCore.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart):
(KWQKHTMLPart::setDisplaysWithFocusAttributes): Renamed from setShowsFirstResponder and modified
to do the display updating in a clearer way....and now has comments!
* kwq/WebCoreBridge.h: Remove several obsolete functions that use to try to do the work of the new
setDisplaysWithFocusAttributes function (and did so less well).
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:]): Now calls displaysWithFocusAttributes to figure out how to draw the
text selection background.
(-[WebCoreBridge setDisplaysWithFocusAttributes:]): Calls through to setDisplaysWithFocusAttributes in
KWQKHTMLPart.
(-[WebCoreBridge selectionColor]): Flipped the value of this ternary expression to accommodate the
change from usesInactiveTextBackgroundColor to setDisplaysWithFocusAttributes.
(-[WebCoreBridge setCaretVisible:]): Removed.
WebKit:
Reviewed by Trey
Fix for this bug:
<rdar://problem/3738920> Caret blinks in inactive window
As part of the fix, I cleaned up the way we handle special drawing that needs
to be done in the HTML view that is first responder in the key window (e.g the
drawing of text selection highlight and caret blinking).
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView updateFocusDisplay]): New method that centralizes the changes
we need to make when the first responder-ness of the view or key-ness of the
window changes.
(-[WebHTMLView viewDidMoveToWindow]): Call new updateFocusDisplay helper.
(-[WebHTMLView windowDidBecomeKey:]): Ditto.
(-[WebHTMLView windowDidResignKey:]): Ditto.
(-[WebHTMLView becomeFirstResponder]): Ditto.
(-[WebHTMLView resignFirstResponder]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7116
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Fri, 23 Jul 2004 21:42:11 +0000 (21:42 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
now also extends selection (even if there wasn't one before)
* khtml/khtml_part.cpp:
(KHTMLPart::handleMousePressEventSingleClick):
Uh, duh. Got a ! wrong last time somehow, so it did even more the wrong thing
than ever. I did test this before, so my best guess is an accidental undo or
something before committing.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7115
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 23 Jul 2004 17:58:01 +0000 (17:58 +0000)]
Fix for 3735084 and 3737209, when you can find no line boxes in your previous sibling, the line box to dirty
should be the *first* line box and not the last.
Reviewed by kocienda
* khtml/rendering/render_flow.cpp:
(RenderFlow::dirtyLinesFromChangedChild):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7114
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 23 Jul 2004 16:16:27 +0000 (16:16 +0000)]
Reviewed by John
* khtml/xml/dom_selection.cpp:
(DOM::Selection::validate): Not exactly a fix of anything per se, but more of a refinement
of how selection validation works. The idea is to let the selection validation process
end up with an empty selection given real DOM position inputs if the validation code
cannot find a rendered position. Since selection is all about display, this makes sense.
Currently, the code will allow the selection to be placed in a location that is not
rendered, and this does nobody any good, as it can lead to bugs like accepting key input
in a div that is set to display:none.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7110
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 23 Jul 2004 14:39:45 +0000 (14:39 +0000)]
Reviewed by me
Updated layout tests with new expected results.
* layout-tests/editing/execCommand/boldSelection-expected.txt
* layout-tests/editing/selection/extend-by-character-001-expected.txt
* layout-tests/editing/selection/extend-by-character-003-expected.txt
* layout-tests/editing/selection/unrendered-005-expected.txt
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7109
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Fri, 23 Jul 2004 07:25:13 +0000 (07:25 +0000)]
Reviewed by Kevin.
<rdar://problem/3725467> REGRESSION(140-142) nothing displayed at http://Ye-Olde-Movies.tripod.com
<rdar://problem/3599494> REGRESSION (100-125): Frame does not refresh until user clicks on browser.
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::layout): When returning early because there are
no children, make sure to mark self as no longer needing
layout. Otherwise, when children are added, we'll fail to
propagate childrenNeedLayout to our own parent! This is almost
certainly a long-standing bug that was just masked by our old
layout tomfoolery.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7108
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Thu, 22 Jul 2004 23:43:29 +0000 (23:43 +0000)]
Reviewed by Darin
Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).
* khtml/ecma/kjs_events.cpp:
(JSLazyEventListener::JSLazyEventListener):
(JSLazyEventListener::parseCode):
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::createHTMLEventHandler):
* khtml/ecma/kjs_window.cpp:
(Window::getJSLazyEventListener):
* khtml/ecma/kjs_window.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7106
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Thu, 22 Jul 2004 23:30:52 +0000 (23:30 +0000)]
Reviewed by Darin
Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).
* kjs/function_object.cpp:
(FunctionObjectImp::construct):
* kjs/function_object.h:
* kjs/object.cpp:
(KJS::ObjectImp::construct):
* kjs/object.h:
(KJS::Object::construct):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7105
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 22 Jul 2004 23:04:39 +0000 (23:04 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3724344> Bolding and unbolding creates extraneous tags
* khtml/editing/htmlediting_impl.cpp:
(khtml::ApplyStyleCommandImpl::doApply): Move the start of the selection upstream
before calling removeStyle. This makes sure we remove all styles that could apply to the
selection, and not just ones in from the start position of the selection passed to us.
This fixes the bug.
* khtml/xml/dom_selection.cpp:
(DOM::Selection::validate): Related fix to "constrain" the selection to be the
smallest equivalent range of nodes, in effect making a "canonical" version of the
selection. While this is not strictly necessary to fix the bug, it is a step I have been
wanting to take this step for a long time, and some recent improvements made it
possible for me to do now in just two lines of code.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7104
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 22 Jul 2004 22:41:05 +0000 (22:41 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3711264> difficult (impossible?) to get cursor in an editable webview containing only tags
* khtml/rendering/render_container.cpp:
(RenderContainer::positionForCoordinates): Don't assume you can pass off
the check to a first child if there is one, since the child can be an element
we do not want to place the caret in, like a table row with no cells (the case
in the bug above). So now, we iterate of the renderer's children looking for
the closest one, but only consider those renderers which either have children
themselves, or are render block flows or are render inlines.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7101
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 22 Jul 2004 22:26:11 +0000 (22:26 +0000)]
- remove a bunch of now-unused code
* ForwardingHeaders/qxml.h: Removed.
* kwq/KWQXmlAttributes.h: Removed.
* kwq/KWQXmlAttributes.mm: Removed.
* kwq/KWQXmlDefaultHandler.h: Removed.
* kwq/KWQXmlDefaultHandler.mm: Removed.
* kwq/KWQXmlSimpleReader.h: Removed.
* kwq/KWQXmlSimpleReader.mm: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7099
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 22 Jul 2004 22:14:06 +0000 (22:14 +0000)]
* Plugins.subproj/npruntime.h: Update with new version from newer JavaScriptCore.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7098
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 22 Jul 2004 20:50:10 +0000 (20:50 +0000)]
Reviewed by Dave.
- got rid of QXml classes and changed XML parsing to use libxml directly
This is the first step toward more direct use of libxml and libxslt.
Dave is planning to build on this to implement XSLT and to improve our handling
of XML documents (faster and more feature complete, including DTDs).
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment):
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::HTMLTokenizer):
* khtml/html/htmltokenizer.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createTokenizer):
(DocumentImpl::open):
* khtml/xml/dom_docimpl.h:
(DOM::DocumentImpl::tokenizer):
* khtml/xml/dom_xmlimpl.cpp:
(DOM::ProcessingInstructionImpl::checkStyleSheet):
* khtml/xml/dom_xmlimpl.h:
* khtml/xml/xml_tokenizer.h:
* khtml/xml/xml_tokenizer.cpp: Redid this all to use libxml directly.
* WebCore.pbproj/project.pbxproj: Removed a bunch of files.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7094
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Thu, 22 Jul 2004 16:37:38 +0000 (16:37 +0000)]
DHTML dragging should use UTI for MIME-pboard type conversion
Reviewed by NOBODY (OOPS!).
* kwq/KWQClipboard.mm:
(cocoaTypeFromMIMEType): Use UTI, except for cases we need to hardwire. Only cut off
MIME args following a semi-colon for text/plain.
(MIMETypeFromCocoaType): Use UTI, except for cases we need to hardwire.
(KWQClipboard::types): Filter out ancient NSAsciiPboardType so DHTML never sees this cruft.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7088
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 22 Jul 2004 14:56:53 +0000 (14:56 +0000)]
WebCore:
Reviewed by Trey
Remove handling of HTML editing key events from WebCore.
This now happens in WebKit if an event passes all the
way through WebCore without being handled by the DOM.
In each case below, function were removed, as their
only purpose was to handle editing key events.
* khtml/xml/dom_elementimpl.cpp
* khtml/xml/dom_elementimpl.h
* kwq/KWQKHTMLPart.h
* kwq/KWQKHTMLPart.mm
* kwq/WebCoreBridge.h
WebKit:
Reviewed by Trey
* WebCoreSupport.subproj/WebBridge.m: Remove interceptEditingKeyEvent
bridge call over. This method of handling editing key events is now
obsolete.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView performKeyEquivalent:]): Send key event over to the
DOM if this view is or contains the first responder. This now
happens unconditionally.
(-[WebHTMLView keyDown:]): Send key event to the DOM, then see if
the web view wants to interpret it an an editing key event. This
is the new place to intercept key events for editing.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7087
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 21 Jul 2004 18:42:33 +0000 (18:42 +0000)]
WebCore:
Reviewed by John
* khtml/xml/dom_selection.cpp:
(DOM::Selection::modifyExtendingRightForward): Add LINE_BOUNDARY case to the switch statement in this
function. Use the startAndEndLineNodesIncludingNode helper which already existed to get the right
position.
(DOM::Selection::modifyMovingRightForward): Ditto
(DOM::Selection::modifyExtendingLeftBackward): Ditto
(DOM::Selection::modifyMovingLeftBackward): Ditto
* khtml/xml/dom_selection.h:
(DOM::Selection::): Add LINE_BOUNDARY constant to ETextGranularity enum. This
specifies a new kind of movement that we need to implement the "move-to beggining/end of line"
behavior which AppKit binds to cmd+left/right arrow keys.
* kwq/WebCoreBridge.h: Add WebSelectToLineBoundary constant. This matches
WebKit:
Reviewed by John
Add implementations for these methods. Formerly, they logged an error.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView moveToBeginningOfLine:]):
(-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
(-[WebHTMLView moveToEndOfLine:]):
(-[WebHTMLView moveToEndOfLineAndModifySelection:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7086
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 21 Jul 2004 17:47:53 +0000 (17:47 +0000)]
Reviewed by John
Added some more handlers for standard Cocoa key bindings.
These are "secrets" of NSText, meaning they are not public API, but we choose to mimic.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView moveToBeginningOfDocumentAndModifySelection:]):
(-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
(-[WebHTMLView moveToBeginningOfParagraphAndModifySelection:]):
(-[WebHTMLView moveToEndOfDocumentAndModifySelection:]):
(-[WebHTMLView moveToEndOfLineAndModifySelection:]):
(-[WebHTMLView moveToEndOfParagraph:]):
(-[WebHTMLView moveToEndOfParagraphAndModifySelection:]):
* WebView.subproj/WebView.h: Add these declarations to the comment in the header listing
the responder-like methods we support.
* WebView.subproj/WebView.m:
(-[WebView moveToBeginningOfParagraphAndModifySelection:]):
(-[WebView moveToEndOfParagraphAndModifySelection:]):
(-[WebView moveToBeginningOfLineAndModifySelection:]):
(-[WebView moveToEndOfLineAndModifySelection:]):
(-[WebView moveToBeginningOfDocumentAndModifySelection:]):
(-[WebView moveToEndOfDocumentAndModifySelection:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7085
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 21 Jul 2004 16:09:00 +0000 (16:09 +0000)]
* bindings/npruntime.h: Fixed typo.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7084
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 20 Jul 2004 23:52:56 +0000 (23:52 +0000)]
Fix for 3714434, user stylesheet is always parsed in strict mode, when it should honor the document's setting.
Reviewed by john
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::CSSStyleSelector):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7081
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 20 Jul 2004 23:32:08 +0000 (23:32 +0000)]
WebCore:
Reviewed by Richard
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::defaultEventHandler): No longer check whether
the command key is modifying the key event. This check is
now done elsewhere in the code. See the WebKit checkin that
added the _web_keyBindingManagerHasBinding method to
WebNSEventExtras.
WebKit:
Reviewed by Richard
* Misc.subproj/WebNSEventExtras.h: Added helper that returns whether
a key event has a binding in the key binding manager.
* Misc.subproj/WebNSEventExtras.m:
(-[NSEvent _web_keyBindingManagerHasBinding]): New helper mentioned above.
* Plugins.subproj/npruntime.h:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView performKeyEquivalent:]): Add a check of whether the key event
has a binding in the key binding manager. This works around the fact that
NSResponder's interpretKeyEvents does not return a value telling whether
or not the key was handled. This now makes it possible for us to trap
modified key events we know we can handle (like those command-key + arrow events
used for text navigation), while letting all others pass.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7077
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 20 Jul 2004 22:27:27 +0000 (22:27 +0000)]
WebCore:
Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu
Reviewed by john.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway
WebKit:
Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu
Reviewed by john.
* WebView.subproj/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides "Copy Image"
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): don't drag an image with an actual image
(-[WebHTMLView _mayStartDragAtEventLocation:]): ditto
WebBrowser:
Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu
Reviewed by john.
* ContextMenuHandler.m:
(-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides copy and save menu items.
* WebBrowser.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 20 Jul 2004 22:11:53 +0000 (22:11 +0000)]
Reduced size of error images which affects test and fixed alt scaling bugs.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 20 Jul 2004 21:58:28 +0000 (21:58 +0000)]
Reviewed by Chris.
<rdar://problem/3721690> REGRESSION (125.7-148u) clicking on links at macosx.apple.com/Builds does not load new page in frame
* Plugins.subproj/npruntime.h:
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge canTargetLoadInFrame:]): Don't apply the restrictions to frames
that are in the same window (Mozilla does this too).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 20 Jul 2004 21:54:13 +0000 (21:54 +0000)]
Fix for alt text not working on images.
Reviewed by john
* khtml/rendering/render_image.cpp:
(RenderImage::RenderImage):
(RenderImage::setPixmap):
(RenderImage::paint):
(RenderImage::calcReplacedWidth):
(RenderImage::calcReplacedHeight):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7069
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 20 Jul 2004 20:45:22 +0000 (20:45 +0000)]
Reviewed by Dave.
<rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
(khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
active prependingSrc variable on the stack, the better to handle weird cases
of scripts writing out additional script tags and so forth.
(khtml::HTMLTokenizer::write): Deal with the above.
* khtml/html/htmltokenizer.h: Declare new member field.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 20 Jul 2004 20:41:44 +0000 (20:41 +0000)]
Fix for 3728558. Fixed the key event handling in the carbon/cocoa
integration code. This does not fix the arrow keys not working on
initial focus problem also mentioned in the bug.
Bumped the version of the NP function structures.
Reviewed by John.
* Carbon.subproj/CarbonUtils.m:
(WebInitForCarbon):
(PoolCleaner):
* Carbon.subproj/HIWebView.m:
(OwningWindowChanged):
(WindowHandler):
* Plugins.subproj/npapi.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7067
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 20 Jul 2004 20:39:14 +0000 (20:39 +0000)]
Add overflow test and fix rss test to not be rss.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7066
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 20 Jul 2004 20:35:21 +0000 (20:35 +0000)]
Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
elements.
Reviewed by john
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7065
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Tue, 20 Jul 2004 19:05:41 +0000 (19:05 +0000)]
3733698 REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion
Relax an assertion, as we ran into a valid case where it's not true.
Reviewed by Chris.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Removing this assert allows for the oddball case of a drag gesture that
starts on one element, but then the element is no longer there when
the drag is about to start.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7064
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
trey [Tue, 20 Jul 2004 18:56:37 +0000 (18:56 +0000)]
3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
A subtle problem stemming from some interaction between focus handing and
event propagation. We previously made it so when a focus shift fails we
don't propagate the event to KHTML. The fix is to get rid of the inverse
effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
the page already canceled default behavior.
In this specific case, the page is cancelling default behavior since it
does its own dragging, and the bug was our new system dragging was
kicking in.
Reviewed by Ken.
* khtml/khtmlview.cpp:
(KHTMLView::dispatchMouseEvent): What he said.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7063
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 20 Jul 2004 18:06:24 +0000 (18:06 +0000)]
Reviewed by Darin
Fix for this bug:
<rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
line endings into BR elements.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 20 Jul 2004 15:38:14 +0000 (15:38 +0000)]
WebCore:
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
* khtml/khtml_part.cpp:
(KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
on the caret, this seems like a better name.
* khtml/khtml_part.h:
* khtml/khtmlview.cpp:
(KHTMLView::focusInEvent): Call setCaretVisible(true)
(KHTMLView::focusOutEvent): Call setCaretVisible(false)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
* kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setCaretVisible:]): Ditto.
WebKit:
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView setCaretVisible:]): New helper. Calls over bridge to do the work.
(-[WebHTMLView windowDidBecomeKey:]): This function cannot just assume that self is first responder
(and do things like adjusting text background color and restoring focus rings).
First-responder-ness needs to be checked first. Now it is.
(-[WebHTMLView windowDidResignKey:]): Ditto.
(-[WebHTMLView becomeFirstResponder]): Call new helper to make caret visible.
(-[WebHTMLView resignFirstResponder]): Call new helper to make caret invisible.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 20 Jul 2004 08:12:08 +0000 (08:12 +0000)]
Reviewed by Trey.
<rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)
* khtml/misc/stringit.h:
(khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
stableUnicode() method to get the unicode pointer.
* kwq/KWQString.h:
* kwq/KWQString.mm:
(QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
It does not leave around a zombie internal data handle but rather destroys it right away,
and leaves the object pointing to the new handle (which it can then deref). This makes
the code more clear.
(QString::~QString): Simplify.
(QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
is internal to a string besides this one. This guarantees that if you get the unicode()
pointer, it won't go bad so long as this string is still alive.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7060
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 19 Jul 2004 23:43:54 +0000 (23:43 +0000)]
Reviewed by Maciej.
- bulletproofed array.slice() against NAN arguments. Harri noticed this
vulnerability in my patch for 3714644
* kjs/array_object.cpp:
(ArrayProtoFuncImp::call):
handle NAN parameters passed to slice() by clamping to 0 and length.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7059
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 19 Jul 2004 23:34:41 +0000 (23:34 +0000)]
*** empty log message ***
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7058
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 19 Jul 2004 23:33:50 +0000 (23:33 +0000)]
Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and fix an n-squared removal
bug. Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
make node removal more efficient.
Reviewed by kocienda
* khtml/xml/dom_nodeimpl.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7057
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 19 Jul 2004 22:40:57 +0000 (22:40 +0000)]
Reviewed by Trey.
- fixed <rdar://problem/3141150> can't undo in form textarea fields
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]):
call setAllowsUndo:YES. My, wasn't this easy?
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 19 Jul 2004 22:32:48 +0000 (22:32 +0000)]
Fixed 3733349. Prevent Java applet callbacks into JavaScript after applet
has been destroyed.
Reviewed by John.
* bindings/jni/jni_jsobject.cpp:
(JSObject::invoke):
(JSObject::JSObject):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7055
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 19 Jul 2004 22:32:15 +0000 (22:32 +0000)]
Fixed 3721917. The RealPlayer plugin doesn't support the new
NPPVpluginScriptableNPObject variable passed to NPP_GetValue and
incorrectly returns NPERR_NO_ERROR. We interpret this to the
mean the variable has been set. The variable has not been set
and will consequently be uninitialized.
Reviewed by NOBODY (OOPS!).
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView pluginScriptableObject]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7054
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 19 Jul 2004 21:50:40 +0000 (21:50 +0000)]
Merge @import fix for CSS1 test suite from Stephan Kulow.
Reviewed by hyatt
* khtml/css/parser.cpp:
* khtml/css/parser.y:
* layout-tests/css1/basic/containment-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 19 Jul 2004 21:40:43 +0000 (21:40 +0000)]
Fix for 3718697, crash clicking on JS tab at alaskaair.com.
Reviewed by kocienda
* khtml/rendering/render_flow.cpp:
(RenderFlow::detach):
(RenderFlow::dirtyLinesFromChangedChild):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.cpp:
(RenderObject::dirtyLinesFromChangedChild):
* khtml/rendering/render_object.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7052
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 19 Jul 2004 20:58:08 +0000 (20:58 +0000)]
Reviewed by Richard
Fix for this bug:
<rdar://problem/3707504> HTMLCompose: key events are stolen by Web(HTML)View
* Misc.subproj/WebNSViewExtras.h:
* Misc.subproj/WebNSViewExtras.m:
(-[NSView firstResponderIsSelfOrDescendantView]): New helper to
(-[WebHTMLView performKeyEquivalent:]): Do not pass key events through to the editing
key handler unless the WebHTMLView is first responder or contains the first responder.
This prevents the "stealing" of key events mentioned in the bug.
* WebView.subproj/WebView.m:
(-[WebView _performResponderOperation:with:]): Uses the new firstResponderIsSelfOrDescendantView
helper. The code I replaced used the same logic as the new helper.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Fri, 16 Jul 2004 22:56:24 +0000 (22:56 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link
hangs browser with javascript
* kjs/array_object.cpp:
(ArrayProtoFuncImp::call):
Check for undefined type for args[0] the same way we were already checking
for args[1]. In this case, args was zero-length, but we were treating
args[0] like an integer anyway. Resulted in some code looping from a NAN
value to 4, taking approximately forever.
* JavaScriptCore.pbproj/project.pbxproj:
version wars
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7047
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 16 Jul 2004 22:20:35 +0000 (22:20 +0000)]
Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
relies on it. The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
will be up-to-date.
Reviewed by john
* khtml/khtmlview.cpp:
(KHTMLView::layout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7046
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 16 Jul 2004 21:19:18 +0000 (21:19 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))
* khtml/editing/htmlediting_impl.cpp:
(khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
more robust. I do not understand how Grant ended up with null start or end
blocks in the case of his bug report, but by adding two null checks, the code is
now hardened a bit in case it happens again.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7043
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 16 Jul 2004 21:14:17 +0000 (21:14 +0000)]
Reviewed by Hyatt
Fix for these bugs:
<rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
<rdar://problem/3730790> Caret does not blink when placed in empty table cell
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
don't block the painting of the caret in this case. This was the case in 3730790.
We had the right geometry for the caret but blocked its painting.
* khtml/xml/dom_position.cpp:
(DOM::Position::previousLinePosition): Rework the logic here. This function asserted
that the new position we would navigate to had a line box, but empty table cells, for
instance will not. So, deal with this situation as well. The end result is a
function that worked like it did before in cases where the previous line position has
a line box, but now also will allow navigation to work when it does not.
(DOM::Position::nextLinePosition): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7042
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 16 Jul 2004 20:37:56 +0000 (20:37 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3687216> editable inline causes crash when focused
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
(DocumentImpl::acceptsEditingFocus): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7041
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 16 Jul 2004 20:25:03 +0000 (20:25 +0000)]
Return Panther baseline to layout tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7040
268f45cc-cd09-0410-ab3c-
d52691b4dbfc