18 years ago Reviewed by Ken.
mjs [Mon, 10 May 2004 23:21:17 +0000 (23:21 +0000)]
    Reviewed by Ken.

- avoid messing with undo manager needlessly for ~1% HTML iBench speedup

        * WebCoreSupport.subproj/WebBridge.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge registerCommandForUndo:]): mark undo/redo item flag
        (-[WebBridge registerCommandForRedo:]): ditto
        (-[WebBridge clearUndoRedoOperations]): check flag before removing items,
and clear it after removing them

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

18 years ago Reviewed by Darin.
mjs [Mon, 10 May 2004 23:20:12 +0000 (23:20 +0000)]
    Reviewed by Darin.

- -[WebFrame childFrames] is so hot that a special internal
version which avoids the copy and autorelease results in a .75%
performance improvement on HTML iBench.

        * WebView.subproj/WebFramePrivate.h: Prototype new method.
        * WebView.subproj/WebFrame.m:
(-[WebFrame _internalChildFrames]): New method, just returns
internal value instead of copying.

        (-[WebFrame _descendantFrameNamed:]): Use it
        (-[WebFrame _textSizeMultiplierChanged]): likewise
        (-[WebFrame _viewWillMoveToHostWindow:]): likewise
        (-[WebFrame _viewDidMoveToHostWindow]): likewise
        (-[WebFrame _saveDocumentAndScrollState]): likewise
        (-[WebFrame _numPendingOrLoadingRequests:]): likewise
        (-[WebFrame _checkLoadComplete]): Refactored this and it's two
helpers a little so we could get away with using
        (-[WebFrame _checkLoadCompleteForThisFrame]): Renamed from
(-[WebFrame _recursiveCheckLoadComplete]): renamed from (class
method) _recursiveCheckCompleteFromFrame:
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _defersCallbacksChanged]): Use it
        (-[WebDataSource isLoading]): likewise
        * WebView.subproj/WebView.m:
        (-[WebView _frameForDataSource:fromFrame:]): likewise
        (-[WebView _frameForView:fromFrame:]): likewise

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

18 years ago Make sure that when finished parsing if all the right conditions are met, we just...
hyatt [Mon, 10 May 2004 23:19:27 +0000 (23:19 +0000)]
Make sure that when finished parsing if all the right conditions are met, we just go ahead and updateRendering and

        Reviewed by rjw

        * khtml/khtmlview.cpp:

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

18 years ago Reviewed by Dave.
mjs [Mon, 10 May 2004 21:47:37 +0000 (21:47 +0000)]
    Reviewed by Dave.

- some minor performance tweaks that together give .5% or so on
the HTML iBench

        * khtml/css/css_valueimpl.h: don't use a bitfield for id and important,
unpacking the bitfield is too expensive
        * kwq/KWQArrayImpl.h:
        * kwq/KWQArrayImpl.mm:
        (KWQArrayImpl::at): inline this method because it's so hot
        * kwq/KWQString.mm:
        (allocateHandle): inline this function because it's so hot
        (initializeHandleNodes): move this in the file so above can be inlined
        (allocateNode): ditto

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

18 years ago Move image loading to content.
hyatt [Mon, 10 May 2004 21:29:42 +0000 (21:29 +0000)]
Move image loading to content.

        Reviewed by kocienda

        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_imageimpl.h:
        * khtml/html/html_objectimpl.cpp:
        * khtml/html/html_objectimpl.h:
        * khtml/misc/loader.cpp:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_object.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:

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

18 years ago Forgot to commit this copied header.
cblu [Mon, 10 May 2004 18:05:03 +0000 (18:05 +0000)]
Forgot to commit this copied header.

        * DOM.subproj/DOMExtensions.h:

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

18 years ago Reviewed by Vicki.
darin [Mon, 10 May 2004 16:47:45 +0000 (16:47 +0000)]
    Reviewed by Vicki.

        - fixed build failure seen in B&I log (due to case sensitive file system?)

        * kwq/KWQLoader.h: Include "KWQCString.h" rather than "QCString.h". The latter was
        failing because the forwarding header is called "qcstring.h" and I guess B&I started
        building with a case sensitive file system. I could have changed this to "qcstring.h",
        but it seemed better to use the header's real name since we're inside KWQ here.

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

18 years ago Reviewed by Dave.
mjs [Sun, 9 May 2004 04:55:11 +0000 (04:55 +0000)]
    Reviewed by Dave.

- change things around so extremely hot TokenizerString::current()
method doesn't have to do any work. It's cheaper to maintain the
relevant state than to always compute it.

        * khtml/misc/stringit.h:
        (khtml::TokenizerString::TokenizerString): Initialize m_currentChar
        (khtml::TokenizerString::push): update m_currentChar
        (khtml::TokenizerString::advance): ditto
        (khtml::TokenizerString::current): return m_currentChar
        * khtml/misc/stringit.cpp:
        (khtml::TokenizerString::clear): update m_currentChar
        (khtml::TokenizerString::append): update m_currentChar
        (khtml::TokenizerString::prepend): update m_currentChar

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

18 years ago Reviewed by Dave.
gramps [Sat, 8 May 2004 02:38:58 +0000 (02:38 +0000)]
    Reviewed by Dave.

Fixed minor, edge-case regression in KEYGEN RSA logic caused by Dave's
"atomic string" patch back in January.

        * khtml/html/html_formimpl.cpp:

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

18 years ago Reviewed by darin.
vicki [Fri, 7 May 2004 22:31:01 +0000 (22:31 +0000)]
    Reviewed by darin.

Turn off GC since it uses ppc only instructions (which breaks
the B&I build).

        * kjs/value.h: set USE_CONSERVATIVE_GC to 0

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

18 years agoset version number to 140u. the tree is open!
vicki [Fri, 7 May 2004 18:10:18 +0000 (18:10 +0000)]
set version number to 140u.  the tree is open!

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

18 years agoSafari-139 stamp
vicki [Fri, 7 May 2004 18:03:16 +0000 (18:03 +0000)]
Safari-139 stamp

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

18 years ago Reviewed by Darin.
mjs [Fri, 7 May 2004 16:51:56 +0000 (16:51 +0000)]
    Reviewed by Darin.

- two trivial changes for a 1% speedup, thanks to Shark

        * khtml/dom/dom_string.cpp:
        * khtml/dom/dom_string.h:
        (DOM::DOMString::~DOMString): inline this method because it's hot and the
function call overhead was very costly.
        * WebCore.pbproj/project.pbxproj: Add -falign-loops=16
optimization flag, as suggested by Shark.

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

18 years ago Reviewed by Darin.
mjs [Fri, 7 May 2004 16:50:16 +0000 (16:50 +0000)]
    Reviewed by Darin.

- add -funroll-loops=16 compiler option for approx .5% speedup on
HTML iBench and .5-1% speedup on JS iBench.

        * JavaScriptCore.pbproj/project.pbxproj:

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

18 years ago Added alpha to DOMRGBColor as an extension.
cblu [Thu, 6 May 2004 22:50:17 +0000 (22:50 +0000)]
Added alpha to DOMRGBColor as an extension.

        Reviewed by dave.

        * kwq/DOM-CSS.mm:
        (-[DOMRGBColor alpha]): new
        * kwq/DOMExtensions.h:

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

18 years agoAdd layout test for pres and brs.
hyatt [Thu, 6 May 2004 22:04:23 +0000 (22:04 +0000)]
Add layout test for pres and brs.

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

18 years ago Fix whitespace rendering for brs inside pres. The bug is 3640711.
hyatt [Thu, 6 May 2004 22:01:33 +0000 (22:01 +0000)]
Fix whitespace rendering for brs inside pres. The bug is 3640711.

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:

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

18 years ago * DOM.subproj/WebDOMOperations.h: improved a header doc comment
cblu [Thu, 6 May 2004 21:41:14 +0000 (21:41 +0000)]
    * DOM.subproj/WebDOMOperations.h: improved a header doc comment

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

18 years agoJavaScriptCore:
mjs [Thu, 6 May 2004 06:41:06 +0000 (06:41 +0000)]

        Reviewed by Darin.

Enable full conservative GC mode in addition to test mode. When
conservative GC is enabled, we now get an 11% speed improvement on
the iBench. Also fix some spots I missed before.

Specific noteworth changes:

        * kjs/collector.cpp:
(KJS::Collector::markStackObjectsConservatively): Check possible
cell pointers for 8-byte aligment and verify they are not 0.

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here...
        (KJS::ProtectedValues::decreaseProtectCount): ...and here...
        * kjs/protect.h:
        (KJS::gcProtectNullTolerant): ...to here...
        (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null
tolerance, and doing the check is expensive.

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one
that is still very good.

        * kjs/protect.h:
        * kjs/protected_values.cpp:
        * bindings/runtime_root.cpp:
        * bindings/runtime_root.h:
        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/internal.cpp:
        * kjs/list.cpp:
        * kjs/object.cpp:
        * kjs/value.cpp:
        * kjs/value.h:


        Reviewed by Darin.

        * khtml/ecma/kjs_events.cpp:
        (JSLazyEventListener::parseCode): Make sure to protect the
permanent "event" string object.

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

18 years ago Fixes for 3637924, 3643356, and 3558513, all crashes in recalcStyle. Make sure...
hyatt [Wed, 5 May 2004 20:50:21 +0000 (20:50 +0000)]
Fixes for 36379243643356, and 3558513, all crashes in recalcStyle.  Make sure the tree is always in a
sane state when removing children while changing .innerHTML.

        Reviewed by darin

        * khtml/xml/dom_nodeimpl.cpp:

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

18 years agoAdd quirk body height test.
hyatt [Wed, 5 May 2004 20:24:33 +0000 (20:24 +0000)]
Add quirk body height test.

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

18 years agoFixed layout tests plus added a new test.
hyatt [Wed, 5 May 2004 20:23:48 +0000 (20:23 +0000)]
Fixed layout tests plus added a new test.

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

18 years ago A collection of fixes.
hyatt [Wed, 5 May 2004 20:21:09 +0000 (20:21 +0000)]
A collection of fixes.

(1) Fix a regression from the style sharing landing that made visited and unvisited links accidentally share.
(2) Make sure 100% height divs fill the <body> in quirks mode, even if the body has no height specified.
(3) Make sure table cell percentage heights exclude border/padding.
(4) Make sure that before flexing auto height is used for the contents of the cells.

        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_table.cpp:

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

18 years agoTests:
cblu [Wed, 5 May 2004 18:37:31 +0000 (18:37 +0000)]

        Reviewed by kocienda.

        * Blot/BlotDocument.m:
        (-[BlotDocument dataRepresentationOfType:]): updated to use outerHTML


- DOM Extensions API tweaks
- Implemented outerHTML

        Reviewed by kocienda.

        * WebCore-combined.exp:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::outerHTML): new
        (HTMLElementImpl::setOuterHTML): mew
        * khtml/html/html_elementimpl.h:
        * kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences
        * kwq/DOMHTML.mm:
        (-[DOMHTMLElement outerHTML]): new
        (-[DOMHTMLElement setOuterHTML:]): mew


- DOM Extensions API tweaks

        Reviewed by kocienda.

        * DOM.subproj/DOMExtensions.h: copied from WebCore
        * DOM.subproj/WebDOMOperations.h: added header doc comments
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMNode _URLsFromSelectors:]): use renamed URLWithAttributeString
        (-[DOMDocument URLWithAttributeString:]): renamed
        (-[DOMHTMLTableElement _web_background]): new private method
        (-[DOMHTMLTableElement _subresourceURLs]): use new private method
        (-[DOMHTMLTableCellElement _web_background]): new private method
        (-[DOMHTMLTableCellElement _subresourceURLs]): use new private method

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

18 years ago Fix for 3641331, make sure <th> elements don't reset text-align to center if they...
hyatt [Wed, 5 May 2004 00:16:21 +0000 (00:16 +0000)]
Fix for 3641331, make sure <th> elements don't reset text-align to center if they inherit a specified

Also remove the styles from <abbr> and <acronym>.

        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/html4.css:
        * khtml/css/quirks.css:

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 4 May 2004 23:43:16 +0000 (23:43 +0000)]
    Reviewed by Hyatt

        Fix for behavior which extends selection drawing to beginning and end of blocks.
        I added this feature a few days ago, but my checks to see if the extension should
        be done was naive: Is first or last item in root line box selected? Clearly this
        needs to be "selection is *beyond* first or last item in root line box. Done.

        * khtml/rendering/render_image.cpp:
        (RenderImage::paint): Add selectionState() == SelectionInside check.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintSelection): Constrain passed-in offsets to be relative to box.
        Use passed-in offsets to check whether selection extends beyond this box. Also, now
        passes in flag to tell whether the whole RenderText has selectionState() == SelectionInside
        (in which case you always want to extend).
        (RenderText::paint): Remove box offset constraining from here. Now done in above function.
        * khtml/rendering/render_text.h: Modify paintSelection interface to add
        selectionState() == SelectionInside flag.

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

18 years ago Reviewed by me
kocienda [Tue, 4 May 2004 23:31:42 +0000 (23:31 +0000)]
    Reviewed by me

        Added layout tests for DOM traversal objects.

        * layout-tests/traversal/node-iterator-001-expected.txt: Added.
        * layout-tests/traversal/node-iterator-001.html: Added.
        * layout-tests/traversal/node-iterator-002-expected.txt: Added.
        * layout-tests/traversal/node-iterator-002.html: Added.
        * layout-tests/traversal/node-iterator-003-expected.txt: Added.
        * layout-tests/traversal/node-iterator-003.html: Added.
        * layout-tests/traversal/node-iterator-004-expected.txt: Added.
        * layout-tests/traversal/node-iterator-004.html: Added.
        * layout-tests/traversal/node-iterator-005-expected.txt: Added.
        * layout-tests/traversal/node-iterator-005.html: Added.
        * layout-tests/traversal/node-iterator-006-expected.txt: Added.
        * layout-tests/traversal/node-iterator-006.html: Added.
        * layout-tests/traversal/node-iterator-007-expected.txt: Added.
        * layout-tests/traversal/node-iterator-007.html: Added.
        * layout-tests/traversal/traversal.js: Added.
        * layout-tests/traversal/tree-walker-001-expected.txt: Added.
        * layout-tests/traversal/tree-walker-001.html: Added.
        * layout-tests/traversal/tree-walker-002-expected.txt: Added.
        * layout-tests/traversal/tree-walker-002.html: Added.
        * layout-tests/traversal/tree-walker-003-expected.txt: Added.
        * layout-tests/traversal/tree-walker-003.html: Added.
        * layout-tests/traversal/tree-walker-004-expected.txt: Added.
        * layout-tests/traversal/tree-walker-004.html: Added.

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 4 May 2004 23:30:30 +0000 (23:30 +0000)]
    Reviewed by Hyatt

        * khtml/xml/dom2_traversalimpl.cpp:
        (DOM::NodeIteratorImpl::nextNode): Change to make NodeIterators behave like the spec in that
        reference node is null until you iterate the first time.
        (DOM::NodeIteratorImpl::previousNode): Ditto.

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

18 years ago Reviewed by me
kocienda [Tue, 4 May 2004 22:38:51 +0000 (22:38 +0000)]
    Reviewed by me

        * WebCore.pbproj/project.pbxproj: Backed out unintentional

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

18 years agoWebCore:
kocienda [Tue, 4 May 2004 22:38:00 +0000 (22:38 +0000)]

        Reviewed by Hyatt

        Implemented DOM traversal objects, NodeIterator and TreeWalker.

        * WebCore-combined.exp: Regenerate
        * WebCore.exp: Export DOMNodeFilter protocol
        * khtml/dom/dom2_traversal.cpp: Completed half-done implementation pulled from KDE tree.
        * khtml/dom/dom2_traversal.h: Ditto.
        * khtml/dom/dom_doc.cpp:
        (DOM::Document::createNodeIterator): Ditto.
        (DOM::Document::createTreeWalker): Ditto.
        * khtml/dom/dom_doc.h: Ditto.
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocumentProtoFunc::tryCall): Fix cases that create traversal objects.
        * khtml/ecma/kjs_traversal.cpp:
        (DOMNodeIterator::getValueProperty): Add referenceNode and pointerBeforeReferenceNode
        properties to node interator.
        (DOMTreeWalkerProtoFunc::tryCall): Fix typo where DOMTreeWalker::PreviousNode case called previousSibling function.
        (JSNodeFilterCondition::JSNodeFilterCondition): Implement JS glue class for node filter conditions.
        (JSNodeFilterCondition::acceptNode): Ditto.
        * khtml/ecma/kjs_traversal.h:
        (KJS::DOMNodeIterator::): Add ReferenceNode and PointerBeforeReferenceNode constants.
        * khtml/ecma/kjs_traversal.lut.h:
        (KJS::): Regenerated
        * khtml/xml/dom2_traversalimpl.cpp: Completed half-done implementation pulled from KDE tree.
        * khtml/xml/dom2_traversalimpl.h: Ditto.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createNodeIterator): Ditto.
        (DocumentImpl::createTreeWalker): Ditto.
        * khtml/xml/dom_docimpl.h: Ditto.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::checkAddChild): Patched due to change in isAncestor function. This was the one pre-existing caller.
        (NodeImpl::isAncestor): Changed so that it does not return true for itself: node->isAncestor(node) now returns false.
        * khtml/xml/dom_nodeimpl.h: Made isAncestor const.
        * kwq/DOM.mm: Implemented obj-c glue for traversal objects.
        * kwq/DOMInternal.h: Ditto.
        * kwq/DOMTraversal.h: Ditto.


        Reviewed by Hyatt

        * DOM.subproj/DOMTraversal.h: File coppied from WebCore

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

18 years ago Reviewed by Ken.
darin [Tue, 4 May 2004 16:29:50 +0000 (16:29 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3642252>: "starting to drag a link and then releasing needs to activate the link if you are still over it"

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent): Put hysteresis check inside !APPLE_CHANGES because
        the Web Kit does our hysteresis checks.
        (KHTMLView::viewportMouseReleaseEvent): Ditto.

        * kwq/KWQApplication.h: Removed startDragDistance and globalStrut; unused.
        * kwq/KWQApplication.mm: Removed the implementations.
        * kwq/KWQPointArray.h: Removed manhattanLength; unused.
        * kwq/KWQPoint.mm:  Removed the implementation.

        * WebCore-tests.exp: Removed manhattanLength.
        * WebCore-combined.exp: Regenerated.

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

18 years ago Reviewed by Hyatt
kocienda [Mon, 3 May 2004 22:54:25 +0000 (22:54 +0000)]
    Reviewed by Hyatt

Nifty hack to work around problem where BR's inserted at the end of a block do not
render. Since only the *last* BR has this quirk, insert two when at the end of a block.
Once done, you can't caret past the last one, so you never insert two again.

        * khtml/editing/htmlediting_impl.cpp:

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

18 years ago Reviewed by Ken
darin [Mon, 3 May 2004 22:29:59 +0000 (22:29 +0000)]
    Reviewed by Ken

        - fixed <rdar://problem/3091531>: "should format copied tables with tabs between cells, spreadsheet-style, for pasting to Excel"
        - fixed <rdar://problem/3110002>: "Find doesn't match across formatting boundaries"
        - fixed <rdar://problem/3640340>: "REGRESSION (136-137): nil-deref in KHTMLPart::setFocusNodeIfNeeded inside triple click code after repeatedly click/drag selecting text"
        - fixed <rdar://problem/3640422>: "too many blank lines between paragraphs in copied text"

        * khtml/dom/dom2_range.h: Added == and != operators to DOMRange.
        * khtml/dom/dom2_range.cpp: (DOM::operator==): Added.

        * khtml/khtml_part.cpp:
        (KHTMLPart::init): Don't call findTextBegin any more; it's now not used at all
        in WebCore.
        (KHTMLPart::clear): Don't call findTextBegin any more. Also don't set up the
        load statistics variables.
        (KHTMLPart::findTextNext): Roll out APPLE_CHANGES; this function is no longer
        used in WebCore any more and instead the entire thing is compiled out.
        (KHTMLPart::text): Reimplement this by calling one of the new text operations. All the interesting
        parts were moved into the TextIterator class.
        (KHTMLPart::setFocusNodeIfNeeded): Add a check for nil; this is the fix for 364030.

        * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Put m_findPos,
        m_findNode, m_overURL, m_overURLTarget, m_scrollTimer, m_loadedObjects,
        m_totalObjectCount, and m_jobPercent inside !APPLE_CHANGES.

        * khtml/xml/dom_selection.h: Replaced uses of 4-character tabs with spaces.
        (DOM::Selection::Selection): Added a constructor that takes a DOM range.
        (DOM::Selection::operator=): Overloaded operator= for DOM range and position.
        This is slightly more efficient than letting a second Selection object be constructed.
        * khtml/xml/dom_selection.cpp: Replaced uses of 4-character tabs with spaces.
        (DOM::Selection::Selection): Added a constructor that takes a DOM range.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): Reimplement find so it uses
        the new text operations function for finding.

        * khtml/misc/khtml_text_operations.h:
        * khtml/misc/khtml_text_operations.cpp:
        * WebCore.pbproj/project.pbxproj:
        Added new text iterator classes that do the heavy lifting.

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

18 years ago Make sure that XML processing instructions set themselves as the parent node of...
hyatt [Mon, 3 May 2004 17:53:06 +0000 (17:53 +0000)]
Make sure that XML processing instructions set themselves as the parent node of the stylesheets they load,
so that they will get stylesheetLoaded() notifications when @imported stylesheets are contained inside the

        Reviewed by cblu

        * khtml/xml/dom_xmlimpl.cpp:

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

18 years ago Reviewed by Ken.
darin [Sun, 2 May 2004 16:13:40 +0000 (16:13 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3640419>: "_webkit_stringByReplacingValidPercentEscapes does not handle %00 properly"

        * Misc.subproj/WebNSURLExtras.m: (-[NSString _webkit_stringByReplacingValidPercentEscapes]):
        Use the function in NSURL instead of implementing our own here.

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

18 years ago Asking an NSInvocation for it's return value when return type
rjw [Fri, 30 Apr 2004 23:19:24 +0000 (23:19 +0000)]
Asking an NSInvocation for it's return value when return type
is void throws an exception.  Added check for void return types
to avoid this exception.

        Reviewed by Ken.

        * bindings/objc/objc_instance.mm:

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

18 years ago Fixed: <rdar://problem/3543662>: HITLIST-137: REGRESSION: reproducible hang copying...
cblu [Fri, 30 Apr 2004 23:16:59 +0000 (23:16 +0000)]
Fixed: <rdar://problem/3543662>: HITLIST-137: REGRESSION: reproducible hang copying all text at Dave's blog, and other pages

        Reviewed by dave.

        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::toHTMLWithOptions): when looping with containingBlock, check the value to see if it is the same

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

18 years ago Fix for 3639530, regression on generated content pages. They crash because I forgot...
hyatt [Fri, 30 Apr 2004 19:19:52 +0000 (19:19 +0000)]
Fix for 3639530, regression on generated content pages.  They crash because I forgot to null-check the style

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:

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

18 years ago * WebView.subproj/WebView.m:
sullivan [Fri, 30 Apr 2004 17:59:26 +0000 (17:59 +0000)]
    * WebView.subproj/WebView.m:
        fixed deployment build breakage

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

18 years agoWebCore:
sullivan [Fri, 30 Apr 2004 17:30:54 +0000 (17:30 +0000)]

        - added bridge method to get the NSFont used to render a node, to
        help with supporting the font panel

        Reviewed by Ken.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge renderedFontForNode:]):
        return nil if no renderer, otherwise return NSFont


        - more work on getting the font panel to work with editable HTML.
        The font panel in Blot now correctly reflects the first selected font when the
        selection is at least one character long.

        Reviewed by Ken.

        * WebView.subproj/WebView.m:
        removed unfinished plumbing to support reflecting selected attributes (e.g. text color,
        underline) in font panel, since this doesn't work in Mail or TextEdit either.
        removed assertion for now
        (-[WebView _updateFontPanel]):
        now uses new bridge method to get the NSFont from the node, instead of trying
        to create an NSFont from a DOMCSSStyleDeclaration

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

18 years ago Fixed several bad problems with the ObjC bindings. In particular, conversion
rjw [Fri, 30 Apr 2004 01:44:16 +0000 (01:44 +0000)]
Fixed several bad problems with the ObjC bindings.  In particular, conversion
to/from JavaScriptObject (soon to be WebScriptObject) was completely broken.

        Reviewed by Chris.

        * bindings/objc/objc_jsobject.h:
        * bindings/objc/objc_jsobject.mm:
        (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]):
        (-[JavaScriptObject KJS::]):
        (+[JavaScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
        (-[JavaScriptObject call:arguments:]):
        (-[JavaScriptObject evaluate:]):
        (-[JavaScriptObject getMember:]):
        (-[JavaScriptObject getSlot:]):
        * bindings/objc/objc_runtime.mm:
        * bindings/objc/objc_utility.mm:
        * bindings/runtime.h:
        * bindings/runtime_root.cpp:
        * bindings/runtime_root.h:
        * bindings/testbindings.mm:
        (-[MyFirstInterface logMessage:]):
        (-[MyFirstInterface setJSObject:]):
        (-[MyFirstInterface callJSObject::]):

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

18 years ago Expose summary on tables.
hyatt [Thu, 29 Apr 2004 23:26:02 +0000 (23:26 +0000)]
Expose summary on tables.

        Reviewed by darin

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject helpText]):

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

18 years ago Implement image maps for accessibility.
hyatt [Thu, 29 Apr 2004 23:08:13 +0000 (23:08 +0000)]
Implement image maps for accessibility.

        Reviewed by darin

        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_imageimpl.h:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_image.h:
        * kwq/KWQAccObject.h:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject initWithRenderer:]):
        (-[KWQAccObject anchorElement]):
        (-[KWQAccObject parentObject]):
        (-[KWQAccObject parentObjectUnignored]):
        (-[KWQAccObject addChildrenToArray:]):
        (-[KWQAccObject role]):
        (-[KWQAccObject helpText]):
        (-[KWQAccObject value]):
        (-[KWQAccObject title]):
        (-[KWQAccObject position]):
        (-[KWQAccObject size]):
        (-[KWQAccObject accessibilityIsIgnored]):
        (-[KWQAccObject accessibilityAttributeNames]):
        (-[KWQAccObject accessibilityAttributeValue:]):
        * kwq/KWQRegion.mm:

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

18 years ago Fixed:
cblu [Thu, 29 Apr 2004 21:30:47 +0000 (21:30 +0000)]
<rdar://problem/3631431>: web archive of .Mac welcome page renders has gaps in layout
<rdar://problem/3631470>: news.google.com web archive has a different font than the live site

        Reviewed by kocienda.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source
        * khtml/xml/dom_docimpl.cpp:
        (DocumentTypeImpl::toString): don't return "<!DOCTYPE>" when there is no doc type in the source
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags

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

18 years ago Reviewed by Dave.
darin [Thu, 29 Apr 2004 20:49:34 +0000 (20:49 +0000)]
    Reviewed by Dave.

        - some tweaks on image

        * khtml/html/html_imageimpl.h: Remove unused noref bit and unneeded override of isURLAttribute.
        * khtml/html/html_imageimpl.cpp:
        (HTMLAreaElementImpl::HTMLAreaElementImpl): Remove unused noref bit.
        (HTMLAreaElementImpl::parseHTMLAttribute): Remove parsing of noref; no need to store the
        bit since it has no meaning.

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

18 years ago - more work on getting the font panel to work with editable HTML
sullivan [Thu, 29 Apr 2004 20:33:01 +0000 (20:33 +0000)]
    - more work on getting the font panel to work with editable HTML

        Reviewed by Ken.

        * WebView.subproj/WebView.m:
        (-[WebView computedStyleForElement:pseudoElement:]):
        convert nil pseudoElement to empty string because lower level chokes on nil
        I tried to implement this, but was thwarted by missing API, so I added a
        bunch of FIXMEs instead
        new function, not yet implementable
        new function, not yet implementable
        (-[WebView _updateFontPanel]):
        added code to get first and last element in selection, and to use
        NodeIterator to walk through the entire selection to see if more than one
        font or set of attributes is in use. However, createNodeIterator is declared
        in DOMTraversal.h but not actually defined anywhere, so I had to prevent this
        code from actually being called.

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

18 years ago 1. Change the role of links from AXButton to AXLink.
hyatt [Thu, 29 Apr 2004 18:52:06 +0000 (18:52 +0000)]
1. Change the role of links from AXButton to AXLink.
2. Add support for list markers using a new role, AXListMarker.

        Reviewed by kocienda

        * khtml/rendering/render_list.h:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject role]):
        (-[KWQAccObject roleDescription]):
        (-[KWQAccObject value]):
        (-[KWQAccObject accessibilityIsIgnored]):

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

18 years ago Reviewed by Ken.
darin [Thu, 29 Apr 2004 16:20:36 +0000 (16:20 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3636566>: "space bar on a form button hits default button instead (autorestore.apple.com)"

        * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler):
        Remove special handling for space, falling back to default AppKit behavior. Change enter handling to
        click the form element itself in the case of elements other than text input ones.

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

18 years ago Reviewed by Ken.
darin [Thu, 29 Apr 2004 15:24:22 +0000 (15:24 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3636673>: "unrepro nil-deref crash in KHTMLPart::frameDetached() (espn.com)"

        * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Check for nil.

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

18 years ago - Implemented DOMHTMLElementExtensions.
cblu [Thu, 29 Apr 2004 02:05:28 +0000 (02:05 +0000)]
- Implemented DOMHTMLElementExtensions.
- Added stubs for the rest of the DOM API.

        Reviewed by dave.

        * WebCore.pbproj/project.pbxproj:
        * khtml/dom/html_element.cpp:
        (HTMLElement::setContentEditable): moved implementation from here to HTMLElementImpl
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::setContentEditable): new, moved from HTMLElement
        * khtml/html/html_elementimpl.h:
        * kwq/DOM-CSS.mm:
        (-[DOMObject sheet]):
        (-[DOMDocument getComputedStyle::]):
        * kwq/DOM.mm:
        (-[DOMAbstractView document]):
        (-[DOMDocumentView defaultView]):
        (-[DOMDocument createNodeIterator::::]):
        (-[DOMDocument createTreeWalker::::]):
        (-[DOMNodeFilter acceptNode:]):
        (-[DOMNodeIterator root]):
        (-[DOMNodeIterator whatToShow]):
        (-[DOMNodeIterator filter]):
        (-[DOMNodeIterator expandEntityReferences]):
        (-[DOMNodeIterator nextNode]):
        (-[DOMNodeIterator previousNode]):
        (-[DOMNodeIterator detach]):
        (-[DOMTreeWalker root]):
        (-[DOMTreeWalker whatToShow]):
        (-[DOMTreeWalker filter]):
        (-[DOMTreeWalker expandEntityReferences]):
        (-[DOMTreeWalker currentNode]):
        (-[DOMTreeWalker setCurrentNode:]):
        (-[DOMTreeWalker parentNode]):
        (-[DOMTreeWalker firstChild]):
        (-[DOMTreeWalker lastChild]):
        (-[DOMTreeWalker previousSibling]):
        (-[DOMTreeWalker nextSibling]):
        (-[DOMTreeWalker previousNode]):
        (-[DOMTreeWalker nextNode]):
        * kwq/DOMEvents.mm: Added.
        (-[DOMEvent type]):
        (-[DOMEvent target]):
        (-[DOMEvent currentTarget]):
        (-[DOMEvent eventPhase]):
        (-[DOMEvent bubbles]):
        (-[DOMEvent cancelable]):
        (-[DOMEvent timeStamp]):
        (-[DOMEvent stopPropagation]):
        (-[DOMEvent preventDefault]):
        (-[DOMEvent initEvent:::]):
        (-[DOMEventTarget addEventListener:::]):
        (-[DOMEventTarget removeEventListener:::]):
        (-[DOMEventTarget dispatchEvent:]):
        (-[DOMMouseEvent screenX]):
        (-[DOMMouseEvent screenY]):
        (-[DOMMouseEvent clientX]):
        (-[DOMMouseEvent clientY]):
        (-[DOMMouseEvent ctrlKey]):
        (-[DOMMouseEvent shiftKey]):
        (-[DOMMouseEvent altKey]):
        (-[DOMMouseEvent metaKey]):
        (-[DOMMouseEvent button]):
        (-[DOMMouseEvent relatedTarget]):
        (-[DOMMouseEvent initMouseEvent:::::::::::::::]):
        (-[DOMMutationEvent relatedNode]):
        (-[DOMMutationEvent prevValue]):
        (-[DOMMutationEvent newValue]):
        (-[DOMMutationEvent attrName]):
        (-[DOMMutationEvent attrChange]):
        (-[DOMMutationEvent initMutationEvent::::::::]):
        (-[DOMUIEvent view]):
        (-[DOMUIEvent detail]):
        (-[DOMUIEvent initUIEvent:::::]):
        (-[DOMDocument createEvent:]):
        * kwq/DOMHTML.mm:
        (-[DOMHTMLElement innerHTML]): implemented
        (-[DOMHTMLElement setInnerHTML:]): implemented
        (-[DOMHTMLElement innerText]): implemented
        (-[DOMHTMLElement setInnerText:]): implemented
        (-[DOMHTMLElement children]): implemented
        (-[DOMHTMLElement contentEditable]): implemented
        (-[DOMHTMLElement setContentEditable:]): implemented
        (-[DOMHTMLElement isContentEditable]): implemented

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

18 years ago Implement sharing of similar style objects. Cuts the # of style objects allocated...
hyatt [Thu, 29 Apr 2004 01:19:04 +0000 (01:19 +0000)]
Implement sharing of similar style objects. Cuts the # of style objects allocated on the PLT by more
than half.

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/css/html4.css:
        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * khtml/html/html_baseimpl.cpp:
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_blockimpl.cpp:
        * khtml/html/html_blockimpl.h:
        * khtml/html/html_elementimpl.cpp:
        * khtml/html/html_elementimpl.h:
        * khtml/html/html_formimpl.cpp:
        * khtml/html/html_formimpl.h:
        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_imageimpl.h:
        * khtml/html/html_inlineimpl.cpp:
        * khtml/html/html_inlineimpl.h:
        * khtml/html/html_listimpl.cpp:
        * khtml/html/html_listimpl.h:
        * khtml/html/html_objectimpl.cpp:
        * khtml/html/html_objectimpl.h:
        * khtml/html/html_tableimpl.cpp:
        * khtml/html/html_tableimpl.h:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:

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

18 years ago - Made WebArchive and WebResource conform to NSCoding and NSCopying.
cblu [Thu, 29 Apr 2004 00:56:23 +0000 (00:56 +0000)]
- Made WebArchive and WebResource conform to NSCoding and NSCopying.

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.h: added header doc comment for WebArchive methods
        * WebView.subproj/WebArchive.h:
        * WebView.subproj/WebArchive.m:
        (-[WebArchive initWithCoder:]): new
        (-[WebArchive encodeWithCoder:]): new
        (-[WebArchive copyWithZone:]): new
        * WebView.subproj/WebResource.h:
        * WebView.subproj/WebResource.m:
        (-[WebResource init]): new
        (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call [self init]
        (-[WebResource initWithCoder:]): new
        (-[WebResource encodeWithCoder:]): new
        (-[WebResource copyWithZone:]): new

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

18 years ago Reviewed by Chris.
darin [Wed, 28 Apr 2004 22:49:49 +0000 (22:49 +0000)]
    Reviewed by Chris.

        - another step of refinement on the reinterpret_cast stuff; now it's a compile-time
          error if you do it wrong
        - fixed a couple of storage leaks

        * kwq/DOMInternal.h: Added new DOM_cast template function. Like reinterpret_cast, but a
        compile-time error if you use it with the wrong parameters. Also added type-safe versions
        of the wrapper functions that do the DOM_cast automatically.
        * kwq/DOMInternal.mm:
        (getDOMWrapperImpl): Changed name and parameter type as part of above change.
        (addDOMWrapperImpl): Ditto.
        (removeDOMWrapper): Ditto.

        * kwq/DOM.mm: Use the new DOM_cast instead of reinterpret_cast, and the new
        DOM wrapper calls that do the cast automatically.
        * kwq/DOM-CSS.mm: More of the same.
        (-[DOMCSSStyleSheet dealloc]): Added override to deref, fixes leak.
        * kwq/DOMHTML.mm: More of the same.
        (-[DOMHTMLCollection dealloc]): Added override to deref, fixes leak.
        (-[DOMHTMLOptionsCollection dealloc]): Added override to deref, fixes theoretical leak.

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

18 years ago A little bit more progress in wiring up the font panel.
sullivan [Wed, 28 Apr 2004 21:44:51 +0000 (21:44 +0000)]
    A little bit more progress in wiring up the font panel.

        Reviewed by Ken.

        * WebView.subproj/WebViewInternal.h:
        put _updateFontPanel here. Also moved _isLoading here, since it was
        already in a category named WebInternal

        * WebView.subproj/WebView.m:
        (-[WebView _isLoading]):
        moved into WebInternal category implementation
        changed from method to function
        added, guts not filled in yet
        (-[WebView _updateFontPanel]):
        now calls these two functions (but results are always nil)
        (-[WebView setSelectedDOMRange:affinity:]):
        remove call to _updateFontPanel here since it's now called in
        the proper bottleneck

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge postDidChangeNotification]):
        call -[WebView _updateFontPanel] in addition to sending notification
        (-[WebBridge postDidChangeSelectionNotification]):

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

18 years agoWebKit:
sullivan [Wed, 28 Apr 2004 20:05:38 +0000 (20:05 +0000)]

        - fixed these bugs:
        <rdar://problem/3636570>: "API: [WebPreferences tabsToLinks] should be public API"
        <rdar://problem/3610597>: "API: could turn "stealth browsing" preference into API"

        Reviewed by Darin.

        I just moved the declarations and implementations from one place to another.
        (No clients in WebKit needed their #imports updated.) This confused cvs diff quite a bit.

        * WebView.subproj/WebPreferences.h:
        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences setTabsToLinks:]):
        (-[WebPreferences tabsToLinks]):
        (-[WebPreferences setPrivateBrowsingEnabled:]):
        (-[WebPreferences privateBrowsingEnabled]):
        (-[WebPreferences _pageCacheSize]):
        (-[WebPreferences _objectCacheSize]):
        (-[WebPreferences _backForwardCacheExpirationInterval]):
        * WebView.subproj/WebPreferencesPrivate.h:


        - fixed up #imports for WebPreferencesPrivate

        Reviewed by Darin.

        * AppController.m:
        removed #import <WebKit/WebPreferencesPrivate.h>
        * BrowserWindowController.m:
        replaced #import <WebKit/WebPreferencesPrivate.h> with #import <WebKit/WebPreferences.h>
        * DownloadProgressEntry.m:
        * FormCompletionController.m:
        * Preferences.subproj/AdvancedPreferences.m:
        removed #import <WebKit/WebPreferencesPrivate.h>

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

18 years ago Cut the time spent on an operation inside widthForNextCharacter from 17% of the...
hyatt [Wed, 28 Apr 2004 19:52:35 +0000 (19:52 +0000)]
Cut the time spent on an operation inside widthForNextCharacter from 17% of the function time down to less than
5% merely by adding a check for non-zero letter-spacing (thus avoiding double precision math in the
common case where we just add 0 between letters).

        Reviewed by rjw

        * WebCoreSupport.subproj/WebTextRenderer.m:

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

18 years ago Initial plumbing to get the font panel to be updated from an editable
sullivan [Wed, 28 Apr 2004 18:45:45 +0000 (18:45 +0000)]
    Initial plumbing to get the font panel to be updated from an editable

        Reviewed by Ken.

        * WebView.subproj/WebView.m:
        (-[WebView _textAttributesFromStyle:]):
        new dummy method, will need implementation
        (-[WebView _updateFontPanel]):
        new method, sets the font shown in the font panel from the current
        selection. Lots of placeholder stuff.
        (-[WebView setSelectedDOMRange:affinity:]):
        call _updateFontPanel here for now.

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

18 years ago Reviewed by Chris.
darin [Wed, 28 Apr 2004 18:12:01 +0000 (18:12 +0000)]
    Reviewed by Chris.

        - fixed reinterpret_cast mistakes and some style issues in DOM implementation

        * kwq/DOM-CSS.mm:
        (-[DOMCSSStyleRule _styleRuleImpl]): Fix broken reinterpret_cast; you must reinterpret_cast back
        to the class you reinterpret_casted from, not to a derived class.
        (-[DOMCSSMediaRule _mediaRuleImpl]): Ditto.
        (-[DOMCSSFontFaceRule _fontFaceRuleImpl]): Ditto.
        (-[DOMCSSPageRule _pageRuleImpl]): Ditto.
        (-[DOMCSSImportRule _importRuleImpl]): Ditto.
        (-[DOMCSSCharsetRule _importRuleImpl]): Ditto.
        * kwq/DOMHTML.mm:
        (-[DOMHTMLOptionsCollection length]): Put in an "unimplemented" version instead of leaving out
        the class implementation altogether.
        (-[DOMHTMLOptionsCollection setLength:]): Ditto.
        (-[DOMHTMLOptionsCollection item:]): Ditto.
        (-[DOMHTMLOptionsCollection namedItem:]): Ditto.
        (+[DOMHTMLElement _elementWithImpl:]): Corrected this implementation. The wrapper must use a
        standard node wrapper, since this is a subclass of DOMNode. Also moved into a separate category
        so it gets checked against the declarations above.
        (-[DOMHTMLElement _HTMLElementImpl]): Fix broken reinterpret_cast.
        (-[DOMHTMLHtmlElement _HTMLHtmlElementImpl]): Ditto.
        (-[DOMHTMLHeadElement _headElementImpl]): Ditto.
        (-[DOMHTMLLinkElement _linkElementImpl]): Ditto.
        (-[DOMHTMLTitleElement _titleElementImpl]): Ditto.
        (-[DOMHTMLMetaElement _metaElementImpl]): Ditto.
        (-[DOMHTMLBaseElement _baseElementImpl]): Ditto.
        (-[DOMHTMLStyleElement _styleElementImpl]): Ditto.
        (-[DOMHTMLBodyElement _bodyElementImpl]): Ditto.
        (-[DOMHTMLFormElement _formElementImpl]): Ditto.
        (+[DOMHTMLFormElement _formElementWithImpl:]): Another DOMNode subclass wrapper fix.
        (-[DOMHTMLIsIndexElement _isIndexElementImpl]): Fix broken reinterpret_cast.
        (-[DOMHTMLSelectElement _selectElementImpl]): Ditto.
        (-[DOMHTMLOptGroupElement _optGroupElementImpl]): Ditto.
        (-[DOMHTMLOptionElement _optionElementImpl]): Ditto.
        (-[DOMHTMLInputElement _inputElementImpl]): Ditto.
        (-[DOMHTMLTextAreaElement _textAreaElementImpl]): Ditto.
        (-[DOMHTMLButtonElement _buttonElementImpl]): Ditto.
        (-[DOMHTMLLabelElement _labelElementImpl]): Ditto.
        (-[DOMHTMLFieldSetElement _fieldSetElementImpl]): Ditto.
        (-[DOMHTMLLegendElement _legendElementImpl]): Ditto.
        (-[DOMHTMLUListElement _uListElementImpl]): Ditto.
        (-[DOMHTMLOListElement _oListElementImpl]): Ditto.
        (-[DOMHTMLDListElement _dListElementImpl]): Ditto.
        (-[DOMHTMLDirectoryElement _directoryListElementImpl]): Ditto.
        (-[DOMHTMLMenuElement _menuListElementImpl]): Ditto.
        (-[DOMHTMLLIElement _liElementImpl]): Ditto.
        (-[DOMHTMLQuoteElement _quoteElementImpl]): Ditto.
        (-[DOMHTMLDivElement _divElementImpl]): Ditto.
        (-[DOMHTMLParagraphElement _paragraphElementImpl]): Ditto.
        (-[DOMHTMLHeadingElement _headingElementImpl]): Ditto.
        (-[DOMHTMLPreElement _preElementImpl]): Ditto.
        (-[DOMHTMLBRElement _BRElementImpl]): Ditto.
        (-[DOMHTMLBaseFontElement _baseFontElementImpl]): Ditto.
        (-[DOMHTMLFontElement _fontElementImpl]): Ditto.
        (-[DOMHTMLHRElement _HRElementImpl]): Ditto.
        (-[DOMHTMLModElement _modElementImpl]): Ditto.
        (-[DOMHTMLAnchorElement _anchorElementImpl]): Ditto.
        (-[DOMHTMLImageElement _imageElementImpl]): Ditto.
        (-[DOMHTMLObjectElement _objectElementImpl]): Ditto.
        (-[DOMHTMLParamElement _paramElementImpl]): Ditto.
        (-[DOMHTMLAppletElement _appletElementImpl]): Ditto.
        (-[DOMHTMLMapElement _mapElementImpl]): Ditto.
        (-[DOMHTMLAreaElement _areaElementImpl]): Ditto.
        (-[DOMHTMLScriptElement _scriptElementImpl]): Ditto.
        (+[DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:]): Another DOMNode subclass wrapper fix.
        (-[DOMHTMLTableCaptionElement _tableCaptionElementImpl]): Fix broken reinterpret_cast.
        (+[DOMHTMLTableSectionElement _tableSectionElementWithImpl:]): Another DOMNode subclass wrapper fix.
        (-[DOMHTMLTableSectionElement _tableSectionElementImpl]): Fix broken reinterpret_cast.
        (+[DOMHTMLTableElement _tableElementWithImpl:]): Another DOMNode subclass wrapper fix.
        (-[DOMHTMLTableElement _tableElementImpl]): Fix broken reinterpret_cast.
        (-[DOMHTMLTableColElement _tableColElementImpl]): Ditto.
        (-[DOMHTMLTableRowElement _tableRowElementImpl]): Ditto.
        (+[DOMHTMLTableCellElement _tableCellElementWithImpl:]): Another DOMNode subclass wrapper fix.
        (-[DOMHTMLTableCellElement _tableCellElementImpl]): Fix broken reinterpret_cast.
        (-[DOMHTMLFrameSetElement _frameSetElementImpl]): Ditto.
        (-[DOMHTMLFrameElement _frameElementImpl]): Ditto.
        (-[DOMHTMLIFrameElement _IFrameElementImpl]): Ditto.
        (-[DOMHTMLEmbedElement _embedElementImpl]): Ditto.

        * kwq/HTMLDOM.mm: Removed.

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

18 years agoWebCore:
kocienda [Wed, 28 Apr 2004 16:55:28 +0000 (16:55 +0000)]

        Reviewed by Darin

        * khtml/khtml_part.cpp:
        (KHTMLPart::notifySelectionChanged): Call new postDidChangeSelectionNotification function
        to send Cocoa notification when the selection changes.
        (KHTMLPart::appliedEditing): Call postDidChangeNotification to send Cocoa notification when the document changes
        due to editing.
        (KHTMLPart::unappliedEditing): Ditto.
        (KHTMLPart::reappliedEditing): Ditto.
        * kwq/DOMHTML.mm:
        (-[DOMHTMLDocument _HTMLDocumentImpl]): Fix cast to account for multiple inheritance used by the impl class.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::postDidChangeSelectionNotification): New function. Call the bridge to post the notification.
        (KWQKHTMLPart::postDidChangeNotification): Ditto.
        * kwq/WebCoreBridge.h: Declare new -postDidChangeSelectionNotification and -postDidChangeNotification methods.


        Reviewed by Darin

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge postDidChangeNotification]): Posts Cocoa notification when the document changes
        due to editing.
        (-[WebBridge postDidChangeSelectionNotification]): Posts Cocoa notification when the document selection
        * WebKit.exp: Export editing notification string constants.
        * WebView.subproj/WebView.m: Define editing notification string constants.
        (-[WebView computedStyleForElement:pseudoElement:]): Add implementation.
        (-[WebView setEditingDelegate:]): Do work to set up delegate to receive notification callbacks.
        (-[WebView DOMDocument]): Simplify to just call the bridge DOMDocument. No need to jump through hoops here.
        (-[WebView insertNewline:]): Consult delegate before taking action.
        (-[WebView deleteBackward:]): Ditto.
        (-[WebView insertText:]): Ditto.

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

18 years ago Reviewed by Ken.
darin [Wed, 28 Apr 2004 16:21:56 +0000 (16:21 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3636261>: "nil-deref in selectedStylesheetSet iterating through properties in a non-view document"

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::selectedStylesheetSet): Add nil check.
        (DocumentImpl::setSelectedStylesheetSet): Ditto.

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

18 years ago Fixed broken development build.
sullivan [Wed, 28 Apr 2004 01:32:55 +0000 (01:32 +0000)]
    Fixed broken development build.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToLayoutAcceptable]):
        updated bad variable name used only in LOG statement to match
        recent change.

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

18 years agoWebCore:
rjw [Wed, 28 Apr 2004 01:00:47 +0000 (01:00 +0000)]
<rdar://problem/3564519>: API: please add a way to set the media type for a WebView

        Reviewed by Chris.

        * khtml/khtmlview.cpp:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:

<rdar://problem/3279301>: API: WebKitErrorCannotFindPlugin and WebKitErrorCannotLoadPlugin should use PlugIn

<rdar://problem/3278513>: API: Need API to control the size of WebHistory

<rdar://problem/3564519>: API: please add a way to set the media type for a WebView
<rdar://problem/3565642>: API: allow a way to extend the MIME types that a WebView will display
<rdar://problem/3577693>: API: add ability to subclass WebView but still use it with Carbon

Reviewed by Chris.

        * Carbon.subproj/HIWebView.h:
        * Carbon.subproj/HIWebView.m:
        * History.subproj/WebHistory.h:
        * History.subproj/WebHistory.m:
        (-[WebHistoryPrivate setHistoryAgeInDaysLimit:]):
        (-[WebHistoryPrivate historyAgeInDaysLimit]):
        (-[WebHistoryPrivate setHistoryItemLimit:]):
        (-[WebHistoryPrivate historyItemLimit]):
        (-[WebHistoryPrivate _ageLimitDate]):
        (-[WebHistoryPrivate arrayRepresentation]):
        (-[WebHistory setHistoryItemLimit:]):
        (-[WebHistory historyItemLimit]):
        (-[WebHistory setHistoryAgeInDaysLimit:]):
        (-[WebHistory historyAgeInDaysLimit]):
        * History.subproj/WebHistoryPrivate.h:
        * Misc.subproj/WebKitErrors.h:
        * Misc.subproj/WebKitErrors.m:
        * Plugins.subproj/WebNetscapePluginDocumentView.m:
        (-[WebNetscapePluginDocumentView setDataSource:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge isViewSelected:]):
        (-[WebBridge overrideMediaType]):
        * WebView.subproj/WebView.h:
        * WebView.subproj/WebView.m:
        (-[WebViewPrivate dealloc]):
        (+[WebView MIMETypesShownAsHTML]):
        (+[WebView setMIMETypesShownAsHTML:]):
        (-[WebView customUserAgent]):
        (-[WebView setMediaStyle:]):
        (-[WebView mediaStyle]):
        * WebView.subproj/WebViewPrivate.h:

<rdar://problem/3279301>: API: WebKitErrorCannotFindPlugin and WebKitErrorCannotLoadPlugin should use PlugIn

        Reviewed by Chris.

        * LoadProgressMonitor.m:
        (-[LoadProgressMonitor webView:plugInFailedWithError:dataSource:]):

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

18 years ago Eliminate the preferences for timed/resource layouts. Accessing them is now taking...
hyatt [Tue, 27 Apr 2004 23:29:05 +0000 (23:29 +0000)]
Eliminate the preferences for timed/resource layouts.  Accessing them is now taking 0.5% on the cvs-base
test, so we're just going to hardcode the values instead.

        Reviewed by mjs

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToLayoutAcceptable]):
        (-[WebFrame _isLoadComplete]):
        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):
        (-[WebPreferences _objectCacheSize]):
        * WebView.subproj/WebPreferencesPrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _mainReceivedBytesSoFar:fromDataSource:complete:]):

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

18 years agoWebCore:
kocienda [Tue, 27 Apr 2004 22:57:31 +0000 (22:57 +0000)]

        Reviewed by Hyatt

        Make selections draw in a more Cocoa-like way, where
        fully-selected lines draw out to the ends of lines, and
        spaces between lines are drawn with the selection color as well.

        * WebCore-combined.exp: Add _WebCoreInitializeEmptyTextGeometry symbol
        * WebCore.exp: Ditto.
        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointInsideSelection): Marginally-related change. Fix up this function
        so that it works right, given my recent changes to positionForCoordinates. This fix
        "really" fixes the problem. Unlike my attempt to fix yesterday.
        * khtml/rendering/font.cpp:
        (Font::drawHighlightForText): New drawHighlightForText interface which includes extra
        information to draw the selection.
        * khtml/rendering/font.h: Ditto.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Some minor improvements and cleanups to
        make this code work correctly in more cases.
        * khtml/rendering/render_block.h: Remove spurious semi-colon after namespace block.
        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): Fix typo in comment. Also, clean up
        one unnecessary call to absolutePosition.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paint): Many changes to add the new selection drawing behavior.
        * khtml/rendering/render_inline.cpp:
        (RenderInline::positionForCoordinates): Added to help make selections work right
        with continuations.
        * khtml/rendering/render_inline.h: Ditto.
        * khtml/rendering/render_object.h: Give zero default argument to inlineBox() helper.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintSelection): Many changes to add the new selection drawing behavior.
        * kwq/KWQListBox.mm:
        (-[KWQTableView drawRow:clipRect:]): Use new WebCoreTextGeometry struct.
        * kwq/KWQPainter.h: New drawHighlightForText interface which includes extra
        information to draw the selection.
        * kwq/KWQPainter.mm:
        (QPainter::drawText): Use new WebCoreInitializeEmptyTextGeometry struct.
        (QPainter::drawHighlightForText): Use new WebCoreTextGeometry struct.
        * kwq/WebCoreTextRenderer.h: Declare new WebCoreTextGeometry struct.
        * kwq/WebCoreTextRendererFactory.m:
        (WebCoreInitializeEmptyTextGeometry): Initializer for WebCoreTextGeometry struct.


        Reviewed by Hyatt

        Make selections draw in a more Cocoa-like way, where
        fully-selected lines draw out to the ends of lines, and
        spaces between lines are drawn with the selection color as well.

        * Misc.subproj/WebKitNSStringExtras.m: Use new WebCoreTextGeometry struct. No change in functionality.
        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer drawRun:style:geometry:]): Use new WebCoreTextGeometry struct. No change in functionality.
        (-[WebTextRenderer drawHighlightForRun:style:geometry:]): Ditto.
        (-[WebTextRenderer _CG_drawHighlightForRun:style:geometry:]): Many changes to add the new selection drawing behavior.
        (-[WebTextRenderer _CG_drawRun:style:geometry:]):  Use new WebCoreTextGeometry struct. No change in functionality.
        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): Many changes to add the new selection drawing behavior.
        (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):  Use new WebCoreTextGeometry struct. No change in functionality.

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

18 years ago Don't do unnecessary string comparisons when no composite operator is
rjw [Tue, 27 Apr 2004 19:54:04 +0000 (19:54 +0000)]
Don't do unnecessary string comparisons when no composite operator is

        Reviewed by Hyatt.

        * kwq/KWQPainter.mm:

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

18 years ago Reviewed by Ken.
darin [Tue, 27 Apr 2004 17:38:07 +0000 (17:38 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3623694>: "top level <option> and <optgroup> labels look identical in pop-up menus; should not"

        * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
        Call appendGroupLabel instead of appendItem for group labels.

        * kwq/KWQComboBox.h: Added appendGroupLabel, private setControlSize, labelFont, setTitle, _labelFont,
        and make _items a QValueList<KWQListBoxItem> instead of QStringList.
        * kwq/KWQComboBox.mm:
        (QComboBox::QComboBox): Initializes _labelFont to nil.
        (QComboBox::~QComboBox): Release _labelFont.
        (QComboBox::setTitle): Added helper function. Uses an attributed string for group labels, and also sets
        the action to NULL so they are disabled.
        (QComboBox::appendItem): Added isLabel boolean parameter, make KWQListBoxItem, call setTitle.
        (QComboBox::sizeHint): Changed to handle group labels with a separate renderer to measure bolded text.
        (QComboBox::setCurrentItem): Changed to use setTitle helper.
        (QComboBox::setFont): Release _labelFont if control size changed.
        (QComboBox::labelFont): Compute label font lazily.
        (QComboBox::populateMenu): Changed to use setTitle helper.

        * kwq/KWQListBox.h: Removed excess includes, fixed comment.

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

18 years ago Reviewed by Maciej.
darin [Tue, 27 Apr 2004 04:20:09 +0000 (04:20 +0000)]
    Reviewed by Maciej.

        - follow-on to fix for <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"
        This part fixes anchor names with non-ASCII characters in local files.

        * kwq/KWQKURL.mm: (KURL::KURL): For file and help URLs, force UTF-8 only for the path part of the URL.
        Use the document encoding for the rest of the URL.
        * kwq/KWQTextCodec.h: (operator!=): Added.

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

18 years ago Fix for Emerson truncation problem using apple-line-clamp. Always dirty positioned...
hyatt [Tue, 27 Apr 2004 01:24:47 +0000 (01:24 +0000)]
Fix for Emerson truncation problem using apple-line-clamp.  Always dirty positioned objects so that they
will move when the height changes.

        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_flexbox.cpp:

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

18 years agoWebCore:
rjw [Mon, 26 Apr 2004 23:10:44 +0000 (23:10 +0000)]
Added support for specifying composite operation on an
image element.  Attribute name is "composite", possible values


<img composite="source-over" src="triangle.png">
<img style="position:relative; left:-200px;" composite="destination-in" src="circle.png">

        Reviewed by Ken.

        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_imageimpl.h:
        * khtml/misc/htmlattrs.c:
        * khtml/misc/htmlattrs.h:
        * khtml/misc/htmlattrs.in:
        * khtml/rendering/render_image.cpp:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        * kwq/WebCoreImageRenderer.h:

Added support for specifying composite operation on an
image element, i.e.:

<img composite="source-over" src="triangle.png">
<img style="position:relative; left:-200px;" composite="destination-in" src="circle.png">

This feature was requested by the dashboard guys.  They can use it to apply
transparency masks to widgies.

        Reviewed by Ken.

        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer initWithMIMEType:]):
        (-[WebImageRenderer initWithData:MIMEType:]):
        (-[WebImageRenderer initWithContentsOfFile:]):
        (-[WebImageRenderer copyWithZone:]):
        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
        (-[WebImageRenderer drawImageInRect:fromRect:]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:]):

        Added debug menu to make browser window transparent.  Useful
        for testing widgies.

        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]):
        (-[BrowserDocument toggleBackForwardEnabled:]):
        (-[BrowserDocument toggleTransparentWindow:]):

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

18 years ago More header doc changes after John's review.
cblu [Mon, 26 Apr 2004 22:19:24 +0000 (22:19 +0000)]
More header doc changes after John's review.

        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebResource.h:

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

18 years agoFix semicolon.
darin [Mon, 26 Apr 2004 22:03:14 +0000 (22:03 +0000)]
Fix semicolon.

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

18 years ago - fixed <rdar://problem/3634145>: "REGRESSION: nil-deref in QTextCodec::toUni...
darin [Mon, 26 Apr 2004 22:01:49 +0000 (22:01 +0000)]
    - fixed <rdar://problem/3634145>: "REGRESSION: nil-deref in QTextCodec::toUnicode every time loading page at wiki.wordpress.org"

        * kwq/KWQKURL.mm:
        (KURL::KURL): Simplify check for nil that defaults to UTF-8.
        (KURL::decode_string): Add a similar test here.

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

18 years agoUpdate layout tests to reflect WinIE body-height quirk.
hyatt [Mon, 26 Apr 2004 21:19:03 +0000 (21:19 +0000)]
Update layout tests to reflect WinIE body-height quirk.

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

18 years ago Implement the quirk that makes the <body> and <html> size to fill the viewport in...
hyatt [Mon, 26 Apr 2004 21:16:21 +0000 (21:16 +0000)]
Implement the quirk that makes the <body> and <html> size to fill the viewport in quirks mode.  This
matches WinIE.

        Reviewed by john

        * khtml/rendering/render_box.cpp:

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

18 years ago * WebView.subproj/WebDataSourcePrivate.h: added some header doc comments
cblu [Mon, 26 Apr 2004 18:52:12 +0000 (18:52 +0000)]
    * WebView.subproj/WebDataSourcePrivate.h: added some header doc comments
        * WebView.subproj/WebFramePrivate.h: fixed header doc typo

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

18 years ago Reviewed by John
kocienda [Mon, 26 Apr 2004 18:34:18 +0000 (18:34 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3633458>: "REGRESSION (125-137): Can't drag a selection unless it starts at beginning of line"

        * khtml/khtml_part.cpp:
        (KHTMLPart::isPointInsideSelection): I flubbed when I converted this
        code to use my new positionForCoordinates helper. I failed to add in
        the passed in values for x and y to the absolute coordinates for the
        clicked node. So, the "unless it starts at beginning of line" behavior
        is exactly as one would expect.

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

18 years ago Eliminate overhangingContents. This concept was redundant with the overflowHeight...
hyatt [Mon, 26 Apr 2004 08:58:45 +0000 (08:58 +0000)]
Eliminate overhangingContents.  This concept was redundant with the overflowHeight mechanism that I
implemented some time ago, and in fact, it causes us to grovel through much more of the render tree
than we should when painting.  It turns out that none of the places that used this boolean needed
to any longer, and so the entire implementation can now be removed from the tree.

        Reviewed by mjs, darin

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_inline.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.cpp:

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

18 years ago Fix for 3258403, implement support for min-height and max-height on normal flow...
hyatt [Mon, 26 Apr 2004 06:38:10 +0000 (06:38 +0000)]
Fix for 3258403, implement support for min-height and max-height on normal flow elements.  With this patch the
only min-height/max-height work that remains to be done is for table cells and positioned elements.

        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * layout-tests/fast/block/basic/minheight-expected.txt: Added.
        * layout-tests/fast/block/basic/minheight.html: Added.

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

18 years ago Reviewed by Dave.
darin [Mon, 26 Apr 2004 02:33:32 +0000 (02:33 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3633091>: "add overrideMimeType function to XMLHttpRequest"

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty): Add logic to override MIME type if
        OverrideMIMEType was called.
        (KJS::XMLHttpRequestProtoFunc::tryCall): Store the MIME type when overrideMimeType is called.
        * khtml/ecma/xmlhttprequest.h: Add OverrideMIMEType to the XMLHttpRequest property enum,
        and also add a MIMETypeOverride data member to the class.
        * khtml/ecma/xmlhttprequest.lut.h: Regenerated.

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

18 years ago Reviewed by Darin.
mjs [Mon, 26 Apr 2004 00:08:34 +0000 (00:08 +0000)]
    Reviewed by Darin.

<rdar://problem/3628309>: Fedex tracking page so slow it seems like a hang (site change?)
<rdar://problem/3608061>: "ATI Developer site so slow it seems like a hang"
<rdar://problem/3612130>: "Reproducible hang in JavaScript at www.tfl.gov.uk"
<rdar://problem/3626022>: "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript"
<rdar://problem/3632348>: "www.whatis.com search for "pivot table" leads to JavaScript hang"

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be
innerText, not innerHTML.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerText): Make sure not to include all the text after an
element if it has no children.
        * layout-tests/fast/dom/anchor-text-expected.txt: Added.
        * layout-tests/fast/dom/anchor-text.html: Added.
        * layout-tests/fast/dom/inner-text-expected.txt: Added.
        * layout-tests/fast/dom/inner-text.html: Added.

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

18 years ago Reviewed by Dave.
darin [Sun, 25 Apr 2004 15:10:57 +0000 (15:10 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"

        * khtml/khtml_part.h: Add new gotoAnchor helper function, private.
        * khtml/khtml_part.cpp:
        (KHTMLPart::openURL): Call new gotoAnchor helper, since the code is now complex enough
        that I don't want to copy and paste.
        (KHTMLPart::gotoAnchor): Use the pages own encoding when decoding the string for an
        anchor reference when going to an anchor. This matches the behavior of other browsers.
        (KHTMLPart::slotFinishedParsing): Call new gotoAnchor helper.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): Call new gotoAnchor helper.

        * kwq/KWQKURL.h: Removed htmlRef function, and made encodedHtmlRef an inline.
        Removed unused encoding hint parameter from setQuery (it's not a "hint" at all, but we
        don't use it). Added a codec parameter to decode_string.
        * kwq/KWQKURL.mm:
        (hexDigitValue): Added. Helper function.
        (KURL::setQuery): Removed unused parameter.
        (KURL::decode_string): Implemented this function. It needs to use an encoding specified
        by the web page. Also, we wanted to make a version that did not use the
        CFURLCreateStringByReplacingPercentEscapes function anyway.

        * kwq/KWQString.h: Added parameters to copyLatin1. Now you can copy an arbitrary substring.
        * kwq/KWQString.mm: (QString::copyLatin1): Updated implementation to handle the two
        new parameters.

        * WebCore-tests.exp: Updated for change in signature of setQuery and decode_string.
        * WebCore-combined.exp: Regenerated.

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

18 years ago Reviewed by Dave.
darin [Sun, 25 Apr 2004 15:10:32 +0000 (15:10 +0000)]
    Reviewed by Dave.

        * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was allocating a buffer
        that is 2x too big.

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

18 years ago Reviewed by Dave.
darin [Sun, 25 Apr 2004 15:10:24 +0000 (15:10 +0000)]
    Reviewed by Dave.

        * Misc.subproj/WebNSURLExtras.m: (hexDigit): Use capitalized hex, not lowercase, for consistency
        with similar functions in WebCore and what other web browsers do.

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

18 years agoWebCore:
darin [Sun, 25 Apr 2004 02:46:09 +0000 (02:46 +0000)]

        - fixed <rdar://problem/3570953>: "Update "Acknowledgements" to remove expat and possibly include libxml"

        * WebCore.pbproj/project.pbxproj: Removed the part of the copyright notice that was for expat contributors.


        - fixed <rdar://problem/3570953>: "Update "Acknowledgements" to remove expat and possibly include libxml"

        * Help/Acknowledgments.rtf: New version of the file from legal, removing expat-related section.

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

18 years ago Reviewed by Maciej.
darin [Sat, 24 Apr 2004 02:50:22 +0000 (02:50 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3627362>: "bad access with libgmalloc in -[_WebCoreHistoryProvider containsItemForURLUnicode:length:]"

        * History.subproj/WebHistory.m:
        (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]): Add range checks so we
        don't overrun the buffer while looking for slashes.

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

18 years ago Fix the apple-line-clamp values to more closely match what is needed, an even split...
hyatt [Fri, 23 Apr 2004 23:57:49 +0000 (23:57 +0000)]
Fix the apple-line-clamp values to more closely match what is needed, an even split of the max lines between the possible

        * khtml/rendering/render_flexbox.cpp:

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

18 years ago Fix to make the containing block percentage height calculation actually work accordi...
hyatt [Fri, 23 Apr 2004 23:43:33 +0000 (23:43 +0000)]
Fix to make the containing block percentage height calculation actually work according to the CSS2 spec.
Percentages other than 100% are now supported, and flexing percentage height blocks inside table cells
are now supported.

        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:

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

18 years ago Reviewed by Darin.
mjs [Fri, 23 Apr 2004 22:40:31 +0000 (22:40 +0000)]
    Reviewed by Darin.

Implementation of conservative GC, based partly on code from
Darin. It's turned off for now, so it shouldn't have any effect on
the normal build.

        * JavaScriptCore.pbproj/project.pbxproj:
        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/protect.h:
        * kjs/protected_values.cpp: Added.
        * kjs/protected_values.h: Added.
        * kjs/value.cpp:
        * kjs/value.h:

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

18 years ago Reviewed by John
kocienda [Fri, 23 Apr 2004 21:20:50 +0000 (21:20 +0000)]
    Reviewed by John

        Fix for this bug:
        <rdar://problem/3632163>: "REGRESSSION: crash on css home page"

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForRenderer): Add null check.

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

18 years ago Reviewed by John
cblu [Fri, 23 Apr 2004 21:17:54 +0000 (21:17 +0000)]
Reviewed by John

Added header doc comments to proposed API's.

        * WebView.subproj/WebArchive.h:
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebResource.h:

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

18 years ago Fix hiermenu opacity bug. Make sure to save/restore the graphics state before pushi...
hyatt [Fri, 23 Apr 2004 19:01:51 +0000 (19:01 +0000)]
Fix hiermenu opacity bug.  Make sure to save/restore the graphics state before pushing and popping
transparency layers, so that alterations to alpha don't accidentally persist.

        Reviewed by kocienda

        * kwq/KWQPainter.mm:

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

18 years ago Reviewed by Darin
kocienda [Fri, 23 Apr 2004 17:18:08 +0000 (17:18 +0000)]
    Reviewed by Darin

        Changed inlineBoxForRenderer(RenderObject *, int) helper that was static
        in dom_position.cpp into a virtual method on RenderObjects. Function is
        now called inlineBox(int). Functionality unchanged.

        * khtml/rendering/render_br.cpp:
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_position.cpp:

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

18 years ago Reviewed by Darin
kocienda [Fri, 23 Apr 2004 17:02:31 +0000 (17:02 +0000)]
    Reviewed by Darin

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::doApply): Fix editing test
        regression with deleting whitespace at the end of the line.
        I just made this "improvement" yesterday, and the concept
        of the change is a good one, but instead of short-circuiting
        if the selection after deleting collapsible whitespace is a
        range (which can be confused by "significant" collapsed
        whitespace at the end of a line), short-circuit if the
        upstream start position equals the downstream end position.

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

18 years agoChange version number to '139u'. The tree is open!
vicki [Fri, 23 Apr 2004 16:41:33 +0000 (16:41 +0000)]
Change version number to '139u'.  The tree is open!

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

18 years agoSafari-138 stamp
vicki [Fri, 23 Apr 2004 16:33:15 +0000 (16:33 +0000)]
Safari-138 stamp

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

18 years agoWebCore:
kocienda [Fri, 23 Apr 2004 15:13:41 +0000 (15:13 +0000)]

        Reviewed by John

        Added some plumbing for applying styles.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createCSSStyleDeclaration): New factory method.
        * khtml/xml/dom_docimpl.h: Declare the above.
        * kwq/DOM-CSS.mm:
        (-[DOMCSSStyleDeclaration _styleDeclarationImpl]): Expose this in the
        WebCoreInternal category, "promoting" it from being private to the
        DOM-CSS.mm file.
        * kwq/DOM.mm: Add -(DOMCSSStyleDeclaration *)createCSSStyleDeclaration extension.
        * kwq/DOMExtensions.h: Delcare the above.
        * kwq/DOMInternal.h: Add _styleDeclarationImpl to WebCoreInternal category.


        Reviewed by John

        Added some plumbing for applying styles.

        * DOM.subproj/DOMExtensions.h: Copied from WebCore.
        * WebView.subproj/WebView.m:
        (-[WebView DOMDocument]): Added new helper.
        (-[WebView styleDeclarationWithText:]): Added new helper.
        * WebView.subproj/WebViewPrivate.h: Declare above methods.

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

18 years ago - fixed <rdar://problem/3631541>: "repro crash in KHTMLPart::setFocusNodeIfNe...
sullivan [Fri, 23 Apr 2004 10:40:20 +0000 (10:40 +0000)]
    - fixed <rdar://problem/3631541>: "repro crash in KHTMLPart::setFocusNodeIfNeeded"

        Reviewed by Maciej.

        * khtml/khtml_part.cpp:
        added nil check

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

18 years ago Back out one of the previous changes, it causes a crash. Whoops!
mjs [Fri, 23 Apr 2004 08:43:51 +0000 (08:43 +0000)]
    Back out one of the previous changes, it causes a crash. Whoops!

        * kwq/KWQScrollView.mm:

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

18 years ago Fixed build snafu (re-declaration of NPBool in npruntime.h and
rjw [Thu, 22 Apr 2004 21:55:41 +0000 (21:55 +0000)]
Fixed build snafu (re-declaration of NPBool in npruntime.h and

        * bindings/npruntime.h:

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

18 years ago Updates to plugin binding APIs.
rjw [Thu, 22 Apr 2004 21:54:33 +0000 (21:54 +0000)]
Updates to plugin binding APIs.
Updates to Java plugin APIs.
Transparency fix for Dashboard.

        Reviewed by John and Greg Bolsinga.

        * Plugins.subproj/WebPluginJava.h: Added.
New API for Java plugin.

* Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:
        * Plugins.subproj/npsap.h: Added.
New API for plugin bindings.

* WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView drawRect:]):
Update for Dashboard.  View must fill with transparency when not
drawing background.

* copy-webcore-files-to-webkit:

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