Timeline



Dec 27, 2008:

6:54 PM Changeset in webkit [39487] by mrowe@apple.com
  • 13 edits
    1 add in trunk/JavaScriptCore

<rdar://problem/6467376> Race condition in WTF::currentThread can lead to a thread using two different identifiers during its lifetime

If a newly-created thread calls WTF::currentThread() before WTF::createThread calls establishIdentifierForPthreadHandle
then more than one identifier will be used for the same thread. We can avoid this by adding some extra synchronization
during thread creation that delays the execution of the thread function until the thread identifier has been set up, and
an assertion to catch this problem should it reappear in the future.

Reviewed by Alexey Proskuryakov.

  • wtf/Threading.cpp: Added.

(WTF::NewThreadContext::NewThreadContext):
(WTF::threadEntryPoint):
(WTF::createThread): Add cross-platform createThread function that delays the execution of the thread function until
after the thread identifier has been set up.

  • wtf/Threading.h:
  • wtf/ThreadingGtk.cpp:

(WTF::establishIdentifierForThread):
(WTF::createThreadInternal):

  • wtf/ThreadingNone.cpp:

(WTF::createThreadInternal):

  • wtf/ThreadingPthreads.cpp:

(WTF::establishIdentifierForPthreadHandle):
(WTF::createThreadInternal):

  • wtf/ThreadingQt.cpp:

(WTF::identifierByQthreadHandle):
(WTF::establishIdentifierForThread):
(WTF::createThreadInternal):

  • wtf/ThreadingWin.cpp:

(WTF::storeThreadHandleByIdentifier):
(WTF::createThreadInternal):

Add Threading.cpp to the build.

12:30 AM Changeset in webkit [39486] by ap@webkit.org
  • 2 edits in trunk/LayoutTests

Suggested by Dave Levin.

https://bugs.webkit.org/show_bug.cgi?id=22950

Another attempt to fix the failing XHR tests on Tiger buildbot: make file_put_contents
portable implementation return a result.

  • http/tests/xmlhttprequest/resources/portabilityLayer.php:

Dec 26, 2008:

1:31 PM Changeset in webkit [39485] by ap@webkit.org
  • 2 edits in trunk/LayoutTests

2008-12-26 David Levin <levin@chromium.org>

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=22950

Remove ensureTrailingSlash from appcache test.

  • http/tests/appcache/resources/fail-on-update.php:
1:19 PM Changeset in webkit [39484] by Antti Koivisto
  • 2 edits in trunk/WebCore

2008-12-26 Zalan Bujtas <zbujtas@gmail.com>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=22999
Check if database thread exists.

  • storage/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::markAsDeletedAndClose): (WebCore::Database::tableNames):
1:01 PM Changeset in webkit [39483] by weinig@apple.com
  • 2 edits in trunk/JavaScriptCore

2008-12-26 Sam Weinig <sam@webkit.org>

Reviewed by Alexey Proskuryakov.

Remove unused method.

  • runtime/Structure.h: Remove mutableTypeInfo.
12:00 PM Changeset in webkit [39482] by ap@webkit.org
  • 6 edits in trunk/LayoutTests

2008-12-26 David Levin <levin@chromium.org>

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=22950

Attempt to fix the failiing XHR tests on tiger buildbot.
Remove the no longer needed ensureTrailingSlash function.

  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-invalidation.php:
  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-timeout.php:
  • http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache.php:
  • http/tests/xmlhttprequest/resources/portabilityLayer.php: Make sys_get_temp_dir() return "/tmp" when it can't find the temp directory through other means.
  • http/tests/xmlhttprequest/resources/reset-temp-file.php:
11:54 AM Changeset in webkit [39481] by mitz@apple.com
  • 2 edits in trunk/WebKit/mac

Reviewed by Sam Weinig.

  • fix <rdar://problem/6467608> lastVisitWasFailure flag persists in global history after a successful visit
  • History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always update the wasFailure flag on the HistoryItem.
11:05 AM Changeset in webkit [39480] by ap@webkit.org
  • 2 edits in trunk/LayoutTests

Reviewed by Anders Carlsson.

Fix a layout test that was broken by the previous appcache commit
(it only passed every other time as a result).

  • http/tests/appcache/fail-on-update.html:
10:59 AM Changeset in webkit [39479] by Simon Fraser
  • 5 edits in trunk/LayoutTests

2008-12-26 Simon Fraser <Simon Fraser>

https://bugs.webkit.org/show_bug.cgi?id=22981

Update more svg-as-image test results affected by the fix
for SVGImage drawing.

  • platform/mac/fast/borders/svg-as-border-image-2-expected.checksum:
  • platform/mac/fast/borders/svg-as-border-image-2-expected.png:
  • platform/mac/fast/borders/svg-as-border-image-expected.checksum:
  • platform/mac/fast/borders/svg-as-border-image-expected.png:
10:52 AM Changeset in webkit [39478] by ap@webkit.org
  • 3 edits
    3 adds in trunk

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=23001
A call to applicationCache.update() from a cached event listener should be ignored

Test: http/tests/appcache/idempotent-update.html

  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after dispatching events.
9:40 AM Changeset in webkit [39477] by ap@webkit.org
  • 4 edits
    16 adds in trunk

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=22997
ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()

Tests: http/tests/appcache/top-frame-1.html

http/tests/appcache/top-frame-2.html
http/tests/appcache/top-frame-3.html
http/tests/appcache/top-frame-4.html

  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest): Fixed one more instance of top level frame being used for caching purposes.
3:03 AM Changeset in webkit [39476] by ap@webkit.org
  • 3 edits in trunk/LayoutTests

2008-12-26 David Levin <levin@chromium.org>

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=22950
Added more logging to reset-temp-file to help expose potential issues that could cause test failures (on the tiger buildbot).

If there are issues in reset-temp-file, they are printed from the test access-control-basic-allow-preflight-cache.html

  • http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html:
  • http/tests/xmlhttprequest/resources/reset-temp-file.php:
12:46 AM Changeset in webkit [39475] by ap@webkit.org
  • 2 edits in trunk/WebCore

2008-12-26 Dmitry Titov <dimich@chromium.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=22987
Fix for broken test editing/execCommand/5763082.html

  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto function parameter across multiple calls.

Dec 25, 2008:

1:12 PM Changeset in webkit [39474] by ap@webkit.org
  • 7 edits
    5 adds in trunk

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=22993
Application cache shouldn't be inherited by subframes

<rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
This crash happened because main resource for subframe was looked up in top frame's
appcache. If not for the spec change, it could have been fixed by preventing the load
altogether.

Test: http/tests/appcache/foreign-iframe-main.html
I intend to write additional tests for the behavior change.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
  • loader/DocumentLoader.h: (WebCore::DocumentLoader::applicationCache):
  • loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::load):
  • loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::associatedCache): Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL): Removed checks for the frame being top-level one, now that subframes are cached independently.
6:18 AM Changeset in webkit [39473] by Antti Koivisto
  • 6 edits in trunk/WebCore

2008-12-25 Antti Koivisto <Antti Koivisto>

Reviewed by Oliver Hunt.

<rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient


Disallow turning resources that are being revalidated to purgable state.


No test, the condition is difficult to produce in DRT.

  • loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::allClientsRemoved):
  • loader/CachedImage.cpp: (WebCore::CachedImage::destroyDecodedData):
  • loader/CachedResource.cpp: (WebCore::CachedResource::isSafeToMakePurgeable): (WebCore::CachedResource::makePurgeable):
  • loader/CachedResource.h:
  • loader/CachedScript.cpp: (WebCore::CachedScript::destroyDecodedData):
2:55 AM Changeset in webkit [39472] by ap@webkit.org
  • 2 edits in trunk/WebCore

Qt build fix.

  • WebCore.pro: Added ThreadGlobalData.cpp.

Dec 24, 2008:

9:26 PM Changeset in webkit [39471] by mrowe@apple.com
  • 3 edits in trunk/WebKitTools

Move the guts of determineCurrentSVNRevision to VCSUtils as svnRevisionForDirectory,
and make it work for git too.

Reviewed by Timothy Hatcher.

  • Scripts/VCSUtils.pm:
  • Scripts/webkitdirs.pm:
4:42 PM Changeset in webkit [39470] by mrowe@apple.com
  • 2 edits in trunk/WebCore

Build fix.

  • WebCore.base.exp: Remove a symbol from the export file now that it is no longer generated.
1:39 PM Changeset in webkit [39469] by Simon Fraser
  • 7 edits in trunk/LayoutTests

2008-12-24 Simon Fraser <Simon Fraser>

Reviewed by Oliver Hunt

https://bugs.webkit.org/show_bug.cgi?id=21910

Update more svg-as-image test results affected by the fix
for SVGImage drawing.

  • platform/mac/fast/images/svg-as-background-expected.checksum:
  • platform/mac/fast/images/svg-as-background-expected.png:
  • platform/mac/fast/images/svg-as-image-expected.checksum:
  • platform/mac/fast/images/svg-as-image-expected.png:
  • platform/mac/fast/images/svg-as-relative-image-expected.checksum:
  • platform/mac/fast/images/svg-as-relative-image-expected.png:
  • transforms/2d/compound-transforms-vs-containers.html:
10:08 AM Changeset in webkit [39468] by ap@webkit.org
  • 1 edit in trunk/LayoutTests/ChangeLog

Fix a typo in ChangeLog.

10:06 AM Changeset in webkit [39467] by ap@webkit.org
  • 3 edits
    2 moves in trunk/LayoutTests

Reviewed by Dan Bernstein.

https://bugs.webkit.org/show_bug.cgi?id=22982
http/tests/navigation/post-goback-repost-policy.html fails on Tiger

Change resources that are accessed with POST form .html to .php. I don't know why Apache 2.0
had no problem with this.

  • http/tests/navigation/post-goback-repost-policy.html:
  • http/tests/navigation/resources/goback-with-policydelegate.html: Removed.
  • http/tests/navigation/resources/goback-with-policydelegate.php: Copied from LayoutTests/http/tests/navigation/resources/goback-with-policydelegate.html.
  • http/tests/navigation/resources/post-target-policy-test.html: Removed.
  • http/tests/navigation/resources/post-target-policy-test.php: Copied from LayoutTests/http/tests/navigation/resources/post-target-policy-test.html.
4:44 AM Changeset in webkit [39466] by zecke@webkit.org
  • 2 edits in trunk/WebCore

Unreviewed build fix to find addSubresourceURL

This is needed to compile on WebKit/Gtk+

Dec 23, 2008:

11:46 PM Changeset in webkit [39465] by ap@webkit.org
  • 17 edits
    2 adds in trunk/WebCore

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=22980
WebCore uses more thread specific keys than it really needs

Consolidated ThreadSpecific data into a single ThreadGlobalData structure.

10:27 PM Google Summer of Code 2008 edited by ddkilzer@apple.com
(diff)
10:12 PM Changeset in webkit [39464] by mrowe@apple.com
  • 2 edits in trunk/WebCore

Build fix.

  • WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied

into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
derived sources are generated.

9:23 PM Changeset in webkit [39463] by Simon Fraser
  • 5 edits
    4 adds in trunk

2008-12-23 Simon Fraser <Simon Fraser>

Reviewed by Dan Bernstein

https://bugs.webkit.org/show_bug.cgi?id=22941

If the document element has opacity, we need to erase the view background to
white before painting.

Test: fast/backgrounds/opacity-on-document-element.html

  • rendering/RenderView.cpp: (WebCore::rendererObscuresBackground):
9:19 PM Changeset in webkit [39462] by Simon Fraser
  • 17 edits in trunk

2008-12-23 Simon Fraser <Simon Fraser>

Reviewed by Dan Bernstein

https://bugs.webkit.org/show_bug.cgi?id=21910

Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
Otherwise the FrameView is left at 0x0, and nothing paints.

  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw):
8:39 PM Changeset in webkit [39461] by mrowe@apple.com
  • 16 edits
    1 copy in tags/Safari-6528.8/WebKit

Merge r39455.

8:39 PM Changeset in webkit [39460] by mrowe@apple.com
  • 1 edit in tags/Safari-6528.8/JavaScriptCore/Configurations/JavaScriptCore.xcconfig

Disable our custom OTHER_CFLAGS until the build issues are resolved.

8:39 PM Changeset in webkit [39459] by mrowe@apple.com
  • 2 edits in tags/Safari-6528.8/WebKit/mac

Merge r39452.

7:51 PM Changeset in webkit [39458] by mrowe@apple.com
  • 4 edits in trunk

Versioning.

7:28 PM Changeset in webkit [39457] by mrowe@apple.com
  • 1 copy in tags/Safari-6528.8

New tag.

1:42 PM Changeset in webkit [39456] by Darin Adler
  • 52 edits in trunk/WebCore

2008-12-23 Darin Adler <Darin Adler>

Reviewed by John Sullivan.

  • improve robustness of undo/redo in HTML editing to fix the following bugs <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply() <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo

Major categories of improvements:

1) Added null checks.
2) Eliminated type casts without corresponding type checks.
3) Avoided possible infinite loops by building up lists of nodes to operate on

before starting to make DOM changes.

4) Use more RefPtr.

No test at this time, but test cases should follow in separate patches.

  • WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it can be used in other Private headers, specifically editing ones.
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement. (WebCore::CSSStyleSelector::locateSharedStyle): Ditto. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
  • dom/Element.cpp: (WebCore::Element::cloneElement): Added.
  • dom/Element.h: Added cloneElement and an implementation of parentElement.
  • dom/Node.h: Moved parentElement from here to Element.h and changed its implementation so it will return 0 when the parent is not an element (document, document fragment, etc.).
  • editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element. Moved assertions from doApply in here. (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked appendChild call. (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
  • editing/AppendNodeCommand.h: Updated.
  • editing/ApplyStyleCommand.cpp: (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more direct way with new instead of createElementNS. (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr. (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID. (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
  • editing/ApplyStyleCommand.h:
  • editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned. (WebCore::CompositeEditCommand::removeStyledElement): Ditto. (WebCore::CompositeEditCommand::insertNodeBefore): Ditto. (WebCore::CompositeEditCommand::insertNodeAfter): Ditto. (WebCore::CompositeEditCommand::insertNodeAt): Ditto. (WebCore::CompositeEditCommand::appendNode): Ditto. (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to make the list of children in case removing them has side effects. (WebCore::CompositeEditCommand::removeNode): Ditto. (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto. (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto. (WebCore::CompositeEditCommand::splitTextNode): Ditto. (WebCore::CompositeEditCommand::splitElement): Ditto. (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto. (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto. (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto. (WebCore::CompositeEditCommand::joinTextNodes): Ditto. (WebCore::CompositeEditCommand::inputText): Ditto. (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto. (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto. (WebCore::CompositeEditCommand::replaceTextInNode): Ditto. (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto. (WebCore::CompositeEditCommand::removeCSSProperty): Ditto. (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling setNodeAttribute instead of with its own SimpleEditCommand. (WebCore::CompositeEditCommand::setNodeAttribute): Ditto. (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto. (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto. (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto. (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't bother using an undoable operation to put the break element into the paragraph element because there's no need to split them and redo this when doing undo/redo. (WebCore::CompositeEditCommand::moveParagraphs): Ditto. (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
  • editing/CompositeEditCommand.h: Ditto.
  • editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned. (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions. (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
  • editing/DeleteFromTextNodeCommand.h:
  • editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr. (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
  • editing/DeleteSelectionCommand.h:
  • editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString. (WebCore::FormatBlockCommand::doApply): Use Element.
  • editing/FormatBlockCommand.h:
  • editing/IndentOutdentCommand.cpp: (WebCore::createIndentBlockquoteElement): Use new to create the element instead of calling a function so we have a more specific type. (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): Use RefPtr and Element. (WebCore::IndentOutdentCommand::indentRegion): Ditto. (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
  • editing/IndentOutdentCommand.h:
  • editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Use unsigned. Added an assertion. (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions. (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
  • editing/InsertIntoTextNodeCommand.h:
  • editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element. (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
  • editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): Use Element.
  • editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions here from doApply. (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions. Added a null check. (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
  • editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
  • editing/JoinTextNodesCommand.cpp: (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions. Added some runtime checks. Don't store anything in m_offset. (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
  • editing/JoinTextNodesCommand.h:
  • editing/MergeIdenticalElementsCommand.cpp: (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved an assertion here from doApply. (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions. Added a null check. Changed implementation to use remove to avoid null parent issue. Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating. (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
  • editing/ModifySelectionListLevel.cpp: (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*. (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
  • editing/ModifySelectionListLevel.h:
  • editing/RemoveCSSPropertyCommand.cpp: (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and CSSPropertyID. Also renamed m_decl to m_style. (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions. (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
  • editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted. Use SetNodeAttributeCommand instead.
  • editing/RemoveNodeAttributeCommand.h: Ditto.
  • editing/RemoveNodeCommand.cpp: (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply. Don't initialize m_refChild here; rather do it in doApply. (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added checks and streamlined implementation. (WebCore::RemoveNodeCommand::doUnapply): Ditto.
  • editing/RemoveNodeCommand.h:
  • editing/RemoveNodePreservingChildrenCommand.cpp: (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
  • editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
  • editing/SetNodeAttributeCommand.cpp: (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString. Removed assertion that prevents us from using this to remove an attribute. (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions. (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
  • editing/SetNodeAttributeCommand.h:
  • editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply. (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector to avoid possible infinite loops. (WebCore::SplitElementCommand::doUnapply): Ditto.
  • editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment here from doApply. (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying. (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
  • editing/SplitTextNodeContainingElementCommand.cpp: (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
  • editing/WrapContentsInDummySpanCommand.cpp: (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures. Don't reuse the dummy span. Simplified logic. (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
  • editing/htmlediting.cpp: (WebCore::isBlock): Make sure this returns true only for elements. (WebCore::enclosingBlock): Return an Element*. (WebCore::enclosingTableCell): Ditto. (WebCore::enclosingList): Return an HTMLElement*. (WebCore::outermostEnclosingList): Return an HTMLElement*. (WebCore::createDefaultParagraphElement): Return an HTMLElement*. (WebCore::createBreakElement): Return an HTMLElement*. (WebCore::createOrderedListElement): Return an HTMLElement*. (WebCore::createUnorderedListElement): Return an HTMLElement*. (WebCore::createListItemElement): Return an HTMLElement*. (WebCore::createHTMLElement): Return an HTMLElement*.
  • editing/htmlediting.h:
  • editing/markup.cpp: (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
  • page/MouseEventWithHitTestResults.cpp: (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
1:40 PM Changeset in webkit [39455] by Darin Adler
  • 16 edits
    1 add in trunk/WebKit

WebKit:

2008-12-23 Darin Adler <Darin Adler>

Reviewed by Alexey Proskuryakov.

  • StringsNotToBeLocalized.txt: Updated.
  • WebKit.xcodeproj/project.pbxproj: Added new file WebNSObjectExtras.mm and existing file WebResourceInternal.h.

WebKit/mac:

2008-12-23 Darin Adler <Darin Adler>

Reviewed by Alexey Proskuryakov (a slightly earlier version).

  • Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
  • Misc/WebKitLogging.m: Ditto.
  • Misc/WebKitVersionChecks.h: Added a version after which we won't do the main thread workaround.
  • Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:, which performs a selector on the main thread, waits for it to complete, and then returns the value on the caller thread.
  • Misc/WebNSObjectExtras.mm: Added.
  • WebView/WebArchive.mm: (-[WebArchive init]): Added WebCoreThreadViolationCheck. (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform initialization on main thread if needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck. (-[WebArchive mainResource]): Get property on main thread if needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. (-[WebArchive subresources]): Ditto. (-[WebArchive subframeArchives]): Ditto. (-[WebArchive data]): Ditto. (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck. (-[WebArchive _coreLegacyWebArchive]): Ditto. (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread version of initWithMainResource above.
  • WebView/WebResource.mm: (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck. (-[WebResource data]): Get property on main thread if needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. (-[WebResource URL]): Ditto. (-[WebResource MIMEType]): Ditto. (-[WebResource textEncodingName]): Ditto. (-[WebResource frameName]): Ditto. (-[WebResource _ignoreWhenUnarchiving]): Ditto. (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Perform initialization on main thread if needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation. (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of getting at coreResource directly. (-[WebResource _response]): Get property on main thread if needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. (-[WebResource _stringValue]): Ditto. (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added. (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread version of _initWithData above.
  • WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND and the needMainThreadWorkaround helper function.
  • Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h file. This probably fixes clean builds.
  • WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
  • WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h, since it's not actually used.
  • WebView/WebDataSource.mm: Ditto.
  • WebView/WebHTMLRepresentation.mm: Ditto.
12:28 PM Changeset in webkit [39454] by Darin Adler
  • 3 edits in trunk/WebCore

2008-12-23 Darin Adler <Darin Adler>

Reviewed by Dan Bernstein.

  • dom/Node.h: Tweak comments and order of bits that Sam moved here last night.
  • dom/Node.cpp: Ditto.
11:01 AM Changeset in webkit [39453] by jchaffraix@webkit.org
  • 8 edits
    23 adds in trunk

WebCore:

2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin Adler.

Bug 11106: Some XMLHttpRequest URI resolving tests fail
https://bugs.webkit.org/show_bug.cgi?id=11106

Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
The previous code was using the containing DOMWindow to do so which would fail for
XMLHttpRequest object being passed between iframe.

Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html

http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
http/tests/xmlhttprequest/uri-resolution-opera-open-010.html

  • bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext to resolve the URL.
  • dom/Document.cpp: (WebCore::Document::virtualCompleteURL): Virtual method added to avoid performance hit on completeURL call.
  • dom/Document.h:
  • dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::completeURL): Non-virtual method that wrap the call to the virtual call.
  • dom/WorkerContext.cpp: (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
  • dom/WorkerContext.h:

LayoutTests:

2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Darin Adler.

Test case for bug 11106: Some XMLHttpRequest URI resolving tests fail
https://bugs.webkit.org/show_bug.cgi?id=11106

These tests are borrowed from Opera's test case suite (http://tc.labs.opera.com/apis/XMLHttpRequest).
They correspond to open/004.html - open/010.html which were previously failing.

  • http/tests/xmlhttprequest/resources/test-uri-resolution.txt: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-004-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-005-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-006-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-007-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-008-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-009-iframe.html: Added.
  • http/tests/xmlhttprequest/resources/uri-resolution-opera-open-010-iframe.html: Added.
  • http/tests/xmlhttprequest/test-uri-resolution.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-004-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-004.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-005-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-005.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-006-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-006.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-007-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-007.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-008-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-008.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-009-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-009.html: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-010-expected.txt: Added.
  • http/tests/xmlhttprequest/uri-resolution-opera-open-010.html: Added.
9:25 AM Changeset in webkit [39452] by Darin Adler
  • 2 edits in trunk/WebKit/mac

2008-12-23 Darin Adler <Darin Adler>

Reviewed by Dan Bernstein.

  • WebView/WebView.mm: (-[WebView drawsBackground]): Added comment and a null check for _private.
9:22 AM Changeset in webkit [39451] by Darin Adler
  • 3 edits in trunk/WebCore

2008-12-23 Darin Adler <Darin Adler>

Reviewed by Dan Bernstein.

  • platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext if the applier is non-null.
  • platform/graphics/cg/PathCG.cpp: (WebCore::putBytesNowhere): Added. (WebCore::createScratchContext): Changed to use a "/dev/null" type function to discard bytes rather than using a data object. This eliminates the possibility that memory will be used if someone draws into the scratch context by accident. Also moved to the top of the file; it was in a slightly strange place before. (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext if the applier is non-null. Simplify the empty path special case.
Note: See TracTimeline for information about the timeline view.