Timeline



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.

May 2, 2006:

8:21 PM Changeset in webkit [14170] by adele
  • 2 edits in trunk/WebCore

Reviewed by Beth.

Fix for <rdar://problem/4523671>
REGRESSION (NativeTextField): Auto-complete popup list doesn't appear at the correct location after scrolling page.

  • bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _rectOnScreen]): Use the documentView to compute the correct rect for the element when the view is scrolled.
8:17 PM Changeset in webkit [14169] by justing
  • 12 edits
    28 adds in trunk

LayoutTests:

Reviewed by harrison


<http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
Fix a few end merge bugs
<rdar://problem/4424044>
REGRESSION: Extra line appears when typing

Added a function so that selection changes can participate in slow-motion-mode:

  • editing/editing.js: Extra newlines were added:
  • editing/inserting/paragraph-separator-01-expected.checksum: Added.
  • editing/inserting/paragraph-separator-01-expected.png: Added.
  • editing/inserting/paragraph-separator-01-expected.txt: Added.
  • editing/inserting/paragraph-separator-01.html: Added.
  • editing/inserting/paragraph-separator-02-expected.checksum: Added.
  • editing/inserting/paragraph-separator-02-expected.png: Added.
  • editing/inserting/paragraph-separator-02-expected.txt: Added.
  • editing/inserting/paragraph-separator-02.html: Added. A preserved newline was turned into a nbsp:
  • editing/inserting/paragraph-separator-03-expected.checksum: Added.
  • editing/inserting/paragraph-separator-03-expected.png: Added.
  • editing/inserting/paragraph-separator-03-expected.txt: Added.
  • editing/inserting/paragraph-separator-03.html: Added. End merge didn't happen:
  • editing/pasteboard/merge-end-4-expected.checksum: Added.
  • editing/pasteboard/merge-end-4-expected.png: Added.
  • editing/pasteboard/merge-end-4-expected.txt: Added.
  • editing/pasteboard/merge-end-4.html: Added. Content was pulled out of these special elements:
  • editing/pasteboard/merge-end-blockquote-expected.checksum: Added.
  • editing/pasteboard/merge-end-blockquote-expected.png: Added.
  • editing/pasteboard/merge-end-blockquote-expected.txt: Added.
  • editing/pasteboard/merge-end-blockquote.html: Added.
  • editing/pasteboard/merge-end-list-expected.checksum: Added.
  • editing/pasteboard/merge-end-list-expected.png: Added.
  • editing/pasteboard/merge-end-list-expected.txt: Added.
  • editing/pasteboard/merge-end-list.html: Added.
  • editing/pasteboard/merge-end-table-expected.checksum: Added.
  • editing/pasteboard/merge-end-table-expected.png: Added.
  • editing/pasteboard/merge-end-table-expected.txt: Added.
  • editing/pasteboard/merge-end-table.html: Added.

WebCore:

Reviewed by harrison


<http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
Fix a few end merge bugs
<rdar://problem/4424044>
REGRESSION: Extra line appears when typing

  • bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]): Use renamed characterAfter.
  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Regenerate a VisiblePosition that became stale during a text node split. Don't rebalance whitespace after the operation, 1) it has a bug that turns preserved newlines into nbsps, 2) I think it should only be done during serialization, not after every command (since editable regions now always have -webkit-nbsp-mode:space on them). Use a regular br for the placeholder as I think we can move away from -webkit-block-placeholders.


  • editing/RebalanceWhitespaceCommand.cpp: Added FIXMEs.
  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart): Removed FIXME. (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Can now use rendering information. (WebCore::ReplaceSelectionCommand::doApply): Call shouldMergeEnd after the insertion so that it can use rendering information. Don't use positionAfterNode of the last node inserted to mark the position at the end of inserted content because canonicalization can send it into content that was already in the document.


  • editing/ReplaceSelectionCommand.h:
  • editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): Renamed. When two candidates are visually equivalent, the rightmost candidate will be the one inside the text node where the character will be.


  • editing/VisiblePosition.h:
  • editing/htmlediting.cpp: (WebCore::enclosingTableCell): Added. (WebCore::enclosingList):
  • editing/htmlediting.h:
5:21 PM Changeset in webkit [14168] by darin
  • 3 edits in trunk/WebKit

Reviewed by Eric.

I don't know how reproduce this without one of Rosyna's hacks installed, so I
did not include a test.

  • Misc/WebStringTruncator.m: (+[WebStringTruncator initialize]): Add call to InitWebCoreSystemInterface.
  • WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add a boolean so we will only do this one time.
5:02 PM Changeset in webkit [14167] by hyatt
  • 3 edits in trunk/WebCore

Partial fix for the crash in bugzilla bug 8088. There's a third crash
even after fixing this though.

Reviewed by darin

  • platform/mac/WebTextRenderer.mm: (WebCore::WidthMap::widths): (WebCore::extendWidthMap):
  • platform/mac/WebTextRendererFactory.mm: (-[WebTextRendererFactory clearCaches]):
4:56 PM Changeset in webkit [14166] by adele
  • 2 edits in trunk/WebKit

Reviewed by Tim O.

  • WebView/WebView.m: (-[WebView _menuForElement:defaultItems:]): Don't let the UI delegate have control over the context menu for text fields.
4:56 PM Changeset in webkit [14165] by thatcher
  • 5 edits in branches/Safari-2-0-branch/WebCore

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

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

Reviewed by darin


<rdar://problem/3997958>
REGRESSION (Mail): Mail takes half of forever to paste >1500 lines - replaceSelectionWithNode

  • dom/Position.cpp: (WebCore::Position::upstream): Avoid calling previous() when we know that it will 1) end the search and 2) be expensive to compute. (WebCore::Position::downstream): Removed some dead code. (WebCore::Position::inRenderedText): Return false for offsets inside composed characters.
  • dom/Position.h:
  • editing/VisiblePosition.cpp: (WebCore::VisiblePosition::init): If there are two visually equivalent candidates, we choose the one that occurs first in document order. Using upstream() to find the one that occurs first is much faster than the old code.
4:02 PM Changeset in webkit [14164] by thatcher
  • 3 edits in branches/Safari-2-0-branch/WebKit

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

2006-04-07 David Hyatt <hyatt@apple.com>

A fix that makes coalesced updates work much better (and makes our
single animated GIF timer work better). The new rect painting algorithm
for WebHTMLView will use the single unioned rect if the # of rects exceeds
a threshold (10 is my initial cut), or if the union has enough "wasted"
additional pixels (conservatively set at 75%).

Reviewed by darin

  • WebView/WebHTMLView.m: (-[NSArray drawSingleRect:]): (-[NSArray drawRect:]):
3:54 PM Changeset in webkit [14163] by sfalken
  • 4 edits in trunk/WebCore

2006-05-02 Steve Falkenburg <sfalken@apple.com>

Reviewed by eric.

WARNING: NO TEST CASES ADDED OR CHANGED

  • WebCore.vcproj/WebCore/WebCore.vcproj: defined NDEBUG in release build
  • bridge/win/FrameWin.cpp: (WebCore::FrameWin::FrameWin): turned on javascript.
  • kwq/KWQKHTMLSettings.h: (KHTMLSettings::KHTMLSettings): initialized settings to 0
3:48 PM Changeset in webkit [14162] by sfalken
  • 3 edits in trunk/JavaScriptCore

2006-05-02 Steve Falkenburg <sfalken@apple.com>

Reviewed by eric.

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build
  • kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice
3:42 PM Changeset in webkit [14161] by thatcher
  • 50 edits
    1 add in branches/Safari-2-0-branch/WebCore

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

2005-11-07 Maciej Stachowiak <mjs@apple.com>

Reviewed by Eric, Geoff and Darin.

  • fixed <rdar://problem/4118258> XML DOM trees freed prematurely unless reference held to document node (causes crash)


I changed the design for how DOM nodes maintain their reference to
the document. Instead of using DocumentPtr, an indirect reference
which would go null in a clean way when the document is destroyed,
they now have a different strategy.


Nodes that belong to the document now hold a special kind of
reference on the document - a "self only reference". When a
document has no regular references but still has self-only
references, it won't be destroyed, but it will drop all its
children. This allows detached nodees to still have a valid
document reference, but they won't keep the rest of the DOM alive
or cause circular references.

  • khtml/editing/SelectionController.cpp: (khtml::SelectionController::toRange):
  • khtml/editing/visible_position.cpp: (khtml::makeRange):
  • khtml/editing/visible_text.cpp: (khtml::TextIterator::range): (khtml::SimplifiedBackwardsTextIterator::range):
  • khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::HTMLBodyElementImpl): (HTMLFrameElementImpl::HTMLFrameElementImpl): (HTMLFrameSetElementImpl::HTMLFrameSetElementImpl): (HTMLHeadElementImpl::HTMLHeadElementImpl): (HTMLHtmlElementImpl::HTMLHtmlElementImpl): (HTMLIFrameElementImpl::HTMLIFrameElementImpl):
  • khtml/html/html_baseimpl.h:
  • khtml/html/html_blockimpl.cpp: (HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl): (HTMLDivElementImpl::HTMLDivElementImpl): (HTMLHRElementImpl::HTMLHRElementImpl): (HTMLHeadingElementImpl::HTMLHeadingElementImpl): (HTMLParagraphElementImpl::HTMLParagraphElementImpl): (HTMLPreElementImpl::HTMLPreElementImpl): (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
  • khtml/html/html_blockimpl.h:
  • khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::HTMLCanvasElementImpl):
  • khtml/html/html_canvasimpl.h:
  • khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::createTokenizer): (DOM::HTMLDocumentImpl::determineParseMode):
  • khtml/html/html_elementimpl.cpp: (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText):
  • khtml/html/html_elementimpl.h:
  • khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::HTMLFormElementImpl): (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): (DOM::HTMLButtonElementImpl::HTMLButtonElementImpl): (DOM::HTMLFieldSetElementImpl::HTMLFieldSetElementImpl): (DOM::HTMLInputElementImpl::HTMLInputElementImpl): (DOM::HTMLLabelElementImpl::HTMLLabelElementImpl): (DOM::HTMLLegendElementImpl::HTMLLegendElementImpl): (DOM::HTMLSelectElementImpl::HTMLSelectElementImpl): (DOM::HTMLKeygenElementImpl::HTMLKeygenElementImpl): (DOM::HTMLOptGroupElementImpl::HTMLOptGroupElementImpl): (DOM::HTMLOptionElementImpl::HTMLOptionElementImpl): (DOM::HTMLOptionElementImpl::setText): (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
  • khtml/html/html_formimpl.h:
  • khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::HTMLBaseElementImpl): (HTMLLinkElementImpl::HTMLLinkElementImpl): (HTMLMetaElementImpl::HTMLMetaElementImpl): (HTMLScriptElementImpl::HTMLScriptElementImpl): (HTMLStyleElementImpl::HTMLStyleElementImpl): (HTMLTitleElementImpl::HTMLTitleElementImpl):
  • khtml/html/html_headimpl.h:
  • khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::HTMLImageElementImpl): (HTMLMapElementImpl::HTMLMapElementImpl): (HTMLAreaElementImpl::HTMLAreaElementImpl):
  • khtml/html/html_imageimpl.h:
  • khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::HTMLAnchorElementImpl): (DOM::HTMLBRElementImpl::HTMLBRElementImpl): (DOM::HTMLFontElementImpl::HTMLFontElementImpl): (DOM::HTMLModElementImpl::HTMLModElementImpl): (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl):
  • khtml/html/html_inlineimpl.h:
  • khtml/html/html_listimpl.h: (DOM::HTMLUListElementImpl::HTMLUListElementImpl): (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl): (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl): (DOM::HTMLOListElementImpl::HTMLOListElementImpl): (DOM::HTMLLIElementImpl::HTMLLIElementImpl): (DOM::HTMLDListElementImpl::HTMLDListElementImpl):
  • khtml/html/html_miscimpl.cpp: (DOM::HTMLBaseFontElementImpl::HTMLBaseFontElementImpl):
  • khtml/html/html_miscimpl.h:
  • khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::HTMLAppletElementImpl): (DOM::HTMLEmbedElementImpl::HTMLEmbedElementImpl): (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl): (DOM::HTMLParamElementImpl::HTMLParamElementImpl):
  • khtml/html/html_objectimpl.h:
  • khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::HTMLTableElementImpl): (DOM::HTMLTableElementImpl::createTHead): (DOM::HTMLTableElementImpl::createTFoot): (DOM::HTMLTableElementImpl::createCaption): (DOM::HTMLTableElementImpl::insertRow): (DOM::HTMLTableSectionElementImpl::HTMLTableSectionElementImpl): (DOM::HTMLTableSectionElementImpl::insertRow): (DOM::HTMLTableRowElementImpl::insertCell): (DOM::HTMLTableCellElementImpl::HTMLTableCellElementImpl): (DOM::HTMLTableColElementImpl::HTMLTableColElementImpl):
  • khtml/html/html_tableimpl.h: (DOM::HTMLTablePartElementImpl::HTMLTablePartElementImpl): (DOM::HTMLTableRowElementImpl::HTMLTableRowElementImpl): (DOM::HTMLTableCaptionElementImpl::HTMLTableCaptionElementImpl):
  • khtml/html/htmlfactory.cpp: (DOM::htmlConstructor): (DOM::headConstructor): (DOM::bodyConstructor): (DOM::baseConstructor): (DOM::linkConstructor): (DOM::metaConstructor): (DOM::styleConstructor): (DOM::titleConstructor): (DOM::frameConstructor): (DOM::framesetConstructor): (DOM::iframeConstructor): (DOM::formConstructor): (DOM::buttonConstructor): (DOM::inputConstructor): (DOM::isindexConstructor): (DOM::fieldsetConstructor): (DOM::labelConstructor): (DOM::legendConstructor): (DOM::optgroupConstructor): (DOM::optionConstructor): (DOM::selectConstructor): (DOM::textareaConstructor): (DOM::dlConstructor): (DOM::ulConstructor): (DOM::olConstructor): (DOM::dirConstructor): (DOM::menuConstructor): (DOM::liConstructor): (DOM::blockquoteConstructor): (DOM::divConstructor): (DOM::headingConstructor): (DOM::hrConstructor): (DOM::paragraphConstructor): (DOM::preConstructor): (DOM::basefontConstructor): (DOM::fontConstructor): (DOM::modConstructor): (DOM::anchorConstructor): (DOM::imageConstructor): (DOM::mapConstructor): (DOM::areaConstructor): (DOM::canvasConstructor): (DOM::appletConstructor): (DOM::embedConstructor): (DOM::objectConstructor): (DOM::paramConstructor): (DOM::scriptConstructor): (DOM::tableConstructor): (DOM::tableCaptionConstructor): (DOM::tableColConstructor): (DOM::tableRowConstructor): (DOM::tableCellConstructor): (DOM::tableSectionConstructor): (DOM::brConstructor): (DOM::quoteConstructor): (DOM::marqueeConstructor): (DOM::HTMLElementFactory::createHTMLElement):
  • khtml/html/htmlparser.cpp: (HTMLParser::HTMLParser): (HTMLParser::~HTMLParser):
  • khtml/html/htmlparser.h: (HTMLParser::doc):
  • khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): (khtml::HTMLTokenizer::parseTag): (khtml::parseHTMLDocumentFragment):
  • khtml/html/htmltokenizer.h:
  • khtml/misc/loader.h:
  • khtml/misc/shared.h: (khtml::TreeShared::~TreeShared): (khtml::TreeShared::destroy): (khtml::TreeShared::deref):
  • khtml/xbl/xbl_tokenizer.cpp: (XBL::XBLTokenHandler::XBLTokenHandler):
  • khtml/xbl/xbl_tokenizer.h: (XBL::):
  • khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::RangeImpl): (DOM::RangeImpl::setStart): (DOM::RangeImpl::setEnd): (DOM::RangeImpl::processContents): (DOM::RangeImpl::cloneRange): (DOM::RangeImpl::setStartAfter): (DOM::RangeImpl::setEndBefore): (DOM::RangeImpl::setEndAfter): (DOM::RangeImpl::setStartBefore): (DOM::rangeOfContents):
  • khtml/xml/dom2_rangeimpl.h:
  • khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::createDocumentType): (DOMImplementationImpl::createDocument): (DocumentImpl::DocumentImpl): (DocumentImpl::destroy): (DocumentImpl::~DocumentImpl): (DocumentImpl::createDocumentFragment): (DocumentImpl::createTextNode): (DocumentImpl::createComment): (DocumentImpl::createCDATASection): (DocumentImpl::createProcessingInstruction): (DocumentImpl::createEntityReference): (DocumentImpl::createEditingTextNode): (DocumentImpl::createElementNS): (DocumentImpl::setTitle): (DocumentImpl::removeTitle): (DocumentImpl::createRange): (DocumentImpl::createTokenizer): (DocumentImpl::implicitClose): (DocumentImpl::setHoverNode): (DocumentImpl::setActiveNode): (DocumentImpl::setFocusNode): (DocumentImpl::createAttributeNS): (DocumentFragmentImpl::DocumentFragmentImpl): (DocumentFragmentImpl::cloneNode): (DocumentTypeImpl::DocumentTypeImpl):
  • khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::selfOnlyRef): (DOM::DocumentImpl::selfOnlyDeref): (DOM::DocumentImpl::focusNode): (DOM::DocumentImpl::hoverNode): (DOM::DocumentImpl::activeNode):
  • khtml/xml/dom_elementimpl.cpp: (AttributeImpl::allocateImpl): (AttrImpl::AttrImpl): (AttrImpl::cloneNode): (ElementImpl::ElementImpl): (StyledElementImpl::StyledElementImpl):
  • khtml/xml/dom_elementimpl.h:
  • khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::NodeImpl): (DOM::NodeImpl::setDocument): (DOM::NodeImpl::~NodeImpl): (DOM::NodeImpl::dispatchEvent): (DOM::NodeImpl::dispatchWindowEvent): (DOM::NodeImpl::dispatchMouseEvent): (DOM::NodeImpl::checkAddChild): (DOM::ContainerNodeImpl::ContainerNodeImpl): (DOM::ContainerNodeImpl::removeAllChildren): (DOM::ContainerNodeImpl::~ContainerNodeImpl):
  • khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::inDocument): (DOM::NodeImpl::getDocument):
  • khtml/xml/dom_textimpl.cpp: (CharacterDataImpl::CharacterDataImpl): (CommentImpl::CommentImpl): (TextImpl::TextImpl): (TextImpl::createNew): (CDATASectionImpl::CDATASectionImpl): (CDATASectionImpl::createNew): (EditingTextImpl::EditingTextImpl):
  • khtml/xml/dom_textimpl.h:
  • khtml/xml/dom_xmlimpl.cpp: (DOM::EntityImpl::EntityImpl): (DOM::EntityReferenceImpl::EntityReferenceImpl): (DOM::EntityReferenceImpl::cloneNode): (DOM::NotationImpl::NotationImpl): (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl): (DOM::ProcessingInstructionImpl::cloneNode):
  • khtml/xml/dom_xmlimpl.h:
  • khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::XMLTokenizer): (khtml::XMLTokenizer::startElementNs): (khtml::XMLTokenizer::enterText): (khtml::XMLTokenizer::processingInstruction): (khtml::XMLTokenizer::cdataBlock): (khtml::XMLTokenizer::comment): (khtml::XMLTokenizer::internalSubset): (khtml::XMLTokenizer::finish): (khtml::XMLTokenizer::insertErrorMessageBlock): (khtml::XMLTokenizer::executeScripts): (khtml::newXMLTokenizer):
  • khtml/xml/xml_tokenizer.h:
  • khtml/xsl/xslt_processorimpl.cpp: (DOM::createFragmentFromSource):
1:45 PM Changeset in webkit [14160] by hyatt
  • 4 adds in trunk/LayoutTests/fast/overflow

Add layout test for scrollLeft/Top setting bug.

1:44 PM Changeset in webkit [14159] by hyatt
  • 2 edits in trunk/WebCore

Make sure to updateLayout on all scrolling functions (in particular when
setting scrollLeft/Top).

Reviewed by eric

fast/overflow/008,html added as a test case.

  • dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): (WebCore::Element::setScrollLeft): (WebCore::Element::setScrollTop):
1:20 PM Changeset in webkit [14158] by thatcher
  • 2 edits in branches/Safari-2-0-branch/JavaScriptCore/kjs

Debug build fix.

9:23 AM Changeset in webkit [14157] by darin
  • 6 edits
    1 add in trunk/WebKitWin
  • ChangeLog: Added.
  • <most files: Cleared the stray "executable" bit that was on most files.
2:30 AM Changeset in webkit [14156] by andersca
  • 2 edits in trunk/JavaScriptCore

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

Reviewed by Maciej.

  • kxmlcore/HashMap.h: (KXMLCore::::operator): Return *this
12:25 AM Changeset in webkit [14155] by andersca
  • 3 edits
    2 adds in trunk

WebCore:

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

Reviewed by Dave Hyatt.

http://bugzilla.opendarwin.org/show_bug.cgi?id=8688
file URLs aren't being serialized correctly when using window.location


  • platform/KURL.cpp: (KURL::prettyURL): Append "" for file URLs.

LayoutTests:

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

Reviewed by Dave Hyatt.

Test case for http://bugzilla.opendarwin.org/show_bug.cgi?id=8688
file URLs aren't being serialized correctly when using window.location


  • fast/js/window-location-href-file-urls-expected.txt: Added.
  • fast/js/window-location-href-file-urls.html: Added.

May 1, 2006:

5:49 PM Changeset in webkit [14154] by thatcher
  • 4 edits in branches/Safari-2-0-branch

JavaScriptCore:

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

2006-05-01 Tim Omernick <timo@apple.com>

Reviewed by Tim Hatcher.

<rdar://problem/4476875> Support printing for embedded Netscape plugins

  • bindings/npapi.h: Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X and Mac OS X systems, as this is what plugins expect.

WebKit:

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

2006-04-20 Tim Omernick <timo@apple.com>

Reviewed by John Sullivan.

<rdar://problem/4476875> Support printing for embedded Netscape plugins

NOTE: This only works with the Flash plugin right now. It appears that the other
major plugins either have awful printing support, or no printing support. If someone
can find an example of any other embedded Netscape plugin printing in any browser on
the Mac, I will be happy to eat my own words!

  • Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView drawRect:]): When printing, get the printed bitmap via -_printedPluginBitmap, and draw it into the plugin view. (-[WebBaseNetscapePluginView _printedPluginBitmap]): Call NPP_Print on the plugin to render it into a GWorld. This GWorld has the same underlying buffer as an NSBitmapImageRep, which is returned to the caller.
5:48 PM Changeset in webkit [14153] by tomernic
  • 2 edits in trunk/JavaScriptCore

Reviewed by Tim Hatcher.

<rdar://problem/4476875> Support printing for embedded Netscape plugins

  • bindings/npapi.h: Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X and Mac OS X systems, as this is what plugins expect.
5:08 PM Changeset in webkit [14152] by thatcher
  • 4 edits in branches/Safari-2-0-branch/WebKit

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

2006-03-13 Tim Omernick <timo@apple.com>

Reviewed by Maciej.

<rdar://problem/4476873> Support printing for plugin documents (not embedded plugins)

  • WebView.subproj/WebFrameViewPrivate.h:
  • WebView.subproj/WebFrameView.m: (-[WebFrameView documentViewShouldHandlePrint]): Called by the host application before it initializes and runs a print operation. If NO is returned, the host application will abort its print operation and call -printDocumentView on the WebFrameView. The document view is then expected to run its own print operation. If YES is returned, the host application's print operation will continue as normal. (-[WebFrameView printDocumentView]): Called by the host application when the WebFrameView returns YES from -documentViewShouldHandlePrint.
  • Plugins.subproj/WebNetscapePluginDocumentView.m: (-[WebNetscapePluginDocumentView documentViewShouldHandlePrint]): Allow the plugin to take over printing if it defines an NPP_Print function (-[WebNetscapePluginDocumentView printDocumentView]): Print the plugin document.
4:48 PM Changeset in webkit [14151] by thatcher
  • 2 edits in branches/Safari-2-0-branch/WebCore

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

2006-01-02 Vicki Murley <vicki@apple.com>

Reviewed by Maciej.


  • fix for <rdar://problem/4389622> *Pan EU2* iframe swallows events for overlapping elements (part 2)


We originally added a call to passSubframeEventToSubframe here to fix the hand cursor updating problem
reported in <rdar://problem/4316201> REGRESSION: cursor and text in status bar is not updated when
mousing over links in a frame (5509). However, when we return early after passSubframeEventToSubframe,
we fail to fire onmouseout events. Since the call to passSubframeEventToSubframe was originally added
to fix the hand cursor updating problem, remove the early return and make cursor updating conditional
on passSubframeEventToSubframe.

  • khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent):
4:07 PM Changeset in webkit [14150] by thatcher
  • 4 edits in branches/Safari-2-0-branch/JavaScriptCore

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

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

Reviewed by ggaren.

Fix "new Function()" to correctly use lexical scoping.
Add ScopeChain::print() function for debugging.
<rdar://problem/4067864> REGRESSION (125-407): JavaScript failure on PeopleSoft REN Server

  • kjs/function_object.cpp: (FunctionObjectImp::construct):
  • kjs/scope_chain.cpp: (KJS::ScopeChain::print):
  • kjs/scope_chain.h:
4:02 PM Changeset in webkit [14149] by hyatt
  • 12 edits in trunk/WebCore

Convert WebTextRenderer to be a C++ class. Change the factory so
that it uses pointer-based hashmaps instead of NSMutableDictionaries.
Convert uses of malloc/free to new/delete so that they start using
the fastMalloc/fastFree code.

Reviewed by darin

  • bridge/mac/WebCoreStringTruncator.mm: (stringWidth): (truncateString):
  • kwq/KWQComboBox.mm: (QComboBox::sizeHint):
  • kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
  • kwq/KWQListBox.mm: (itemTextRenderer): (groupLabelTextRenderer): (QListBox::sizeForNumberOfLines): (QListBox::clearCachedTextRenderers): (-[KWQTableView drawRow:clipRect:]):
  • platform/FontDataSet.h:
  • platform/mac/FontMac.mm: (WebCore::FontDataSet::~FontDataSet): (WebCore::FontDataSet::getRenderer): (WebCore::FontDataSet::invalidate): (WebCore::Font::ascent): (WebCore::Font::descent): (WebCore::Font::lineSpacing): (WebCore::Font::xHeight): (WebCore::Font::selectionRectForText): (WebCore::Font::drawText): (WebCore::Font::drawHighlightForText): (WebCore::Font::drawLineForText): (WebCore::Font::drawLineForMisspelling): (WebCore::Font::misspellingLineThickness): (WebCore::Font::floatWidth): (WebCore::Font::checkSelectionPoint):
  • platform/mac/WebCoreTextRenderer.mm: (WebCoreDrawTextAtPoint): (WebCoreTextFloatWidth): (WebCoreSetAlwaysUseATSU):
  • platform/mac/WebTextRenderer.h: (WebCore::WebTextRenderer::ascent): (WebCore::WebTextRenderer::descent): (WebCore::WebTextRenderer::lineSpacing): (WebCore::WebTextRenderer::lineGap): (WebCore::WebTextRenderer::misspellingLineThickness): (WebCore::WebTextRenderer::misspellingLinePatternWidth): (WebCore::WebTextRenderer::misspellingLinePatternGapWidth):
  • platform/mac/WebTextRenderer.mm: (WebCore::WebCoreInitializeFont): (WebCore::WebCoreInitializeTextRun): (WebCore::WebCoreInitializeEmptyTextStyle): (WebCore::WebCoreInitializeEmptyTextGeometry): (WebCore::widthForGlyph): (WebCore::overrideLayoutOperation): (WebCore::m_ATSUMirrors): (WebCore::WebTextRenderer::~WebTextRenderer): (WebCore::WebTextRenderer::xHeight): (WebCore::WebTextRenderer::drawRun): (WebCore::WebTextRenderer::floatWidthForRun): (WebCore::WebTextRenderer::drawLineForCharacters): (WebCore::WebTextRenderer::selectionRectForRun): (WebCore::WebTextRenderer::drawHighlightForRun): (WebCore::WebTextRenderer::drawLineForMisspelling): (WebCore::WebTextRenderer::pointToOffset): (WebCore::WebTextRenderer::setAlwaysUseATSU): (WebCore::getSmallCapsRenderer): (WebCore::findSubstituteFont): (WebCore::rendererForAlternateFont): (WebCore::computeWidthForSpace): (WebCore::setUpFont): (WebCore::CG_selectionRect): (WebCore::CG_draw): (WebCore::updateGlyphMapEntry): (WebCore::extendGlyphMap): (WebCore::extendWidthMap): (WebCore::initializeATSUStyle): (WebCore::createATSULayoutParameters): (WebCore::disposeATSULayoutParameters): (WebCore::addDirectionalOverride): (WebCore::ATSU_selectionRect): (WebCore::ATSU_draw): (WebCore::ATSU_pointToOffset): (WebCore::freeWidthMap): (WebCore::freeGlyphMap): (WebCore::glyphForCharacter): (WebCore::advanceWidthIterator):
  • platform/mac/WebTextRendererFactory.h:
  • platform/mac/WebTextRendererFactory.mm: (-[WebTextRendererFactory clearCaches]): (-[WebTextRendererFactory init]): (-[WebTextRendererFactory dealloc]): (-[WebTextRendererFactory rendererWithFont:]):
3:54 PM Changeset in webkit [14148] by thatcher
  • 19 edits in branches/Safari-2-0-branch

JavaScriptCore:

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

2006-03-29 Geoffrey Garen <ggaren@apple.com>

Reviewed by Darin.

  • JavaScriptCore side of fix for <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file

The crash was a result of threaded deallocation of thread-unsafe
objects. Pure JS objects are thread-safe because all JS execution
is synchronized through JSLock. However, JS objects that wrap WebCore
objects are thread-unsafe because JS and WebCore execution are not
synchronized. That unsafety comes into play when the collector
deallocates a JS object that wraps a WebCore object, thus causing the
WebCore object to be deallocated.

The solution here is to have each JSCell know whether it is safe to
collect on a non-main thread, and to avoid collecting unsafe cells
when on a non-main thread.

We don't have a way to test PAC files yet, so there's no test
attached to this patch.

  • kjs/collector.cpp: (KJS::Collector::collect):
(1) Added the test "currentThreadIsMainThread

imp->m_destructorIsThreadSafe".

  • kjs/protect.h: (KJS::gcProtectNullTolerant): (KJS::gcUnprotectNullTolerant):
  • kjs/value.h: (KJS::JSCell::JSCell): The bools here must be bitfields, otherwise m_destructorIsThreadSafe becomes another whole word, ruining the collector optimizations we've made based on the size of a JSObject.
  • kxmlcore/FastMalloc.cpp: (KXMLCore::currentThreadIsMainThread): (KXMLCore::fastMallocRegisterThread):
  • kxmlcore/FastMalloc.h:

WebCore:

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

2006-03-29 Geoffrey Garen <ggaren@apple.com>

Reviewed by Darin.

  • WebCore side of fix for <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file

(1) To ensure thread-safe deallocation, set the "unsafe to destroy on
non-main threads" bit in the DOMObject constructor.

(2) Made all binding objects inherit from DOMObject, because the
WebCore data structures they wrap are not thread-safe. "DOMObject" is
a slightly awkward name for things like the Window object, but the
DOM spec is considering adding a Window object, and creating a whole
new base class for this purpose seemed like overkill.

  • khtml/ecma/JSDOMParser.h:
  • khtml/ecma/JSXMLHttpRequest.h:
  • khtml/ecma/JSXMLSerializer.cpp: (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
  • khtml/ecma/JSXMLSerializer.h:
  • khtml/ecma/JSXSLTProcessor.h:
  • khtml/ecma/kjs_binding.h: (KJS::DOMObject::DOMObject): Unset the "safe to collect on non-main threads bit" to ensure thread-safe deallocation.
  • khtml/ecma/kjs_html.h:
  • khtml/ecma/kjs_navigator.cpp: (KJS::Navigator::Navigator): (KJS::PluginBase::PluginBase):
  • khtml/ecma/kjs_navigator.h:
  • khtml/ecma/kjs_proxy.cpp:
  • khtml/ecma/kjs_window.cpp: (KJS::History::History): (KJS::FrameArray::FrameArray): (KJS::Screen::Screen): (KJS::Window::Window): (KJS::BarInfo::BarInfo):
  • khtml/ecma/kjs_window.h:
3:46 PM Changeset in webkit [14147] by eseidel
  • 2 edits in branches/Safari-2-0-branch/WebCore

kwq/KWQKURL.mm

3:28 PM Changeset in webkit [14146] by sfalken
  • 1 edit in trunk/WebKitWin/WebFramePrivate.cpp

2006-05-01 Steve Falkenburg <sfalken@apple.com>

Reviewed by eric.


Fix missing line ending.

  • WebFramePrivate.cpp:
3:21 PM Changeset in webkit [14145] by sfalken
  • 5 edits
    4 deletes in trunk/WebKitTools

2006-05-01 Steve Falkenburg <sfalken@apple.com>

Reviewed by eric.

Spinneret now links against the new separate lib.
Removed WebFrame, WebView.


  • Spinneret/Spinneret.sln:
  • Spinneret/Spinneret/Spinneret.cpp: (SpinneretWebHost::updateLocationBar): (_tWinMain):
  • Spinneret/Spinneret/Spinneret.h:
  • Spinneret/Spinneret/Spinneret.vcproj:
  • Spinneret/Spinneret/WebFrame.cpp: Removed.
  • Spinneret/Spinneret/WebFrame.h: Removed.
  • Spinneret/Spinneret/WebView.cpp: Removed.
  • Spinneret/Spinneret/WebView.h: Removed.
3:10 PM Changeset in webkit [14144] by sfalken
  • 4 copies
    11 adds in trunk/WebKitWin

2006-05-01 Steve Falkenburg <sfalken@microsoft.com>

Reviewed by eric.

Moved WebKit-like code from Spinnaret into WebKitWin.


  • .: Added.
  • WebFrame.cpp: Added. (WebKit::WebFrame::createWebFrame): Factory to create web frames.
  • WebFramePrivate.cpp: Added. (WebKit::WebFramePrivate::WebFrameData::WebFrameData): (WebKit::WebFramePrivate::WebFrameData::~WebFrameData): (WebKit::WebFramePrivate::WebFramePrivate): (WebKit::WebFramePrivate::~WebFramePrivate): (WebKit::WebFramePrivate::loadFilePath): (WebKit::WebFramePrivate::loadHTMLString): (WebKit::WebFramePrivate::openURL): (WebKit::WebFramePrivate::submitForm): (WebKit::WebFramePrivate::loadURL): (WebKit::WebFramePrivate::getURL): (WebKit::WebFramePrivate::reload): (WebKit::WebFramePrivate::receivedData): (WebKit::WebFramePrivate::receivedAllData): (WebKit::WebFramePrivate::paint): (WebKit::WebFramePrivate::impl): (WebKit::WebFramePrivate::toPrivate):
  • WebFramePrivate.h: Added.
  • WebKitWin.vcproj: Added.
  • WebKitWin.vcproj/WebKitWin: Added.
  • WebKitWin.vcproj/WebKitWin.sln: Added.
  • WebKitWin.vcproj/WebKitWin/WebKitWin.vcproj: Added.
  • WebKitWin.vcproj/WebKitWin/stdafx.cpp: Added.
  • WebKitWin.vcproj/WebKitWin/stdafx.h: Added.
  • WebView.cpp: Added. (WebKit::WebView::createWebView): (WebKit::WebView::WebView): (WebKit::WebView::mouseMoved): (WebKit::WebView::mouseDown): (WebKit::WebView::mouseUp): (WebKit::WebView::mouseDoubleClick): (WebKit::WebView::keyPress): (WebKit::WebViewWndProc):
  • public: Added.
  • public/WebFrame.h: Added.
  • public/WebHost.h: Added.
  • public/WebView.h: Added.
2:43 PM Changeset in webkit [14143] by justing
  • 4 edits
    16 adds in trunk

LayoutTests:

Reviewed by darin


<http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
Remove a use of hasMoreThanOneBlock

Deleting didn't merge because of code that stopped the merge whenever
the end of the selection to delete was in a fully selected line.

  • editing/deleting/merge-endOfParagraph-expected.checksum: Added.
  • editing/deleting/merge-endOfParagraph-expected.png: Added.
  • editing/deleting/merge-endOfParagraph-expected.txt: Added.
  • editing/deleting/merge-endOfParagraph.html: Added.


Two testcases where paste did not request a merge from deletion, but should have.

  • editing/pasteboard/merge-after-delete-1-expected.checksum: Added.
  • editing/pasteboard/merge-after-delete-1-expected.png: Added.
  • editing/pasteboard/merge-after-delete-1-expected.txt: Added.
  • editing/pasteboard/merge-after-delete-1.html: Added.
  • editing/pasteboard/merge-after-delete-2-expected.checksum: Added.
  • editing/pasteboard/merge-after-delete-2-expected.png: Added.
  • editing/pasteboard/merge-after-delete-2-expected.txt: Added.
  • editing/pasteboard/merge-after-delete-2.html: Added.


Code that prevents nesting incoming blocks in the block being pasted into
could reverse the order of pasted paragraphs.

  • editing/pasteboard/prevent-block-nesting-01-expected.checksum: Added.
  • editing/pasteboard/prevent-block-nesting-01-expected.png: Added.
  • editing/pasteboard/prevent-block-nesting-01-expected.txt: Added.
  • editing/pasteboard/prevent-block-nesting-01.html: Added.

WebCore:

Reviewed by darin


<http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
Remove a use of hasMoreThanOneBlock, which uses info from the test rendering.

  • editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializePositionData): Removed code that stopped the merge if the end of the selection to delete was in a fully selected line, which was nonsense.


(WebCore::DeleteSelectionCommand::mergeParagraphs):
Deletion does a bad job of updating the endpoints of the selection as it removes
content. If the endpoints have been flip flipped, bail.
If deletion has removed everything from the block that contained the
start of the selection to delete, we can't create a visible position inside
that block to serve as a destination for the merge. So, we insert a placeholder
at that position to prop the block open to let content in.


  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Added an assert and two early returns for cases where we'll crash. Removed a use of !fragment.hasMoreThanOneBlock, which uses test rendering info and which was wrong. If we've already inserted content during the start merge, insertionPos will be the position just after that content, so inserting new content before insertionPos will reverse its order.
2:24 PM Changeset in webkit [14142] by tomernic
  • 3 edits
    2 adds in trunk

WebCore:

Reviewed by Darin.

  • manual-tests/plugin-controller-datasource.html: Added.
  • manual-tests/resources/orange.mov: Added.

WebKit:

Reviewed by Darin.

  • WebView/WebHTMLView.m:

(-[WebHTMLView setDataSource:]): Set the pluginController's dataSource.

1:58 PM Changeset in webkit [14141] by thatcher
  • 2 edits in trunk/JavaScriptCore

Reviewed by Maciej.


<rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file

The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread

imp->m_destructorIsThreadSafe" where we collect oversized cells.

We don't have a way to test PAC files yet, so there's no test attached.

  • kjs/collector.cpp: (KJS::Collector::collect): test the thread when we collect oversized cells
1:49 PM Changeset in webkit [14140] by tomernic
  • 2 edits in trunk/JavaScriptCore

Reviewed by Adele.

<rdar://problem/4526114> REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions

  • kxmlcore/Assertions.cpp: Changed sense of strstr("%@") check. I already made the same fix to the WebBrowser assertions.
12:20 PM Changeset in webkit [14139] by thatcher
  • 3 edits in branches/Safari-2-0-branch/WebCore

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

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

Reviewed by mjs.

Speculative fix for our 7th worst crasher.
Also added ASSERTs to help us better understand the issue.
<rdar://problem/4153404> CrashTracer: 2412 crashes in Safari at com.apple.WebCore: khtml::RenderStyle::RenderStyle[unified] + 44

  • dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::setInPageCache):
  • dom/Document.h:
  • dom/Element.cpp: (WebCore::Element::recalcStyle):
11:25 AM Changeset in webkit [14138] by thatcher
  • 1 copy in tags/JavaScriptGlue-418/JavaScriptGlue

Tag for JavaScriptGlue 418 (part 2 of 2.)

11:25 AM Changeset in webkit [14137] by thatcher
  • 1 add in tags/JavaScriptGlue-418

Tag for JavaScriptGlue 418 (part 1 of 2.)

11:25 AM Changeset in webkit [14136] by thatcher
  • 1 copy in tags/JavaScriptCore-418/JavaScriptCore

Tag for JavaScriptCore 418 (part 2 of 2.)

11:25 AM Changeset in webkit [14135] by thatcher
  • 1 add in tags/JavaScriptCore-418

Tag for JavaScriptCore 418 (part 1 of 2.)

11:24 AM Changeset in webkit [14134] by thatcher
  • 1 copy in tags/WebKit-418.1/WebKit

Tag for WebKit 418.1 (part 2 of 2.)

11:24 AM Changeset in webkit [14133] by thatcher
  • 1 add in tags/WebKit-418.1

Tag for WebKit 418.1 (part 1 of 2.)

11:23 AM Changeset in webkit [14132] by thatcher
  • 1 move in tags/WebCore-418

Wrong tag name.

11:21 AM Changeset in webkit [14131] by thatcher
  • 1 copy in tags/WebCore-418.4/WebCore

Tag for WebCore 418.4 (part 2 of 2.)

11:21 AM Changeset in webkit [14130] by thatcher
  • 1 add in tags/WebCore-418.4

Tag for WebCore 418.4 (part 1 of 2.)

11:10 AM Changeset in webkit [14129] by mjs
  • 2 edits in trunk/WebKit
  • fix build
  • WebKit.exp: Add symbol that the new Safari will need.
10:59 AM Changeset in webkit [14128] by thatcher
  • 8 edits in branches/Safari-2-0-branch

Versioning.

8:17 AM Changeset in webkit [14127] by sullivan
  • 4 edits in trunk/WebKit

Reviewed by Tim Omernick.


  • fixed <rdar://problem/3126419> history load enforces history limit, but deletes the newest instead of oldest items
  • added notification reporting items discarded during load because the age limit or item count limit is exceeded
  • a few other minor tweaks
  • History/WebHistory.h: fixed a typo and an incorrect method name


  • History/WebHistoryPrivate.h: Added declaration of WebHistoryItemsDiscardedWhileLoadingNotification. Also changed signature of WebHistoryPrivate method -loadFromURL:error: to have new collectDiscardedItemsInto: parameter. Also deleted declarations of two methods that didn't actually exist (loadHistory and initWithFile:), and added comments about which methods should become public API, WebKit-internal, or file-internal.
  • History/WebHistory.m: (-[WebHistoryPrivate arrayRepresentation]): This method, called only by _saveHistoryGuts:, used to deliberately leave out items that violated either the age limit or the item count limit. Now all the items are included (and thus saved), and all the pruning is done at load time, so clients can keep track of the pruned items by observing the new WebHistoryItemsDiscardedWhileLoadingNotification (-[WebHistoryPrivate _loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): Now keeps track of all the items that violated the age limit or item count limit in the new collectedDiscardedItemsInto: parameter. Also, now processes items in forward order rather than reverse order to fix 3126419. Now uses compare: rather than _webkit_compareDay: to check against age limit; this is faster and also more correct (most noticeable with small age limits). (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): new collectDiscardedItemsInto: parameter, passed into _loadHistoryGuts:... (-[WebHistory loadFromURL:error:]): Now sends new WebHistoryItemsDiscardedWhileLoadingNotification if any items were discarded due to age limit or item count limit.


  • WebKit.exp: exported symbol for WebHistoryItemsDiscardedWhileLoadingNotification
1:34 AM Changeset in webkit [14126] by eseidel
  • 4 edits in trunk

2006-04-30 Rob Buis <buis@kde.org>

Reviewed by eseidel. Landed by eseidel.

Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8651:
CGContextSetLineDash: invalid dash array: emmited during WebKit tests

Properly discard invalid stroke-dasharray properties like in
invalid-css.svg. (Tests updated.)

  • ksvg2/css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGStrokeDasharray):

Apr 29, 2006:

1:19 PM Changeset in webkit [14125] by thatcher
  • 2 edits in trunk/WebKit

Reviewed by Maciej.

Bug 8577: [TabBarView _web_superviewOfClass:stoppingAtClass:]
http://bugzilla.opendarwin.org/show_bug.cgi?id=8577

Added back _web_superviewOfClass:stoppingAtClass:.
This method was removed in r14032 (bug 8562), but Safari 2.0 still uses it.
We should remove this method once Open Source users have a new version
to use with TOT WebKit.

  • Misc/WebNSViewExtras.m: (-[NSView _web_superviewOfClass:stoppingAtClass:]):
Note: See TracTimeline for information about the timeline view.