2010-03-04 Fridrich Strba Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=35726 Remove orphaned #ifdef WTF_USE_GLIB_ICU_UNICODE_HYBRID Removing orphaned #if USE. * platform/ThreadGlobalData.h: 2010-03-03 Jeremy Orlow Reviewed by Darin Fisher. Trottle sync requests sent to the LocalStorage background thread https://bugs.webkit.org/show_bug.cgi?id=34943 Currently, once a second LocalStorage takes all keys/values which have been changed and sends them to a background thread to sync. The problem is that this background thread can get overwhelmed and stop being responsive. This means that if any other page tries to start using LocalStorage (and thus initiates the initial import) that'll block on all the previous syncs completing. To mitigate this, I'm adding code so that we never schedule another sync task when another is still running. In order to keep the sync tasks from growing exponentially when they do take longer than the storage sync interval, I've also added a basic rate limiter. No effort is made to ensure fairness/ordering of what gets synced nor is there any way for this rate to be changed because most normal uses of LocalStorage really shouldn't be hitting these types of limits anyway. The only behavioral change that's observible in JavaScript is time based and thus it's not practical to make new tests that aren't racy. The existing layout tests cover LocalStorage pretty well, though. * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::StorageAreaSync): (WebCore::StorageAreaSync::scheduleFinalSync): (WebCore::StorageAreaSync::syncTimerFired): (WebCore::StorageAreaSync::performSync): * storage/StorageAreaSync.h: 2010-03-04 Andrey Kosyakov Reviewed by Pavel Feldman. Added support for worker instrumentation in inspector (display list of active workers, allow debugging of workers by injecting fake JS implementation) https://bugs.webkit.org/show_bug.cgi?id=35568 * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::createInjectedScript): (WebCore::InjectedScriptHost::injectedScriptFor): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::createInjectedScript): (WebCore::InjectedScriptHost::injectedScriptFor): * dom/Document.cpp: (WebCore::Document::inspectorController): * dom/Document.h: * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::inspectorController): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::injectScript): (WebCore::InjectedScriptHost::nextWorkerId): (WebCore::InjectedScriptHost::didCreateWorker): (WebCore::InjectedScriptHost::willDestroyWorker): * inspector/InjectedScriptHost.h: * inspector/InjectedScriptHost.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::resetScriptObjects): (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::didCreateWorker): (WebCore::InspectorController::willDestroyWorker): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::didCreateWorker): (WebCore::InspectorFrontend::willDestroyWorker): * inspector/InspectorFrontend.h: * inspector/InspectorWorkerResource.h: Added. (WebCore::InspectorWorkerResource::create): (WebCore::InspectorWorkerResource::id): (WebCore::InspectorWorkerResource::url): (WebCore::InspectorWorkerResource::isSharedWorker): (WebCore::InspectorWorkerResource::InspectorWorkerResource): * inspector/front-end/Checkbox.js: Added. (WebInspector.Checkbox.callbackWrapper): (WebInspector.Checkbox): (WebInspector.Checkbox.prototype.checked): * inspector/front-end/InjectedFakeWorker.js: (InjectedFakeWorker.FakeWorker): (InjectedFakeWorker.FakeWorker.prototype.terminate): (InjectedFakeWorker.FakeWorker.prototype._handleException): (InjectedFakeWorker.FakeWorker.prototype._importScripts): (InjectedFakeWorker.FakeWorker.prototype._loadScript): (InjectedFakeWorker.FakeWorker.prototype._expandURLAndCheckOrigin): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled): (WebInspector.ScriptsPanel.prototype.debuggerWasDisabled): (WebInspector.ScriptsPanel.prototype.reset): * inspector/front-end/WebKit.qrc: * inspector/front-end/WorkersSidebarPane.js: Added. (WebInspector.WorkersSidebarPane): (WebInspector.WorkersSidebarPane.prototype.addWorker): (WebInspector.WorkersSidebarPane.prototype.removeWorker): (WebInspector.WorkersSidebarPane.prototype.setInstrumentation): (WebInspector.WorkersSidebarPane.prototype.reset): (WebInspector.WorkersSidebarPane.prototype._onTriggerInstrument): (WebInspector.Worker): (WebInspector.didCreateWorker): (WebInspector.willDestroyWorker): * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::AbstractWorker): (WebCore::AbstractWorker::~AbstractWorker): (WebCore::AbstractWorker::onDestroyWorker): (WebCore::AbstractWorker::contextDestroyed): * workers/AbstractWorker.h: (WebCore::AbstractWorker::id): * workers/SharedWorker.cpp: (WebCore::SharedWorker::SharedWorker): * workers/Worker.cpp: (WebCore::Worker::Worker): 2010-03-04 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic. This also allows shadow builds relying only on qmake to work properly. * WebCore.pro: 2010-03-02 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Avoid calling QFont::detach too often from FontQt https://bugs.webkit.org/show_bug.cgi?id=35569 The letter- and wordspacing is inside the WebCore::Font class, our QFont is located in the WebCore::FontPlatformData. Everytime we need to use a QFont inside WebCore::Font we are calling the font method which gets the QFont from the WebCore::FontPlatformData and is applying the letter- and wordspacing. Internally this will attempt to detach the QFont... Avoid calling setLetterSpacing and setWordSpacing on QFont if the WebCore::Font has the default applied. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::font): 2010-03-04 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Nothing happens on navigation to resource via a link if resource tracking is disabled https://bugs.webkit.org/show_bug.cgi?id=35574 * English.lproj/localizedStrings.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.canShowSourceLine): (WebInspector.ResourcesPanel.prototype._toggleResourceTracking): * inspector/front-end/inspector.js: (WebInspector.documentMouseOver): (WebInspector.documentMouseOut): (WebInspector.hideBadLinkPopupIfNecessary): (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector.showBadLinkPopup.popupOverOut): (WebInspector.showBadLinkPopup): (WebInspector.addMainEventListeners): 2010-03-04 Vangelis Kokkevis Reviewed by Oliver Hunt. getUniformLocation() now returns null if uniform requested is not found. https://bugs.webkit.org/show_bug.cgi?id=34669 Test:LayoutTests/fast/canvas/webgl/uniform-location.html (added missing test) * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniformLocation): 2010-03-04 John Abd-El-Malek Reviewed by Adam Barth. Fix incorrect setup of DateExtension. https://bugs.webkit.org/show_bug.cgi?id=35710 * bindings/v8/DateExtension.cpp: (WebCore::DateExtension::setAllowSleep): 2010-03-04 Oliver Hunt Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=35603 SVG incorrectly allows nested elements in a shadow tree Simplify the handling of invalid or missing use-targets by cloning them to empty elements rather than just allowing the element to be copied into the shadow tree, as this violates a number of assumptions in the shadow tree handling code. Tests: svg/custom/use-nested-disallowed-target.svg svg/custom/use-nested-missing-target-added.svg svg/custom/use-nested-missing-target-removed.svg svg/custom/use-nested-missing-target.svg svg/custom/use-nested-notarget.svg * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::buildShadowAndInstanceTree): (WebCore::SVGUseElement::expandUseElementsInShadowTree): 2010-03-04 Leandro Pereira Reviewed by Gustavo Noronha Silva. Move Cairo-related font code from platform/graphics/gtk to platform/graphics/cairo, so other ports may use them. http://webkit.org/b/35539 * GNUmakefile.am: * platform/graphics/cairo/FontCacheCairo.cpp: Copied from WebCore/platform/graphics/gtk/FontCacheGtk.cpp. * platform/graphics/cairo/FontCustomPlatformData.cpp: Copied from WebCore/platform/graphics/gtk/FontCustomPlatformData.cpp. * platform/graphics/cairo/FontCustomPlatformData.h: Copied from WebCore/platform/graphics/gtk/FontCustomPlatformData.h. * platform/graphics/cairo/FontPlatformData.h: Copied from WebCore/platform/graphics/gtk/FontPlatformData.h. * platform/graphics/cairo/FontPlatformDataCairo.cpp: Copied from WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp. * platform/graphics/cairo/GlyphPageTreeNodeCairo.cpp: Copied from WebCore/platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp. * platform/graphics/cairo/SimpleFontDataCairo.cpp: Copied from WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp. * platform/graphics/gtk/FontCacheGtk.cpp: Removed. * platform/graphics/gtk/FontCustomPlatformData.cpp: Removed. * platform/graphics/gtk/FontCustomPlatformData.h: Removed. * platform/graphics/gtk/FontPlatformData.h: Removed. * platform/graphics/gtk/FontPlatformDataGtk.cpp: Removed. * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp: Removed. * platform/graphics/gtk/SimpleFontDataGtk.cpp: Removed. 2010-03-04 Evan Stade Reviewed by David Levin. https://bugs.webkit.org/show_bug.cgi?id=35261 [skia] crash when attempting to render certain SVGs This fixes the crash, but the SVG still doesn't render properly. Test: svg/custom/tiling-regular-hexagonal-crash.svg * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): don't return 0 when the copy fails; instead return a blank bitmap. The caller doesn't check for 0 before dereferencing. 2010-03-04 Tony Chang Reviewed by Darin Fisher. Initialize m_isMultipartPayload in other ResourceResponse ctor. In r55451 (bug 35628) I added an extra bool, but only initialized it in one constructor. https://bugs.webkit.org/show_bug.cgi?id=35719 * platform/network/chromium/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): 2010-03-03 Yuta Kitamura Reviewed by Alexey Proskuryakov. Add a new class that stores information about Web Socket handshake request. Instances of this class contain the necessary information to send a Web Socket handshake request. In the future, this class will provide request information to the Web Inspector. WebSocketHandshake needs to provide request information https://bugs.webkit.org/show_bug.cgi?id=34784 No new tests, since the current tests will suffice (LayoutTests/websocket/*). * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * websockets/WebSocketChannel.cpp: * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): * websockets/WebSocketHandshake.h: * websockets/WebSocketHandshakeRequest.cpp: Added. (WebCore::WebSocketHandshakeRequest::WebSocketHandshakeRequest): (WebCore::WebSocketHandshakeRequest::~WebSocketHandshakeRequest): (WebCore::WebSocketHandshakeRequest::addExtraHeaderField): (WebCore::WebSocketHandshakeRequest::headerFields): (WebCore::WebSocketHandshakeRequest::host): * websockets/WebSocketHandshakeRequest.h: Added. 2010-03-03 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. Build fix after r55452. No new tests, this is a build fix. * page/Settings.cpp: (WebCore::Settings::setDatabasesEnabled): 2010-03-03 Diego Gonzalez Reviewed by Kenneth Rohde Christiansen. Make keyIdentifierForQtKeyCode return the unicode backspace value on Qt PlatformKeyboardEvent LayoutTests: fast/events/key-events-in-input-text.html fast/events/special-key-events-in-input-text.html [Qt] Return the unicode backspace value in keyIdentifierForQtKeyCode on Qt PlatformKeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=35694 * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::keyIdentifierForQtKeyCode): 2010-03-03 Chad Faragher Reviewed by Darin Adler. Changed the double-click framework code to pass adjusted page coordinates for zoomed pages. Added a new test to expose mistreatment of mouse click coordinates during a double-click. https://bugs.webkit.org/show_bug.cgi?id=35690 Test: fast/events/zoom-dblclick.html * dom/Node.cpp: (WebCore::Node::dispatchMouseEvent): 2010-03-03 David Levin No review, rolling out r55474. The patch broke fast/frames/sandboxed-iframe-storage.html Last one (I hope). * WebCore.xcodeproj/project.pbxproj: 2010-03-03 David Levin No review, rolling out r55474. The patch broke fast/frames/sandboxed-iframe-storage.html Unfortunately, (the webkit-patch rollout and) I missed these in r55485. * bindings/js/JSDatabaseCallback.cpp: Removed. * bindings/js/JSDatabaseCallback.h: Removed. * bindings/v8/custom/V8DatabaseCallback.cpp: Removed. * bindings/v8/custom/V8DatabaseCallback.h: Removed. * storage/DatabaseCallback.h: Removed. 2010-03-02 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Fix a bug that could lead to a crash. Some parts of SQLTransaction::checkAndHandleClosedDatabase() should only be run when that method is invoked on the DB thread. We cannot test this fix with a test, because the crash happens only when all of the following conditions are met: 1. A database is closing. 2. A transaction on that database is in progress. 3. The transaction is in a state where a statement/transaction success/error callback needs to be invoked (so there's a task for this transaction pending on the main thread). 4. The DB thread finished processing all its tasks and called SQLTransactionCoordinator::shutdown() before the main thread go to that task. The closest thing we have to a test is running LayoutTests/storage/database-lock-after-reload.html 1000 times in a row. Without the patch, the probability of a crash happening in one of the runs is very high. With the patch, the test should reliably run 1000 times in a row without a single crash. https://bugs.webkit.org/show_bug.cgi?id=35624 * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::checkAndHandleClosedDatabase): 2010-03-03 Darin Fisher Reviewed by Mark Rowe. Page should not care about Chromium plug-in implementation details https://bugs.webkit.org/show_bug.cgi?id=35623 * WebCore.gypi: Compile PluginViewNone.cpp * page/Page.cpp: (WebCore::Page::privateBrowsingStateChanged): Remove conditional compilation for PLATFORM(CHROMIUM). 2010-03-03 David Levin No review, rolling out r55474. http://trac.webkit.org/changeset/55480 The patch broke fast/frames/sandboxed-iframe-storage.html * Android.jscbindings.mk: * Android.v8bindings.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * bindings/js/JSDOMWindowCustom.cpp: * bindings/v8/custom/V8DOMWindowCustom.cpp: * dom/Document.cpp: (WebCore::Document::postTask): * page/DOMWindow.cpp: (WebCore::DOMWindow::openDatabase): * page/DOMWindow.h: * page/DOMWindow.idl: * storage/Database.cpp: (WebCore::Database::openDatabase): (WebCore::Database::Database): (WebCore::Database::performOpenAndVerify): * storage/Database.h: * workers/WorkerContext.cpp: (WebCore::WorkerContext::openDatabase): * workers/WorkerContext.h: 2010-03-03 David Levin No review, rolling out r55480. http://trac.webkit.org/changeset/55480 The patch broke fast/frames/sandboxed-iframe-storage.html * storage/Database.cpp: * storage/Database.h: 2010-03-03 Mark Rowe Reviewed by Geoff Garen. Add virtual memory tags for TCMalloc and WebCore's purgeable buffers. * platform/mac/PurgeableBufferMac.cpp: (WebCore::PurgeableBuffer::create): Use the VM tag. 2010-03-03 Dumitru Daniliuc Reviewed by nobody, build fix. Move #include "DatabaseCallback.h" from Database.h to Database.cpp. * storage/Database.cpp: * storage/Database.h: 2010-03-03 Darin Adler Fixed Mac build. * WebCore.xcodeproj/project.pbxproj: Marked a couple of headers "private" so they can be used in the WebKit project. 2010-03-03 Alexey Proskuryakov Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=35044 Crash in XML tokenizer reloading zoom-coords-viewattr-01-b.svg I'm often getting a crash even when opening the test for the first time in Safari, but it doesn't seem to crash in DumpRenderTree. Still, I can't think of a stronger way to test for this condition, so no new regression test. * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::end): Be prepared that parsing remaining input will pause parsing. 2010-03-03 Dumitru Daniliuc Reviewed by Adam Barth. Adding support for the optional creation callback that could be passed to openDatabase(). Test: storage/open-database-creation-callback.html https://bugs.webkit.org/show_bug.cgi?id=34726 * Android.jscbindings.mk * Android.v8bindings.mk * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::openDatabase): * bindings/js/JSDatabaseCallback.cpp: Added. (WebCore::JSDatabaseCallback::JSDatabaseCallback): (WebCore::JSDatabaseCallback::~JSDatabaseCallback): (WebCore::JSDatabaseCallback::handleEvent): * bindings/js/JSDatabaseCallback.h: Added. (WebCore::JSDatabaseCallback::create): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::openDatabaseCallback): * bindings/v8/custom/V8DatabaseCallback.cpp: Added. (WebCore::V8DatabaseCallback::V8DatabaseCallback): (WebCore::V8DatabaseCallback::~V8DatabaseCallback): (WebCore::V8DatabaseCallback::handleEvent): * bindings/v8/custom/V8DatabaseCallback.h: Added. (WebCore::V8DatabaseCallback::create): * page/DOMWindow.cpp: (WebCore::DOMWindow::openDatabase): * page/DOMWindow.h: * page/DOMWindow.idl: * storage/Database.cpp: (WebCore::DatabaseCreationCallbackTask::create): (WebCore::DatabaseCreationCallbackTask::performTask): (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): (WebCore::Database::openDatabase): (WebCore::Database::Database): (WebCore::Database::performOpenAndVerify): (WebCore::Database::performCreationCallback): * storage/Database.h: (WebCore::Database::isNew): * storage/DatabaseCallback.h: Added. (WebCore::DatabaseCallback::~DatabaseCallback): * workers/WorkerContext.cpp: (WebCore::WorkerContext::openDatabase): * workers/WorkerContext.h: 2010-03-03 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: resources panel only shows uncompressed resource size. https://bugs.webkit.org/show_bug.cgi?id=35403 * English.lproj/localizedStrings.js: * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateScriptObject): * inspector/front-end/AbstractTimelinePanel.js: (WebInspector.AbstractTimelinePanel.prototype.refresh): * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype.doRun): (WebInspector.AuditRules.GzipRule.prototype._shouldCompress): * inspector/front-end/ImageView.js: (WebInspector.ImageView): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get resourceSize): (WebInspector.Resource.prototype.set resourceSize): (WebInspector.Resource.prototype.get transferSize): (WebInspector.Resource.CompareBySize): (WebInspector.Resource.CompareByTransferSize): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.populateSidebar): (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphLabels): (WebInspector.ResourceTransferSizeCalculator.prototype.computeBarGraphLabels): (WebInspector.ResourceTransferSizeCalculator.prototype.computeBarGraphPercentages): (WebInspector.ResourceTransferSizeCalculator.prototype._value): (WebInspector.ResourceTransferSizeCalculator.prototype._networkBytes): (WebInspector.ResourceSidebarTreeElement.CompareByDescendingTransferSize): (WebInspector.ResourceGraph.prototype.refreshLabelPositions): (WebInspector.ResourceGraph.prototype.refresh): * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: (WebInspector.updateResource): 2010-03-03 Dan Bernstein Build fix. * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren): 2010-03-03 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Get rid of synchronous debuggerEnabled, profilerEnabled calls. https://bugs.webkit.org/show_bug.cgi?id=32331 * inspector/InspectorBackend.cpp: * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): (WebInspector.ProfilesPanel.prototype.profilerWasEnabled): (WebInspector.ProfilesPanel.prototype.profilerWasDisabled): (WebInspector.ProfilesPanel.prototype._updateInterface): (WebInspector.ProfilesPanel.prototype._enableProfiling): (WebInspector.ProfilesPanel.prototype._toggleProfiling): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled): (WebInspector.ScriptsPanel.prototype.debuggerWasDisabled): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype.canShowSourceLine): (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): (WebInspector.ScriptsPanel.prototype._enableDebugging): (WebInspector.ScriptsPanel.prototype._toggleDebugging): 2010-03-03 Eric Carlson Reviewed by Adele Peterson. Replace 'autobuffer' attribute with 'preload' to align with spec revision 4811. https://bugs.webkit.org/show_bug.cgi?id=35385 rdar://problem/7689602 Tests: media/audio-constructor-preload.html media/video-dom-preload.html * html/HTMLAttributeNames.in: Remove autobuffer, add preload * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::createForJSConstructor): set preload to 'auto' instead of autobuffer to true. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_preload. (WebCore::HTMLMediaElement::parseMappedAttribute): Deal with 'preload' attribute. (WebCore::HTMLMediaElement::loadResource): Call setPreload() on the newly created MediaPlayer, before calling load() so it can pass the setting through to the media engine. (WebCore::HTMLMediaElement::preload): New. (WebCore::HTMLMediaElement::setPreload): Ditto * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): Initialize m_preload. (WebCore::MediaPlayer::load): Pass m_preload to newly created media engine. (WebCore::MediaPlayer::preload): New, return m_preload. (WebCore::MediaPlayer::setPreload): New, set m_preload. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayer::): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setPreload): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::setPreload): Renamed from setAutoplay, fix logic for preload. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 2010-03-03 Dan Bernstein Reviewed by Sam Weinig. Assertion failure when replacing the contents of a