blob: 2aaa728d13fac8cd9e84278e946ff68977f4d30f [file] [log] [blame]
2009-02-26 Mark Rowe <>
Merge r41190.
2009-02-24 Sam Weinig <>
Reviewed by Geoffrey Garen.
Related to <rdar://problem/6590295>
Allow disabling javascript: urls.
* WebCore.base.exp:
* html/HTMLAnchorElement.cpp:
* loader/FrameLoader.cpp:
* page/Page.cpp:
* page/Page.h:
2009-01-28 Ada Chan <>
Merge the rest of r33579.
Reviewed by Steve Falkenburg.
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/win/CookieJarWin.cpp:
2009-01-20 Mark Rowe <>
Merge r33579.
2008-05-19 Ada Chan <>
Added CookieStorageWin.h/cpp, introducing methods to get/set the current CFHTTPCookieStorageRef.
When setting cookies-related attributes in CFURLRequest, make sure we get them from the
current CFHTTPCookieStorageRef. Also, set the cookie storage in CFURLRequest.
Reviewed by Steve Falkenburg.
* WebCore.vcproj/WebCore.vcproj:
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/win/CookieJarCFNetWin.cpp:
* platform/network/win/CookieStorageWin.cpp: Added.
* platform/network/win/CookieStorageWin.h: Added.
2009-01-19 Mark Rowe <>
Merge r33993.
2008-05-21 Beth Dakin <>
Reviewed by Anders.
Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash
beneath ResourceHandle::setDefersLoading while running fast/loader/
simultaneous-reloads-assert.html (null CFURLConnection)
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::setDefersLoading): Added simple null-
2009-01-19 Mark Rowe <>
Merge r39247.
2008-12-11 Steve Falkenburg <>
Delete the previous timer-queue timer in the main thread, just prior to scheduling a new timer.
The code previously called DeleteTimerQueueTimer in the timer callback proc.
The new technique simplifies the code, since we now create and delete timers on the
same thread, and don't access the timer queue or timer handles in the callback.
This allows us to remove some mutex use, and more importantly, it solves a race
condition that was occuring between ChangeTimerQueueTimer and DeleteTimerQueueTimer.
Since the timer callback isn't passed the timer handle, we were retrieving that handle
via a global. If the timer callback code was entered, but then a new timer was immediately
scheduled (prior to the callback acquiring the mutex and calling DeleteTimerQueueTimer),
there was a small window where the timer could be re-scheduled via ChangeTimerQueueTimer
and then immediately deleted once the already running callback acquired the mutex and
then called DeleteTimerQueueTimer. This resulted in the newly scheduled timer never firing.
Reviewed by Oliver Hunt.
* platform/win/SharedTimerWin.cpp:
(WebCore::queueTimerProc): Don't delete the timer in the callback.
(WebCore::setSharedTimerFireTime): Always delete and create the timer instead of using ChangeTimerQueueTimer.
(WebCore::stopSharedTimer): Call DeleteTimerQueueTimer directly.
2008-10-27 Mark Rowe <>
Merge r37628.
2008-10-15 Jon Honeycutt <>
Remove unneeded check of whether a Page defers loading before running it
in a modal dialog.
No test possible.
Reviewed by Tim Hatcher.
* page/Chrome.cpp:
2008-10-27 Mark Rowe <>
Merge r37897.
2008-10-27 Anders Carlsson <>
Reviewed by Kevin Decker.
<rdar://problem/6322650> Crash in fast/loader/simultaneous-reloads-assert.html
Make sure to null check the NSURLConnection object.
* platform/network/mac/
2008-10-22 Mark Rowe <>
Merge r37793.
2008-10-22 Brady Eidson <>
Reviewed by Adam Roben
<rdar://6261773> - autocomplete="off" doesn't work on Windows
Visual Studio makes a poor decision regarding the combination of enums and bitfields, such that a
statement like "m_autocomplete = Off" followed by "return m_autocomplete == Off" would return "false"
instead of the much more correct "true."
In the past we have worked around this by declaring the bitfield member as an unsigned instead
of the enum type.
For more discussion, see
* html/HTMLInputElement.h: Work around insane Visual Studio enum issue *sigh*
2008-10-21 Mark Rowe <>
Merge r37704.
2008-10-19 Dan Bernstein <>
Reviewed by Timothy Hatcher.
- lower the default button repaint frequency
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange): Changed the timer interval from
0.01 to 0.03.
2008-10-21 Mark Rowe <>
Merge r31577.
2008-04-02 Mark Rowe <>
Reviewed by Oliver Hunt.
Ensure that debug symbols are generated for x86_64 and ppc64 builds.
* Configurations/Base.xcconfig:
2008-10-13 Steve Falkenburg <>
Roll out r36884.
* platform/graphics/GraphicsContext.h:
* platform/graphics/win/GraphicsContextCGWin.cpp:
2008-10-07 Mark Rowe <>
Merge r35415.
2008-07-28 Brady Eidson <>
Reviewed by Sam Weinig
Test: security/autocomplete-cleared-on-back.html
<rdar://problem/6093281> - autocomplete="off" should work when going back
Taken care of in two ways:
1 - Listening for the page cache notification to clear the form, in cases where the page
is being restored from the page cache
2 - Not saving such form elements when doing the normal "save state" to a history item,
for cases with no page cache
* html/HTMLFormElement.cpp:
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::registerForCacheCallbackIfNeeded): Only register if the type or attribute
indicate we should.
(WebCore::HTMLInputElement::unregisterForCacheCallbackIfNeeded): Only unregister if both the type
and attribute are clear of needing registration.
* html/HTMLInputElement.h:
2008-10-07 Mark Rowe <>
Merge r35362.
2008-07-25 Brady Eidson <>
Reviewed by Sam
Test: security/set-form-autocomplete-attribute.html
Part of the fix for <rdar://problem/6093281> - Improper handling of autocomplete
The autocomplete attribute works on both <form> and <input> elements, but was not
inherited properly when someone asked an <input> if it should autocomplete.
I fixed this up based on the rules in the current WF2 spec so if the <input> element
has its own autocomplete attribute set, it will follow that but otherwise it will
inherit from its parent <form>
* WebCore.base.exp:
* html/HTMLInputElement.cpp:
* html/HTMLInputElement.h:
2008-10-06 Mark Rowe <>
Merge r33567.
2008-05-18 Darin Adler <>
Reviewed by Sam.
- fix <rdar://problem/5943569> crash due to stale ownerNode pointer
Test: fast/dom/StyleSheet/ownerNode-lifetime.html
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::mark): Added code to mark ownerNode. Includes a comment about how
it would be even better to solve this in the DOM rather than just in the JavaScript binding.
* css/StyleSheet.idl: Added CustomMarkFunction attribute.
2008-10-06 Mark Rowe <>
Merge r36108.
2008-09-04 Brady Eidson <>
Reviewed by Mitz
<rdar://problem/6180236> - Safari times out connections after 1 or 2 minutes
A 60-second default timeout was added in in an attempt
to model default NSURLRequest behavior in a cross-platform manner.
Sadly by always enforcing this 60 second timeout, WebCore was stomping over the wishes of any Webkit
client that wished to enforce a much larger default timeout using NSURLRequest API.
Additionally, upon reviewing what all other browsers do, it seems apparent that "no limit" is desirable
behavior on the web and this restores previous Safari/WebKit behavior.
It would be easy to write a layout test for this, but to be effective it would have
to run for at least 61 seconds, which seems insane until will can parallelize run-webkit-tests
* manual-tests/timeout-test.html: Added.
* manual-tests/timeout-test.php: Added.
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase): Rename the constant to "unspecifiedTimeoutInterval"
and make it UINT_MAX so platforms that do set it have an effective "no timeout." (Windows, for example)
* platform/network/mac/
(WebCore::ResourceRequest::doUpdatePlatformRequest): If the timeout for this request is
"unspecifiedTimeoutInterval", then don't bother setting the timeout using NSURLRequest API, allowing
WebKit applications to enforce their own default timeout.
2008-10-06 Mark Rowe <>
Merge r36811.
2008-09-23 Alexey Proskuryakov <>
Reviewed by Oliver Hunt, okayed by Darin Adler.
<rdar://problem/5575547> REGRESSION: ATOK has no phrase boundary on Safari/
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintCompositionUnderline): Add 2 pixel spacing between clauses.
2008-10-06 Mark Rowe <>
Merge r37008.
2008-09-27 Anders Carlsson <>
Reviewed by Sam Weinig.
Check if the plug-in is allowed to load the resource. This matches Firefox.
Test: http/tests/plugins/local-geturl-from-remote.html
* plugins/PluginView.cpp:
2008-10-04 Mark Rowe <>
Merge r35278.
2008-07-21 Mark Rowe <>
Reviewed by Sam Weinig.
<rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number.
* Configurations/Version.xcconfig:
* Info.plist:
2008-09-21 Steve Falkenburg <>
Merge r36748, r36750
2008-09-21 Steve Falkenburg <>
Removed unnecessary nested timer check.
Rubber-stamped by Dan Bernstein.
* platform/win/SharedTimerWin.cpp:
2008-09-21 Steve Falkenburg <>
Improve timer resolution on WinXP.
Removed last-chance timer. It should not be necessary.
Change timeEndPeriod timer to fire in 300ms instead of 20ms. Calling timeBeginPeriod/timeEndPeriod too often throws off accuracy.
Remove Vista checks. We now run the same code on both XP and Vista.
Call through to JSC::getCurrentUTCTimeWithMicroseconds from WebCore::currentTime.
The code previously called GetSystemTimeAsFileTime, which is always low-resolution on XP, even within timeBeginPeriod(1).
Reviewed by Maciej Stachowiak.
* platform/win/SharedTimerWin.cpp:
* platform/win/SystemTimeWin.cpp:
2008-09-21 Mark Rowe <>
Merge r35182.
2008-07-15 Adam Roben <>
WebCore part of adding WebKit[Set]ShouldUseFontSmoothing functions
Reviewed by John Sullivan.
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs): Pass the result of
WebCoreShouldUseFontSmoothing() into wkSetFontSmoothingStyle.
* platform/win/WebCoreTextRenderer.cpp:
* platform/win/WebCoreTextRenderer.h:
2008-09-14 Mark Rowe <>
Merge r35950.
2008-08-27 Timothy Hatcher <>
Add support for support for -webkit-appearance: default-button on the Mac platform.
Reviewed by Dave Hyatt.
* WebCore.base.exp: Export new symbols.
* platform/mac/WebCoreSystemInterface.h: Add wkAdvanceDefaultButtonPulseAnimation.
* platform/mac/ Ditto.
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Remove #if PLATFORM(WIN).
(WebCore::RenderButton::setStyle): Ditto.
* rendering/RenderButton.h: Ditto.
* rendering/
(WebCore::RenderThemeMac::adjustRepaintRect): Add a case for DefaultButtonAppearance.
(WebCore::RenderThemeMac::setButtonCellState): Set the key equivalent to the return
key if the button is default, otherwise reset the key equivalent.
(WebCore::RenderThemeMac::paintButton): If the button is default call setDefaultButtonCell:
on the window, then wkAdvanceDefaultButtonPulseAnimation before painting. Restore
the window's previous default button cell when finished.
2008-09-14 Mark Rowe <>
Merge r32881.
2008-05-05 Steve Falkenburg <>
Add support for default button appearance.
Add WebCore setting for app chrome mode.
Reviewed by Dave Hyatt.
* css/CSSPrimitiveValueMappings.h:
* css/ Added default-button value keyword.
* page/Settings.cpp:
* page/Settings.h:
* rendering/RenderButton.cpp:
* rendering/RenderButton.h:
* rendering/RenderStyle.h:
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeSafari.cpp:
* rendering/RenderThemeWin.cpp:
2008-04-03 Anders Carlsson <>
Reviewed by Sam.
<rdar://problem/5832603> REGRESSION: Adding an image to the header image well causes Journal page to incorrectly draw
* dom/Document.cpp:
Make sure to chain up to ContainerNode::childrenChanged.
2008-04-03 Mark Rowe <>
Merge r31320 to Safari-3-1-branch.
2008-03-26 Adam Roben <>
Fix Bug 17768: REGRESSION (r30146): Inspector no longer shows elements
We were throwing an exception from Object.describe because of some
undefined variables.
Reviewed by Tim Hatcher.
* page/inspector/utilities.js:
(Object.describe): Reinstate the type1 and type2 variables that were
removed in r30146. They're still used when formatting a function.
2008-03-31 Mark Rowe <>
Merge r31438 to Safari-3-1-branch.
2008-03-29 Sam Weinig <>
Reviewed by Darin Adler.
Fix for <rdar://problem/5828873>
Since NSURL is allowing invalid urls to be loaded, we need to
check the URL validity at the ResourceHandle level and fire off
a cannotShowURL error.
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* platform/KURL.h:
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.h:
* platform/network/ResourceHandleInternal.h:
2008-03-31 Mark Rowe <>
Merge r31434 to Safari-3-1-branch.
2008-03-29 Sam Weinig <>
Reviewed by Brady Eidson.
Fix crash when canceling a resource load while port blocked failure
timer is going.
Test: fast/loader/cancel-load-during-port-block-timer.html
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandleInternal.h:
Make the Timer a member variable of ResourceHandleInternal so
that it can be canceled if the ResourceHandle is destroyed.
2008-03-31 Mark Rowe <>
Merge r30722 to Safari-3-1-branch.
2008-03-03 Mark Rowe <>
Reviewed by Dan Bernstein.
Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper
Node::querySelector and SelectorNodeList were not sufficiently initializing the CSSStyleSelector
before using it to resolve styles, which lead to it having a stale m_style member in some situations.
This stale m_style member resulted in a wild store that would write over whatever object now resided
at the location m_style pointed to.
Test: fast/dom/SelectorAPI/bug-17313.html
* dom/Node.cpp:
(WebCore::Node::querySelector): Call initForStyleResolve to further initialize the CSSStyleSelector.
* dom/SelectorNodeList.cpp:
(WebCore::SelectorNodeList::SelectorNodeList): Ditto.
2008-03-31 Mark Rowe <>
Merge r31153 to Safari-3-1-branch.
2008-03-19 Dan Bernstein <>
Reviewed by John Sullivan.
- fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at WebCore::FrameView::layout + 431
Test: fast/dynamic/subtree-parent-static-y.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
this method on the parent if the parent is the new layout subtree root,
which would result in marking all the way to the top, when it should
actually do nothing.
2008-03-28 Mark Rowe <>
Merge r31071 to Safari-3-1-branch.
2008-03-14 Anders Carlsson <>
Reviewed by Sam.
REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
so that calls where the active window and 'somewindow' differ return the correct frame.
* bindings/js/JSDOMWindowBase.cpp:
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
2008-03-28 Mark Rowe <>
Merge r31336 to Safari-3-1-branch.
2008-03-26 Justin Garcia <>
Reviewed by Harrison.
<rdar://problem/5820749> REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution
* editing/markup.cpp:
(WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n"
with a context from [html, 0] to [html, 0], we'd return "<html>Attribution</html><br>".
Don't enclose paragraphs in clones of the context's enclosing block if that block is the
html or body element. Currently no way to test [DOMHTMLElement createFragmentFromText:].
2008-03-20 Mark Rowe <>
Merge r31144 to Safari-3-1-branch.
2008-03-18 Sam Weinig <>
Reviewed by Anders Carlsson.
Fix for
REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
* dom/ChildNodeList.cpp:
* dom/ChildNodeList.h:
Remove rootNodeChildrenChanged() method and fix the constructor to not
pass in a needsNotifications argument to DynamicNodeList, as it no longer
takes one.
* dom/ClassNodeList.cpp:
Don't pass the needsNotifications argument to DynamicNodeList.
* dom/ContainerNode.cpp:
Rename call to hasNodeLists() to hasNodeListCaches().
* dom/Document.cpp:
(WebCore::Document::~Document): Zero out the m_document variable to signify
to destructors down the destruction chain that this is a Document type node
being destructed, and thus, accessing document() is prohibited.
* dom/Document.h:
(WebCore::Document::addNodeListCache): Renamed from addNodeList.
(WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
(WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
Rename m_numNodeLists to m_numNodeListCaches.
* dom/DynamicNodeList.cpp:
* dom/DynamicNodeList.h:
Remove the needsNotifications concept from DynamicNodeList, instead, manually
invalidate the cache for lists that own their own cache.
* dom/NameNodeList.cpp:
* dom/NameNodeList.h:
Remove rootNodeAttributeChanged() method and fix the constructor to not
pass in a needsNotifications argument to DynamicNodeList, as it no longer
takes one.
* dom/Node.cpp:
(WebCore::Node::~Node): Decrement the document's nodeListCache count
if we had a NodeListsNodeData cache and this is not the Document being
destructor, as tagged by a null m_document.
(WebCore::Node::childNodes): Increment the document's nodeListCache count
if we need create the NodeListsNodeData.
(WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count
if we need create the NodeListsNodeData. Change to invalidate all the caches, instead
of just the ChildNodeList, if document has had no NodeListCaches.
(WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
(WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to
NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
(WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to
NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
(WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
(WebCore::Node::getElementsByName): Increment the document's nodeListCache count
if we need create the NodeListsNodeData.
(WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count
if we need create the NodeListsNodeData.
(WebCore::NodeListsNodeData::invalidateCaches): Added.
(WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
(WebCore::NodeListsNodeData::isEmpty): Added.
* dom/TagNodeList.cpp:
Don't pass the needsNotifications argument to DynamicNodeList.
2008-03-17 Mark Rowe <>
Merge r31069 to Safari-3-1-branch.
2008-03-14 Dan Bernstein <>
Reviewed by Mark Rowe.
- fix <rdar://problem/5797836> shadow offsets are smaller than specified
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setShadow): Made the workaround for
<rdar://problem/5539388> unconditional.
2008-03-03 Mark Rowe <>
Merge r30992 to Safari-3-1-branch.
2008-03-12 David Harrison <>
Reviewed by Darin.
<rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at -[WebCoreAXObject isWebArea] + 8
The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
Also saw that cache clearing was missing from Document::detach(), and fixed that.
Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
* dom/Document.cpp:
Assert that there is no AX cache (since there is no renderer).
Destroy the AX cache installed on this document.
New. Destroy the AX cache associated with this document.
Added some comments.
* dom/Document.h:
Declare clearAXObjectCache().
* page/Frame.cpp:
Destroy the AX cache associated with this frame's document.
* page/mac/
* page/mac/
(-[WebCoreAXObject initWithRenderer:]):
(-[WebCoreAXObject detach]):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
* rendering/RenderWidget.cpp:
Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
2008-03-03 Mark Rowe <>
Merge r30716 to Safari-3-1-branch.
2008-03-03 David Hyatt <>
Fix for <rdar://problem/5776161> REGRESSION: Google Docs Spreadsheet crash
This is also, fixed table layout corrupts heap.
Make sure not to access position -1 of the size 0 vectors.
Reviewed by ggaren
* rendering/FixedTableLayout.cpp:
2008-03-03 Jon Honeycutt <>
Reviewed by Darin, Anders.
Merge r30698 to Safari-3-1-branch.
* plugins/PluginDatabase.h: Added isPreferredPluginPath(),
preferredPluginCompare() qsort comparator.
* plugins/PluginPackage.h: Added bool m_allowsMultipleInstances.
(WebCore::PluginPackage::allowsMultipleInstances): Added; returns true
if plug-in can have multiple instances, false otherwise.
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::preferredPluginCompare): qsort comparator
function, calls PluginPackage::compare().
(WebCore::PluginDatabase::pluginForMIMEType): Builds a list of plug-ins
for a MIME type, sorts them, and returns the first item.
(WebCore::PluginDatabase::MIMETypeForExtension): Builds a list of
plug-ins that handle this extension, sorts them, and returns the MIME
type the first plug-in in the list associates with this extension.
(WebCore::PluginDatabase::isPreferredPluginPath): Returns true if the
passed path is the "preferred" plug-in path.
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackage::PluginPackage): Set m_allowsMultipleInstances
to true.
(WebCore::PluginPackage::fetchInfo): If this is the VLC plug-in, set
m_allowsMultipleInstances to false.
(WebCore::PluginPackage::compare): Compare two plug-ins, first checking
whether a plug-in has an issue that should push it to the back, then
whether it's in a preferred directory that should move it to the front,
then by filename, version, and parent directory.
(WebCore::PluginPackage::load): If this plug-in doesn't allow multiple
instances, and the package has been loaded, return false.
2008-02-29 Mark Rowe <>
Merge r30692 to Safari-3-1-branch.
2008-02-29 Brady Eidson <>
Reviewed by build-fix karma
Bonehead mistake. Revert function to previous version for all non-Windows+CFNetwork platforms
* platform/network/ProtectionSpace.cpp:
(WebCore::ProtectionSpace::receivesCredentialSecurely): Make my previous change conditionally
2008-02-29 Mark Rowe <>
Merge r30689 to Safari-3-1-branch.
2008-02-29 Brady Eidson <>
Reviewed by Darin
<rdar://problem/5771227> - Incorrect password handling text in credential sheet
* platform/network/ProtectionSpace.cpp:
(WebCore::ProtectionSpace::receivesCredentialSecurely): Call functional CFNetwork method to
get "secureness" of the auth challenge instead of figuring it out ourselves
2008-02-28 Dave Hyatt <>
Reviewed by Darin Adler.
Fix <rdar://problem/5771994> REGRESSION: Loading HTML5 spec is 5x slower on TOT than in 3.0.4.
Disable dynamic updating of the + selector when the DOM changes, since it hurt performance on the HTML5 spec.
* css/CSSStyleSelector.cpp:
2008-02-28 Mark Rowe <>
Reviewed by Dave Hyatt.
<rdar://problem/5767534> REGRESSION (r29976): lays out incorrect (17564)
Roll r29976 out of Safari-3-1-branch.
* css/CSSGrammar.y:
2008-02-27 Mark Rowe <>
Merge r30634 to Safari-3-1-branch.
2008-02-27 Sam Weinig <>
Reviewed by Darin.
Fix for <rdar://problem/5768769>
- Don't allow cross-origin calls using
* bindings/js/JSLocation.cpp:
(WebCore::jsLocationProtoFuncToString): Do same-origin check.
* bindings/js/kjs_window.cpp:
(KJS::windowProtoFuncAToB): Ditto.
(KJS::windowProtoFuncBToA): Ditto.
(KJS::windowProtoFuncOpen): Ditto.
(KJS::windowProtoFuncClearTimeout): Ditto.
* bindings/scripts/ Ditto.
2008-02-26 Mark Rowe <>
Merge r30617 to Safari-3-1-branch.
2008-02-26 Antti Koivisto <>
Reviewed by Darin.
Fix <rdar://problem/5761326>
REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
Generate better code with VS:
- Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
- Refactor error reporting so that there is no need to construct/destruct Strings in common cases
- Add a separate version of the function for cases where error messages are not wanted
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/kjs_window.cpp:
* bindings/js/kjs_window.h:
2008-02-22 Mark Rowe <>
Build fix.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send): Qualify references to symbols in the KJS namespace.
2008-02-22 Mark Rowe <>
Merge r30493 to Safari-3-1-branch.
2008-02-22 Geoffrey Garen <>
Reviewed by Sam Weinig.
Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
associated objects @, which was probably an underlying
cause of <rdar://problem/5744037> Gmail out of memory (17455)
If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
the XMLHttpRequest but think we hadn't, therefore never
calling deref() / gcUnprotect().
This could happen at, since attempts to send
XMLHttpRequests from unload handlers in order to gather usage statistics.
(According to comments in the code, SubresourceLoader::create returns
NULL when called from an unload handler.)
The solution is to ref() / gcProtect() only if SubresourceLoader::create
doesn't return NULL. This make sense, since we only need to protect the
request as long as it has an outstanding network transaction.
* xml/XMLHttpRequest.cpp:
2008-02-22 Mark Rowe <>
Merge r30489 to Safari-3-1-branch.
2008-02-22 Jon Honeycutt <>
Reviewed by Anders.
<rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
during stress test (after only 5 min) - null dereference
Full-frame plug-ins create PluginStream objects without loaders, as the
PluginView receives the loading callbacks. We were trying to call
setDefersLoading on these null pointers.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::startStream): Add null check.
(WebCore::PluginStream::destroyStream): Same.
(WebCore::PluginStream::deliverData): Same.
2008-02-22 Timothy Hatcher <>
Merge r30472 to Safari-3-1-branch.
2008-02-21 Sam Weinig <>
Reviewed by Anders Carlsson.
Fix for <rdar://problem/5757946>
- Parse URLs before checking whether they are javascript: urls
(which require security checks).
* bindings/js/JSAttrCustom.cpp:
* bindings/js/JSElementCustom.cpp:
* bindings/js/JSHTMLFrameElementCustom.cpp:
* bindings/js/JSHTMLIFrameElementCustom.cpp:
2008-02-22 Timothy Hatcher <>
<rdar://problem/5758900> REGRESSION (Ceto-Fireclaw): Margins/padding expand on
hover for some headlines on The Huffington Post
Roll out r29649.
* rendering/InlineFlowBox.cpp:
* rendering/RenderObject.h:
* rendering/bidi.cpp:
2008-02-21 Mark Rowe <>
Merge r30461 to Safari-3-1-branch.
2008-02-21 Antti Koivisto <>
Reviewed by Sam Weinig.
REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
Ensure all versions of allowsAccessFrom are inlined to single functions.
This is a 2% win in browser hosted Sunspider.
* bindings/js/kjs_window.cpp:
* bindings/js/kjs_window.h:
2008-02-21 Mark Rowe <>
Merge r30458 to Safari-3-1-branch.
2008-02-21 Geoffrey Garen <>
Reviewed by David Harrison.
Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at
WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
Test: fast/dom/script-element-without-frame-crash.html
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
accidentally removed in r30325.
2008-02-21 Mark Rowe <>
Merge r30433 to Safari-3-1-branch.
2008-02-20 Sam Weinig <>
Reviewed by Darin and Geoff.
- <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
* WebCore.base.exp: Updated.
* bindings/js/kjs_navigator.cpp:
(WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed.
(WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk
return true, then return the empty string.
* page/Settings.cpp:
(WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false.
(WebCore::Settings::setNeedsSiteSpecificQuirks): Added.
* page/Settings.h: Added m_needsSiteSpecificQuirks.
(WebCore::Settings::needsSiteSpecificQuirks): Added.
2008-02-20 Timothy Hatcher <>
Merge r30423 to Safari-3-1-branch.
2008-02-20 Alexey Proskuryakov <>
Build fix.
* xml/XMLHttpRequest.cpp:
2008-02-20 Timothy Hatcher <>
Merge r30422 to Safari-3-1-branch.
2008-02-20 Alexey Proskuryakov <>
Reviewed by Darin.
<rdar://problem/5749455> Unable to set the Referer header in Dashboard using XMLHttpRequest
Cannot be tested in DRT.
* xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load
local files can also set any headers.
2008-02-18 Mark Rowe <>
Merge r30395 to Safari-3-1-branch.
2008-02-18 Brady Eidson <>
Reviewed by Darin
Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
* bindings/objc/
(-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key]; // defaults to throwing an exception`
says it all - it throws an exception. This method also happens to hold the JSLock. Problematically, when the exeception
is thrown and the method exited, the JSLock is never released. Fix that without otherwise changing behavior by holding the
JSLock in two individual scopes - Right before the exception and right after.
2008-02-18 Mark Rowe <>
Merge r30392 to Safari-3-1-branch.
2008-02-18 Dan Bernstein <>
Reviewed by Dave Hyatt.
- fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on
Test: fast/css/font-face-multiple-remote-sources.html
* css/CSSFontFace.cpp:
* css/CSSSegmentedFontFace.cpp:
2008-02-18 Mark Rowe <>
Merge r30389 to Safari-3-1-branch.
2008-02-18 Stephanie Lewis <>
Reviewed by Adam.
Remove workaround for <rdar://problem/5695848>.
* platform/network/cf/ResourceResponseCFNet.cpp:
2008-02-18 Mark Rowe <>
Merge r30370 to Safari-3-1-branch.
2008-02-18 Jon Honeycutt <>
Reviewed by Darin.
<rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
slow script Flash 9 dialog at
When navigating to a new page, we stop all outstanding PluginStreams.
Flash hangs in the call to NPP_URLNotify. It eventually displays the
"slow script" dialog, which relinquishes control to the system. While
this dialog is running, the request we are in the process of cancelling
completes, and we re-enter Flash to deliver the data. When the dialog
is dismissed, the internal state of Flash has changed, and Flash
crashes with a null dereference.
To work around this, we can defer loading before entering plug-in code,
so that even if a plug-in yields to the system, we won't get callbacks
while we're handling a callback.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::startStream): Defers loads while calling into
(WebCore::PluginStream::destroyStream): Same.
(WebCore::PluginStream::deliverData): Same.
(WebCore::PluginStream::didFail): Protect 'this' from deletion by
destroyStream. Null out m_loader only after destroyStream returns.
(WebCore::PluginStream::didFinishLoading): Same.
2008-02-17 Steve Falkenburg <>
Build fix.
* WebCore.vcproj/
2008-02-17 Mark Rowe <>
Merge r30331 to Safari-3-1-branch.
2008-02-15 Brady Eidson <>
Reviewed by Darin
Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
a page has closed or loaded a new document
Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
a policy of shutting down the databases in a document at the same time. This includes removing all pending transactions
in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
(crashing, unexpected exceptions and output, etc)
* dom/Document.cpp:
(WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
Add an assertion to that effect.
(WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
(WebCore::Document::removeOpenDatabase): Remove such a handle
(WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
* dom/Document.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
* platform/MessageQueue.h:
* platform/sql/SQLiteTransaction.cpp:
(WebCore::SQLiteTransaction::stop): Added. Explicit stop to cut off a transaction so it won't try anymore SQL activity
* platform/sql/SQLiteTransaction.h:
* storage/Database.cpp:
(WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
(WebCore::Database::stop): Stop this database, including all queued transactions and callbacks
* storage/Database.h:
* storage/DatabaseThread.cpp:
* storage/DatabaseThread.h:
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
(WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added. Clears queued statements and clear the next step
when the database has been closed since the last step/callback was run. Also stops the current SQLite transaction,
if any
* storage/SQLTransaction.h:
2008-02-17 Mark Rowe <>
Merge r30330 to Safari-3-1-branch.
2008-02-15 Adele Peterson <>
Reviewed by Darin.
Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
We had a special case for forward-tab in designMode, where the default behavior was to insert a tab key (or respect the keypress handler behavior).
This change makes the shift-tab behavior match the forward-tab behavior.
If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
This is something we should look into and maybe advise the site on in the future. However, it's a low-risk change to just make tab and shift-tab uniform
in this respect, so I think this is the way to go for right now.
* page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
2008-02-17 Mark Rowe <>
Merge r30329 to Safari-3-1-branch.
2008-02-15 Anders Carlsson <>
Reviewed by Alice.
REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
Use the new CFNetwork functions for setting body parts.
* platform/network/cf/FormDataStreamCFNet.cpp:
2008-02-17 Mark Rowe <>
Merge r30328 to Safari-3-1-branch.
2008-02-15 Geoffrey Garen <>
Reviewed by Anders Carlsson.
Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
surveys no longer work due to XMLHttpRequest exceptions
Reverted some exception throwing code from r12194.
To comply with the W3C draft spec, we used to throw an exception when
trying to access responseText and responseXML at the wrong time, but
that turned out to be a compatibility problem.
Now, matching Firefox and previous versions of WebKit, we never throw
an exception when accessing responseText or responseXML.
* xml/XMLHttpRequest.cpp:
2008-02-17 Mark Rowe <>
Merge r30326 to Safari-3-1-branch.
2008-02-15 Justin Garcia <>
Reviewed by Dan Bernstein.
<rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
Rolled out <>
* editing/SelectionController.cpp:
2008-02-17 Mark Rowe <>
Merge r30325 to Safari-3-1-branch.
2008-02-15 Alice Liu <>
Reviewed by Darin.
Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
Before this patch, Frame::scriptProxy() would only return null in the case that javascript was
disabled and if the script proxy field wasn't set (which would only be the case if the window
hasn't loaded anything yet). Not all callers of scriptProxy() always check for a non-null return
value. Those that did check would effectively be checking if javascript was enabled before proceeding.
This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless
of whether javascript is disabled. This will mean that callers who don't check for null won't crash.
Second, callers who did check for null now instead check for javascript being disabled. This means that
code paths intended for preventing javascript from being run will be making the correct check. Another
minor addition to this patch is that I added a function on Frame to be a shortcut for checking if javascript
is enabled.
* bindings/js/JSCustomSQLStatementCallback.cpp:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
* bindings/js/JSCustomSQLTransactionCallback.cpp:
* bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
* bindings/js/JSCustomVoidCallback.cpp:
* bindings/js/JSCustomXPathNSResolver.cpp:
* bindings/js/ScheduledAction.cpp:
* bindings/js/kjs_events.cpp:
* bindings/js/kjs_html.cpp:
* bindings/js/kjs_proxy.cpp:
* bindings/js/kjs_proxy.h:
* bindings/js/kjs_window.cpp:
* dom/Document.cpp:
* dom/EventTarget.cpp:
* html/HTMLPlugInElement.cpp:
* html/HTMLScriptElement.cpp:
* html/HTMLTokenizer.cpp:
* loader/FrameLoader.cpp:
* manual-tests/disable-javascript-reload.html: Added.
* page/Frame.cpp:
* page/Frame.h:
* page/InspectorController.cpp:
* page/mac/
* svg/SVGDocumentExtensions.cpp:
2008-02-17 Mark Rowe <>
Merge r30323 to Safari-3-1-branch.
2008-02-15 Dan Bernstein <>
Reviewed by Alexey Proskuryakov.
- WebCore part of fixing
<rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
Test: http/tests/loading/text-content-type-with-binary-extension.html
Refined the workaround for <rdar://problem/5321972> to exclude files
with extensions that are known to be associated with binary MIME types.
* WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
* platform/network/mac/
(WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
workaround logic into WebCoreURLResponse.
* platform/network/mac/WebCoreURLResponse.h: Added.
* platform/network/mac/ Added.
(createBinaryExtensionsSet): Returns a set of extensions known to
belong to MIME types of binary data.
(-[NSURLResponse _webcore_MIMEType]):
(-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
application/octet-stream to text/plain if that is the specified
Content-Type, unless the extension is in the binary extensions set.
2008-02-15 Mark Rowe <>
Merge r30285 to Safari-3-1-branch.
2008-02-15 Adam Roben <>
* bindings/scripts/ Touch this to force bindings to
2008-02-15 Mark Rowe <>
Merge r30269 to Safari-3-1-branch.
2008-02-14 Adam Roben <>
Conditionalize cross-document messaging support
The cross-document messaging parts of HTML 5 are in flux and we want
ports to be able to turn off the support as needed.
Note that the support is turned off by default right now. A subsequent
commit will turn it on by default.
Reviewed by Darin.
* WebCore.vcproj/
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSEventCustom.cpp:
* dom/Event.cpp:
* dom/Event.h:
* dom/MessageEvent.cpp:
* dom/MessageEvent.h:
* dom/MessageEvent.idl:
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2008-02-15 Mark Rowe <>
Merge r30240 to Safari-3-1-branch.
2008-02-14 Ada Chan <>
<rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
Reviewed by Jon and Darin.
* page/Frame.cpp:
2008-02-15 Mark Rowe <>
Merge r30239 to Safari-3-1-branch.
2008-02-14 Stephanie Lewis <>
Reviewed by Geoff.
Update order files.
* WebCore.order:
2008-02-15 Mark Rowe <>
Merge r30238 to Safari-3-1-branch.
2008-02-14 Oliver Hunt <>
Reviewed by Geoff G and Weinig.
<rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
Revert the portions of r29428 responsible for breaking the ability to
set window.status
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2008-02-15 Mark Rowe <>
Merge r30237 to Safari-3-1-branch.
2008-02-14 Anders Carlsson <>
Reviewed by Darin.
Crash in WebCore::DeprecatedString::operator= + 31 at
Use pointers in the cache map tables. Otherwise when we rehash,
we will end up destroying Cache objects that node lists might point to.
* dom/Node.cpp:
2008-02-15 Mark Rowe <>
Merge r30233 to Safari-3-1-branch.
2008-02-14 Timothy Hatcher <>
Reviewed by Darin Adler.
<rdar://problem/5743768> A deadlock during storage layout tests
Make sure not to hold the m_openDatabaseMapGuard mutex when calling
Database::markAsDeletedAndClose(), since that can cause a deadlock
during the synchronous DatabaseThread call it triggers.
* storage/DatabaseTracker.cpp:
2008-02-15 Mark Rowe <>
Merge r30222 to Safari-3-1-branch.
2008-02-13 Justin Garcia <>
Reviewed by Oliver Hunt.
Fixes the editing/deleting/5729680.html failure. It succeeds when run by itself
but fails when run with other tests because FramePrivate's m_selectionGranularity
isn't reset when a Frame receives a new document. It was also uninitialized in
the constructor.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
* page/Frame.cpp:
(WebCore::FramePrivate::FramePrivate): Ditto.
2008-02-15 Mark Rowe <>
Merge r30218 to Safari-3-1-branch.
2008-02-13 Jon Honeycutt <>
Reviewed by Anders.
<rdar://problem/5739282> Hangs after closing video trailer popup with
VLC plugin
VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
* plugins/PluginQuirkSet.h: Added new quirk
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::stop): Selectively call NPP_SetWindow.
(WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
2008-02-15 Mark Rowe <>
Merge r30213 to Safari-3-1-branch.
2008-02-13 Justin Garcia <>
Reviewed by Adam Roben.
<rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
* editing/Editor.cpp:
(WebCore::Editor::deleteWithDirection): Fixed a typo.
2008-02-15 Mark Rowe <>
Merge r30195 to Safari-3-1-branch.
2008-02-13 Alexey Proskuryakov <>
Reviewed by Darin.
<rdar://problem/5740042> Database termination issues
Test: storage/close-during-stress-test.html
* dom/Document.cpp:
* dom/Document.h:
Don't re-create the database thread if it has been already terminated.
* storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
having a hanging reference.
* storage/DatabaseThread.cpp:
* storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
2008-02-15 Mark Rowe <>
Merge r30189 to Safari-3-1-branch.
2008-02-12 Timothy Hatcher <>
Reviewed by Brady Eidson.
<rdar://problem/5652560> Can't delete database if the website that
uses it has been opened in this session
Close the Database on the database thread before deleting the file.
Tested and works on Windows and Mac.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
* storage/Database.cpp:
(WebCore::Database::markAsDeletedAndClose): Unschedule any pending
Database tasks, and start and imediate DatabaseCloseTask.
(WebCore::Database::close): Close the SQLDatabase.
* storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
* storage/DatabaseTask.cpp:
(WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
(WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
(WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
* storage/DatabaseTask.h: Add DatabaseCloseTask.
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
2008-02-15 Mark Rowe <>
Merge r30184 to Safari-3-1-branch.
2008-02-12 Brady Eidson <>
Reviewed by Darin Adler
Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
Layout tests will come shortly with a mess of DRT changes
* platform/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
* storage/Database.cpp:
(WebCore::Database::changeVersion): Pass in the successCallback
(WebCore::Database::transaction): Ditto
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
(WebCore::SQLTransaction::performPendingCallback): Ditto
(WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
skip straight to cleanupAfterSuccessCallback()
(WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
schedule cleanupAfterSuccessCallback()
(WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
* storage/SQLTransaction.h:
2008-02-15 Mark Rowe <>
Merge r30179 to Safari-3-1-branch.
2008-02-12 Dan Bernstein <>
Reviewed by Adam Roben.
- fix
<rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
Revised the system fallback font lookup logic to use MLang font linking
again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
for CJK characters, try linking based on a single code page at a time,
starting with the user's default code page (if it is one of the CJK
code pages) followed by the other CJK code pages in a prescribed order
that matches what Firefox does.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
code pages, with the user's default code page first.
(WebCore::currentFontContainsCharacter): Factored out of
(WebCore::createMLangFont): Ditto.
2008-02-15 Mark Rowe <>
Merge r30174 to Safari-3-1-branch.
2008-02-12 Dan Bernstein <>
Reviewed by Timothy Hatcher.
- <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
* platform/graphics/cg/GraphicsContextCG.cpp:
2008-02-15 Mark Rowe <>
Merge r30173 to Safari-3-1-branch.
2008-02-12 Brady Eidson <>
Release build fix
* storage/DatabaseTask.cpp:
2008-02-15 Mark Rowe <>
Merge r30172 to Safari-3-1-branch.
2008-02-12 Alexey Proskuryakov <> and Brady Eidson <>
Reviewed by Brady.
<rdar://problem/5729619> Storage tasks are getting lost
<rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
<rdar://problem/5729446> Major thread safety issue in Database code
* platform/MessageQueue.h: Added a thread-safe queue abstraction.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Added MessageQueue.h.
* dom/Document.cpp:
(WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
* storage/Database.idl: Fixed parameter declarations to actually match implementation
(which is custom, so it got out of sync).
* storage/DatabaseTask.h:
Changed tasks to hold more information internally. Added helpers for better debug logging.
* storage/DatabaseTask.cpp:
Implementation for the above.
Fixed a potential race condition: if the task completed before we entered a wait, we'd never
wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
* storage/DatabaseThread.cpp:
* storage/DatabaseThread.h:
Changed to use MessageQueue.
* storage/Database.cpp:
* storage/Database.h:
Changed m_transactionQueue to a MessageQueue.
Got rid of callback tracking - these can take care of themselves.
Got rid of a DatabaseThread member, as the Document can be asked for it.
Moved private static members and helpers out of the header.
Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
* storage/SQLTransaction.h:
* storage/SQLTransaction.cpp: Added a lot of debug logging.
(WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
as it created a race condition. Everything seems to work better without it, although a real fix
would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
* manual-tests/database-threading-stress-test-2.html: Added.
* manual-tests/database-threading-stress-test.html: Added.
2008-02-15 Mark Rowe <>
Merge r30171 to Safari-3-1-branch.
2008-02-12 Adam Roben <>
Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
Reviewed by Mitz.
Test: fast/loader/local-css-allowed-in-strict-mode.html
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
.css files.
2008-02-15 Mark Rowe <>
Merge r30162 to Safari-3-1-branch.
2008-02-11 Dan Bernstein <>
Reviewed by Dave Hyatt.
- fix
<rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
Test: fast/css/last-child-style-sharing.html
* css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
CSS3 selectors that require it.
2008-02-15 Mark Rowe <>
Merge r30157 to Safari-3-1-branch.
2008-02-11 Sam Weinig <>
Reviewed by Darin Adler.
Make the cross-domain security model more closely match Firefox by always returning the
native built-in functions when accessing functions cross-domain.
Fixes for:
<rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
<rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
Tests: fast/dom/Window/window-custom-prototype-crash.html
* bindings/js/JSDOMWindowCustom.cpp:
- Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
not it has been overridden, instead of undefined.
- When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable)
instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
- Allow access to the native toString function cross-domain. It always returns "[object Window]".
- Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
the function an overridden function is not inadvertantly returned from the PropertyMap.\
* bindings/js/JSHistoryCustom.cpp:
- Implement the same model as described above for the History object, always returning the
native built-in function cross-domain.
- Allow access to the native toString function cross-domain.
- Clean up the code to make it clear that the custom functionality is only there for cross-domain
* bindings/js/JSLocation.cpp:
- Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
function. This will help moving to a generated class in the future.
- Implement the same model as described above for the Location object, always returning the
native built-in function cross-domain.
- Clean up the code to make it clear that the custom functionality is only there for cross-domain
* bindings/js/JSLocation.h:
- Clean up to match the rest of the file a little better.
* bindings/js/kjs_binding.cpp:
* bindings/js/kjs_binding.h:
- Put common functionality related to cross-domain access here to serve as a central shared point.
This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
and JSLocation.cpp.
* bindings/js/kjs_dom.cpp:
- Use the new allowsAccessFromFrame method.
* bindings/js/kjs_window.cpp:
(KJS::Window::childFrameGetter): Cleanup.
(KJS::Window::namedItemGetter): Cleanup.
- Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
than the index or shortcut name getters.
- Cleanup function to make it more understandable and slightly more efficient.
- Add a new variant of this method that takes a reference to a String, which, on failure, will
contain the error message to print out. The caller can then pass this to printErrorMessage.
This allows for code to check allowsAccessFrom and act on the result without printing out the
error message. For convenience, a version with out the String parameter has been left which
prints out the message automatically.
* bindings/js/kjs_window.h:
2008-02-15 Mark Rowe <>
Merge r30154 to Safari-3-1-branch.
2008-02-11 Timothy Hatcher <>
Reviewed by Brady Eidson.
<rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
(WebCore::DatabaseTracker::origins): Ditto.
(WebCore::DatabaseTracker::setQuota): Ditto.
(WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
origins to call deleteOrigin().
(WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
2008-02-15 Mark Rowe <>
Merge r30153 to Safari-3-1-branch.
2008-02-11 David Hyatt <>
Fix for bug 17286, crash accessing a null RenderStyle. Add a simple null check.
Reviewed by aroben
Added fast/css/empty-generated-content.html
* css/CSSStyleSelector.cpp:
2008-02-15 Mark Rowe <>
Merge r30146 to Safari-3-1-branch.
2008-02-11 Adam Roben <>
Fix Bug 14316: Inspector's Console truncates long strings
We no longer call Object.describe to format all the output of commands
enetered into the Console. The ConsolePanel object now has a set of
formatting functions that append a formatted representation of the
passed-in object to the passed-in container node.
Reviewed by Sam.
* page/inspector/ConsolePanel.js:
(WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
_outputToNode to _format.
(WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
Object.type to get the type of the object, then call the appropriate
formatting function.
(WebInspector.ConsolePanel._formatvalue): Added.
(WebInspector.ConsolePanel._formatstring): Added. This function
contains the actual fix for the bug, since it doesn't truncate the
string no matter how long it is.
(WebInspector.ConsolePanel._formatregexp): Added.
(WebInspector.ConsolePanel._formatarray): Added. This is a bit more
functional than Object.describe for arrays, since it recursively
formats each item in the array. One advantage of this is that Nodes in
arrays will be linkified instead of just turning into "[Object
HTMLBodyElement]" or similar.
(WebInspector.ConsolePanel._formatnode): Added.
(WebInspector.ConsolePanel._formatobject): Added.
* page/inspector/utilities.js:
(Object.type): Added. Code was pulled out of Object.describe and
reorganized slightly.
(Object.describe): Call Object.type. There should be no change in
behavior of this function.
2008-02-15 Mark Rowe <>
Merge r30116 to Safari-3-1-branch.
2008-02-09 David Hyatt <>
Fix for bug 17254, nth-* selectors do not work with negative coefficients.
Reviewed by Mitz.
* css/CSSStyleSelector.cpp:
2008-02-15 Mark Rowe <>
Merge r30112 to Safari-3-1-branch.
2008-02-09 David Hyatt <>
Fix for bug 17203, high CPU usage loading HTML5 spec. This patch significantly improves the performance
of CSS3 selectors.
(1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward"
selectors do not need to re-resolve during parsing, since children are appended on the end. Only the
"backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
(2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows
Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
(3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors
like last-child will always return false when children are still being parsed. When an Element finishes
parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
(4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
(5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
(6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
Reviewed by Eric
* css/CSSStyleSelector.cpp:
* dom/Attr.cpp:
* dom/Attr.h:
* dom/ContainerNode.cpp:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/StyledElement.cpp:
* dom/StyledElement.h:
* dom/XMLTokenizer.cpp:
* html/HTMLAppletElement.cpp:
* html/HTMLAppletElement.h:
* html/HTMLElementFactory.cpp:
* html/HTMLGenericFormElement.cpp:
* html/HTMLGenericFormElement.h:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.cpp:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
* html/HTMLOptionElement.h:
* html/HTMLParser.cpp:
* html/HTMLScriptElement.cpp:
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
* html/HTMLSelectElement.h:
* html/HTMLStyleElement.cpp:
* html/HTMLStyleElement.h:
* html/HTMLTextAreaElement.cpp:
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.cpp:
* html/HTMLTitleElement.h:
* rendering/RenderApplet.cpp:
* rendering/RenderPartObject.cpp:
* rendering/RenderStyle.cpp:
* rendering/RenderStyle.h:
* svg/SVGAnimationElement.cpp:
* svg/SVGAnimationElement.h:
* svg/SVGClipPathElement.cpp:
* svg/SVGClipPathElement.h:
* svg/SVGDefinitionSrcElement.cpp:
* svg/SVGDefinitionSrcElement.h:
* svg/SVGElement.cpp:
* svg/SVGElement.h:
* svg/SVGFontFaceElement.cpp:
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceSrcElement.cpp:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
* svg/SVGFontFaceUriElement.h:
* svg/SVGGElement.cpp:
* svg/SVGGElement.h:
* svg/SVGGradientElement.cpp:
* svg/SVGGradientElement.h:
* svg/SVGMarkerElement.cpp:
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
* svg/SVGPatternElement.h:
* svg/SVGStyleElement.cpp:
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGTitleElement.cpp:
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
* svg/SVGUseElement.h:
2008-02-15 Mark Rowe <>
Merge r30104 to Safari-3-1-branch.
2008-02-08 Timothy Hatcher <>
Reviewed by Brady Eidson.
<rdar://problem/5640896> Removing database then trying
to recreate it causes trouble
Added open Database support to DatabaseTracker. So any Database that
is deleted will be marked as deleted and will fail to open any transaction
or execute any new SQL queries.
* storage/Database.cpp:
(WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
(WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
(WebCore::Database::markAsDeleted): Set the m_deleted flag.
(WebCore::Database::version): Return a null String if m_deleted is true.
* storage/Database.h:
(WebCore::Database::deleted): Return m_deleted.
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
(WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
(WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
matching the origin/name.
* storage/DatabaseTracker.h:
* storage/SQLStatement.cpp:
(WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
* storage/SQLStatement.h:
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
(WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
if the Database was marked as deleted.
2008-02-15 Mark Rowe <>
Merge r30101 to Safari-3-1-branch.
2008-02-08 Anders Carlsson <>
Reviewed by Mitz.
Crash in FrameLoader::stopLoadingSubframes() on IMDB page
Store the child frame in a RefPtr to prevent it from being deleted when the
frame tree changes while calling stopAllLoaders().
* loader/FrameLoader.cpp:
2008-02-15 Mark Rowe <>
Merge r30098 to Safari-3-1-branch.
2008-02-08 Alp Toker <>
Reviewed by Adam Roben.
Avoid null-dereference crasher noticed in the GTK+ port and also
affecting the Win release build.
Covered by existing tests.
* dom/Document.cpp:
2008-02-15 Mark Rowe <>
Merge r30097 to Safari-3-1-branch.
2008-02-08 Anders Carlsson <>
Reviewed by Adam.
REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
Revert r29926 which caused the regression.
* dom/Text.cpp:
* dom/Text.h:
* html/HTMLParser.cpp:
* loader/TextDocument.cpp:
2008-02-15 Mark Rowe <>
Merge r30096 to Safari-3-1-branch.
2008-02-08 Sam Weinig <>
Reviewed by Hyatt.
Fix for <rdar://problem/5732491>
The querySelectorAll method on an element node does not search only the element's descendants
Test: fast/dom/SelectorAPI/elementRoot.html
* dom/Node.cpp:
(WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
* dom/SelectorNodeList.cpp:
(WebCore::SelectorNodeList::SelectorNodeList): ditto.
2008-02-15 Mark Rowe <>
Merge r30087 to Safari-3-1-branch.
2008-02-06 Kimmo Kinnunen <>
Reviewed by Tim Hatcher.
HTML5: Client-side database queries should return values of type number
Test: storage/sql-data-types.html
Make the DB queries return a value as a number if it was inserted
as a number to the database.
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
* platform/sql/SQLiteStatement.h:
* storage/SQLStatement.cpp:
(WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
2008-02-15 Mark Rowe <>
Merge r30085 to Safari-3-1-branch.
2008-02-07 Ada Chan <>
<rdar://problem/5292433> certificate authentication support broken in Safari 3.0
Added mechanism to communicate client certificate info back to CFNetwork.
Reviewed by Adam.
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::clientCerts): Keep a mapping of hosts to client certificates.
(WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
to CFNetwork by setting it in the SSL properties.
(WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
2008-02-15 Mark Rowe <>
Merge r30081 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Fix Bug 17138: REGRESSION: Node highlight not updated properly
Reviewed by Darin.
No test possible.
* page/InspectorController.cpp:
(WebCore::InspectorController::drawNodeHighlight): Update the
overlayRect after scrolling to make sure that we translate the context
by the correct amount.
2008-02-15 Mark Rowe <>
Merge r30080 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Qt and GTK+ build fixes
* platform/gtk/FileSystemGtk.cpp: Added a missing #include.
* platform/qt/FileSystemQt.cpp: Ditto.
2008-02-15 Mark Rowe <>
Merge r30079 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Some cleanup of Mac-only user stylesheet code
I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
moved some Mac-only Frame methods to
Reviewed by Darin.
* WebCore.xcodeproj/project.pbxproj: Added new files to project.
* loader/mac/UserStyleSheetLoader.cpp: Added.
* loader/mac/UserStyleSheetLoader.h: Added.
* page/Frame.cpp: Removed setUserStyleSheet[Location]
* page/mac/
(WebCore::Frame::setUserStyleSheetLocation): Moved here from
(WebCore::Frame::setUserStyleSheet): Ditto.
2008-02-15 Mark Rowe <>
Merge r30078 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Fix <rdar://5555260> GMail never loads when a user stylesheet is
The fix in r29841 did not guarantee that the user stylesheet would not
still be loading by the time GMail called document.write, and so was
not a complete fix.
This change reworks the user stylesheet loading mechanism on non-Mac
platforms to load the stylesheet synchronously from disk, and then
keeps it in memory. This obsoletes the issue of what our behavior
should be before the user stylesheet has loaded and what should happen
when it finishes loading, as the user stylesheet will always be
available when the Document first asks for it. Note, however, that
this removes the ability to specify a non-file: URL for the user
stylesheet. This change was not made for the Mac platform because it's
possible that WebKit clients are relying on non-file: URLs for user
stylesheets. It would also be nice to move back to an asynchronous
loading model someday, but that is not currently possible since we
don't have an asynchronous loading mechanism that is not tied to a
particular Frame.
The responsibility of loading and storing the user stylesheet has
moved from Frame to Page, since the user stylesheet URL is set on the
Page-level Settings object.
Reviewed by Darin.
* dom/Document.cpp:
(WebCore::Document::Document): Changed to call userStyleSheet().
(WebCore::Document::setUserStyleSheet): Made Mac-only.
(WebCore::Document::userStyleSheet): Changed to call up to Page on
non-Mac platforms.
(WebCore::Document::recalcStyleSelector): Changed to call
* dom/Document.h:
- Made setUserStyleSheet and the m_usersheet member Mac-only
- Changed userStyleSheet to return a String instance instead of a
String reference, since we now might return a new null String.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::begin): Made the call to
Frame::setUserStyleSheetLocation Mac-only.
* page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
(WebCore::Frame::~Frame): Ditto.
(WebCore::Frame::reapplyStyles): Made the call to
setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
Document will pick up the new stylesheet in Document::reapplyStyles.
(WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
* page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
* page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
* page/Page.cpp:
(WebCore::Page::Page): Initialize new members.
(WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
Mac. On non-Mac, resets all members relating to the user stylesheet so
we'll know to load it again the next time it's asked for.
(WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
the user stylesheet location has changed since the last time we loaded
it, or if the file has been modified since we last loaded it, then
returns the contents of the user stylesheet as a String.
* page/Page.h: Added new methods/members.
* page/Settings.cpp:
(WebCore::Settings::setUserStyleSheetLocation): Changed to call
* page/Settings.h: Changed userStyleSheetLocation to return the KURL
by reference instead of making a copy.
* platform/FileSystem.h: Added declaration for getFileModificationTime.
* platform/KURL.h: Added declaration for fileSystemPath method.
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::fileSystemPath): Added.
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::getFileModificationTime): Added.
* platform/qt/KURLQt.cpp:
(WebCore::KURL::fileSystemPath): Stubbed out.
* platform/win/FileSystemWin.cpp:
(WebCore::getFileModificationTime): Added.
* platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
* platform/gtk/FileSystemGtk.cpp: Ditto.
* platform/wx/FileSystemWx.cpp: Ditto.
* platform/qt/TemporaryLinkStubs.cpp: Stubbed out
* platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
* platform/wx/TemporaryLinkStubs.cpp: Ditto.
2008-02-15 Mark Rowe <>
Merge r30077 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Clean up FileSystemWin.cpp
This cleanup also makes us call _wstat64 instead of _wstat32i64. The
only difference between these two functions is that _wstat64 gives
64-bit time values, while _wstat32i64 only gives 32-bit time values.
Reviewed by Darin.
All tests pass.
* platform/win/FileSystemWin.cpp:
(WebCore::statFile): New static helper that wraps _wstat64.
(WebCore::getFileSize): Changed to call statFile.
(WebCore::fileExists): Ditto.
2008-02-15 Mark Rowe <>
Merge r30076 to Safari-3-1-branch.
2008-02-07 Adam Roben <>
Rename fileSize to getFileSize
Rubberstamped by Darin.
* platform/FileSystem.h:
* platform/gtk/FileSystemGtk.cpp:
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/network/curl/ResourceHandleManager.cpp:
* platform/posix/FileSystemPOSIX.cpp:
* platform/qt/FileSystemQt.cpp:
* platform/win/FileSystemWin.cpp:
* platform/wx/FileSystemWx.cpp:
* storage/Database.cpp:
* storage/DatabaseTracker.cpp:
* storage/OriginUsageRecord.cpp:
2008-02-15 Mark Rowe <>
Merge r30075 to Safari-3-1-branch.
2008-02-06 Adam Roben <>
Make KURL::isLocalFile treat the URL's protocol case-insensitively
Reviewed by Darin.
* platform/KURL.cpp:
(WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
2008-02-14 Dan Bernstein <>
Reviewed by Adele Peterson.
- roll out changes to CSS2 system colors from r28775
* css/CSSStyleSelector.cpp:
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/
2008-02-07 David Hyatt <>
Fix for bug 6248, implement the nth-* CSS3 selectors. Patch based on original KHTML work from Allan Jensen
and improved upon by Nick Shanks.
Reviewed by Eric
* css/CSSGrammar.y:
* css/CSSParser.cpp:
* css/CSSSelector.cpp:
* css/CSSSelector.h:
* css/CSSStyleSelector.cpp:
* css/tokenizer.flex:
* rendering/RenderStyle.cpp:
* rendering/RenderStyle.h:
2008-02-07 Dan Bernstein <>
Reviewed by Dave Hyatt.
- fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
Test: fast/block/float/relative-painted-twice.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverhangingFloats): Added another case where
the child should not take over painting the float: when they do not have
the same enclosing layer. In that case, the float is already being
painted by one of its closer ancestors.
2008-02-07 Dan Bernstein <>
Reviewed by Darin Adler.
- fix
Changing text to bold changes font family
Test: platform/mac/fast/text/family-for-font-matched-by-name.html
* platform/mac/
(+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
the family of the font whose name matches the desired family if there
is no exact family match.
2008-02-07 Beth Dakin <>
Reviewed by Geoff.
Fix for <rdar://problem/5697882> Traffic or Street View button on
Google Maps is sometimes not positioned correctly (17000)
On the Mac, timers fire in the order that they are registered.
Geoff and I discovered that this is not necessarily true on
Windows, and that turned out to be the cause of this intermittent
layout problem at Google Maps. This patch adds a new member
variable to Timer to remember the timer's insertion point into the
heap. Now when comparing timers, if two timers were registered at
the same time, their insertion orders are compared to determine
which should fire first. This code actually never runs on Debug
builds on the Mac; the system clock on the Mac is accurate enough
that it knows that the two timers were not registered at *exactly*
the same time. This is not the case on Windows. In theory, if we
sped up Javascript enough on the Mac, this code would run and would
prevent misrenderings such as the one found on Google Maps.
* platform/Timer.cpp:
* platform/Timer.h:
2008-02-06 Justin Garcia <>
Reviewed by Darin Adler.
<rdar://problem/5195056> Huge plain text pastes are slow
This was fixed in r27369 and then r29367 and r29667 caused performance to
* editing/EditCommand.cpp:
(WebCore::EditCommand::apply): Only updateLayout() for high level commands.
(WebCore::EditCommand::unapply): Ditto.
(WebCore::EditCommand::reapply): Ditto.
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls
that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
(WebCore::Editor::unappliedEditing): Ditto.
(WebCore::Editor::reappliedEditing): Ditto.
* editing/SelectionController.cpp:
(WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
base and extent with the expensive isCandidate operation if the node that will
be removed is in a fragment, since such a removal is guaranteed to have no effect
on a selection. This is to speed up the paste operation, which does many removes from
a fragment.
2008-02-06 Kevin Ollivier <>
Reviewed by Darin Adler.
Rather than directly handing scroll wheel events, use
PlatformWheelEvent to send them to WebCore first, so that
mouse wheel scrolling info can be retrieved via JavaScript.
* platform/ScrollView.h:
* platform/wx/MouseWheelEventWx.cpp:
* platform/wx/ScrollViewWx.cpp:
2008-02-06 Mark Rowe <>
Fix Windows builds.
* WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
2008-02-06 Mark Rowe <>
Mac build fix. Track rename that happened in r30056.
* platform/graphics/mac/
2008-02-06 Brent Fulgham <>
Reviewed by Adam Roben.
Conditionalize CoreGraphics vs Cairo support in Windows port.
* WebCore.vcproj/WebCore.vcproj:
* bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
* bridge/win/FrameCairoWin.cpp: Added.
* bridge/win/FrameWin.cpp:
* platform/graphics/SimpleFontData.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
* platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
* platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
* platform/graphics/win/FontCairoWin.cpp: Added.
* platform/graphics/win/FontWin.cpp:
* platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
* platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
* platform/graphics/win/GraphicsContextWin.cpp:
* platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
* platform/graphics/win/ImageCairoWin.cpp: Added.
* platform/graphics/win/ImageWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
* platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
* platform/graphics/win/SimpleFontDataWin.cpp:
* platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
* platform/win/DragImageCairoWin.cpp: Added.
* platform/win/DragImageWin.cpp:
2008-02-06 Anders Carlsson <>
Reviewed by Darin.
Change httpBodyFromStream to take the request instead of the stream.
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/network/cf/FormDataStreamCFNet.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
2008-02-06 Kevin McCullough <>
Reviewed by Darin.
- Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
one URL uses an explicit port number and another doesn't
* manual-tests/Default-port-frame.html: Added.
* manual-tests/resources/Default-port-frame-contents.html: Added.
2008-02-06 Oliver Hunt <>
Reviewed by NOBODY (Build fix).
Fix windows build
* WebCore.vcproj/
2008-02-06 Kevin McCullough <>
Rubberstamped by Darin.
<rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
- Reverted the change that caused the regression.
* dom/Document.cpp:
* dom/Document.idl:
2008-02-06 Geoffrey Garen <>
Reviewed by Oliver Hunt.
Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
The problem was refCount underflow in NamedAttrMap.
Neither our regression tests nor the stress test have yet discovered
another instance of this problem.
* dom/NamedAttrMap.cpp:
(WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
for fast and correct refCount management. Also, change a rediculously
slow malloc to a slightly less rediculously slow realloc.
* dom/NamedAttrMap.h:
(WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
for fast and correct refCount management.
* html/HTMLTokenizer.cpp:
(WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
object starts with a refCount of 1.
2008-02-06 Darin Adler <>
Reviewed by Tim Hatcher.
- fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
with View Source window as target
* page/InspectorController.cpp:
(WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
JavaScript disabled.
(WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
it returns false.
2008-02-06 David Hyatt <>
Fix for bug 16799, object elements should return absolute URLs from .data.
Reviewed by Mark Rowe
* dom/Document.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLObjectElement.cpp:
2008-02-05 Antti Koivisto <>
Reviewed by Darin.
<video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
When moving document in and out from the page cache:
- Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
- Restart the load if it was aborted in the middle.
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
2008-02-06 Darin Adler <>
Reviewed by Sam.
- replace calls to put to set up properties with calls to putDirect, to
prepare for a future change where put won't take attributes any more,
and for a slight performance boost
* bindings/js/JSAudioConstructor.cpp:
(WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
* bindings/js/JSEventTargetBase.h:
(WebCore::JSEventTargetPrototype::self): Ditto.
* bindings/js/JSHTMLOptionElementConstructor.cpp:
(WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
* bindings/js/JSSQLResultSetRowListCustom.cpp:
(WebCore::JSSQLResultSetRowList::item): Ditto.
2008-02-06 Dan Bernstein <>
Reviewed by Darin Adler.
- fix
'border-color' does not animate to the value of 'color' when unspecified
Test: fast/css/transition-color-unspecified.html
* page/AnimationController.cpp:
(WebCore::ImplicitAnimation::animate): Changed to use the value of the
'color' property in the source or destination style as the source or
destination value of properties whose inital value is defined to be the
computed value of 'color'.
2008-02-06 Dan Bernstein <>
Build fix.
* svg/
2008-02-05 Oliver Hunt <>
Build fix -- touch generate-bindings to trigger regeneration of bindings
* bindings/scripts/
2008-02-05 Oliver Hunt <>
Re-enable foreignObject by default as it is needed for a number of
non-fO related SVG tests and none of the old known crashes occur
* Configurations/WebCore.xcconfig:
* WebCore.vcproj/WebCore.vcproj:
2008-02-05 Sam Weinig <>
Reviewed by Anders Carlsson.
Fix for
NodeList (and other DOM lists) items are not enumeratable using
- Match Firefox when enumerating DOM interfaces with indexGetters (support for
the array bracket, nodeList[0], notation) by including all the items in the
list before the attributes and methods of the interface.
Test: fast/dom/domListEnumeration.html
* ForwardingHeaders/kjs/PropertyNameArray.h: Added.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model.
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::customGetPropertyNames): ditto.
* bindings/scripts/ Instead of just adding a declaration of
getProperyNames and implementing the method in the Custom.cpp, move to a the
model used by generated getOwnPropertySlot() and put() where the custom code
is written in a separate customGetPropertyNames which returns a bool indicating
whether to call up to the base class. This enables adding the list indexes
to the PropertyNameArray for interfaces with indexGetters automatically.
2008-02-05 Samuel Weinig <>
Reviewed by Darin Adler.
Fix for <rdar://problem/5726604>
dom-checker: deleting properties of the window object cross-domain should not be allowed
Fix flaw found while testing with dom-checker testing tool (
Test: http/tests/security/cross-frame-access-delete.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::deleteProperty): Override deleteProperty to not delete cross-domain.
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::deleteProperty): ditto.
* bindings/js/JSLocation.cpp:
(WebCore::JSLocation::deleteProperty): ditto.
* bindings/js/JSLocation.h:
* bindings/scripts/ Add deleteProperty declaration when CustomDeleteProperty is used.
* page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
* page/History.idl: ditto.
2008-02-05 Alp Toker <>
Rubber-stamped by Mark Rowe.
Fix a "missing sentinel in function call" warning by using NULL
instead of 0.
* platform/gtk/RenderThemeGtk.cpp:
2008-02-05 Nikolas Zimmermann <>
Reviewed by Oliver.
Fix dynamic updates of <circle> element's properties.
Added tests: svg/dynamic-updates/SVGCircleElement*
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
* svg/SVGCircleElement.h:
2008-02-05 Rodney Dawes <>
Wx build fix. Add WebCore/plugins to the include path.
* webcore-base.bkl:
2008-02-05 Mark Rowe <>
Mac build fix. Update the Xcode project to follow a moved file,
and track a rename in two files that were missed earlier.
* WebCore.xcodeproj/project.pbxproj:
* page/mac/
(-[WebCoreFrameBridge canProvideDocumentSource]):
* platform/mac/
2008-02-05 Nikolas Zimmermann <>
Reviewed by Holger.
Fix dynamic SVG DOM updates of <a> element's href property.
This commit also introduces a new SVG Tests framework: LayoutTests/svg/dynamic-updates
Its purpose is to provide dynamic updating tests for each SVG class & property, aka.
one test per property per class. As a first pass it's sufficient to add testcases for all
SVG*Element classes, and their properties - and only common-used base-class properties.
For SVGAElement - for example - it makes most sense to test scripting its parent
SVGURIReference object ('href' property) and its own property 'target'.
Adding tests to see - for example - if SVGAElement reacts on changes on ie. its parent
SVGExternalResourcesRequired interface, should really be done in a second pass.
All tests within the new framework are supposed to be created using make-js-tests-wrappers.
Added test: svg/dynamic-updates/SVGAElement-dom-href-attr.js
Added test: svg/dynamic-updates/SVGAElement-dom-target-attr.js
Added test: svg/dynamic-updates/SVGAElement-svgdom-href-prop.js
Added test: svg/dynamic-updates/SVGAElement-svgdom-target-prop.js
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::parseMappedAttribute): Move any setChanged() handling in svgAttributeChanged.
(WebCore::SVGAElement::defaultEventHandler): Use href() not getAttribute(hrefAttr) - otherwhise SVG DOM updates fail!
* svg/SVGAElement.h:
2008-02-05 Justin Garcia <>
Reviewed by Alexey Proskuryakov.
<rdar://problem/5685601> webkit-block-placeholder class on placeholders seems unnecessary (12317)
* editing/CompositeEditCommand.cpp:
(WebCore::createBlockPlaceholderElement): The khtml-block-placeholder class was needed
when the editing code actively looked for <br>s of that type in order to handle them
specially. That is no longer the case.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Fixed a bug where an extra block
would be inserted when hitting return inside an editable root held open by a placeholder
<br> or '\n'. Added test cases for the bug and for the special case code that was incorrectly
triggered to cause the bug.
2008-02-05 Rodney Dawes <>
Reviewed by Anders Carlsson.
Part one of
Shared PluginDatabase, PluginInfoStore and PluginPackage implementations.
Remove the Win suffix on several plugin-related classes that will
soon be refactored to be more portable.
* WebCore.vcproj/WebCore.vcproj:
* bindings/js/kjs_navigator.cpp:
* bindings/js/kjs_window.cpp:
* bridge/win/FrameWin.cpp:
* dom/Clipboard.cpp:
* dom/DOMImplementation.cpp:
* loader/FrameLoader.cpp:
* page/DragController.cpp:
* platform/PlugInInfoStore.h: Removed.
* platform/gtk/TemporaryLinkStubs.cpp:
* platform/qt/PlugInInfoStoreQt.cpp:
* platform/qt/TemporaryLinkStubs.cpp:
* platform/win/SharedTimerWin.cpp:
* platform/wx/TemporaryLinkStubs.cpp:
* plugins/PluginDatabase.h: Copied from WebCore/plugins/win/PluginDatabaseWin.h.
* plugins/PluginInfoStore.cpp: Copied from WebCore/plugins/win/PlugInInfoStoreWin.cpp.
* plugins/PluginInfoStore.h: Copied from WebCore/platform/PlugInInfoStore.h.
* plugins/PluginPackage.h: Copied from WebCore/plugins/win/PluginPackageWin.h.
* plugins/PluginView.h: Copied from WebCore/plugins/win/PluginViewWin.h.
* plugins/npapi.cpp: Copied from WebCore/plugins/win/npapi.cpp.
* plugins/win/PlugInInfoStoreWin.cpp: Removed.
* plugins/win/PluginDatabaseWin.cpp:
* plugins/win/PluginDatabaseWin.h: Removed.
* plugins/win/PluginPackageWin.cpp:
* plugins/win/PluginPackageWin.h: Removed.
* plugins/win/PluginViewWin.cpp:
* plugins/win/PluginViewWin.h: Removed.
* plugins/win/npapi.cpp: Removed.
2008-02-05 Alexey Proskuryakov <>
Reviewed by Darin.
Setting innerHTML in a detached XHTML element doesn't use the right namespace
Test: fast/dom/innerHTML-detached-element.xhtml
* dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Take parent element namespace
into account.
2008-02-05 Antti Koivisto <>
Reviewed by Geoff.
Fix <rdar://problem/5698200>
eBay photo uploading hangs and causes slow script warning to pop up
In a case like this
var f = window.parent.parentFunction;
document.domain = document.domain; // this makes window.parent inaccessible
Firefox allows parentFunction to access parents properties. Match this behavior.
In a domain security check against the dynamic global object fails for the specific reason that one of
the frames has written to the document.domain property and another has not (but they match otherwise),
then recheck against the lexical global object.
Test: http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
* bindings/js/kjs_window.cpp:
* bindings/js/kjs_window.h:
* loader/FrameLoader.cpp:
* platform/SecurityOrigin.cpp:
* platform/SecurityOrigin.h:
2008-02-05 Adam Roben <>
Remove an unused member from Document
Reviewed by Mitz.
* dom/Document.cpp:
(WebCore::Document::recalcStyleSelector): There's no need to take
m_printSheet into account anymore as it's never anything but the null
* dom/Document.h: Removed m_printSheet and methods relating to it.
2008-02-05 Dan Bernstein <>
Reviewed by Darin Adler.
- WebCore part of <rdar://problem/5724303> Should implement writing direction shortcuts
* WebCore.base.exp: Added Editor::setBaseWritingDirection() and
* page/mac/WebCoreFrameBridge.h: Removed
* page/mac/ Ditto.
2008-02-05 Mark Rowe <>
Reviewed by Oliver Hunt.
Update versioning to support the mysterious future.
* Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
2008-02-05 Mark Rowe <>
Fix the wxWidget Mac build by avoiding using ICU functions that were added after ICU 3.2.
* editing/SmartReplaceICU.cpp:
(WebCore::addAllCodePoints): Implement a replacement for uset_addAllCodePoints.
(WebCore::getSmartSet): Use addAllCodePoints instead of uset_addAllCodePoints.
2008-02-05 Mark Rowe <>
Rubber-stamped by Oliver Hunt.
* ChangeLog: Point out revision 30,000.
2008-02-04 Mark Rowe <>
Unreviewed Gtk build fix.
wchar_t is only convertible to UChar on Windows. Use WebCore's String class
to get the UChars out of a C string in a portable fashion.
* editing/SmartReplaceICU.cpp:
2008-02-04 Tony Chang <>
Reviewed by Darin Adler.
Port the CoreFoundation version of WebCore::isCharacterSmartReplaceExempt
for other platforms by using ICU directly.
* Add SmartReplaceICU.cpp.
* Ditto.
* WebCoreSources.bkl: Ditto.
* editing/SmartReplace.cpp: Don't use this empty implementation when ICU is available.
* editing/SmartReplaceICU.cpp:
2008-02-04 Robert Sesek <>
Reviewed by Darin Adler.
forms without action attributes submit to the <base> href instead of the originating page
Test: fast/forms/missing-action.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit): Submit to origin if there is no action
2008-02-04 Mark Rowe <>
Reviewed by Tim Hatcher.
Gtk build fix. Use std::numeric_limits in place of ULLONG_MAX as
some Linux machines do not have ULLONG_MAX.
OriginUsageRecord::unknownDiskUsage becomes a static function to avoid
the global initialiser which would otherwise be generated.
* storage/OriginUsageRecord.cpp:
* storage/OriginUsageRecord.h:
2008-02-04 Mark Rowe <>
Speculative Gtk build fix.
* storage/OriginUsageRecord.cpp:
2008-02-04 Brady Eidson <>
Attempt to fix build of all non-Mac platforms
* WebCore.vcproj/WebCore.vcproj:
* WebCoreSources.bkl:
2008-02-04 Brady Eidson <>
Reviewed by Darin
Fix for <rdar://problem/5628468> - Quotas need to be implemented per-origin, and not per-database
To accomplish this, we need to track the sizes of all databases in an origin to constantly keep an up to date
count of the origin's total disk usage. I've introduced the OriginQuotaManager and OriginUsageRecord classes
to accomplish this.
Whenever a transaction is known to mutate the size of a database (tracked by the DatabaseAuthorizer), it marks
that database as unknown in the OriginQuotaManager. When a transaction later comes along to ask the
OriginQuotaManager the usage for that origin, it stat's all of the unknown databases in the origin and returns
the result.
Since the OriginQuotaManager is interesting from both the main thread and a DatabaseThread, all accessors it
provides require it to be locked first. ASSERTs help guarantee this is always the case.
Layout test will involve adding functionality to DRT on multiple platforms and will be coming up shortly
* WebCore.xcodeproj/project.pbxproj:
* platform/SecurityOrigin.h: Changed to be ThreadSafeShared instead of RefCounted
* storage/Database.cpp:
(WebCore::Database::databaseSize): Return the current filesize of this database on disk
(WebCore::Database::maximumSize): Added - calculates maximum size of this database based on quota and usage
* storage/Database.h: Add databaseSize() accessor, and get rid of unused declared methods that *were* going
to be the solution for this bug.
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::originQuotaManager): Accessor to the OriginQuotaManager which is lazily created
(WebCore::DatabaseTracker::canEstablishDatabase): Fetch the usage for this database slightly earlier, which
will ensure that the OriginQuotaManager is primed to track this origin
(WebCore::DatabaseTracker::fullPathForDatabase): Ditto
(WebCore::DatabaseTracker::populateOrigins): Create the OriginQuotaManager here.
(WebCore::DatabaseTracker::usageForOrigin): Use the OriginQuotaManager instead of looping through each database
in the origin
(WebCore::DatabaseTracker::deleteOrigin): Remove this origin from the OriginQuotaManager as it is no longer
(WebCore::DatabaseTracker::deleteDatabase): Remove this database from the OriginQuotaManager as it is no longer
* storage/DatabaseTracker.h:
* storage/OriginQuotaManager.cpp: Added.
(WebCore::OriginQuotaManager::trackOrigin): Add an origin to be tracked. Useful for when the very first database
in a new origin is still in the process of being created
(WebCore::OriginQuotaManager::removeOrigin): Removes all records in a certain origin from being tracked
(WebCore::OriginQuotaManager::markDatabase): Mark a specific database as having an unknown size - called when the
DatabaseAuthorizer in a SQLTransaction knows the file size might change.
(WebCore::OriginQuotaManager::diskUsage): Returns the disk usage for the given origin
* storage/OriginQuotaManager.h: Added.
* storage/OriginUsageRecord.cpp: Added.
(WebCore::OriginUsageRecord::addDatabase): Adds an entry for the database in this origin's record
(WebCore::OriginUsageRecord::removeDatabase): Removes that entry
(WebCore::OriginUsageRecord::markDatabase): Marks the database as of unknown size
(WebCore::OriginUsageRecord::diskUsage): Returns the cached disk usage value, or recalculates it if any databases
are marked
* storage/OriginUsageRecord.h: Added.
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::openTransactionAndPreflight): Use Database::maximumSize() instead of attributing the
entire quota to each database.
(WebCore::SQLTransaction::runStatements): Use Database::maximumSize() instead of attributing the entire quota
to each database.
(WebCore::SQLTransaction::runCurrentStatement): Mark this databases's size as unknown in the
OriginQuotaManager if this statement will change the size of the database
* storage/SQLTransaction.h:
2008-02-04 David Harrison <>
Reviewed by Darin Adler.
<rdar://problem/5607381> CrashTracer: [REGRESSION] 1748 crashes in Safari at WebCore::Image::width const + 24
Use an empty image when the local image file could not be loaded.
No test case because it would require forcing tiff load failure.
* editing/DeleteButtonController.cpp:
Do not present the deletion UI in the (odd) event that the delete button could not be loaded.
* platform/graphics/mac/
Return an empty image instead of 0 if the load fails.
2008-02-04 Darin Adler <>
* dom/Document.cpp:
(WebCore::Document::completeURL): Fixed misleading comment.
2008-02-04 Jon Honeycutt <>
Reviewed by Darin.
Blacklist Silverlight versions older than min required, not newer.
* plugins/win/PluginPackageWin.cpp:
2008-02-04 David Hyatt <>
Fix for bug 16751, misparsing of html*.test in CSS.
Reviewed by darin
Added fast/css/simple-selector-chain-parsing.html
* css/CSSGrammar.y:
2008-02-04 Darin Adler <>
Suggested by Geoff and Maciej.
* bindings/js/JSCustomSQLTransactionCallback.cpp: Reworded a misleading
comment to be correct.
2008-02-04 Jon Honeycutt <>
Reviewed by Steve, Anders.
<rdar://problem/5211187> QuickTime and Flash plug-ins draw outside of
content area when inside an iframe or div with overflow when playing a
movie and scrolling the iframe/div area
Clip the update region to the zero rect when scrolling. Don't do this
for Java, because it results in repaint problems.
* plugins/PluginQuirkSet.h: Added the DontClipToZeroRectWhenScrolling
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginViewWin::updateWindow): Readded the old behavior of
clipping to the zero rect when updating the window during a scroll.
Added plug-in quirk to ignore this behavior for Java. Swapped order of
the SetWindowRgn() and MoveWindow() calls to prevent Java from painting
outside of its container during a scroll.
(WebCore::PluginViewWin::determineQuirks): If this is Java, add the
DontClipToZeroRectWhenScrolling quirk.
2008-02-04 Timothy Hatcher <>
Reviewed by Mark Rowe.
<rdar://problem/5722972> Leopard needs to statically link SQLite
* Configurations/Base.xcconfig: Always have a header search path for WebCoreSQLite3.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/WebCore.xcconfig: Always link against WebCoreSQLite3.
2008-02-04 Adam Roben <>
Windows build fix
* bindings/scripts/ Touched to force a rebuild of
the COM bindings.
2008-02-04 David Harrison <>
Reviewed by Tim Hatcher.
- fix <rdar://problem/5715481> REGRESSION (r26499): JavaScript document.lastModified is not supported
Re-add attribute inadvertantly lost by r26499.
Test: fast/js/lastModified.html: Added.
* dom/Document.idl:
Add lastModified.
2008-02-04 Darin Adler <>
Reviewed by Geoff.
- fix <rdar://problem/5713621> Threading issue when destroying database transaction callback
Do main-thread-only stuff on the main thread.
Not clear how to make a regression test for this.
* bindings/js/JSCustomSQLTransactionCallback.cpp:
(WebCore::JSCustomSQLTransactionCallback::Data::Data): Added.
(WebCore::JSCustomSQLTransactionCallback::Data::callback): Added.
(WebCore::JSCustomSQLTransactionCallback::Data::frame): Added.
(WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): Put data into a
separate Data object; we'll destroy it on the main thread.
(WebCore::JSCustomSQLTransactionCallback::deleteData): Added.
(WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback): Call the
deleteData function on the main thread.
(WebCore::JSCustomSQLTransactionCallback::handleEvent): Updated to get at fields through the
m_data object.
* bindings/js/JSCustomSQLTransactionCallback.h: Declare deleteData, Data, and m_data rather
than m_callback and m_frame.
2008-02-04 Adam Roben <>
Fix the search field if the inpsected Document has overridden
Document.evaluate or Document.querySelectorAll
Reviewed by Darin.
* manual-tests/inspector-document-methods-override.html: Added.
* page/InspectorController.cpp:
(WebCore::InspectorController::didCommitLoad): Reworded a comment to
force WebCore.vcproj to build.
* page/inspector/inspector.js: Call
Document.prototype.{evaluate,querySelectorAll}.call instead of calling
the functions directly on the inspected Document. This ensures we are
calling the version of these functions we intended to.
2008-02-04 Darin Adler <>
Reviewed by Tim Hatcher.
- possible fix for <rdar://problem/5714030> Crash in Database::deliverAllPendingCallbacks()
reloading a page quickly
I don't fully understand the cause of the crash, but I think this might
be a helpful change.
* platform/sql/SQLiteTransaction.cpp:
(WebCore::SQLiteTransaction::commit): If the commit fails, don't leave this
transaction and database both marked as "still in progress". As far as I can
tell this does no good, and also seems to do harm.
(WebCore::SQLiteTransaction::rollback): Ditto.
* storage/Database.cpp:
(WebCore::Database::performTransactionStep): Add some assertions to
detect databases stuck in the "transaction in progress" state.
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::openTransactionAndPreflight): Ditto.
(WebCore::SQLTransaction::postflightAndCommit): Ditto.
(WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Ditto.
2008-02-04 Darin Adler <>
Reviewed by Geoff.
- fix <rdar://problem/5715692> REGRESSION (r28570): JavaScript window.scrollTo()
calls no longer accept 'undefined' values
By default, we should accept non-numeric parameters and non-integral numbers for
parameters that expect integers, without throwing exceptions.
While creating the test for this, I ran into a couple minor bugs with the
functions involved, and this patch fixes those too.
Test: fast/dom/non-numeric-values-numeric-parameters.html
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::add): Added. This function has unusual behavior
when passed non-integral values for its second parameter, so it needs to be written
by hand. I think that [Custom] is better here than inventing a new keyword.
* bindings/scripts/ Changed default for "long" and "unsigned long"
to ignore errors rather than failing due to type differences. Also changed a couple
functions to use hashes.
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::removeRule): Remove overload of removeRule without a second
parameters. While we do allow this from JavaScript, it's not a true optional parameter,
but rather just a case of "you can omit parameters and they are treated as undefined"
combined with "undefined turns into 0 when passed to a function that takes an integer".
* css/CSSStyleSheet.idl: Removed [Optional] on the index parameter for removeRule.
This is not truly an optional parameter.
* dom/ProgressEvent.cpp:
(WebCore::ProgressEvent::initProgressEvent): Updated this function to match other
DOM event init functions -- important to do nothing if this is called on the an
already-dispatched event and we need to respect the bubble and cancelable arguments.
Also removed initProgressEventNS. We don't support namespaced events, and if we add
support, it should be across all event classes, not just ProgressEvent.
* dom/ProgressEvent.h: Removed initProgressEventNS.
* dom/ProgressEvent.idl: Ditto.
* dom/Range.cpp:
(WebCore::Range::createContextualFragment): Added a check for 0. This can happen
if the passed-in start container is a node that's not an HTML element and also
does not have a parent.
* html/HTMLOptionsCollection.idl: Added the [Custom] attribute to add, since the
rules for processing its parameters are unusual.
* page/DOMSelection.cpp: Removed the version of setPosition that has only
one parameter. The offset is not really optional.
* page/DOMSelection.h: Ditto.
* page/DOMSelection.idl: Removed the [Optional] keyword for the second parameter of
setPosition. It's not a true optional parameter (see discussion of removeRule above).
* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect): Simplified logic for constraining the X
and Y coordinates, in a way that makes them work even when the window coordinates
are infinite. Also strengthened the assertion.
2008-02-04 Alp Toker <>
Rubber-stamped by Mark Rowe.
Remove all trailing whitespace in the GTK+ port and related
* page/gtk/DragControllerGtk.cpp:
* page/gtk/EventHandlerGtk.cpp:
* page/gtk/FrameGtk.cpp:
* platform/graphics/cairo/AffineTransformCairo.cpp:
(WebCore::AffineTransform::operator== ):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cairo/ImageCairo.cpp:
* platform/graphics/cairo/ImageSourceCairo.cpp:
* platform/graphics/gtk/FontCacheGtk.cpp:
* platform/graphics/gtk/FontGtk.cpp:
* platform/graphics/gtk/FontPlatformData.h:
* platform/graphics/gtk/FontPlatformDataGtk.cpp:
* platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
* platform/graphics/gtk/IconGtk.cpp:
* platform/graphics/gtk/ImageGtk.cpp:
* platform/graphics/gtk/SimpleFontDataGtk.cpp:
* platform/gtk/ClipboardGtk.h:
* platform/gtk/ContextMenuItemGtk.cpp:
* platform/gtk/CursorGtk.cpp:
* platform/gtk/DragDataGtk.cpp:
* platform/gtk/DragImageGtk.cpp:
* platform/gtk/FileChooserGtk.cpp:
* platform/gtk/FileSystemGtk.cpp:
* platform/gtk/KeyEventGtk.cpp:
* platform/gtk/KeyboardCodes.h:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/gtk/MIMETypeRegistryGtk.cpp:
* platform/gtk/MouseEventGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
* platform/gtk/PasteboardHelper.h:
* platform/gtk/PlatformScreenGtk.cpp:
* platform/gtk/PlatformScrollBar.h:
* platform/gtk/PlatformScrollBarGtk.cpp:
* platform/gtk/PopupMenuGtk.cpp:
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/ScrollViewGtk.cpp:
* platform/gtk/SearchPopupMenuGtk.cpp:
* platform/gtk/SharedTimerGtk.cpp:
* platform/gtk/SystemTimeLinux.cpp:
* platform/gtk/TemporaryLinkStubs.cpp:
* platform/gtk/ThreadingGtk.cpp:
* platform/gtk/WheelEventGtk.cpp:
* platform/gtk/WidgetGtk.cpp:
* platform/network/curl/ResourceHandleCurl.cpp:
* platform/network/curl/ResourceHandleManager.cpp:
* platform/network/curl/ResourceHandleManager.h:
* platform/network/curl/ResourceRequest.h:
* platform/network/curl/ResourceResponse.h:
2008-02-03 Christian Dywan <>
Reviewed by Alp Toker.
[GTK] Context menu fixes and customisation suport
Provide standard GTK+ context menu items where appropriate.
Note that this change makes direct use of WebKit from WebCore which is
against WebKit/GTK+ guidelines. The ContextMenu abstraction should be
fixed at some point.
* page/ContextMenuController.cpp:
* platform/ContextMenu.cpp:
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.h:
* platform/gtk/ContextMenuItemGtk.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
2008-02-03 Oliver Hunt <>
Reviewed by Maciej.
Bug 17169: Support transform on Canvas
Nice and simple patch as the cross-platform code to apply
a transform was already there.
Tests: fast/canvas/canvas-transform-identity.html
* html/CanvasRenderingContext2D.cpp:
* html/CanvasRenderingContext2D.h:
* html/CanvasRenderingContext2D.idl:
2008-02-03 Nikolas Zimmermann <>
Reviewed by Oliver.
Fix mistake in SVGImageElement, breaking "Dock" example of
It was comparing against the wrong attribute names in svgAttributeChanged().
Added testcase: svg/custom/js-update-image.svg
* svg/SVGImageElement.cpp:
2008-02-03 Eric Seidel <>
Reviewed by darin.
Acid3 expects textNode.localName === null
Test: fast/dom/Node/initial-values.html
* dom/Comment.cpp: remove localName implementation
* dom/Comment.h:
* dom/Node.cpp: return nullAtom instead of emptyAtom
* dom/Text.cpp: remove localName implementation
* dom/Text.h:
2008-02-03 Eric Seidel <>
Reviewed by darin.
Make createElementNS and createAttributeNS follow the (vague) DOM Core 2 spec
by throwing exceptions for more types of invalid qualified names.
Tests: fast/dom/Document/createAttributeNS-namespace-err.html
* dom/Document.cpp:
* dom/Document.idl:
2008-02-03 Nikolas Zimmermann <>
Reviewed by Eric.
Dramatically improve dynamic update performance in DOM / SVG DOM.
The notifyAttributeChange() sledgehammer is gone now. It was implemented on quite a lot of
SVG*Element classes and blindly reacted on any property change caused by DOM / SVG DOM
by rebuilding style/renderer etc. without actually checking what changed. SVG used a hack
for years that attributeChanged() called notifyAttributeChange() - which results in poor
scripting performance and/or dynamic creation/modification of elements using SVG DOM.
Properly implement childrenChanged / attributeChanged in SVG with some derivation from the HTML code.
Our SVG* element classes implement "svgAttributeChanged(const QualifiedName&)" instead of
"attributeChanged(Attribute*...)" to be able to unify DOM / SVG DOM updates. SVG DOM classes
are aware of the attribute name they belong to. So when using "rectElement.transform.baseVal.getItem(0).setRotate(45)"
SVG DOM updates the <rect> element by calling svgAttributeChanged(SVGNames::transformAttr) on the corresponding
SVGRectElement. So we're now able to handle fast dynamic updates in a unified way - leading to less bugs.
HTML dynamic updates vs. SVG dynamic updates:
1) setAttribute("foo", "bar") -> attributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
2) = "bar" -> HTML code maps to setAttribute calls, ends up taking the same route as 1)
3) = "bar" -> setChanged -> recalcStyle (possible relayout)
1) setAttribute("foo", "bar") -> attributeChanged -> svgAttributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
2) same, currently most functions are not yet converted to this new system! (most noticeable in SVGMarkerElement::setOrientToAngle)
3) same
4) someRectElement.x.baseVal.value = 100 -> svgAttributeChanged -> setChanged/setNeedsLayout (special SVG DOM updating)
The new SVG DOM updating concept 4) uses the same updating logic as 1) and 2), so we're actually modelling the HTML way.
SVG handles calling setChanged/setNeedsLayout in svgAttributeChanged, unlike HTML which uses parseMappedAttribute for that.
Only updated all elements necessary to let us pass layout tests w/o regressions. Need to crawl through
all SVG*Element classes and implement svgAttributeChanged / childrenChanged anywhere needed in a follow-up patch.
* bindings/js/JSSVGPODTypeWrapper.h:
(WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
* bindings/js/JSSVGPathSegListCustom.cpp:
* bindings/js/JSSVGPointListCustom.cpp:
* bindings/js/JSSVGTransformListCustom.cpp:
* bindings/scripts/
* rendering/RenderSVGGradientStop.cpp:
* rendering/RenderSVGGradientStop.h:
* svg/SVGAElement.cpp:
* svg/SVGAElement.h:
* svg/SVGAngle.cpp:
* svg/SVGAngle.h:
* svg/SVGAnimatedTemplate.h:
* svg/SVGAnimationElement.cpp:
* svg/SVGAnimationElement.h:
* svg/SVGCircleElement.cpp:
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
* svg/SVGClipPathElement.h:
* svg/SVGComponentTransferFunctionElement.cpp:
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.cpp:
* svg/SVGElement.cpp:
* svg/SVGElement.h:
* svg/SVGEllipseElement.cpp:
* svg/SVGEllipseElement.h:
* svg/SVGExternalResourcesRequired.cpp:
* svg/SVGExternalResourcesRequired.h:
* svg/SVGFEBlendElement.cpp:
* svg/SVGFEColorMatrixElement.cpp:
* svg/SVGFEComponentTransferElement.cpp:
* svg/SVGFECompositeElement.cpp:
* svg/SVGFEDiffuseLightingElement.cpp:
* svg/SVGFEDisplacementMapElement.cpp:
* svg/SVGFEFloodElement.cpp:
* svg/SVGFEGaussianBlurElement.cpp:
* svg/SVGFEImageElement.cpp:
* svg/SVGFELightElement.cpp:
* svg/SVGFEMergeNodeElement.cpp:
* svg/SVGFEOffsetElement.cpp:
* svg/SVGFESpecularLightingElement.cpp:
* svg/SVGFETileElement.cpp:
* svg/SVGFETurbulenceElement.cpp:
* svg/SVGFilterElement.cpp:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
* svg/SVGFitToViewBox.cpp:
* svg/SVGFitToViewBox.h:
* svg/SVGForeignObjectElement.cpp:
* svg/SVGGElement.cpp:
* svg/SVGGElement.h:
* svg/SVGGradientElement.cpp:
* svg/SVGGradientElement.h:
* svg/SVGImageElement.cpp:
* svg/SVGImageElement.h:
* svg/SVGLangSpace.cpp:
* svg/SVGLangSpace.h:
* svg/SVGLengthList.cpp:
* svg/SVGLengthList.h:
* svg/SVGLineElement.cpp:
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.cpp:
* svg/SVGLinearGradientElement.h:
* svg/SVGList.h:
* svg/SVGMarkerElement.cpp:
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
* svg/SVGMaskElement.h:
* svg/SVGNumberList.cpp:
* svg/SVGNumberList.h:
* svg/SVGPathElement.cpp:
* svg/SVGPathElement.h:
* svg/SVGPathSeg.h:
* svg/SVGPathSegList.cpp:
* svg/SVGPathSegList.h:
* svg/SVGPatternElement.cpp:
* svg/SVGPatternElement.h:
* svg/SVGPointList.cpp:
* svg/SVGPointList.h:
* svg/SVGPolyElement.cpp:
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.cpp:
* svg/SVGPolygonElement.h:
* svg/SVGPolylineElement.cpp:
* svg/SVGPolylineElement.h:
* svg/SVGPreserveAspectRatio.cpp:
* svg/SVGPreserveAspectRatio.h:
* svg/SVGRadialGradientElement.cpp:
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
* svg/SVGStopElement.h:
* svg/SVGStringList.cpp:
* svg/SVGStringList.h:
* svg/SVGStylable.cpp:
* svg/SVGStylable.h:
* svg/SVGStyledElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGStyledLocatableElement.cpp:
* svg/SVGStyledLocatableElement.h:
* svg/SVGStyledTransformableElement.cpp:
* svg/SVGStyledTransformableElement.h:
* svg/SVGTests.cpp: