WebKit-https.git
16 years ago Reviewed by John.
mjs [Sun, 29 Aug 2004 21:47:25 +0000 (21:47 +0000)]
    Reviewed by John.

<rdar://problem/3778314> REGRESSION: Can't proceed to survey questions on Lominger's Apple website

Because we will stop parsing when there is a pending redirection,
avoid setting one if no navigation would actually take place
because the number of steps is out of range.

        * khtml/khtml_part.cpp:
        (KHTMLPart::scheduleHistoryNavigation):
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canGoBackOrForward):
        * kwq/KWQKPartsBrowserInterface.h:
        * kwq/WebCoreBridge.h:

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

16 years ago Reviewed by Chris.
mjs [Sat, 28 Aug 2004 00:31:08 +0000 (00:31 +0000)]
    Reviewed by Chris.

- fixed <rdar://problem/3778043> REGRESSION: innerHTML is broken, breaks automated iBench testing
- also fixed outerHTML, which would spill over past the node for whch it was supposed to get HTML

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::outerHTML):
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::toHTML):
        (NodeImpl::recursive_toString):
        (NodeImpl::recursive_toHTML):
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]):

- added new layout tests to cover the problems I fixed

* layout-tests/fast/innerHTML/001-expected.txt: Added.
        * layout-tests/fast/innerHTML/001.html: Added.
        * layout-tests/fast/innerHTML/002-expected.txt: Added.
        * layout-tests/fast/innerHTML/002.html: Added.
        * layout-tests/fast/innerHTML/003-expected.txt: Added.
        * layout-tests/fast/innerHTML/003.html: Added.

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

16 years ago*** empty log message ***
hyatt [Sat, 28 Aug 2004 00:07:36 +0000 (00:07 +0000)]
*** empty log message ***

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

16 years ago Fix for 3739239, getComputedStyle of top not being implemented broke a site that...
hyatt [Sat, 28 Aug 2004 00:06:51 +0000 (00:06 +0000)]
Fix for 3739239, getComputedStyle of top not being implemented broke a site that checked for it.

        Reviewed by kocienda

        * khtml/css/css_computedstyle.cpp:
        (DOM::valueForLength):
        (DOM::CSSComputedStyleDeclarationImpl::getPositionOffsetValue):
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        * khtml/css/css_computedstyle.h:

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

16 years ago Reviewed by Ken.
sullivan [Fri, 27 Aug 2004 22:39:39 +0000 (22:39 +0000)]
    Reviewed by Ken.

        Tweaked option-tab handling to match good suggestion from Tim Omernick of OmniWeb

        * kwq/KWQTextArea.mm:
        removed override of textDidChange:
        (-[KWQTextAreaTextView keyDown:]):
        moved option-tab handling that was in textDidChange to here. Rearranged existing code
        a little for clarity.

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

16 years agoAdding layout test for contentWindow for iframe
adele [Fri, 27 Aug 2004 22:03:51 +0000 (22:03 +0000)]
Adding layout test for contentWindow for iframe

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

16 years ago Reviewed by Darin.
adele [Fri, 27 Aug 2004 21:52:24 +0000 (21:52 +0000)]
    Reviewed by Darin.

Fix for:
<rdar://problem/3689949> Provide contentWindow access on an iframe

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty): added cases for contentWindow for frames and iframes
        * khtml/ecma/kjs_html.h: added contentWindow to the list of properties for frames and iframes
        * khtml/ecma/kjs_html.lut.h: regenerated file
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::contentPart): factored out old contentDocument code to return KHTMLPart for frame
        (HTMLFrameElementImpl::contentDocument): now just gets the contentDocument from contentPart
        * khtml/html/html_baseimpl.h: added declaration for contentPart

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

16 years ago Reviewed by Chris
kocienda [Fri, 27 Aug 2004 19:07:19 +0000 (19:07 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3756997> WebKit aggressive in making pasted text into a URL, even when it's not much like a URL

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): Don't try so hard to coerce data
        on the pasteboard into a URL, and do not make an anchor with an href for any URLs that are
        explicitly present on the pasteboard. Also, move URL pasteboard type check beneath the RTF
        checks.

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

16 years agoback to 2.0, v162u for tip of tree
vicki [Fri, 27 Aug 2004 18:59:33 +0000 (18:59 +0000)]
back to 2.0, v162u for tip of tree

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

16 years agoSafari-161 stamp
vicki [Fri, 27 Aug 2004 18:49:16 +0000 (18:49 +0000)]
Safari-161 stamp

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

16 years ago Reviewed by Darin
kocienda [Fri, 27 Aug 2004 17:26:02 +0000 (17:26 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3778059> Odd behaviour when editing between blockquote elements

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::deleteUnrenderedText): This function should not move
        the selection out of the current block, ever. This is exactly what the bug reported.
        What was I thinking? Now, the code looks at the passed-in position and then the equivalent
        upstream and downstream positions to see if the selection can be placed there after the
        delete, and settles on the block containing the passed-in position as a fallback.
        * layout-tests/editing/inserting/insert-3778059-fix-expected.txt: Added.
        * layout-tests/editing/inserting/insert-3778059-fix.html: Added.

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

16 years ago Boiler plate for canvas gradients and patterns.
rjw [Fri, 27 Aug 2004 01:40:06 +0000 (01:40 +0000)]
    Boiler plate for canvas gradients and patterns.

        Reviewed by John.

        * khtml/ecma/kjs_html.cpp:
        (KJS::Context2DFunction::tryCall):
        (Context2D::tryPut):
        (Context2D::~Context2D):
        (KJS::GradientFunction::tryCall):
        (Gradient::Gradient):
        (Gradient::tryGet):
        (Gradient::getValueProperty):
        (Gradient::tryPut):
        (Gradient::putValue):
        (Gradient::~Gradient):
        (ImagePattern::ImagePattern):
        (ImagePattern::tryGet):
        (ImagePattern::getValueProperty):
        (ImagePattern::tryPut):
        (ImagePattern::putValue):
        (ImagePattern::~ImagePattern):
        * khtml/ecma/kjs_html.h:
        (KJS::Gradient::toBoolean):
        (KJS::Gradient::classInfo):
        (KJS::Gradient::):
        (KJS::ImagePattern::toBoolean):
        (KJS::ImagePattern::classInfo):
        (KJS::ImagePattern::):
        * khtml/ecma/kjs_html.lut.h:
        (KJS::):

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

16 years ago Fixed build failure on Panther.
cblu [Fri, 27 Aug 2004 01:02:17 +0000 (01:02 +0000)]
Fixed build failure on Panther.

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): ifdef'd out call to AppKit SPI
        (-[WebHTMLView _attributeStringFromDOMRange:]): ditto

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

16 years ago Tweak to last check-in.
cblu [Fri, 27 Aug 2004 00:38:25 +0000 (00:38 +0000)]
Tweak to last check-in.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]):

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

16 years ago Fixed:
cblu [Fri, 27 Aug 2004 00:10:46 +0000 (00:10 +0000)]
Fixed:
<rdar://problem/3546412> support for pasting and drag and dropping of RTF and RTFD to editable WebViews
<rdar://problem/3745345> use AppKit for converting from DOM to RTF

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.m:
        (-[DOMDocument _documentRange]): new
        * DOM.subproj/WebDOMOperationsPrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): call AppKit SPI to get a document fragment from an attributed string
        (-[WebHTMLView string]): added a FIXME
        (-[WebHTMLView _attributeStringFromDOMRange:]): new, calls AppKit SPI that creates an attributed string from a DOM Range
        (-[WebHTMLView attributedString]): call _attributeStringFromDOMRange:, fallback to old code if it returns nil
        (-[WebHTMLView selectedAttributedString]): ditto

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

16 years ago Reviewed by John
kocienda [Thu, 26 Aug 2004 23:54:40 +0000 (23:54 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3777899> REGRESSION (Mail): only first of several misspelled words separated by
        carriage returns is marked

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::markMisspellingsAfterTyping): Give the spellchecker a slightly larger
        selection to work with while typing. This should preclude bugs of this type.

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

16 years ago Reviewed by Chris
kocienda [Thu, 26 Aug 2004 22:43:47 +0000 (22:43 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3777804> Deleting all content in a document can result in giant tall-as-window insertion point

        * khtml/rendering/render_box.cpp:
        (RenderBox::caretPos): Always use the font height for calculating the caret height in
        non-replaced elements (like blocks), rather than the height of the box.

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

16 years ago Reviewed by me
kocienda [Thu, 26 Aug 2004 22:20:47 +0000 (22:20 +0000)]
    Reviewed by me

        Silly me. Forgot to add this file before.

        * layout-tests/editing/inserting/insert-3775316-fix-expected.txt: Added.

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

16 years ago Fixed: <rdar://problem/3774178> Plugin hooks for selected state aren't being called
cblu [Thu, 26 Aug 2004 22:19:31 +0000 (22:19 +0000)]
Fixed: <rdar://problem/3774178> Plugin hooks for selected state aren't being called

        Reviewed by darin.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge setIsSelected:forView:]): don't forget colons in method names

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

16 years ago Fixed: <rdar://problem/3768439> can't click in WebView in Carbon WebKit apps (GetEve...
cblu [Thu, 26 Aug 2004 21:59:25 +0000 (21:59 +0000)]
Fixed: <rdar://problem/3768439> can't click in WebView in Carbon WebKit apps (GetEventPlatformEventRecord returns false)

        Reviewed by rjw.

        * Carbon.subproj/HIWebView.m:
        (Click): use WebGetEventPlatformEventRecord not GetEventPlatformEventRecord
        (MouseUp): ditto
        (MouseMoved): ditto
        (MouseDragged): ditto
        (MouseWheelMoved): ditto
        (WindowHandler): ditto
        (HIWebViewEventHandler): ditto
        (UpdateObserver): ditto
        (WebGetEventPlatformEventRecord): Call GetEventPlatformEventRecord, if that fails fallback to the current event. This is code Eric Schlegel to me to use.

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

16 years ago Fix for 3777172, crash from nested colgroup. Don't allow nested table sections...
hyatt [Thu, 26 Aug 2004 21:36:31 +0000 (21:36 +0000)]
Fix for 3777172, crash from nested colgroup.  Don't allow nested table sections or col groups.

        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):

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

16 years ago Reviewed by Hyatt
kocienda [Thu, 26 Aug 2004 21:34:20 +0000 (21:34 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3775316> document sprouts an extra newline character at the end

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputNewlineCommandImpl::doApply): There was in insufficient check
        in the code which adds extra BR elements at the ends of blocks, which we do
        to work around the fact that BR elements, when they are the last element in a
        block, do not render. Now the code sees whether there already is one of these
        extra BR's in the document and won't add and "extra" extra.
        * layout-tests/editing/inserting/insert-3775316-fix.html: Added.

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

16 years ago Fix for 3710721 and 3504114, crashes because of bad ownership model for list markers.
hyatt [Thu, 26 Aug 2004 17:37:45 +0000 (17:37 +0000)]
Fix for 3710721 and 3504114, crashes because of bad ownership model for list markers.

        Reviewed by mjs

        * khtml/rendering/render_container.cpp:
        (RenderContainer::detach):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (RenderListItem::detach):
        (RenderListItem::updateMarkerLocation):
        * khtml/rendering/render_list.h:

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

16 years ago Reviewed by John
kocienda [Thu, 26 Aug 2004 16:46:46 +0000 (16:46 +0000)]
    Reviewed by John

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::ApplyStyleCommandImpl::doApply): Remove the StayInBlock modifier from the
        call to upstream when passing the start position to removeStyle(). This makes the
        start position sufficiently upstream so that all relevant style tags are removed.
        (khtml::ApplyStyleCommandImpl::removeStyle): Pass the start position to nodeFullySelected.
        (khtml::ApplyStyleCommandImpl::nodeFullySelected): Change interface so start position
        for calculation is passed in, rather than recalculating it every time.
        * khtml/editing/htmlediting_impl.h: nodeFullySelected interface change.
        * khtml/xml/dom_position.h: Add a comment about the working of upstream() and
        downstream().

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

16 years ago Reviewed by me
kocienda [Thu, 26 Aug 2004 16:17:31 +0000 (16:17 +0000)]
    Reviewed by me

        Fix garbled contenteditable attribute. I must have checked
        this in with a typo.

        * layout-tests/editing/deleting/delete-3775172-fix.html

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

16 years ago Reviewed by John and Maciej.
kdecker [Thu, 26 Aug 2004 00:49:32 +0000 (00:49 +0000)]
    Reviewed by John and Maciej.

- Fixes SAP bug <rdar://problem/3751295> Personalize link at the
  top gives an error in the pop-up window.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Passes a referrer to KHTMLPart::begin()

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

16 years ago Updated to <canvas> API to match the spec. (Still need
rjw [Wed, 25 Aug 2004 23:40:58 +0000 (23:40 +0000)]
Updated to <canvas> API to match the spec.  (Still need
to implement gradients and patterns.)

        Reviewed by Ken.

        * khtml/ecma/kjs_html.cpp:
        (KJS::Context2DFunction::tryCall):
        (Context2D::getValueProperty):
        (Context2D::drawingContext):
        (Context2D::colorRefFromValue):
        (Context2D::colorFromValue):
        (Context2D::setShadow):
        (Context2D::putValue):
        (Context2D::save):
        (Context2D::restore):
        (Context2D::Context2D):
        * khtml/ecma/kjs_html.h:
        (KJS::Context2D::):
        * khtml/ecma/kjs_html.lut.h:
        (KJS::):

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

16 years ago Reviewed by me
kocienda [Wed, 25 Aug 2004 21:54:49 +0000 (21:54 +0000)]
    Reviewed by me

        * layout-tests/editing/deleting/delete-3775172-fix.html: Wrong version of test checked in
        a moment ago.

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

16 years ago Reviewed by me
kocienda [Wed, 25 Aug 2004 21:54:10 +0000 (21:54 +0000)]
    Reviewed by me

        Added test case for <rdar://problem/3775172> Blot crashes after typing one character then deleting it

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

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

16 years ago Reviewed by me
kocienda [Wed, 25 Aug 2004 21:49:35 +0000 (21:49 +0000)]
    Reviewed by me

        * layout-tests/editing/style/style-3690704-fix-expected.txt: Fewer styling spans added
        on this test as a result of the previously-checked-in fix.

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

16 years ago Reviewed by John
kocienda [Wed, 25 Aug 2004 21:34:02 +0000 (21:34 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3775214> BR elements cause unnecessary spans to be added when applying style

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::ApplyStyleCommandImpl::doApply): BR elements can be grouped more liberally with other nodes
        now in the iteration when attempting to find nodes that can be styled together with one span.
        * layout-tests/editing/style/style-3690704-fix-expected.txt: Updated with new results after
        bug fix.

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

16 years ago Reviewed by John
kocienda [Wed, 25 Aug 2004 21:33:39 +0000 (21:33 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3775172> Blot crashes after typing one character then deleting it

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Bail early if the element
        being queried does not have a renderer or that renderer does not have a style. Prevents
        a crash in the cases that it does not.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): Add one more case to deleting when the
        start and end nodes are different. If the downstream end node is the last node in the
        block, then it may need to be deleted completely. Before this patch, the code
        erroneously assumed that any deletion in this node had to be trimming of a text node.
        This was asserted, and the description in 3775172 shows a simple case where this assertion
        does not hold. The additional case and associated checks now make it all better.
        * layout-tests/editing/deleting/delete-3775172-fix.html: Added.

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

16 years ago Fix for 3365086, large tables crash Safari. Make sure to use ints rather than short...
hyatt [Wed, 25 Aug 2004 21:19:35 +0000 (21:19 +0000)]
Fix for 3365086, large tables crash Safari.  Make sure to use ints rather than shorts for row and column
counts.  Also fix a pathological array resize scenario for tables as rows are added.

        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::splitColumn):
        (RenderTable::appendColumn):
        (RenderTableSection::RenderTableSection):
        (RenderTableSection::ensureRows):
        (RenderTableSection::setCellWidths):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (RenderTableSection::paint):
        (RenderTableSection::recalcCells):
        (RenderTableSection::clearGrid):
        * khtml/rendering/render_table.h:
        (khtml::RenderTableSection::numRows):

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

16 years ago To save memory in the common case, move the margin***Collapse variables into the...
hyatt [Wed, 25 Aug 2004 20:01:00 +0000 (20:01 +0000)]
To save memory in the common case, move the margin***Collapse variables into the CSS3 struct instead of
bloating the surround struct.

        * khtml/rendering/render_style.cpp:
        (StyleSurroundData::StyleSurroundData):
        (StyleSurroundData::operator==):
        (marginBottomCollapse):
        (StyleCSS3NonInheritedData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::marginTopCollapse):
        (khtml::RenderStyle::marginBottomCollapse):
        (khtml::RenderStyle::setMarginTopCollapse):
        (khtml::RenderStyle::setMarginBottomCollapse):

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

16 years ago Fix the "extra space in TypePad blogs" Emerson problem by adding the ability to...
hyatt [Wed, 25 Aug 2004 19:04:54 +0000 (19:04 +0000)]
Fix the "extra space in TypePad blogs" Emerson problem by adding the ability to collapse away margins.
Also added support for explicitly preventing margin collapsing.

        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::isSelfCollapsingBlock):
        (khtml::RenderBlock::layoutBlockChildren):
        * khtml/rendering/render_style.cpp:
        (StyleSurroundData::StyleSurroundData):
        (StyleSurroundData::operator==):
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        (khtml::):
        (khtml::RenderStyle::marginTopCollapse):
        (khtml::RenderStyle::marginBottomCollapse):
        (khtml::RenderStyle::setMarginTopCollapse):
        (khtml::RenderStyle::setMarginBottomCollapse):
        (khtml::RenderStyle::initialMarginTopCollapse):
        (khtml::RenderStyle::initialMarginBottomCollapse):

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

16 years agoset the TOT version number to '161u', since we burned 160 on ParisExpo-2004-branch
vicki [Wed, 25 Aug 2004 00:33:17 +0000 (00:33 +0000)]
set the TOT version number to '161u', since we burned 160 on ParisExpo-2004-branch

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

16 years ago Fixed with help from Trey:
cblu [Tue, 24 Aug 2004 23:37:23 +0000 (23:37 +0000)]
Fixed with help from Trey:
<rdar://problem/3764856> REGRESSION !25-154): Safari accepts mouse clicks (follows links) when not key

        Reviewed by rjw.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _isSelectionEvent:]): brought back from CVS
        (-[WebHTMLView acceptsFirstMouse:]): only call eventMayStartDrag if _isSelectionEvent returns YES since we only want to allow selection dragging on the first mouse down
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): ditto

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

16 years agoWebCore:
kocienda [Tue, 24 Aug 2004 23:23:27 +0000 (23:23 +0000)]
WebCore:

        Reviewed by Hyatt

        Improved the ability of the bridge to report selection state.

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::doApply): Bail when there is no selection.
        * kwq/WebCoreBridge.h: Added an enum to report selection state. These constants
        mirror those used in DOM::Selection.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectionState]): Replacement for haveSelection. Returns a value
        from an enum telling whether the selection is in the None, Caret, or Range state,
        rather than just true/false for the Range state as it did before.

WebKit:

        Reviewed by Hyatt

        Improved the checks used to see if certain operations can be done based
        on the state of the selection and whether the selection is editable. I
        added some helpers and improved some others to assist in making these
        determinations.

        This helps to fix this bug:
        <rdar://problem/3764987> Crash after adding newline to quoted text

        Since some editing methods expect the the selection to be in a certain state
        in order to work, these checks help obviate crashes like 3764987.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _writeSelectionToPasteboard:]): _haveSelection name changed to _hasSelection.
        (-[WebHTMLView _canCopy]): Checks to see if state is appropriate to perform this operation.
        (-[WebHTMLView _canCut]): Ditto. Function added.
        (-[WebHTMLView _canDelete]): Ditto. Function refined.
        (-[WebHTMLView _canPaste]): Ditto. Function refined.
        (-[WebHTMLView _canType]): Ditto. Function added.
        (-[WebHTMLView _hasSelection]): Name changed from _haveSelection.
        (-[WebHTMLView _hasSelectionOrInsertionPoint]): Added.
        (-[WebHTMLView _isEditable]): Added.
        (-[WebHTMLView takeFindStringFromSelection:]): _haveSelection name changed to _hasSelection.
        (-[WebHTMLView validateUserInterfaceItem:]): Ditto
        (-[WebHTMLView validRequestorForSendType:returnType:]): Ditto
        (-[WebHTMLView keyDown:]):
        (-[WebHTMLView copy:]): Uses new _canCopy check.
        (-[WebHTMLView cut:]): Uses new _canCut check.
        (-[WebHTMLView delete:]): Now uses _canDelete check.
        (-[WebHTMLView paste:]): Now uses _canPaste check.
        (-[WebHTMLView _updateFontPanel]): _haveSelection name changed to _hasSelection.
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]): Use selectionState check to
        determine whether or not operation can be done.

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

16 years ago Fixed <rdar://problem/3770469> Some PDFs open with line of previous page...
rjw [Tue, 24 Aug 2004 21:17:30 +0000 (21:17 +0000)]
    Fixed <rdar://problem/3770469> Some PDFs open with line of previous page above PDF view

        Set height resize flags on WebPDFView.

        Reviewed by Chris.

        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView initWithFrame:]):

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

16 years ago Make sure the ifdef XSLT is present for Panther.
hyatt [Tue, 24 Aug 2004 20:39:38 +0000 (20:39 +0000)]
Make sure the ifdef XSLT is present for Panther.

        * khtml/xml/xml_tokenizer.cpp:
        (khtml::XMLTokenizer::insertErrorMessageBlock):

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

16 years ago Polish the XML error message so that it indicates when a document is the result...
hyatt [Tue, 24 Aug 2004 20:38:54 +0000 (20:38 +0000)]
Polish the XML error message so that it indicates when a document is the result of an XSL transformation
when reporting line/col #s.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::applyXSLTransform):
        * khtml/xml/xml_tokenizer.cpp:
        (khtml::XMLTokenizer::insertErrorMessageBlock):
        * khtml/xsl/xslt_processorimpl.cpp:
        (DOM::XSLTProcessorImpl::documentFromXMLDocPtr):

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

16 years ago Add support for Atom and RSS MIME types to the set of XML types.
hyatt [Tue, 24 Aug 2004 20:23:23 +0000 (20:23 +0000)]
Add support for Atom and RSS MIME types to the set of XML types.

        Reviewed by rjw

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty):
        * khtml/khtml_part.cpp:
        (KHTMLPart::begin):
        * khtml/misc/loader.cpp:
        (CachedXSLStyleSheet::CachedXSLStyleSheet):
        (CachedXBLDocument::CachedXBLDocument):
        * khtml/xml/dom_xmlimpl.cpp:
        (DOM::ProcessingInstructionImpl::checkStyleSheet):

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

16 years ago Add Atom and RSS MIME types to set of supported XML types.
hyatt [Tue, 24 Aug 2004 20:22:20 +0000 (20:22 +0000)]
Add Atom and RSS MIME types to set of supported XML types.

        Reviewed by rjw

        * WebView.subproj/WebDataSource.m:
        (+[WebDataSource _repTypesAllowImageTypeOmission:]):
        * WebView.subproj/WebFrameView.m:
        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):

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

16 years agoChange the file so that it isn't even close to RSS any more, since our sniffing code...
hyatt [Tue, 24 Aug 2004 18:37:20 +0000 (18:37 +0000)]
Change the file so that it isn't even close to RSS any more, since our sniffing code is broken.

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

16 years ago Fixed: <rdar://problem/3746447> hang loading geocities.com/cinemaorchestra
cblu [Tue, 24 Aug 2004 18:02:16 +0000 (18:02 +0000)]
Fixed: <rdar://problem/3746447> hang loading geocities.com/cinemaorchestra

        Reviewed by john.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): do nothing if the src URL is the same as the part's URL

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

16 years ago Reviewed by Chris
kocienda [Tue, 24 Aug 2004 17:00:08 +0000 (17:00 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3773564> REGRESSION (125-159): Code to remove HTML styles before applying new HTML styles is broken

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::ApplyStyleCommandImpl::doApply): Unrelated change to constrain downstream position of selection
        start to block boundaries. This is a new feature of the downstream function and I missed this usage
        when adding the feature.
        (khtml::ApplyStyleCommandImpl::removeCSSStyle): There once was code to remove style attributes from spans
        which became emptied as a result of removing CSS properties, but I do not see such code in the
        tree any more. A quick review of the ChangeLog did not reveal anything. I do not remember making such
        a change myself...

        In any case, I have restored logic to prune out styling spans we insert if the process of
        removing styles caused a span-plus-styles node to become emptied of markup which changes the style
        of its contents. This fixes the bug.

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

16 years ago Reviewed by John
kocienda [Tue, 24 Aug 2004 15:23:51 +0000 (15:23 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3765535> paste of text with newlines into text with newlines results in broken doc, crash

        This is a "belt and suspenders" fix. The issue is with the paste code path which was creating
        zero-length DOM text nodes when a selection being pasted ended with a newline. The normal
        code path for parsing HTML does not allow this, but the code to convert newlines to BR's
        during paste was creating such nodes. This will no longer happen.

        In the case where someone inserts such zero-length nodes using the DOM API, the render tree
        will no longer create render objects for these nodes, and it was these empty render text
        nodes that was confusing the code doing editing navigation.

        * khtml/xml/dom_textimpl.cpp:
        (CharacterDataImpl::rendererIsNeeded): Do not create renderers for zero-length DOM text nodes.
        * khtml/xml/dom_textimpl.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithText:]): Do not insert zero-length DOM text nodes as part
        of converting line-end sequences to BR's.

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

16 years ago Reviewed by Richard.
mjs [Tue, 24 Aug 2004 04:13:49 +0000 (04:13 +0000)]
    Reviewed by Richard.

- reduce cost of innerHTML from O(N^2) to O(N*D) where N is the
number of nodes and D is the maximum DOM tree depth.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toString): New static helper method for
recursive_toHTML - this is recursive for children but iterative
for siblings.
        (NodeImpl::recursive_toHTML): Call the helper with this as the
first argument.
        * khtml/xml/dom_nodeimpl.h:

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

16 years ago Fix for 3558334.
hyatt [Tue, 24 Aug 2004 03:22:52 +0000 (03:22 +0000)]
Fix for 3558334.

Init the encodedURL explicitly for CSSStyleSelectors.  Construction time was too early to be passing in the
document m_url, since it doesn't get set during construction.

Fix for 3769643, crash on vancouverblast.org.

        Reviewed by darin

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::CSSStyleSelector):
        (khtml::CSSStyleSelector::init):
        (khtml::CSSStyleSelector::setEncodedURL):
        * khtml/css/cssstyleselector.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::setURL):
        (DocumentImpl::recalcStyleSelector):
        * khtml/xml/dom_docimpl.h:
        (DOM::DocumentImpl::URL):

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

16 years ago Reviewed by Kevin.
mjs [Tue, 24 Aug 2004 02:50:42 +0000 (02:50 +0000)]
    Reviewed by Kevin.

- remove annoying ERROR spew and replace with comment

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

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

16 years ago Reviewed by Richard.
mjs [Tue, 24 Aug 2004 01:19:30 +0000 (01:19 +0000)]
    Reviewed by Richard.

- a bit of code cleanup

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _stringWithData:]): Call textEncodingName instead of
copying it's code.
        (-[WebDataSource textEncodingName]): Tweak formatting.

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

16 years ago Fixed build.
cblu [Tue, 24 Aug 2004 00:12:25 +0000 (00:12 +0000)]
Fixed build.

        * WebKit.pbproj/project.pbxproj: make sure we're doing -f on a file, not a directory

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

16 years ago Fixed: <rdar://problem/3674867> use new Security framework SPI's to reenable cert...
cblu [Mon, 23 Aug 2004 23:36:44 +0000 (23:36 +0000)]
Fixed: <rdar://problem/3674867> use new Security framework SPI's to reenable cert acquisition

        Reviewed by john.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        * WebCoreSupport.subproj/WebKeyGeneration.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebKeyGenerator.m:
        (-[WebKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): re-enabled cert code, call Panther version on Panther, Tiger version on Tiger
        (-[WebKeyGenerator addCertificatesToKeychainFromData:]): ditto
        * WebCoreSupport.subproj/WebNewKeyGeneration.c: Added.
        (gnrAddContextAttribute):
        (gnrGetSubjPubKey):
        (gnrNullAlgParams):
        (gnrSign):
        (gnrFreeCssmData):
        (nssArraySize):
        (signedPublicKeyAndChallengeString):
        (addCertificateToKeychainFromData):
        (addCertificatesToKeychainFromData):
        * WebCoreSupport.subproj/WebNewKeyGeneration.h: Added.
        * WebKit.pbproj/project.pbxproj:

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

16 years agoGet rid of stray conflict markers.
darin [Mon, 23 Aug 2004 23:02:24 +0000 (23:02 +0000)]
Get rid of stray conflict markers.

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

16 years ago Reviewed by Maciej.
kdecker [Mon, 23 Aug 2004 21:17:38 +0000 (21:17 +0000)]
    Reviewed by Maciej.

- fixed rdar://problem/3681094> Crash in KJS::WindowFunc::tryCall
        with application/xhtml+xml Content-Type
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): since this is an xml document, we get the
domain from the xmlDocImpl(), not docImpl().

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

16 years agobump all version numbers to 160u, since I just submitted WebBrowser-159
vicki [Mon, 23 Aug 2004 19:05:15 +0000 (19:05 +0000)]
bump all version numbers to 160u, since I just submitted WebBrowser-159

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

16 years ago Reviewed by Darin.
mjs [Mon, 23 Aug 2004 18:06:37 +0000 (18:06 +0000)]
    Reviewed by Darin.

<rdar://problem/3771426> assertion failed due to reentering dispatchImageLoadEventsNow

* khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::dispatchImageLoadEventsNow): Avoid re-entering this
function, since it uses a data member for the copy of the list of events
to be dispatched.

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

16 years ago Reviewed by Darin.
mjs [Mon, 23 Aug 2004 17:52:11 +0000 (17:52 +0000)]
    Reviewed by Darin.

<rdar://problem/3770306> XMLHttpRequest does not honor character set encoding

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::slotData): Get encoding from the transfer job.
        * kwq/KWQKJobClasses.h:
        * kwq/KWQKJobClasses.mm:
        (KIO::TransferJobPrivate::TransferJobPrivate): Added retrievedCharset
flag.
        (KIO::TransferJob::retrieveCharset): New method, gets the charset
from the response.
        (KIO::TransferJob::queryMetaData): Handle charset.
        (KIO::TransferJob::emitReceivedResponse): Clear retreivedCharset flag.
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        (KWQResponseTextEncodingName): New function, gets the encoding from the response.

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

16 years ago Apply leo's fix to marquees.
hyatt [Mon, 23 Aug 2004 17:44:03 +0000 (17:44 +0000)]
Apply leo's fix to marquees.

        Reviewed by hyatt

        * khtml/rendering/render_layer.cpp:
        (Marquee::start):

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

16 years ago Reviewed by Maciej.
darin [Mon, 23 Aug 2004 16:12:00 +0000 (16:12 +0000)]
    Reviewed by Maciej.

        - added an ascii() member function to DOMString and DOMStringImpl to help debugging

        * khtml/dom/dom_string.h: Add ascii member function for debugging.
        * khtml/dom/dom_string.cpp: (DOM::DOMString::ascii): Added. Calls through to DOMStringImpl::ascii.
        * khtml/xml/dom_stringimpl.h: Add ascii member function for debugging.
        * khtml/xml/dom_stringimpl.cpp: (DOM::DOMStringImpl::ascii): Added. Makes a new buffer and puts
        a simple ASCII version in it. Maybe make it better about characters outside the 0x20-0x7E range
        some day, but for now this is way better than what we had before.

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

16 years ago Divorce the notion of a marquee being stopped from JS from the notion of being suspe...
hyatt [Sat, 21 Aug 2004 00:58:24 +0000 (00:58 +0000)]
Divorce the notion of a marquee being stopped from JS from the notion of being suspended by the back/forward cache.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElementFunction::tryCall):
        * khtml/rendering/render_layer.cpp:
        (m_direction):
        (Marquee::start):
        (Marquee::stop):
        (Marquee::updateMarqueePosition):
        * khtml/rendering/render_layer.h:
        (khtml::):

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

16 years agoFix layout tests.
hyatt [Fri, 20 Aug 2004 23:37:47 +0000 (23:37 +0000)]
Fix layout tests.

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

16 years ago Fix the directionality of the unicode hyphen so that on Panther it now matches Tiger.
hyatt [Fri, 20 Aug 2004 23:12:11 +0000 (23:12 +0000)]
Fix the directionality of the unicode hyphen so that on Panther it now matches Tiger.

        Reviewed by darin

        * Misc.subproj/WebUnicode.m:
        (_unicodeDirection):

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

16 years agoAdded.
rjw [Fri, 20 Aug 2004 23:09:09 +0000 (23:09 +0000)]
Added.

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

16 years agoWebKit:
rjw [Fri, 20 Aug 2004 21:57:16 +0000 (21:57 +0000)]
WebKit:
    Implemented new JNI abstraction.  We no longer invoke Java methods
    directly with JNI, rather we call into the plugin.  This allows the
    plugin to dispatch the call to the appropriate VM thread.  This
    change should (will?) fix a whole class of threading related problems with
    the Java VM.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getAppletInView:]):

WebCore:
        Implemented new JNI abstraction.  We no longer invoke Java methods
        directly with JNI, rather we call into the plugin.  This allows the
        plugin to dispatch the call to the appropriate VM thread.  This
        change should (will?) fix a whole class of threading related problems with
        the Java VM.

        Reviewed by Hyatt.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::getAppletInstanceForView):
        * kwq/WebCoreBridge.mm:
        (rootForView):
        (-[WebCoreBridge executionContextForView:]):

JavaScriptCore:
        Implemented new JNI abstraction.  We no longer invoke Java methods
        directly with JNI, rather we call into the plugin.  This allows the
        plugin to dispatch the call to the appropriate VM thread.  This
        change should (will?) fix a whole class of threading related problems with
        the Java VM.

        Reviewed by Hyatt.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/c/c_instance.h:
        (KJS::Bindings::CInstance::setExecutionContext):
        (KJS::Bindings::CInstance::executionContext):
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::JavaInstance):
        (JavaInstance::invokeMethod):
        (JavaInstance::setExecutionContext):
        (JavaInstance::executionContext):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_jsobject.cpp:
        (JSObject::convertJObjectToValue):
        * bindings/jni/jni_runtime.cpp:
        (JavaField::JavaField):
        (JavaArray::convertJObjectToArray):
        (JavaField::valueFromInstance):
        (JavaArray::JavaArray):
        (JavaArray::valueAt):
        * bindings/jni/jni_runtime.h:
        (KJS::Bindings::JavaArray::operator=):
        (KJS::Bindings::JavaArray::executionContext):
        * bindings/jni/jni_utility.h:
        * bindings/objc/objc_instance.h:
        (KJS::Bindings::ObjcInstance::setExecutionContext):
        (KJS::Bindings::ObjcInstance::executionContext):
        * bindings/runtime.cpp:
        (Instance::createBindingForLanguageInstance):
        * bindings/runtime.h:
        * bindings/runtime_root.h:
        (KJS::Bindings::RootObject::nativeHandle):

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

16 years ago Reviewed by Darin.
mjs [Fri, 20 Aug 2004 21:15:22 +0000 (21:15 +0000)]
    Reviewed by Darin.

More text paint cleanup. Separated the background and foreground
passes instead of doing a weird for loop thing. Eliminated
redundant if conditions. Added comments.

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

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

16 years ago Reviewed by Darin
kocienda [Fri, 20 Aug 2004 20:19:53 +0000 (20:19 +0000)]
    Reviewed by Darin

        * khtml/css/css_computedstyle.cpp:
        (DOM::): Changed CopyProperties constant to InheritableProperties. This reflects the
        name change of copy() to copyInheritableProperties()
        (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties: Renamed from copy().
        Now just copies those properties which can be inherited.
        (DOM::CSSComputedStyleDeclarationImpl::diff): Add a couple null checks.
        * khtml/css/css_computedstyle.h: copyInheritableProperties name change. No longer needs to be virtual.
        * khtml/css/css_valueimpl.cpp: Removed unneeded copy() function from CSSStyleDeclarationImpl.
        * khtml/css/css_valueimpl.h: Ditto.
        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::typingStyle): Added.
        (khtml::EditCommand::setTypingStyle): Added.
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::StyleChange::currentlyHasStyle): Fix leak of computed style used in this function.
        (khtml::EditCommandImpl::EditCommandImpl): Initialize m_typingStyle.
        (khtml::EditCommandImpl::~EditCommandImpl): Deref m_typingStyle.
        (khtml::EditCommandImpl::assignTypingStyle): New helper used in setting typing style.
        (khtml::EditCommandImpl::setTypingStyle): New setter.
        (khtml::DeleteSelectionCommandImpl::doApply): Use new method for managing typing style.
        * khtml/editing/htmlediting_impl.h:
        (khtml::EditCommandImpl::typingStyle): New accessor.
        * khtml/khtml_part.cpp:
        (KHTMLPart::appliedEditing): Restores typing style from command after setting selection.
        (KHTMLPart::applyStyle): Does a diff between the current style and the style of the caret.
        * khtml/khtml_part.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::computedStyle): Now returns a CSSComputedStyleDeclarationImpl instead of a plain
        CSSStyleDeclarationImpl.
        * khtml/xml/dom_position.h:
        * layout-tests/editing/style/style-3681552-fix-002-expected.txt:

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

16 years agoGet rid of weird chars in bug titles from last checkin (maybe nb spaces?)
trey [Fri, 20 Aug 2004 18:44:42 +0000 (18:44 +0000)]
Get rid of weird chars in bug titles from last checkin (maybe nb spaces?)

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

16 years agoWebCore:
trey [Fri, 20 Aug 2004 18:29:07 +0000 (18:29 +0000)]
WebCore:

3655407 - Editing:�complete:�ethod�nimplemented�WebKit�diting�PI)

One new support routine here.

        Reviewed by John

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge caretRectAtNode:offset:]):  New routine.
        (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
Fixed former misleading method name.

WebKit:

3655407 - Editing:�complete:�ethod�nimplemented�WebKit�diting�PI)

This feature is mostly implemented.  The only loose ends I know of are:

3769654 - text insertions done via complete: should preserve case of full replacement string
3769652 - positioning of complete: popup window wrong for right-to-left languages

        Reviewed by John

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLViewPrivate dealloc]):  Free new object.
        (-[WebHTMLView menuForEvent:]):  Bail on completion session.
        (-[WebHTMLView windowDidResignKey:]):  Ditto.
        (-[WebHTMLView windowWillClose:]):  Ditto.
        (-[WebHTMLView mouseDown:]):  Ditto.
        (-[WebHTMLView resignFirstResponder]):  Ditto.
        (-[WebHTMLView keyDown:]):  Bail on completion session if WebCore takes the event.
Give the CompleteController a crack at the key event.
        (-[WebHTMLView _expandSelectionToGranularity:]):  Adopt method rename
        (-[WebHTMLView complete:]):  Make CompleteController, tell it to do its thing.
        (-[WebHTMLView checkSpelling:]):  Add ERROR().
        (-[WebHTMLView showGuessPanel:]): Add ERROR().
        (-[WebHTMLView _changeSpellingToWord:]): Add ERROR().
        (-[WebHTMLView ignoreSpelling:]): Add ERROR().

        (-[WebTextCompleteController initWithHTMLView:]):
        (-[WebTextCompleteController dealloc]):
        (-[WebTextCompleteController _insertMatch:]): Stick the new string into the doc.
        (-[WebTextCompleteController _buildUI]):  Make popup window.
        (-[WebTextCompleteController _placePopupWindow:]):  Position popup window.
        (-[WebTextCompleteController doCompletion]):  Lookup matches, display window.
        (-[WebTextCompleteController endRevertingChange:moveLeft:]):  Bail on complete: session.
        (-[WebTextCompleteController filterKeyDown:]):  Process keys while popup is up.
        (-[WebTextCompleteController _reflectSelection]):  Handle choice in popup.
        (-[WebTextCompleteController tableAction:]):  Handle double click in popup
        (-[WebTextCompleteController numberOfRowsInTableView:]):  Fill table with matches.
        (-[WebTextCompleteController tableView:objectValueForTableColumn:row:]):  Ditto.
        (-[WebTextCompleteController tableViewSelectionDidChange:]):  Handle selection change.
        * WebView.subproj/WebHTMLViewInternal.h:

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

16 years agoI neglected to add these files on my previous checkin
kocienda [Fri, 20 Aug 2004 16:57:07 +0000 (16:57 +0000)]
I neglected to add these files on my previous checkin

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

16 years ago Reviewed by Trey
kocienda [Fri, 20 Aug 2004 16:55:47 +0000 (16:55 +0000)]
    Reviewed by Trey

        Fix for this bug:

        <rdar://problem/3768378> crash typing newline in Blot

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputNewlineCommandImpl::doApply): Adding an assert in a recent change
        showed up that inserting newlines that was not being handled correctly for the
        case described in the bug. I added a new case to handle inserting BR's when
        at the caret max offset for a node, and this new code runs instead of the
        fall-through case that should not have been running and triggered the assert.
        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Regenerated results.
        * layout-tests/editing/inserting/insert-br-case6-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-case6.html: Added.

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

16 years ago Fixing: Spellchecker called once or twice for every char typed.
trey [Fri, 20 Aug 2004 16:53:59 +0000 (16:53 +0000)]
    Fixing: Spellchecker called once or twice for every char typed.

        Reviewed by Ken

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection):  Don't do any spell checking if we're typing (it's done
        elsewhere, in markMisspellingsAfterTyping)

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

16 years ago * English.lproj/StringsNotToBeLocalized.txt:
sullivan [Fri, 20 Aug 2004 16:06:33 +0000 (16:06 +0000)]
    * English.lproj/StringsNotToBeLocalized.txt:
        checked this in; the only difference is that
        the strings were out of order.

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

16 years ago Reviewed by John.
mjs [Fri, 20 Aug 2004 03:26:06 +0000 (03:26 +0000)]
    Reviewed by John.

- fixed <rdar://problem/3549369> Crash at www.e1.ru in HTMLTokenizer::notifyFinished

Probably also fixed the following likely duplicates:

<rdar://problem/3503938> Safari crashed opening many tabs (HTMLTokenizer::notifyFinished(khtml::CachedObject*))
<rdar://problem/3566332> CrashTracer: ..405 crashes at com.apple.WebCore: QString::QString[unified] + 0x5c
<rdar://problem/3703964> CrashTracer: ...86 crashes at com.apple.WebCore: QString::QString[unified] + 0x5c
<rdar://problem/3703969> CrashTracer: ..234 crashes at com.apple.WebCore: HTMLTokenizer::notifyFinished + 0x1c8

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::open): call setParsing(true), because we need to know we are once again
parsing when we re-open a document that has previously completed loading.

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

16 years ago Reviewed by Dave and Darin.
mjs [Fri, 20 Aug 2004 02:21:32 +0000 (02:21 +0000)]
    Reviewed by Dave and Darin.

        * khtml/rendering/render_text.cpp:
        (RenderText::paint): Split apple and non-apple code paths to allow further cleanup.

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

16 years ago Reviewed by Dave.
darin [Fri, 20 Aug 2004 00:38:01 +0000 (00:38 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3767274> crash in partForWidget inside setFocus (test page attached)

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Remove code to do position
        the widget; no longer needed since we reworked how widgets get their positions.
        * kwq/KWQWidget.mm: (QWidget::setFocus): Ditto. This was the one that caused the bug.

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

16 years ago Continue to call old pollForAppletInView: in Tiger until
rjw [Fri, 20 Aug 2004 00:11:34 +0000 (00:11 +0000)]
    Continue to call old pollForAppletInView: in Tiger until
        we get an plugin that supports the new API.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getAppletInView:]):
        * WebKit.pbproj/project.pbxproj:

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

16 years ago Fix crash when text is contained inside a table-colgroup.
hyatt [Thu, 19 Aug 2004 23:23:33 +0000 (23:23 +0000)]
Fix crash when text is contained inside a table-colgroup.

        Reviewed by john

        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::rendererIsNeeded):

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

16 years ago Unexpected errors hit while finding word boundaries, leading to crash.
trey [Thu, 19 Aug 2004 23:17:26 +0000 (23:17 +0000)]
Unexpected errors hit while finding word boundaries, leading to crash.

        Reviewed by Ken.

        * kwq/KWQTextUtilities.cpp:
        (KWQFindWordBoundary):  Don't call UCFindTextBreak with edge cases it thinks
are param errors, and pass correct mask for forward case.  Also fix off-by-one
crashers in fallback code.

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

16 years ago Make XSLT imports/includes work. This code has to be turned off until the newer...
hyatt [Thu, 19 Aug 2004 22:50:30 +0000 (22:50 +0000)]
Make XSLT imports/includes work.  This code has to be turned off until the newer version of libxslt is
available.

        Reviewed by kocienda

        * khtml/css/css_ruleimpl.cpp:
        (CSSImportRuleImpl::init):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        (DocumentImpl::~DocumentImpl):
        (DocumentImpl::applyXSLTransform):
        * khtml/xml/dom_docimpl.h:
        (DOM::DocumentImpl::setTransformSource):
        (DOM::DocumentImpl::transformSource):
        * khtml/xml/dom_xmlimpl.cpp:
        (DOM::ProcessingInstructionImpl::checkStyleSheet):
        * khtml/xml/xml_tokenizer.cpp:
        (khtml::matchFunc):
        (khtml::openFunc):
        (khtml::readFunc):
        (khtml::writeFunc):
        (khtml::createQStringParser):
        (khtml::XMLTokenizer::setTransformSource):
        * khtml/xsl/xsl_stylesheetimpl.cpp:
        (DOM::XSLStyleSheetImpl::XSLStyleSheetImpl):
        (DOM::XSLStyleSheetImpl::~XSLStyleSheetImpl):
        (DOM::XSLStyleSheetImpl::isLoading):
        (DOM::XSLStyleSheetImpl::clearDocuments):
        (DOM::XSLStyleSheetImpl::parseString):
        (DOM::XSLStyleSheetImpl::loadChildSheets):
        (DOM::XSLStyleSheetImpl::loadChildSheet):
        (DOM::XSLImportRuleImpl::parentStyleSheet):
        (DOM::XSLStyleSheetImpl::compileStyleSheet):
        (DOM::XSLStyleSheetImpl::locateStylesheetSubResource):
        (DOM::XSLImportRuleImpl::XSLImportRuleImpl):
        (DOM::XSLImportRuleImpl::~XSLImportRuleImpl):
        (DOM::XSLImportRuleImpl::setStyleSheet):
        (DOM::XSLImportRuleImpl::isLoading):
        (DOM::XSLImportRuleImpl::loadSheet):
        * khtml/xsl/xsl_stylesheetimpl.h:
        (DOM::XSLStyleSheetImpl::setOwnerDocument):
        (DOM::XSLStyleSheetImpl::setDocument):
        (DOM::XSLStyleSheetImpl::markAsProcessed):
        (DOM::XSLStyleSheetImpl::processed):
        (DOM::XSLImportRuleImpl::href):
        (DOM::XSLImportRuleImpl::styleSheet):
        (DOM::XSLImportRuleImpl::isImportRule):
        * khtml/xsl/xslt_processorimpl.cpp:
        (DOM::m_sourceDocument):
        (DOM::stylesheetLoadFunc):
        (DOM::XSLTProcessorImpl::transformDocument):
        * khtml/xsl/xslt_processorimpl.h:

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

16 years agoset version to Safari 2.0, (v159u) for tip of tree.
vicki [Thu, 19 Aug 2004 21:00:11 +0000 (21:00 +0000)]
set version to Safari 2.0, (v159u) for tip of tree.

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

16 years agoSafari-158 stamp
vicki [Thu, 19 Aug 2004 20:54:53 +0000 (20:54 +0000)]
Safari-158 stamp

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

16 years ago Fixed typo in comment.
cblu [Thu, 19 Aug 2004 17:34:06 +0000 (17:34 +0000)]
Fixed typo in comment.

        * Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase _updateFileDatabase]):

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

16 years ago Fixed: <rdar://problem/3566336> CrashTracer: .2403 crashes at com.apple.WebKit:...
cblu [Thu, 19 Aug 2004 17:33:36 +0000 (17:33 +0000)]
Fixed: <rdar://problem/3566336> CrashTracer: .2403 crashes at com.apple.WebKit: -[WebFileDatabase performSetObject:forKey:] + 0x94

        Reviewed by trey.

        * Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase _updateFileDatabase]): pass WebFileDatabase copies of the mutable dictionaries or else they may be accessed on a separate thread as the main thread is modifying them

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

16 years ago- initialize deletedElementIndex to make the compiler happy
vicki [Thu, 19 Aug 2004 16:21:29 +0000 (16:21 +0000)]
- initialize deletedElementIndex to make the compiler happy

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

16 years ago 3765958 - downstreamPosition() can hit infinite loop when at end of doc
trey [Thu, 19 Aug 2004 00:30:38 +0000 (00:30 +0000)]
3765958 - downstreamPosition() can hit infinite loop when at end of doc

The problem was that I had a position that was after the maximum position in the text
node, because it was the old caret position before a backspace was processed.  Later
I happened to call downstream() on that position, and hit the bug.  Fix is to consider
a position past the end point of its node if it is *greater than* or equal to its max offset.

        Reviewed by Ken.

        * khtml/xml/dom_positioniterator.cpp:
        (DOM::PositionIterator::atEnd):

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

16 years ago Make the header overlap the footer in the zero-line case. Changes to Emerson's...
hyatt [Thu, 19 Aug 2004 00:15:47 +0000 (00:15 +0000)]
Make the header overlap the footer in the zero-line case.  Changes to Emerson's template will ensure the
header draws over the footer.

        Reviewed by darin

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

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

16 years agoWebKit:
rjw [Wed, 18 Aug 2004 23:34:39 +0000 (23:34 +0000)]
WebKit:
        Replace horrible pollForAppletInView: with new
        webPlugInGetApplet.  The details of how the applet instance
        is provided now belong to the Java team.  Yeh.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getAppletInView:]):

WebCore:
        Replace horrible pollForAppletInView: with new
        webPlugInGetApplet.  The details of how the applet instance
        is provided now belong to the Java team.  Yeh.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::getAppletInstanceForView):
        * kwq/WebCoreBridge.h:

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

16 years ago Fixed: <rdar://problem/3692199> 8A146: Safari crashes in toHTMLWithOptions, selectio...
cblu [Wed, 18 Aug 2004 18:19:40 +0000 (18:19 +0000)]
Fixed: <rdar://problem/3692199> 8A146: Safari crashes in toHTMLWithOptions, selection with no renderer (various sites)

        Reviewed by trey.

        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML): renamed, don't assume that nodes of the range had renderers, use the common ancestor of the range as the root
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTML): renamed, removed code that determines whether to include the root in the HTML, leave this up to the caller
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]): call renamed methods
        (-[WebCoreBridge markupStringFromRange:nodes:]): ditto

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

16 years ago Reviewed by me
kocienda [Wed, 18 Aug 2004 17:43:35 +0000 (17:43 +0000)]
    Reviewed by me

        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::copy): Roll back silly last minute change that broke this code.
        Note to self: read code before making changes to it.

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

16 years ago Coded by Darin and Ken
kocienda [Wed, 18 Aug 2004 17:34:22 +0000 (17:34 +0000)]
    Coded by Darin and Ken

        * khtml/css/css_computedstyle.cpp: Added CopyProperties static array. This contains
        the properties we implement that we also want to copy in the new
        CSSComputedStyleDeclarationImpl::copy described below.
        (DOM::CSSComputedStyleDeclarationImpl::copy): New function. In this class, copies the
        computed values of all the properties listed in CopyProperties. In essence, this makes
        a freeze-dired version of a computed style.
        (DOM::CSSComputedStyleDeclarationImpl::diff): Removes every property from the passed-in
        CSSStyleDeclarationImpl that is also in the computed style.
        * khtml/css/css_computedstyle.h:
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::copy): New function. In this class, the copy operation is
        straightforward. Returns a copy that will be unchanged when the original changes.
        * khtml/css/css_valueimpl.h:
        (DOM::CSSStyleDeclarationImpl::values): Added a accessor suitable for use when the
        CSSStyleDeclarationImpl is const.

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

16 years agoChange some tabs to spaces.
darin [Wed, 18 Aug 2004 03:13:30 +0000 (03:13 +0000)]
Change some tabs to spaces.

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

16 years ago Fixed <rdar://problem/3759093> Need PDF context menu: "Open in Preview" or...
rjw [Wed, 18 Aug 2004 01:16:50 +0000 (01:16 +0000)]
    Fixed <rdar://problem/3759093> Need PDF context menu: "Open in Preview" or other external app

        Added support for "Open with ..." in PDF view.

        Reviewed by Chris and Trey.

        * ChangeLog:
        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView initWithFrame:]):
        (-[WebPDFView dealloc]):
        (applicationInfoForMIMEType):
        (-[WebPDFView path]):
        (-[WebPDFView menuForEvent:]):
        (-[WebPDFView setDataSource:]):
        (-[WebPDFView layout]):
        (-[WebPDFView viewDidMoveToHostWindow]):
        (-[WebPDFView openWithFinder:]):

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

16 years ago Reviewed by Darin.
mjs [Wed, 18 Aug 2004 00:09:46 +0000 (00:09 +0000)]
    Reviewed by Darin.

<rdar://problem/3703768> CrashTracer: ...50 crashes at com.apple.WebCore: KHTMLPart::xmlDocImpl const + 0

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent): Add a nil check and an
assertion for m_part being null. It seems impossible for this to
happen, so we want to debug it ourselves, but in the meantime,
let's try to avoid causing crashes for our users.

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

16 years ago Reviewed by Adele.
darin [Wed, 18 Aug 2004 00:07:10 +0000 (00:07 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/3746676> SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem)

        * kjs/property_map.h: Added some private functions.
        * kjs/property_map.cpp:
        (KJS::PropertyMap::clear): Set sentinelCount to 0.
        (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel.
        Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element.
        (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16.
        (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function.
        (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are
        deleted-element sentinels.
        (KJS::PropertyMap::checkConsistency): Check the sentinelCount.

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

16 years ago Code change by Eric Albert, reviewd by me.
mjs [Tue, 17 Aug 2004 23:19:59 +0000 (23:19 +0000)]
    Code change by Eric Albert, reviewd by me.

<rdar://problem/3571960> washingtonpost.com claims I don't have cookies enabled and won't let me read articles

        * kjs/date_object.cpp:
        (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t
entirely would be even better, but is not required to fix this bug.

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

16 years ago JNI needs both the jmethodID and return type. Changed API to
rjw [Tue, 17 Aug 2004 22:14:06 +0000 (22:14 +0000)]
    JNI needs both the jmethodID and return type.  Changed API to
        pass both.

        Reviewed by Chris.

        * Plugins.subproj/WebJavaPlugIn.h:

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

16 years ago Fix the line truncation function for Emerson so that at the far left setting of...
hyatt [Tue, 17 Aug 2004 22:03:28 +0000 (22:03 +0000)]
Fix the line truncation function for Emerson so that at the far left setting of the slider, only the header
is visible.

        Reviewed by darin

        * khtml/rendering/render_block.cpp:
        (khtml::getHeightForLineCount):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutVerticalBox):

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

16 years ago Reviewed by Hyatt
kocienda [Tue, 17 Aug 2004 21:53:45 +0000 (21:53 +0000)]
    Reviewed by Hyatt

        Rewrite of the command that deletes a selection. I deleted great
        big swaths of bug-ridden code to accomplish this and replaced it
        with code that is much cleaner and smarter.

        Also, renamed equivalentUpstreamPosition and equivalentDownstreamPosition to
        upstream to downstream, respectively.

        Added a couple of new helper methods.

        * khtml/editing/htmlediting.cpp: DeleteCollapsibleWhitespaceCommand and
        RemoveNodeAndPruneCommand now obsolete. A huge win.
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::debugPosition): Fix printf which had a placeholder, but no argument passed in the varargs.
        (khtml::CompositeEditCommandImpl::deleteUnrenderedText): New helper. Much simplified and cleaner
        version of
        (khtml::ApplyStyleCommandImpl::doApply): upstream/downstream name change
        (khtml::ApplyStyleCommandImpl::nodeFullySelected):  upstream/downstream name change
        (khtml::DeleteSelectionCommandImpl::doApply):  upstream/downstream name change
        (khtml::DeleteTextCommandImpl::DeleteTextCommandImpl): Add an assert to check that the
        passed offset is less than the length of the text node.
        (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): upstream/downstream name change
        (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): upstream/downstream name change
        (khtml::InputNewlineCommandImpl::doApply): upstream/downstream name change
        (khtml::InputTextCommandImpl::prepareForTextInsertion): upstream/downstream name change
        (khtml::InputTextCommandImpl::execute): upstream/downstream name change
        (khtml::InputTextCommandImpl::insertSpace): upstream/downstream name change
        (khtml::ReplaceSelectionCommandImpl::doApply): upstream/downstream name change
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): upstream/downstream name change
        (khtml::TypingCommandImpl::deleteKeyPressed):
        * khtml/editing/htmlediting_impl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordBoundary):
        (DOM::Position::nextWordBoundary):
        (DOM::Position::upstream):
        (DOM::Position::downstream):
        (DOM::Position::inRenderedText): Add null check.
        (DOM::Position::isRenderedCharacter): New helper.
        (DOM::isWS): New helper in this file.
        (DOM::Position::leadingWhitespacePosition): New helper. Factored out from htmlediting_impl.cpp.
        (DOM::Position::trailingWhitespacePosition): Ditto.
        (DOM::Position::debugPosition): Add null check.
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::toRange): upstream/downstream name change
        (DOM::Selection::validate): upstream/downstream name change
        (DOM::Selection::debugPosition): upstream/downstream name change
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Updated tests with new expected results.
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-selection-001-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Ditto.
        * layout-tests/editing/inserting/insert-br-case1-expected.txt: Ditto.
        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Ditto.
        * layout-tests/editing/style/style-3681552-fix-002-expected.txt: Ditto.

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

16 years ago Various spelling fixes.
trey [Tue, 17 Aug 2004 21:41:11 +0000 (21:41 +0000)]
Various spelling fixes.

        Reviewed by Ken.

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): No misspellings in the spelling code comments
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::removeMarker):  Repaint if doc changes.  Sometimes the markers
were not being erased when you clicked in a word.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordBoundary):  Small optimization.  Bail after first
try if the second try will not come out any different.
        (DOM::Position::nextWordBoundary):  Ditto
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::markMisspellingsInSelection):  Comment.

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