WebKit-https.git
17 years ago Reviewed by Ken.
darin [Thu, 10 Mar 2005 22:05:33 +0000 (22:05 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary

        * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
        Advance out of the starting text node if we're at the end of it.

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

17 years ago * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertio...
darin [Thu, 10 Mar 2005 21:59:39 +0000 (21:59 +0000)]
    * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write.

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

17 years ago Reviewed by Darin.
harrison [Thu, 10 Mar 2005 21:54:45 +0000 (21:54 +0000)]
    Reviewed by Darin.

        <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::matchedEndLine):
        Look at first clean line in case line wrap implicitly dirtied it.

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

17 years ago Reviewed by Vicki.
mjs [Thu, 10 Mar 2005 21:43:38 +0000 (21:43 +0000)]
    Reviewed by Vicki.

<rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything

* kwq/WebCoreBridge.mm:
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
feed: and feeds: pages from the local file security check.

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

17 years ago Change written by Steve Peters, reviewed by me.
darin [Thu, 10 Mar 2005 21:40:27 +0000 (21:40 +0000)]
    Change written by Steve Peters, reviewed by me.

        - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster

        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
        Do early outs in a couple of the loops to make things faster.

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

17 years ago Reviewed by Vicki.
sullivan [Thu, 10 Mar 2005 21:26:44 +0000 (21:26 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/4045843> Going back/forward to error page
        hits assertion in -[WebDataSource(WebPrivate) _setData:]

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _setData:]):
        Removed bogus assertion

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

17 years agoFixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load...
jens [Thu, 10 Mar 2005 21:09:24 +0000 (21:09 +0000)]
Fixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load". Includes restoring part of the old NodeImpl::closeRenderer mechanism.

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

17 years ago Reviewed by Darin.
darin [Thu, 10 Mar 2005 19:30:07 +0000 (19:30 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3997044> default encoding for non-Latin incorrect

* WebKit/WebView.subproj/WebPreferences.m: (+[WebPreferences _systemCFStringEncoding]):
        Call __CFStringGetUserDefaultEncoding to get region, and TECGetWebTextEncodings to get
        the first encoding to determine the default encoding.

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

17 years agoFixed an indenting problem that crept in with the last check-in.
darin [Thu, 10 Mar 2005 19:29:57 +0000 (19:29 +0000)]
Fixed an indenting problem that crept in with the last check-in.

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

17 years ago Reviewed by John
kocienda [Thu, 10 Mar 2005 17:24:05 +0000 (17:24 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all

        The code to figure out which node to use to merge into an existing line did not drill into the first inline element
        as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it
        skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously
        doesn't work for content quoted more than once.

        Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look
        for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those.

        NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary
        problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation:
        method.

        * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes.
        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as
        an ApplePasteAsQuotation node.
        (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation.
        * khtml/editing/htmlediting.h: Updated header for new function.

        This test result changed is an acceptable way.

        * layout-tests/editing/pasteboard/paste-text-013-expected.txt
        * layout-tests/editing/pasteboard/paste-text-013.html

        NOTE: This change causes a regression in this layout test:

        * layout-tests/editing/pasteboard/paste-text-013.html

        This problem will need to be fixed separately, and this bug has been filed to track this problem:
        <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break

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

17 years ago Reviewed by Richard.
mjs [Thu, 10 Mar 2005 04:04:46 +0000 (04:04 +0000)]
    Reviewed by Richard.

<rdar://problem/4040776> Dashboard (Weather widget) is a memory hog

Change things around so the event listeners for XMLHttpRequest
mark their JS listener objects instead of holding a hard
reference, to avoid an unbreakable reference cycle.

* khtml/ecma/kjs_events.cpp:
        (JSAbstractEventListener::JSAbstractEventListener):
        (JSAbstractEventListener::~JSAbstractEventListener):
        (JSAbstractEventListener::handleEvent):
        (JSAbstractEventListener::eventListenerType):
        (JSUnprotectedEventListener::JSUnprotectedEventListener):
        (JSUnprotectedEventListener::~JSUnprotectedEventListener):
        (JSUnprotectedEventListener::listenerObj):
        (JSUnprotectedEventListener::windowObj):
        (JSUnprotectedEventListener::mark):
        (JSEventListener::JSEventListener):
        (JSEventListener::~JSEventListener):
        (JSEventListener::listenerObj):
        (JSEventListener::windowObj):
        (JSLazyEventListener::JSLazyEventListener):
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::getJSEventListener):
        (Window::getJSUnprotectedEventListener):
        * khtml/ecma/kjs_window.h:
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::putValue):
        (KJS::XMLHttpRequest::mark):
        * khtml/ecma/xmlhttprequest.h:
        * khtml/khtml_part.h:

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

17 years ago3997044 Use TECGetWebTextEncodings for default encoding per user language
goldsmit [Thu, 10 Mar 2005 03:21:26 +0000 (03:21 +0000)]
3997044 Use TECGetWebTextEncodings for default encoding per user language

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

17 years ago Reviewed by Richard.
rjw [Thu, 10 Mar 2005 01:34:34 +0000 (01:34 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/4034175> REGRESSION (Mail): Can't use any font with style Light/Condensed/Semibold/Extrabold, etc

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _styleFromFontAttributes:]): Use a constant instead of hard-coded weight for clarity.
        (-[WebHTMLView _originalFontA]): Ditto.
        (-[WebHTMLView _originalFontB]): Ditto.
        (-[WebHTMLView _addToStyle:fontA:fontB:]): Add code to detect the case where the family name is not good enough
        to specify the font precisely. In that case, use the Postscript font name instead. Also change variable names
        so it's easier to understand the method.

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

17 years agoWebCore:
mjs [Thu, 10 Mar 2005 01:00:28 +0000 (01:00 +0000)]
WebCore:

        Reviewed by Darin.

<rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::putValue):
        * khtml/ecma/kjs_window.cpp:
        (Window::put):
        (WindowFunc::tryCall):
        (Location::put):
        (LocationFunc::tryCall):
        * khtml/khtml_part.cpp:
        (KHTMLPart::begin):
        (KHTMLPart::scheduleLocationChange):
        (KHTMLPart::slotRedirect):
        (KHTMLPart::processObjectRequest):
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLRequest):
        (KWQKHTMLPart::urlSelected):
        (KWQKHTMLPart::createPart):
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (hasCaseInsensitivePrefix):
        (-[WebCoreBridge didNotOpenURL:pageCache:]):
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]):

WebKit:

        Reviewed by Darin.

<rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content

* Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView requestWithURLCString:]):
        * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
        (-[WebNetscapePluginEmbeddedView didStart]):
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge createWindowWithURL:frameName:]):
        (-[WebBridge startLoadingResource:withURL:customHeaders:]):
        (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
        (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _loadURL:referrer:intoChild:]):
        * WebView.subproj/WebFramePrivate.h:

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

17 years agoWebKit:
rjw [Wed, 9 Mar 2005 22:30:26 +0000 (22:30 +0000)]
WebKit:
Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted

The AppKit and ATS reports that MS P Gothic is fixed pitch.  It is
not!  This is another case of "fixed pitch" being wrong.  I've
coalesced all the special cases into our isFontFixedPitch:, and
used a dictionary to improve speed.  No performance regression.

        Reviewed by Maciej.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _computeWidthForSpace]):
        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (-[WebTextRendererFactory clearCaches]):
        (-[WebTextRendererFactory isFontFixedPitch:]):

WebCore:
Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted

Remove our hacked special case now we have our own cache of
which fonts are fixed  pitch.

        Reviewed by Maciej.

        * kwq/KWQFont.mm:
        (QFont::isFixedPitch):

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

17 years ago Reviewed by Maciej.
harrison [Wed, 9 Mar 2005 19:49:48 +0000 (19:49 +0000)]
    Reviewed by Maciej.

        <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
        Add check for anonymous text after blocks.

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

17 years ago Reviewed by Maciej.
darin [Wed, 9 Mar 2005 19:00:31 +0000 (19:00 +0000)]
    Reviewed by Maciej.

        <rdar://problem/4040388> REGRESSION (172-173): nonrepro crash in -[NSString(WebNSURLExtras) _web_isUserVisibleURL]

        * Misc.subproj/WebNSURLExtras.m:
        (-[NSString _web_isUserVisibleURL]): Fixed some pointer expressions that didn't include the index in the expression.
        (readIDNScriptWhiteListFile): Removed NSLog statements in here since we decided they aren't useful and they will
        write some messages on Tiger.

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

17 years ago * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.
darin [Wed, 9 Mar 2005 18:37:58 +0000 (18:37 +0000)]
    * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.

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

17 years agoUpdated bug number in Richard's change.
darin [Wed, 9 Mar 2005 18:21:44 +0000 (18:21 +0000)]
Updated bug number in Richard's change.

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

17 years ago Reviewed by John
kocienda [Wed, 9 Mar 2005 01:06:32 +0000 (01:06 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot
        <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do
        a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and
        the code can infinite loop as a result.
        (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply
        block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles
        as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant
        nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes.

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

17 years ago Change written by Hyatt, reviewed by me.
darin [Wed, 9 Mar 2005 00:23:55 +0000 (00:23 +0000)]
    Change written by Hyatt, reviewed by me.

        - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail

        * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth):
        Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable
        so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively
        safe change because it only affects replaced elements' min-width.

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

17 years ago Reviewed by Ken.
harrison [Wed, 9 Mar 2005 00:08:04 +0000 (00:08 +0000)]
    Reviewed by Ken.

        <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message

        * khtml/editing/visible_units.cpp:
        (khtml::startOfLine):
        Use firstLeafChild() instead of firstChild().

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

17 years ago Fixed <rdar://problem/4042570> Need to check image properties for presence of width...
rjw [Wed, 9 Mar 2005 00:00:52 +0000 (00:00 +0000)]
Fixed <rdar://problem/4042570> Need to check image properties for presence of width/height properties

ImageIO-55 changed how image properties are created.  They
are now created incrementally.  So we need "re-get" the image
properties if the properties we care about (width/height) aren't
in the property dictionary.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData init]):
        (-[WebImageData fileProperties]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _isSizeAvailable]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebImageData size]):

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

17 years ago Fixed by Tom Madden.
rjw [Tue, 8 Mar 2005 21:31:55 +0000 (21:31 +0000)]
Fixed by Tom Madden.

Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method

We weren't clearing the "all ascii" flag when setting text on
RenderText.

        Reviewed by Richard Williamson.

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

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

17 years ago A couple of tweaks to the previous patch, from Darin's review.
sullivan [Tue, 8 Mar 2005 19:05:50 +0000 (19:05 +0000)]
    A couple of tweaks to the previous patch, from Darin's review.

        * Misc.subproj/WebNSPasteboardExtras.m:
        (_writableTypesForImageWithoutArchive):
        remove unnecessary _web prefix
        (_writableTypesForImageWithArchive):
        ditto
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        use mutableCopy rather than initWithArray:, and adjust for name changes

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

17 years ago Reviewed by Ken.
sullivan [Tue, 8 Mar 2005 18:53:42 +0000 (18:53 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4031826> REGRESSION (Mail): standalone images from
        Safari can't be pasted into Mail (WebKit part of fix)

        We were always declaring webarchive-related pasteboard types, even in the standalone
        image cases where we had no webarchive. Unfortunately, the WebView pasteboard-related
        API doesn't prevent this kind of thing from happening, because the code that
        declares the types isn't guaranteed to be anywhere near the code that writes
        the pasteboard data.

        After this fix, I discovered that pasting standalone images into Mail still doesn't
        work right, but the remaining issues seem to be entirely in Mail. I wrote up 4041671
        to cover these.

        * Misc.subproj/WebNSPasteboardExtras.h:
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        Added boolean parameter; clients must specify whether or not there's an
        archive involved, because the array of types is different if there is.

        * Misc.subproj/WebNSPasteboardExtras.m:
        (_web_writableTypesForImageWithoutArchive):
        new static function, constructs (once) and returns the array of types
        for images that don't have archives
        (_web_writableTypesForImageWithArchive):
        new static function, constructs (once) and returns the array of types
        for images that do have archives
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        added boolean parameter, now calls one of the two new static functions

        (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
        added asserts that we aren't declaring the archive types if we don't have archive data

        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebImageView.m:
        (-[WebImageView copy:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebView.m:
        (-[WebView pasteboardTypesForElement:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

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

17 years ago Reviewed by Ken and Maciej.
darin [Tue, 8 Mar 2005 17:42:38 +0000 (17:42 +0000)]
    Reviewed by Ken and Maciej.

        - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted

        Changed the few places where it matters to use a "collapsible whitespace" concept instead of
        the general whitespace concept. This means treating only ' ' and '\n' specially instead of
        including other space characters, which matches what the space-collapsing logic does in RenderText,
        although it really needs to behave differently based on whitespace mode.

        * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for
        ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it
        can't do the job ignoring white-space mode, so some day it must go.

        * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use
        isCollapsibleWhitespace and removed unnecessary calls to latin1().

        * khtml/editing/htmlediting.cpp:
        (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called.
        (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace.
        (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS,
        since we only want to do our NBSP tricks for collapsible whitespace.
        (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the
        same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't
        include any "\n" characters, and really a plain old space is the only collapsible thing that can
        be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for
        collapsible whitespace, not all whitespace.
        (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want
        to do NBSP tricks only for collapsible whitespace, not all whitespace.
        (khtml::RebalanceWhitespaceCommand::doApply): Ditto.

        * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace
        parameters. The most common callers are only interested in collapsible whitespace, and the smart copy
        and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or
        isCollapsibleWhitespace depending on the boolean passed in.
        (DOM::Position::trailingWhitespacePosition): Ditto.

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

17 years ago More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at...
rjw [Tue, 8 Mar 2005 02:27:57 +0000 (02:27 +0000)]
More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at com.apple.WebKit: -[WebTextRenderer initWithFont:usingPrinterFont:] + 840

Protect against removal of Times and Times New Roman from
system.  If these fonts are removed attempt to get system font
instead of FATAL_ALWAYS.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer initWithFont:usingPrinterFont:]):

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

17 years ago Reviewed by Darin.
sullivan [Tue, 8 Mar 2005 02:27:50 +0000 (02:27 +0000)]
    Reviewed by Darin.

        - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text,
        many other bad editing problems

        * khtml/rendering/render_text.cpp:
        (RenderText::caretMaxOffset):
        A "-" should have been a "+" in this method that was tweaked an hour ago. Editing
        was completely horked.

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

17 years ago Additional nil check from fix for 4040749.
rjw [Tue, 8 Mar 2005 01:46:44 +0000 (01:46 +0000)]
Additional nil check from fix for 4040749.

        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):

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

17 years ago Additional nil check from fix for 4040749.
rjw [Tue, 8 Mar 2005 01:38:13 +0000 (01:38 +0000)]
Additional nil check from fix for 4040749.

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

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

17 years ago Reviewed by Darin.
harrison [Tue, 8 Mar 2005 01:30:01 +0000 (01:30 +0000)]
    Reviewed by Darin.

        <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message

        Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not.
        Filed <rdar://problem/4040763> for that problem.

        * khtml/editing/visible_units.cpp:
        (khtml::previousLinePosition):

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

17 years ago Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working,...
rjw [Tue, 8 Mar 2005 01:11:48 +0000 (01:11 +0000)]
Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com

When layers are dynamically created/removed as a result of changing opacity they weren't being correctly
sized and positioned.  This happens whenever opacity goes from < 1 to 1.

        Reviewed by Darin.

        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):

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

17 years ago- fixed handling of min max caret position to take into account the possibility of...
kali [Tue, 8 Mar 2005 01:00:23 +0000 (01:00 +0000)]
- fixed handling of min max caret position to take into account the possibility of BIDI text (4016072)

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

17 years ago Reviewed by Ken.
harrison [Tue, 8 Mar 2005 00:24:13 +0000 (00:24 +0000)]
    Reviewed by Ken.

        <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData

        Work around the fact that the height() of a BR is 0 if there are no text elements on the line, even if there are replaced elements.
        Filed <rdar://problem/4040358> RenderBR height() is not accurate.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply):
        When height is 0, double check that the placeholder is the first position on the line.

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

17 years agoversioning for TOT, Safari 2.0 (403+). The tree is open!
vicki [Mon, 7 Mar 2005 23:35:20 +0000 (23:35 +0000)]
versioning for TOT, Safari 2.0 (403+).  The tree is open!

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v303)
vicki [Mon, 7 Mar 2005 23:23:26 +0000 (23:23 +0000)]
versioning for SUPanWheat, Safari 1.3 (v303)

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

17 years agoSafari-403 stamp
vicki [Mon, 7 Mar 2005 23:17:20 +0000 (23:17 +0000)]
Safari-403 stamp

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

17 years ago Reviewed by Vicki
kocienda [Mon, 7 Mar 2005 22:04:17 +0000 (22:04 +0000)]
    Reviewed by Vicki

        Fix for this bug:

        <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings

        * kwq/DOMHTML.mm: Add two new SPI functions.
        (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:])
        (-[DOMHTMLDocument _createDocumentFragmentWithText:])
        * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it.

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

17 years ago Reviewed by John
kocienda [Mon, 7 Mar 2005 21:18:59 +0000 (21:18 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
        when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
        in the content needs to be preserved. A simple one-line change now sees to this.

        * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
        <br> at the end of a paragraph. This makes sense given the code change.

        New test:
        * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-018.html: Added.

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

17 years ago Reviewed by John
kocienda [Mon, 7 Mar 2005 16:19:15 +0000 (16:19 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior

        The createMarkup() function in markup.cpp iterates over the nodes in a range,
        and does some bookkeeping to figure out when to add close tags to the markup.
        Some code added at the start of the loop to prevent markup from being written
        for unrendered nodes short-circuited the rest of the loop, and so prevented
        the close-tag-writing code from running when it should.

        This is why the "plain" text wound up inside of the bold tag in the example
        above. The addition of the unrendered return character caused an incorrect
        delay in the close tag for the bold element from being written out, with the
        result being that it wound up including additional content.

        The fix is to add checks for node renderers throughout the loop at the points
        where markup is written out for each node. This allows the additional close
        tag logic to run as needed.

        All layout tests pass with this change.

        * khtml/editing/markup.cpp:
        (khtml::createMarkup)

        New test:

        * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added.

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

17 years ago - fixed obvious mistake in IDN script code (luckily it hasn't been in a submi...
darin [Mon, 7 Mar 2005 03:46:44 +0000 (03:46 +0000)]
    - fixed obvious mistake in IDN script code (luckily it hasn't been in a submission yet!)

        * Misc.subproj/WebNSURLExtras.m: (readIDNScriptWhiteListFile): Use "index" to index into the array,
        not "script", which is the script number, not the 32-bit-word index.

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

17 years ago- fixed text box search code for caret rect to properly account for BIDI text (4038674)
kali [Sun, 6 Mar 2005 22:33:02 +0000 (22:33 +0000)]
- fixed text box search code for caret rect to properly account for BIDI text (4038674)

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

17 years ago- fixed problem with searching for BIDI text boxes (3587609)
kali [Sun, 6 Mar 2005 08:03:56 +0000 (08:03 +0000)]
- fixed problem with searching for BIDI text boxes (3587609)
- fixed missing initalizer of RTL flag in WebCoreStyle

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

17 years ago Reviewed by Darin.
kdecker [Sun, 6 Mar 2005 03:36:59 +0000 (03:36 +0000)]
    Reviewed by Darin.

Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace

The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.
        This stops websites from having seemingly infinite progress in the browser UI.

        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from
        the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES.   Also it's possible at this point in
         time we're done loading now (loaded everything else except for the multipart/x-mixed-replace content) so go ahead and check to see if
         in fact we're complete.
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]): ditto

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

17 years ago Reviewed by Maciej.
sullivan [Sun, 6 Mar 2005 01:37:42 +0000 (01:37 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange
        when composing a reply

        * khtml/editing/htmlediting.cpp:
        (khtml::StyleChange::checkForLegacyHTMLStyleChange):
        Added missing nil check.

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

17 years ago Fixed panther build problem. Shouldn't include
rjw [Sat, 5 Mar 2005 23:35:03 +0000 (23:35 +0000)]
Fixed panther build problem.  Shouldn't include
changes for 3968753 on panther.

        Reviewed by John.

        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]):

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

17 years ago Reviewed by Don.
darin [Sat, 5 Mar 2005 23:20:51 +0000 (23:20 +0000)]
    Reviewed by Don.

        - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf

        * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer.

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

17 years ago Reviewed by Richard.
darin [Sat, 5 Mar 2005 23:08:46 +0000 (23:08 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk

        * khtml/rendering/render_text.cpp:
        (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text.
        Shares a single global iterator (fast, albeit not thread-safe).
        (RenderText::previousOffset): Changed to call getCharacterBreakIterator.
        (RenderText::nextOffset): Ditto.

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

17 years ago Reviewed by Darin
kocienda [Sat, 5 Mar 2005 22:40:17 +0000 (22:40 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph

        Code to handle content that has a "logical" newline at the end of the pasted content, and the code
        to adjust the selection at the end of the paste operation made an assumption that at least one
        node had been inserted by the paste command. This is not necessarily true in the case where the sole content
        in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref
        null, but still adjust the selection correctly for this case. In each of the two functions below, some
        null checks have been added, and some code has been rearranged a little bit to continue on through
        the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more
        complicated than the conceptual change.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply)
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement)

        * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added.

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

17 years ago Reviewed by John.
darin [Sat, 5 Mar 2005 19:20:29 +0000 (19:20 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly)

        * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding
        a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up
        for http because in that case we add a trailing "/" as part of canonicalization.

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

17 years ago Reviewed by John.
darin [Sat, 5 Mar 2005 19:17:45 +0000 (19:17 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore

        * WebView.subproj/WebFormDataStream.m:
        (closeCurrentStream): Release currentData when closing the stream.
        (advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
        data won't be released while in use.
        (formCreate): Initialize currentData to NULL.

        - fixed <rdar://problem/4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)

        * WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
        Check for the case where we ourselves are the responder. This avoids an infinite loop.
        The actual code to perform operations avoids this with a global variable, but this lighter weight
        solution is sufficient here because validate operations don't call through to the next responder.

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

17 years agoRolled out a couple of assertion-related changes I accidentally checked in.
sullivan [Sat, 5 Mar 2005 15:39:05 +0000 (15:39 +0000)]
Rolled out a couple of assertion-related changes I accidentally checked in.

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

17 years ago- forgot to check this in for the previous fix
kali [Sat, 5 Mar 2005 03:15:55 +0000 (03:15 +0000)]
- forgot to check this in for the previous fix

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

17 years ago Reviewed by Kevin.
sullivan [Sat, 5 Mar 2005 01:50:56 +0000 (01:50 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/4033705> REGRESSION (Mail): Copy/Paste from Excel
        crashes Mail in KWQKHTMLPart::fontForSelection(bool*) const + 232

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::fontForSelection):
        Check for nil startNode, not just nil renderer.

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

17 years ago Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple...
rjw [Sat, 5 Mar 2005 01:33:58 +0000 (01:33 +0000)]
Fixed <rdar://problem/3968753> REGRESSION: Poor performance with differing multiple animated GIFs (was fast in Panther)

Disable coalesced updates (in CG).  This restores the
panther behavior.

        Reviewed by David Harrison.

        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]):

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

17 years ago Reviewed by Darin.
adele [Sat, 5 Mar 2005 01:28:39 +0000 (01:28 +0000)]
    Reviewed by Darin.

        * English.lproj/StringsNotToBeLocalized.txt: added new strings "text/x-vcf" and "text/x-csv" to the list

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

17 years ago Reviewed by Ken, Richard.
harrison [Sat, 5 Mar 2005 01:17:36 +0000 (01:17 +0000)]
    Reviewed by Ken, Richard.

        <rdar://problem/3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending

        Problem was the placeholder check was based on 0 height block, but the block in this
        case is the BODY, which has other content even though the paragraph is gone.

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::insertBlockPlaceholder):
        Now does insert instead of append!

        (khtml::CompositeEditCommand::appendBlockPlaceholder):
        New.  Actually does append.

        (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
        Renamed from insertBlockPlaceholderIfNeeded because it can insert or append.  Also accepts "force insert" flag.

        (khtml::CompositeEditCommand::removeBlockPlaceholder):
        Renamed for succinctness from removeBlockPlaceholderIfNeeded.

        (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
        (khtml::DeleteSelectionCommand::moveNodesAfterNode):
        Use renamed methods.

        (khtml::DeleteSelectionCommand::doApply):
        Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one.

        (khtml::InsertParagraphSeparatorCommand::doApply):
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
        (khtml::InsertTextCommand::input):
        Use renamed methods.

        * khtml/editing/htmlediting.h:
        Renamed and new methods per above.

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

17 years ago Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after...
cblu [Sat, 5 Mar 2005 01:02:46 +0000 (01:02 +0000)]
Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message

        Reviewed by darin.

        * khtml/editing/visible_units.cpp:
        (khtml::endOfParagraph): don't consider text nodes that have no rendered characters

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

17 years ago Reviewed by Chris.
adele [Sat, 5 Mar 2005 00:02:53 +0000 (00:02 +0000)]
    Reviewed by Chris.

        Fix for <rdar://problem/4032982> Sun iPlanet app: not able to import AddressBook CSV format addresses properly
        Fix for <rdar://problem/4032985> Sun iPlanet app: not able to import vCard format addresses properly

        * WebView.subproj/WebTextView.m:
        (+[WebTextView unsupportedTextMIMETypes]): added "text/x-csv" and "text/x-vcf" to the list of MIME types that our text view doesn't handle

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

17 years ago Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going...
rjw [Fri, 4 Mar 2005 23:59:10 +0000 (23:59 +0000)]
Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com)

The parse mode wasn't be restored to the document when going
back.

        Reviewed by Hyatt.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache):
        * kwq/KWQPageState.h:
        * kwq/KWQPageState.mm:
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):

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

17 years ago Reviewed by me
kocienda [Fri, 4 Mar 2005 22:47:23 +0000 (22:47 +0000)]
    Reviewed by me

        * layout-tests/editing/style/create-block-for-style-012-expected.txt: Shame on me!
        I landed my last fix without running layout tests. This one changes in a subtle, but
        acceptable way.

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

17 years ago Reviewed by Harrison
kocienda [Fri, 4 Mar 2005 22:32:15 +0000 (22:32 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/4032543> REGRESSION (Mail): Mail hangs when quoted text is pasted twice

        This code change fixes the bug in a non-obvious way. The root cause of the problem was
        that a VisiblePosition created using an affinity originating in Mail code caused
        two VisiblePosition objects that should have been equal to differ only in their
        affinities, which in turn caused us to run a code path that should not have run.

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::VisiblePosition): Added copy constructor.
        (khtml::VisiblePosition::next): Factored out inline code that used to be here into new
        setAffinityUsingLinePosition() function.
        (khtml::isEqualIgnoringAffinity): New helper to handle cases when affinity in equality check does
        not matter. However, we want to know about such cases where a VisiblePosition differs only by affinity,
        and the code will assert in development when this happens.
        (khtml::isNotEqualIgnoringAffinity): Ditto, but not. :)
        (khtml::setAffinityUsingLinePosition): New helper function mentioned above. This will "correct"
        upstream affinity to downstream if the affinity does not make a difference for the position.
        * khtml/editing/visible_position.h:
        * khtml/editing/visible_range.h: Wacky bug. The operator== for this class took VisiblePosition classes!
        * khtml/editing/visible_units.cpp:
        (khtml::isStartOfParagraph): Now performs equality check without regard to affinity.
        (khtml::isEndOfParagraph): Ditto.
        (khtml::isStartOfBlock): Ditto.
        (khtml::isEndOfBlock): Ditto.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): Adjusts the affinity using setAffinityUsingLinePosition()
        if necessary.

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

17 years agoWebCore:
darin [Fri, 4 Mar 2005 22:24:18 +0000 (22:24 +0000)]
WebCore:

        Reviewed by John.

        - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut

        * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines.
        * khtml/editing/htmlediting.cpp:
        (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get
        down to this level.
        (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new
        level that breaks runs into lines and inserts each one separately.
        (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this.

        * khtml/dom/dom_string.h: Made substring be a const member function.
        * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const.

WebKit:

        Reviewed by John.

        - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Merged _handleKillRing behavior
        into this function, since there's now a more-complicated way the startNewKillRingSequence boolean needs to
        be handled. Set the startNewKillRingSequence boolean after the entire process so changing the selection before
        and during the editing dosn't clear it. Also change "isTypingAction" parameter to "deletionAction" so we can
        handle forward delete with this method.
        (-[WebHTMLView _deleteSelection]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
        which is the way to say the same thing using the new parameter.
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Refactor to use the _deleteRange
        method above. Also calls _shouldDeleteRange: for the pre-existing selection case; not doing that before was
        a bug.
        (-[WebHTMLView deleteToMark:]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
        which is the way to say the same thing using the new parameter.

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

17 years agoWebCore:
darin [Fri, 4 Mar 2005 19:37:56 +0000 (19:37 +0000)]
WebCore:

        Reviewed by John.

        - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)

        * khtml/css/css_valueimpl.cpp:
        (DOM::isLegalIdentifier): Added. Commented out and not used.
        (DOM::quoteStringIfNeeded): Quotes the string if needed. For now only if it starts with "#".
        (DOM::CSSPrimitiveValueImpl::cssText): Call quoteStringIfNeeded when asked for cssText for an arbitrary string, since we
        need text you can re-parse.
        (DOM::FontFamilyValueImpl::cssText): Ditto.

        * khtml/editing/markup.cpp:
        (khtml::startMarkup): Added comments about lack of quoting for attributes.
        (khtml::createMarkup): Ditto.

WebKit:

        Reviewed by John.

        - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _styleFromFontAttributes:]): Quote font name when calling setFontFamily.
        (-[WebHTMLView _addToStyle:fontA:fontB:]): Ditto.

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

17 years ago Reviewed by Maciej
adele [Fri, 4 Mar 2005 19:16:31 +0000 (19:16 +0000)]
   Reviewed by Maciej

Fix for <rdar://problem/4021711> REGRESSION(125-188) blank pages when browsing forum at cooperativeresearch.org - cached external script problem

        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): set flag needToRefCachedScript so we can make sure
        notifyFinished is called after pendingSrc is set up with the right data from the cached script

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

17 years ago Reviewed by John.
darin [Fri, 4 Mar 2005 17:54:28 +0000 (17:54 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3965666> IDN spoofing vulnerability caused by Unicode characters that look like ASCII characters

        * Misc.subproj/WebNSURLExtras.m:
        (readIDNScriptWhiteListFile): Added. Reads file and parses script names.
        (readIDNScriptWhiteList): Added. Calls readIDNScriptWhiteList on each of the white list locations in succession.
        (allCharactersInIDNScriptWhiteList): Renamed from containsPossibleLatinLookalikes and changed sense.
        Now calls readIDNScriptWhiteList first time, and then uses the read-in list to check the scripts.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call allCharactersInIDNScriptWhiteList instead of
        containsPossibleLatinLookalikes.
        * Resources/IDNScriptWhiteList.txt: Added.
        * WebKit.pbproj/project.pbxproj: Added IDNScriptWhiteList.txt file.

        * Misc.subproj/WebKitLocalizableStrings.m: Removed. This is simply unused.
        * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

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

17 years ago Reviewed by John.
darin [Fri, 4 Mar 2005 17:37:26 +0000 (17:37 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3937667> REGRESSION (Mail): Zooming a window from titlebar button doesn't paint newly-exposed portions of window

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
        Re-set-up the visRect if the bounds changes due to layout.

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

17 years ago Reviewed by John
kocienda [Fri, 4 Mar 2005 17:18:27 +0000 (17:18 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor
        was failing to yield a position for a node just pasted into the document since a layout was needed
        for the calculation to come out right. Layout added. Crash gone.

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

17 years ago- made RenderText::caretRect handle BIDI text correctly in its calculations (3587614)
kali [Fri, 4 Mar 2005 08:58:20 +0000 (08:58 +0000)]
- made RenderText::caretRect handle BIDI text correctly in its calculations (3587614)

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

17 years agoversioning for TOT, Safari 2.0 (v402+). The tree is open.
vicki [Fri, 4 Mar 2005 07:45:05 +0000 (07:45 +0000)]
versioning for TOT, Safari 2.0 (v402+).  The tree is open.

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v302)
vicki [Fri, 4 Mar 2005 07:38:08 +0000 (07:38 +0000)]
versioning for SUPanWheat, Safari 1.3 (v302)

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

17 years agoSafari-402 stamp
vicki [Fri, 4 Mar 2005 07:29:43 +0000 (07:29 +0000)]
Safari-402 stamp

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

17 years ago Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard...
cblu [Fri, 4 Mar 2005 01:22:40 +0000 (01:22 +0000)]
Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out

        Reviewed by harrison.

        * khtml/rendering/render_line.cpp:
        (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position.

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

17 years ago<rdar://problem/3991818> REGRESSION: Images scale while loading
jens [Fri, 4 Mar 2005 00:05:43 +0000 (00:05 +0000)]
<rdar://problem/3991818> REGRESSION: Images scale while loading

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

17 years ago Fix for 3841186, scrollbar shows up disabled when it should not appear at all. ...
hyatt [Thu, 3 Mar 2005 23:54:13 +0000 (23:54 +0000)]
Fix for 3841186, scrollbar shows up disabled when it should not appear at all.  Make sure updateScrollers
is never allowed to be re-entrant from any call point by moving the guard inside the function itself.

        Reviewed by John Sullivan

        * WebView.subproj/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView updateScrollers]):
        (-[WebDynamicScrollBarsView reflectScrolledClipView:]):

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

17 years ago Reviewed by John
kocienda [Thu, 3 Mar 2005 23:08:16 +0000 (23:08 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4035198> Pasting text with different styles does not get reproducible results

        I had a good idea yesterday to improve the way we "fixup" styles after
        pasting, but i chose a poor data structure to do it, a map of
        nodes-to-styles. In the fixup step, I iterated over the map elements and
        did the fixup. However, since the order in which the items would come
        out of the map is indeterminate, we got unpredictable results.

        So, the concept was good, but the implementation was flawed. I have
        fixed this mapping to be a list instead, so the order that nodes are
        evaluated in the fixup step is document order. This works nicely.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and
        styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class.
        (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle,
        function renamed from mapDesiredStyleForNode.
        Now accepts a QValueList<NodeDesiredStyle> in place of the old map.
        (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping.
        (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto.
        (khtml::NodeDesiredStyle::operator=): Ditto.
        (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle,
        function renamed from mapDesiredStyleForNode.
        (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in
        place of the old map.
        (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode.  Now operates on a
        QValueList<NodeDesiredStyle> in place of the old map.
        * khtml/editing/htmlediting.h:
        (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping.
        (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map.

        * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way.

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

17 years ago Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView...
cblu [Thu, 3 Mar 2005 01:13:06 +0000 (01:13 +0000)]
Fixed: <rdar://problem/4029010> Expose method to retrieve drag image for WebView's selection

        Reviewed by sullivan.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): call _selectionDraggingImage
        (-[WebHTMLView _selectionDraggingImage]): new SPI for Mail, factored from previous method
        (-[WebHTMLView _selectionDraggingRect]): new SPI for Mail
        * WebView.subproj/WebHTMLViewPrivate.h:

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

17 years ago Reviewed by Maciej.
darin [Thu, 3 Mar 2005 01:12:05 +0000 (01:12 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them

        * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since
        both have m_valueMatchesRenderer flags.
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away.
        (DOM::HTMLTextAreaElementImpl::detach): Ditto.

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

17 years ago Reviewed by Hyatt
kocienda [Thu, 3 Mar 2005 01:00:56 +0000 (01:00 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the
        function. In some situations, the render tree can get confused when we do this removal up front.
        I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and
        fixes the bug.

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

17 years agoRoll out two files I just checked in by accident.
darin [Thu, 3 Mar 2005 00:59:38 +0000 (00:59 +0000)]
Roll out two files I just checked in by accident.

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

17 years ago Reviewed by Maciej.
darin [Thu, 3 Mar 2005 00:58:35 +0000 (00:58 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8

        Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
        rather than relying on high level assumptions about which calls can and can't destroy the HTML element
        (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
        We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
        because this just avoids nil-dereferencing.

        * kwq/KWQButton.mm:
        (-[KWQButton becomeFirstResponder]):
        (-[KWQButton nextKeyView]):
        (-[KWQButton previousKeyView]):
        * kwq/KWQListBox.mm:
        (-[KWQTableView mouseDown:]):
        (-[KWQTableView becomeFirstResponder]):
        (-[KWQTableView numberOfRowsInTableView:]):
        (-[KWQTableView tableViewSelectionDidChange:]):
        (-[KWQTableView tableView:shouldSelectRow:]):
        (-[KWQTableView selectionShouldChangeInTableView:]):
        * kwq/KWQScrollBar.mm:
        (-[KWQScrollBar scroll:]):
        * kwq/KWQSlider.mm:
        (-[KWQSlider mouseDown:]):
        (-[KWQSlider slide:]):
        (-[KWQSlider becomeFirstResponder]):
        (-[KWQSlider nextKeyView]):
        (-[KWQSlider previousKeyView]):
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]):
        (-[KWQTextAreaTextView resignFirstResponder]):
        (-[KWQTextAreaTextView mouseDown:]):
        * kwq/KWQTextField.mm:
        (-[KWQTextFieldController action:]):
        (-[KWQTextFieldController controlTextDidEndEditing:]):
        (-[KWQTextFieldController controlTextDidChange:]):
        (-[KWQTextFieldController textView:didHandleEvent:]):
        (-[KWQTextFieldController setHasFocus:]):

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

17 years ago Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible...
rjw [Thu, 3 Mar 2005 00:38:24 +0000 (00:38 +0000)]
Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget

We were leaking inline block line boxes.  Argh!

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::dirtyLineBoxes):
        * khtml/rendering/render_line.cpp:
        (khtml::InlineBox::deleteLine):

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

17 years ago Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get...
cblu [Thu, 3 Mar 2005 00:31:22 +0000 (00:31 +0000)]
Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion
        (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar
        (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle  ivar
        (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style
        * khtml/editing/htmlediting.h:

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

17 years ago Reviewed by Darin.
mjs [Thu, 3 Mar 2005 00:30:32 +0000 (00:30 +0000)]
    Reviewed by Darin.

<rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb

* khtml/ecma/kjs_events.cpp:
(JSLazyEventListener::parseCode): If originalNode is NULL, don't
mess with the scope chain.

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are
delcared on body but set on the document, pass NULL to avoid
swizzling the scope chain. It turns out that this is what browsers
do, and it finesses the crash.

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

17 years ago Reviewed by Adele.
sullivan [Thu, 3 Mar 2005 00:10:41 +0000 (00:10 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/4023337> Safari stops loading any page (-[NSCFDictionary setObject:forKey:]:
        attempt to insert nil key)

        It is very likely that the exception being hit is caused by the same problem as WebFoundation
        bug 4018486. This change makes the code robust against this kind of problem regardless.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate saveResource]):
        Don't call addSubresource if newly-created resource is nil (but do assert on debug builds).
        Also assert that originalURL and MIMEType are not nil.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource addSubresource:]):
        Don't add nil subresource to dictionary, but do assert on debug builds.

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

17 years ago Reviewed by Ken.
harrison [Wed, 2 Mar 2005 22:59:29 +0000 (22:59 +0000)]
    Reviewed by Ken.

        <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply):

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

17 years agoFixed comment in ChangeLog.
rjw [Wed, 2 Mar 2005 22:05:49 +0000 (22:05 +0000)]
Fixed comment in ChangeLog.

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

17 years ago Reviewed by John
kocienda [Wed, 2 Mar 2005 20:58:48 +0000 (20:58 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style

        The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the
        style of these moved nodes. I have generalized some of the functions that compute and preserve styles
        for nodes and then apply these styles after a DOM operation.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function
        in place of old code that had this deref'ing inline.
        (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper
        function place of old code that had this style computation inline.
        (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name.
        (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed,
        or in place of pre-refactored inline code.
        (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized
        to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps,
        and that is needed to fix the bug.
        (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node
        and map this style to the given node in the given map. This function now also includes the code that was
        in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed.
        (khtml::derefNodesAndStylesInMap): Simple helper to deref map members.
        * khtml/editing/htmlediting.h:
        (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles.

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

17 years agomove changes for rdar://problem/4003774 and rdar://problem/3990258 above the Safari...
vicki [Wed, 2 Mar 2005 19:52:00 +0000 (19:52 +0000)]
move changes for rdar://problem/4003774 and rdar://problem/3990258 above the Safari-401 release marker -- neither of these changes are included in Safari-401

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 2 Mar 2005 17:12:49 +0000 (17:12 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
        check here after deleting all the content in the body element. The special "empty block"
        needs to add check for DOM children. A block may have straggling anonymous render children in
        some cases, and so the check needs to be (!DOM-kids || !render-kids).

        Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests
        got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin.

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 2 Mar 2005 17:08:53 +0000 (17:08 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
        check here after deleting all the content in the body element. The special "empty block"
        needs to add check for DOM children. A block may have straggling anonymous render children in
        some cases, and so the check needs to be (!DOM-kids || !render-kids).

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

17 years ago 2005-03-01 Ken Kocienda <kocienda@apple.com>
kocienda [Wed, 2 Mar 2005 17:04:57 +0000 (17:04 +0000)]
 2005-03-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

        Improved fix for this bug:

        <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML

        Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
        "last in block" situation. Remove special case for "downstream node is in different block" and handle
        this case with a little bit of special code in the general insertion case.

        Results studied to make sure there were no problems.

        * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
        * layout-tests/editing/inserting/insert-div-001-expected.txt
        * layout-tests/editing/inserting/insert-div-002-expected.txt
        * layout-tests/editing/inserting/insert-div-004-expected.txt
        * layout-tests/editing/inserting/insert-div-005-expected.txt
        * layout-tests/editing/inserting/insert-div-009-expected.txt
        * layout-tests/editing/inserting/insert-div-014-expected.txt
        * layout-tests/editing/inserting/insert-div-018-expected.txt
        * layout-tests/editing/inserting/insert-div-024-expected.txt
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt
        * layout-tests/editing/pasteboard/paste-text-013-expected.txt
        * layout-tests/editing/pasteboard/paste-text-015-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt

        New test:

        * layout-tests/editing/inserting/insert-div-027.html
        * layout-tests/editing/inserting/insert-div-027-expected.txt

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

17 years ago Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison...
hyatt [Wed, 2 Mar 2005 04:33:50 +0000 (04:33 +0000)]
Fix for 4030890, regression with <sup> on Google.  Fix some bogus != comparison checks in verticalPositionHint.

        Reviewed by John

        (RenderObject::getVerticalPosition):

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

17 years ago Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted...
cblu [Wed, 2 Mar 2005 03:38:43 +0000 (03:38 +0000)]
Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content

        Reviewed by rjw.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
        * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
        * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-001.html: Added.
        * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
        * layout-tests/editing/deleting/smart-delete-002.html: Added.

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

17 years ago Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove...
rjw [Wed, 2 Mar 2005 02:17:59 +0000 (02:17 +0000)]
Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane

The string objects created by KWQHeaderStringFromDictionary() leaked.

        Reviewed by John Louch.

        * kwq/KWQLoader.mm:
        (KWQHeaderStringFromDictionary):

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

17 years ago<rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run
jens [Wed, 2 Mar 2005 01:38:17 +0000 (01:38 +0000)]
<rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run

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

17 years agoRe-checkin after previously backing out:
rjw [Wed, 2 Mar 2005 01:21:49 +0000 (01:21 +0000)]
Re-checkin after previously backing out:

Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari

The problem was due to incorrect "object truncation" in  RenderFlow::paintLines.
We attempt to push objects down if they don't fit on a page at
paint time.  If the attempt to push object down failed we just
didn't paint at all.

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLines):

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

17 years agoversioning for TOT, Safari 2.0 (401+) -- the tree is open!
vicki [Wed, 2 Mar 2005 01:18:02 +0000 (01:18 +0000)]
versioning for TOT, Safari 2.0 (401+) -- the tree is open!

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v301)
vicki [Wed, 2 Mar 2005 01:12:02 +0000 (01:12 +0000)]
versioning for SUPanWheat, Safari 1.3 (v301)

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