mjs [Wed, 8 Dec 2004 22:54:45 +0000 (22:54 +0000)]
Reviewed by Darin.
<rdar://problem/
3908017> REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com)
The fix was to implement copy constructor and assignment operator,
the ones that worked on the base class did not replace the
defaults apparently!
* kjs/protect.h:
(KJS::ProtectedValue::ProtectedValue):
(KJS::ProtectedValue::operator=):
(KJS::ProtectedObject::ProtectedObject):
(KJS::ProtectedObject::operator=):
Also fixed a bug in the GC test mode that compares the results of
the old collector and the new collector.
* kjs/value.cpp:
(ValueImp::mark):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8158
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 8 Dec 2004 21:58:18 +0000 (21:58 +0000)]
Removed NPN wrappers since these no longer need to be defined to make the QT plug-in work
since
3828925 has been fixed.
Reviewed by john.
* Plugins.subproj/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage load]): use under-bar symbols since non-under-bar wrappers have been removed
* Plugins.subproj/npapi.m: removed NPN wrappers
* WebKit.exp: removed symbols
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8157
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 8 Dec 2004 16:30:23 +0000 (16:30 +0000)]
Reviewed by Darin
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView drawRect:]): Work around for this bug:
<rdar://problem/
3908282> REGRESSION (Mail): No drag image dragging selected text in Blot and Mail
The reason for the workaround is that this method is called explicitly from the code
to generate a drag image, and at that time, getRectsBeingDrawn:count: will return a zero count.
This code change uses the passed-in rect when the count is zero.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8156
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 8 Dec 2004 00:27:09 +0000 (00:27 +0000)]
WebKit:
Support for fix for:
<rdar://problem/
3734309> Safari doesn't open folders in title bar menu with non-Roman names using Cmd+click
Reviewed by john.
* Misc.subproj/WebNSURLExtras.h:
* Misc.subproj/WebNSURLExtras.m:
(+[NSURL _web_URLWithUserTypedString:relativeToURL:]): renamed to take relativeToURL parameter
(+[NSURL _web_URLWithUserTypedString:]): call _web_URLWithUserTypedString:relativeToURL: with nil for URL
WebBrowser:
Fixed: <rdar://problem/
3734309> Safari doesn't open folders in title bar menu with non-Roman names using Cmd+click
Reviewed by john.
* TitleBarButton.m:
(-[TitleBarButton showPathRepresentingPopUpMenu]): use _web_URLWithUserTypedString:: since the path returned by [NSURL path] is of the "user typed" variety
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8155
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 7 Dec 2004 23:39:07 +0000 (23:39 +0000)]
Fixed <rdar://problem/
3905564> REGRESSION (Tiger); in History menu, pixel size appears but is wrong for standalone images in Safari.
Reviewed by Chris.
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageRenderer size]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8154
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 7 Dec 2004 23:06:24 +0000 (23:06 +0000)]
WebCore:
Support threaded image decoding on machines w/ > 2 CPUs.
Reviewed by Maciej and Chris.
* khtml/misc/loader.cpp:
(CachedImageCallback::notifyUpdate):
(CachedImageCallback::notifyFinished):
(CachedImageCallback::notifyDecodingError):
(CachedImageCallback::handleError):
(CachedImageCallback::clear):
(CachedImage::CachedImage):
(CachedImage::clear):
(CachedImage::data):
(CachedImage::checkNotify):
(Loader::servePendingRequests):
(Loader::slotFinished):
(Loader::numRequests):
(Loader::cancelRequests):
(Loader::removeBackgroundDecodingRequest):
* khtml/misc/loader.h:
(khtml::CachedImageCallback::CachedImageCallback):
(khtml::CachedImageCallback::ref):
(khtml::CachedImageCallback::deref):
(khtml::CachedImage::decoderCallback):
* khtml/rendering/render_object.cpp:
(RenderObject::setPixmap):
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(-[WebImageCallback initWithCallback:khtml::]):
(-[WebImageCallback _commonTermination]):
(-[WebImageCallback dealloc]):
(-[WebImageCallback finalize]):
(-[WebImageCallback notify]):
(-[WebImageCallback setImageSourceStatus:]):
(-[WebImageCallback status]):
(QPixmap::shouldUseThreadedDecoding):
(QPixmap::receivedData):
* kwq/WebCoreImageRenderer.h:
* kwq/WebCoreImageRendererFactory.h:
* kwq/WebCoreImageRendererFactory.m:
(+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
(+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]):
WebKit:
Support threaded image decoding on machines w/ > 2 CPUs.
Reviewed by Maciej and Chris.
* Misc.subproj/WebKitSystemBits.h:
* Misc.subproj/WebKitSystemBits.m:
(WebSystemMainMemory):
(WebNumberOfCPUs):
* WebCoreSupport.subproj/WebImageData.h:
* WebCoreSupport.subproj/WebImageData.m:
(+[WebImageData initialize]):
(-[WebImageData init]):
(-[WebImageData _commonTermination]):
(-[WebImageData dealloc]):
(-[WebImageData _invalidateImages]):
(-[WebImageData _imageSourceOptions]):
(-[WebImageData imageAtIndex:]):
(-[WebImageData propertiesAtIndex:]):
(-[WebImageData _createImages]):
(-[WebImageData decodeData:isComplete:callback:]):
(-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
(drawPattern):
(-[WebImageData tileInRect:fromPoint:context:]):
(-[WebImageData isNull]):
(-[WebImageData size]):
(-[WebImageData _frameDurationAt:]):
(-[WebImageData _frameDuration]):
(+[WebImageData stopAnimationsInView:]):
(-[WebImageData addAnimatingRenderer:inView:]):
(-[WebImageData removeAnimatingRenderer:]):
* WebCoreSupport.subproj/WebImageDecodeItem.h: Added.
* WebCoreSupport.subproj/WebImageDecodeItem.m: Added.
(+[WebImageDecodeItem decodeItemWithImage:data:isComplete:callback:]):
(-[WebImageDecodeItem initWithImage:data:isComplete:callback:]):
(-[WebImageDecodeItem finalize]):
(-[WebImageDecodeItem dealloc]):
* WebCoreSupport.subproj/WebImageDecoder.h: Added.
* WebCoreSupport.subproj/WebImageDecoder.m: Added.
(decoderNotifications):
(+[WebImageDecoder initialize]):
(+[WebImageDecoder notifyMainThread]):
(+[WebImageDecoder sharedDecoder]):
(+[WebImageDecoder performDecodeWithImage:data:isComplete:callback:]):
(+[WebImageDecoder imageDecodesPending]):
(+[WebImageDecoder decodeComplete:status:]):
(-[WebImageDecoder init]):
(-[WebImageDecoder dealloc]):
(-[WebImageDecoder finalize]):
(-[WebImageDecoder removeItem]):
(-[WebImageDecoder addItem:]):
(-[WebImageDecoder decodeItem:]):
(decoderThread):
(startDecoderThread):
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageRenderer initWithData:MIMEType:]):
(-[WebImageRenderer initWithContentsOfFile:]):
(-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
(-[WebInternalImage incrementalLoadWithBytes:length:complete:callback:]):
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebImageRepresentation.m:
(-[WebImageRepresentation receivedData:withDataSource:]):
(-[WebImageRepresentation receivedError:withDataSource:]):
(-[WebImageRepresentation finishedLoadingWithDataSource:]):
WebBrowser:
Added a menu item to enable/disable threaded image decoding.
Reviewed by Maciej and Chris.
* Debug/DebugUtilities.m:
(-[DebugUtilities createDebugMenu]):
(-[BrowserDocument toggleUseATSUForAllTextDrawing:]):
(-[BrowserDocument toggleUseThreadedImageDecoding:]):
(-[BrowserDocument validate_toggleUseThreadedImageDecoding:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8153
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 7 Dec 2004 20:46:29 +0000 (20:46 +0000)]
Fix for performance regression.
Reviewed by kevin.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge objectLoadedFromCacheWithURL:response:data:]): construct the WebResource without copying the data
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8152
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 7 Dec 2004 20:05:21 +0000 (20:05 +0000)]
Fixed: <rdar://problem/
3909243> REGRESSION: large standalone images stop loading part way through
Reviewed by kevin.
* WebView.subproj/WebBaseResourceHandleDelegate.h:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient addData:]): call super so it buffers the data
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8151
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 7 Dec 2004 19:01:44 +0000 (19:01 +0000)]
Fix my NOBODY (OOPS!). John reviewed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8150
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 7 Dec 2004 18:13:22 +0000 (18:13 +0000)]
Reviewed by NOBODY (OOPS!).
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Fix a problem with my
change in thei code yesterday. Call to insertBlockPlaceholderIfNeeded() must be done
after new block has been inserted, otherwise a crash can result. Shuffle down call
to insertBlockPlaceholderIfNeeded() a couple of lines (where the node is inserted),
and all is good.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8149
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 7 Dec 2004 18:01:01 +0000 (18:01 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3907422> REGRESSION (Mail): Pasting quoted content can place content after body element
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): Detect when the body element is the "reference block" used
for determining the location for inserting content. Do not allow an insert before or after if the
reference block is the body. Perform insertNodeAt(0) and appendNode, respectively, in the block-is-body case.
* layout-tests/editing/inserting/insert-
3907422-fix-expected.txt: Added.
* layout-tests/editing/inserting/insert-
3907422-fix.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8148
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 7 Dec 2004 17:45:31 +0000 (17:45 +0000)]
Reviewed by Don.
- fixed <rdar://problem/
3908701> REGRESSION: Cursor does not change to "hand" over active links
* kwq/KWQEvent.mm: (positionForEvent): Add NSMouseMoved to list of events that have mouse location.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8147
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 7 Dec 2004 17:02:11 +0000 (17:02 +0000)]
Reviewed by John
Changed name of constant from KHTMLInterchangeNewline to AppleInterchangeNewline.
I discussed this with Hyatt and he agreed that going with "Apple" names was OK.
* khtml/editing/html_interchange.h: Name change, as described above.
* khtml/editing/htmlediting.cpp:
(khtml::ReplacementFragment::isInterchangeNewlineComment): Ditto.
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::RangeImpl::toHTML): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8146
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 7 Dec 2004 15:09:33 +0000 (15:09 +0000)]
Reviewed by me
Added a couple more layout tests.
* layout-tests/editing/deleting/delete-line-013-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-013.html: Added.
* layout-tests/editing/deleting/delete-line-014-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-014.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8145
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 7 Dec 2004 04:11:36 +0000 (04:11 +0000)]
Use the AppKit's font rendering mode. This fixes
3905347, but we still need to track down
and resolve why metrics have changed for Courier. This may be caused by changes in
AppKit for
3902394.
Reviewed by John.
* WebCoreSupport.subproj/WebTextRenderer.m:
(_AppkitGetCGRenderingMode):
(getUncachedWidth):
(_drawGlyphs):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8144
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 7 Dec 2004 02:26:24 +0000 (02:26 +0000)]
Reviewed by Hyatt.
- fixed <rdar://problem/
3906974> assertion failure in QWidget::beforeMouseDown clicking on <select multiple>
* kwq/KWQListBox.mm:
(QListBox::QListBox): Initialize KWQListBoxScrollView with this.
(-[KWQListBoxScrollView initWithListBox:]): Make this class a KWQWidgetHolder.
(-[KWQListBoxScrollView widget]): See above.
(-[KWQTableView mouseDown:]): Pass outerView rather than self to beforeMouseDown and
afterMouseDown, to avoid triggering an assertion failure.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8143
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 7 Dec 2004 02:09:56 +0000 (02:09 +0000)]
Add table test to cover the document.write line layout bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8142
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 7 Dec 2004 02:09:10 +0000 (02:09 +0000)]
Fix for
3615411, the linesAppended optimization was old and broken, and it's easier with the new code fixes
made by me, kocienda and harrison to just remove it.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/rendering/render_block.cpp:
(khtml:::RenderFlow):
* khtml/rendering/render_block.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::dirtyLinesFromChangedChild):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8141
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 7 Dec 2004 01:36:23 +0000 (01:36 +0000)]
Fix for
3787133, some web pages print with many blank pages. Make sure to use the real page print rect and
not a damage rect that can be changed when intersected with the clip regions of the web page.
Reviewed by john
* khtml/rendering/render_canvas.h:
(khtml::RenderCanvas::printRect):
(khtml::RenderCanvas::setPrintRect):
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLines):
* khtml/rendering/render_list.cpp:
(RenderListMarker::paint):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::adjustPageHeight):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8140
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 7 Dec 2004 00:47:11 +0000 (00:47 +0000)]
Forgot to commit copied header.
* DOM.subproj/DOMPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8139
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Tue, 7 Dec 2004 00:45:22 +0000 (00:45 +0000)]
Reviewed by Ken Kocienda and Dave Hyatt (OOPS!).
<rdar://problem/
3849947> Typing after pasting line does not appear until after window resize.
* khtml/rendering/render_flow.cpp:
(RenderFlow::dirtyLinesFromChangedChild):
Dirty the line above because new child can inval the cached line break position of previous line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8138
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 7 Dec 2004 00:34:02 +0000 (00:34 +0000)]
Fix for
3254464, radio buttons do not work for quiz on netscape.com. Left/top overflow needed to be implemented.
This also fixes
3106907, link hover color only partially set on rollover and the more general architecture bug
3126929, handle top/left overflow.
This patch also fixes
3902891, scroll bar of position:fixed content moves when a page is scrolled.
Finally, the Emerson regression
3869718 (error involving computing the rightmost/lowest position of overflow:auto
regions and web pages) has been fixed.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::computeHorizontalPositionsForLine):
(khtml::RenderBlock::checkLinesForOverflow):
* khtml/rendering/render_block.cpp:
(khtml:::RenderFlow):
(khtml::RenderBlock::overflowHeight):
(khtml::RenderBlock::overflowWidth):
(khtml::RenderBlock::overflowLeft):
(khtml::RenderBlock::overflowTop):
(khtml::RenderBlock::overflowRect):
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::layoutBlockChildren):
(khtml::RenderBlock::paint):
(khtml::RenderBlock::floatRect):
(khtml::RenderBlock::lowestPosition):
(khtml::RenderBlock::rightmostPosition):
(khtml::RenderBlock::leftmostPosition):
(khtml::RenderBlock::nodeAtPoint):
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.h:
(khtml::RenderBox::borderBox):
(khtml::RenderBox::borderTopExtra):
(khtml::RenderBox::borderBottomExtra):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paintScrollbars):
(mustExamineRenderer):
(RenderLayer::intersectsDamageRect):
(RenderLayer::containsPoint):
* khtml/rendering/render_line.cpp:
(khtml::InlineFlowBox::placeBoxesHorizontally):
(khtml::InlineFlowBox::verticallyAlignBoxes):
* khtml/rendering/render_line.h:
(khtml::InlineBox::leftOverflow):
(khtml::InlineBox::rightOverflow):
(khtml::InlineFlowBox::setVerticalOverflowPositions):
(khtml::RootInlineBox::RootInlineBox):
(khtml::RootInlineBox::leftOverflow):
(khtml::RootInlineBox::rightOverflow):
(khtml::RootInlineBox::setVerticalOverflowPositions):
(khtml::RootInlineBox::setHorizontalOverflowPositions):
* khtml/rendering/render_object.h:
(khtml::RenderObject::borderBox):
(khtml::RenderObject::overflowLeft):
(khtml::RenderObject::overflowTop):
(khtml::RenderObject::overflowRect):
(khtml::RenderObject::floatRect):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
(RenderTable::paint):
(RenderTable::paintBoxDecorations):
(RenderTable::calcMinMaxWidth):
* khtml/rendering/render_table.h:
(khtml::RenderTableCell::borderTopExtra):
(khtml::RenderTableCell::borderBottomExtra):
* kwq/KWQRect.h:
* kwq/KWQRect.mm:
(QRect::inflate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8137
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 7 Dec 2004 00:24:21 +0000 (00:24 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3903797> scripts can cause other frames/windows to execute arbitrary script using javascript: URLs
I changed all unprotected places that can navigate a different
window or frame from script to check for a javascript: URL, and if
found, to check for safety using cross-site-script rules.
I considered a few other possible exploits and made no change:
- document.location is already protected because the document
object itself is protected
- frame.src, frame.location, iframe.src and targetted links are
all safe because setting the URL of a frame to a javascript: URL
executes the script in the context of the parent
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
(Location::put):
(LocationFunc::tryCall):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8136
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 6 Dec 2004 23:57:52 +0000 (23:57 +0000)]
Reviewed by Maciej
Fix for this bug:
<rdar://problem/
3890955> 8A314: Forward delete sometimes fails to delete the selected quoted text
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fixed bonehead coding mistake in the
check for one of the special cases being checked for in this function. The specific case
intends to check for a selection that is only a <br> after a block ends (as in </div><br>). If it
sees such markup, it deletes only the <br> and bails. However, this code would run in *any*
case where a selection ended in a <br> after a block and would not delete any part of the
selection preceding the <br>. Bad. I have tightened the check to see that only a <br> is
selected.
Fixing the bug above was accomplished with an additional call to DOM::Position::downstream. This
new use of the function exposed this bug:
<rdar://problem/
3907666> Incorrectly coded loop in Position::downstream can lead to infinite loop
* khtml/xml/dom_position.cpp:
(DOM::Position::downstream): I am ashamed of my first cut at this. Rewrote the loop so it does
not have this fatal flaw. It is a much better design as well.
* layout-tests/editing/deleting/delete-
3800834-fix-expected.txt: Changes made this test
have what I consider to be a better result. Going with it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8135
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 6 Dec 2004 23:39:15 +0000 (23:39 +0000)]
Fixed: <rdar://problem/
3871718> REGRESSION (125-168): text marked bold with font that does not have bold variant copies as non-bold
Reviewed by hyatt.
* kwq/DOM.mm:
(-[DOMElement _font]): new SPI for AppKit
* kwq/DOMPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8134
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 6 Dec 2004 22:59:04 +0000 (22:59 +0000)]
Bump version number to 173.1. We're doing a dot submission today for <rdar://problem/
3903749>.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8132
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 6 Dec 2004 22:20:29 +0000 (22:20 +0000)]
Fixed: <rdar://problem/
3907381> NSURLConnection and WebKit buffer 2 copies of incoming data
Reviewed by darin.
* WebView.subproj/WebBaseResourceHandleDelegate.h:
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(+[WebBaseResourceHandleDelegate initialize]): cache check to see if Foundation supports access to its buffered data
(-[WebBaseResourceHandleDelegate addData:]): don't buffer data if Foundation is buffering it for us
(-[WebBaseResourceHandleDelegate saveResource]): when creating a WebResource, pass NO for copyData since we know it won't be mutated
(-[WebBaseResourceHandleDelegate resourceData]): return the buffered data from the connection if it supports it
(-[WebBaseResourceHandleDelegate willStopBufferingData:]): make a mutable copy of the data from NSURLConnection so we can continue buffering
(-[WebBaseResourceHandleDelegate willCacheResponse:]): removed optimization that used the cached response data to save the resource since that is obsolete by this change
(-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): new callback from NSURLConnection, informs us that NSURLConnection has given up buffering
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _receivedData:]): removed buffering code since that's done by NSURLConnection and the main client
(-[WebDataSource _setData:]): removed unnecessary cast since the resourceData ivar is now an NSData instead of NSMutableData
(-[WebDataSource data]): return resourceData ivar, else return the resourceData from the main client
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient releaseResources]): store resourceData on the data source so it can continue to have data after the main client has gone away
(-[WebMainResourceClient connection:didReceiveData:lengthReceived:]):don't call [dataSource data] just to get the length of data received since [dataSource data] can now cause data to be copied
(-[WebMainResourceClient connectionDidFinishLoading:]): ditto
* WebView.subproj/WebResource.m:
(-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call following method with YES for copyData
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:copyData:]): new initializer, allows caller to choose whether or not the data is copied
* WebView.subproj/WebResourcePrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8131
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 6 Dec 2004 21:49:50 +0000 (21:49 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/
3906327> Select All of a large document is slow (>15 secs on my machine for attached specimen)
* kwq/KWQScrollView.mm: (QScrollView::updateContents): Intersect with visibleRect before calling through
to NSView to dirty; NSView could also be more efficient in this case (I filed
3906343).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8130
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 6 Dec 2004 21:09:19 +0000 (21:09 +0000)]
Fixed <rdar://problem/
3903749> REGRESSION (8A321): WebKit gets incorrect glyph metrics due to change in how AppKit uses CGFont
Use CGFontRef direction when both getting font metrics and drawing
glyphs, instead on depending on [NSFont set].
Reviewed by John.
* WebCoreSupport.subproj/WebTextRenderer.m:
(getUncachedWidth):
(_drawGlyphs):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8129
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 6 Dec 2004 19:48:37 +0000 (19:48 +0000)]
Darin found what appears to be the real leak that we were falsely blaming
on the 'leaks' tool (
3880245). I made the change, and ran layout tests and PLT to make
sure nothing barfed.
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
call clearProperties() instead of just setting numParsedProperties to 0
(CSSParser::parseDeclaration):
ditto
(CSSParser::createStyleDeclaration):
ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8128
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 6 Dec 2004 18:38:56 +0000 (18:38 +0000)]
Reviewed by me
New layout tests.
* layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-001.html: Added.
* layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-002.html: Added.
* layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-003.html: Added.
* layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-004.html: Added.
* layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-005.html: Added.
* layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-006.html: Added.
* layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-007.html: Added.
* layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-008.html: Added.
* layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-009.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8127
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 6 Dec 2004 18:21:29 +0000 (18:21 +0000)]
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3906948> REGRESSION (Mail): Insert paragraph code can make the insertion point "stick" in place.
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply): Call insertBlockPlaceholderIfNeeded(), passing block
being added to this function. This ensures that the added block has a height.
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8126
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 6 Dec 2004 18:21:21 +0000 (18:21 +0000)]
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3906930> Hitting return key in editable content inserts br elements instead of blocks
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView insertNewline:]): One-line change to call insert-block rather than insert-br method
on bridge.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8125
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 6 Dec 2004 17:39:44 +0000 (17:39 +0000)]
Reviewed by John
* khtml/dom/dom_string.cpp:
(DOM::DOMString::substring): Expose method already on DOMStrimgImpl.
* khtml/dom/dom_string.h: Ditto.
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::rebalanceWhitespace): New helper to create and execute a
RebalanceWhitespaceCommand instance.
(khtml::DeleteSelectionCommand::doApply): Call rebalanceWhitespace() after running command.
(khtml::InsertLineBreakCommand::doApply): Ditto.
(khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
(khtml::InsertTextCommand::input): Ditto.
(khtml::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): New command.
(khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand): Ditto.
(khtml::RebalanceWhitespaceCommand::doApply): Ditto.
(khtml::RebalanceWhitespaceCommand::doUnapply): Ditto.
(khtml::RebalanceWhitespaceCommand::preservesTypingStyle): Ditto.
(khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
* khtml/editing/htmlediting.h: Ditto.
(khtml::RebalanceWhitespaceCommand::): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8124
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 5 Dec 2004 20:40:25 +0000 (20:40 +0000)]
- fixed small problem in my check-in from yesterday
* kwq/KWQEvent.mm:
(positionForEvent): Get location from event without raising exception if it's the wrong type.
(clickCountForEvent): Same, for clickCount.
(QMouseEvent::QMouseEvent): Use the new helper functions so this can be constructed even with
the wrong type of NSEvent. Required for cases where a keyboard event causes a "click" and we need
to synthesize a QMouseEvent for KHTML internal use, using the key down NSEvent.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8123
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 4 Dec 2004 22:31:12 +0000 (22:31 +0000)]
WebCore:
Reviewed by John.
- fixed <rdar://problem/
3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes
* khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position
attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence.
Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first.
- fixed <rdar://problem/
3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set
* khtml/rendering/render_form.h: Remove unused RenderFormElement fields.
* khtml/rendering/render_form.cpp:
(RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields.
(RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than
creating it with all the flags set to 0, using the new QMouseEvent constructor that does so.
* kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit.
Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere.
Added a fixState helper method so the constructors can save code.
* kwq/KWQEvent.mm:
(QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors
and added a third constructor that uses the "current event" from AppKit (used above).
(QMouseEvent::fixState): Compute state and click count based on event type.
- fixed first symptom of <rdar://problem/
3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com
* kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when
the family name is a null string. This prevents the crash, but there are still other problems that may have the same
underlying cause in CSS.
- fixed <rdar://problem/
3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
* khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument):
Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression.
WebKit:
Reviewed by John.
- fixed <rdar://problem/
3846079> assertion failure in WebHTMLView(WebPrivate) removeTrackingRect at boots.com
- fixed <rdar://problem/
3857737> REGRESSION (165-166): clicking in a text field that's scrolled to the right causes it to scroll all the way left
- fixed <rdar://problem/
3861952> REGRESSION (165-166): selection is cleared when you start to scroll a frame
* WebView.subproj/WebHTMLViewInternal.h: Added handlingMouseDown flag.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Allow passing in a
tracking number of 0, which means no existing tracking number.
(-[WebHTMLView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Ditto.
(-[WebHTMLView removeTrackingRect:]): Allow removing a tracking number of 0, which is a no-op.
(-[WebHTMLView _removeTrackingRects:count:]): Ditto.
(-[WebHTMLView acceptsFirstResponder]): Changed check to use handlingMouseDown flag instead of mouseDownEvent
field since that field is set up too early in the mouse down event handling process.
(-[WebHTMLView mouseDown:]): Added code to set handlingMouseDown flag.
- fixed part of <rdar://problem/
3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
Changed code around so that it won't try to create a WebResource when the load fails.
- moved next/previous links into private structure with the rest of WebFrame fields
(We have a rule against putting new fields into obejcts that are part of our public API.)
* WebView.subproj/WebFrame.h: Remove _nextSibling and _previousSibling.
* WebView.subproj/WebFramePrivate.h: Added nextSibling and previousSibling fields to private class.
* WebView.subproj/WebFrame.m: Got rid of some tabs in this file.
(-[WebFrame _addChild:]): Changed code to use fields inside _private.
(-[WebFrame _removeChild:]): Ditto.
(-[WebFrame _nextFrameWithWrap:]): Ditto.
(-[WebFrame _previousFrameWithWrap:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8122
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Sat, 4 Dec 2004 18:37:32 +0000 (18:37 +0000)]
WebCore:
New fixes for:
<rdar://problem/
3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/
3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
<rdar://problem/
3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
<rdar://problem/
3902749> REGRESSION (Tiger): missing image symbol does not appear
Reviewed by darin, rjw, kocienda.
* khtml/misc/loader.cpp:
(CachedObject::~CachedObject):
(CachedCSSStyleSheet::checkNotify):
(Loader::servePendingRequests):
(Loader::slotFinished):
(Loader::slotReceivedResponse):
(Cache::requestImage):
(Cache::requestScript):
* khtml/misc/loader.h:
(khtml::CachedObject::CachedObject):
(khtml::CachedObject::response):
(khtml::CachedObject::allData):
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJobPrivate::TransferJobPrivate):
(KIO::TransferJobPrivate::~TransferJobPrivate):
(KIO::TransferJob::TransferJob):
(KIO::TransferJob::assembleResponseHeaders):
(KIO::TransferJob::retrieveCharset):
(KIO::TransferJob::emitResult):
(KIO::TransferJob::emitReceivedResponse):
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQHeaderStringFromDictionary):
(KWQCheckCacheObjectStatus):
(KWQIsResponseURLEqualToURL):
(KWQResponseURL):
(KWQResponseMIMEType):
(KWQCacheObjectExpiresTime):
(khtml::CachedObject::setResponse):
(khtml::CachedObject::setAllData):
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(QPixmap::QPixmap):
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader finishJobAndHandle:]):
(-[KWQResourceLoader cancel]):
(-[KWQResourceLoader reportError]):
(-[KWQResourceLoader finishWithData:]):
* kwq/KWQSignal.h:
* kwq/KWQSignal.mm:
(KWQSignal::call):
* kwq/KWQSlot.h:
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
* kwq/WebCoreBridge.h:
* kwq/WebCoreResourceLoader.h:
WebKit:
New fixes for:
<rdar://problem/
3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/
3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
<rdar://problem/
3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
<rdar://problem/
3902749> REGRESSION (Tiger): missing image symbol does not appear
Reviewed by darin, rjw, kocienda.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient didFinishLoading]):
* WebView.subproj/WebFrame.m:
(-[WebFrame _opened]):
(-[WebFrame _internalLoadDelegate]):
(-[WebFrame _sendResourceLoadDelegateMessagesForURL:response:length:]):
* WebView.subproj/WebFrameInternal.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8121
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 4 Dec 2004 18:30:50 +0000 (18:30 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3876093> REGRESSION (166-167): Setting slider control's value from JavaScript has no effect (breaks RSS)
* khtml/rendering/render_form.cpp:
(RenderSlider::updateFromElement): Call setValue to update the value of the DOM element rather than
modifying the m_value data member directly. We don't use m_value at all for sliders now, and in fact
the code relies on the fact that m_value is null. Setting m_value to a non-null value was causing the bug.
(RenderSlider::slotSliderValueChanged): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8120
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 4 Dec 2004 15:31:47 +0000 (15:31 +0000)]
Reviewed by Maciej.
- fixed remaining bit of <rdar://problem/
3814237> REGRESSION (Mail): Copy/paste style does not set color in Mail compose window
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView _styleFromFontAttributes:]): When translating from
an attribute dictionary to a CSS declaration, treat missing values according to the defaults defined
in <AppKit/NSAttributedString.h>. Before the code was treating them as "no change", which is incorrect.
* English.lproj/StringsNotToBeLocalized.txt: Add a string from the above change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8119
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Sat, 4 Dec 2004 01:56:05 +0000 (01:56 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3889411> REGRESSION (125-172): repro crash in
khtml::BackgroundLayer::cullEmptyLayers
* khtml/rendering/render_style.cpp:
(BackgroundLayer::cullEmptyLayers):
added missing nil check
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8118
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 4 Dec 2004 01:54:19 +0000 (01:54 +0000)]
versioning for TOT, Safari 2.0 (v173+)
The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8117
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 4 Dec 2004 01:42:53 +0000 (01:42 +0000)]
Safari-173 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8115
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 3 Dec 2004 22:53:05 +0000 (22:53 +0000)]
WebCore:
Reviewed by me
Roll out some recent changes by Chris that caused a performance regression.
Fix is in hand, but it is a little risky this close to a submission. So,
we have decided to roll back the change with the regression and roll in
the new code after we submit.
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/misc/htmlattrs.c:
(hash_attr):
(findAttr):
* khtml/misc/htmltags.c:
(hash_tag):
(findTag):
* khtml/misc/loader.cpp:
(CachedObject::~CachedObject):
(CachedObject::setResponse):
(CachedCSSStyleSheet::checkNotify):
(Loader::servePendingRequests):
(Loader::slotFinished):
(Loader::slotReceivedResponse):
(Cache::requestImage):
(Cache::requestScript):
* khtml/misc/loader.h:
(khtml::CachedObject::CachedObject):
(khtml::CachedObject::response):
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJobPrivate::TransferJobPrivate):
(KIO::TransferJobPrivate::~TransferJobPrivate):
(KIO::TransferJob::TransferJob):
(KIO::TransferJob::assembleResponseHeaders):
(KIO::TransferJob::retrieveCharset):
(KIO::TransferJob::emitResult):
(KIO::TransferJob::emitReceivedResponse):
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQHeaderStringFromDictionary):
(KWQCheckCacheObjectStatus):
(KWQRetainResponse):
(KWQReleaseResponse):
(KWQIsResponseURLEqualToURL):
(KWQResponseURL):
(KWQResponseMIMEType):
(KWQResponseTextEncodingName):
(KWQResponseHeaderString):
(KWQCacheObjectExpiresTime):
(KWQLoader::KWQLoader):
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(QPixmap::QPixmap):
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader finishJobAndHandle]):
(-[KWQResourceLoader cancel]):
(-[KWQResourceLoader reportError]):
(-[KWQResourceLoader finish]):
* kwq/KWQSignal.h:
* kwq/KWQSignal.mm:
(KWQSignal::call):
* kwq/KWQSlot.h:
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
* kwq/WebCoreBridge.h:
* kwq/WebCoreResourceLoader.h:
WebKit:
Reviewed by me
Roll out some recent changes by Chris that caused a performance regression.
Fix is in hand, but it is a little risky this close to a submission. So,
we have decided to roll back the change with the regression and roll in
the new code after we submit.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge objectLoadedFromCacheWithURL:response:size:]):
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient didFinishLoading]):
* WebView.subproj/WebFrame.m:
(-[WebFrame _opened]):
(-[WebFrame _internalLoadDelegate]):
* WebView.subproj/WebFrameInternal.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8114
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Fri, 3 Dec 2004 22:01:22 +0000 (22:01 +0000)]
Vicki gave me special dispensation to check this in though the tree is closed.
Reviewed by Chris.
- fixed <rdar://problem/
3903990> can't tab to all items on www.google.com any more (other pages too?)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrameHierarchy):
when checking whether we moved the focus to another view, make sure we didn't "move" it to
our documentView, because that's no move at all.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8113
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 3 Dec 2004 21:01:53 +0000 (21:01 +0000)]
Reviewed by Vicki.
- fixed <rdar://problem/
3901109> REGRESSION (171-172): repro crash in DOM::NodeImpl::setChanged at chick-fil-a.com
* khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl):
Added missing initialization for base class and node pointer.
- fixed a few places that could leave dangling node pointers
* khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::~HTMLBodyElementImpl):
Clear out the node pointer when the node is destroyed.
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::~HTMLElementImpl): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8112
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 3 Dec 2004 20:06:42 +0000 (20:06 +0000)]
Fix for performance regression. My original patch added a signal for passing the data of a resource to its WebCore cache object. This patch passes the data with the preexisting "finished" symbol so we make less calls.
Fixed: <rdar://problem/
3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
Reviewed by rjw.
* khtml/misc/loader.cpp:
(Loader::servePendingRequests): pass data param to slotFinished, removed allData signal
(Loader::slotFinished): take data param
* khtml/misc/loader.h:
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJob::TransferJob): have m_result take a data param, removed m_allData
(KIO::TransferJob::emitResult): take data param and pass it
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader finishJobAndHandle:]): take data param and pass it
(-[KWQResourceLoader cancel]): pass nil for data
(-[KWQResourceLoader reportError]): ditto
(-[KWQResourceLoader finishWithData:]): pass data
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): pass data param to slotFinished
(KWQSlot::call): added support for slotFinished_Loader, removed slotAllData
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8111
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 3 Dec 2004 18:57:29 +0000 (18:57 +0000)]
Reviewed by John
Did some clean up in the Position class as a result of trying to write some new layout
tests and discovering a bug along the way.
I removed these three functions from the Position class:
1. bool isFirstRenderedPositionOnLine() const;
2. bool isLastRenderedPositionOnLine() const;
3. static bool renderersOnDifferentLine(RenderObject *r1, long o1, RenderObject *r2, long o2);
4. bool inFirstEditableInRootEditableElement() const;
The first two have replacements in the VisiblePosition class, and some code has been
moved to use these new variants. The third function was a helper used only by these
first two function, and can be removed as well. The fourth function was not used by anyone.
* khtml/editing/htmlediting.cpp:
(khtml::InsertTextCommand::input): Change over to use VisiblePosition isFirstVisiblePositionOnLine().
* khtml/editing/visible_position.cpp:
(khtml::visiblePositionsOnDifferentLines): Added an additional check for blocks to this function.
Incorrect results were being returned when asking about positions at the starts of blocks.
* khtml/xml/dom_position.cpp:
(DOM::Position::previousCharacterPosition): Change over to use VisiblePosition isFirstVisiblePositionOnLine().
(DOM::Position::nextCharacterPosition): Change over to use VisiblePosition isLastVisiblePositionOnLine().
(DOM::Position::rendersInDifferentPosition): Removed use of #3 helper in a log message. We can live without it.
* khtml/xml/dom_position.h: Update header for deletions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8110
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 3 Dec 2004 17:31:30 +0000 (17:31 +0000)]
Reviewed by John
Terminology change in execCommand command identifiers. Specifically, the name of
"InsertNewline" command has been changed to "InsertLineBreak". This matches the
terminology used by AppKit. It is also more accurate, since the insertion of a
"br" element is what the command does. The inspiration for this change is so the
-insertNewline AppKit method can be mapped to insert a new "div" element in
a document and avoid ambiguity with what the javascript editing command does.
* khtml/editing/jsediting.cpp
* layout-tests/editing/deleting/delete-tab-004.html
* layout-tests/editing/editing.js
* layout-tests/editing/inserting/insert-
3654864-fix.html
* layout-tests/editing/inserting/insert-
3659587-fix.html
* layout-tests/editing/inserting/insert-
3775316-fix.html
* layout-tests/editing/inserting/insert-
3800346-fix.html
* layout-tests/editing/inserting/insert-br-001.html
* layout-tests/editing/inserting/insert-br-002.html
* layout-tests/editing/inserting/insert-br-003.html
* layout-tests/editing/inserting/insert-br-004.html
* layout-tests/editing/inserting/insert-br-005.html
* layout-tests/editing/inserting/insert-br-006.html
* layout-tests/editing/inserting/insert-br-007.html
* layout-tests/editing/inserting/insert-br-008.html
* layout-tests/editing/inserting/insert-tab-004.html
* layout-tests/editing/inserting/insert-text-with-newlines.html
* layout-tests/editing/pasteboard/paste-text-010.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8109
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 3 Dec 2004 00:33:24 +0000 (00:33 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3786362> REGRESSION (Mail): pasted text loses one newline
* khtml/editing/htmlediting.cpp:
(khtml::InsertLineBreakCommand::doApply): Added check for strict mode before adding an extra br element
at the end of a block. This is only necessary in quirks mode. Also, lower-case "br" used to make element.
(khtml::ReplaceSelectionCommand::doApply): If the replacement adds a br element as the last element
in a block and the document is in quirks mode, add an additional br to make the one in the
replacement content show up. This turns out to be much the same logic as is done in InsertLineBreakCommand.
* layout-tests/editing/inserting/insert-
3786362-fix-expected.txt: Added.
* layout-tests/editing/inserting/insert-
3786362-fix.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8108
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 3 Dec 2004 00:24:26 +0000 (00:24 +0000)]
WebKit:
Fixed <rdar://problem/
3841332> REGRESSION (125.9-167u): repro crash in -[KWQPageState invalidate] involving .Mac images
Ensure that the document is cleared when leaving a non-HTML page. This ensures that
the b/f cache won't incorrectly trash the previous state when restoring.
Reviewed by John.
* WebView.subproj/WebFrame.m:
(-[WebFrame _setState:]):
WebCore:
Fixed <rdar://problem/
3841332> REGRESSION (125.9-167u): repro crash in -[KWQPageState invalidate] involving .Mac images
Ensure that the document is cleared when leaving a non-HTML page. This ensures that
the b/f cache won't incorrectly trash the previous state when restoring.
Reviewed by John.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
(-[WebCoreBridge canCachePage]):
(-[WebCoreBridge clear]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8107
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 2 Dec 2004 23:08:11 +0000 (23:08 +0000)]
Reviewed by Richard
<rdar://problem/
3748323> Problem with -[WebView editableDOMRangeForPoint:] (-isFlipped not taken into account?)
<rdar://problem/
3852590> REGRESSION (Mail): Dropped content appears in wrong place if Mail message is scrolled down
When implementing drag and drop, moveDragCaretToPoint: and editableDOMRangeForPoint: are used in
concert to track the mouse and determine a drop location, respectively. However, moveDragCaretToPoint:
did a conversion of the passed-in point to the document view's coordinate space, whereas
editableDOMRangeForPoint: did not. Now it does.
Note that I will need to coordinate with Grant to have him roll out some code in Mail that
attempts to work around this problem (unsuccessfully), and actually manages to block the
real fix (which needs to be in WebKit).
* WebView.subproj/WebView.m:
(-[WebView editableDOMRangeForPoint:]): Convert the passed-in point to the document view's coordinate space.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8106
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 2 Dec 2004 22:17:22 +0000 (22:17 +0000)]
Fixed <rdar://problem/
3895810> FATAL ERROR: <WebTextRenderer: 0x9328a20> unable to initialize with font "Times-Roman 16.00 pt. S ....
We have a hack to replace Times with Times New Roman if we fail
to setup Times. If we then fail to setup Times New Roman we
don't attempt to further fallback to the system font. Added
that additional fallback.
Reviewed by Ken.
* WebCoreSupport.subproj/WebTextRenderer.m:
(+[WebTextRenderer webFallbackFontFamily]):
(-[WebTextRenderer initWithFont:usingPrinterFont:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8105
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 2 Dec 2004 21:37:50 +0000 (21:37 +0000)]
Fixed build problem on Tiger8A821. Private macro and function
we were using have been deprecated,
Reviewed by Vicki.
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer initWithFont:usingPrinterFont:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8104
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 2 Dec 2004 21:04:14 +0000 (21:04 +0000)]
Reviewed by Richard
Fix for this bug:
<rdar://problem/
3857775> 8A293: Mail.app crashes converting copy-pasted text into plain text
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::RangeImpl::commonAncestorContainer): Return the document element if no common ancestor container
was found. This can happen in cases where the DOM was built from malformed markup (as in the case
of this bug where there is content after the body tag). Did a little code clean up as well.
(DOM::RangeImpl::compareBoundaryPoints): Made code more robust by adding some null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8103
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 2 Dec 2004 19:05:07 +0000 (19:05 +0000)]
Reviewed by Chris
Fix for this bug:
<rdar://problem/
3668157> REGRESSION (Mail): shift-click deselects when selection was created right-to-left
* khtml/khtml_part.cpp:
(KHTMLPart::handleMousePressEventSingleClick): Use RangeImpl::compareBoundaryPoints
to figure out which end of the selection to extend.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8102
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 2 Dec 2004 18:22:03 +0000 (18:22 +0000)]
Reviewed by Ken Kocienda.
<rdar://problem/
3834917> REGRESSION (Mail): double-clicking blank line selects end of previous line
Fixed originally reported bug plus the case of double-clicking whitespace at the beginning of a line, which has a similar result.
* khtml/editing/visible_text.cpp:
(khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
(khtml::SimplifiedBackwardsTextIterator::handleTextNode):
(khtml::SimplifiedBackwardsTextIterator::handleReplacedElement):
(khtml::SimplifiedBackwardsTextIterator::handleNonTextNode):
(khtml::SimplifiedBackwardsTextIterator::emitCharacter):
Distinguish BR from whitespace.
* khtml/editing/visible_text.h:
Distinguish BR from whitespace.
* khtml/editing/visible_units.cpp:
(khtml::previousWordBoundary):
Use UPSTREAM visible position now that SimplifiedBackwardsTextIterator distinguishes BR from whitespace. Otherwise, double-clicking at end of line would result in caret selection at start of next line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8101
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 2 Dec 2004 17:43:46 +0000 (17:43 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3900996> Crash dragging past end of contentEditable DIV, at DOM::RangeImpl::pastEndNode() const + 24
* khtml/xml/dom_position.cpp:
(DOM::Position::equivalentRangeCompliantPosition): Fixed this function so that it constrains the offset
of the position to be >= 0 and <= number of kids of its node. Not doing this constraining led to a DOM
exception trying to use a Position returned from this function to set the boundary point of a Range (which
eventually led to the crash). Since this crash happened, it seems like this function was failing in its
contract to return a range-compliant position, hence the need for this fix.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8100
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 1 Dec 2004 22:44:49 +0000 (22:44 +0000)]
Fixed: <rdar://problem/
3879870> Flash Player unable to stop data stream from continuing to download by returning -1 from NPP_Write
Also improved and cleaned-up the plug-in stream termination code.
Reviewed by john.
* Plugins.subproj/WebBaseNetscapePluginStream.h:
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(+[WebBaseNetscapePluginStream reasonForError:]): return NPRES_DONE for a nil error
(-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]): new, factored out from other methods
(-[WebBaseNetscapePluginStream errorForReason:]): new
(-[WebBaseNetscapePluginStream dealloc]): release MIME type
(-[WebBaseNetscapePluginStream setMIMEType:]): new
(-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): call setMIMEType so we can use it in _pluginCancelledConnectionError, call renamed methods
(-[WebBaseNetscapePluginStream _destroyStream]): prepended underscore, replaced some early returns with asserts as the callers are now smarter
(-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): prepended underscore, only call _destroyStream if there is an error or if the load is complete and there is no more data to be streamed
(-[WebBaseNetscapePluginStream cancelLoadWithError:]): new, overridden by subclasses to cancel the actual NSURLConnection
(-[WebBaseNetscapePluginStream destroyStreamWithError:]): new, calls _destroyStreamWithReason
(-[WebBaseNetscapePluginStream finishedLoadingWithData:]): call renamed methods
(-[WebBaseNetscapePluginStream _deliverData]): prepended underscore, call cancelLoadAndDestroyStreamWithError if NPP_Write returns a negative number
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView destroyStream:reason:]): call cancelLoadAndDestroyStreamWithError
* Plugins.subproj/WebNetscapePluginRepresentation.m:
(-[WebNetscapePluginRepresentation receivedError:withDataSource:]): call destroyStreamWithError
(-[WebNetscapePluginRepresentation cancelLoadWithError:]): new, override method, tell the data source to stop loading
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream cancelLoadWithError:]): new, override method, tell the loader to stop
(-[WebNetscapePluginStream stop]): call cancelLoadAndDestroyStreamWithError
(-[WebNetscapePluginConnectionDelegate isDone]): new
(-[WebNetscapePluginConnectionDelegate didReceiveResponse:]): call cancelLoadAndDestroyStreamWithError
(-[WebNetscapePluginConnectionDelegate didFailWithError:]): call destroyStreamWithError
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8099
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 1 Dec 2004 22:11:05 +0000 (22:11 +0000)]
Fix deployment build bustage
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8098
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 1 Dec 2004 21:59:51 +0000 (21:59 +0000)]
Reviewed by me
Moving code only.
* khtml/editing/htmlediting.cpp: Move ReplaceSelectionCommand into alphabetical order with
regard to other editing commands. The class had a name change ages ago, and it was never
moved.
* khtml/editing/htmlediting.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8097
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 1 Dec 2004 21:52:22 +0000 (21:52 +0000)]
Reviewed by Hyatt
Some improvements for paste, including some new code to annotate
whitespace when writing to the pasteboard to ensure that the meaning
of the markup on the pasteboard is unambiguous.
There is also new code for reading this annotated markup from the pasteboard,
removing the nodes that were added only to prevent ambiguity.
* WebCore.pbproj/project.pbxproj: Added html_interchange.h and html_interchange.cpp files.
The header should have been added earlier, but I did not do so.
* khtml/editing/html_interchange.cpp: Added.
(convertHTMLTextToInterchangeFormat):
* khtml/editing/html_interchange.h: Added some new constants for use with whitespace annotations.
* khtml/editing/htmlediting.cpp:
(khtml::ReplacementFragment::ReplacementFragment): Now looks for and removes annotations added for whitespace.
Also fixed a bug in the code that counts blocks in a fragment.
(khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): New helper. Recognizes annotation spans.
(khtml::ReplacementFragment::insertNodeBefore): New helper.
(khtml::ReplaceSelectionCommand::doApply): Fixed a bug in the code that sets the start position
for the replacement after deleting. This was causing a bug when pasting at the end of a block.
* khtml/editing/htmlediting.h: Add some new declarations.
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::RangeImpl::toHTML): Calls to startMarkup now pass true for the new annotate flag.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::stringValueForRange): New helper.
(NodeImpl::renderedText): New helper to return only the rendered text in a node.
(NodeImpl::startMarkup): Now takes an additional flag to control whether interchange annotations
should be added. Called by the paste code.
* khtml/xml/dom_nodeimpl.h: Added and modified function declarations.
New test to check the khtml::ReplaceSelectionCommand::doApply fix.
* layout-tests/editing/pasteboard/paste-text-010-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-010.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8096
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Wed, 1 Dec 2004 19:56:03 +0000 (19:56 +0000)]
Reviewed by Harrison.
Fixed: <rdar://problem/
3228878> potential performance problem in finding in large framesets
Got rid of O(N^2) conditions in _nextSibling and _previousSibling of where we were looking up self in the parent array of frames.
* WebView.subproj/WebFrame.h: Added two new pointers, one for the previous kid and one for the next kid
* WebView.subproj/WebFrame.m:
(-[WebFrame _addChild:]): Updates the previous frame and the next frame after this child
(-[WebFrame _removeChild:]): ditto
(-[WebFrame _nextSibling]): just return the pointer now
(-[WebFrame _previousSibling]): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8095
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 1 Dec 2004 01:25:04 +0000 (01:25 +0000)]
* ChangeLog: removed conflict marker
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8094
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 1 Dec 2004 01:23:00 +0000 (01:23 +0000)]
WebCore:
Fixed:
<rdar://problem/
3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/
3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
Reviewed by darin.
* khtml/misc/loader.cpp:
(CachedObject::~CachedObject): release m_allData
(CachedObject::setAllData): new
(Loader::servePendingRequests): connect slotAllData
(Loader::slotAllData): new
(Cache::requestImage): tweak
* khtml/misc/loader.h:
(khtml::CachedObject::CachedObject): set allData to 0
(khtml::CachedObject::allData): new
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJob::TransferJob): set m_allData
(KIO::TransferJob::emitAllData): new
* kwq/KWQLoader.mm:
(KWQCheckCacheObjectStatus): pass WebKit the data instead of the length of the resource
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader finishWithData:]): renamed to pass all data for the resource
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): support for slotAllData
(KWQSlot::call):
* kwq/WebCoreBridge.h:
* kwq/WebCoreResourceLoader.h:
WebKit:
Fixed:
<rdar://problem/
3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/
3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
Reviewed by darin.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge objectLoadedFromCacheWithURL:response:data:]): renamed to pass all data for the resource, moved delegate code to new method
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): call renamed method
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient didFinishLoading]): call renamed method
* WebView.subproj/WebFrame.m:
(-[WebFrame _opened]): call _sendResourceLoadDelegateMessagesForURL:response:length:, not objectLoadedFromCacheWithURL:response:data:
(-[WebFrame _internalLoadDelegate]):
(-[WebFrame _sendResourceLoadDelegateMessagesForURL:response:length:]): moved from objectLoadedFromCacheWithURL:response:data:
* WebView.subproj/WebFrameInternal.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8093
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 1 Dec 2004 00:54:40 +0000 (00:54 +0000)]
Reviewed by John.
<rdar://problem/
3805311> REGRESSION (159-163): onload in dynamically written document not called (causes blank search page at Japanese EPP site, many others)
* khtml/khtml_part.cpp:
(KHTMLPart::begin): call setParsing on document here after opening
- from now on we'll only set parsing to true for a document open
caused by page loading, not a programmatic one.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::open): don't setParsing to true here any more.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8092
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 30 Nov 2004 23:12:25 +0000 (23:12 +0000)]
Reviewed by John.
- fix recent regression from collection perf fixes.
* khtml/html/html_miscimpl.cpp:
(HTMLFormCollectionImpl::updateNameCache): Look up the name
attribute in the name cache, not the id cache (d'oh!)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8091
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 30 Nov 2004 21:08:49 +0000 (21:08 +0000)]
Reviewed by Ken.
- rolled in a KDE fix for a problem that may underlie a number of crashes
* khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::compareBoundaryPoints): Rolled in a change from
the KDE guys to fix a subtle problem. Code said "n = n =".
- rolled in a KDE fix for a containingBlock crash
* khtml/rendering/render_object.cpp: Roll in a change from KDE that adds frameset to the list of
elements that can not be a containingBlock. They said this fixes a crash, although I did not look
into that further.
- fixed <rdar://problem/
3884660> 8A305: Repro crash in QScrollBar::setValue (affects Safari RSS)
* kwq/KWQButton.mm:
(-[KWQButton initWithQButton:]): Set up target and action here instead of in caller.
(-[KWQButton detachQButton]): Added.
(-[KWQButton sendConsumedMouseUpIfNeeded]): Check button for nil instead of checking target.
(-[KWQButton mouseDown:]): Add calls to QWidget::beforeMouseDown/afterMouseDown.
(-[KWQButton widget]): Added.
(-[KWQButton becomeFirstResponder]): Added check to handle when button is 0.
(-[KWQButton resignFirstResponder]): Ditto.
(-[KWQButton canBecomeKeyView]): Ditto.
(QButton::QButton): Remove target and action setup; handled in KWQButton now.
(QButton::~QButton): Call detachQButton instead of setTarget:nil.
* kwq/KWQComboBox.mm:
(QComboBox::~QComboBox): Call detachQComboBox.
(-[KWQPopUpButtonCell detachQComboBox]): Added.
(-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Handle case where box is 0.
(-[KWQPopUpButtonCell setHighlighted:]): Ditto.
(-[KWQPopUpButton action:]): Ditto.
(-[KWQPopUpButton widget]): Tweaked.
(-[KWQPopUpButton mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown.
(-[KWQPopUpButton becomeFirstResponder]): Handle case where widget is 0.
(-[KWQPopUpButton resignFirstResponder]): Ditto.
(-[KWQPopUpButton canBecomeKeyView]): Ditto.
* kwq/KWQLineEdit.mm: (QLineEdit::~QLineEdit): Updated to use new detachQLineEdit name.
* kwq/KWQListBox.mm:
(-[KWQTableView mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown.
* kwq/KWQScrollBar.h: Removed m_scroller field.
* kwq/KWQScrollBar.mm:
(-[KWQScrollBar initWithQScrollBar:]): Rearranged a little bit.
(-[KWQScrollBar detachQScrollBar]): Added.
(-[KWQScrollBar widget]): Added.
(-[KWQScrollBar mouseDown:]): Added. Calls QWidget::beforeMouseDown and afterMouseDown.
(QScrollBar::QScrollBar): Changed to no longer set m_scroller.
(QScrollBar::~QScrollBar): Changed to call detachQScrollBar. No longer calls removeFromSuperview.
(QScrollBar::setValue): Chagned to use getView instad of m_scrollBar.
(QScrollBar::setKnobProportion): Ditto.
(QScrollBar::scrollbarHit): Ditto.
* kwq/KWQScrollView.mm:
(QScrollView::addChild): Changed to call QWidget to add to superview to accomodate the
hack where we don't remove right away when doing mouse tracking.
(QScrollView::removeChild): Changed to call QWidget to remove from superview to accomodate
the hack where we don't add right away when doing mouse tracking.
* kwq/KWQSlider.h: Added destructor.
* kwq/KWQSlider.mm:
(-[KWQSlider initWithQSlider:]): Tweaked a little.
(-[KWQSlider detachQSlider]): Added.
(-[KWQSlider mouseDown:]): Added call to QWidget::beforeMouseDown/afterMouseDown.
(-[KWQSlider widget]): Added.
(QSlider::~QSlider): Added. Calls detachQSlider.
* kwq/KWQTextArea.h: Added detachQTextEdit method.
* kwq/KWQTextArea.mm:
(-[KWQTextArea detachQTextEdit]): Added.
(-[KWQTextArea textDidChange:]): Added check for widget of 0.
(-[KWQTextArea becomeFirstResponder]): Ditto.
(-[KWQTextArea nextKeyView]): Ditto.
(-[KWQTextArea previousKeyView]): Ditto.
(-[KWQTextArea drawRect:]): Ditto.
(-[KWQTextAreaTextView insertTab:]): Ditto.
(-[KWQTextAreaTextView insertBacktab:]): Ditto.
(-[KWQTextAreaTextView shouldDrawInsertionPoint]): Ditto.
(-[KWQTextAreaTextView selectedTextAttributes]): Ditto.
(-[KWQTextAreaTextView mouseDown:]): Ditto.
(-[KWQTextAreaTextView keyDown:]): Ditto.
(-[KWQTextAreaTextView keyUp:]): Ditto.
* kwq/KWQTextEdit.h: Added ~QTextEdit.
* kwq/KWQTextEdit.mm: (QTextEdit::~QTextEdit): Added. Calls detachQTextEdit.
* kwq/KWQTextField.h: Changed invalidate to detachQLineEdit.
* kwq/KWQTextField.mm: (-[KWQTextFieldController detachQLineEdit]): Changed.
* kwq/KWQWidget.h: Added addToSuperview/removeFromSuperview for use from QScrollView.
Added beforeMouseDown and afterMouseDown for use in widget implementations.
Removed unused hasMouseTracking function.
* kwq/KWQWidget.mm:
(QWidget::QWidget): Initialize two new fields.
(QWidget::~QWidget): Added code to remove view when widget is destroyed.
(QWidget::getOuterView): Remove unneeded exception blocking since we're just caling superview.
(QWidget::addToSuperview): Added.
(QWidget::removeFromSuperview): Added.
(QWidget::beforeMouseDown): Added.
(QWidget::afterMouseDown): Added.
* khtml/rendering/render_layer.cpp:
(RenderLayer::setHasHorizontalScrollbar): Remove parent parameter; let addChild call addSubview:.
(RenderLayer::setHasVerticalScrollbar): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8090
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 30 Nov 2004 16:33:40 +0000 (16:33 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3863031> REGRESSION (Mail): caret continues flashing while mouse is down
* khtml/khtml_part.cpp:
(KHTMLPart::timerEvent): Add a check for whether the mouse is down. Keep the caret drawn
with no blink if it is.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8089
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 30 Nov 2004 15:30:29 +0000 (15:30 +0000)]
Reviewed by me
* khtml/editing/htmlediting.cpp:
(khtml::ReplacementFragment::mergeEndNode): Fixed one-line coding mistake that created an endless loop.
Seemed simple enough to land without review.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8088
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 30 Nov 2004 00:07:04 +0000 (00:07 +0000)]
Reviewed by Chris
Rewrite of paste code (specifically the ReplaceSelectionCommand class). Many more cases
are handled correctly now, including selections that span multiple blocks, and cases
where content on the pasteboard ends in newlines (or what appear to be newlines to a
user, really block ends or BRs). I also made one small, but important change in the
copy code to annotate the markup written to the pasteboard to support these selections
ending in newlines.
New header that defines a couple of constants used in copying and pasting.
* ForwardingHeaders/editing/html_interchange.h: Added.
* khtml/editing/html_interchange.h: Added.
Rewrite of the ReplaceSelectionCommand. There are several new helper functions, as well
as a new helper class, ReplacementFragment, which encapsulates information and functions
pertaining to a document fragment that is being inserted into a document.
* khtml/editing/htmlediting.cpp:
(khtml::ReplacementFragment::ReplacementFragment):
(khtml::ReplacementFragment::~ReplacementFragment):
(khtml::ReplacementFragment::firstChild): Simple accessor.
(khtml::ReplacementFragment::lastChild): Ditto.
(khtml::ReplacementFragment::mergeStartNode): Looks at the nodes in a fragment and determines
the starting node to use for merging into the block containing the start of the selection.
(khtml::ReplacementFragment::mergeEndNode): Same as above, but for the end of the selection.
(khtml::ReplacementFragment::pruneEmptyNodes): Simple helper.
(khtml::ReplacementFragment::isInterchangeNewlineComment): Determines if a node is the
special annotation comment added in by the copy code.
(khtml::ReplacementFragment::removeNode): Simple helper.
(khtml::isComment): Simple helper.
(khtml::isProbablyBlock): Determines if a node is of a type that is usually rendered as a block.
I would like to do better than this some day, but this check will hold us until I can do better.
(khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::doApply):
(khtml::ReplaceSelectionCommand::completeHTMLReplacement): Figures out the right ending selection.
* khtml/editing/htmlediting.h: Declarations for the new ReplacementFragment class.
(khtml::ReplacementFragment::root):
(khtml::ReplacementFragment::type):
(khtml::ReplacementFragment::isEmpty):
(khtml::ReplacementFragment::isSingleTextNode):
(khtml::ReplacementFragment::isTreeFragment):
(khtml::ReplacementFragment::hasMoreThanOneBlock):
(khtml::ReplacementFragment::hasLogicalNewlineAtEnd):
This smaller set of changes markup generation to add the newline annotation described in the
comment at the start of this entry.
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::RangeImpl::addCommentToHTMLMarkup): Simple helper.
(DOM::RangeImpl::toHTML): Added new EAnnotateForInterchange default argument to control whether
comment annotations are added to the markup generated.
* khtml/xml/dom2_rangeimpl.h: Add some new declarations.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge markupStringFromRange:nodes:]): Request that markup resulting from call to
DOM::RangeImpl::toHTML uses annotations when generating.
New tests.
* layout-tests/editing/pasteboard/paste-text-001-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-001.html: Added.
* layout-tests/editing/pasteboard/paste-text-002-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-002.html: Added.
* layout-tests/editing/pasteboard/paste-text-003-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-003.html: Added.
* layout-tests/editing/pasteboard/paste-text-004-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-004.html: Added.
* layout-tests/editing/pasteboard/paste-text-005-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-005.html: Added.
* layout-tests/editing/pasteboard/paste-text-006-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-006.html: Added.
* layout-tests/editing/pasteboard/paste-text-007-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-007.html: Added.
* layout-tests/editing/pasteboard/paste-text-008-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-008.html: Added.
* layout-tests/editing/pasteboard/paste-text-009-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-009.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8087
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 29 Nov 2004 23:13:01 +0000 (23:13 +0000)]
Reviewed by John.
- worked around bug in Panther where NSScroller calls _destinationFloatValueForScroller: on superview
without first checking if it's implemented
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView _destinationFloatValueForScroller:]):
Implemented. Calls floatValue on the scroller.
* English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8086
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:17:52 +0000 (22:17 +0000)]
Reviewed by Harrison
Made two small changes that make it possible for comments to have DOM nodes made for them
when pasting. This relies on some earlier work I did some days ago.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::startMarkup): Get the string from the comment.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Did some very minor
rearranging. Now passes a flag when creating a contextual fragment, requesting that comments
be included in the DOM.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8085
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:17:02 +0000 (22:17 +0000)]
Reviewed by Harrison
Added some new helpers to the VisiblePosition class. I will begin to use these when I check in
my improved paste code.
* khtml/editing/visible_position.cpp:
(khtml::blockRelationship)
(khtml::visiblePositionsInDifferentBlocks)
(khtml::isFirstVisiblePositionInBlock)
(khtml::isFirstVisiblePositionInNode)
(khtml::isLastVisiblePositionInBlock)
* khtml/editing/visible_position.h
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8084
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:13:42 +0000 (22:13 +0000)]
Reviewed by Harrison
* khtml/xml/dom_position.cpp:
(DOM::Position::downstream): Fix a bug in downstream that prevented a call with DoNotStayInBlock
specified from obeying that directive. The old code would stop at an outer block boundary in
the case where that block had a block as its first child. The correct behavior is to drill into
that inner block (and continue on drilling down, if possible), to find the correct position.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8083
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:11:14 +0000 (22:11 +0000)]
Reviewed by Harrison
Small improvements to the node-display debugging helpers.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::displayTree): Make the rootNode be this if there is no rootEditableElement.
* khtml/xml/dom_nodeimpl.h: Make displayNode take a default argument of "" for its string.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8082
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:05:02 +0000 (22:05 +0000)]
Reviewed by Harrison
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleGeneralDelete): The downstream position in this function
may need to be adjusted when deleting text off the front part of a text node. This fixes a problem
I discovered while improving the paste command, where the insertion poitn wound up in the wrong
place after the delete.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8081
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 29 Nov 2004 22:03:51 +0000 (22:03 +0000)]
Reviewed by Harrison
Add a new helper function to insert a paragraph separator. Will be used in my
upcoming paste improvments.
* khtml/editing/htmlediting.cpp: Added function
(khtml::CompositeEditCommand::insertParagraphSeparator)
* khtml/editing/htmlediting.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8080
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 24 Nov 2004 01:06:47 +0000 (01:06 +0000)]
Fixed <rdar://problem/
3890385> field and method cache incorrectly capped (c bindings)
Reviewed by Ken.
* bindings/c/c_class.cpp:
(CClass::_commonInit):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8079
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 24 Nov 2004 00:07:18 +0000 (00:07 +0000)]
Added various comments.
* khtml/editing/htmlediting.cpp:
(khtml::StyleChange::init):
(khtml::ApplyStyleCommand::doApply):
(khtml::ApplyStyleCommand::applyBlockStyle):
(khtml::ApplyStyleCommand::applyInlineStyle):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8078
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 23 Nov 2004 18:50:15 +0000 (18:50 +0000)]
Fixed: <rdar://problem/
3890944> disable icon database for Dashboard
Reviewed by kevin.
* Misc.subproj/WebIconDatabase.h:
* Misc.subproj/WebIconDatabase.m:
(-[WebIconDatabase init]): don't create dictionaries if disabled
(-[WebIconDatabase iconForURL:withSize:cache:]): return default icon if disabled
(-[WebIconDatabase iconURLForURL:]): return nil if disabled
(-[WebIconDatabase retainIconForURL:]): return if disabled
(-[WebIconDatabase releaseIconForURL:]): ditto
(-[WebIconDatabase delayDatabaseCleanup]): ditto
(-[WebIconDatabase allowDatabaseCleanup]): ditto
(-[WebIconDatabase _isEnabled]): new
(-[WebIconDatabase _setIcon:forIconURL:]): assert if called when disabled, moved to own category implementation
(-[WebIconDatabase _setHaveNoIconForIconURL:]): ditto
(-[WebIconDatabase _setIconURL:forURL:]): ditto
(-[WebIconDatabase _createFileDatabase]): tweak
(-[WebIconDatabase _applicationWillTerminate:]): moved out of public code
* Misc.subproj/WebIconDatabasePrivate.h:
* Misc.subproj/WebIconLoader.m:
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _updateIconDatabaseWithURL:]): assert if called when icon DB is disabled
(-[WebDataSource _loadIcon]): don't load icon if icon DB is disabled
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8077
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 08:22:14 +0000 (08:22 +0000)]
Hit testing in table cells with top/bottom space from vertical alignment didn't work. I forgot about the
super-secret yPos() lie that table cells do. Use m_y instead of yPos().
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::nodeAtPoint):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8076
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 07:58:56 +0000 (07:58 +0000)]
Make sure you can use document.createElement to make a <canvas> element.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8075
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 23 Nov 2004 07:45:14 +0000 (07:45 +0000)]
Reviewed by Dave.
<rdar://problem/
3492044> performing JavaScript operations on form elements is slower than WinIE (HTMLFormCollection)
<rdar://problem/
3489679> selecting an item on the Apache bugzilla query page is very slow (HTMLFormCollection)
<rdar://problem/
3477810> checking 80 check boxes with JavaScript is 10x slower than in IE (HTMLFormCollection)
<rdar://problem/
3760962> JavaScript that toggles checkboxes is slow (HTMLCollection,HTMLFormCollection)
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::HTMLFormElementImpl):
(DOM::HTMLFormElementImpl::~HTMLFormElementImpl):
* khtml/html/html_formimpl.h:
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::HTMLCollectionImpl):
(HTMLCollectionImpl::~HTMLCollectionImpl):
(HTMLCollectionImpl::CollectionInfo::CollectionInfo):
(HTMLCollectionImpl::CollectionInfo::reset):
(HTMLCollectionImpl::resetCollectionInfo):
(HTMLCollectionImpl::checkForNameMatch):
(appendToVector):
(HTMLCollectionImpl::updateNameCache):
(HTMLCollectionImpl::namedItems):
(HTMLFormCollectionImpl::HTMLFormCollectionImpl):
(HTMLFormCollectionImpl::~HTMLFormCollectionImpl):
(HTMLFormCollectionImpl::item):
(HTMLFormCollectionImpl::updateNameCache):
* khtml/html/html_miscimpl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8074
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 07:23:40 +0000 (07:23 +0000)]
Make sure the WebCore cache grows at 512mb and at 1024mb exactly.
Reviewed by mjs
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge getObjectCacheSize]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8073
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 07:21:50 +0000 (07:21 +0000)]
Improve the WebCore cache so that the maximum cacheable object size is scaled based off the total cache
size.
Reviewed by mjs
* khtml/misc/loader.cpp:
(CachedObject::finish):
(Cache::flush):
(Cache::setSize):
* khtml/misc/loader.h:
(khtml::Cache::maxCacheableObjectSize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 05:50:35 +0000 (05:50 +0000)]
Fix mistake made with frameset hit testing from previous checkin.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 05:08:20 +0000 (05:08 +0000)]
Fix for
3673381, huge directory listing so slow it seems like a hang. Rework painting and hit testing so that
it crawls the line box tree instead of the render tree. This allows more precise intersection/containment testing
that lets us short circuit earlier when painting and hit testing.
Reviewed by mjs
* khtml/khtml_part.cpp:
(KHTMLPart::isPointInsideSelection):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paint):
(khtml::RenderBlock::paintChildren):
(khtml::RenderBlock::paintObject):
(khtml::RenderBlock::paintFloats):
(khtml::RenderBlock::nodeAtPoint):
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::nodeAtPoint):
* khtml/rendering/render_box.h:
* khtml/rendering/render_br.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::paint):
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLines):
(RenderFlow::hitTestLines):
(RenderFlow::caretRect):
(RenderFlow::addFocusRingRects):
(RenderFlow::paintFocusRing):
(RenderFlow::paintOutlines):
(RenderFlow::paintOutlineForLine):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::nodeAtPoint):
* khtml/rendering/render_frames.h:
* khtml/rendering/render_image.cpp:
(RenderImage::nodeAtPoint):
* khtml/rendering/render_image.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::paint):
(RenderInline::nodeAtPoint):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::paintLayer):
(RenderLayer::hitTest):
(RenderLayer::hitTestLayer):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_line.cpp:
(khtml::InlineBox::paint):
(khtml::InlineBox::nodeAtPoint):
(khtml::InlineFlowBox::flowObject):
(khtml::InlineFlowBox::nodeAtPoint):
(khtml::InlineFlowBox::paint):
(khtml::InlineFlowBox::paintBackgrounds):
(khtml::InlineFlowBox::paintBackground):
(khtml::InlineFlowBox::paintBackgroundAndBorder):
(khtml::InlineFlowBox::paintDecorations):
(khtml::EllipsisBox::paint):
(khtml::EllipsisBox::nodeAtPoint):
(khtml::RootInlineBox::paintEllipsisBox):
(khtml::RootInlineBox::paint):
(khtml::RootInlineBox::nodeAtPoint):
* khtml/rendering/render_line.h:
(khtml::InlineRunBox::paintBackgroundAndBorder):
* khtml/rendering/render_object.cpp:
(RenderObject::hitTest):
(RenderObject::setInnerNode):
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
(khtml::RenderObject::PaintInfo::PaintInfo):
(khtml::RenderObject::PaintInfo::~PaintInfo):
(khtml::RenderObject::paintingRootForChildren):
(khtml::RenderObject::shouldPaintWithinRoot):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
(RenderTable::paint):
* khtml/rendering/render_text.cpp:
(simpleDifferenceBetweenColors):
(correctedTextColor):
(InlineTextBox::nodeAtPoint):
(InlineTextBox::paint):
(InlineTextBox::selectionStartEnd):
(InlineTextBox::paintSelection):
(InlineTextBox::paintMarkedTextBackground):
(InlineTextBox::paintDecoration):
(RenderText::posOfChar):
* khtml/rendering/render_text.h:
(khtml::RenderText::paint):
(khtml::RenderText::layout):
(khtml::RenderText::nodeAtPoint):
* khtml/xml/dom2_eventsimpl.cpp:
(MouseEventImpl::computeLayerPos):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::prepareMouseEvent):
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityHitTest:]):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scrollOverflowWithScrollWheelEvent):
(KWQKHTMLPart::eventMayStartDrag):
(KWQKHTMLPart::khtmlMouseMoveEvent):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]):
(-[WebCoreBridge _positionForPoint:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8070
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 23 Nov 2004 04:48:04 +0000 (04:48 +0000)]
Fixed <rdar://problem/
3891737> WebPreferences do not work if they are set before set on the WebView
John found this problem and suggested the fix.
Reviewed by John Louch.
* WebView.subproj/WebView.m:
(-[WebView setPreferences:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8069
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 23 Nov 2004 03:02:11 +0000 (03:02 +0000)]
Remove bogus printf.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 23 Nov 2004 02:06:13 +0000 (02:06 +0000)]
Reviewed by Ken.
<rdar://problem/
3889696> Enable conservative garbage collection for JavaScript
* kjs/collector.cpp:
(KJS::Collector::Thread::Thread):
(KJS::destroyRegisteredThread):
(KJS::initializeRegisteredThreadKey):
(KJS::Collector::registerThread):
(KJS::Collector::markStackObjectsConservatively):
(KJS::Collector::markCurrentThreadConservatively):
(KJS::Collector::markOtherThreadConservatively):
* kjs/collector.h:
* kjs/internal.cpp:
(lockInterpreter):
* kjs/value.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8067
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 23 Nov 2004 01:44:59 +0000 (01:44 +0000)]
Reviewed by Dave.
<rdar://problem/
3890961> selecting an item on the Apache bugzilla query page can be sped up 10% (HTMLFormCollection)
<rdar://problem/
3890958> JavaScript that toggles checkboxes can be improved 73% (HTMLCollection,HTMLFormCollection)
This avoids the O(N^2) penalty for named item traversal for form collections.
It also combines the item traversal logic for all non-form
collection operations into a single traverseNextItem
function. This avoids having 5 copies of the big switch statement
for this.
Also fixed a bug that prevented the last form element from being removed properly.
* khtml/html/html_formimpl.cpp:
(DOM::removeFromVector):
* khtml/dom/html_misc.cpp:
(HTMLCollection::namedItems):
* khtml/dom/html_misc.h:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::getNamedItems):
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::traverseNextItem):
(HTMLCollectionImpl::calcLength):
(HTMLCollectionImpl::length):
(HTMLCollectionImpl::item):
(HTMLCollectionImpl::nextItem):
(HTMLCollectionImpl::checkForNameMatch):
(HTMLCollectionImpl::namedItem):
(HTMLCollectionImpl::namedItems):
(HTMLCollectionImpl::nextNamedItem):
(HTMLFormCollectionImpl::calcLength):
(HTMLFormCollectionImpl::namedItem):
(HTMLFormCollectionImpl::nextNamedItem):
(HTMLFormCollectionImpl::namedItems):
* khtml/html/html_miscimpl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8066
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 22 Nov 2004 17:16:23 +0000 (17:16 +0000)]
WebCore:
Reviewed by Harrison
Change around the way we block the Javascript "Paste" command identifier from
being available. Formerly, this was done with an ifdef we never compiled in.
Now, this is done with a couple of cheap runtime checks. The advantage is that
we can now compile this command into development builds, and still yet switch
on the command in deployment builds through the use of WebCore SPI so we can
write and run layout tests with all of our builds.
* khtml/editing/jsediting.cpp:
(DOM::JSEditor::queryCommandSupported): Checks state of paste command in case
command being queried is the paste command.
(DOM::JSEditor::setSupportsPasteCommand): New SPI to turn on paste command.
* khtml/editing/jsediting.h: Ditto.
* khtml/khtml_part.cpp:
(KHTMLPart::pasteFromPasteboard): Added.
(KHTMLPart::canPaste): Added.
* kwq/KWQKHTMLPart.mm:
(KHTMLPart::canPaste): Added.
* kwq/KWQRenderTreeDebug.cpp:
(externalRepresentation): Turn on paste command.
* kwq/WebCoreBridge.h: Add canPaste call so WebKit can fill in the answer.
WebKit:
Reviewed by Harrison
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge canPaste]): Call WebView _canPaste.
* WebView.subproj/WebView.m:
(-[WebView _canPaste]): Try to forward to document view's implementation. Only WebHTMLView
answers right now. Returns NO otherwise.
* WebView.subproj/WebViewInternal.h: Add _canPaste method to WebView.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Mon, 22 Nov 2004 10:24:08 +0000 (10:24 +0000)]
Back out the window closing fix, it seems to be causing crashes.
* WebView.subproj/WebFrame.m:
(-[WebFrame _detachFromParent]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Mon, 22 Nov 2004 04:31:39 +0000 (04:31 +0000)]
Reviewed by Richard.
<rdar://problem/
3889655> HTMLCollectionImpl should use traverseNextNode to improve speed and save recursion
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::calcLength):
(HTMLCollectionImpl::getItem):
(HTMLCollectionImpl::item):
(HTMLCollectionImpl::nextItem):
(HTMLCollectionImpl::getNamedItem):
(HTMLCollectionImpl::namedItem):
(HTMLCollectionImpl::nextNamedItemInternal):
(HTMLFormCollectionImpl::nextNamedItemInternal):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8060
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 20 Nov 2004 22:10:56 +0000 (22:10 +0000)]
WebKit:
Reviewed by John.
<rdar://problem/
3710101> _web_userVisibleString makes URL autocomplete roughly 2x slower
* Misc.subproj/WebNSURLExtras.h:
* Misc.subproj/WebNSURLExtras.m:
(-[NSString _web_isUserVisibleURL]): New SPI to check if a URL
string is already in user-visible form (i.e. converting it to an
NSURL and then back via _web_userVisibleString would not change
anything).
WebBrowser:
Reviewed by John,
<rdar://problem/
3710101> _web_userVisibleString makes URL autocomplete roughly 2x slower
* URLCompletionController.m:
(_rawStringFromItem): use URLString from history item when possible, only convert
to user visible string when we really have to.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8059
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 20 Nov 2004 21:44:48 +0000 (21:44 +0000)]
WebKit:
Reviewed by NOBODY (OOPS!).
<rdar://problem/
3190977> closing window with many tabs in it can be quite slow
* WebView.subproj/WebFrame.m:
(-[WebFrame _detachFromParent]): autorelease bridge instead of releasing it,
to make window and tab closing more responsive - this way the deallocation happens
after the windoow or tab appears to close.
WebBrowser:
Reviewed by NOBODY (OOPS!).
<rdar://problem/
3190977> closing window with many tabs in it can be quite slow
* BrowserDocument.m:
(-[BrowserDocument close]): Don't make an autorelease pool
here. This should not be needed for PLT world leak detection any
more, and it is necessary to make window closing responsive.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8058
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 20 Nov 2004 02:24:08 +0000 (02:24 +0000)]
Reviewed by Darin.
<rdar://problem/
3482935> JavaScript so slow it seems like a hang (hrweb.apple.com) (HTMLCollection?)
<rdar://problem/
3759149> PeopleSoft page in Safari twice as slow as Mozilla engine (HTMLFormCollection)
<rdar://problem/
3888368> selecting an item on the Apache bugzilla query page can be improved 95% (HTMLFormCollection)
Many optimizations to HTMLFormCollection. Iterating it should not
be N^2 any more, though finding items by name could still be.
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::~HTMLFormElementImpl):
(DOM::HTMLFormElementImpl::length):
(DOM::HTMLFormElementImpl::submitClick):
(DOM::HTMLFormElementImpl::formData):
(DOM::HTMLFormElementImpl::submit):
(DOM::HTMLFormElementImpl::reset):
(DOM::HTMLFormElementImpl::radioClicked):
(DOM::appendToVector):
(DOM::removeFromVector):
(DOM::HTMLFormElementImpl::registerFormElement):
(DOM::HTMLFormElementImpl::removeFormElement):
(DOM::HTMLFormElementImpl::makeFormElementDormant):
(DOM::HTMLFormElementImpl::registerImgElement):
(DOM::HTMLFormElementImpl::removeImgElement):
* khtml/html/html_formimpl.h:
* khtml/html/html_miscimpl.cpp:
(HTMLFormCollectionImpl::FormCollectionInfo::FormCollectionInfo):
(void::HTMLFormCollectionImpl::FormCollectionInfo::reset):
(HTMLFormCollectionImpl::resetCollectionInfo):
(HTMLFormCollectionImpl::calcLength):
(HTMLFormCollectionImpl::item):
(HTMLFormCollectionImpl::getNamedItem):
(HTMLFormCollectionImpl::getNamedFormItem):
(HTMLFormCollectionImpl::firstItem):
(HTMLFormCollectionImpl::nextItem):
* khtml/html/html_miscimpl.h:
(DOM::HTMLFormCollectionImpl::~HTMLFormCollectionImpl):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::setAttribute):
(ElementImpl::setAttributeMap):
* kwq/KWQPtrVector.h:
(QPtrVector::findRef):
* kwq/KWQVectorImpl.h:
* kwq/KWQVectorImpl.mm:
(KWQVectorImpl::findRef):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementWithName:inForm:]):
(-[WebCoreBridge controlsInForm:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8057
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 20 Nov 2004 01:36:53 +0000 (01:36 +0000)]
Reviewed by Ken and Darin.
<rdar://problem/
3856215> Cannot remove bold from the beginning of a message
Problem is that KHTMLPart::computeAndSetTypingStyle always looked upstream
for the existing style, but in this case (hitting cmd-B with caret at top of
file) there is nothing upstream. Changed this to use the VisiblePosition
deepEquivalent instead.
* khtml/khtml_part.cpp:
(KHTMLPart::computeAndSetTypingStyle):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8056
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 20 Nov 2004 00:57:01 +0000 (00:57 +0000)]
versioning for TOT, Safari 2.0 (v172+)
The tree is OPEN!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 20 Nov 2004 00:48:36 +0000 (00:48 +0000)]
Safari-172 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8051
268f45cc-cd09-0410-ab3c-
d52691b4dbfc