blob: 2aaa728d13fac8cd9e84278e946ff68977f4d30f [file] [log] [blame]
2009-02-26 Mark Rowe <mrowe@apple.com>
Merge r41190.
2009-02-24 Sam Weinig <sam@webkit.org>
Reviewed by Geoffrey Garen.
Related to <rdar://problem/6590295>
Allow disabling javascript: urls.
* WebCore.base.exp:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::executeIfJavaScriptURL):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setJavaScriptURLsAreAllowed):
(WebCore::Page::javaScriptURLsAreAllowed):
* page/Page.h:
2009-01-28 Ada Chan <adachan@apple.com>
Merge the rest of r33579.
Reviewed by Steve Falkenburg.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::makeFinalRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookies):
(WebCore::cookies):
(WebCore::cookiesEnabled):
2009-01-20 Mark Rowe <mrowe@apple.com>
Merge r33579.
2008-05-19 Ada Chan <adachan@apple.com>
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:
(WebCore::makeFinalRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/network/win/CookieJarCFNetWin.cpp:
(WebCore::setCookies):
(WebCore::cookies):
(WebCore::cookiesEnabled):
* platform/network/win/CookieStorageWin.cpp: Added.
(WebCore::currentCookieStorage):
(WebCore::setCurrentCookieStorage):
* platform/network/win/CookieStorageWin.h: Added.
2009-01-19 Mark Rowe <mrowe@apple.com>
Merge r33993.
2008-05-21 Beth Dakin <bdakin@apple.com>
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-
check.
2009-01-19 Mark Rowe <mrowe@apple.com>
Merge r39247.
2008-12-11 Steve Falkenburg <sfalken@apple.com>
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 <mrowe@apple.com>
Merge r37628.
2008-10-15 Jon Honeycutt <jhoneycutt@apple.com>
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 <mrowe@apple.com>
Merge r37897.
2008-10-27 Anders Carlsson <andersca@apple.com>
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/ResourceHandleMac.mm:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::setDefersLoading):
2008-10-22 Mark Rowe <mrowe@apple.com>
Merge r37793.
2008-10-22 Brady Eidson <beidson@apple.com>
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 http://trac.webkit.org/changeset/25329
* html/HTMLInputElement.h: Work around insane Visual Studio enum issue *sigh*
2008-10-21 Mark Rowe <mrowe@apple.com>
Merge r37704.
2008-10-19 Dan Bernstein <mitz@apple.com>
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 <mrowe@apple.com>
Merge r31577.
2008-04-02 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
Ensure that debug symbols are generated for x86_64 and ppc64 builds.
* Configurations/Base.xcconfig:
2008-10-13 Steve Falkenburg <sfalken@apple.com>
Roll out r36884.
* platform/graphics/GraphicsContext.h:
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::CGContextWithHDC):
(WebCore::GraphicsContext::GraphicsContext):
2008-10-07 Mark Rowe <mrowe@apple.com>
Merge r35415.
2008-07-28 Brady Eidson <beidson@apple.com>
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:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::parseMappedAttribute):
(WebCore::HTMLFormElement::didRestoreFromCache):
(WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
(WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::setInputType):
(WebCore::HTMLInputElement::saveState):
(WebCore::HTMLInputElement::parseMappedAttribute):
(WebCore::HTMLInputElement::needsCacheCallback):
(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.
(WebCore::HTMLInputElement::didRestoreFromCache):
(WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
(WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
* html/HTMLInputElement.h:
2008-10-07 Mark Rowe <mrowe@apple.com>
Merge r35362.
2008-07-25 Brady Eidson <beidson@apple.com>
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:
(WebCore::HTMLInputElement::init):
(WebCore::HTMLInputElement::autoComplete):
(WebCore::HTMLInputElement::parseMappedAttribute):
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::):
2008-10-06 Mark Rowe <mrowe@apple.com>
Merge r33567.
2008-05-18 Darin Adler <darin@apple.com>
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 <mrowe@apple.com>
Merge r36108.
2008-09-04 Brady Eidson <beidson@apple.com>
Reviewed by Mitz
<rdar://problem/6180236> - Safari times out connections after 1 or 2 minutes
A 60-second default timeout was added in http://trac.webkit.org/changeset/17144 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/ResourceRequestMac.mm:
(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 <mrowe@apple.com>
Merge r36811.
2008-09-23 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Oliver Hunt, okayed by Darin Adler.
<rdar://problem/5575547> REGRESSION: ATOK has no phrase boundary on Safari/Mail.app
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintCompositionUnderline): Add 2 pixel spacing between clauses.
2008-10-06 Mark Rowe <mrowe@apple.com>
Merge r37008.
2008-09-27 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=21178
<rdar://problem/6248651>
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:
(WebCore::PluginView::load):
2008-10-04 Mark Rowe <mrowe@apple.com>
Merge r35278.
2008-07-21 Mark Rowe <mrowe@apple.com>
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 <sfalken@apple.com>
Merge r36748, r36750
2008-09-21 Steve Falkenburg <sfalken@apple.com>
Removed unnecessary nested timer check.
Rubber-stamped by Dan Bernstein.
* platform/win/SharedTimerWin.cpp:
(WebCore::TimerWindowWndProc):
2008-09-21 Steve Falkenburg <sfalken@apple.com>
Improve timer resolution on WinXP.
https://bugs.webkit.org/show_bug.cgi?id=20979
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:
(WebCore::):
(WebCore::TimerWindowWndProc):
(WebCore::setSharedTimerFireTime):
* platform/win/SystemTimeWin.cpp:
(WebCore::currentTime):
2008-09-21 Mark Rowe <mrowe@apple.com>
Merge r35182.
2008-07-15 Adam Roben <aroben@apple.com>
WebCore part of adding WebKit[Set]ShouldUseFontSmoothing functions
<rdar://6059127>
Reviewed by John Sullivan.
* platform/graphics/win/FontCGWin.cpp:
(WebCore::Font::drawGlyphs): Pass the result of
WebCoreShouldUseFontSmoothing() into wkSetFontSmoothingStyle.
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::WebCoreSetShouldUseFontSmoothing):
(WebCore::WebCoreShouldUseFontSmoothing):
Added.
* platform/win/WebCoreTextRenderer.h:
2008-09-14 Mark Rowe <mrowe@apple.com>
Merge r35950.
2008-08-27 Timothy Hatcher <timothy@apple.com>
Add support for support for -webkit-appearance: default-button on the Mac platform.
<rdar://problem/6173530>
Reviewed by Dave Hyatt.
* WebCore.base.exp: Export new symbols.
* platform/mac/WebCoreSystemInterface.h: Add wkAdvanceDefaultButtonPulseAnimation.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Remove #if PLATFORM(WIN).
(WebCore::RenderButton::setStyle): Ditto.
* rendering/RenderButton.h: Ditto.
* rendering/RenderThemeMac.mm:
(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 <mrowe@apple.com>
Merge r32881.
2008-05-05 Steve Falkenburg <sfalken@apple.com>
Add support for default button appearance.
Add WebCore setting for app chrome mode.
Reviewed by Dave Hyatt.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in: Added default-button value keyword.
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setApplicationChromeMode):
* page/Settings.h:
(WebCore::Settings::inApplicationChromeMode):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton):
(WebCore::RenderButton::setStyle):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderStyle.h:
(WebCore::):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
(WebCore::RenderTheme::isControlStyled):
(WebCore::RenderTheme::isDefault):
* rendering/RenderTheme.h:
(WebCore::):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::determineState):
(WebCore::RenderThemeSafari::adjustRepaintRect):
(WebCore::RenderThemeSafari::adjustButtonStyle):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::supportsFocus):
2008-04-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam.
<rdar://problem/5832603> REGRESSION: Adding an image to the header image well causes Journal page to incorrectly draw
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
Make sure to chain up to ContainerNode::childrenChanged.
2008-04-03 Mark Rowe <mrowe@apple.com>
Merge r31320 to Safari-3-1-branch.
2008-03-26 Adam Roben <aroben@apple.com>
Fix Bug 17768: REGRESSION (r30146): Inspector no longer shows elements
properties
<http://bugs.webkit.org/show_bug.cgi?id=17768>
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 <mrowe@apple.com>
Merge r31438 to Safari-3-1-branch.
2008-03-29 Sam Weinig <sam@webkit.org>
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:
(WebCore::FrameLoader::cannotShowURLError):
* loader/FrameLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::cannotShowURLError):
(WebCore::ResourceLoader::wasBlocked):
(WebCore::ResourceLoader::cannotShowURL):
* loader/ResourceLoader.h:
* platform/KURL.h:
(WebCore::KURL::isValid):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::create):
(WebCore::ResourceHandle::scheduleFailure):
(WebCore::ResourceHandle::fireFailure):
(WebCore::portAllowed):
* platform/network/ResourceHandle.h:
(WebCore::ResourceHandle::):
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::cannotShowURL):
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
2008-03-31 Mark Rowe <mrowe@apple.com>
Merge r31434 to Safari-3-1-branch.
2008-03-29 Sam Weinig <sam@webkit.org>
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:
(WebCore::ResourceHandle::scheduleBlockedFailure):
(WebCore::ResourceHandle::fireBlockedFailure):
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
Make the Timer a member variable of ResourceHandleInternal so
that it can be canceled if the ResourceHandle is destroyed.
2008-03-31 Mark Rowe <mrowe@apple.com>
Merge r30722 to Safari-3-1-branch.
2008-03-03 Mark Rowe <mrowe@apple.com>
Reviewed by Dan Bernstein.
Fix http://bugs.webkit.org/show_bug.cgi?id=17313
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 <mrowe@apple.com>
Merge r31153 to Safari-3-1-branch.
2008-03-19 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
- fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: 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 <mrowe@apple.com>
Merge r31071 to Safari-3-1-branch.
2008-03-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam.
<rdar://problem/5794989>
https://bugs.webkit.org/show_bug.cgi?id=17792
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 somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::createWindow):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::createWindow):
* loader/FrameLoader.h:
2008-03-28 Mark Rowe <mrowe@apple.com>
Merge r31336 to Safari-3-1-branch.
2008-03-26 Justin Garcia <justin.garcia@apple.com>
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 <mrowe@apple.com>
Merge r31144 to Safari-3-1-branch.
2008-03-18 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
<rdar://problem/5725058>
Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
fast/dom/NodeList/5725058-crash-scenario-2.html
fast/dom/NodeList/5725058-crash-scenario-3.html
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
* 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:
(WebCore::ClassNodeList::ClassNodeList):
Don't pass the needsNotifications argument to DynamicNodeList.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
Rename call to hasNodeLists() to hasNodeListCaches().
* dom/Document.cpp:
(WebCore::Document::Document):
(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:
(WebCore::DynamicNodeList::DynamicNodeList):
(WebCore::DynamicNodeList::~DynamicNodeList):
(WebCore::DynamicNodeList::invalidateCache):
(WebCore::DynamicNodeList::Caches::Caches):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeList::hasOwnCaches):
Remove the needsNotifications concept from DynamicNodeList, instead, manually
invalidate the cache for lists that own their own cache.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* 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:
(WebCore::TagNodeList::TagNodeList):
Don't pass the needsNotifications argument to DynamicNodeList.
2008-03-17 Mark Rowe <mrowe@apple.com>
Merge r31069 to Safari-3-1-branch.
2008-03-14 Dan Bernstein <mitz@apple.com>
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 <mrowe@apple.com>
Merge r30992 to Safari-3-1-branch.
2008-03-12 David Harrison <harrison@apple.com>
Reviewed by Darin.
<rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[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:
(WebCore::Document::attach):
Assert that there is no AX cache (since there is no renderer).
(WebCore::Document::detach):
Destroy the AX cache installed on this document.
(WebCore::Document::clearAXObjectCache):
New. Destroy the AX cache associated with this document.
(WebCore::Document::axObjectCache):
Added some comments.
* dom/Document.h:
Declare clearAXObjectCache().
* page/Frame.cpp:
(WebCore::Frame::disconnectOwnerElement):
Destroy the AX cache associated with this frame's document.
* page/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::remove):
* page/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject initWithRenderer:]):
(-[WebCoreAXObject detach]):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::~RenderObject):
* rendering/RenderObject.h:
(WebCore::RenderObject::setHasAXObject):
(WebCore::RenderObject::hasAXObject):
Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::destroy):
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 <mrowe@apple.com>
Merge r30716 to Safari-3-1-branch.
2008-03-03 David Hyatt <hyatt@apple.com>
Fix for <rdar://problem/5776161> REGRESSION: Google Docs Spreadsheet crash
This is also http://bugs.webkit.org/show_bug.cgi?id=17543, fixed table layout corrupts heap.
Make sure not to access position -1 of the size 0 vectors.
Reviewed by ggaren
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::layout):
2008-03-03 Jon Honeycutt <jhoneycutt@apple.com>
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 <mrowe@apple.com>
Merge r30692 to Safari-3-1-branch.
2008-02-29 Brady Eidson <beidson@apple.com>
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 <mrowe@apple.com>
Merge r30689 to Safari-3-1-branch.
2008-02-29 Brady Eidson <beidson@apple.com>
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 <hyatt@apple.com>
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:
(WebCore::CSSStyleSelector::checkSelector):
2008-02-28 Mark Rowe <mrowe@apple.com>
Reviewed by Dave Hyatt.
<rdar://problem/5767534> REGRESSION (r29976): discovermagazine.com lays out incorrect (17564)
Roll r29976 out of Safari-3-1-branch.
* css/CSSGrammar.y:
2008-02-27 Mark Rowe <mrowe@apple.com>
Merge r30634 to Safari-3-1-branch.
2008-02-27 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
Fix for <rdar://problem/5768769>
- Don't allow cross-origin calls using window.functionName.call(otherFrame)
syntax.
* 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/CodeGeneratorJS.pm: Ditto.
2008-02-26 Mark Rowe <mrowe@apple.com>
Merge r30617 to Safari-3-1-branch.
2008-02-26 Antti Koivisto <antti@apple.com>
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:
(WebCore::JSDOMWindow::customGetOwnPropertySlot):
* bindings/js/kjs_window.cpp:
(KJS::Window::allowsAccessFrom):
(KJS::Window::allowsAccessFromNoErrorMessage):
(KJS::Window::allowsAccessFromPrivate):
(KJS::Window::crossDomainAccessErrorMessage):
* bindings/js/kjs_window.h:
2008-02-22 Mark Rowe <mrowe@apple.com>
Build fix.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send): Qualify references to symbols in the KJS namespace.
2008-02-22 Mark Rowe <mrowe@apple.com>
Merge r30493 to Safari-3-1-branch.
2008-02-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
associated objects @ www.viamichelin.it, 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 gmail.com, since gmail.com 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:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::send):
2008-02-22 Mark Rowe <mrowe@apple.com>
Merge r30489 to Safari-3-1-branch.
2008-02-22 Jon Honeycutt <jhoneycutt@apple.com>
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 <timothy@apple.com>
Merge r30472 to Safari-3-1-branch.
2008-02-21 Sam Weinig <sam@webkit.org>
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:
(WebCore::JSAttr::setValue):
* bindings/js/JSElementCustom.cpp:
(WebCore::allowSettingSrcToJavascriptURL):
* bindings/js/JSHTMLFrameElementCustom.cpp:
(WebCore::allowSettingJavascriptURL):
* bindings/js/JSHTMLIFrameElementCustom.cpp:
(WebCore::JSHTMLIFrameElement::setSrc):
2008-02-22 Timothy Hatcher <timothy@apple.com>
<rdar://problem/5758900> REGRESSION (Ceto-Fireclaw): Margins/padding expand on
hover for some headlines on The Huffington Post
Roll out r29649.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesVertically):
(WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
* rendering/RenderObject.h:
* rendering/bidi.cpp:
(WebCore::inlineFlowRequiresLineBox):
(WebCore::RenderBlock::findNextLineBreak):
2008-02-21 Mark Rowe <mrowe@apple.com>
Merge r30461 to Safari-3-1-branch.
2008-02-21 Antti Koivisto <antti@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/5753789>
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:
(KJS::Window::allowsAccessFrom):
(KJS::Window::allowsAccessFromPrivate):
* bindings/js/kjs_window.h:
2008-02-21 Mark Rowe <mrowe@apple.com>
Merge r30458 to Safari-3-1-branch.
2008-02-21 Geoffrey Garen <ggaren@apple.com>
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 <mrowe@apple.com>
Merge r30433 to Safari-3-1-branch.
2008-02-20 Sam Weinig <sam@webkit.org>
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 <timothy@apple.com>
Merge r30423 to Safari-3-1-branch.
2008-02-20 Alexey Proskuryakov <ap@webkit.org>
Build fix.
* xml/XMLHttpRequest.cpp:
(WebCore::isSafeRequestHeader):
(WebCore::XMLHttpRequest::setRequestHeader):
2008-02-20 Timothy Hatcher <timothy@apple.com>
Merge r30422 to Safari-3-1-branch.
2008-02-20 Alexey Proskuryakov <ap@webkit.org>
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 <mrowe@apple.com>
Merge r30395 to Safari-3-1-branch.
2008-02-18 Brady Eidson <beidson@apple.com>
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.mm:
(-[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 <mrowe@apple.com>
Merge r30392 to Safari-3-1-branch.
2008-02-18 Dan Bernstein <mitz@apple.com>
Reviewed by Dave Hyatt.
- fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
Test: fast/css/font-face-multiple-remote-sources.html
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::fontLoaded):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontLoaded):
2008-02-18 Mark Rowe <mrowe@apple.com>
Merge r30389 to Safari-3-1-branch.
2008-02-18 Stephanie Lewis <slewis@apple.com>
Reviewed by Adam.
Remove workaround for <rdar://problem/5695848>.
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::doUpdateResourceResponse):
2008-02-18 Mark Rowe <mrowe@apple.com>
Merge r30370 to Safari-3-1-branch.
2008-02-18 Jon Honeycutt <jhoneycutt@apple.com>
Reviewed by Darin.
<rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
slow script Flash 9 dialog at http://www.kidzui.com
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
plug-in.
(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 <sfalken@apple.com>
Build fix.
* WebCore.vcproj/build-generated-files.sh:
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30331 to Safari-3-1-branch.
2008-02-15 Brady Eidson <beidson@apple.com>
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
made.
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:
(WebCore::MessageQueue::killed):
* 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::Database):
(WebCore::Database::~Database):
(WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
thread.
(WebCore::Database::stop): Stop this database, including all queued transactions and callbacks
* storage/Database.h:
(WebCore::Database::stopped):
* storage/DatabaseThread.cpp:
(WebCore::DatabaseThread::terminationRequested):
* 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
(WebCore::SQLTransaction::performNextStep):
(WebCore::SQLTransaction::performPendingCallback):
* storage/SQLTransaction.h:
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30330 to Safari-3-1-branch.
2008-02-15 Adele Peterson <adele@apple.com>
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 <mrowe@apple.com>
Merge r30329 to Safari-3-1-branch.
2008-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Alice.
<rdar://problem/5738678>
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:
(WebCore::setHTTPBody):
(WebCore::httpBodyFromRequest):
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30328 to Safari-3-1-branch.
2008-02-15 Geoffrey Garen <ggaren@apple.com>
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.
See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getResponseText):
(WebCore::XMLHttpRequest::getResponseXML):
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30326 to Safari-3-1-branch.
2008-02-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
* editing/SelectionController.cpp:
(WebCore::SelectionController::nodeWillBeRemoved):
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30325 to Safari-3-1-branch.
2008-02-15 Alice Liu <alice.liu@apple.com>
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:
(WebCore::JSCustomSQLStatementCallback::handleEvent):
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
* bindings/js/JSCustomSQLTransactionCallback.cpp:
(WebCore::JSCustomSQLTransactionCallback::handleEvent):
* bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
(WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
* bindings/js/JSCustomVoidCallback.cpp:
(WebCore::JSCustomVoidCallback::handleEvent):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/kjs_events.cpp:
(WebCore::JSAbstractEventListener::handleEvent):
(WebCore::JSLazyEventListener::parseCode):
* bindings/js/kjs_html.cpp:
(WebCore::runtimeObjectImplementsCall):
* bindings/js/kjs_proxy.cpp:
(WebCore::KJSProxy::isEnabled):
* bindings/js/kjs_proxy.h:
* bindings/js/kjs_window.cpp:
(KJS::Window::retrieveWindow):
(KJS::Window::retrieve):
* dom/Document.cpp:
(WebCore::Document::createHTMLEventListener):
* dom/EventTarget.cpp:
(WebCore::EventTarget::dispatchGenericEvent):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::createNPObject):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::evaluateScript):
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseTag):
(WebCore::HTMLTokenizer::processToken):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::executeScript):
(WebCore::FrameLoader::userGestureHint):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::dispatchWindowObjectAvailable):
(WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
* manual-tests/disable-javascript-reload.html: Added.
* page/Frame.cpp:
(WebCore::Frame::scriptProxy):
(WebCore::Frame::bindingRootObject):
(WebCore::Frame::windowScriptNPObject):
* page/Frame.h:
* page/InspectorController.cpp:
(WebCore::canPassNodeToJavaScript):
* page/mac/FrameMac.mm:
(WebCore::Frame::windowScriptObject):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::createSVGEventListener):
2008-02-17 Mark Rowe <mrowe@apple.com>
Merge r30323 to Safari-3-1-branch.
2008-02-15 Dan Bernstein <mitz@apple.com>
Reviewed by Alexey Proskuryakov.
- WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
<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/ResourceResponseMac.mm:
(WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
workaround logic into WebCoreURLResponse.
* platform/network/mac/WebCoreURLResponse.h: Added.
* platform/network/mac/WebCoreURLResponse.mm: 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 <mrowe@apple.com>
Merge r30285 to Safari-3-1-branch.
2008-02-15 Adam Roben <aroben@apple.com>
* bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
regenerate.
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30269 to Safari-3-1-branch.
2008-02-14 Adam Roben <aroben@apple.com>
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.
* GNUmakefile.am:
* WebCore.vcproj/build-generated-files.sh:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::customGetOwnPropertySlot):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* dom/Event.cpp:
(WebCore::Event::isMessageEvent):
* dom/Event.h:
* dom/MessageEvent.cpp:
* dom/MessageEvent.h:
* dom/MessageEvent.idl:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30240 to Safari-3-1-branch.
2008-02-14 Ada Chan <adachan@apple.com>
<rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
Reviewed by Jon and Darin.
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
(WebCore::Frame::searchForLabelsBeforeElement):
(WebCore::Frame::matchLabelsAgainstElement):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30239 to Safari-3-1-branch.
2008-02-14 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff.
Update order files.
* WebCore.order:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30238 to Safari-3-1-branch.
2008-02-14 Oliver Hunt <oliver@apple.com>
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:
(WebCore::DOMWindow::setStatus):
(WebCore::DOMWindow::defaultStatus):
(WebCore::DOMWindow::setDefaultStatus):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30237 to Safari-3-1-branch.
2008-02-14 Anders Carlsson <andersca@apple.com>
Reviewed by Darin.
<rdar://problem/5721790>
Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
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:
(WebCore::NodeListsNodeData::~NodeListsNodeData):
(WebCore::Node::getElementsByName):
(WebCore::Node::getElementsByClassName):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30233 to Safari-3-1-branch.
2008-02-14 Timothy Hatcher <timothy@apple.com>
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:
(WebCore::DatabaseTracker::deleteDatabaseFile):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30222 to Safari-3-1-branch.
2008-02-13 Justin Garcia <justin.garcia@apple.com>
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 <mrowe@apple.com>
Merge r30218 to Safari-3-1-branch.
2008-02-13 Jon Honeycutt <jhoneycutt@apple.com>
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
handle.
* plugins/PluginQuirkSet.h: Added new quirk
PluginQuirkDontSetNullWindowHandleOnDestroy.
(WebCore::):
* 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 <mrowe@apple.com>
Merge r30213 to Safari-3-1-branch.
2008-02-13 Justin Garcia <justin.garcia@apple.com>
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 <mrowe@apple.com>
Merge r30195 to Safari-3-1-branch.
2008-02-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
<rdar://problem/5740042> Database termination issues
Test: storage/close-during-stress-test.html
* dom/Document.cpp:
(WebCore::Document::databaseThread):
* 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:
(WebCore::DatabaseThread::requestTermination):
* 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 <mrowe@apple.com>
Merge r30189 to Safari-3-1-branch.
2008-02-12 Timothy Hatcher <timothy@apple.com>
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
markAsDeletedAndClose.
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30184 to Safari-3-1-branch.
2008-02-12 Brady Eidson <beidson@apple.com>
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"
SecurityOrigin
* storage/Database.cpp:
(WebCore::Database::changeVersion): Pass in the successCallback
(WebCore::Database::transaction): Ditto
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::SQLTransaction):
(WebCore::SQLTransaction::debugStepName):
(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
(WebCore::SQLTransaction::handleTransactionError):
(WebCore::SQLTransaction::deliverTransactionErrorCallback):
(WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
* storage/SQLTransaction.h:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30179 to Safari-3-1-branch.
2008-02-12 Dan Bernstein <mitz@apple.com>
Reviewed by Adam Roben.
- fix http://bugs.webkit.org/show_bug.cgi?id=17041
<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
getFontDataForCharacters().
(WebCore::createMLangFont): Ditto.
(WebCore::FontCache::getFontDataForCharacters):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30174 to Safari-3-1-branch.
2008-02-12 Dan Bernstein <mitz@apple.com>
Reviewed by Timothy Hatcher.
- <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setShadow):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30173 to Safari-3-1-branch.
2008-02-12 Brady Eidson <beidson@apple.com>
Release build fix
* storage/DatabaseTask.cpp:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30172 to Safari-3-1-branch.
2008-02-12 Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
Reviewed by Brady.
http://bugs.webkit.org/show_bug.cgi?id=17177
<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:
(WebCore::DatabaseTask::database):
(WebCore::DatabaseTransactionTask::transaction):
Changed tasks to hold more information internally. Added helpers for better debug logging.
* storage/DatabaseTask.cpp:
(WebCore::DatabaseTask::DatabaseTask):
(WebCore::DatabaseTask::performTask):
(WebCore::DatabaseOpenTask::DatabaseOpenTask):
(WebCore::DatabaseOpenTask::doPerformTask):
(WebCore::DatabaseOpenTask::debugTaskName):
(WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
(WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
(WebCore::DatabaseTransactionTask::doPerformTask):
(WebCore::DatabaseTransactionTask::debugTaskName):
(WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
(WebCore::DatabaseTableNamesTask::doPerformTask):
(WebCore::DatabaseTableNamesTask::debugTaskName):
Implementation for the above.
(WebCore::DatabaseTask::lockForSynchronousScheduling):
(WebCore::DatabaseTask::waitForSynchronousCompletion):
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:
(WebCore::DatabaseThread::DatabaseThread):
(WebCore::DatabaseThread::requestTermination):
(WebCore::DatabaseThread::databaseThread):
(WebCore::DatabaseThread::scheduleTask):
(WebCore::DatabaseThread::scheduleImmediateTask):
(WebCore::DatabaseThread::unscheduleDatabaseTasks):
* storage/DatabaseThread.h:
Changed to use MessageQueue.
* storage/Database.cpp:
(WebCore::guidMutex):
(WebCore::guidToVersionMap):
(WebCore::guidToDatabaseMap):
(WebCore::Database::openDatabase):
(WebCore::Database::Database):
(WebCore::Database::~Database):
(WebCore::Database::openAndVerifyVersion):
(WebCore::guidForOriginAndName):
(WebCore::Database::changeVersion):
(WebCore::Database::transaction):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::scheduleTransactionStep):
(WebCore::Database::scheduleTransactionCallback):
(WebCore::Database::version):
(WebCore::Database::deliverPendingCallback):
(WebCore::Database::tableNames):
* 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 <mrowe@apple.com>
Merge r30171 to Safari-3-1-branch.
2008-02-12 Adam Roben <aroben@apple.com>
Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
<http://bugs.webkit.org/show_bug.cgi?id=17328>
<rdar://5737946>
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 <mrowe@apple.com>
Merge r30162 to Safari-3-1-branch.
2008-02-11 Dan Bernstein <mitz@apple.com>
Reviewed by Dave Hyatt.
- fix http://bugs.webkit.org/show_bug.cgi?id=17320
<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 <mrowe@apple.com>
Merge r30157 to Safari-3-1-branch.
2008-02-11 Sam Weinig <sam@webkit.org>
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
fast/dom/Window/window-function-frame-getter-precedence.html
http/tests/security/cross-frame-access-get-override.html
http/tests/security/cross-frame-access-location-get-override.html
http/tests/security/cross-frame-access-location-get.html
http/tests/security/cross-frame-access-location-put.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::customGetOwnPropertySlot):
- 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:
(WebCore::JSHistory::customGetOwnPropertySlot):
- 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
access.
* bindings/js/JSLocation.cpp:
(WebCore::JSLocation::getOwnPropertySlot):
- 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.
(WebCore::JSLocation::customGetOwnPropertySlot):
- 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
access.
(WebCore::JSLocation::put):
(WebCore::JSLocation::deleteProperty):
(WebCore::JSLocation::getPropertyNames):
* bindings/js/JSLocation.h:
- Clean up to match the rest of the file a little better.
* bindings/js/kjs_binding.cpp:
(WebCore::allowsAccessFromFrame):
(WebCore::printErrorMessageForFrame):
(WebCore::nonCachingStaticFunctionGetter):
(WebCore::objectToStringFunctionGetter):
* 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:
(WebCore::checkNodeSecurity):
- Use the new allowsAccessFromFrame method.
* bindings/js/kjs_window.cpp:
(KJS::Window::childFrameGetter): Cleanup.
(KJS::Window::namedItemGetter): Cleanup.
(KJS::Window::getOwnPropertySlot):
- 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.
(KJS::Window::allowsAccessFrom):
- 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.
(KJS::Window::printErrorMessage):
* bindings/js/kjs_window.h:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30154 to Safari-3-1-branch.
2008-02-11 Timothy Hatcher <timothy@apple.com>
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 <mrowe@apple.com>
Merge r30153 to Safari-3-1-branch.
2008-02-11 David Hyatt <hyatt@apple.com>
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:
(WebCore::CSSStyleSelector::checkOneSelector):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30146 to Safari-3-1-branch.
2008-02-11 Adam Roben <aroben@apple.com>
Fix Bug 14316: Inspector's Console truncates long strings
<http://bugs.webkit.org/show_bug.cgi?id=14316>
<rdar://5357695>
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.
(WebInspector.ConsolePanel.
* 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 <mrowe@apple.com>
Merge r30116 to Safari-3-1-branch.
2008-02-09 David Hyatt <hyatt@apple.com>
Fix for bug 17254, nth-* selectors do not work with negative coefficients.
Reviewed by Mitz.
fast/css/negative-nth-child.html
* css/CSSStyleSelector.cpp:
(WebCore::parseNth):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30112 to Safari-3-1-branch.
2008-02-09 David Hyatt <hyatt@apple.com>
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
possible.
(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:
(WebCore::CSSStyleSelector::checkSelector):
(WebCore::CSSStyleSelector::checkOneSelector):
* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/Attr.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::addChild):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::Element):
(WebCore::Element::recalcStyle):
(WebCore::checkFirstChildRules):
(WebCore::checkLastChildRules):
(WebCore::checkEmptyRules):
(WebCore::checkStyleRules):
(WebCore::Element::childrenChanged):
(WebCore::Element::finishParsingChildren):
* dom/Element.h:
(WebCore::Element::finishedParsingChildren):
(WebCore::Element::beginParsingChildren):
* dom/Node.cpp:
* dom/Node.h:
(WebCore::Node::finishParsingChildren):
(WebCore::Node::beginParsingChildren):
(WebCore::Node::childrenChanged):
* dom/StyledElement.cpp:
(WebCore::StyledElement::StyledElement):
* dom/StyledElement.h:
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::startElementNs):
(WebCore::XMLTokenizer::endElementNs):
(WebCore::):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::HTMLAppletElement):
(WebCore::HTMLAppletElement::finishParsingChildren):
* html/HTMLAppletElement.h:
* html/HTMLElementFactory.cpp:
(WebCore::objectConstructor):
* html/HTMLGenericFormElement.cpp:
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLGenericFormElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
(WebCore::HTMLObjectElement::finishParsingChildren):
(WebCore::HTMLObjectElement::childrenChanged):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::childrenChanged):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):
* html/HTMLOptionElement.h:
* html/HTMLParser.cpp:
(WebCore::HTMLParser::insertNode):
(WebCore::HTMLParser::pushBlock):
(WebCore::HTMLParser::popOneBlockCommon):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::childrenChanged):
(WebCore::HTMLScriptElement::finishParsingChildren):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged):
* html/HTMLSelectElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::finishParsingChildren):
(WebCore::HTMLStyleElement::childrenChanged):
* html/HTMLStyleElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::childrenChanged):
* html/HTMLTitleElement.h:
* rendering/RenderApplet.cpp:
(WebCore::RenderApplet::createWidgetIfNecessary):
* rendering/RenderPartObject.cpp:
(WebCore::RenderPartObject::updateWidget):
* rendering/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
* rendering/RenderStyle.h:
(WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
(WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
(WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
(WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::finishParsingChildren):
* svg/SVGAnimationElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGDefinitionSrcElement.cpp:
(WebCore::SVGDefinitionSrcElement::childrenChanged):
* svg/SVGDefinitionSrcElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::finishParsingChildren):
* svg/SVGElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::childrenChanged):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::childrenChanged):
* svg/SVGGElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::finishParsingChildren):
(WebCore::SVGStyleElement::childrenChanged):
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::childrenChanged):
* svg/SVGStyledElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::childrenChanged):
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::childrenChanged):
* svg/SVGUseElement.h:
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30104 to Safari-3-1-branch.
2008-02-08 Timothy Hatcher <timothy@apple.com>
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 <mrowe@apple.com>
Merge r30101 to Safari-3-1-branch.
2008-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Mitz.
<rdar://problem/5650446>
http://bugs.webkit.org/show_bug.cgi?id=16102
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:
(WebCore::FrameLoader::stopLoadingSubframes):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30098 to Safari-3-1-branch.
2008-02-08 Alp Toker <alp@atoker.com>
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:
(WebCore::Document::userStyleSheet):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30097 to Safari-3-1-branch.
2008-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
<rdar://problem/5724188>
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:
(WebCore::Text::createWithLengthLimit):
* dom/Text.h:
* html/HTMLParser.cpp:
(WebCore::HTMLParser::parseToken):
* loader/TextDocument.cpp:
(WebCore::TextTokenizer::write):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30096 to Safari-3-1-branch.
2008-02-08 Sam Weinig <sam@webkit.org>
Reviewed by Hyatt.
Fix for <rdar://problem/5732491>
http://bugs.webkit.org/show_bug.cgi?id=17213
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 <mrowe@apple.com>
Merge r30087 to Safari-3-1-branch.
2008-02-06 Kimmo Kinnunen <kimmok@iki.fi>
Reviewed by Tim Hatcher.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
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 <mrowe@apple.com>
Merge r30085 to Safari-3-1-branch.
2008-02-07 Ada Chan <adachan@apple.com>
<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 <mrowe@apple.com>
Merge r30081 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
Fix Bug 17138: REGRESSION: Node highlight not updated properly
<http://bugs.webkit.org/show_bug.cgi?id=17138>
<rdar://problem/5719869>
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 <mrowe@apple.com>
Merge r30080 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
Qt and GTK+ build fixes
* platform/gtk/FileSystemGtk.cpp: Added a missing #include.
* platform/qt/FileSystemQt.cpp: Ditto.
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30079 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
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 FrameMac.mm.
Reviewed by Darin.
* WebCore.xcodeproj/project.pbxproj: Added new files to project.
* loader/mac/UserStyleSheetLoader.cpp: Added.
(UserStyleSheetLoader::UserStyleSheetLoader):
(UserStyleSheetLoader::~UserStyleSheetLoader):
* loader/mac/UserStyleSheetLoader.h: Added.
* page/Frame.cpp: Removed setUserStyleSheet[Location]
* page/mac/FrameMac.mm:
(WebCore::Frame::setUserStyleSheetLocation): Moved here from
Frame.cpp.
(WebCore::Frame::setUserStyleSheet): Ditto.
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30078 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
Fix <rdar://5555260> GMail never loads when a user stylesheet is
specified
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
userStyleSheet().
* 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
Mac-only.
* 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::userStyleSheetLocationChanged.
* 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
SharedBuffer::createWithContentsOfFile.
* platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
KURL::fileSystemPath.
* platform/wx/TemporaryLinkStubs.cpp: Ditto.
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30077 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
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 <mrowe@apple.com>
Merge r30076 to Safari-3-1-branch.
2008-02-07 Adam Roben <aroben@apple.com>
Rename fileSize to getFileSize
Rubberstamped by Darin.
* platform/FileSystem.h:
* platform/gtk/FileSystemGtk.cpp:
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::setHTTPBody):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::setupPOST):
* platform/posix/FileSystemPOSIX.cpp:
* platform/qt/FileSystemQt.cpp:
* platform/win/FileSystemWin.cpp:
* platform/wx/FileSystemWx.cpp:
* storage/Database.cpp:
(WebCore::Database::databaseSize):
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::usageForDatabase):
* storage/OriginUsageRecord.cpp:
(WebCore::OriginUsageRecord::diskUsage):
2008-02-15 Mark Rowe <mrowe@apple.com>
Merge r30075 to Safari-3-1-branch.
2008-02-06 Adam Roben <aroben@apple.com>
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 <mitz@apple.com>
Reviewed by Adele Peterson.
- roll out changes to CSS2 system colors from r28775
* css/CSSStyleSelector.cpp:
(WebCore::):
(WebCore::colorForCSSValue):
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
2008-02-07 David Hyatt <hyatt@apple.com>
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:
(WebCore::CSSParser::lex):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
(WebCore::CSSSelector::):
* css/CSSStyleSelector.cpp:
(WebCore::parseNth):
(WebCore::matchNth):
(WebCore::CSSStyleSelector::checkOneSelector):
* css/tokenizer.flex:
* rendering/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
* rendering/RenderStyle.h:
(WebCore::RenderStyle::childIndex):
(WebCore::RenderStyle::setChildIndex):
2008-02-07 Dan Bernstein <mitz@apple.com>
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 <mitz@apple.com>
Reviewed by Darin Adler.
- fix http://bugs.webkit.org/show_bug.cgi?id=17194
Changing text to bold changes font family
Test: platform/mac/fast/text/family-for-font-matched-by-name.html
* platform/mac/WebFontCache.mm:
(+[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 <bdakin@apple.com>
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:
(WebCore::operator<):
(WebCore::TimerBase::setNextFireTime):
* platform/Timer.h:
2008-02-06 Justin Garcia <justin.garcia@apple.com>
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
regress.
* 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 <kevino@theolliviers.com>
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.
http://bugs.webkit.org/show_bug.cgi?id=17179
* platform/ScrollView.h:
* platform/wx/MouseWheelEventWx.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/wx/ScrollViewWx.cpp:
(WebCore::ScrollView::ScrollViewPrivate::bindEvents):
(WebCore::ScrollView::wheelEvent):
(WebCore::ScrollView::maximumScroll):
2008-02-06 Mark Rowe <mrowe@apple.com>
Fix Windows builds.
* WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
2008-02-06 Mark Rowe <mrowe@apple.com>
Mac build fix. Track rename that happened in r30056.
* platform/graphics/mac/GraphicsContextMac.mm:
2008-02-06 Brent Fulgham <bfulgham@gmail.com>
Reviewed by Adam Roben.
http://bugs.webkit.org/show_bug.cgi?id=16979
Conditionalize CoreGraphics vs Cairo support in Windows port.
* WebCore.vcproj/WebCore.vcproj:
* bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
(WebCore::imageFromSelection):
* bridge/win/FrameCairoWin.cpp: Added.
(WebCore::imageFromSelection):
* bridge/win/FrameWin.cpp:
(WebCore::computePageRectsForFrame):
* platform/graphics/SimpleFontData.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
(WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
* 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.
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontCairoWin.cpp: Added.
(WebCore::Font::drawGlyphs):
* platform/graphics/win/FontWin.cpp:
* platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
(WebCore::CGContextWithHDC):
(WebCore::GraphicsContext::inTransparencyLayer):
(WebCore::GraphicsContext::getWindowsContext):
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContextPlatformPrivate::scale):
(WebCore::GraphicsContextPlatformPrivate::rotate):
(WebCore::GraphicsContextPlatformPrivate::translate):
(WebCore::GraphicsContextPlatformPrivate::concatCTM):
(WebCore::setCGStrokeColor):
(WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
* platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::getWindowsContext):
(WebCore::GraphicsContext::inTransparencyLayer):
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContext::concatCTM):
* platform/graphics/win/GraphicsContextWin.cpp:
* platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageCairoWin.cpp: Added.
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
(WebCore::scaleEmToUnits):
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformWidthForGlyph):
* platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformDestroy):
(WebCore::SimpleFontData::platformWidthForGlyph):
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::setShouldApplyMacAscentHack):
(WebCore::SimpleFontData::shouldApplyMacAscentHack):
* platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
* platform/win/DragImageCairoWin.cpp: Added.
(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
* platform/win/DragImageWin.cpp:
2008-02-06 Anders Carlsson <andersca@apple.com>
Reviewed by Darin.
Change httpBodyFromStream to take the request instead of the stream.
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::httpBodyFromRequest):
* platform/network/cf/FormDataStreamCFNet.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdateResourceRequest):
2008-02-06 Kevin McCullough <kmccullough@apple.com>
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 <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Fix windows build
* WebCore.vcproj/build-generated-files.sh:
2008-02-06 Kevin McCullough <kmccullough@apple.com>
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:
(WebCore::Document::createElement):
(WebCore::Document::createElementNS):
(WebCore::Document::getElementById):
(WebCore::Document::parseQualifiedName):
(WebCore::Document::createAttributeNS):
* dom/Document.idl:
2008-02-06 Geoffrey Garen <ggaren@apple.com>
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 <darin@apple.com>
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 <hyatt@apple.com>
Fix for bug 16799, object elements should return absolute URLs from .data.
Reviewed by Mark Rowe
* dom/Document.cpp:
(WebCore::Document::completeURL):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::href):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::data):
2008-02-05 Antti Koivisto <antti@apple.com>
Reviewed by Darin.
<rdar://problem/5726340>
<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:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::willSaveToCache):
(WebCore::HTMLMediaElement::didRestoreFromCache):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::player):
2008-02-06 Darin Adler <darin@apple.com>
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 <mitz@apple.com>
Reviewed by Darin Adler.
- fix http://bugs.webkit.org/show_bug.cgi?17093
'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 <mitz@apple.com>
Build fix.
* svg/svgtags.in:
2008-02-05 Oliver Hunt <oliver@apple.com>
Build fix -- touch generate-bindings to trigger regeneration of bindings
* bindings/scripts/generate-bindings.pl:
2008-02-05 Oliver Hunt <oliver@apple.com>
RS=Eric.
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
anymore.
* Configurations/WebCore.xcconfig:
* WebCore.vcproj/WebCore.vcproj:
2008-02-05 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
NodeList (and other DOM lists) items are not enumeratable using for..in
- 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/CodeGeneratorJS.pm: 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 <sam@webkit.org>
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 (http://code.google.com/p/dom-checker/).
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/CodeGeneratorJS.pm: Add deleteProperty declaration when CustomDeleteProperty is used.
* page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
* page/History.idl: ditto.
2008-02-05 Alp Toker <alp@atoker.com>
Rubber-stamped by Mark Rowe.
Fix a "missing sentinel in function call" warning by using NULL
instead of 0.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::caretBlinkFrequency):
2008-02-05 Nikolas Zimmermann <zimmermann@kde.org>
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 <dobey@wayofthemonkey.com>
Wx build fix. Add WebCore/plugins to the include path.
* webcore-base.bkl:
2008-02-05 Mark Rowe <mrowe@apple.com>
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.mm:
(-[WebCoreFrameBridge canProvideDocumentSource]):
* platform/mac/PlugInInfoStoreMac.mm:
(WebCore::PluginInfoStore::pluginNameForMIMEType):
2008-02-05 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Holger.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=17185
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::svgAttributeChanged):
(WebCore::SVGAElement::defaultEventHandler): Use href() not getAttribute(hrefAttr) - otherwhise SVG DOM updates fail!
* svg/SVGAElement.h:
2008-02-05 Justin Garcia <justin.garcia@apple.com>
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 <dobey@wayofthemonkey.com>
Reviewed by Anders Carlsson.
Part one of http://bugs.webkit.org/show_bug.cgi?id=16924.
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:
(KJS::PluginBase::cachePluginDataIfNecessary):
* bindings/js/kjs_window.cpp:
* bridge/win/FrameWin.cpp:
(WebCore::Frame::createScriptInstanceForWidget):
* dom/Clipboard.cpp:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldUsePlugin):
* page/DragController.cpp:
* platform/PlugInInfoStore.h: Removed.
* platform/gtk/TemporaryLinkStubs.cpp:
(PluginInfoStore::createPluginInfoForPluginAtIndex):
(PluginInfoStore::pluginCount):
(PluginInfoStore::pluginNameForMIMEType):
(WebCore::PluginInfoStore::supportsMIMEType):
* platform/qt/PlugInInfoStoreQt.cpp:
(WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
(WebCore::PluginInfoStore::pluginCount):
(WebCore::PluginInfoStore::pluginNameForMIMEType):
(WebCore::PluginInfoStore::supportsMIMEType):
* platform/qt/TemporaryLinkStubs.cpp:
* platform/win/SharedTimerWin.cpp:
(WebCore::TimerWindowWndProc):
* platform/wx/TemporaryLinkStubs.cpp:
(PluginInfoStore::createPluginInfoForPluginAtIndex):
(PluginInfoStore::pluginCount):
(WebCore::PluginInfoStore::supportsMIMEType):
(PluginInfoStore::pluginNameForMIMEType):
* plugins/PluginDatabase.h: Copied from WebCore/plugins/win/PluginDatabaseWin.h.
* plugins/PluginInfoStore.cpp: Copied from WebCore/plugins/win/PlugInInfoStoreWin.cpp.
(WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
(WebCore::PluginInfoStore::pluginCount):
(WebCore::PluginInfoStore::pluginNameForMIMEType):
(WebCore::PluginInfoStore::supportsMIMEType):
(WebCore::refreshPlugins):
* plugins/PluginInfoStore.h: Copied from WebCore/platform/PlugInInfoStore.h.
* plugins/PluginPackage.h: Copied from WebCore/plugins/win/PluginPackageWin.h.
(WebCore::PluginPackageHash::hash):
(WebCore::PluginPackageHash::equal):
(WTF::):
* plugins/PluginView.h: Copied from WebCore/plugins/win/PluginViewWin.h.
(WebCore::PluginView::plugin):
* plugins/npapi.cpp: Copied from WebCore/plugins/win/npapi.cpp.
(pluginViewForInstance):
(NPN_UserAgent):
* plugins/win/PlugInInfoStoreWin.cpp: Removed.
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::installedPlugins):
(WebCore::PluginDatabase::addExtraPluginPath):
(WebCore::PluginDatabase::refresh):
(WebCore::PluginDatabase::plugins):
(WebCore::addPluginsFromRegistry):
(WebCore::PluginDatabase::getPluginsInPaths):
(WebCore::PluginDatabase::defaultPluginPaths):
(WebCore::PluginDatabase::isMIMETypeRegistered):
(WebCore::PluginDatabase::pluginForMIMEType):
(WebCore::PluginDatabase::MIMETypeForExtension):
(WebCore::PluginDatabase::findPlugin):
(WebCore::PluginDatabase::createPluginView):
* plugins/win/PluginDatabaseWin.h: Removed.
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackage::~PluginPackage):
(WebCore::PluginPackage::freeLibrarySoon):
(WebCore::PluginPackage::freeLibraryTimerFired):
(WebCore::PluginPackage::PluginPackage):
(WebCore::PluginPackage::compareFileVersion):
(WebCore::PluginPackage::storeFileVersion):
(WebCore::PluginPackage::isPluginBlacklisted):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
(WebCore::PluginPackage::unload):
(WebCore::PluginPackage::unloadWithoutShutdown):
(WebCore::PluginPackage::createPackage):
(WebCore::PluginPackage::hash):
(WebCore::PluginPackage::equal):
* plugins/win/PluginPackageWin.h: Removed.
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginRequest::PluginRequest):
(WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
(WebCore::registerPluginView):
(WebCore::PluginViewWndProc):
(WebCore::PluginView::popPopupsStateTimerFired):
(WebCore::PluginView::wndProc):
(WebCore::PluginView::updateWindow):
(WebCore::PluginView::windowClipRect):
(WebCore::PluginView::setFrameGeometry):
(WebCore::PluginView::geometryChanged):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::show):
(WebCore::PluginView::hide):
(WebCore::PluginView::paintMissingPluginIcon):
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::handleEvent):
(WebCore::PluginView::setParent):
(WebCore::PluginView::attachToWindow):
(WebCore::PluginView::detachFromWindow):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::start):
(WebCore::PluginView::stop):
(WebCore::PluginView::setCurrentPluginView):
(WebCore::PluginView::currentPluginView):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::scheduleRequest):
(WebCore::PluginView::load):
(WebCore::PluginView::getURLNotify):
(WebCore::PluginView::getURL):
(WebCore::PluginView::handlePost):
(WebCore::PluginView::postURLNotify):
(WebCore::PluginView::postURL):
(WebCore::PluginView::newStream):
(WebCore::PluginView::write):
(WebCore::PluginView::destroyStream):
(WebCore::PluginView::userAgent):
(WebCore::PluginView::status):
(WebCore::PluginView::getValue):
(WebCore::PluginView::setValue):
(WebCore::PluginView::invalidateTimerFired):
(WebCore::PluginView::invalidateRect):
(WebCore::PluginView::invalidateRegion):
(WebCore::PluginView::forceRedraw):
(WebCore::PluginView::pushPopupsEnabledState):
(WebCore::PluginView::popPopupsEnabledState):
(WebCore::PluginView::arePopupsAllowed):
(WebCore::PluginView::bindingInstance):
(WebCore::PluginView::~PluginView):
(WebCore::PluginView::disconnectStream):
(WebCore::PluginView::determineQuirks):
(WebCore::PluginView::setParameters):
(WebCore::PluginView::PluginView):
(WebCore::PluginView::init):
(WebCore::PluginView::didReceiveResponse):
(WebCore::PluginView::didReceiveData):
(WebCore::PluginView::didFinishLoading):
(WebCore::PluginView::didFail):
(WebCore::PluginView::setCallingPlugin):
(WebCore::PluginView::isCallingPlugin):
* plugins/win/PluginViewWin.h: Removed.
* plugins/win/npapi.cpp: Removed.
2008-02-05 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
http://bugs.webkit.org/show_bug.cgi?id=17158
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 <antti@apple.com>
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
f();
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
http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html
* bindings/js/kjs_window.cpp:
(KJS::Window::allowsAccessFrom):
(KJS::Window::printErrorMessage):
* bindings/js/kjs_window.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldAllowNavigation):
* platform/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccess):
* platform/SecurityOrigin.h:
(WebCore::SecurityOrigin::):
2008-02-05 Adam Roben <aroben@apple.com>
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
string.
* dom/Document.h: Removed m_printSheet and methods relating to it.
2008-02-05 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- WebCore part of <rdar://problem/5724303> Should implement writing direction shortcuts
* WebCore.base.exp: Added Editor::setBaseWritingDirection() and
Frame::baseWritingDirectionForSelectionStart().
* page/mac/WebCoreFrameBridge.h: Removed
-baseWritingDirectionForSelectionStart.
* page/mac/WebCoreFrameBridge.mm: Ditto.
2008-02-05 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
Update versioning to support the mysterious future.
* Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
2008-02-05 Mark Rowe <mrowe@apple.com>
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 <mrowe@apple.com>
Rubber-stamped by Oliver Hunt.
30,000!
* ChangeLog: Point out revision 30,000.
2008-02-04 Mark Rowe <mrowe@apple.com>
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:
(WebCore::getSmartSet):
2008-02-04 Tony Chang <idealisms@gmail.com>
Reviewed by Darin Adler.
Port the CoreFoundation version of WebCore::isCharacterSmartReplaceExempt
for other platforms by using ICU directly.
* GNUmakefile.am: Add SmartReplaceICU.cpp.
* WebCore.pro: Ditto.
* WebCoreSources.bkl: Ditto.
* editing/SmartReplace.cpp: Don't use this empty implementation when ICU is available.
* editing/SmartReplaceICU.cpp:
(getSmartSet):
(WebCore::isCharacterSmartReplaceExempt):
2008-02-04 Robert Sesek <rsesek@bluestatic.org>
Reviewed by Darin Adler.
Fix http://bugs.webkit.org/show_bug.cgi?id=17042
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 <mrowe@apple.com>
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:
(WebCore::OriginUsageRecord::unknownDiskUsage):
(WebCore::OriginUsageRecord::addDatabase):
(WebCore::OriginUsageRecord::removeDatabase):
(WebCore::OriginUsageRecord::markDatabase):
(WebCore::OriginUsageRecord::diskUsage):
* storage/OriginUsageRecord.h:
2008-02-04 Mark Rowe <mrowe@apple.com>
Speculative Gtk build fix.
* storage/OriginUsageRecord.cpp:
2008-02-04 Brady Eidson <beidson@apple.com>
Attempt to fix build of all non-Mac platforms
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCoreSources.bkl:
2008-02-04 Brady Eidson <beidson@apple.com>
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
interesting
(WebCore::DatabaseTracker::deleteDatabase): Remove this database from the OriginQuotaManager as it is no longer
interesting
* storage/DatabaseTracker.h:
* storage/OriginQuotaManager.cpp: Added.
(WebCore::OriginQuotaManager::OriginQuotaManager):
(WebCore::OriginQuotaManager::lock):
(WebCore::OriginQuotaManager::unlock):
(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::tracksOrigin):
(WebCore::OriginQuotaManager::addDatabase):
(WebCore::OriginQuotaManager::removeDatabase):
(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::OriginUsageRecord):
(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 <harrison@apple.com>
Reviewed by Darin Adler.
<rdar://problem/5607381> CrashTracer: [REGRESSION] 1748 crashes in Safari at com.apple.WebCore: 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:
(WebCore::DeleteButtonController::createDeletionUI):
Do not present the deletion UI in the (odd) event that the delete button could not be loaded.
* platform/graphics/mac/ImageMac.mm:
(WebCore::Image::loadPlatformResource):
Return an empty image instead of 0 if the load fails.
2008-02-04 Darin Adler <darin@apple.com>
* dom/Document.cpp:
(WebCore::Document::completeURL): Fixed misleading comment.
2008-02-04 Jon Honeycutt <jhoneycutt@apple.com>
Reviewed by Darin.
Blacklist Silverlight versions older than min required, not newer.
* plugins/win/PluginPackageWin.cpp:
(WebCore::PluginPackageWin::isPluginBlacklisted):
2008-02-04 David Hyatt <hyatt@apple.com>
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 <darin@apple.com>
Suggested by Geoff and Maciej.
* bindings/js/JSCustomSQLTransactionCallback.cpp: Reworded a misleading
comment to be correct.
2008-02-04 Jon Honeycutt <jhoneycutt@apple.com>
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
quirk
(WebCore::):
* 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 <timothy@apple.com>
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 <aroben@apple.com>
Windows build fix
* bindings/scripts/CodeGeneratorCOM.pm: Touched to force a rebuild of
the COM bindings.
2008-02-04 David Harrison <harrison@apple.com>
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 <darin@apple.com>
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 <aroben@apple.com>
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 <darin@apple.com>
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 <darin@apple.com>
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/CodeGeneratorJS.pm: 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 <alp@atoker.com>
Rubber-stamped by Mark Rowe.
Remove all trailing whitespace in the GTK+ port and related
components.
* GNUmakefile.am:
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::dragOperation):
(WebCore::DragController::maxDragImageSize):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::createDraggingClipboard):
* page/gtk/FrameGtk.cpp:
(WebCore::Frame::dragImageForSelection):
* platform/graphics/cairo/AffineTransformCairo.cpp:
(WebCore::AffineTransform::mapRect):
(WebCore::AffineTransform::isIdentity):
(WebCore::AffineTransform::operator== ):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine):
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cairo/ImageCairo.cpp:
* platform/graphics/cairo/ImageSourceCairo.cpp:
(WebCore::createDecoder):
* 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:
(WebCore::ContextMenuItem::createNativeMenuItem):
* platform/gtk/CursorGtk.cpp:
* platform/gtk/DragDataGtk.cpp:
* platform/gtk/DragImageGtk.cpp:
(WebCore::createDragImageIconForCachedImage):
* platform/gtk/FileChooserGtk.cpp:
(WebCore::stringByAdoptingFileSystemRepresentation):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
* platform/gtk/KeyEventGtk.cpp:
* platform/gtk/KeyboardCodes.h:
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::inputElementAltText):
(WebCore::resetButtonDefaultLabel):
(WebCore::fileButtonChooseFileLabel):
(WebCore::fileButtonNoFileSelectedLabel):
(WebCore::contextMenuItemTagOpenImageInNewWindow):
* platform/gtk/MIMETypeRegistryGtk.cpp:
(WebCore::):
* platform/gtk/MouseEventGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
(WebCore::PasteboardSelectionData::markup):
(WebCore::Pasteboard::writeSelection):
* platform/gtk/PasteboardHelper.h:
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenDepth):
(WebCore::screenIsMonochrome):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/gtk/PlatformScrollBar.h:
* platform/gtk/PlatformScrollBarGtk.cpp:
(PlatformScrollbar::PlatformScrollbar):
(PlatformScrollbar::updateThumbPosition):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenu::updateFromElement):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::scrollBy):
(WebCore::ScrollView::addChild):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::windowToContents):
(WebCore::ScrollView::contentsToWindow):
(WebCore::ScrollView::scrollbarUnderMouse):
* platform/gtk/SearchPopupMenuGtk.cpp:
* platform/gtk/SharedTimerGtk.cpp:
* platform/gtk/SystemTimeLinux.cpp:
(WebCore::currentTime):
* platform/gtk/TemporaryLinkStubs.cpp:
(PlugInInfoStore::pluginNameForMIMEType):
* platform/gtk/ThreadingGtk.cpp:
(WebCore::establishIdentifierForThread):
(WebCore::threadForIdentifier):
(WebCore::clearThreadForIdentifier):
(WebCore::ThreadCondition::ThreadCondition):
* platform/gtk/WheelEventGtk.cpp:
* platform/gtk/WidgetGtk.cpp:
* platform/network/curl/ResourceHandleCurl.cpp:
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::setupPOST):
* platform/network/curl/ResourceHandleManager.h:
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/curl/ResourceResponse.h:
2008-02-03 Christian Dywan <christian@imendio.com>
Reviewed by Alp Toker.
http://bugs.webkit.org/show_bug.cgi?id=17046
[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:
(WebCore::ContextMenuController::contextMenuItemSelected):
* platform/ContextMenu.cpp:
(WebCore::createAndAppendInputMethodsSubMenu):
(WebCore::):
(WebCore::insertControlCharacter):
(WebCore::createAndAppendUnicodeSubMenu):
(WebCore::ContextMenu::populate):
(ContextMenu::checkOrEnableIfNeeded):
* platform/ContextMenuItem.h:
(WebCore::):
* platform/LocalizedStrings.h:
* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::gtkStockIDFromContextMenuAction):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::gtkStockLabel):
(WebCore::contextMenuItemTagCopy):
(WebCore::contextMenuItemTagDelete):
(WebCore::contextMenuItemTagSelectAll):
(WebCore::contextMenuItemTagUnicode):
(WebCore::contextMenuItemTagInputMethods):
(WebCore::contextMenuItemTagGoBack):
(WebCore::contextMenuItemTagGoForward):
(WebCore::contextMenuItemTagStop):
(WebCore::contextMenuItemTagCut):
(WebCore::contextMenuItemTagPaste):
(WebCore::contextMenuItemTagBold):
(WebCore::contextMenuItemTagItalic):
(WebCore::contextMenuItemTagUnderline):
2008-02-03 Oliver Hunt <oliver@apple.com>
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
fast/canvas/canvas-transform-infinity.html
fast/canvas/canvas-transform-multiply.html
fast/canvas/canvas-transform-nan.html
fast/canvas/canvas-transform-skewed.html
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::transform):
* html/CanvasRenderingContext2D.h:
* html/CanvasRenderingContext2D.idl:
2008-02-03 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Oliver.
Fix mistake in SVGImageElement, breaking "Dock" example of carto.net
It was comparing against the wrong attribute names in svgAttributeChanged().
Added testcase: svg/custom/js-update-image.svg
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
2008-02-03 Eric Seidel <eric@webkit.org>
Reviewed by darin.
Acid3 expects textNode.localName === null
http://bugs.webkit.org/show_bug.cgi?id=17060
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 <eric@webkit.org>
Reviewed by darin.
Make createElementNS and createAttributeNS follow the (vague) DOM Core 2 spec
by throwing exceptions for more types of invalid qualified names.
http://bugs.webkit.org/show_bug.cgi?id=16833
Tests: fast/dom/Document/createAttributeNS-namespace-err.html
fast/dom/Document/createElementNS-namespace-err.html
* dom/Document.cpp:
(WebCore::Document::createElement):
(WebCore::hasNamespaceError):
(WebCore::Document::createElementNS):
(WebCore::Document::createAttributeNS):
* dom/Document.idl:
2008-02-03 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric.
Fixes: http://bugs.webkit.org/show_bug.cgi?id=15394
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:
HTML:
1) setAttribute("foo", "bar") -> attributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
2) someObject.foo = "bar" -> HTML code maps to setAttribute calls, ends up taking the same route as 1)
3) someObject.style.foo = "bar" -> setChanged -> recalcStyle (possible relayout)
SVG:
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::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
(WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
(WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
(WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
(WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
* bindings/js/JSSVGPathSegListCustom.cpp:
(WebCore::JSSVGPathSegList::clear):
(WebCore::JSSVGPathSegList::initialize):
(WebCore::JSSVGPathSegList::insertItemBefore):
(WebCore::JSSVGPathSegList::replaceItem):
(WebCore::JSSVGPathSegList::removeItem):
(WebCore::JSSVGPathSegList::appendItem):
* bindings/js/JSSVGPointListCustom.cpp:
(WebCore::JSSVGPointList::clear):
(WebCore::JSSVGPointList::initialize):
(WebCore::JSSVGPointList::getItem):
(WebCore::JSSVGPointList::insertItemBefore):
(WebCore::JSSVGPointList::replaceItem):
(WebCore::JSSVGPointList::removeItem):
(WebCore::JSSVGPointList::appendItem):
* bindings/js/JSSVGTransformListCustom.cpp:
(WebCore::JSSVGTransformList::clear):
(WebCore::JSSVGTransformList::initialize):
(WebCore::JSSVGTransformList::getItem):
(WebCore::JSSVGTransformList::insertItemBefore):
(WebCore::JSSVGTransformList::replaceItem):
(WebCore::JSSVGTransformList::removeItem):
(WebCore::JSSVGTransformList::appendItem):
* bindings/scripts/CodeGeneratorJS.pm:
* rendering/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::setStyle):
* rendering/RenderSVGGradientStop.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/SVGAElement.h:
* svg/SVGAngle.cpp:
* svg/SVGAngle.h:
(WebCore::SVGAngle::associatedAttributeName):
* svg/SVGAnimatedTemplate.h:
(WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
(WebCore::SVGAnimatedTemplate::wrapperCache):
(WebCore::SVGAnimatedTemplate::associatedAttributeName):
(WebCore::lookupOrCreateWrapper):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::parseBeginOrEndValue):
* svg/SVGAnimationElement.h:
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):
(WebCore::SVGClipPathElement::canvasResource):
* svg/SVGClipPathElement.h:
(WebCore::SVGClipPathElement::isValid):
(WebCore::SVGClipPathElement::rendererIsNeeded):
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.cpp:
* svg/SVGElement.cpp:
(WebCore::SVGElement::insertedIntoDocument):
(WebCore::SVGElement::attributeChanged):
* svg/SVGElement.h:
(WebCore::SVGElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGEllipseElement.h:
* svg/SVGExternalResourcesRequired.cpp:
(WebCore::SVGExternalResourcesRequired::isKnownAttribute):
* svg/SVGExternalResourcesRequired.h:
* svg/SVGFEBlendElement.cpp:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
* 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:
(WebCore::SVGFitToViewBox::isKnownAttribute):
* svg/SVGFitToViewBox.h:
* svg/SVGForeignObjectElement.cpp:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::svgAttributeChanged):
(WebCore::SVGGElement::childrenChanged):
* svg/SVGGElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::SVGGradientElement):
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):
(WebCore::SVGGradientElement::buildStops):
* svg/SVGGradientElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::parseMappedAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
* svg/SVGImageElement.h:
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::isKnownAttribute):
* svg/SVGLangSpace.h:
* svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::SVGLengthList):
* svg/SVGLengthList.h:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::svgAttributeChanged):
* svg/SVGLinearGradientElement.h:
* svg/SVGList.h:
(WebCore::SVGList::SVGList):
(WebCore::SVGList::associatedAttributeName):
(WebCore::SVGPODList::SVGPODList):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::SVGNumberList):
* svg/SVGNumberList.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathSegList):
* svg/SVGPathElement.h:
* svg/SVGPathSeg.h:
(WebCore::SVGPathSeg::associatedAttributeName):
* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::SVGPathSegList):
* svg/SVGPathSegList.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::SVGPointList):
* svg/SVGPointList.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::SVGPolyElement):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::parseMappedAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.cpp:
* svg/SVGPolygonElement.h:
* svg/SVGPolylineElement.cpp:
* svg/SVGPolylineElement.h:
* svg/SVGPreserveAspectRatio.cpp:
* svg/SVGPreserveAspectRatio.h:
(WebCore::SVGPreserveAspectRatio::associatedAttributeName):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::svgAttributeChanged):
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::parseMappedAttribute):
(WebCore::SVGStopElement::createRenderer):
* svg/SVGStopElement.h:
* svg/SVGStringList.cpp:
(WebCore::SVGStringList::SVGStringList):
* svg/SVGStringList.h:
* svg/SVGStylable.cpp:
* svg/SVGStylable.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::isKnownAttribute):
(WebCore::SVGStyledElement::svgAttributeChanged):
(WebCore::SVGStyledElement::invalidateResourcesInAncestorChain):
(WebCore::SVGStyledElement::childrenChanged):
* svg/SVGStyledElement.h:
* svg/SVGStyledLocatableElement.cpp:
* svg/SVGStyledLocatableElement.h:
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
(WebCore::SVGStyledTransformableElement::parseMappedAttribute):
(WebCore::SVGStyledTransformableElement::isKnownAttribute):
* svg/SVGStyledTransformableElement.h:
* svg/SVGTests.cpp:
(WebCore::SVGTests::requiredFeatures):
(WebCore::SVGTests::requiredExtensions):
(WebCore::SVGTests::systemLanguage):
(WebCore::SVGTests::isKnownAttribute):