WebKit-https.git
18 years agoset version to '138u'. the tree is open!
vicki [Fri, 16 Apr 2004 23:03:15 +0000 (23:03 +0000)]
set version to '138u'.  the tree is open!

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

18 years agoSafari-137 stamp
vicki [Fri, 16 Apr 2004 22:59:25 +0000 (22:59 +0000)]
Safari-137 stamp

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

18 years agoAhh! I checked in changes in my tree when I rolled out. Rolling those changes out.
kocienda [Fri, 16 Apr 2004 22:25:51 +0000 (22:25 +0000)]
Ahh! I checked in changes in my tree when I rolled out. Rolling those changes out.

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

18 years agoRolling out last change. Tree was closed.
kocienda [Fri, 16 Apr 2004 22:24:41 +0000 (22:24 +0000)]
Rolling out last change. Tree was closed.

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 16 Apr 2004 22:13:49 +0000 (22:13 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::containsOnlyWhitespace): New helper.
        (DeleteSelectionCommandImpl::doApply): Fix deleting collapsed whitespace at the end of a line
        where text has flowed to the next line and the caret is at the beginning of the next line.
        * khtml/editing/htmlediting_impl.h: Updated for new helper.
        * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.

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

18 years agoWebKit:
rjw [Fri, 16 Apr 2004 21:09:51 +0000 (21:09 +0000)]
WebKit:
Added an SPI to allow ObjC instances to be easily bound to
JS.  This is needed by the dashboard guys for their prototyping.
Eventually they will use new API.

        Reviewed by Chris.

        * WebView.subproj/WebView.m:
        (-[WebView _bindObject:withName:toFrame:]):
        * WebView.subproj/WebViewPrivate.h:

WebCore:
Added an SPI to allow ObjC instances to be easily bound to
JS.  This is needed by the dashboard guys for their prototyping.
Eventually they will use new API.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::bindObject):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge bindObject:withName:]):

JavaScriptCore:
Added interpreter lock protection around object creation.

        Reviewed by Chris.

        * bindings/runtime.cpp:
        (Instance::createRuntimeObject):

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

18 years agoWebCore:
cblu [Fri, 16 Apr 2004 19:51:34 +0000 (19:51 +0000)]
WebCore:

Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec.
Added all DOMCore and DOMHTML symbols to WebCore's symbols file.
Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit.

        Reviewed by kocienda.

        * WebCore-combined.exp:
        * WebCore.exp:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done
        (HTMLFrameElementImpl::isURLAttribute): ditto
        (HTMLIFrameElementImpl::isURLAttribute): ditto
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::isURLAttribute): ditto
        * khtml/html/html_formimpl.h:
        * khtml/html/html_headimpl.cpp:
        (HTMLScriptElementImpl::isURLAttribute): ditto
        * khtml/html/html_headimpl.h:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::isURLAttribute): ditto
        * khtml/html/html_imageimpl.h:
        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::isURLAttribute): ditto
        (HTMLObjectElementImpl::isURLAttribute): ditto
        (HTMLParamElementImpl::isURLAttribute): ditto
        * khtml/html/html_objectimpl.h:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::isURLAttribute): ditto
        (HTMLTableCellElementImpl::isURLAttribute): ditto
        * khtml/html/html_tableimpl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::toHTMLWithOptions): take a node list (see below)
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::isURLAttribute):
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them
        * khtml/xml/dom_nodeimpl.h:
        * kwq/DOM.mm:
        (+[DOMNode _nodeWithImpl:]): added support for HTML types
        * kwq/DOMExtensions.h:
        * kwq/DOMHTML.mm:
        (-[DOMHTMLPreElement setWidth:]):
        (-[DOMHTMLEmbedElement _embedElementImpl]):
        (-[DOMHTMLEmbedElement align]):
        (-[DOMHTMLEmbedElement setAlign:]):
        (-[DOMHTMLEmbedElement height]):
        (-[DOMHTMLEmbedElement setHeight:]):
        (-[DOMHTMLEmbedElement name]):
        (-[DOMHTMLEmbedElement setName:]):
        (-[DOMHTMLEmbedElement src]):
        (-[DOMHTMLEmbedElement setSrc:]):
        (-[DOMHTMLEmbedElement type]):
        (-[DOMHTMLEmbedElement setType:]):
        (-[DOMHTMLEmbedElement width]):
        (-[DOMHTMLEmbedElement setWidth:]):
        (-[DOMHTMLTableElement background]):
        (-[DOMHTMLTableElement setBackground:]):
        (-[DOMHTMLTableCellElement background]): new extension
        (-[DOMHTMLTableCellElement setBackground:]): ditto
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nodesFromList:]): new
        (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes
        (-[WebCoreBridge markupStringFromRange:nodes:]): ditto

WebKit:

Fixed: <rdar://problem/3587599>: Mail Page, Web Archives don't preserve subframes
Moved code that assembled subresource URLs from DOM nodes from WebCore to WebKit.

        Reviewed by rjw.

        * DOM.subproj/DOMExtensions.h: copied from WebCore
        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMNode webArchive]): call renamed methods
        (-[DOMNode markupString]): ditto
        (-[DOMNode _URLsFromSelectors:]): new, returns array of URLs given selectors
        (-[DOMNode _subresourceURLs]): new, base class does nothing, subclasses call _URLsFromSelectors with URL selectors
        (-[DOMDocument webFrame]): new
        (-[DOMRange webArchive]): call renamed methods
        (-[DOMRange markupString]): ditto
        (-[DOMHTMLBodyElement _subresourceURLs]): new
        (-[DOMHTMLInputElement _subresourceURLs]): new
        (-[DOMHTMLLinkElement _subresourceURLs]): new
        (-[DOMHTMLScriptElement _subresourceURLs]): new
        (-[DOMHTMLImageElement _subresourceURLs]): new
        (-[DOMHTMLEmbedElement _subresourceURLs]): new
        (-[DOMHTMLObjectElement _subresourceURLs]): new
        (-[DOMHTMLParamElement _subresourceURLs]): new
        (-[DOMHTMLTableElement _subresourceURLs]): new
        (-[DOMHTMLTableCellElement _subresourceURLs]): new
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebArchive.h:
        * WebView.subproj/WebArchive.m:
        (-[WebArchivePrivate dealloc]): release new subframeArchives ivar
        (-[WebArchive initWithMainResource:subresources:subframeArchives:]): take subframeArchives
        (-[WebArchive _initWithPropertyList:]): new, recursively creates WebArchives
        (-[WebArchive initWithData:]): call _initWithPropertyList
        (-[WebArchive subframeArchives]): new
        (-[WebArchive _propertyListRepresentation]): new, recursively creates property lists of WebArchives
        (-[WebArchive data]): call _propertyListRepresentation
        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate saveResource]): call renamed methods
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSourcePrivate dealloc]): release new pendingSubframeArchives ivar
        (-[WebDataSource _archiveWithMarkupString:nodes:]): renamed and reimplemented, handles subframes
        (-[WebDataSource _archive]): new
        (-[WebDataSource _setPendingSubframeArchives:]): new
        (-[WebDataSource _archiveForFrameName:]): new
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame loadArchive:]): handle subframes
        (-[WebFrame _loadRequest:subresources:subframeArchives:]): ditto
        (-[WebFrame _loadURL:intoChild:]): use the subframe archive if we have it
        (-[WebFrame loadRequest:]): call renamed methods
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation loadWebArchive]): call renamed methods and handle subframes
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectedArchive:]): call renamed methods
        (-[WebHTMLView _pasteFromPasteboard:]): call renamed methods
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebImageRepresentation.m: instead of storing some items from the data source, just store the data source
        (-[WebImageRepresentation dealloc]): removed use of deleted ivars
        (-[WebImageRepresentation URL]): use dataSource instead of ivar
        (-[WebImageRepresentation doneLoading]): use new boolean ivar
        (-[WebImageRepresentation setDataSource:]): store the data source
        (-[WebImageRepresentation receivedData:withDataSource:]): use dataSource instead of ivar
        (-[WebImageRepresentation receivedError:withDataSource:]): ditto
        (-[WebImageRepresentation finishedLoadingWithDataSource:]): ditto
        (-[WebImageRepresentation title]): ditto
        (-[WebImageRepresentation data]): ditto
        (-[WebImageRepresentation filename]): ditto
        (-[WebImageRepresentation archive]): ditto
        * WebView.subproj/WebResource.h:
        * WebView.subproj/WebResource.m:
        (-[WebResourcePrivate dealloc]): release new frame name ivar
        (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): take a frame name
        (-[WebResource frameName]): new
        (-[WebResource _initWithPropertyList:]): handle frame name
        (-[WebResource _initWithCachedResponse:originalURL:]): call renamed methods
        (-[WebResource _propertyListRepresentation]):
        * WebView.subproj/WebResourcePrivate.h: handle frame name

WebBrowser:

        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument mailPageAddress:]): call renamed methods

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

18 years ago Reviewed by Ken.
mjs [Fri, 16 Apr 2004 18:54:21 +0000 (18:54 +0000)]
    Reviewed by Ken.

Another JavaScript speed improvement: use the mechanism from
string append optimization to make taking a substring fast, again
sharing the buffer.

A further 22% improvement on the 24fun string speed test.

        * kjs/ustring.cpp:
        (KJS::):
        (KJS::UString::Rep::create):
        (KJS::UString::UString):
        (KJS::UString::append):
        (KJS::UString::operator=):
        (KJS::UString::substr):
        * kjs/ustring.h:
        (KJS::UString::Rep::data):

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

18 years ago Fix for 3624335, bugs with overflow and positioned objects. The scrollbar didn...
hyatt [Fri, 16 Apr 2004 01:07:35 +0000 (01:07 +0000)]
Fix for 3624335, bugs with overflow and positioned objects.  The scrollbar didn't properly update
as you changed the sizes of positioned objects inside an overflow block.

        Reviewed by rjw

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::layoutBlock):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutBlock):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateScrollInfoAfterLayout):

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

18 years ago Reviewed by Dave
kocienda [Thu, 15 Apr 2004 23:23:11 +0000 (23:23 +0000)]
    Reviewed by Dave

        Improved selection behavior. As part of this work, I removed
        almost all of the checkSelectionPoint() functions, leaving
        only those associated with fonts, and all of the
        checkSelectionPointIgnoringContinuations() functions. Each
        of these has been replaced by a new function called
        positionForCoordinates(), which returns a DOMPosition.

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset): Converted to use positionForCoordinates.
        * khtml/khtml_part.cpp: Ditto.
        (KHTMLPart::isPointInsideSelection):
        (KHTMLPart::handleMousePressEventDoubleClick): Ditto.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::handleMousePressEventSingleClick): Ditto.
        (KHTMLPart::handleMouseMoveEventSelection): Ditto.
        (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
        * khtml/khtml_part.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForBox): New helper.
        (khtml::RenderBlock::positionForRenderer): New helper.
        (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations.
        No special behavior is needed for this class anymore.
        * khtml/rendering/render_br.h: Ditoo.
        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_line.cpp:
        (InlineBox::firstLeafChild): New helper.
        (InlineBox::lastLeafChild): New helper.
        (InlineFlowBox::firstLeafChild): New helper.
        (InlineFlowBox::lastLeafChild): New helper.
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::firstLeafChild): New helper.
        (RenderObject::lastLeafChild): New helper.
        (RenderObject::positionForCoordinates):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint()
        (RenderText::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This
        checks to see if the node has a renderer before doing the position check.
        * khtml/xml/dom_nodeimpl.h: Ditto.
        * kwq/DOM.mm:
        (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates.

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

18 years ago Fix for 3603455, block truncation support.
hyatt [Thu, 15 Apr 2004 23:15:19 +0000 (23:15 +0000)]
Fix for 3603455, block truncation support.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/ecma/kjs_css.cpp:
        (cssPropertyName):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::lineCount):
        (khtml::RenderBlock::heightForLineCount):
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutHorizontalBox):
        (khtml::RenderFlexibleBox::layoutVerticalBox):
        * khtml/rendering/render_style.cpp:
        (marquee):
        (StyleCSS3NonInheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::lineClamp):
        (khtml::RenderStyle::setLineClamp):
        (khtml::RenderStyle::initialLineClamp):

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

18 years ago Make sure isOpaque returns NO when the WebHTMLVIew doesn't draw its background.
hyatt [Thu, 15 Apr 2004 22:28:07 +0000 (22:28 +0000)]
Make sure isOpaque returns NO when the WebHTMLVIew doesn't draw its background.

        Reviewed by darin

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

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

18 years ago * WebView.subproj/WebPreferencesPrivate.h:
sullivan [Thu, 15 Apr 2004 17:50:43 +0000 (17:50 +0000)]
    * WebView.subproj/WebPreferencesPrivate.h:
        added comments

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

18 years ago Updated fix for 3576315. Don't hardcode 22 as the titlebar
rjw [Thu, 15 Apr 2004 00:51:28 +0000 (00:51 +0000)]
Updated fix for 3576315.  Don't hardcode 22 as the titlebar
height.  (Note, other places in CarbonWindowFrame DO hardcode
window geometry information, yuck!).

        Reviewed by Hyatt.

        * Carbon.subproj/CarbonWindowFrame.m:

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

18 years agoRemove garbage from the render table header.
hyatt [Wed, 14 Apr 2004 23:05:14 +0000 (23:05 +0000)]
Remove garbage from the render table header.

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

18 years agoWebKit:
sullivan [Wed, 14 Apr 2004 20:39:56 +0000 (20:39 +0000)]
WebKit:

        - changed stealth mode preference name from "historyIsFrozen"
        to "privateBrowsingEnabled"

        Reviewed by Darin.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        updated for method name change

        * WebView.subproj/WebPreferences.m:
        changed preference key name
        (+[WebPreferences initialize]):
        updated for preference key name change
        (-[WebPreferences setPrivateBrowsingEnabled:]):
        changed name from setHistoryIsFrozen:
        (-[WebPreferences privateBrowsingEnabled]):
        changed name from historyIsFrozen:

        * WebView.subproj/WebPreferencesPrivate.h:
        changed declared method names

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for this and other recent changes

WebBrowser:

        fixed these bugs:
        <rdar://problem/3622190>: stealth mode menu item should be "Start Private Browsing�Stop Private Browsing"
        <rdar://problem/3622479>: Reword Private Browsing confirmation to use Ron's edited wording
        <rdar://problem/3622496>: stealth mode should automatically turn off between sessions

        Also, updated for WebKit stealth mode preference name change

        Reviewed by Darin.

        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        always turn off stealth mode on launch (previously did this only on Panther)
        (-[AppController confirmEnableStealthMode]):
        reworded confirmation title and message; also updated for preference name change
        (-[AppController toggleStealthMode:]):
        updated for preference name change
        (-[AppController validateUserInterfaceItem:]):
        use "Start/Stop" instead of checkmark to distinguish states; also updated for
        preference name change

        * BrowserWindowController.m:
        (-[BrowserWindowController searchField:shouldRememberSearchString:]):
        updated for preference name change

        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry setDownloadStage:]):
        updated for preference name change

        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:
        updated for these changes

        * English.lproj/MainMenu.nib:
        changed menu item in the nib to "Start Private Browsing�, though this
        doesn't really matter since the toggling menu item title comes from the code now.

        * FormCompletionController.m:
        (+[FormCompletionController shouldSaveFormData]):
        updated for preference name change
        (+[FormCompletionController shouldSaveUsernamesAndPasswords]):
        ditto

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

18 years ago Reviewed by Darin.
mjs [Wed, 14 Apr 2004 02:33:59 +0000 (02:33 +0000)]
    Reviewed by Darin.

- fixed <rdar://problem/3600695>: String manipulation in JavaScript 24fun test is very slow (slow)
- fixed <rdar://problem/3600691>: Table generation test is really slow
- fixed <rdar://problem/3600661>: 24fun date test is really slow

80% speedup on the string test, lesser speedups on the other two.

Two different optimizations here:

1) Avoid large overhead of scanning strings to see if they are all
ASCII before numeric conversion.

        * kjs/nodes.cpp:
        (AssignNode::evaluate): Don't convert to integer until we know for
sure the operation will need it. Attempting to convert strings to
numbers is a waste when they are being appended with +=.

2) Avoid huge cost of appending strings.

This is done by allowing multiple strings to share a buffer but
actually use different ranges of it. The first time a string is
appended to, we start leaving at least 10% extra space in the
buffer, so doing N appends to the same string takes O(log N)
mallocs instead of O(N).

        * kjs/identifier.cpp:
        (KJS::Identifier::equal):
        (KJS::Identifier::add):
        * kjs/ustring.cpp:
        (KJS::):
        (KJS::UCharReference::operator=):
        (KJS::UCharReference::ref):
        (KJS::UString::Rep::create):
        (KJS::UString::Rep::destroy):
        (KJS::UString::expandedSize):
        (KJS::UString::usedCapacity):
        (KJS::UString::expandCapacity):
        (KJS::UString::UString):
        (KJS::UString::null):
        (KJS::UString::append):
        (KJS::UString::operator=):
        (KJS::UString::toStrictUInt32):
        (KJS::UString::detach):
        (KJS::KJS::operator==):
        * kjs/ustring.h:
        (KJS::UString::Rep::data):
        (KJS::UString::Rep::hash):

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

18 years agoWebCore:
cblu [Wed, 14 Apr 2004 01:00:47 +0000 (01:00 +0000)]
WebCore:

- Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].

        Reviewed by rjw.

        * WebCore-combined.exp:
        * WebCore.exp:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
        (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API

WebKit:

- Added WebElementDOMNodeKey as a potential API so that clients can get the node from an element dictionary.
- Removed WebElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMDocument URLWithRelativeString:]): new potential API
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): indenting tweak
        (-[WebDefaultUIDelegate copyImageToClipboard:]): use WebElementDOMNodeKey
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _handleMouseDragged:]): use WebElementDOMNodeKey
        (-[WebHTMLView _dragOperationForDraggingInfo:]): use isContentEditable
        * WebView.subproj/WebView.h:
        * WebView.subproj/WebView.m:
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoAdd overflow test for overflow:scroll body quirk bug.
hyatt [Tue, 13 Apr 2004 23:02:01 +0000 (23:02 +0000)]
Add overflow test for overflow:scroll body quirk bug.

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

18 years ago Fix for 3559764, make sure overflow is applied consistently using a separate bit...
hyatt [Tue, 13 Apr 2004 22:57:12 +0000 (22:57 +0000)]
Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
the body scroll quirk can easily disable overflow even when it is present on the style.

        Reviewed by kocienda

        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::putValue):
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::setStyle):
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::layoutBlockChildren):
        (khtml::RenderBlock::paintObject):
        (khtml::RenderBlock::rightOffset):
        (khtml::RenderBlock::lowestPosition):
        (khtml::RenderBlock::rightmostPosition):
        (khtml::RenderBlock::leftmostPosition):
        (khtml::RenderBlock::isPointInScrollbar):
        (khtml::RenderBlock::nodeAtPoint):
        (khtml::RenderBlock::inRootBlockContext):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::overflowHeight):
        (khtml::RenderBlock::overflowWidth):
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        (RenderBox::contentWidth):
        (RenderBox::contentHeight):
        (RenderBox::absolutePosition):
        (RenderBox::computeAbsoluteRepaintRect):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutBlock):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::lowestPosition):
        (RenderFlow::rightmostPosition):
        (RenderFlow::leftmostPosition):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        (RenderLayer::updateScrollInfoAfterLayout):
        (RenderLayer::intersectsDamageRect):
        (RenderLayer::containsPoint):
        * khtml/rendering/render_object.cpp:
        (RenderObject::RenderObject):
        (RenderObject::requiresLayer):
        (RenderObject::clientWidth):
        (RenderObject::clientHeight):
        (RenderObject::scrollWidth):
        (RenderObject::scrollHeight):
        (RenderObject::setStyle):
        (RenderObject::absolutePosition):
        (RenderObject::nodeAtPoint):
        (RenderObject::avoidsFloats):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::hasOverflowClip):
        (khtml::RenderObject::hasAutoScrollbars):
        (khtml::RenderObject::scrollsOverflow):
        (khtml::RenderObject::includeScrollbarSize):
        (khtml::RenderObject::setHasOverflowClip):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::overflow):
        (khtml::RenderStyle::isDisplayReplacedType):
        (khtml::RenderStyle::isDisplayInlineType):
        * khtml/rendering/render_table.cpp:
        (RenderTable::setStyle):
        (RenderTableCell::setStyle):
        (RenderTableCell::requiresLayer):
        * khtml/rendering/render_table.h:

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

18 years ago Fixed deployment build failure.
cblu [Tue, 13 Apr 2004 17:57:46 +0000 (17:57 +0000)]
Fixed deployment build failure.

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _handleMouseDragged:]): removed use of fileWrapper variable

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

18 years ago Reviewed by John.
mjs [Mon, 12 Apr 2004 22:19:23 +0000 (22:19 +0000)]
    Reviewed by John.

- fix deployment build by avoiding deployment-only warning.

        * kjs/scope_chain.cpp:
        (KJS::ScopeChain::bottom):

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

18 years ago Fix for 3556036, make sure that when the position changes via style that all render...
hyatt [Mon, 12 Apr 2004 21:13:32 +0000 (21:13 +0000)]
Fix for 3556036, make sure that when the position changes via style that all render layer
descendants simply immediately repaint.

        Reviewed by kocienda

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::repaintIncludingDescendants):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

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

18 years agoWebCore:
cblu [Mon, 12 Apr 2004 20:46:13 +0000 (20:46 +0000)]
WebCore:

- Fixed build failure by removing references to WebArchive in WebCore.
- For HTML copy/paste, relative URLs are now made absolute at paste time instead of at copy time. This allows relative URLs to be kept relative if the destination page has the same base URL as the source page.

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping
        (PasteMarkupCommandImpl::doApply): if we have a base URL and it is different than the base URL of the document, fix the URLs in the new DOM tree
        * khtml/editing/htmlediting_impl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::toHTMLWithOptions): removed completeURLs param
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param
        (NodeImpl::recursive_toHTML): ditto
        (NodeImpl::recursive_completeURLs): new
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params
        (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL

WebKit:

Factored out WebArchive to DOM code so that it could be used by both [WebHTMLView _pasteFromPasteboard:] and [WebView insertWebArchive:replacingDOMRange:].

        Reviewed by kocienda.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithMarkupString:baseURL:]): moved from WebHTMLView
        (-[WebDataSource _replaceSelectionWithImageResource:]): ditto
        (-[WebDataSource _replaceSelectionWithWebArchive:]): ditto
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _replaceSelectionWithMarkupString:]): renamed
        (-[WebHTMLView _pasteFromPasteboard:]): call renamed methods
        * WebView.subproj/WebView.m:
        (-[WebView insertMarkupString:replacingDOMRange:]): call renamed methods
        (-[WebView insertWebArchive:replacingDOMRange:]): have data source handle the archive instead of the bridge

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

18 years agoWebCore:
kocienda [Mon, 12 Apr 2004 18:41:51 +0000 (18:41 +0000)]
WebCore:

        Reviewed by Dave

        Added execCommand support for cut/copy/paste.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases
        for the commands.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa.
        (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy.
        (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste.
        * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand
        to be implemented on the WebKit side of the bridge.
        * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support
        making layout tests.
        * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added.
        * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added.
        * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added.
        * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/cut-text-001.html: Added.

WebKit:

        Reviewed by Dave

        Added execCommand support for cut/copy/paste.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge issueCutCommand]): Glue for calling from WebCore to do a cut in Cocoa.
        (-[WebBridge issueCopyCommand]): Same as above, but for copy.
        (-[WebBridge issuePasteCommand]): Same as above, but for paste.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView copy:]): Move this to private implementation category so the bridge can see it.
        (-[WebHTMLView cut:]): Ditto.
        (-[WebHTMLView paste:]): Ditto.
        * WebView.subproj/WebHTMLViewPrivate.h: Move copy;, cut:, and paste: to private implementation
        category so the bridge can see it.
        * WebView.subproj/WebView.m:
        (-[WebView copy:]): Implemented by calling WebHTMLView to do the work.
        (-[WebView cut:]): Ditto.
        (-[WebView paste:]): Ditto.
        * WebView.subproj/WebViewPrivate.h: Added all the NSReponder methods we plan to implement as
        part of the WebKit editing API.

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

18 years ago Reviewed by John
kocienda [Mon, 12 Apr 2004 17:16:47 +0000 (17:16 +0000)]
    Reviewed by John

        Some delete and insert cleanups.

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::doApply): For ending position case 1,
        the caret should be placed before the first child of the containing block,
        not before the containing block itself. Also, add some code to handle
        converting nbsp's back to regular spaces. This will need to be improved
        some day to convert only nbsp's added by the editor to make rendering come out right.
        (InputTextCommandImpl::execute):
        (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part
        of the work of deleting a selection, rather than something that needs to be done by a
        user of DeleteSelectionCommandImpl. This makes it impossible to leave out
        this essential step.
        (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until
        the code to do deletions properly has been factored better. Big FIXME added.
        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for
        ending position case 1 behavior change.
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto.

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

18 years agoWebCore:
kocienda [Fri, 9 Apr 2004 23:30:18 +0000 (23:30 +0000)]
WebCore:

        Reviewed by Darin

        Added support for methods added to flesh out the WebKit
        editing API.

        * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions.
        All this work is now done in WebCoreBridge.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge isSelectionEditable]): Added a FIXME.
        (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the
        middle of editing code.
        (-[WebCoreBridge replaceSelectionWithNode:]): New method.
        (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText:
        (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method.
        (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method.
        (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline:
        (-[WebCoreBridge deleteSelection]): New method.
        (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method.

WebKit:

        Reviewed by Darin

        Stubbed in the entire WebKit editing API, improving some
        methods already present in minor ways, and adding those
        methods not yet present.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge editingKeyDown:]):
        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:stillSelecting:]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteMarkupString:]):
        * WebView.subproj/WebView.m:
        (-[WebView _alterCurrentSelection:direction:granularity:]):
        (-[WebView _currentSelectionIsEditable]):
        (-[WebView computedStyleForElement:pseudoElement:]):
        (-[WebView _editingKeyDown:]):
        (-[WebView setEditable:]):
        (-[WebView isEditable]):
        (-[WebView setTypingStyle:]):
        (-[WebView typingStyle]):
        (-[WebView setSmartInsertDeleteEnabled:]):
        (-[WebView smartInsertDeleteEnabled]):
        (-[WebView setContinuousSpellCheckingEnabled:]):
        (-[WebView isContinuousSpellCheckingEnabled]):
        (-[WebView spellCheckerDocumentTag]):
        (-[WebView undoManager]):
        (-[WebView insertNode:replacingDOMRange:]):
        (-[WebView insertText:replacingDOMRange:]):
        (-[WebView insertMarkupString:replacingDOMRange:]):
        (-[WebView insertWebArchive:replacingDOMRange:]):
        (-[WebView deleteDOMRange:]):
        (-[WebView applyStyle:toElementsInDOMRange:]):
        (-[WebView centerSelectionInVisibleArea:]):
        (-[WebView moveBackward:]):
        (-[WebView moveBackwardAndModifySelection:]):
        (-[WebView moveDown:]):
        (-[WebView moveDownAndModifySelection:]):
        (-[WebView moveForward:]):
        (-[WebView moveForwardAndModifySelection:]):
        (-[WebView moveLeft:]):
        (-[WebView moveLeftAndModifySelection:]):
        (-[WebView moveRight:]):
        (-[WebView moveRightAndModifySelection:]):
        (-[WebView moveToBeginningOfDocument:]):
        (-[WebView moveToBeginningOfLine:]):
        (-[WebView moveToBeginningOfParagraph:]):
        (-[WebView moveToEndOfDocument:]):
        (-[WebView moveToEndOfLine:]):
        (-[WebView moveToEndOfParagraph:]):
        (-[WebView moveUp:]):
        (-[WebView moveUpAndModifySelection:]):
        (-[WebView moveWordBackward:]):
        (-[WebView moveWordBackwardAndModifySelection:]):
        (-[WebView moveWordForward:]):
        (-[WebView moveWordForwardAndModifySelection:]):
        (-[WebView moveWordLeft:]):
        (-[WebView moveWordLeftAndModifySelection:]):
        (-[WebView moveWordRight:]):
        (-[WebView moveWordRightAndModifySelection:]):
        (-[WebView pageDown:]):
        (-[WebView pageUp:]):
        (-[WebView scrollLineDown:]):
        (-[WebView scrollLineUp:]):
        (-[WebView scrollPageDown:]):
        (-[WebView scrollPageUp:]):
        (-[WebView selectAll:]):
        (-[WebView selectParagraph:]):
        (-[WebView selectLine:]):
        (-[WebView selectWord:]):
        (-[WebView copy:]):
        (-[WebView cut:]):
        (-[WebView paste:]):
        (-[WebView copyFont:]):
        (-[WebView pasteFont:]):
        (-[WebView delete:]):
        (-[WebView pasteAsPlainText:]):
        (-[WebView pasteAsRichText:]):
        (-[WebView changeFont:]):
        (-[WebView changeAttributes:]):
        (-[WebView changeDocumentBackgroundColor:]):
        (-[WebView changeColor:]):
        (-[WebView alignCenter:]):
        (-[WebView alignJustified:]):
        (-[WebView alignLeft:]):
        (-[WebView alignRight:]):
        (-[WebView indent:]):
        (-[WebView insertTab:]):
        (-[WebView insertBacktab:]):
        (-[WebView insertNewline:]):
        (-[WebView insertParagraphSeparator:]):
        (-[WebView changeCaseOfLetter:]):
        (-[WebView uppercaseWord:]):
        (-[WebView lowercaseWord:]):
        (-[WebView capitalizeWord:]):
        (-[WebView deleteForward:]):
        (-[WebView deleteBackward:]):
        (-[WebView deleteBackwardByDecomposingPreviousCharacter:]):
        (-[WebView deleteWordForward:]):
        (-[WebView deleteWordBackward:]):
        (-[WebView deleteToBeginningOfLine:]):
        (-[WebView deleteToEndOfLine:]):
        (-[WebView deleteToBeginningOfParagraph:]):
        (-[WebView deleteToEndOfParagraph:]):
        (-[WebView complete:]):
        (-[WebView checkSpelling:]):
        (-[WebView showGuessPanel:]):
        (-[WebView performFindPanelAction:]):
        (-[WebView startSpeaking:]):
        (-[WebView stopSpeaking:]):
        (-[WebView insertText:]):
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoWebCore:
darin [Fri, 9 Apr 2004 23:04:13 +0000 (23:04 +0000)]
WebCore:

        Reviewed by Ken.

        - added "transparent mode"

        * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
        * khtml/khtmlview.cpp:
        (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
        (KHTMLView::isTransparent): Return isTransparent.
        (KHTMLView::setTransparent): Set isTransparent.

        * khtml/rendering/render_box.cpp:
        (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
        is transparent; also don't draw a background. This is the same thing we do for subframes.
        (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
        background color for the top frame when the view is transparent.
        * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
        when the view is not transparent.

        * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
        (don't draw background), then set isTransparent to true on the KHTMLView.

WebKit:

        Reviewed by Ken.

        - added "transparent mode"

        * WebView.subproj/WebFrameInternal.h: Added. Contains _updateDrawsBackground.
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _makeDocumentView]): Call _updateDrawsBackground to tell the newly created
        KHTMLView whether to draw a background or not.
        (-[WebFrame _setState:]): Don't tell the scroll view to start drawing background if the
        WebView is not supposed to draw a background.
        (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground: on the bridge, and do the
        same for all subframes.

        * WebView.subproj/WebFrameView.m: (-[WebFrameView setFrameSize:]): Only call setDrawsBackground:YES
        on the scroll view if the WebView has drawsBackground set to YES.

        * WebView.subproj/WebViewPrivate.h: Added new proposed API, setDrawsBackground and drawsBackground.
        Also added drawsBackground boolean to private structure.
        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]): Set drawsBackground to YES by default.
        (-[WebView setDrawsBackground:]): Added. Sets boolean and calls _updateDrawsBackground to update
        the flag for each frame.
        (-[WebView drawsBackground]): Added. Returns value of boolean.
        (-[WebView _bridgeForCurrentSelection]): Tweaked comment for no good reason.

        * WebView.subproj/WebViewInternal.h: Added, but empty for the moment.
        * WebView.subproj/WebFramePrivate.h: Tweaked a bit.

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

18 years ago Reviewed by me
kocienda [Fri, 9 Apr 2004 20:18:59 +0000 (20:18 +0000)]
    Reviewed by me

        Added one more layout test for editing.

        * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608445-fix.html: Added.

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

18 years agoJavaScriptCore:
mjs [Fri, 9 Apr 2004 20:07:47 +0000 (20:07 +0000)]
JavaScriptCore:

        Reviewed by John.

Changed things so that newly created objects get a prototype based
on the scope chain of the current function, rather than the
interpreter that started execution. This fixes the following bugs:

<rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
        <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)

* JavaScriptCore.pbproj/project.pbxproj:
        * kjs/array_object.cpp:
        (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments):
        (ArrayProtoFuncImp::ArrayProtoFuncImp):
        (ArrayProtoFuncImp::call):
        (ArrayObjectImp::construct):
        * kjs/bool_object.cpp:
        (BooleanObjectImp::construct):
        * kjs/date_object.cpp:
        (DateProtoFuncImp::DateProtoFuncImp):
        (DateProtoFuncImp::call):
        (DateObjectImp::construct):
        * kjs/error_object.cpp:
        (ErrorObjectImp::construct):
        * kjs/function.cpp:
        (FunctionImp::FunctionImp):
        (FunctionImp::call):
        (DeclaredFunctionImp::construct):
        (ArgumentsImp::ArgumentsImp):
        (GlobalFuncImp::call):
        * kjs/function_object.cpp:
        (FunctionProtoFuncImp::call):
        (FunctionObjectImp::construct):
        * kjs/internal.cpp:
        (BooleanImp::toObject):
        (StringImp::toObject):
        (NumberImp::toObject):
        (InterpreterImp::InterpreterImp):
        (InterpreterImp::clear):
        (InterpreterImp::interpreterWithGlobalObject):
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        (ExecState::lexicalInterpreter):
        * kjs/interpreter.h:
        (KJS::ExecState::dynamicInterpreter):
        (KJS::ExecState::interpreter):
        * kjs/math_object.cpp:
        (MathFuncImp::MathFuncImp):
        * kjs/nodes.cpp:
        (StatementNode::hitStatement):
        (StatementNode::abortStatement):
        (RegExpNode::evaluate):
        (ElementNode::evaluate):
        (ArrayNode::evaluate):
        (ObjectLiteralNode::evaluate):
        (PropertyValueNode::evaluate):
        (FunctionCallNode::evaluate):
        (FuncDeclNode::processFuncDecl):
        (FuncExprNode::evaluate):
        * kjs/number_object.cpp:
        (NumberObjectImp::construct):
        * kjs/object.cpp:
        (KJS::ObjectImp::defaultValue):
        (KJS::Error::create):
        * kjs/object_object.cpp:
        (ObjectObjectImp::construct):
        * kjs/reference.cpp:
        (Reference::putValue):
        * kjs/regexp_object.cpp:
        (RegExpProtoFuncImp::call):
        (RegExpObjectImp::arrayOfMatches):
        (RegExpObjectImp::construct):
        * kjs/scope_chain.cpp:
        (KJS::ScopeChain::bottom):
        * kjs/scope_chain.h:
        * kjs/string_object.cpp:
        (StringProtoFuncImp::StringProtoFuncImp):
        (StringProtoFuncImp::call):
        (StringObjectImp::construct):

WebCore:

        Reviewed by John.

Changed things so that newly created objects get a prototype based
on the scope chain of the current function, rather than the
interpreter that started execution. This fixes the following bugs:

<rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
        <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)

* khtml/ecma/kjs_binding.h:
        (KJS::cacheDOMObject):
        (KJS::cacheGlobalObject):
        * khtml/ecma/kjs_css.cpp:
        (KJS::getDOMStyleSheet):
        (KJS::getDOMStyleSheetList):
        (KJS::getDOMCSSValue):
        * khtml/ecma/kjs_dom.cpp:
        (KJS::getDOMDocumentNode):
        (KJS::getDOMNode):
        * khtml/ecma/kjs_events.cpp:
        (KJS::getDOMEvent):
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLDocument::putValue):
        (KJS::getSelectHTMLCollection):
        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::Navigator):
        (PluginBase::PluginBase):
        * khtml/ecma/kjs_window.cpp:
        (KJS::History::History):
        (KJS::FrameArray::FrameArray):
        (Screen::Screen):
        (Window::retrieveActive):
        (Window::put):
        (Window::isSafeScript):
        (WindowFunc::tryCall):
        (Location::put):
        (LocationFunc::tryCall):

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

18 years ago Fix for 3613081, repaint glitches when using overflow:auto/overlay.
hyatt [Fri, 9 Apr 2004 19:59:59 +0000 (19:59 +0000)]
Fix for 3613081, repaint glitches when using overflow:auto/overlay.

        Reviewed by john

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateScrollInfoAfterLayout):

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

18 years agoFixed build problem.
rjw [Fri, 9 Apr 2004 19:49:04 +0000 (19:49 +0000)]
Fixed build problem.

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

18 years ago Fix for 3608445, garbage characters rendered after doing delete. Delta was unsigned...
hyatt [Fri, 9 Apr 2004 19:02:45 +0000 (19:02 +0000)]
Fix for 3608445, garbage characters rendered after doing delete.  Delta was unsigned when it was supposed to
be signed, since deletion involves a negative delta.  Also had an off-by-one error in the line break end check.

        Reviewed by john

        * khtml/rendering/render_text.cpp:
        (RenderText::setTextWithOffset):

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

18 years agoWebKit:
cblu [Fri, 9 Apr 2004 18:48:40 +0000 (18:48 +0000)]
WebKit:

Fixed:
<rdar://problem/3616873>: support for pasting and drag and dropping of URLS to editable WebViews
<rdar://problem/3546417>: support for pasting and drag and dropping of images to editable WebViews

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMNode webArchive]): renamed from "archive" because "archive" collides with DOMHTMLObjectElement's method
        (-[DOMRange webArchive]): ditto
        * Misc.subproj/WebNSPasteboardExtras.h:
        * Misc.subproj/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_writeImage:URL:title:archive:]): take just an archive instead of an HTML string and file wrapper
        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:archive:rect:URL:title:event:]): take just an archive instead of an HTML string and file wrapper
        * WebView.subproj/WebDataProtocol.h:
        * WebView.subproj/WebDataProtocol.m:
        (+[NSURL _web_uniqueWebDataURL]): new
        (+[NSURL _web_uniqueWebDataURLWithRelativeString:]): new
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]): call renamed _web_writeImage
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _webDataRequestForData:MIMEType:textEncodingName:baseURL:unreachableURL:]): use _web_uniqueWebDataURL for creating a URL
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteImageResource:]): new
        (-[WebHTMLView _pasteFromPasteboard:]): renamed, now handles images and URLs
        (-[WebHTMLView _handleMouseDragged:]): call renamed _web_dragImage
        (-[WebHTMLView paste:]): call renamed _pasteFromPasteboard
        (-[WebHTMLView concludeDragOperation:]): call renamed _pasteFromPasteboard
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebImageRepresentation.m:
        (-[WebImageRepresentation archive]): new
        * WebView.subproj/WebImageView.m:
        (-[WebImageView writeImageToPasteboard:]): call renamed _web_writeImage
        (-[WebImageView mouseDragged:]): call renamed _web_dragImage

WebBrowser:

        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument dataRepresentationOfType:]): call renamed [DOMNode webArchive]
        (-[BrowserDocument mailPage:]): ditto

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

18 years ago Reviewed by me
kocienda [Fri, 9 Apr 2004 14:41:37 +0000 (14:41 +0000)]
    Reviewed by me

        Added two more layout tests for editing.

        * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added.
        * layout-tests/editing/selection/move-between-blocks-no-001.html: Added.
        * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added.
        * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added.

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

18 years ago Reviewed by Dave
kocienda [Fri, 9 Apr 2004 14:13:42 +0000 (14:13 +0000)]
    Reviewed by Dave

        Small collection of editing improvements.

        * ChangeLog:
        * khtml/editing/htmlediting_impl.cpp:
        (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding
        lines when the caret was at the start of a line. Fixed.
        (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous
        line when deleting a character at the start of a line after a BR.
        (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this
        only handled inserting a newline when the caret was already in a text node.
        (InputTextCommandImpl::prepareForTextInsertion): Ditto.
        (InputTextCommandImpl::execute): Ditto.
        * khtml/editing/htmlediting_impl.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret
        with a click in an empty block.
        * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click
        on a replaced element.
        * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall"
        by an image on the same line.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create
        a renderer for itself.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases.
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag.
        (TextImpl::rendererIsNeeded): Ditto.
        (EditingTextImpl::EditingTextImpl): New class.
        (EditingTextImpl::~EditingTextImpl): New.
        (EditingTextImpl::rendererIsNeeded): New. Always returns true.
        * khtml/xml/dom_textimpl.h: New EditingTextImpl class.
        * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608430-fix.html: Added.
        * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608462-fix.html: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added.

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

18 years ago Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand becaus...
cblu [Fri, 9 Apr 2004 01:05:03 +0000 (01:05 +0000)]
Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.

        Reviewed by kocienda.

        * ChangeLog:
        * khtml/editing/htmlediting.cpp:
        (PasteMarkupCommand::PasteMarkupCommand):
        (PasteMarkupCommand::~PasteMarkupCommand):
        (PasteMarkupCommand::impl):
        (PasteMarkupCommand::markupString):
        * khtml/editing/htmlediting.h:
        (khtml::):
        * khtml/editing/htmlediting_impl.cpp:
        (PasteMarkupCommandImpl::PasteMarkupCommandImpl):
        (PasteMarkupCommandImpl::~PasteMarkupCommandImpl):
        (PasteMarkupCommandImpl::commandID):
        (PasteMarkupCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:
        (khtml::PasteMarkupCommandImpl::markupString):
        * khtml/khtml_part.cpp:
        (KHTMLPart::pasteMarkupString):
        * khtml/khtml_part.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge pasteMarkupString:]):

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

18 years agochange version number to 137u. the tree is open
vicki [Thu, 8 Apr 2004 22:53:25 +0000 (22:53 +0000)]
change version number to 137u.  the tree is open

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

18 years agoSafari-136 stamp
vicki [Thu, 8 Apr 2004 22:48:02 +0000 (22:48 +0000)]
Safari-136 stamp

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

18 years agoRolling out previous commit. Tree was closed. Doh!
cblu [Thu, 8 Apr 2004 22:42:19 +0000 (22:42 +0000)]
Rolling out previous commit. Tree was closed. Doh!

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

18 years ago Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand becaus...
cblu [Thu, 8 Apr 2004 22:31:49 +0000 (22:31 +0000)]
Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (PasteMarkupCommand::PasteMarkupCommand):
        (PasteMarkupCommand::~PasteMarkupCommand):
        (PasteMarkupCommand::impl):
        (PasteMarkupCommand::markupString):
        * khtml/editing/htmlediting.h:
        (khtml::):
        * khtml/editing/htmlediting_impl.cpp:
        (PasteMarkupCommandImpl::PasteMarkupCommandImpl):
        (PasteMarkupCommandImpl::~PasteMarkupCommandImpl):
        (PasteMarkupCommandImpl::commandID):
        (PasteMarkupCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:
        (khtml::PasteMarkupCommandImpl::markupString):
        * khtml/khtml_part.cpp:
        (KHTMLPart::pasteMarkupString):
        * khtml/khtml_part.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge pasteMarkupString:]):

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

18 years ago Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting. Make sure...
hyatt [Thu, 8 Apr 2004 20:34:26 +0000 (20:34 +0000)]
Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting.  Make sure that the removal of line boxes
always checks the previous root line box's line break information and dirties the line if it is pointing
to the deleted object.

        Reviewed by kocienda

        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::removeChild):

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

18 years agoWebCore:
cblu [Thu, 8 Apr 2004 18:43:37 +0000 (18:43 +0000)]
WebCore:

Removed DOMExtensions.h from DOM.h until it is public.

        Reviewed by koicienda.

        * kwq/DOM.h:

WebKit:

Fixed: <rdar://problem/3548274>: API: DOM API for WebKit clients

        Reviewed by kocienda.

        * DOM.subproj/DOM.h: copied from WebCore
        * WebKit.pbproj/project.pbxproj: made our DOM headers public!

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

18 years agoTests:
cblu [Thu, 8 Apr 2004 18:05:30 +0000 (18:05 +0000)]
Tests:

Support for moving WebArchive to its own file.

        Reviewed by kocienda.

        * Blot/BlotApp.m:

WebKit:

Moved WebArchive to its own file.

        Reviewed by kocienda.

        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebArchive.h: Added.
        * WebView.subproj/WebArchive.m: Added.
        (-[WebArchive data]): renamed from dataRepresentation
        * WebView.subproj/WebDataSource.m:
        * WebView.subproj/WebFrame.m:
        * WebView.subproj/WebHTMLRepresentation.m:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _writeSelectionToPasteboard:]): call renamed [WebArchive data]
        * WebView.subproj/WebResource.h:
        * WebView.subproj/WebResource.m:

WebBrowser:

Support for moving WebArchive to its own file.

        Reviewed by kocienda.

        * BrowserDocument.m:
        (-[BrowserDocument dataRepresentationOfType:]): call renamed [WebArchive data]
        (-[BrowserDocument mailPage:]): ditto
        (-[BrowserDocument mailPageAddress:]): ditto

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

18 years agoTests:
cblu [Thu, 8 Apr 2004 00:46:35 +0000 (00:46 +0000)]
Tests:

Interact with WebArchives via WebDOMOperations.

        Reviewed by rjw.

        * Blot/BlotApp.m:
        (-[BlotApp handleNewMessageEvent:withReplyEvent:]):
        * Blot/BlotDocument.h:
        * Blot/BlotDocument.m:
        (-[BlotDocument dataRepresentationOfType:]):
        (-[BlotDocument loadArchive:]):

WebCore:

WebCore side for supporting WebDOMOperations.

        Reviewed by rjw.

        * WebCore-combined.exp:
        * WebCore.exp:
        * kwq/DOM.mm:
        * kwq/DOMExtensions.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (+[WebCoreBridge bridgeForDOMDocument:]): new
        (-[WebCoreBridge imageForImageElement:]): new

WebKit:

Created WebDOMOperations which are WebKit-specific categories on DOM objects.

        Reviewed by rjw.

        * DOM.subproj/DOMExtensions.h:
        * DOM.subproj/WebDOMOperations.h: Added.
        * DOM.subproj/WebDOMOperations.m: Added.
        (-[DOMNode _bridge]): new
        (-[DOMNode archive]): new
        (-[DOMNode markupString]): new
        (-[DOMRange _bridge]): new
        (-[DOMRange archive]): new
        (-[DOMRange markupString]): new
        (-[DOMHTMLImageElement image]):
        * WebCoreSupport.subproj/WebBridge.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge webFrame]): new
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _archiveWithMarkupString:subresourceURLStrings:]): moved from WebHTMLRepresentation
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]): call markupString on the node
        * WebView.subproj/WebDocumentPrivate.h:
        * WebView.subproj/WebFrame.m:
        (+[WebFrame frameForDOMDocument:]): new
        (-[WebFrame loadArchive:]): renamed
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebHTMLRepresentation.h:
        * WebView.subproj/WebHTMLRepresentation.m:
        * WebView.subproj/WebHTMLRepresentationPrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectedArchive:]): renamed
        (-[WebHTMLView _handleMouseDragged:]): called renamed methods

WebBrowser:

Interact with WebArchives via WebDOMOperations.

        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument canSaveAsWebArchive]): check for the renamed WebDocumentDOM protocol
        (-[BrowserDocument dataRepresentationOfType:]): use the archive method on node
        (-[BrowserDocument validateUserInterfaceItem:]): check for the renamed WebDocumentDOM protocol
        (-[BrowserDocument mailPage:]): use the archive method on node

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

18 years agoWebCore:
darin [Thu, 8 Apr 2004 00:36:32 +0000 (00:36 +0000)]
WebCore:

        Reviewed by Chris.

        * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration
        (after API review, oops!, but I doubt anyone will even notice).
        * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category.

WebKit:

        Reviewed by Chris.

        * DOM.subproj/DOMCSS.h: Updated from WebCore.

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

18 years ago Reviewed by Darin and Dave (many weeks ago....I am so ashamed for not landing)
kocienda [Wed, 7 Apr 2004 23:33:57 +0000 (23:33 +0000)]
    Reviewed by Darin and Dave (many weeks ago....I am so ashamed for not landing)

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge expiresTimeForResponse:]): Now adds in the difference between
        the Mac OS X epoch and the "standard" unix epoch when passing back a time
        that WebCore will use for its cache expiration determinations.

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

18 years ago Reviewed by Chris
kocienda [Wed, 7 Apr 2004 23:25:45 +0000 (23:25 +0000)]
    Reviewed by Chris

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between
        the doctype and the content. The newline was showing up when the content was pasted.

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

18 years ago Fix for 3604388. The runtime version check (_CFExecutableLinkedOnOrAfter) used...
rjw [Wed, 7 Apr 2004 21:06:42 +0000 (21:06 +0000)]
Fix for 3604388.  The runtime version check (_CFExecutableLinkedOnOrAfter) used by many of
our frameworks doesn't work for CFM apps.  So, conditional panther bugs fixes aren't
being pickup by CFM apps that use WebKit, specifically Contribute.  This particular radar
describes a problem that was conditionally fixed in the AppKit for panther.  The work-around
is to force NSBitmapImageRep to execute to conditional code.

        Reviewed by Maciej.

        * Carbon.subproj/CarbonUtils.m:
        (WebInitForCarbon):

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

18 years ago Reviewed by John
kocienda [Wed, 7 Apr 2004 18:52:47 +0000 (18:52 +0000)]
    Reviewed by John

        Removed concept of currentSelection from EditCommands and refined concept of
        startingSelection and endingSelection, making them work more sensibly in the
        system of composed editing commands.

        * khtml/editing/htmlediting.cpp: Removed currentSelection().
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp: currentSelection().
        (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection
        and endingSelection for the command being applied to the endingSelection of
        its new parent. This is the proper starting and ending point.
        (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection
        to endingSelection.
        (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto.
        (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection
        to endingSelection.
        (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection
        to endingSelection.
        (InputNewlineCommandImpl::doApply): Ditto.
        (InputTextCommandImpl::deleteCharacter): Ditto.
        (InputTextCommandImpl::prepareForTextInsertion): Ditto.
        (InputTextCommandImpl::execute): Ditto.
        (PasteHTMLCommandImpl::doApply): Ditto.
        (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.
        (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection
        to endingSelection.
        (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.
        * khtml/editing/htmlediting_impl.h:
        (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.

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

18 years ago Reviewed by John
kocienda [Wed, 7 Apr 2004 17:55:08 +0000 (17:55 +0000)]
    Reviewed by John

        Make paste work again. It has been broken for some undetermined
        period of time.

        * khtml/editing/htmlediting_impl.cpp:
        (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when
        the reference node has children, or is an empty block.
        (CompositeEditCommandImpl::inputText): New convenience to create and
        apply an InputTextCommand.
        (InputTextCommandImpl::execute): Collapse whitespace when selection is
        not a range. Deleting the selection when it is a range already does that,
        so no need to make special accommodation for it.
        (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using
        an initialization list.
        (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for
        InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM
        namespace. Clean up selection access; no need to grep around for it, the
        desired selection is returned by calling currentSelection(). Treat "simple
        text paste" like typing. Tighten up and simplify HTML fragment paste; no
        real change in algorithm.
        (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable
        not initialized. This bug was introduced by a recent change by me. Fixing now.
        * khtml/editing/htmlediting_impl.h: Add inputText() declaration.

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

18 years ago Fixed 3510805. Only release pool in timer if the current nesting level of the
rjw [Wed, 7 Apr 2004 00:24:23 +0000 (00:24 +0000)]
Fixed 3510805.  Only release pool in timer if the current nesting level of the
pool matches the nesting level when the pool was created.

        Reviewed by Chris.

        * Carbon.subproj/CarbonUtils.m:
        (getNumPools):
        (WebInitForCarbon):
        (PoolCleaner):

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

18 years agoTests:
kocienda [Tue, 6 Apr 2004 23:08:51 +0000 (23:08 +0000)]
Tests:

        Reviewed by Richard

        Default document is now blank, since blinking a caret in
        an empty document is now supported.

        Added some code to move the caret to the start of the
        body element after loading it.

        Improved the code which makes the whole document
        contenteditable (by checking for and setting contenteditable,
        if needed).

        * Blot/BlotDocument.m:
        (-[BlotDocument webView:didFinishLoadForFrame:]):
        * Blot/Resources/default.html:

WebCore:

        Reviewed by Richard

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element
        of a selection that is contenteditable, if any of the nodes are. The "first"
        determination is made by doing a document-order search.
        * khtml/khtml_part.h:
        * khtml/xml/dom_nodeimpl.cpp: Remove debug spam.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before
        setting the selection. This was needed for Blot, so that setting the
        contenteditable attribute on the body is "seen" when the attempt is made
        to set the selection right immediately after.

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

18 years ago After columns have been expanded to their preferred sizes, if space is left over...
hyatt [Tue, 6 Apr 2004 21:03:24 +0000 (21:03 +0000)]
After columns have been expanded to their preferred sizes, if space is left over in the table, then
fixed columns should expand to fill space before percentage width columns do.  The old code had it
backwards.

        Reviewed by john

        * khtml/rendering/table_layout.cpp:
        (AutoTableLayout::layout):

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

18 years agoWebKit:
cblu [Tue, 6 Apr 2004 21:00:43 +0000 (21:00 +0000)]
WebKit:

Fixed: <rdar://problem/3613974>: remove "to Clipboard" from context menus because it is redundant

        Reviewed by john.

        * English.lproj/Localizable.strings:
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate menuItemWithTag:]):

WebBrowser:

Fixed: <rdar://problem/3316489>: ER: Safari� image context menu should have "Copy Image Address"

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): added "Copy Image Address" for Tiger only, moved "Add Link to Bookmarks" above "Copy Link" to keep all copy-related menu items at the bottom
        (-[BrowserWebView copyImageAddress:]): new
        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 16:01:01 +0000 (16:01 +0000)]
    Reviewed by Dave

        * khtml/dom/dom_node.cpp:
        (Node::isContentEditable): Added. Calls through to impl function of same name.
        * khtml/dom/dom_node.h: Added isContentEditable declaration.
        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change
        to an i-beam whenever it is over a node that is contenteditable, and nothing,
        like a link, takes precedence.

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 15:50:13 +0000 (15:50 +0000)]
    Reviewed by Dave

        * khtml/css/html4.css: Refine focus rules so that HTML and BODY
        elements do not draw a focus ring around themselves when focused.
        This prevents a silly-looking focus ring from drawing around a
        document's entire contents when a body element is contenteditable.

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 15:25:15 +0000 (15:25 +0000)]
    Reviewed by Dave

        Caret height is now the height of the tallest element on the line,
        mimicking NSText behavior.

        * khtml/rendering/render_box.cpp:
        (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow
        for the calculation of caret height.
        * khtml/rendering/render_text.cpp:
        (RenderText::caretPos): Ditto.

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

18 years ago Reviewed by me
kocienda [Tue, 6 Apr 2004 15:21:34 +0000 (15:21 +0000)]
    Reviewed by me

        Added a new suite of layout tests for editing, all added
        in the new layout-tests/editing subtree.

        * layout-tests/editing/abe.jpg: Added.
        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-001.html: Added.
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-002.html: Added.
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-003.html: Added.
        * layout-tests/editing/deleting/delete-br-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-001.html: Added.
        * layout-tests/editing/deleting/delete-br-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-002.html: Added.
        * layout-tests/editing/deleting/delete-br-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-003.html: Added.
        * layout-tests/editing/deleting/delete-br-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-004.html: Added.
        * layout-tests/editing/deleting/delete-br-005-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-005.html: Added.
        * layout-tests/editing/deleting/delete-br-006-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-006.html: Added.
        * layout-tests/editing/deleting/delete-character-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-character-001.html: Added.
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-image-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-001.html: Added.
        * layout-tests/editing/deleting/delete-image-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-002.html: Added.
        * layout-tests/editing/deleting/delete-image-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-003.html: Added.
        * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-leading-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-selection-001.html: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added.
        * layout-tests/editing/editing.js: Added.
        * layout-tests/editing/inserting/typing-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-001.html: Added.
        * layout-tests/editing/inserting/typing-002-expected.txt: Added.
        * layout-tests/editing/inserting/typing-002.html: Added.
        * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-around-br-001.html: Added.
        * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-around-image-001.html: Added.
        * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-001.html: Added.
        * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-002.html: Added.
        * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-003.html: Added.
        * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-004.html: Added.
        * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-005.html: Added.
        * layout-tests/editing/selection/move-by-character-001-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-001.html: Added.
        * layout-tests/editing/selection/move-by-character-002-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-002.html: Added.
        * layout-tests/editing/selection/move-by-character-003-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-003.html: Added.
        * layout-tests/editing/selection/move-by-character-004-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-004.html: Added.
        * layout-tests/editing/selection/move-by-character-005-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-005.html: Added.
        * layout-tests/editing/undo/redo-typing-001-expected.txt: Added.
        * layout-tests/editing/undo/redo-typing-001.html: Added.
        * layout-tests/editing/undo/undo-typing-001-expected.txt: Added.
        * layout-tests/editing/undo/undo-typing-001.html: Added.

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

18 years agoWebCore:
kocienda [Tue, 6 Apr 2004 15:14:30 +0000 (15:14 +0000)]
WebCore:

        Reviewed by Dave

        Added execCommand feature.
        Added Javascript selection object.
        This lays the groundwork for layout tests for editing.

        * khtml/dom/dom_doc.cpp:
        (DOM::Document::execCommand): Added. Calls through to impl's execCommand.
        * khtml/dom/dom_doc.h: Added execCommand declaration.
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document.
        * khtml/ecma/kjs_dom.h: Added ExecCommand constant.
        (KJS::DOMDocument::):
        * khtml/ecma/kjs_dom.lut.h: Generated file.
        * khtml/ecma/kjs_window.cpp:
        (Window::Window): Initialize selection object.
        (Window::selection): Return window's selection object.
        (Window::mark): Mark selection object.
        (WindowFunc::tryCall): Return selection object on GetSelection.
        (LocationFunc::tryCall): Added.
        (Selection::Selection): Added.
        (Selection::~Selection): Added.
        (Selection::get): Added.
        (Selection::put): Added.
        (Selection::toPrimitive): Added.
        (Selection::toString): Added.
        (SelectionFunc::tryCall): Added.
        * khtml/ecma/kjs_window.h:
        (KJS::Selection::): Added.
        (KJS::Selection::part): Added.
        (KJS::Selection::classInfo): Added.
        * khtml/ecma/kjs_window.lut.h: Generated file.
        * khtml/editing/htmlediting_impl.cpp:
        (debugPosition): Debugging aid.
        (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position
        if you are about to delete it. Fixes a crasher I discovered while writing tests.
        (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0
        instead of 1 in a block in delete case 1.
        (InputTextCommandImpl::prepareForTextInsertion):
        (TypingCommandImpl::issueCommandForDeleteKey):
        * khtml/khtml_part.h:
        * khtml/khtml_selection.cpp:
        (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed.
        (KHTMLSelection::debugPosition): Debugging aid.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::execCommand): Added. Supports five different commands.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::previousEditable): Use false instead of 0 for equality check.
        (NodeImpl::nextEditable): Ditto.
        * khtml/xml/dom_position.cpp:
        (DOMPosition::equivalentLeafPosition): New function
        (DOMPosition::previousRenderedEditablePosition): New function
        (DOMPosition::nextRenderedEditablePosition): New function
        (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly.
        (DOMPosition::equivalentDownstreamPosition): Ditto.
        (DOMPosition::atStartOfContainingEditableBlock):New function
        (DOMPosition::atStartOfRootEditableBlock):New function
        * khtml/xml/dom_position.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically.
        (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo.
        * kwq/KWQRenderTreeDebug.cpp:
        (nodePositionRelativeToRoot): New function to generate log information for the selection.
        (writeSelection): Writes the selection if there is one.
        (externalRepresentation): Calls writeSelection
        * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand.

WebKit:

        Reviewed by Dave

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge issueUndoCommand]): New method. Forwards call to the undo manager. Added
        to support undo called via Javascript execCommand.
        (-[WebBridge issueRedoCommand]): Ditto.

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

18 years ago * khtml/html/kentities.gperf: Added &COPY; and &REG;, both supported by Gecko
darin [Tue, 6 Apr 2004 02:10:56 +0000 (02:10 +0000)]
    * khtml/html/kentities.gperf: Added &COPY; and &REG;, both supported by Gecko
        (and presumably by WinIE). Also re-sorted the list.
        * khtml/html/kentities.c: Regenerated.

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

18 years ago Reviewed by Dave.
darin [Tue, 6 Apr 2004 01:09:45 +0000 (01:09 +0000)]
    Reviewed by Dave.

        - rolled over fix from KHTML tree; anchor inside another anchor

        * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint):
        Make sure the URL element is the innermost one, by not setting it once
        it's already set.

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

18 years ago Implement overflow: overlay so that a scrollbar can show/hide without causing a...
hyatt [Mon, 5 Apr 2004 21:35:05 +0000 (21:35 +0000)]
Implement overflow: overlay so that a scrollbar can show/hide without causing a layout.

        Reviewed by darin

        * ChangeLog:
        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::layoutBlockChildren):
        (khtml::RenderBlock::rightOffset):
        * khtml/rendering/render_box.cpp:
        (RenderBox::contentWidth):
        (RenderBox::contentHeight):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateScrollInfoAfterLayout):
        * khtml/rendering/render_object.cpp:
        (RenderObject::clientWidth):
        (RenderObject::clientHeight):
        * khtml/rendering/render_style.h:
        (khtml::):
        (khtml::RenderStyle::hasAutoScrollbars):
        (khtml::RenderStyle::scrollsOverflow):
        (khtml::RenderStyle::includeScrollbarSize):

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

18 years agoTests:
cblu [Mon, 5 Apr 2004 20:46:50 +0000 (20:46 +0000)]
Tests:

Made PDFBundle compilable and made it test the new selection SPI.

        * PDFBundle/Apple.pdf: Added.
        * PDFBundle/PDFBundle.pbproj/project.pbxproj:
        * PDFBundle/PDFView.h:
        * PDFBundle/PDFView.m:
        (-[PDFResourceDelegate connection:didReceiveData:]):
        (-[PDFResourceDelegate connectionDidFinishLoading:]):
        (-[PDFResourceDelegate connection:didFailLoadingWithError:]):
        (-[PDFView initWithFrame:pageURL:resourceURL:container:]):
        (-[PDFView dealloc]):
        (-[PDFView setIsSelected:]):
        (-[PDFView isSelected]):
        (-[PDFView drawRect:]):
        (-[PDFView layout]):
        (-[PDFRepresentation receivedError:withDataSource:]):
        (-[PDFRepresentation title]):
        (+[PDFPluginViewFactory pluginViewWithArguments:]):
        * PDFBundle/pdf.html: Added.

WebCore:

Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection

        Reviewed by kocienda.

        * WebCore.pbproj/project.pbxproj:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
        * khtml/rendering/render_replaced.h:
        (khtml::RenderWidget::selectionState): new override
        * kwq/KWQWidget.h:
        * kwq/KWQWidget.mm:
        (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
        (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectionColor]): new

WebKit:

Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection

        Reviewed by kocienda.

        * Plugins.subproj/WebPlugin.h: extended SPI for selection
        * Plugins.subproj/WebPluginContainer.h: ditto
        * Plugins.subproj/WebPluginController.m:
        (-[WebPluginController selectionColor]): new, calls [WebCoreBridge selectionColor]
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge setIsSelected:forView:]): new, calls [WebPlugin setIsSelected:]
        (-[WebBridge isViewSelected:]): new, calls [WebPlugin isSelected]

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

18 years ago*** empty log message ***
hyatt [Sat, 3 Apr 2004 20:17:32 +0000 (20:17 +0000)]
*** empty log message ***

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

18 years ago Fix for 3601728, text overlaps borders at ejai.org. Remove all the code in addForbi...
hyatt [Sat, 3 Apr 2004 20:15:28 +0000 (20:15 +0000)]
Fix for 3601728, text overlaps borders at ejai.org.  Remove all the code in addForbidden for
dir, menu, nobr, and pre that made them too restrictive regarding what child tags they could
contain.

        Reviewed by kocienda

        * khtml/html/dtd.cpp:
        (DOM::addForbidden):
        (DOM::removeForbidden):

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

18 years ago Forgot to add the WebKit copy of DOMExtensions.h.
cblu [Fri, 2 Apr 2004 19:55:51 +0000 (19:55 +0000)]
Forgot to add the WebKit copy of DOMExtensions.h.

        * DOM.subproj/DOMExtensions.h: Added.

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

18 years agoWebKit:
sullivan [Fri, 2 Apr 2004 19:48:00 +0000 (19:48 +0000)]
WebKit:

        Reviewed by Dave.

        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences historyIsFrozen]):
        take out OMIT_TIGER_FEATURES ifdeffing, since if we turn this into API
        then we'll probably want it to work in Panther also. To protect Safari users,
        Safari now explicitly sets historyIsFrozen to NO when starting up in Panther.

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

WebBrowser:

        - made enough improvements to "Stealth Browsing" to consider this bug fixed:
        <rdar://problem/3184383>: Would like ability to do "stealth browsing" without
        leaving any tracks behind (history, etc.)

        Reviewed by Dave.

        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        call [WebPreferences historyIsFrozen:NO] on Panther so command-line settings of
        this preference won't persist
        (-[AppController confirmEnableStealthMode]):
        new method, puts up a confirmation dialog explaining what stealth mode is, and
        turns stealth mode on if confirmed. I sent mail to Steve Lemay and Ron Brannan
        to discuss the wording of the dialog, among other things.
        (-[AppController toggleStealthMode:]):
        now calls confirmEnableStealthMode when stealth mode is being turned on

        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry setDownloadStage:]):
        always remove successful downloads when they finish when in stealth mode

        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:
        udpated for these changes

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

18 years agoWebCore:
cblu [Fri, 2 Apr 2004 19:43:26 +0000 (19:43 +0000)]
WebCore:

Moved the DOM extensions to their own headers

        Reviewed by kocienda.

        * WebCore.pbproj/project.pbxproj:
        * kwq/DOM.h: include DOMExtensions.h
        * kwq/DOMExtensions.h: Added.
        * kwq/DOMHTML.h: moved extensions to DOMExtensions.h
        * kwq/DOMHTML.mm: Renamed to match header

WebKit:

Moved the DOM extensions to their own headers

        Reviewed by kocienda.

        * DOM.subproj/DOM.h: changed from WebCore
        * DOM.subproj/DOMHTML.h: ditto
        * WebKit.pbproj/project.pbxproj: added DOMExtensions.h
        * copy-webcore-files-to-webkit: copy DOMExtensions.h

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

18 years ago Fix for 3610662, rendering sometimes doesn't update in response to mouse events...
hyatt [Fri, 2 Apr 2004 19:30:17 +0000 (19:30 +0000)]
Fix for 3610662, rendering sometimes doesn't update in response to mouse events that change style.
The document changed list was getting messed up.

        Reviewed by darin

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateDocumentsRendering):
        * khtml/xml/dom_docimpl.h:

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

18 years agochange version number from 135 to 136u.
vicki [Fri, 2 Apr 2004 18:52:41 +0000 (18:52 +0000)]
change version number from 135 to 136u.

The tree is open!

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

18 years agoSafari-135 stamp
vicki [Fri, 2 Apr 2004 18:47:56 +0000 (18:47 +0000)]
Safari-135 stamp

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

18 years ago Based on a fix by Eric Albert.
darin [Thu, 1 Apr 2004 21:55:27 +0000 (21:55 +0000)]
    Based on a fix by Eric Albert.

        - fixed <rdar://problem/3594247>: Safari crashes when a background image has a height or width of 0

        * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended):
        Change code path so we don't mod with 0.

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

18 years ago Fixed 3609493. Don't remove the plugin's view until after
rjw [Thu, 1 Apr 2004 21:47:53 +0000 (21:47 +0000)]
Fixed 3609493.  Don't remove the plugin's view until after
sending pluginDestroy.  This change was requested by Greg
and is needed in the Lavender update.

        Reviewed by Greg Bolsinga.

        * Plugins.subproj/WebPluginController.m:
        (-[WebPluginController destroyAllPlugins]):
        * Plugins.subproj/npruntime.h:
Nothing changed, just need to checkin copy from WebCore.

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

18 years ago Reviewed by Dave.
darin [Thu, 1 Apr 2004 20:08:23 +0000 (20:08 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3608305>: DEMO: menu in search field has one disabled item: localized string not found

        * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl):
        Initialize m_maxResults to 0.

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

18 years ago Reviewed by John.
darin [Thu, 1 Apr 2004 18:06:14 +0000 (18:06 +0000)]
    Reviewed by John.

        - cleaned up image map code and made it work with XML documents

        * khtml/html/html_documentimpl.h: Removed getMap and mapMap.
        * khtml/html/html_documentimpl.cpp: Removed getMap; moved to base class.

        * khtml/html/html_imageimpl.cpp:
        (HTMLMapElementImpl::~HTMLMapElementImpl): Call new removeImageMap function instead
        of manipulating the mapMap field directly.
        (HTMLMapElementImpl::parseHTMLAttribute): Rewrite name changing code for simplicity
        and to avoid running off the end of the bufffer.
        Also remove image map before changing name so it doesn't end up in the map twice
        under both the old and new names.
        * khtml/html/html_imageimpl.h: Use a DOMString instead of QString for the name, since
        the public API already uses a DOMString.

        * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): Call the new
        getImageMap instead of the old getMap.

        * khtml/xml/dom_docimpl.h: Added addImageMap, removeImageMap, getImageMap, and m_imageMapsByName.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::addImageMap): Added. Stores the image map under its name, unless there's
        already another map of the same.
        (DocumentImpl::removeImageMap): Added. Removes the image map if it's already filed by
        name. Avoid pitfall of removing another image map that has the same name.
        (DocumentImpl::getImageMap): Added. Simplified version of logic from getMap in HTMLDocumentImpl.

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

18 years ago Reviewed by Ken.
darin [Thu, 1 Apr 2004 17:23:09 +0000 (17:23 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3608978>: dual <map> means you can't select the enter site button at jurassicpark.com (same problem in MacIE, works in Netscape)

        * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::parseHTMLAttribute):
        Make the first <map> seen win, as in other browsers. The old code made the last <map> seen win.

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

18 years ago Reviewed by me
kocienda [Thu, 1 Apr 2004 14:08:31 +0000 (14:08 +0000)]
    Reviewed by me

        Missing file broke build after my last checkin

        * ForwardingHeaders/rendering/render_line.h: Added.

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

18 years agoMore header shuffling.
rjw [Thu, 1 Apr 2004 02:10:46 +0000 (02:10 +0000)]
More header shuffling.

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

18 years agoRearranged header.
rjw [Thu, 1 Apr 2004 02:10:19 +0000 (02:10 +0000)]
Rearranged header.

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

18 years agoRearranging headers. Updated comments.
rjw [Thu, 1 Apr 2004 02:08:55 +0000 (02:08 +0000)]
Rearranging headers.  Updated comments.

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

18 years agoCommitting copied version of npruntime.h.
rjw [Thu, 1 Apr 2004 01:07:32 +0000 (01:07 +0000)]
Committing copied version of npruntime.h.

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

18 years ago Tedious renames based on feedback from plugin-futures list.
rjw [Thu, 1 Apr 2004 00:43:52 +0000 (00:43 +0000)]
Tedious renames based on feedback from plugin-futures list.
NP_ functions are renamed with NPN_ prefix.
Types prefix renamed from NP_ to NP.
NPN_CreateStringWithUTF8 and NPN_SetExceptionWithUTF8 now take a length, optionally -1 if string is null terminated.

No review because this was just a renaming patch.

        * bindings/NP_jsobject.cpp:
        (listFromNPArray):
        (jsAllocate):
        (identiferFromNPIdentifier):
        (NPN_Call):
        (NPN_Evaluate):
        (NPN_GetProperty):
        (NPN_SetProperty):
        (NPN_RemoveProperty):
        (NPN_ToString):
        (NPN_GetPropertyAtIndex):
        (NPN_SetPropertyAtIndex):
        * bindings/NP_jsobject.h:
        * bindings/c/c_class.cpp:
        (CClass::_commonInit):
        (CClass::classForIsA):
        (CClass::CClass):
        (CClass::methodsNamed):
        (CClass::fieldNamed):
        * bindings/c/c_class.h:
        * bindings/c/c_instance.cpp:
        (CInstance::CInstance):
        (CInstance::~CInstance):
        (CInstance::operator=):
        (CInstance::invokeMethod):
        (CInstance::defaultValue):
        * bindings/c/c_instance.h:
        (KJS::Bindings::CInstance::getObject):
        * bindings/c/c_runtime.cpp:
        (CField::valueFromInstance):
        (CField::setValueToInstance):
        * bindings/c/c_runtime.h:
        (KJS::Bindings::CField::CField):
        (KJS::Bindings::CField::name):
        (KJS::Bindings::CMethod::CMethod):
        (KJS::Bindings::CMethod::name):
        * bindings/c/c_utility.cpp:
        (coerceValueToNPString):
        (convertValueToNPValueType):
        (convertNPValueTypeToValue):
        * bindings/c/c_utility.h:
        * bindings/npruntime.cpp:
        (NPN_IdentifierFromUTF8):
        (NPN_IsValidIdentifier):
        (NPN_GetIdentifiers):
        (NPN_UTF8FromIdentifier):
        (NPN_CreateObject):
        (NPN_RetainObject):
        (NPN_ReleaseObject):
        (NPN_IsKindOfClass):
        (NPN_SetExceptionWithUTF8):
        (NPN_SetException):
        (numberAllocate):
        (NPN_CreateNumberWithInt):
        (NPN_CreateNumberWithFloat):
        (NPN_CreateNumberWithDouble):
        (NPN_IntFromNumber):
        (NPN_FloatFromNumber):
        (NPN_DoubleFromNumber):
        (stringAllocate):
        (NPN_CreateStringWithUTF8):
        (NPN_CreateStringWithUTF16):
        (NPN_DeallocateUTF8):
        (NPN_UTF8FromString):
        (NPN_UTF16FromString):
        (NPN_StringLength):
        (booleanAllocate):
        (NPN_CreateBoolean):
        (NPN_BoolFromBoolean):
        (nullAllocate):
        (NPN_GetNull):
        (undefinedAllocate):
        (NPN_GetUndefined):
        (arrayAllocate):
        (arrayDeallocate):
        (NPN_CreateArray):
        (NPN_CreateArrayV):
        (NPN_ObjectAtIndex):
        * bindings/npruntime.h:
        * bindings/runtime.cpp:
        (Instance::createBindingForLanguageInstance):
        * bindings/testbindings.cpp:
        (initializeIdentifiers):
        (myHasProperty):
        (myHasMethod):
        (myGetProperty):
        (mySetProperty):
        (logMessage):
        (setDoubleValue):
        (setIntValue):
        (setStringValue):
        (setBooleanValue):
        (getDoubleValue):
        (getIntValue):
        (getStringValue):
        (getBooleanValue):
        (myInvoke):
        (myAllocate):
        (myInvalidate):
        (myDeallocate):
        (main):

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

18 years ago Reviewed by Dave.
kocienda [Thu, 1 Apr 2004 00:34:07 +0000 (00:34 +0000)]
    Reviewed by Dave.

        Many, many editing improvements, with a concentration on getting
        caret navigation and deleting selections working correctly.

        * WebCore.pbproj/project.pbxproj:
        * khtml/dom/dom_position.cpp: Removed.
        * khtml/dom/dom_position.h: Removed.
        * khtml/editing/htmlediting.cpp:
        (EditCommand::isNull): Inlined.
        (EditCommand::notNull): New function.
        (EditCommand::parent): Commands now have parents. Allows for walking the tree of composite commands.
        (EditCommand::setParent): Ditto.
        (EditCommand::emptyCommand): Returns a static empty command.
        (AppendNodeCommand::AppendNodeCommand):
        (AppendNodeCommand::parentNode): Member variable name change only. parent -> parentNode.
        (DeleteCollapsibleWhitespaceCommand::DeleteCollapsibleWhitespaceCommand): New command.
        (InputTextCommand::InputTextCommand):
        (InputTextCommand::input):
        (InputTextCommand::charactersAdded):
        (JoinTextNodesCommand::JoinTextNodesCommand): Now derives directly from EditCommand.
        (RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): New command.
        (SplitTextNodeCommand::SplitTextNodeCommand): Now derives directly from EditCommand.
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (isNBSP): New helper.
        (isWS): New helper.
        (shouldPruneNode): New helper.
        (leadingWhitespacePosition): New helper.
        (trailingWhitespacePosition): New helper.
        (textNodesAreJoinable): New helper.
        (nonBreakingSpaceString): Returns a static DOMString containing a non-breaking space.
        (EditCommandImpl::EditCommandImpl):
        (EditCommandImpl::setStartingSelection): Now recursively sets starting selection on parents.
        (EditCommandImpl::setEndingSelection): As above, for ending selection.
        (EditCommandImpl::parent): New accessor.
        (EditCommandImpl::setParent): New accessor.
        (CompositeEditCommandImpl::doUnapply): Removed some logging.
        (CompositeEditCommandImpl::doReapply): Removed some logging.
        (CompositeEditCommandImpl::applyCommandToComposite): Sets parent.
        (CompositeEditCommandImpl::removeNodeAndPrune): New comvenience.
        (CompositeEditCommandImpl::replaceText): New comvenience.
        (CompositeEditCommandImpl::deleteSelection): New comvenience.
        (CompositeEditCommandImpl::deleteCollapsibleWhitespace): New comvenience.
        (AppendNodeCommandImpl::AppendNodeCommandImpl): Member variable name change only. parent -> parentNode.
        (AppendNodeCommandImpl::~AppendNodeCommandImpl): Ditto.
        (AppendNodeCommandImpl::doApply): Ditto.
        (AppendNodeCommandImpl::doUnapply): Ditto.
        (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): New command
        (debugPosition): New debugging aid.
        (DeleteSelectionCommandImpl::doApply): Major reworking to handle more cases correctly.
        (InputNewlineCommandImpl::doApply): Position and selection tweaks.
        (InputTextCommandImpl::InputTextCommandImpl): Handles more cases now, like typing after an image.
        (JoinTextNodesCommandImpl::JoinTextNodesCommandImpl): Now derives directly from EditCommand.
        Implements the guts of the command itself now, rather than replying on its former base class.
        (RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): New command.
        (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): Now derives directly from EditCommand.
        Implements the guts of the command itself now, rather than replying on its former base class.
        (TypingCommandImpl::TypingCommandImpl): Major rework to handle more cases correctly.
        * khtml/editing/htmlediting_impl.h:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::isContentEditable): More efficient use of the style system to answer the question.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Fixes an issue where the caret would not repaint after being moved when undoing.
        (KHTMLPart::takeSelectionFrom): Ditto.
        (KHTMLPart::clearSelection): Ditto.
        (KHTMLPart::invalidateSelection): Ditto.
        (KHTMLPart::setSelectionVisible): Ditto.
        (KHTMLPart::slotClearSelection): Ditto.
        (KHTMLPart::clearCaretRectIfNeeded):  Ditto.
        (KHTMLPart::notifySelectionChanged): Ditto.
        (KHTMLPart::unappliedEditing): Now uses EditCommand::emptyCommand().
        (KHTMLPart::reappliedEditing): Ditto.
        * khtml/khtml_part.h:
        * khtml/khtml_selection.cpp:
        (KHTMLSelection::KHTMLSelection):
        (KHTMLSelection::modify): Updated to work with new DOMPosition API.
        (KHTMLSelection::paintCaret): Ditto.
        (KHTMLSelection::moveToRenderedContent): Ditto.
        (KHTMLSelection::basePosition): New convenience.
        (KHTMLSelection::extentPosition): New convenience.
        (KHTMLSelection::startPosition): New convenience.
        (KHTMLSelection::endPosition): New convenience.
        (KHTMLSelection::debugPosition): Modified debug output.
        * khtml/khtml_selection.h:
        (KHTMLSelection::isEmpty):
        (KHTMLSelection::notEmpty):
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren): Fixed a crasher that happened when deleting content at the start of a line.
        * khtml/rendering/render_br.cpp:
        (RenderBR::caretMaxRenderedOffset): New function.
        (RenderBR::caretPos): Now draws the caret in the right place when a block is empty.
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::caretPos): Now draws the caret in the right place when a flow is empty.
        * khtml/rendering/render_line.cpp:
        (InlineBox::caretMaxRenderedOffset): New function.
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::isEditable):
        (RenderObject::caretMaxRenderedOffset): New function.
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::caretMaxRenderedOffset): New function.
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::caretMaxRenderedOffset): New function.
        (RenderText::detach):
        (RenderText::caretMaxOffset):
        (RenderText::caretMaxRenderedOffset): New function.
        * khtml/rendering/render_text.h:
        (khtml::InlineTextBox::len):
        * khtml/xml/dom_edititerator.cpp: Added.
        * khtml/xml/dom_edititerator.h: Added.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::previousEditable): Improved the correctness of this function.
        (NodeImpl::nextEditable): Ditto.
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp: Added.
        (DOMPosition::renderedOffset): New function.
        (DOMPosition::previousCharacterPosition): New function.
        (DOMPosition::nextCharacterPosition): New function.
        (DOMPosition::equivalentUpstreamPosition): New function.
        (DOMPosition::equivalentDownstreamPosition): New function.
        (DOMPosition::validUpstreamDownstreamPosition): New function.
        (DOMPosition::inRenderedContent): New function.
        (inlineBoxForRenderer): New function.
        (renderersOnDifferentLine): New function.
        (nextRenderedEditable): New function.
        (previousRenderedEditable): New function.
        (DOMPosition::inRenderedText): New function.
        (DOMPosition::rendersOnSameLine): New function.
        (DOMPosition::rendersInDifferentPosition): New function.
        (DOMPosition::isFirstRenderedPositionOnLine): New function.
        (DOMPosition::isLastRenderedPositionOnLine): New function.
        (DOMPosition::isLastRenderedPositionInEditableBlock): New function.
        (DOMPosition::inFirstEditableInRootEditableBlock): New function.
        (DOMPosition::inLastEditableInRootEditableBlock): New function.
        (DOMPosition::inFirstEditableInContainingEditableBlock): New function.
        (DOMPosition::inLastEditableInContainingEditableBlock): New function.
        * khtml/xml/dom_position.h: Added.
        (DOM::DOMPosition::notEmpty): New function.
        * khtml/xml/dom_stringimpl.cpp:
        (DOM::DOMStringImpl::containsOnlyWhitespace): Added a version which takes an offset and length.
        * khtml/xml/dom_stringimpl.h:
        * khtml/xml/dom_textimpl.cpp:
        (CharacterDataImpl::containsOnlyWhitespace): As above
        (CharacterDataImpl::maxOffset): New function.
        (CharacterDataImpl::caretMaxRenderedOffset): New function.
        (TextImpl::TextImpl):
        (TextImpl::rendererIsNeeded): A new bit. When set, makes a text renderer unconditionally.
        * khtml/xml/dom_textimpl.h:
        (DOM::TextImpl::setRendererIsNeeded): Sets the bit.
        * kwq/KWQAssertions.m:
        (KWQLog): Change to decrease the amount of output for the Editing log level. (my preference)

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

18 years ago Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap...
hyatt [Thu, 1 Apr 2004 00:00:05 +0000 (00:00 +0000)]
Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap attributes are dynamically
changed.

        Reviewed by darin.

        * khtml/html/html_formimpl.cpp:
        (HTMLTextAreaElementImpl::parseHTMLAttribute):

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

18 years agoWebKit:
sullivan [Wed, 31 Mar 2004 23:39:37 +0000 (23:39 +0000)]
WebKit:

        - fixed <rdar://problem/3577917>: API: mechanism for displaying error
        page for failed page load

        This was not commented on for a week in macosx-api-reviewers, so it
        has the silent rubber stamp of approval.

        Note that it isn't guarded by "Tiger only" availability macros because
        we (probably) want to use it in Panther for Safari. Maybe what we should
        do is guard the API with "Tiger only" macros but add an SPI version
        that Safari uses?

        Reviewed by Dave.

        * WebView.subproj/WebDataSource.h:
        moved unreachableURL to here
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource unreachableURL]):
        moved this from private category to main section

        * WebView.subproj/WebDataSourcePrivate.h:
        removed unreachableURL from here

        * WebView.subproj/WebFrame.h:
        moved loadAlternateHTMLString... to here
        * WebView.subproj/WebFrame.m:
        (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]):
        moved this from private category to main section

        * WebView.subproj/WebFramePrivate.h:
        removed unreachableURL from here

WebBrowser:

        Reviewed by Dave.

        * BrowserDocument.m:
        removed #import of WebDataSourcePrivate now that error-page stuff is API
        * BrowserWebController.m:
        ditto
        * BrowserWindowController.m:
        ditto
        * LoadProgressMonitor.m:
        ditto

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

18 years agoFix build problem.
rjw [Wed, 31 Mar 2004 21:37:28 +0000 (21:37 +0000)]
Fix build problem.

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

18 years ago Changed references to NP_runtime.h to npruntime.h
rjw [Wed, 31 Mar 2004 20:56:05 +0000 (20:56 +0000)]
Changed references to NP_runtime.h to npruntime.h

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.h:
        * bindings/c/c_class.h:
        * bindings/c/c_instance.h:
        * bindings/c/c_runtime.h:
        * bindings/c/c_utility.h:
        * bindings/npruntime.cpp:

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

18 years agoWebKit:
sullivan [Wed, 31 Mar 2004 19:59:05 +0000 (19:59 +0000)]
WebKit:

        Reviewed by Darin.

        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences historyIsFrozen]):
        always return NO on Panther and older, so you can't get into a state
        where the WebKit pref is invisibly set and affecting Safari.

WebBrowser:

        More stealth mode. Don't save standard form data or names/passwords when
        in stealth mode.

        Reviewed by Darin.

        * FormCompletionController.m:
        (+[FormCompletionController shouldSaveFormData]):
        new method, checks both the misc form data preference and the stealth mode preference.
        (+[FormCompletionController shouldSaveUsernamesAndPasswords]):
        ditto but for usernames/passwords instead of misc form data
        (+[FormCompletionController _frame:sourceFrame:willSubmitLoginForm:withValues:formInfo:submissionListener:]):
        use shouldSaveUsernamesAndPasswords
        (+[FormCompletionController _frame:sourceFrame:willSubmitRegularForm:withValues:]):
        use shouldSaveFormData

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

18 years agoAdding layout test for whitespace bug.
hyatt [Wed, 31 Mar 2004 19:01:22 +0000 (19:01 +0000)]
Adding layout test for whitespace bug.

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

18 years ago Fix for 3604241, simple space collapsing results in a doubled character. Simplify...
hyatt [Wed, 31 Mar 2004 18:43:12 +0000 (18:43 +0000)]
Fix for 3604241, simple space collapsing results in a doubled character.  Simplify the ignoring of
whitespace and make sure it works across absolutely positioned spans.

        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::findNextLineBreak):

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

18 years ago * WebView.subproj/WebHTMLView.m: Whitespace tweaks.
darin [Wed, 31 Mar 2004 18:35:02 +0000 (18:35 +0000)]
    * WebView.subproj/WebHTMLView.m: Whitespace tweaks.

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

18 years ago Reviewed by Dave.
darin [Wed, 31 Mar 2004 01:51:48 +0000 (01:51 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3570877>: REGRESSION: onfocus handler not working at weather.com

        * khtml/ecma/kjs_binding.cpp:
        (UString::string): Turn a null UString into a null DOMString, but a non-null empty UString into a
        non-null empty DOMString.
        (UString::qstring): Ditto, for QString.
        (Identifier::string): Ditto, for Identifier.
        (Identifier::qstring): Ditto.

        * kwq/KWQLineEdit.h: Override focusPolicy.
        * kwq/KWQLineEdit.mm: (QLineEdit::focusPolicy): Return StrongFocus instead of TabFocus, since
        we allow clicking to focus on these widgets.
        * kwq/KWQTextEdit.h: More of the same.
        * kwq/KWQTextEdit.mm: (QTextEdit::focusPolicy): And still more.

        - fixed <rdar://problem/3605919>: text fields in web pages are too tall

        * kwq/KWQTextField.mm:
        (-[KWQTextFieldCell _typesetterBehavior]): Ignore the per-application typesetter setting and
        instead always use the latest behavior for text fields in web pages.
        (-[KWQSecureTextFieldCell _typesetterBehavior]): Ditto.
        (-[KWQSearchFieldCell _typesetterBehavior]): Ditto.

        - additional cleanup

        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::isKeyboardFocusable): Check tab focus bit instead of different modes.
        (HTMLGenericFormElementImpl::isMouseFocusable): Check click focus bit instead of different modes.

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

18 years ago Fixed: <rdar://problem/3604391>: Plug-in context menus (Flash) don't work in Carbon...
cblu [Tue, 30 Mar 2004 23:38:14 +0000 (23:38 +0000)]
Fixed: <rdar://problem/3604391>: Plug-in context menus (Flash) don't work in Carbon WebKit applications (e.g., CarbonWeb)

        Reviewed by rjw.

        * Carbon.subproj/HIWebView.m:
        (ContextMenuClick): instead of calling menuForEvent (which is not implemented on our plug-in view) call rightMouseDown and let AppKit handle the rest

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

18 years ago Fix for 3603326, spurious line breaks in encyclopedia articles. Make sure makeChild...
hyatt [Tue, 30 Mar 2004 22:09:25 +0000 (22:09 +0000)]
Fix for 3603326, spurious line breaks in encyclopedia articles.  Make sure makeChildrenNonInline knows to
skip over floating/positioned elements so that they remain part of contiguous inline runs for static positioning
purposes.

        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        (khtml::getInlineRun):

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

18 years ago Reviewed by Ken.
darin [Tue, 30 Mar 2004 18:33:33 +0000 (18:33 +0000)]
    Reviewed by Ken.

        - fixed garbage characters seen while I was rigging up the Mozilla JavaScript tests

        * kwq/KWQString.h: Add a "move constructor" for KWQStringData that extracts the data
        from an existing KWQStringData.
        * kwq/KWQString.mm:
        (KWQStringData::KWQStringData): Implement the move constructor.
        (QString::detachInternal): Use the move constructor rather than making a copy of the
        data. Should be both more efficient and preserves both the Unicode and the ASCII. The
        bug here is that TokenizerSubstring relies on the Unicode staying around. We still
        have a problem in the case where the Unicode is inside the KWQStringData. To deal with
        that we'll have to add a new QString call that TokenizerSubstring can use. The new call
        will force QString to keep the Unicode outside the internal KWQStringData.

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

18 years ago Reviewed by Ken.
darin [Tue, 30 Mar 2004 17:41:50 +0000 (17:41 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3606146>: repro nil-deref in QWidget::move (www.stoltoffshore.com)

        * khtml/khtml_part.cpp:
        (KHTMLPart::requestObject): Add check for NULL widget.
        (KHTMLPart::processObjectRequest): Add check for NULL widget.

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

18 years ago Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for...
hyatt [Mon, 29 Mar 2004 22:34:46 +0000 (22:34 +0000)]
Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property).

        Reviewed by rjw

        * khtml/css/cssparser.cpp:
        (CSSParser::parseShape):

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

18 years agoWebKit:
sullivan [Mon, 29 Mar 2004 22:16:19 +0000 (22:16 +0000)]
WebKit:

        - some support for "Stealth Browsing"; add a preference that
        controls whether a history item is added when a page is visited.
        This is called "historyIsFrozen" for now, but I wouldn't be
        surprised to see this name change.

        Reviewed by Dave.

        * WebView.subproj/WebPreferencesPrivate.h:
        new historyIsFrozen, setHistoryIsFrozen: methods

        * WebView.subproj/WebPreferences.m:
        new WebKitHistoryIsFrozenPreferenceKey
        (+[WebPreferences initialize]):
        set initial value of WebKitHistoryIsFrozenPreferenceKey
        (-[WebPreferences setHistoryIsFrozen:]):
        set value of WebKitHistoryIsFrozenPreferenceKey
        (-[WebPreferences historyIsFrozen]):
        read value of WebKitHistoryIsFrozenPreferenceKey

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        don't add item to history if history is frozen

WebBrowser:

        A little progress on "Stealth Mode"

        Reviewed by Dave.

        * AppController.m:
        (-[AppController toggleStealthMode:]):
        replace use of StealthModePreferenceKey with new WebPreferences SPI call
        (-[AppController validateUserInterfaceItem:]):
        ditto

        * PreferenceKeys.h:
        remove StealthModePreferenceKey

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

18 years agoFix soft hyphen test.
hyatt [Mon, 29 Mar 2004 21:36:42 +0000 (21:36 +0000)]
Fix soft hyphen test.

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