⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



May 4, 2006:

9:30 PM Changeset in webkit [14202] by darin
  • 2 edits in trunk/WebCore

Reviewed by Tim Omernick.

  • fix storage leak I introduced yesterday
  • platform/cg/GraphicsContextCG.cpp: (WebCore::setCGFillColor): Added. (WebCore::setCGStrokeColor): Added. (WebCore::GraphicsContext::drawRect): Use setCGFillColor to avoid allocating a CGColorRef object. (WebCore::GraphicsContext::drawLine): Use setCGStrokeColor and setCGFillColor to avoid allocating a CGColorRef object. (WebCore::GraphicsContext::drawEllipse): Ditto. (WebCore::GraphicsContext::drawArc): Ditto. (WebCore::GraphicsContext::drawConvexPolygon): Ditto. (WebCore::GraphicsContext::fillRect): Ditto.
9:29 PM Changeset in webkit [14201] by darin
  • 3 edits
    1 copy
    3 adds in trunk

LayoutTests:

Reviewed by Darin.

  • plugins/pluginDocumentView-deallocated-dataSource-expected.txt: Added.
  • plugins/pluginDocumentView-deallocated-dataSource.html: Added.
  • plugins/resources: Added.
  • plugins/resources/orange.mov: Added.

WebKit:

Reviewed by Darin.

Test: plugins/pluginDocumentView-deallocated-dataSource.html

  • Plugins/WebPluginDocumentView.m: (-[WebPluginDocumentView dealloc]): Release the dataSource. (-[WebPluginDocumentView setDataSource:]): Retain the dataSource.
9:25 PM Changeset in webkit [14200] by thatcher
  • 1 copy in tags/WebKit-418.3/WebKit

Tag for WebKit 418.3 (part 2 of 2.)

9:25 PM Changeset in webkit [14199] by thatcher
  • 1 add in tags/WebKit-418.3

Tag for WebKit 418.3 (part 1 of 2.)

9:22 PM Changeset in webkit [14198] by thatcher
  • 2 edits in branches/Safari-2-0-branch/WebKit

Versioning

9:20 PM Changeset in webkit [14197] by thatcher
  • 1 edit in branches/Safari-2-0-branch/WebKit/WebView.subproj/WebFrameView.m

GCC 3 Build fix for warning: 'return' with a value, in function returning void.

9:19 PM Changeset in webkit [14196] by thatcher
  • 1 edit in trunk/WebKit/WebView/WebFrameView.m

Build fix, warning: 'return' with a value, in function returning void.

6:43 PM Changeset in webkit [14195] by justing
  • 12 edits
    8 adds in trunk

LayoutTests:

Reviewed by harrison

Pasted content would end up inside the block that contained the end of
the selection that was pasted into and not the block that contained
the start of the selection that was pasted into:

  • editing/pasteboard/merge-end-5-expected.checksum: Added.
  • editing/pasteboard/merge-end-5-expected.png: Added.
  • editing/pasteboard/merge-end-5-expected.txt: Added.
  • editing/pasteboard/merge-end-5.html: Added.


Inserting a paragraph separator was splitting and cloning the body element
if the html element was editable:

  • editing/inserting/editable-html-element-expected.checksum: Added.
  • editing/inserting/editable-html-element-expected.png: Added.
  • editing/inserting/editable-html-element-expected.txt: Added.
  • editing/inserting/editable-html-element.html: Added.


Since we now sometimes merge backward (from content already in the
document to just inserted content) during the end merge, the node that
contains the old caret is removed more often during paste. The editing
delegate notifications in these tests reflect this:

  • editing/pasteboard/paste-line-endings-007-expected.txt:
  • editing/pasteboard/paste-line-endings-008-expected.txt:
  • editing/pasteboard/paste-line-endings-009-expected.txt:


Now demonstrates a bug where the html element is focused, but its contents
aren't selected:

  • editing/selection/focus_editable_html-expected.checksum:
  • editing/selection/focus_editable_html-expected.png:
  • editing/selection/focus_editable_html-expected.txt:
  • editing/selection/focus_editable_html.html:

WebCore:

Reviewed by harrison

  • dom/Node.cpp: (WebCore::Node::rootEditableElement): Restored code to stop at the body tag. Editing shouldn't be allowed to happen outside the body, so it needs to be the editable root even if the html element is contentEditable.
  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Now takes in more information so it can be "the decider". (WebCore::ReplaceSelectionCommand::doApply): Merging two paragraphs will destroy the moved one's block styles. Perform the end merge backward (from content already in the document to just inserted content) if moving forward would move the paragraph that contained the start of the selection being pasted into, since we always want to preserve that paragraph's block style. Moving backward in this case is also helpful because otherwise it would be difficult to remember the position where inserted content began (since merging would remove m_firstNodeInserted). That position is needed in order to select the replacement and to add smart replace whitespace. (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded): If [br, 0] is at the end of a block, the br is not necessarily collapsed in quirks mode. [br, 0] needs to also not be at the start of a block.


  • editing/ReplaceSelectionCommand.h:
5:58 PM Changeset in webkit [14194] by tomernic
  • 7 edits in trunk

WebCore:

Reviewed by Darin.

<rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element

  • bridge/mac/WebCoreFrameBridge.h: Added DOMElement parameter to -viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:.
  • bridge/JavaAppletWidget.h: Constructor now takes the applet's element instead of its containing frame.
  • bridge/mac/JavaAppletWidget.mm: (JavaAppletWidget::JavaAppletWidget): Pass the applet's element to viewForJavaAppletWithFrame:.
  • rendering/RenderApplet.cpp: (WebCore::RenderApplet::createWidgetIfNecessary): Pass the element along to JavaAppletWidget.

WebKit:

Reviewed by Darin.

<rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element

  • WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]): Pass the DOMElement to the plugin if it's a WebKit plugin (we need to handle Netscape plugins differently).
5:35 PM Changeset in webkit [14193] by thatcher
  • 1 copy in tags/WebKit-418.2/WebKit

Tag for WebKit 418.2 (part 2 of 2.)

5:33 PM Changeset in webkit [14192] by thatcher
  • 1 add in tags/WebKit-418.2

Tag for WebKit 418.2 (part 1 of 2.)

5:33 PM Changeset in webkit [14191] by thatcher
  • 1 copy in tags/WebCore-418.1/WebCore

Tag for WebCore 418.1 (part 2 of 2.)

5:33 PM Changeset in webkit [14190] by thatcher
  • 1 add in tags/WebCore-418.1

Tag for WebCore 418.1 (part 1 of 2.)

5:32 PM Changeset in webkit [14189] by thatcher
  • 1 copy in tags/JavaScriptCore-418.1/JavaScriptCore

Tag for JavaScriptCore 418.1 (part 2 of 2.)

5:32 PM Changeset in webkit [14188] by thatcher
  • 1 add in tags/JavaScriptCore-418.1

Tag for JavaScriptCore 418.1 (part 1 of 2.)

5:02 PM Changeset in webkit [14187] by thatcher
  • 6 edits in branches/Safari-2-0-branch

Versioning

4:54 PM Changeset in webkit [14186] by thatcher
  • 14 edits in branches/Safari-2-0-branch

WebCore:

Reviewed by Harrison.

<rdar://problem/4523536> SUTiLondon: Dashcode removes commented code from HTML files

  • khtml/editing/markup.cpp: (khtml::endMarkup):
  • khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createTokenizer):
  • khtml/html/html_documentimpl.h: (DOM::HTMLDocumentImpl::isHTMLDocument):
  • khtml/html/htmlparser.cpp: (KHTMLParser::getElement):
  • khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): (khtml::HTMLTokenizer::setIncludesComments): (khtml::HTMLTokenizer::includesComments):
  • khtml/html/htmltokenizer.h:
  • khtml/xml/dom_docimpl.cpp: (DocumentImpl::removedLastRef): (DocumentImpl::documentElement):
  • khtml/xml/dom_docimpl.h:
  • kwq/WebCoreBridge.h:
  • kwq/WebCoreBridge.mm: (+[WebCoreBridge includesCommentsInDOM]): (+[WebCoreBridge setIncludesCommentsInDOM:]):

WebKit:

Reviewed by Harrison.

<rdar://problem/4523536> SUTiLondon: Dashcode removes commented code from HTML files

  • WebView.subproj/WebView.m: (+[WebView _includesCommentsInDOM]): (+[WebView _setIncludesCommentsInDOM:]):
  • WebView.subproj/WebViewPrivate.h:
4:03 PM Changeset in webkit [14185] by tomernic
  • 10 edits in trunk

WebCore:

Reviewed by John Sullivan.

<rdar://problem/4480186> Give WebKit plugins access to their own DOM element

  • bridge/mac/WebCoreFrameBridge.h: Added DOMElement: parameter to -viewForPluginWithURL:attributeNames:attributueValues:MIMEType:
  • bridge/mac/FrameMac.h:
  • bridge/mac/FrameMac.mm: (WebCore::FrameMac::createPlugin): Added "element" parameter; wrap element in DOMElement and pass up to the bridge.
  • page/Frame.h: Added "element" parameter to createPlugin().
  • page/Frame.cpp: (WebCore::Frame::loadPlugin): Get the plugin's DOM element and pass to createPlugin().

WebKit:

Reviewed by John Sullivan.

<rdar://problem/4480186> Give WebKit plugins access to their own DOM element

This does not fix <rdar://problem/4480187> Give Netscape plugins access to their own DOM element --
we're not going to use the ObjC DOM API for that, but rather the NP bindings API.

  • Plugins/WebPluginPackage.m: Declared WebPlugInContainingElementKey. This is not a new plugin argument -- it's been in our public headers since all along, but has never been concretely declared -- plugins that referenced it would not link.
  • WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:DOMElement:]): Added DOMElement parameter, which is now included in the plugin arguments dictionary. (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:]): ditto
  • WebKit.exp: Export WebPlugInContainingElementKey.
1:37 PM Changeset in webkit [14184] by andersca
  • 2 edits in trunk/JavaScriptCore

2006-05-04 Anders Carlsson <andersca@mac.com>

Reviewed by Maciej.

http://bugzilla.opendarwin.org/show_bug.cgi?id=8734
Would like a Vector::append that takes another Vector


  • kxmlcore/Vector.h: (KXMLCore::::append): New function that takes another array.
1:08 PM Changeset in webkit [14183] by justing
  • 5 edits in branches/Safari-2-0-branch/WebCore

Reviewed by thatcher


Used the StayInBlock variant of upstream/downstream since they behave that way in
tip of tree (where there is no StayInBlock parameter).

11:26 AM Changeset in webkit [14182] by eseidel
  • 2 edits
    1 add in trunk/WebCore

2006-05-04 Eric Seidel <eseidel@apple.com>

Reviewed by timo.

Add drag & drop support to <input type="file">
http://bugzilla.opendarwin.org/show_bug.cgi?id=8733

Test: manual/input-type-file-drag-drop.html

  • kwq/KWQFileButton.mm: (-[WebFileChooserButton initWithWidget::]): (-[WebCoreFileButton initWithWidget:]): (-[WebCoreFileButton drawRect:]): (-[WebCoreFileButton updateLabel]): (-[WebCoreFileButton setFilename:]): (-[WebCoreFileButton changeFilename:]): (-[WebCoreFileButton chooseFilename:]): (validFilenameFromPasteboard): (-[WebCoreFileButton draggingEntered:]): (-[WebCoreFileButton draggingExited:]): (-[WebCoreFileButton performDragOperation:]):
11:20 AM Changeset in webkit [14181] by bdakin
  • 13 edits in trunk

--This

Reviewed by Hyatt.

Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8732
Backgrounds with background-size and background-origin do not
always lay out correctly

  • platform/cairo/ImageCairo.cpp: (WebCore::Image::drawTiled): We no longer need to scale the source point since it will now come in with the scale already taken into account.
  • platform/mac/ImageMac.mm: (WebCore::Image::drawTiled): Same as above.
  • rendering/RenderBox.cpp: (WebCore::cacluateBackgroundSize): Now calculate the background size in a helper method. (WebCore::RenderBox::paintBackgroundExtended): Calculate the background size before calculating cx, cy, cw, ch, sx, and sy so that they can all be calculated with the scaled image size taken into account.

M LayoutTests/ChangeLog
M LayoutTests/fast/backgrounds/size/backgroundSize18-expected.checksum
M LayoutTests/fast/backgrounds/size/backgroundSize12-expected.png
M LayoutTests/fast/backgrounds/size/backgroundSize19-expected.checksum
M LayoutTests/fast/backgrounds/size/backgroundSize10-expected.png
M LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png
M LayoutTests/fast/backgrounds/size/backgroundSize19-expected.png
M LayoutTests/fast/backgrounds/size/backgroundSize10-expected.checksum
M LayoutTests/fast/backgrounds/size/backgroundSize12-expected.checksum
M WebCore/platform/mac/ImageMac.mm
M WebCore/platform/cairo/ImageCairo.cpp
M WebCore/rendering/RenderBox.cpp
M WebCore/ChangeLog

11:10 AM Changeset in webkit [14180] by thatcher
  • 1 edit in branches/Safari-2-0-branch/WebKit/Plugins.subproj/WebPluginController.m

Speculative build fix for B&I.

11:04 AM Changeset in webkit [14179] by hyatt
  • 4 edits in trunk/WebCore

Fix for 8693, crash when reloading PDF. Make sure to clear the truncator's
cached renderer.

Reviewed by beth

  • bridge/mac/WebCoreStringTruncator.h:
  • bridge/mac/WebCoreStringTruncator.mm: (+[WebCoreStringTruncator clear]):
  • platform/mac/WebTextRendererFactory.mm: (-[WebTextRendererFactory clearCaches]):
10:42 AM Changeset in webkit [14178] by thatcher
  • 2 edits in branches/Safari-2-0-branch/WebKit

Merged fix from TOT to Safari-2-0-branch


This fixes: <rdar://problem/4211296> right side of page is clipped when printing to PDF

2005-12-08 John Sullivan <sullivan@apple.com>

Reviewed by Tim O.


  • Added WebKit mechanism to help correctly pass the first responder into the PDF view hierarchy, in order to start addressing keyboard focus and selection highlight issues. Unfortunately this doesn't actually have any user effect yet due to problems that must be fixed in PDFKit.
  • WebView.subproj/WebPDFView.m: (-[WebPDFView acceptsFirstResponder]): Overridden to returns YES. Needed so NSClipView knows it's OK to pass focus down to this level. (-[WebPDFView becomeFirstResponder]): With setNextKeyView:, splices the PDF view into the focus-passing mechanism in much the same way as NSScrollView and NSClipView. (-[WebPDFView setNextKeyView:]): With becomeFirstResponder:, splices the PDF view into the focus-passing mechanism in much the same way as NSScrollView and NSClipView. (-[WebPDFView resignFirstResponder]): Removed this method because the WebPDFView itself is never first responder except transiently.

May 3, 2006:

5:48 PM Changeset in webkit [14177] by thatcher
  • 1 edit in branches/Safari-2-0-branch/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

Build fix for WebCore.

5:02 PM Changeset in webkit [14176] by thatcher
  • 8 edits
    22 adds
    5 deletes in branches/Safari-2-0-branch/JavaScriptCore

2006-05-03 Timothy Hatcher <timothy@apple.com>

Merged fix from TOT to Safari-2-0-branch

2005-11-06 Geoffrey Garen <ggaren@apple.com>

Reviewed by Darin.

Our UTF16-modified PCRE didn't work with extended character classes
(classes involving characters > 255) because it used the GETCHARINC
macro to read through them. In UTF16 mode, GETCHARINC expects UTF16
input, but PCRE encodes character classes in UTF8 regardless of the
input mode of the subject string.

The fix is to explicitly define GETUTF8CHARINC, and to use it,
rather than GETCHARINC, when reading extended character classes.


In UTF8 mode, we simply define GETCHARINC to be GETUTF8CHARINC.

  • pcre/pcre_internal.h:
  • pcre/pcre_xclass.c: (_pcre_xclass):

2006-05-03 Timothy Hatcher <timothy@apple.com>

Merged fix from TOT to Safari-2-0-branch

2005-09-29 Eric Seidel <eseidel@apple.com>

Fix from Mitz Pettel <opendarwin.org@mitzpettel.com>

Reviewed by darin.

Fix JSC memory smasher in TOT.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5176

  • pcre/pcre_exec.c: (match):

2006-05-03 Timothy Hatcher <timothy@apple.com>

Merged fix from TOT to Safari-2-0-branch

2005-09-08 Darin Adler <Darin Adler>

Reviewed by Geoff.

  • updated to PCRE 6.1

The original PCRE 6.1 sources are checked into the tree with the tag
"pcre-6-1" for reference. What we're checking in right now is the original
plus our changes to make it support UTF-16 and at least one other tweak
(vertical tab considered whitespace). Our work to get our changes was
done on "pcre-6-1-branch", with an anchor at "pcre-6-1-anchor" so you can
see the evolution of the UTF-16 changes.


Note also that there was one small change made here that's not on the branch
in pcre_compile.c.

  • Info.plist: Updated the part of the copyright message that's about PCRE.
  • JavaScriptCore.xcodeproj/project.pbxproj: Added new PCRE source files, removed obsolete ones.
  • pcre/AUTHORS: Updated to PCRE 6.1. Includes credits for Apple's UTF-16 changes, but not the credits for Google's C++ wrapper, since we don't include that.
  • pcre/COPYING: Updated to PCRE 6.1.
  • pcre/LICENCE: Ditto.
  • pcre/dftables.c: Ditto.
  • pcre/pcre-config.h: Ditto.
  • pcre/pcre.h: Ditto.
  • pcre/pcre_compile.c: Added for PCRE 6.1.
  • pcre/pcre_config.c: Ditto.
  • pcre/pcre_exec.c: Ditto.
  • pcre/pcre_fullinfo.c: Ditto.
  • pcre/pcre_get.c: Ditto.
  • pcre/pcre_globals.c: Ditto.
  • pcre/pcre_info.c: Ditto.
  • pcre/pcre_internal.h: Ditto.
  • pcre/pcre_maketables.c: Ditto.
  • pcre/pcre_ord2utf8.c: Ditto.
  • pcre/pcre_printint.c: Ditto.
  • pcre/pcre_refcount.c: Ditto.
  • pcre/pcre_study.c: Ditto.
  • pcre/pcre_tables.c: Ditto.
  • pcre/pcre_try_flipped.c: Ditto.
  • pcre/pcre_ucp_findchar.c: Ditto.
  • pcre/pcre_version.c: Ditto.
  • pcre/pcre_xclass.c: Ditto.
  • pcre/ucp.h: Ditto.
  • pcre/ucp_findchar.c: Ditto.
  • pcre/ucpinternal.h: Ditto.
  • pcre/ucptable.c: Ditto.
  • pcre/get.c: Removed.
  • pcre/internal.h: Removed.
  • pcre/maketables.c: Removed.
  • pcre/pcre.c: Removed.
  • pcre/study.c: Removed.
2:35 PM Changeset in webkit [14175] by thatcher
  • 2 edits in branches/Safari-2-0-branch/WebKit

Reviewed by Tim H.

<rdar://problem/4536009> REGRESSION: Printing embedded plugins crashes on Safari-2-0-branch, but not in TOT


Merge over npapi.h from the r14154 JavaScriptCore change.

  • Plugins.subproj/npapi.h:
2:15 PM Changeset in webkit [14174] by darin
  • 12 edits
    1 copy in trunk/WebCore

Reviewed by Eric.

  • WebCore.xcodeproj/project.pbxproj: Added GraphicsContextCG.cpp.
  • html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::scale): Use new GraphicsContext function. (WebCore::CanvasRenderingContext2D::rotate): Ditto. (WebCore::CanvasRenderingContext2D::translate): Ditto.
  • kwq/KWQComboBox.mm: Added include (not sure if this is needed for this patch, but it's needed for one of my upcoming ones).
  • platform/GraphicsContext.h: Changed fillColor and setFillColor to use Color instead of RGBA32. Removed setColorFromFillColor and setColorFromPen. Added scale, rotate, and translate functions.
  • platform/GraphicsContext.cpp: (WebCore::GraphicsContext::setFillColor): Changed to use Color instead of RGBA32. (WebCore::GraphicsContext::fillColor): Ditto.
  • platform/GraphicsTypes.h: Moved HorizontalAlignment here.
  • platform/Widget.h: Removed HorizontalAlignment from here.
  • platform/cg/GraphicsContextCG.cpp: Added. Started as a copy of GraphicsContextMac.mm. (WebCore::GraphicsContext::drawRect): Rewrote to not rely on [NSGraphicsContext currentContext]. (WebCore::GraphicsContext::drawLine): Ditto. (WebCore::GraphicsContext::drawEllipse): Ditto. (WebCore::GraphicsContext::drawArc): Ditto. (WebCore::GraphicsContext::drawConvexPolygon): Ditto. (WebCore::GraphicsContext::fillRect): Ditto. (WebCore::GraphicsContext::setLineWidth): Added check of paintingDisabled(). (WebCore::GraphicsContext::setMiterLimit): Ditto. (WebCore::GraphicsContext::setAlpha): Ditto. (WebCore::GraphicsContext::clearRect): Ditto. (WebCore::GraphicsContext::strokeRect): Ditto. (WebCore::GraphicsContext::setLineCap): Ditto. (WebCore::GraphicsContext::setLineJoin): Ditto. (WebCore::GraphicsContext::clip): Ditto. (WebCore::GraphicsContext::scale): Added. (WebCore::GraphicsContext::rotate): Added. (WebCore::GraphicsContext::translate): Added.
  • platform/mac/GraphicsContextMac.mm: Moved most of this file into GraphicsContextCG.cpp. (WebCore::GraphicsContext::setCompositeOperation): Added check of paintingDisabled().
  • platform/mac/WebCoreSystemInterface.h: Added declarations so this header stands alone.
1:28 PM Changeset in webkit [14173] by thatcher
  • 3 edits in branches/Safari-2-0-branch/WebCore

Merged fix from TOT to Safari-2-0-branch

2006-04-04 Justin Garcia <justin.garcia@apple.com>

Reviewed by darin


<http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
REGRESSION: Line disappears when deleting


Rewrote moveNodesAfterNode to address these problems:
It moved nodes without preserving their style.
It traversed over siblings looking for a br to know when
to stop merging. If the br was burried inside a span, it
wouldn't find it. If the text is whitespace:pre, it wouldn't
stop.
In theory it would crash if the "enclosingInlineElements" of the start of the
selection to delete and the end of the selection to delete were the
same. We think that this will fix these:
<rdar://problems/3950559&4498113>
CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
But we haven't been able to construct a reproducible case.


  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand. (WebCore::CompositeEditCommand::prune): Ditto.
  • editing/CompositeEditCommand.h:
  • editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): (WebCore::DeleteSelectionCommand::doApply):
  • editing/DeleteSelectionCommand.h:
  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
  • editing/ReplaceSelectionCommand.h: (WebCore::):
  • editing/markup.cpp: (WebCore::createMarkup): Was crashing when passed a collapsed range. I early return an empty string instead.
12:32 PM Changeset in webkit [14172] by darin
  • 58 edits
    19 adds in trunk

LayoutTests:

Reviewed by Justin.

  • fast/forms/input-text-click-inside-expected.png: Added.
  • fast/forms/input-text-click-inside-expected.txt: Added.
  • fast/forms/input-text-click-inside-expected.checksum: Added.
  • fast/forms/input-text-click-inside.html: Added.
  • fast/forms/input-text-click-outside-expected.png: Added.
  • fast/forms/input-text-click-outside-expected.txt: Added.
  • fast/forms/input-text-click-outside-expected.checksum: Added.
  • fast/forms/input-text-click-outside.html: Added. Test clicks both inside and outside an input element.
  • editing/selection/contenteditable-click-inside-expected.png: Added.
  • editing/selection/contenteditable-click-inside-expected.txt: Added.
  • editing/selection/contenteditable-click-inside-expected.checksum: Added.
  • editing/selection/contenteditable-click-inside.html: Added.
  • editing/selection/contenteditable-click-outside-expected.png: Added.
  • editing/selection/contenteditable-click-outside-expected.txt: Added.
  • editing/selection/contenteditable-click-outside-expected.checksum: Added.
  • editing/selection/contenteditable-click-outside.html: Added. Added a test for the same situation, but with a div element set to have editable content.
  • editing/inserting/insert-3851164-fix-expected.txt:
  • editing/inserting/insert-3851164-fix.html:
  • editing/inserting/insert-3907422-fix-expected.txt:
  • editing/inserting/insert-3907422-fix.html:
  • editing/pasteboard/paste-text-011-expected.txt:
  • editing/pasteboard/paste-text-011.html: Update some tests that were relying on a bug that would cause a Select All in a document that contained a single content-editable element select the contents of that element.
  • fast/lists/drag-into-marker-expected.checksum:
  • fast/lists/drag-into-marker-expected.png:
  • fast/lists/drag-into-marker-expected.txt:
  • fast/lists/drag-into-marker.html: Changed test so that it no longer tests what happens when you drag to a marker that is outside the content-editable element. We may still want to make that case behave as before, but that's a separate issue.
  • editing/pasteboard/drop-text-without-selection-expected.txt:
  • editing/pasteboard/merge-start-blockquote-expected.txt:
  • editing/pasteboard/merge-start-list-expected.txt:
  • editing/selection/select-all-iframe-expected.txt:
  • fast/events/div-focus-expected.txt:
  • fast/events/drag-outside-window-expected.txt:
  • fast/forms/focus-control-to-page-expected.txt:
  • fast/forms/input-changing-value-expected.txt:
  • fast/forms/input-maxlength-2-expected.txt:
  • fast/forms/input-paste-undo-expected.txt:
  • fast/forms/input-text-paste-maxlength-expected.txt:
  • fast/forms/input-truncate-newline-expected.txt:
  • fast/forms/plaintext-mode-2-expected.txt:
  • fast/text/textIteratorNilRenderer-expected.txt: Update tests where the DOM range endpoints passed to the delegate are slightly different, but equivalent and still OK.
  • editing/pasteboard/paste-4039777-fix-expected.txt: Updated tests where the resulting tree is slightly different, but still OK.
  • editing/unsupported-content/list-delete-002-expected.checksum:
  • editing/unsupported-content/list-delete-002-expected.png:
  • editing/unsupported-content/list-delete-002-expected.txt: Update test where the new code eliminates an unwanted extra space that we got with the old code.
  • editing/deleting/delete-4038408-fix-expected.txt:
  • editing/deleting/delete-4038408-fix.html:
  • editing/input/text-input-controller-expected.txt:
  • editing/input/text-input-controller.html:
  • fast/forms/attributed-strings-expected.txt:
  • fast/forms/attributed-strings.html: Update tests that were relying on the behavior of Select All putting the selection inside a content-editable element if that element was the first in the body; the patch breaks that behavior.
  • fast/events/updateLayoutForHitTest-expected.checksum:
  • fast/events/updateLayoutForHitTest-expected.png: Update a test that no longer shows a visible selection.
  • editing/selection/3690703-2-expected.checksum:
  • editing/selection/3690703-2-expected.png:
  • editing/selection/3690703-2-expected.txt:
  • editing/selection/3690703-expected.checksum:
  • editing/selection/3690703-expected.png:
  • editing/selection/3690703-expected.txt: Updated results for these tests, which have examples of form elements inside a content-editable area. The old results were wrong; the new results are not much better, but are OK.
  • update some other misc. pixel-test results
  • fast/inspector/style-expected.checksum:
  • fast/inspector/style-expected.png: Updated since the name changed to include "-webkit-".
  • fast/overflow/childFocusRingClip-expected.checksum:
  • fast/overflow/childFocusRingClip-expected.png: Updated results that now seem to show correct clipping of the focus ring.
  • fast/frames/empty-cols-attribute-expected.checksum:
  • fast/frames/empty-cols-attribute-expected.png: Added. Checksum was wrong, png was missing.
  • fast/parser/001-expected.checksum:
  • fast/parser/001-expected.png: Checksum and png were incorrect -- changed a while back.
  • plugins/embed-attributes-style-expected.checksum: Added.
  • plugins/embed-attributes-style-expected.png: Added. Added pixel-test results for tests that don't have them.

WebCore:

Reviewed by Justin.

This bug has always been present for "content editable" HTML, but
now affects <input type=text> as well. The problem is with the editing
concept of a "deep equivalent". When computing the deep equivalent,
the code can move from outside an editable area to inside. To fix this,
I removed all use of the "deep equivalent" concept.

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates): Changed argument names from _x and _y to just x and y. When the element is the editable root, changed things so that clicks that are not within the element at all return positions before or after the element, rather than always choosing the closest point within the element. This gets us off on the right foot, by not choosing a position inside an editable root when you click outside that editable root. This code handles shadowParentNode as well, and also calls positionForCoordinates on children rather than calling positionForRenderer (which I believe is now a function that can be removed).
  • editing/VisiblePosition.h: Removed the deepEquivalent function.
  • editing/VisiblePosition.cpp: (WebCore::VisiblePosition::previousVisiblePosition): Removed use of the deepEquivalent function. Also, to make this function easier to understand I separated out the case where the start point is "in rendered content" and the case where it's not into two separate loops. (WebCore::VisiblePosition::nextVisiblePosition): Ditto. (WebCore::VisiblePosition::initDeepPosition): Removed use of the deepEquivalent function. Also added code to make sure that this work never turns a position outside an editable element into a position inside that editable element, or vice versa. Reorganized the code a bit.
  • dom/Position.cpp: (WebCore::Position::upstream): Removed use of the deepEquivalent function. (WebCore::Position::downstream): Ditto.
  • editing/htmlediting.cpp: (WebCore::editingIgnoresContent): Changed to use isReplaced instead of isWidget and isImage to determine if editing should ignore content. (WebCore::firstInSpecialElement): Rewrote isFirstVisiblePositionInSpecialElement to have code to share with positionBeforeContainingSpecialElement. And changed to allow both the position just before a table and the position just inside a table to qualify. While this is slightly sloppy, the old code worked because of the "deep equivalent" technique. This change is needed to get the desired results even without that technique. (WebCore::lastInSpecialElement): Ditto. (WebCore::isFirstVisiblePositionInSpecialElement): Changed to use the new function. (WebCore::positionBeforeContainingSpecialElement): Ditto. (WebCore::isLastVisiblePositionInSpecialElement): Ditto. (WebCore::positionAfterContainingSpecialElement): Ditto.
  • dom/Node.cpp: (WebCore::Node::rootEditableElement): Rewrote to remove special case for body tag.
  • other changes
  • html/HTMLElement.cpp: (WebCore::HTMLElement::setOuterHTML): Added a FIXME about the fact that this won't merge neighboring text nodes the way setOuterText does. (WebCore::HTMLElement::setInnerText): Added a FIXME about the fact that this creates a text node even when setting to empty text. (WebCore::HTMLElement::setOuterText): Ditto.
  • editing/DeleteSelectionCommand.cpp: Removed some #if 1 and #if 0.
  • editing/ReplaceSelectionCommand.cpp: A little reformatting.
  • rendering/render_button.h: Tiny formatting tweak.
12:32 PM Changeset in webkit [14171] by tomernic
  • 2 edits in branches/Safari-2-0-branch/WebKit

Merged fix from TOT to Safari-2-0-branch

2005-12-04 Tim Omernick <timo@apple.com>

Reviewed by Dave Harrison, John Sullivan.

<rdar://problem/4364847> REGRESSION: QuickTime movies open without controller or don't open at all (5928)

I changed WebFrameView on 2005-11-29 so that it avoids creating duplicate WebPluginDocumentViews.
Unfortunately, this change caused a regression due to the fact that it subtly changed when plugins are
initialized. Certain plugins (e.g. QuickTime) expect to be initialized after the WebPluginDocumentView
has been "committed" (inserted into the view hierarchy).

My fix is to ensure that the plugin is initialized where we previously would have created that second
WebPluginDocumentView -- that is, the plugin is created after the WebPluginDocumentView has been committed.


  • Plugins.subproj/WebPluginDocumentView.m: (-[WebPluginDocumentView setDataSource:]): Don't initialize the plugin if the WebPluginDocumentView has not been inserted into the view hierarchy. We assume here that a later call to -setDataSource: will pass this conditional, once the WebDocumentView has been committed.
Note: See TracTimeline for information about the timeline view.