2011-03-30 Martin Robinson Try to fix the EFL build. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): Use the new cairo_t accessor on the platform context. 2011-03-30 Abhishek Arya Reviewed by Simon Fraser. Fix wrong type assumptions in editing code. Move code from ASSERTs to hard checks. https://bugs.webkit.org/show_bug.cgi?id=57348 Test: editing/execCommand/remove-format-non-html-element-crash.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * editing/ApplyStyleCommand.cpp: (WebCore::getRGBAFontColor): (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): * editing/DeleteButtonController.cpp: (WebCore::enclosingDeletableElement): * editing/EditingStyle.cpp: (WebCore::EditingStyle::textDirection): (WebCore::EditingStyle::prepareToApplyAt): * editing/Editor.cpp: (WebCore::Editor::textDirectionForSelection): * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::elementForFormatBlockCommand): 2011-03-30 Stephen White Reviewed by Kenneth Russell. Speed up clipping in accelerated 2D canvas. https://bugs.webkit.org/show_bug.cgi?id=57464 Instead of clearing the entire stencil buffer when removing clipping paths, we erase the path with a DECR stencil operation. Covered by canvas/philip/tests/2d.path.clip.intersect.html, and others. * platform/graphics/chromium/GLES2Canvas.cpp: (WebCore::PathAndTransform::PathAndTransform): New structure to keep track of the CTM at the time the clipping path was added. (WebCore::GLES2Canvas::State::State): Replace m_clippingEnabled with a count of total clipping paths. (WebCore::GLES2Canvas::clearRect): Check the total clipping path count, instead of m_clippingEnabled. (WebCore::GLES2Canvas::fillPath): (WebCore::GLES2Canvas::fillRect): Perform state application after doing shadows. This is necessary since restore() may now leave clipping enabled. (WebCore::GLES2Canvas::clipPath): Explicitly specify the stencil operation as INCR. Store the current transformation when saving clipping paths. (WebCore::GLES2Canvas::restore): Don't clear the stencil buffer and re-draw active paths on each restore. Erase the old paths with DECR. (WebCore::GLES2Canvas::drawTexturedRect): Check m_numClippingPaths instead of m_clippingEnabled. (WebCore::GLES2Canvas::beginShadowDraw): Perform state application when drawing hard shadows. (WebCore::GLES2Canvas::endShadowDraw): Check m_numClippingPaths instead of m_clippingEnabled. (WebCore::GLES2Canvas::beginStencilDraw): Make the stencil op a parameter to beginShadowDraw(). (WebCore::GLES2Canvas::applyClipping): Compare against the total number of stencil paths, not just the ones in the current state. * platform/graphics/chromium/GLES2Canvas.h: Make the stencil op a parameter to beginShadowDraw(). 2011-03-29 Dimitri Glazkov Reviewed by Darin Adler. Move factory-like things in EventDispatcher::dispatchMouseEvent to a factory, clean up names and ordering. https://bugs.webkit.org/show_bug.cgi?id=57419 Refactoring, covered by existing tests. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchMouseEvent): Reordered and clarified names. * dom/MouseEvent.cpp: (WebCore::MouseEvent::create): Added a new factory method that takes PlatformMouseEvent. * dom/MouseEvent.h: Added decl. 2011-03-30 Erik Arvidsson Reviewed by Alexey Proskuryakov. Missing DOM bindings for a ping https://bugs.webkit.org/show_bug.cgi?id=51955 Test: fast/dom/ping-attribute-dom-binding.html * html/HTMLAnchorElement.idl: * html/HTMLAreaElement.idl: 2011-03-30 Martin Robinson Reviewed by Dirk Schulze. [Cairo] Better separate the concerns of GraphicsContextCairo https://bugs.webkit.org/show_bug.cgi?id=55150 Add a PlatformContextCairo which right now stores the cairo_t* for a GraphicsContextCairo. Later patches will move logic for tracking ContextShadow and image masking layers into this PlatformContextCairo class. No new tests. This patch is only a code cleanup. * GNUmakefile.am: * platform/graphics/GraphicsContext.h: The platform context is no longer a cairo_t, but our new class the PlatformContextCairo. * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j * platform/graphics/cairo/FontCairo.cpp: Ditto. * platform/graphics/cairo/GradientCairo.cpp: Ditto. * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical changes which now reference platformContext()->cr() to get the cairo_t. * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the PlatformContextCairo instead of the cairo_t. * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class. * platform/graphics/cairo/ImageCairo.cpp: Ditto. * platform/graphics/cairo/PathCairo.cpp: Ditto. * platform/graphics/cairo/PlatformContextCairo.cpp: Added. * platform/graphics/cairo/PlatformContextCairo.h: Added. * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class. * platform/graphics/gtk/IconGtk.cpp: Ditto. * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out m_data with a private section containing the platform context instead of just a cairo_t. * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class. * platform/gtk/WidgetRenderingContext.cpp: Ditto. (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto. * plugins/gtk/PluginViewGtk.cpp: Ditto. 2011-03-30 Patrick Gansterer Unreviewed WinCE build fix for r82465. * CMakeListsWinCE.txt: 2011-03-30 Steve Falkenburg Reviewed by Adam Roben. Update Windows production build logic for new production configurations https://bugs.webkit.org/show_bug.cgi?id=57494 * WebCore.vcproj/QTMovieWinProduction.vsprops: * WebCore.vcproj/WebCore.make: * WebCore.vcproj/WebCoreProduction.vsprops: 2011-03-30 Sam Weinig Reviewed by Brady Eidson. WebKit2: Attempting to view css file from url causes it to download https://bugs.webkit.org/show_bug.cgi?id=57501 * WebCore.exp.in: * platform/MIMETypeRegistry.cpp: (WebCore::initializeUnsupportedTextMIMETypes): (WebCore::initializeMIMETypeRegistry): (WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType): (WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes): * platform/MIMETypeRegistry.h: Add set of unsupported text MIME types, taken from WebKit/mac. 2011-03-30 Brian Weinstein Reviewed by Darin Adler. Crash when closing "Add Bookmark" dialog using the Enter Key https://bugs.webkit.org/show_bug.cgi?id=57294 Protect the FrameView in EventHandler::keyEvent, like we do in other EventHandler functions that could destroy the frame. * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): 2011-03-30 Sheriff Bot Unreviewed, rolling out r82463. http://trac.webkit.org/changeset/82463 https://bugs.webkit.org/show_bug.cgi?id=57482 Assertion failure in Node::rendererIsEditable on multiple editing tests (Requested by aroben|meeting on #webkit). * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2011-03-24 Luiz Agostini Reviewed by Kenneth Rohde Christiansen. [Qt] QNetworkReplyHandler refactoring: signal sequence. https://bugs.webkit.org/show_bug.cgi?id=57049 This is the first step in QNetworkReplyHandler. The main objective here is to create simple invariants: 1 - that the signals metadatachanged, readyRead and finished will come in this order. 2 - that signals metadatachanged and finished will be called exactly once. Having these invariants further simplifications will be possible and will come in future patches. Class QNetworkReplyWrapper was created to handle QNetworkReply object. To connect to the signals of it instead of connecting to the signals of QNetworkReply is what guarantees the sequence of the signals. QNetworkReplyWrapper will be used in future to perform mime type sniffing before sending metadatachanged signal. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper): (WebCore::QNetworkReplyWrapper::~QNetworkReplyWrapper): (WebCore::QNetworkReplyWrapper::release): (WebCore::QNetworkReplyWrapper::resetConnections): (WebCore::QNetworkReplyWrapper::receiveMetaData): (WebCore::QNetworkReplyWrapper::didReceiveFinished): (WebCore::QNetworkReplyHandler::QNetworkReplyHandler): (WebCore::QNetworkReplyHandler::resetState): (WebCore::QNetworkReplyHandler::release): (WebCore::QNetworkReplyHandler::finish): (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): (WebCore::QNetworkReplyHandler::redirect): (WebCore::QNetworkReplyHandler::forwardData): (WebCore::QNetworkReplyHandler::sendNetworkRequest): (WebCore::QNetworkReplyHandler::start): * platform/network/qt/QNetworkReplyHandler.h: (WebCore::QNetworkReplyWrapper::reply): (WebCore::QNetworkReplyWrapper::redirectionTargetUrl): (WebCore::QNetworkReplyWrapper::encoding): (WebCore::QNetworkReplyWrapper::advertisedMimeType): (WebCore::QNetworkReplyHandler::reply): 2011-03-30 Steve Falkenburg Reviewed by Adam Roben. Rename Windows configuration Release_LTCG to Production for clarity https://bugs.webkit.org/show_bug.cgi?id=57465 * WebCore.vcproj/QTMovieWin.vcproj: * WebCore.vcproj/QTMovieWinProduction.vsprops: Copied from Source/WebCore/WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops. * WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops: Removed. * WebCore.vcproj/WebCore.sln: * WebCore.vcproj/WebCore.submit.sln: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreGenerated.vcproj: * WebCore.vcproj/WebCoreProduction.vsprops: Copied from Source/WebCore/WebCore.vcproj/WebCoreReleaseLTCG.vsprops. * WebCore.vcproj/WebCoreReleaseLTCG.vsprops: Removed. 2011-03-30 Brian Weinstein Reviewed by Anders Carlsson. ASSERT(cookieStorageAdapter) when calling stopObservingCookieChanges after WebProcess has crashed https://bugs.webkit.org/show_bug.cgi?id=57477 If someone has called startObservingCookieChanges, and the WebProcess crashes and restarts, the UIProcess will call stopObservingCookieChanges when cookieStorageAdapter is nil. The assert is wrong when the web process crashes, and there is no harm in dispatching a message to nil, so remove the assert. * platform/network/mac/CookieStorageMac.mm: (WebCore::stopObservingCookieChanges): 2011-03-30 Sam Weinig Fix Leopard build. * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::contextMenuItemTagLookUpInDictionary): 2011-03-30 Sam Weinig Reviewed by Anders Carlsson. Add default localization strategy that can be shared by WebKit1 and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=57406 Currently, only WebKit2 uses this default strategy, but WebKit1 should be able to adopt it soon. * platform/DefaultLocalizationStrategy.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp. (WebCore::DefaultLocalizationStrategy::DefaultLocalizationStrategy): * platform/DefaultLocalizationStrategy.h: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h. Copy the implementation of the Localization strategy from WebKit2 into a shared default strategy. * platform/LocalizedStrings.cpp: (WebCore::localizedString): Add default implementation of localization bottleneck function. * platform/LocalizedStrings.h: Add localization macros here, instead of defining them in the above layer. * platform/PlatformStrategies.cpp: (WebCore::PlatformStrategies::createLocalizationStrategy): * platform/PlatformStrategies.h: Add default implementation of strategy creation function which creates the default strategy. * platform/win/LocalizedStringsWin.cpp: Copied from Source/WebCore/platform/mac/LocalizedStringsMac.mm. (WebCore::localizedString): Add stub for windows, this will be update to pull from the bundle in a follow up patch. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add new files. 2011-03-30 Andras Becsi Reviewed by Darin Adler. CSS: Slow parsing of rgb() with percent values https://bugs.webkit.org/show_bug.cgi?id=16708 Implement fast-path parsing for percentage color values. Gain ~30% speedup on http://canvex.lazyilluminati.com/misc/3d.html Relanding with rounding fix after it was rolled out in r82315. * css/CSSParser.cpp: (WebCore::checkForValidDouble): Extend to return the number of characters forming a valid double. (WebCore::parseDouble): Function for parsing double values if they are valid. (WebCore::parseColorIntOrPercentage): Extend parseColorInt to deal with percentage values. (WebCore::parseAlphaValue): Use the new functions. (WebCore::CSSParser::parseColor): Ditto. 2011-03-30 Ofri Wolfus Reviewed by Eric Seidel. Add support for parsing unicode-bidi: -webkit-plaintext. https://bugs.webkit.org/show_bug.cgi?id=57457 Test: css3/unicode-bidi-plaintext-parse.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2011-03-30 Andreas Kling Reviewed by Benjamin Poulain. [Qt] Remove unused variables in GraphicsContext::fillRect() * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2011-03-30 Yael Aharon Reviewed by Eric Seidel. REGRESSION(r82419): New pixel test failure fast/box-shadow/basic-shadows.html https://bugs.webkit.org/show_bug.cgi?id=57442 When checking the position of the inline iterator in the logicallyLastRun, we should not consider BR as text. No new tests as existing test covers this case. * rendering/RenderBlockLineLayout.cpp: (WebCore::reachedEndOfTextRenderer): 2011-03-30 Mario Sanchez Prada Reviewed by Chris Fleizach. AX: GTK: ARIA role is not respected on

and
https://bugs.webkit.org/show_bug.cgi?id=47636 Define new roles in WebCore and map them to ATK accordingly. Test: platform/gtk/accessibility/aria-roles-unignored.html * accessibility/AccessibilityObject.h: Added new roles to represent paragraphs, labels, forms and div sections. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Return ParagraphRole, LabelRole, FormRole and DivRole when needed for the GTK platform only. * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::allowsTextRanges): Consider the new roles now that those kind of nodes won't return true to isGroup(). * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (atkRole): Map new WebCore roles to ATK Roles. (webkit_accessible_get_role): Remove code to define roles for paragraphs, labels, forms and divs based on node's tag name. Update mappings for the Mac platform. * accessibility/mac/AccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Add explicit mappings from the new roles introduced to NSAccessibilityGroupRole. 2011-03-30 Yury Semikhatsky Unreviewed. Build fix for Efl and Qt Win. * inspector/PageDebuggerAgent.cpp: removed ENABLE(WORKERS) guard from code that has nothing to do with workers. 2011-03-30 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: audit run never completes, fails in DOMAgent.js https://bugs.webkit.org/show_bug.cgi?id=57349 - assure document is present before calling DOMAgent.querySelectAll() * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun): 2011-03-30 Yury Semikhatsky Unreviewed. Build fix. * UseJSC.cmake: fix typo PageDebugServer -> PageScriptDebugServer 2011-03-30 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: split debugger agent into Page and Worker-specific ones https://bugs.webkit.org/show_bug.cgi?id=57345 ScriptDebugServer and InspectorDebuggerAgent contain only functionality common for Worker and Page debugger. All specifics is moved into Page/WorkerScriptDebugServer and Page/WorkerDebuggerAgent. * CMakeLists.txt: * GNUmakefile.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::currentCallFrame): * bindings/js/PageScriptDebugServer.cpp: Added. (WebCore::toPage): (WebCore::PageScriptDebugServer::shared): (WebCore::PageScriptDebugServer::PageScriptDebugServer): (WebCore::PageScriptDebugServer::~PageScriptDebugServer): (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::recompileAllJSFunctions): (WebCore::PageScriptDebugServer::getListenersForGlobalObject): (WebCore::PageScriptDebugServer::didPause): (WebCore::PageScriptDebugServer::didContinue): (WebCore::PageScriptDebugServer::didRemoveLastListener): (WebCore::PageScriptDebugServer::setJavaScriptPaused): * bindings/js/PageScriptDebugServer.h: Added. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::sourceParsed): (WebCore::ScriptDebugServer::dispatchFunctionToListeners): (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::pauseIfNeeded): * bindings/js/ScriptDebugServer.h: * bindings/js/WorkerScriptDebugServer.cpp: Added. (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): * bindings/js/WorkerScriptDebugServer.h: Added. (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions): (WebCore::WorkerScriptDebugServer::getListenersForGlobalObject): (WebCore::WorkerScriptDebugServer::didPause): (WebCore::WorkerScriptDebugServer::didContinue): * bindings/v8/PageScriptDebugServer.cpp: Added. (WebCore::retrieveFrame): (WebCore::PageScriptDebugServer::shared): (WebCore::PageScriptDebugServer::PageScriptDebugServer): (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::setClientMessageLoop): (WebCore::PageScriptDebugServer::getDebugListenerForContext): (WebCore::PageScriptDebugServer::runMessageLoopOnPause): (WebCore::PageScriptDebugServer::quitMessageLoopOnPause): * bindings/v8/PageScriptDebugServer.h: Added. (WebCore::PageScriptDebugServer::setEnabled): (WebCore::PageScriptDebugServer::ClientMessageLoop::~ClientMessageLoop): (WebCore::PageScriptDebugServer::~PageScriptDebugServer): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::setPauseOnNextStatement): (WebCore::ScriptDebugServer::breakProgram): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::editScriptSource): (WebCore::toScriptDebugServer): (WebCore::ScriptDebugServer::breakProgramCallback): (WebCore::ScriptDebugServer::v8DebugEventCallback): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::isPaused): * bindings/v8/ScriptDebugServer.h: * bindings/v8/WorkerScriptDebugServer.cpp: Added. (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): * bindings/v8/WorkerScriptDebugServer.h: Added. (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::getDebugListenerForContext): (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::currentCallFrameCallback): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): (WebCore::InjectedScriptHost::debuggerAgent): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::setBreakpointsActive): (WebCore::InspectorDebuggerAgent::removeBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::editScriptSource): (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement): (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement): (WebCore::InspectorDebuggerAgent::resume): (WebCore::InspectorDebuggerAgent::stepOver): (WebCore::InspectorDebuggerAgent::stepInto): (WebCore::InspectorDebuggerAgent::stepOut): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::breakProgram): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): * inspector/PageDebuggerAgent.cpp: Added. (WebCore::PageDebuggerAgent::create): (WebCore::PageDebuggerAgent::PageDebuggerAgent): (WebCore::PageDebuggerAgent::~PageDebuggerAgent): (WebCore::PageDebuggerAgent::startListeningScriptDebugServer): (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): (WebCore::PageDebuggerAgent::scriptDebugServer): * inspector/PageDebuggerAgent.h: Added. * inspector/WorkerDebuggerAgent.cpp: Added. (WebCore::WorkerDebuggerAgent::create): (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent): (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer): (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): (WebCore::WorkerDebuggerAgent::scriptDebugServer): * inspector/WorkerDebuggerAgent.h: Added. 2011-03-30 Levi Weintraub Reviewed by Ryosuke Niwa. Clicking below last line of right-to-left editable text that puts caret in the wrong place https://bugs.webkit.org/show_bug.cgi?id=38087 Moving getLogical[Start/End]BoxWithNode to RootInlineBox and using it in positionForPointWithInlineChildren instead of lastLeafChild, which wasn't correct in the RTL case. Test: editing/selection/click-below-rtl-text.html * editing/visible_units.cpp: (WebCore::logicalStartPositionForLine): Moved to RootInlineBox. (WebCore::logicalEndPositionForLine): Ditto. * editing/visible_units.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForPointWithInlineChildren): Useing getLogicalEndBoxWithNode instead of lastLeafChild. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::getLogicalStartBoxWithNode): Moved and refactored. (WebCore::RootInlineBox::getLogicalEndBoxWithNode): Ditto. * rendering/RootInlineBox.h: 2011-03-30 Yury Semikhatsky Unreviewed. Rollout r82438 and r82436. * CMakeLists.txt: * GNUmakefile.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::currentCallFrame): * bindings/js/PageScriptDebugServer.cpp: Removed. * bindings/js/PageScriptDebugServer.h: Removed. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::shared): (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::addListener): (WebCore::ScriptDebugServer::removeListener): (WebCore::ScriptDebugServer::hasListenersInterestedInPage): (WebCore::toPage): (WebCore::ScriptDebugServer::sourceParsed): (WebCore::ScriptDebugServer::dispatchFunctionToListeners): (WebCore::ScriptDebugServer::setJavaScriptPaused): (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::pauseIfNeeded): (WebCore::ScriptDebugServer::recompileAllJSFunctions): (WebCore::ScriptDebugServer::didAddListener): (WebCore::ScriptDebugServer::didRemoveListener): * bindings/js/ScriptDebugServer.h: * bindings/js/WorkerScriptDebugServer.cpp: Removed. * bindings/js/WorkerScriptDebugServer.h: Removed. * bindings/v8/PageScriptDebugServer.cpp: Removed. * bindings/v8/PageScriptDebugServer.h: Removed. * bindings/v8/ScriptDebugServer.cpp: (WebCore::retrieveFrame): (WebCore::ScriptDebugServer::shared): (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::addListener): (WebCore::ScriptDebugServer::removeListener): (WebCore::ScriptDebugServer::setPauseOnNextStatement): (WebCore::ScriptDebugServer::breakProgram): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::editScriptSource): (WebCore::ScriptDebugServer::setEnabled): (WebCore::ScriptDebugServer::breakProgramCallback): (WebCore::ScriptDebugServer::v8DebugEventCallback): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::didResume): * bindings/v8/ScriptDebugServer.h: (WebCore::ScriptDebugServer::pageCreated): (WebCore::ScriptDebugServer::ClientMessageLoop::~ClientMessageLoop): (WebCore::ScriptDebugServer::setClientMessageLoop): * bindings/v8/WorkerScriptDebugServer.cpp: Removed. * bindings/v8/WorkerScriptDebugServer.h: Removed. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::currentCallFrameCallback): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::setBreakpointsActive): (WebCore::InspectorDebuggerAgent::removeBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::editScriptSource): (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement): (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement): (WebCore::InspectorDebuggerAgent::resume): (WebCore::InspectorDebuggerAgent::stepOver): (WebCore::InspectorDebuggerAgent::stepInto): (WebCore::InspectorDebuggerAgent::stepOut): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::breakProgram): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): * inspector/PageDebuggerAgent.cpp: Removed. * inspector/PageDebuggerAgent.h: Removed. * inspector/WorkerDebuggerAgent.cpp: Removed. * inspector/WorkerDebuggerAgent.h: Removed. 2011-03-30 Yury Semikhatsky Unreviewed. Fix compilation on Windows and EFL. * CMakeLists.txt: * bindings/js/JSBindingsAllInOne.cpp: 2011-03-30 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: split debugger agent into Page and Worker-specific ones https://bugs.webkit.org/show_bug.cgi?id=57345 ScriptDebugServer and InspectorDebuggerAgent contain only functionality common for Worker and Page debugger. All specifics is moved into Page/WorkerScriptDebugServer and Page/WorkerDebuggerAgent. * GNUmakefile.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::currentCallFrame): * bindings/js/PageScriptDebugServer.cpp: Added. (WebCore::toPage): (WebCore::PageScriptDebugServer::shared): (WebCore::PageScriptDebugServer::PageScriptDebugServer): (WebCore::PageScriptDebugServer::~PageScriptDebugServer): (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::recompileAllJSFunctions): (WebCore::PageScriptDebugServer::getListenersForGlobalObject): (WebCore::PageScriptDebugServer::didPause): (WebCore::PageScriptDebugServer::didContinue): (WebCore::PageScriptDebugServer::didRemoveLastListener): (WebCore::PageScriptDebugServer::setJavaScriptPaused): * bindings/js/PageScriptDebugServer.h: Added. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::sourceParsed): (WebCore::ScriptDebugServer::dispatchFunctionToListeners): (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::pauseIfNeeded): * bindings/js/ScriptDebugServer.h: * bindings/js/WorkerScriptDebugServer.cpp: Added. (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): * bindings/js/WorkerScriptDebugServer.h: Added. (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions): (WebCore::WorkerScriptDebugServer::getListenersForGlobalObject): (WebCore::WorkerScriptDebugServer::didPause): (WebCore::WorkerScriptDebugServer::didContinue): * bindings/v8/PageScriptDebugServer.cpp: Added. (WebCore::retrieveFrame): (WebCore::PageScriptDebugServer::shared): (WebCore::PageScriptDebugServer::PageScriptDebugServer): (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::setClientMessageLoop): (WebCore::PageScriptDebugServer::getDebugListenerForContext): (WebCore::PageScriptDebugServer::runMessageLoopOnPause): (WebCore::PageScriptDebugServer::quitMessageLoopOnPause): * bindings/v8/PageScriptDebugServer.h: Added. (WebCore::PageScriptDebugServer::setEnabled): (WebCore::PageScriptDebugServer::ClientMessageLoop::~ClientMessageLoop): (WebCore::PageScriptDebugServer::~PageScriptDebugServer): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::setPauseOnNextStatement): (WebCore::ScriptDebugServer::breakProgram): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::editScriptSource): (WebCore::toScriptDebugServer): (WebCore::ScriptDebugServer::breakProgramCallback): (WebCore::ScriptDebugServer::v8DebugEventCallback): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::isPaused): * bindings/v8/ScriptDebugServer.h: * bindings/v8/WorkerScriptDebugServer.cpp: Added. (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): * bindings/v8/WorkerScriptDebugServer.h: Added. (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer): (WebCore::WorkerScriptDebugServer::getDebugListenerForContext): (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::currentCallFrameCallback): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): (WebCore::InjectedScriptHost::debuggerAgent): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::setBreakpointsActive): (WebCore::InspectorDebuggerAgent::removeBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::resolveBreakpoint): (WebCore::InspectorDebuggerAgent::editScriptSource): (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement): (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement): (WebCore::InspectorDebuggerAgent::resume): (WebCore::InspectorDebuggerAgent::stepOver): (WebCore::InspectorDebuggerAgent::stepInto): (WebCore::InspectorDebuggerAgent::stepOut): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::breakProgram): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): * inspector/PageDebuggerAgent.cpp: Added. (WebCore::PageDebuggerAgent::create): (WebCore::PageDebuggerAgent::PageDebuggerAgent): (WebCore::PageDebuggerAgent::~PageDebuggerAgent): (WebCore::PageDebuggerAgent::startListeningScriptDebugServer): (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): (WebCore::PageDebuggerAgent::scriptDebugServer): * inspector/PageDebuggerAgent.h: Added. * inspector/WorkerDebuggerAgent.cpp: Added. (WebCore::WorkerDebuggerAgent::create): (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent): (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer): (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): (WebCore::WorkerDebuggerAgent::scriptDebugServer): * inspector/WorkerDebuggerAgent.h: Added. 2011-03-30 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Make the getStylesForNode result "styleAttributes" value an array rather than a map https://bugs.webkit.org/show_bug.cgi?id=57440 * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getStylesForNode): (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles): * inspector/InspectorCSSAgent.h: * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getStylesAsync): 2011-03-30 Evan Martin Reviewed by Ryosuke Niwa. Fix a last-second ASSERT in previous change that was wrong. * dom/Document.cpp: (WebCore::Document::setTitle): 2011-03-30 Levi Weintraub Reviewed by Eric Seidel. RTL: Directionality always reset on hard line break https://bugs.webkit.org/show_bug.cgi?id=23124 No longer clearing all BidiContexts when we hit a hard line break. Instead, directionality applied by DOM elements is preserved by reconstructing the context stack ignoring those that didn't come from the DOM. Test: fast/text/international/bidi-br-as-paragraph-separator.html * platform/text/BidiContext.cpp: (WebCore::BidiContext::createUncached): (WebCore::BidiContext::create): (WebCore::copyContextAndRebaselineLevel): Helper to make a copy of a context and recalculate its bidi level. (WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts): Returns the top of a BidiContext stack that's equivalent but without contexts from Unicode directional characters. (WebCore::operator==): Now takes into account embedding source. * platform/text/BidiContext.h: (WebCore::BidiContext::source): Enum to specify whether an embedded bidirectional control came from the DOM/Style or Unicode characters (WebCore::BidiContext::BidiContext): * platform/text/BidiResolver.h: (WebCore::BidiEmbedding::BidiEmbedding): An embedding is now a direction and a hint about where it came from so we can differentiate DOM directions from unicode direction control characters. (WebCore::BidiEmbedding::direction): (WebCore::BidiEmbedding::source): (WebCore::::embed): Now takes a source as well as a direction. (WebCore::::commitExplicitEmbedding): (WebCore::::createBidiRunsForLine): * rendering/InlineIterator.h: (WebCore::bidiNext): (WebCore::bidiFirst): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::determineStartPosition): 2011-03-30 Steve Block Reviewed by Jeremy Orlow. JavaMethod should not expose JavaString in its API https://bugs.webkit.org/show_bug.cgi?id=55765 - Factors out a JavaMethod interface which does not use JNI types. This will allow the Java bridge to be used with objects that don't use JNI directly. The existing jobject-backed implementation is moved to a new JavaMethodJobject class which implements the interface. - Use WTF::String in place of JavaString in the API, as JavaString exposes JNI types in its interface. - Remove the method ID as it uses JNI types. No new tests, refactoring only. * Android.jscbindings.mk: * Android.v8bindings.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bridge/jni/JavaMethod.h: * bridge/jni/JavaMethodJobject.cpp: (JavaMethodJobject::JavaMethodJobject): (JavaMethodJobject::~JavaMethodJobject): (appendClassName): (JavaMethodJobject::signature): * bridge/jni/JavaMethodJobject.h: Copied from Source/WebCore/bridge/jni/JavaMethod.h. (JSC::Bindings::JavaMethodJobject::name): (JSC::Bindings::JavaMethodJobject::returnTypeClassName): (JSC::Bindings::JavaMethodJobject::parameterAt): (JSC::Bindings::JavaMethodJobject::returnType): (JSC::Bindings::JavaMethodJobject::isStatic): (JSC::Bindings::JavaMethodJobject::numParameters): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/v8/JavaClassV8.cpp: (JavaClass::JavaClass): * bridge/jni/v8/JavaInstanceV8.cpp: (JavaInstance::invokeMethod): 2011-03-30 Evan Martin Reviewed by Ryosuke Niwa. clean up Document's handling of title changes https://bugs.webkit.org/show_bug.cgi?id=57433 Document::setTitle has two entry points: 1) from DOM bindings, like document.title="foo" 2) from title tags, like foo in HTML Split these two code paths to make the code easier to follow. Also, replace the repeated pattern of m_rawTitle = "foo"; updateTitle(); with updateTitle("foo"); * dom/Document.cpp: (WebCore::Document::updateTitle): (WebCore::Document::setTitle): (WebCore::Document::setTitleElement): (WebCore::Document::removeTitle): * dom/Document.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::insertedIntoDocument): (WebCore::HTMLTitleElement::childrenChanged): * svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::insertedIntoDocument): (WebCore::SVGTitleElement::childrenChanged): 2011-03-30 Levi Weintraub Reviewed by Ryosuke Niwa. BreakBlockQuoteCommand assumes all li tags have list item renderers https://bugs.webkit.org/show_bug.cgi?id=57253 Checking that the renderers of li nodes are actually RenderListItems before treating them as such. Test: editing/execCommand/crash-breaking-blockquote-with-list.html * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockQuoteCommand::doApply): 2011-03-30 Pavel Feldman Not reviewed: fixing typo in the inspector front-end. Web Inspector: REGRESSION: Broken live edit errors handling https://bugs.webkit.org/show_bug.cgi?id=57436 * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._didEditScriptSource): 2011-03-30 Yael Aharon Reviewed by Eric Seidel. Left/Right borders/padding/margins are not always added correctly when rendering multiline inline boxes with bidi elements https://bugs.webkit.org/show_bug.cgi?id=9272 Also fixes https://bugs.webkit.org/show_bug.cgi?id=47210 and https://bugs.webkit.org/show_bug.cgi?id=8392. Change how we decide if an InlineFlowBox is the last one for its renderer. Use the position of resolver's logicallyLastRun to decide if there is more text in the next line. Tests: fast/borders/rtl-border-01.html fast/borders/rtl-border-02.html fast/borders/rtl-border-03.html fast/borders/rtl-border-04.html fast/borders/rtl-border-05.html * rendering/InlineFlowBox.cpp: (WebCore::isAnsectorAndWithinBlock): (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): * rendering/InlineFlowBox.h: * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::constructLine): (WebCore::reachedEndOfTextRenderer): (WebCore::RenderBlock::layoutInlineChildren): 2011-03-29 Nikolas Zimmermann Reviewed by Eric Seidel. REGRESSION (r68976): Incorrect bidi rendering in SVG text https://bugs.webkit.org/show_bug.cgi?id=53980 Deconvolute SVGTextLayoutEngine code, which was confusing due to the simultaneous processing of the rendered text in visual and logical order. Added several helper methods to make the code more readable. Fix Unicode directional formatting characters support, now works as expected. Test: svg/text/bidi-embedded-direction.svg * editing/visible_units.cpp: Refactor getLeafBoxesInLogicalOrder(), move to InlineFlowBox. (WebCore::getLogicalStartBoxAndNode): Use new collectLeafBoxesInLogicalOrder() method in InlineFlowBox. (WebCore::getLogicalEndBoxAndNode): Ditto. * rendering/InlineFlowBox.cpp: Add new helper function, that returns a list of all leaf boxes in logical order. (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder): * rendering/InlineFlowBox.h: * rendering/svg/RenderSVGText.cpp: Actually trigger reordering the x/y/dx/dy/rotate value lists, if needed. (WebCore::RenderSVGText::RenderSVGText): (WebCore::RenderSVGText::layout): * rendering/svg/RenderSVGText.h: Ditto. (WebCore::RenderSVGText::layoutAttributes): (WebCore::RenderSVGText::needsReordering): * rendering/svg/SVGRootInlineBox.cpp: Use new InlineFlowBox::collectLeafBoxesINLogicalOrder(), with a custom "inline box reverse" implementation, which not only reverses the order of InlineBoxes, but also the order of the x/y/dx/dy/rotate value lists, if needed. (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): (WebCore::swapItems): (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded): (WebCore::SVGRootInlineBox::reorderValueLists): * rendering/svg/SVGRootInlineBox.h: * rendering/svg/SVGTextLayoutAttributes.cpp: Store RenderSVGInlineText* pointer, where we belong to. (WebCore::SVGTextLayoutAttributes::SVGTextLayoutAttributes): (WebCore::SVGTextLayoutAttributes::dump): * rendering/svg/SVGTextLayoutAttributes.h: (WebCore::SVGTextLayoutAttributes::context): * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Pass RenderSVGInlineText* object when creating SVGTextLayoutAttributes. (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree): (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): * rendering/svg/SVGTextLayoutAttributesBuilder.h: * rendering/svg/SVGTextLayoutEngine.cpp: Rewrite & cleanup the main layout algorithm, to be less confusing. (WebCore::SVGTextLayoutEngine::SVGTextLayoutEngine): (WebCore::SVGTextLayoutEngine::updateRelativePositionAdjustmentsIfNeeded): (WebCore::SVGTextLayoutEngine::recordTextFragment): (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes): (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics): (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics): (WebCore::SVGTextLayoutEngine::advanceToNextLogicalCharacter): (WebCore::SVGTextLayoutEngine::advanceToNextVisualCharacter): (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): * rendering/svg/SVGTextLayoutEngine.h: 2011-03-30 Ilya Tikhonovsky Not reviewed trivial change. Web Inspector: Remove unnecessary function arguments after r82281. https://bugs.webkit.org/show_bug.cgi?id=57327 * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::domContentLoadedEventFired): * inspector/InspectorAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): 2011-03-30 Kent Tamura Reviewed by Ojan Vafai. H1 element should have different default style if it is in HTML5 sectioning elements. https://bugs.webkit.org/show_bug.cgi?id=52693 Test: fast/css/h1-in-section-elements.html * css/html.css: Add font-size and margin declarations to follow HTML5 specification. (:-webkit-any(article,aside,nav,section) h1): (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): 2011-03-29 Beth Dakin Reviewed by Maciej Stachowiak. Fix for https://bugs.webkit.org/show_bug.cgi?id=57408 webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard -and corresponding- * platform/mac/PlatformScreenMac.mm: (WebCore::windowScaleFactor): (WebCore::toUserSpace): (WebCore::toDeviceSpace): 2011-03-29 Eric Seidel Reviewed by Dimitri Glazkov. Rename BidiResolver::eor and sor to m_eor and m_sor to match modern style https://bugs.webkit.org/show_bug.cgi?id=57369 I considered renaming these to m_endOfRun and m_startOfRun but decided that was too verbose for now (given how often they're used). I suspect with a bit more refactoring we'll find they're not used very often and can be renamed if so desired. * platform/text/BidiResolver.h: (WebCore::::appendRun): (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel): (WebCore::::lowerExplicitEmbeddingLevel): (WebCore::::raiseExplicitEmbeddingLevel): (WebCore::::createBidiRunsForLine): * rendering/InlineIterator.h: (WebCore::InlineBidiResolver::appendRun): 2011-03-29 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Remove exact retained size request in detailed heap snapshots. https://bugs.webkit.org/show_bug.cgi?id=57351 * bindings/js/ScriptHeapSnapshot.h: * bindings/v8/ScriptHeapSnapshot.cpp: * bindings/v8/ScriptHeapSnapshot.h: * inspector/Inspector.json: * inspector/InspectorProfilerAgent.cpp: * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseClickInContainmentGrid): 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Split more logic out from createBidiRunsForLine for readability https://bugs.webkit.org/show_bug.cgi?id=57341 I marked reorderRunsFromLevels inline, but it probably doesn't actually need to (or want to) be. This lops another large hunk off of reorderRunsFromLevels further reducing the size and complexity. * platform/text/BidiResolver.h: (WebCore::::reorderRunsFromLevels): (WebCore::::createBidiRunsForLine): 2011-03-29 Kent Tamura Reviewed by Dimitri Glazkov. Make validation message bubble testable https://bugs.webkit.org/show_bug.cgi?id=57290 Introduce a setting for validation message timer so that we can configure how long we show a validation message bubble. Test: fast/forms/validation-message-appearance.html * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Don't set a timer if the timer magnification value is 0 or negative. Otherwise, hides the bubble length * magnification / 1000 seconds. * page/Settings.cpp: (WebCore::Settings::Settings): Initialize the timer magnification value. * page/Settings.h: (WebCore::Settings::setValidationMessageTimerMagnification): Added. (WebCore::Settings::validationMessageTimerMaginification): Added. 2011-03-29 Dimitri Glazkov Remove the extraneous declaration I accidentally added in r82376. * dom/MouseEvent.h: Removed createSimulated decl. 2011-03-29 James Robinson Reviewed by Kenneth Russell. [chromium] Compositor crash with show-layer-borders flag https://bugs.webkit.org/show_bug.cgi?id=57292 Synchronize the debug border color/width with other properties to ensure the appropriate CCLayerImpl exists. Code is only exercised with a debugging command line flag so no layout test. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::setBorderColor): (WebCore::LayerChromium::setBorderWidth): * platform/graphics/chromium/LayerChromium.h: 2011-03-29 Tony Gentilcore Reviewed by Adam Barth. Teach the preload scanner about <input type=image> https://bugs.webkit.org/show_bug.cgi?id=57404 I did a very rough sample of the top 50 web pages to see how many of each HTML resource type they include: img src: 1,359 script src: 276 link href: 256 iframe src: 104 input src: 50 embed src: 37 @import: 13 object data: 11 Based on this, it seems worthwhile to preload inputs and iframes (possibly embed). This patch only does inputs. Test: fast/preloader/input.html * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLNames::PreloadTask::PreloadTask): (WebCore::HTMLNames::PreloadTask::processAttributes): (WebCore::HTMLNames::PreloadTask::inputTypeAttributeIsImage): (WebCore::HTMLNames::PreloadTask::preload): 2011-03-29 Luke Macpherson Reviewed by David Levin. Improve the massive switch statement in CSSStyleSelector::applyProperty. https://bugs.webkit.org/show_bug.cgi?id=56288 No new tests are needed because no new functionality exposed. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Asserted that cases implemented in the CSSStyleApplyProperty lookup table are unreachable. Updated comment. 2011-03-29 Dimitri Glazkov Reviewed by Darin Adler. Introduce SimulatedMouseEvent and teach EventDispatcher how to use it. https://bugs.webkit.org/show_bug.cgi?id=57402 No functional changes, covered by existing tests. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchSimulatedClick): Changed to use SimulatedMouseEvent. (WebCore::EventDispatcher::dispatchMouseEvent): Combined two dispatchMouseEvent methods into one, now that simulated-click events don't need one. * dom/EventDispatcher.h: Updated decls. * dom/MouseEvent.cpp: (WebCore::SimulatedMouseEvent::create): Added. (WebCore::SimulatedMouseEvent::~SimulatedMouseEvent): Added. (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): Added. * dom/MouseEvent.h: Made constructor protected. 2011-03-29 Anders Carlsson Fix build. * WebCore.exp.in: 2011-03-29 Steve Block Reviewed by Jeremy Orlow. JavaInstance should not use jvalue in its API https://bugs.webkit.org/show_bug.cgi?id=57019 This change updates JavaInstance for V8 to use JavaValue, rather than jvalue, in its API. This will allow us to create an API for JavaInstance that is independent of JNI, to allow it to be implemented on platforms that do not use JNI directly. Refactoring only, no new tests. * bridge/jni/v8/JavaInstanceV8.cpp: (JavaInstance::invokeMethod): (JavaInstance::getField): * bridge/jni/v8/JavaInstanceV8.h: * bridge/jni/v8/JavaNPObjectV8.cpp: (JSC::Bindings::JavaNPObjectInvoke): (JSC::Bindings::JavaNPObjectGetProperty): * bridge/jni/v8/JavaValueV8.h: 2011-03-29 Eric Seidel Reviewed by Dimitri Glazkov. Rename BidiResolver::last to m_last to match modern style https://bugs.webkit.org/show_bug.cgi?id=57367 * platform/text/BidiResolver.h: (WebCore::::lowerExplicitEmbeddingLevel): (WebCore::::raiseExplicitEmbeddingLevel): (WebCore::::createBidiRunsForLine): 2011-03-29 Justin Schuh Reviewed by Maciej Stachowiak. SVGComponentTransferFunctionElement should validate type https://bugs.webkit.org/show_bug.cgi?id=56960 Test: svg/filters/feComponentTransfer-style-crash.xhtml * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): * svg/SVGComponentTransferFunctionElement.h: 2011-03-29 Thomas Klausner Reviewed by David Levin. png-1.5 fixes https://bugs.webkit.org/show_bug.cgi?id=54406 Fix compilation with png-1.5: struct members were hidden, and a new API to terminate data processing was added (especially for WebKit). Compilation fixes, so no new tests. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): 2011-03-29 Gavin Peters Reviewed by Tony Gentilcore. Add beforeload to icon and prefetch link rel types https://bugs.webkit.org/show_bug.cgi?id=56424 Over in https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html , a webkit-dev thread, I've discussed my hopes for the link element, and adding the link header. This change helps improve the link header by making it participate in the beforeload event in two more important cases. Tests: fast/dom/HTMLLinkElement/prefetch-beforeload.html http/tests/misc/link-rel-icon-beforeload.html webarchive/test-link-rel-icon-beforeload.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::checkBeforeLoadEvent): (WebCore::HTMLLinkElement::process): * html/HTMLLinkElement.h: 2011-03-29 Eric Seidel Reviewed by Dimitri Glazkov. Rename BidiResolver::current to BidiResolver::m_current to match modern style https://bugs.webkit.org/show_bug.cgi?id=57363 I was very confused by current until I realized it was a member variable. I also did m_reachedEndOfLine since that was small. * platform/text/BidiResolver.h: (WebCore::BidiResolver::position): (WebCore::BidiResolver::setPosition): (WebCore::BidiResolver::increment): (WebCore::::createBidiRunsForLine): 2011-03-29 Geoff Pike Reviewed by Dimitri Glazkov. In HitTestResult objects, initialize the ListHashSet > lazily. In my informal testing it seems to be used hardly at all, so it's wasteful to create it eagerly. Initializing a ListHashSet is expensive because a ListHashSet initially has space for 256 elements, and that space is memset to 0. This change should improve performance but have no impact on correctness. On x86-64, for example, the change cuts the cost of HitTestResult(IntPoint()) in EventHandler::mouseMoved() from ~1700 cycles to ~300 cycles. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::HitTestResult): copy *m_rectBasedTestResult if m_rectBasedTestResult isn't 0 (WebCore::HitTestResult::operator=): copy *m_rectBasedTestResult if m_rectBasedTestResult isn't 0 (WebCore::HitTestResult::addNodeToRectBasedTestResult): use mutableRectBasedTestResult() rather than m_rectBasedTestResult (WebCore::HitTestResult::append): append *(other.m_rectBasedTestResult) if other.m_rectBasedTestResult isn't 0 * rendering/HitTestResult.h: (WebCore::HitTestResult::rectBasedTestResult): Add a typedef for ListHashSet > to ease readability. Change m_rectBasedTestResult from ListHashSet > to an OwnPtr of same. Modify rectBasedTestResult() and add mutableRectBasedTestResult(). 2011-03-29 Timothy Hatcher Update the order of the context menu to better match AppKit on Mac. Reviewed by John Sullivan. * English.lproj/Localizable.strings: Updated. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): Update the order of items on Mac. * platform/LocalizationStrategy.h: * platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Added argument for selected string. * platform/LocalizedStrings.h: * platform/android/LocalizedStringsAndroid.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. * platform/brew/LocalizedStringsBrew.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. * platform/efl/LocalizedStringsEfl.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. * platform/haiku/LocalizedStringsHaiku.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. * platform/wx/LocalizedStringsWx.cpp: (WebCore::contextMenuItemTagLookUpInDictionary): Ditto. 2011-03-29 Dean Jackson Reviewed by Chris Marrin and Ken Russell. https://bugs.webkit.org/show_bug.cgi?id=57248 Occlusion issues with WebGL in Safari The depth buffer on Safari ports was being set up with a maximum of 16 bits. Now we use a combined 24/8 depth/stencil buffer on Mac ports. No new tests as this is the setting for a particular port. Other ports may use different defaults. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::validateAttributes): - use Extensions3D to test for depth and multisample extensions rather than querying OpenGL directly. (WebCore::GraphicsContext3D::reshape): - use a 24bit depth buffer when the extension is enabled. 2011-03-29 Dimitri Glazkov Sorted XCode project. It's gotten quite out of sorts. * WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file. 2011-03-29 Emil A Eklund Reviewed by Dimitri Glazkov. DatasetDOMStringMap::item and ::contains copies attribute name string https://bugs.webkit.org/show_bug.cgi?id=55645 Change propertyNameMatchesAttributeName to match without creating a copy of the string. * dom/DatasetDOMStringMap.cpp: (WebCore::propertyNameMatchesAttributeName): 2011-03-29 Csaba Osztrogonác Unreviewed rollout r82282, part of r82288, r82298. * css/CSSParser.cpp: (WebCore::parseColorInt): (WebCore::isValidDouble): (WebCore::parseAlphaValue): (WebCore::CSSParser::parseColor): 2011-03-25 Brent Fulgham Reviewed by Dave Hyatt. https://bugs.webkit.org/show_bug.cgi?id=55981 Second round of clean-ups, aimed at supporting GTK with the same unified FontPlatformData header. This version removes some unneeded WinCairo code, and aligns the WinCairo and GTK ports to reduce code duplication. * WebCore.vcproj/WebCore.vcproj: Get rid of a dangling reference to an old WinCairo file. * platform/graphics/FontPlatformData.h: Remove unneeded member for m_fontFace, which is a member of m_scaledFont. Switch to standard Cairo hashing. (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::font): (WebCore::FontPlatformData::scaledFont): (WebCore::FontPlatformData::hash): (WebCore::FontPlatformData::isHashTableDeletedValue): (WebCore::FontPlatformData::hashTableDeletedFontValue): * platform/graphics/win/FontCacheWin.cpp: Update to no longer use the unnecessary fontFace() accessor. (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.cpp: * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::~FontPlatformData): (WebCore::FontPlatformData::platformDataAssign): (WebCore::FontPlatformData::platformIsEqual): * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): 2011-03-29 Jian Li Reviewed by Adam Barth. Inline worker powered by blob URL does not work with files URL even if allowFileAccessFromFileURLs is enabled https://bugs.webkit.org/show_bug.cgi?id=56063 Test: fast/files/workers/inline-worker-via-blob-url.html * fileapi/BlobURL.cpp: Removed unneeded getOrigin() method. * fileapi/BlobURL.h: Removed unneeded getOrigin() method. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::SecurityOrigin): Extended the logic to handle filesystem URL also to blob URL. Also fixed the problem that m_isUnique is incorrectly set for blob and filesystem URLs. (WebCore::SecurityOrigin::create): Removed the special logic for blob URL since we use the same logic in SecurityOrigin constructor as filesystem URL. (WebCore::SecurityOrigin::canRequest): Removed the special logic for blob URL since it is not needed with the fix in SecurityOrigin constructor. 2011-03-29 Timothy Hatcher Update WebCore Localizable.strings to contain WebCore, WebKit/mac and WebKit2 strings. https://webkit.org/b/57354 Reviewed by Sam Weinig. * English.lproj/Localizable.strings: Updated. * StringsNotToBeLocalized.txt: Removed. To hard to maintain in WebCore. * platform/network/cf/LoaderRunLoopCF.h: Remove a single quote in an #error so extract-localizable-strings does not complain about unbalanced single quotes. 2011-03-29 Sheriff Bot Unreviewed, rolling out r82295 and r82300. http://trac.webkit.org/changeset/82295 http://trac.webkit.org/changeset/82300 https://bugs.webkit.org/show_bug.cgi?id=57380 This patch breaks compile on Chromium (Requested by abarth|gardener on #webkit). * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (atkRole): (webkit_accessible_get_role): * accessibility/mac/AccessibilityObjectWrapper.mm: 2011-03-29 Anders Carlsson Fix clang build. * platform/text/BidiResolver.h: (WebCore::::createBidiRunsForLine): 2011-03-29 Steve Falkenburg Reviewed by Adam Roben. Use per-configuration vsprops in WebCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE https://bugs.webkit.org/show_bug.cgi?id=57378 Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within the IDE. To avoid this, add a separate vsprops file for each project configuration that contains the required inherited property sheets. * WebCore.vcproj/QTMovieWin.vcproj: * WebCore.vcproj/QTMovieWinDebug.vsprops: Added. * WebCore.vcproj/QTMovieWinDebugAll.vsprops: Added. * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops: Added. * WebCore.vcproj/QTMovieWinRelease.vsprops: Added. * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops: Added. * WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops: Added. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreDebug.vsprops: Added. * WebCore.vcproj/WebCoreDebugAll.vsprops: Added. * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Added. * WebCore.vcproj/WebCoreRelease.vsprops: Added. * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops: Added. * WebCore.vcproj/WebCoreReleaseLTCG.vsprops: Added. 2011-03-29 David Hyatt Reviewed by Simon Fraser. REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly Back out the optimization that stopped when it hit the first float. This was an incorrect optimization and can't be done without more work. Added fast/block/float/float-forced-below-other-floats.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Start to clean up BidiResolver::createBidiRunsForLine so that mere mortals can understand it https://bugs.webkit.org/show_bug.cgi?id=57338 I'm attempting to break createBidiRunsForLine into understandable pieces so that we can tell what it's actually doing. Our implementation of the unicode bidi algorithm is slightly different from the spec in that we run it per-line (instead of over the entire paragraph at once). This is great for performance (our implementation is resumable), but it makes things a bit tricky to understand. Splitting createBidiRunsForLine into pieces should help make our UBA implementation more readable. * platform/text/BidiResolver.h: (WebCore::::updateStatusLastFromCurrentDirection): (WebCore::::createBidiRunsForLine): 2011-03-29 Mario Sanchez Prada Reviewed by Martin Robinson. [Gtk] Consistent crash from Google/ARIA combobox click https://bugs.webkit.org/show_bug.cgi?id=55883 Do not call to firstChild() to avoid entering into infinite loops. This would happen when current item is a WebCore Group and some of its children have either role 'option' or 'menuitem'. Other than that the logic behind that call to firstChild() seems to be no longer needed so it's safe to remove it. Test: platform/gtk/accessibility/aria-options-and-menuitems-crash.html * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Remove call to firsChild, which was leading to crashes sometimes. 2011-03-29 Mario Sanchez Prada Reviewed by Chris Fleizach. AX: GTK: ARIA role is not respected on

and https://bugs.webkit.org/show_bug.cgi?id=47636 Define new roles in WebCore and map them to ATK accordingly. Test: platform/gtk/accessibility/aria-roles-unignored.html * accessibility/AccessibilityObject.h: Added new roles to represent paragraphs, labels, forms and div sections. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Return ParagraphRole, LabelRole, FormRole and DivRole when needed. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (atkRole): Map new WebCore roles to ATK Roles. (webkit_accessible_get_role): Remove code to define roles for paragraphs, labels, forms and divs based on node's tag name. Update mappings for the Mac platform. * accessibility/mac/AccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Add explicit mappings from the new roles introduced to NSAccessibilityGroupRole. 2011-03-29 Philippe Normand Unreviewed build fix. Remove ASSERT hitting consitently on GTK. * rendering/InlineIterator.h: (WebCore::InlineIterator::moveToStartOf): 2011-03-29 Darin Adler Fix some just-introduced build failures. * WebCore.pro: Correct spelling of filename. * css/CSSParser.cpp: (WebCore::parseColorIntOrPercentage): Fix double/int conversion that fails to compile on Leopard. Also renamed one local variabel. * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didCommitLoad): Removed unused argument names to avoid warning. (WebCore::InspectorAgent::domContentLoadedEventFired): Ditto. 2011-03-29 Andras Becsi Reviewed by Darin Adler. CSS: Slow parsing of rgb() with percent values https://bugs.webkit.org/show_bug.cgi?id=16708 Implement fast-path parsing for percentage color values. Gain ~30% speedup on http://canvex.lazyilluminati.com/misc/3d.html. * css/CSSParser.cpp: (WebCore::checkForValidDouble): Extend to return the number of characters forming a valid double. (WebCore::parseDouble): Function for parsing double values if they are valid. (WebCore::parseColorIntOrPercentage): Extend parseColorInt to deal with percentage values. (WebCore::parseAlphaValue): Use the new functions. (WebCore::CSSParser::parseColor): Ditto. 2011-03-29 Ilya Tikhonovsky Reviewed by Pavel Feldman. Web Inspector: extract InspectorPageAgent from InspectorAgent. https://bugs.webkit.org/show_bug.cgi?id=57327 There are page related methods and inspector related methods in InspectorAgent. It would be nice to extract page specific methods for future usage the rest of methods in workers debugger. * GNUmakefile.am: * WebCore.gypi: * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.json: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::restoreInspectorStateFromCookie): (WebCore::InspectorAgent::didClearWindowObjectInWorld): (WebCore::InspectorAgent::setFrontend): (WebCore::InspectorAgent::disconnectFrontend): (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::domContentLoadedEventFired): * inspector/InspectorAgent.h: (WebCore::InspectorAgent::pageAgent): * inspector/InspectorPageAgent.cpp: Added. (WebCore::InspectorPageAgent::create): (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::setFrontend): (WebCore::InspectorPageAgent::clearFrontend): (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad): (WebCore::InspectorPageAgent::removeAllScriptsToEvaluateOnLoad): (WebCore::InspectorPageAgent::reloadPage): (WebCore::InspectorPageAgent::openInInspectedWindow): (WebCore::InspectorPageAgent::setUserAgentOverride): (WebCore::buildObjectForCookie): (WebCore::buildArrayForCookies): (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::deleteCookie): (WebCore::InspectorPageAgent::inspectedURLChanged): (WebCore::InspectorPageAgent::restore): (WebCore::InspectorPageAgent::didCommitLoad): (WebCore::InspectorPageAgent::domContentEventFired): (WebCore::InspectorPageAgent::loadEventFired): (WebCore::InspectorPageAgent::didClearWindowObjectInWorld): (WebCore::InspectorPageAgent::applyUserAgentOverride): * inspector/InspectorPageAgent.h: Added. * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl): (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl): (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): (WebCore::InspectorInstrumentation::loadEventFiredImpl): (WebCore::InspectorInstrumentation::didCommitLoadImpl): (WebCore::InspectorInstrumentation::retrievePageAgent): * inspector/InspectorInstrumentation.h: * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::InstrumentingAgents): (WebCore::InstrumentingAgents::inspectorPageAgent): (WebCore::InstrumentingAgents::setInspectorPageAgent): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel.prototype._reloadResources): * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype._deleteCookie): (WebInspector.Cookies.getCookiesAsync): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onReload): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._openInNewTab): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype.ondblclick): * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane.prototype.setInstrumentation): * inspector/front-end/inspector.js: (WebInspector.openResource): (WebInspector.documentKeyDown): 2011-03-29 David Hyatt Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=57276 Add optimizations to make the vertical placement of boxes much faster. Whenever a box is added to a line, compare it with the parent box. If we can determine that the child box has the exact same height and baseline position as the parent box, then we keep a boolean flag set called descendantsHaveSameLineHeightAndBaseline(). If the box is different for any reason then we clear the flag up the line box parent chain. When it comes time to do computeLogicalboxHeights, we can avoid recurring into the children of a box whose descendants all have the same position. When we do placeBoxesInBlockDirection, we can do a simplified recursion that just calls adjustBlockDirectionPosition to offset the boxes without doing anything else. Because of the quirks mode rule of only shrinking boxes with no immediate text children, we need to track whether a box has text descendants now as well. When we avoid doing the recursion this flag tells us whether the collection of boxes should have an effect on the ascent and descent of the line in quirks mode. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::nodeAtPoint): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::InlineFlowBox): (WebCore::InlineFlowBox::hasTextDescendants): (WebCore::InlineFlowBox::descendantsHaveSameLineHeightAndBaseline): (WebCore::InlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::constructLine): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Remove a bunch of duplicate code by adding some InlineIterator helper methods https://bugs.webkit.org/show_bug.cgi?id=57326 Once I started adding these it became clear how much crazy duplicated code we had due to treating InlineIterator as a struct and accessing its members directly. We can't quite make the members private yet since findNextLineBreak still splits out the members. But this change makes the code much cleaner. * rendering/InlineIterator.h: (WebCore::InlineIterator::clear): (WebCore::InlineIterator::moveToStartOf):i (WebCore::InlineIterator::moveTo): (WebCore::InlineIterator::increment): * rendering/RenderBlockLineLayout.cpp: (WebCore::tryHyphenating): (WebCore::RenderBlock::findNextLineBreak): 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Clean up bidiNext by abstracting repeated code https://bugs.webkit.org/show_bug.cgi?id=57335 I also added a comment to explain what bidiNext is actually doing. This whole area of code is confusing but need not be. * rendering/InlineIterator.h: (WebCore::embedCharFromDirection): (WebCore::notifyResolverEnteredObject): (WebCore::notifyResolverWillExitObject): (WebCore::bidiNext): (WebCore::bidiFirst): 2011-03-29 Alexander Pavlov Reviewed by Yury Semikhatsky. Web Inspector: Support external CSS stylesheet freeflow text editing https://bugs.webkit.org/show_bug.cgi?id=54397 In this implementation, Ctrl/Cmd-S commits the current changes into the model. * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.createResourceView): (WebInspector.CSSSourceFrameDelegateForResourcesPanel): (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.canEditScriptSource): (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource): (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource.handleInfos): (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype._saveStyleSheet): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._applyDiffMarkup): (WebInspector.FrameResourceTreeElement.prototype._contentChanged): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._createTextViewer): 2011-03-29 Eric Carlson Reviewed by Dan Bernstein. playbackRate should not be set to defaultPlaybackRate in play() https://bugs.webkit.org/show_bug.cgi?id=55943 Test: media/video-playbackrate.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::playbackRate): No need to ask the media engine for the current rate, we already have the current value cached. (WebCore::HTMLMediaElement::playInternal): Don't reset the engine's playback rate to the default rate. (WebCore::HTMLMediaElement::togglePlayState): Do reset the engine's playback rate to the default rate before triggering playback. * manual-tests/media-default-playback-rate.html: Added. 2011-03-28 Dimitri Glazkov Reviewed by Eric Seidel. Remove specialization of EventDispatcher with inversion of control. https://bugs.webkit.org/show_bug.cgi?id=57285 Since some events have extra logic around their dispatch, allow them to dispatch themselves and specialize the logic. This change only converts KeyboardEvent to this model. No functional change, covered by existing tests. * dom/Event.cpp: (WebCore::Event::dispatch): Added. * dom/Event.h: Updated decls. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): Changed to ask event to dispatch itself. * dom/EventDispatcher.h: Updated decls. * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::dispatch): Added, moving code from EventDispatcher. * dom/KeyboardEvent.h: Updated decls. * dom/Node.cpp: (WebCore::Node::dispatchKeyEvent): Changed to use the new ways. 2011-03-29 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. Web Inspector: InspectorDOMAgent has unnecessary dependency from InspectorAgent. https://bugs.webkit.org/show_bug.cgi?id=57329 * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::setFrontend): * inspector/InspectorAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::inspect): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::setFrontend): (WebCore::InspectorDOMAgent::handleMousePress): (WebCore::InspectorDOMAgent::inspect): (WebCore::InspectorDOMAgent::focusNode): (WebCore::InspectorDOMAgent::highlight): (WebCore::InspectorDOMAgent::hideHighlight): * inspector/InspectorDOMAgent.h: (WebCore::InspectorDOMAgent::create): 2011-03-29 Eric Seidel Reviewed by Nikolas Zimmermann. Rename InlineIterator::pos to m_pos to match modern style https://bugs.webkit.org/show_bug.cgi?id=57342 Somehow I failed to upload this one earlier, no wonder later patches didn't apply. * rendering/InlineIterator.h: (WebCore::InlineIterator::InlineIterator): (WebCore::operator==): (WebCore::operator!=): (WebCore::InlineIterator::increment): (WebCore::InlineIterator::current): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::checkMidpoints): (WebCore::RenderBlock::appendRunsForObject): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::matchedEndLine): (WebCore::tryHyphenating): (WebCore::RenderBlock::findNextLineBreak): 2011-03-29 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: document BrowserDebugger agent. https://bugs.webkit.org/show_bug.cgi?id=57331 * inspector/Inspector.json: 2011-03-29 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js https://bugs.webkit.org/show_bug.cgi?id=56310 Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned by CSSAgent.getStyleSheet() anymore. Test: inspector/styles/get-set-stylesheet-text.html * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getAllStyleSheets): * inspector/InspectorCSSAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): * inspector/InspectorStyleSheet.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModel.prototype._styleSheetChanged): (WebInspector.CSSStyleModel.prototype._onRevert): (WebInspector.CSSStyleSheet): (WebInspector.CSSStyleSheet.prototype.setText): 2011-03-29 Jeremy Moskovich Reviewed by Eric Seidel. Implement text-align:match-parent as -webkit-match-parent. https://bugs.webkit.org/show_bug.cgi?id=50951 Add support to the CSS parser. Tests: fast/css/text-align-webkit-match-parent-parse.html fast/css/text-align-webkit-match-parent.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Rename InlineIterator::nextBreakablePosition to m_nextBreakablePosition to match modern style https://bugs.webkit.org/show_bug.cgi?id=57323 All of these m_nextBreakablePosition = -1 could probably be replaced with some new methods. But I'll do that in a separate change. Clearly m_nextBreakablePosition is just a cached value which should be cleared at the right times. I suspect we may even fail to clear it sometimes when we should due to the current used of direct access instead of smarter functions. * rendering/InlineIterator.h: (WebCore::InlineIterator::InlineIterator): (WebCore::InlineIterator::increment): * rendering/RenderBlockLineLayout.cpp: (WebCore::tryHyphenating): (WebCore::RenderBlock::findNextLineBreak): 2011-03-29 Jeff Miller Reviewed by Jon Honeycutt. Add WebCore::copyCertificateToData() on Windows https://bugs.webkit.org/show_bug.cgi?id=57296 Create a new win directory in platform/cf and add CertificateCFWin.cpp and CertificateCFWin.h to it. * WebCore.vcproj/WebCore.vcproj: Added CertificateCFWin.cpp and CertificateCFWin.h. * WebCore.vcproj/copyForwardingHeaders.cmd: Copy all header files in \platform\cf\win\. * platform/cf/win: Added. * platform/cf/win/CertificateCFWin.cpp: Added. (WebCore::deallocCertContext): Added. (WebCore::createCertContextDeallocator): Added. (WebCore::copyCertificateToData): Added. * platform/cf/win/CertificateCFWin.h: Added. 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Rename InlineIterator::block to m_block to match modern style https://bugs.webkit.org/show_bug.cgi?id=57321 I could have made m_block private, since it's only accessed in one place outside of InlineIterator (for an ASSERT). But I chose not to do so in this change. * rendering/InlineIterator.h: (WebCore::InlineIterator::InlineIterator): (WebCore::InlineIterator::increment): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak): 2011-03-29 Leo Yang Reviewed by Nikolas Zimmermann. Incorrect offset of svg element which is in element https://bugs.webkit.org/show_bug.cgi?id=57318 When webkit expanded a svg element in the shadow tree it would clone the children of the . The children may contain SVGShadowTreeContainerElement which was expanded from svg element. But the clone operation would clone a SVGShadowTreeContainerElement as a svg element. This resulted that updateContainerOffset wouldn't update offset for those elements which were expand from elements. This patch implements cloneElementWithoutAttributesAndChildren for SVGShadowTreeContainerElement to make the container clone itself correctly. Test: svg/custom/use-in-symbol-with-offset.svg * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren): * rendering/svg/SVGShadowTreeElements.h: 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Rename InlineIterator::obj to m_obj to match modern style https://bugs.webkit.org/show_bug.cgi?id=57319 I started this rename after confusion in InlineBidiResolver::appendRun. (Which uses an "obj" local in InlineIterator.h. It's not actually masking m_obj because it's a separate class, but I didn't realize that at the time because it's in InlineIterator.h which is itself confusing!) * rendering/InlineIterator.h: (WebCore::InlineIterator::InlineIterator): (WebCore::operator==): (WebCore::operator!=): (WebCore::InlineIterator::increment): (WebCore::InlineIterator::atEnd): (WebCore::InlineIterator::current): (WebCore::InlineIterator::direction): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::checkMidpoints): (WebCore::RenderBlock::appendRunsForObject): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::matchedEndLine): (WebCore::skipNonBreakingSpace): (WebCore::RenderBlock::requiresLineBox): (WebCore::RenderBlock::skipTrailingWhitespace): (WebCore::RenderBlock::skipLeadingWhitespace): (WebCore::tryHyphenating): (WebCore::RenderBlock::findNextLineBreak): 2011-03-29 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: document Timeline domain, make timeline event types of type string. https://bugs.webkit.org/show_bug.cgi?id=57299 * inspector/Inspector.json: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::pushGCEventRecords): (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::stop): (WebCore::InspectorTimelineAgent::willCallFunction): (WebCore::InspectorTimelineAgent::didCallFunction): (WebCore::InspectorTimelineAgent::willDispatchEvent): (WebCore::InspectorTimelineAgent::didDispatchEvent): (WebCore::InspectorTimelineAgent::willLayout): (WebCore::InspectorTimelineAgent::didLayout): (WebCore::InspectorTimelineAgent::willRecalculateStyle): (WebCore::InspectorTimelineAgent::didRecalculateStyle): (WebCore::InspectorTimelineAgent::willPaint): (WebCore::InspectorTimelineAgent::didPaint): (WebCore::InspectorTimelineAgent::willWriteHTML): (WebCore::InspectorTimelineAgent::didWriteHTML): (WebCore::InspectorTimelineAgent::didInstallTimer): (WebCore::InspectorTimelineAgent::didRemoveTimer): (WebCore::InspectorTimelineAgent::willFireTimer): (WebCore::InspectorTimelineAgent::didFireTimer): (WebCore::InspectorTimelineAgent::willChangeXHRReadyState): (WebCore::InspectorTimelineAgent::didChangeXHRReadyState): (WebCore::InspectorTimelineAgent::willLoadXHR): (WebCore::InspectorTimelineAgent::didLoadXHR): (WebCore::InspectorTimelineAgent::willEvaluateScript): (WebCore::InspectorTimelineAgent::didEvaluateScript): (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willReceiveResourceData): (WebCore::InspectorTimelineAgent::didReceiveResourceData): (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): (WebCore::InspectorTimelineAgent::didReceiveResourceResponse): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): (WebCore::InspectorTimelineAgent::didMarkTimeline): (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): (WebCore::InspectorTimelineAgent::didMarkLoadEvent): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry): * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._createEventDivider): (WebInspector.TimelinePanel.prototype._findParentRecord): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelineDispatcher.prototype.started): (WebInspector.TimelineDispatcher.prototype.stopped): (WebInspector.TimelineDispatcher.prototype.eventRecorded): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-03-29 Andrey Adaikin Reviewed by Pavel Feldman. Web Inspector: Fixing live edits tests on chromium. https://bugs.webkit.org/show_bug.cgi?id=57316 * inspector/front-end/ScriptsPanel.js: (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource): (WebInspector.SourceFrame.prototype._handleSave): (WebInspector.SourceFrameDelegate.prototype.editScriptSource): 2011-03-29 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: fix call frames positions in formatted scripts. https://bugs.webkit.org/show_bug.cgi?id=57036 Introduce PresentationCallFrame class that encapsulates source mapping details from UI components. * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLocation): (WebInspector.CallStackSidebarPane.prototype.update): (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame): (WebInspector.CallStackSidebarPane.prototype._placardSelected): (WebInspector.CallStackSidebarPane.prototype._contextMenu): (WebInspector.CallStackSidebarPane.prototype._copyStackTrace): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._didEditScriptSource): (WebInspector.DebuggerModel.prototype.get debuggerPausedDetails): (WebInspector.DebuggerModel.prototype._pausedScript): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.editScriptSource): (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame): (WebInspector.DebuggerPresentationModel.prototype._reset): (WebInspector.PresenationCallFrame): Call frame wrapper for UI. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._debuggerResumed): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile.prototype.get content): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._createTextViewer): (WebInspector.SourceFrame.prototype.setExecutionLine): (WebInspector.SourceFrame.prototype.clearExecutionLine): (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup): 2011-03-29 Emil A Eklund Reviewed by Darin Adler. Fix for execCommand("Delete") with an empty selection. https://bugs.webkit.org/show_bug.cgi?id=56652 Test: editing/execCommand/delete-empty-container.html * editing/TypingCommand.cpp: (WebCore::TypingCommand::makeEditableRootEmpty): Add check for root element. 2011-03-29 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Refactor HeapSnapshot-related code to make sure we don't return big amounts of data to forms. https://bugs.webkit.org/show_bug.cgi?id=57227 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode.prototype.populateChildren): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent): (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype._createProvider): (WebInspector.HeapSnapshotInstanceNode): (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider): (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider): (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent): (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider): (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider): (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex): (WebInspector.HeapSnapshotNode.prototype.get retainers): (WebInspector.HeapSnapshot): (WebInspector.HeapSnapshot.prototype.get _allNodes): (WebInspector.HeapSnapshot.prototype.get nodeCount): (WebInspector.HeapSnapshot.prototype.get rootNodeIndex): (WebInspector.HeapSnapshot.prototype.hasId): (WebInspector.HeapSnapshot.prototype.get nodeIds): (WebInspector.HeapSnapshot.prototype._retainersForNode): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes): (WebInspector.HeapSnapshot.prototype._buildIdsList): (WebInspector.HeapSnapshot.prototype._buildNodeIndex): (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next): (WebInspector.HeapSnapshotEdgesProvider): (WebInspector.HeapSnapshotNodesProvider): 2011-03-29 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Fix detailed heap snapshots UI. https://bugs.webkit.org/show_bug.cgi?id=57235 Fix two problems: 1. Text color of grid cells under selection needs to be white, otherwise it's unreadable for some colors; 2. Long strings need to be truncated in grid, their contents can be shown on hover. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor): (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup): * inspector/front-end/heapProfiler.css: (.detailed-heapshot-view .console-formatted-string): (.detailed-heapshot-view .data-grid tr.selected *): (.detailed-heapshot-view .data-grid:focus tr.selected *): 2011-03-29 Andrey Adaikin Reviewed by Yury Semikhatsky. Web Inspector: Highlight visible lines first https://bugs.webkit.org/show_bug.cgi?id=57013 * inspector/front-end/TextViewer.js: (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleChunkNumber): (WebInspector.TextEditorChunkedPanel.prototype._findVisibleChunks): (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops): (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber): (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines): (WebInspector.TextEditorMainPanel.prototype._paintLines): (WebInspector.TextEditorMainPanel.prototype._paintLineChunks): (WebInspector.TextEditorMainPanel.prototype._paintLine): (WebInspector.TextEditorMainChunk.prototype.set expanded): 2011-03-29 Emil A Eklund Reviewed by Dimitri Glazkov. Relative mouse coordinates recalculated for each target https://bugs.webkit.org/show_bug.cgi?id=57130 Calculate relative coordinates lazily for mouse events instead of doing it for each target. Speeds up dispatching of mouse events in deep dom structures significantly, O(n^2) to O(n). Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973 Tests: fast/events/mouse-relative-position.html perf/mouse-event.html * dom/Event.cpp: (WebCore::Event::setTarget): * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::pageZoomFactor): (WebCore::MouseRelatedEvent::receivedTarget): (WebCore::MouseRelatedEvent::computeRelativePosition): (WebCore::MouseRelatedEvent::layerX): (WebCore::MouseRelatedEvent::layerY): (WebCore::MouseRelatedEvent::offsetX): (WebCore::MouseRelatedEvent::offsetY): * dom/MouseRelatedEvent.h: * dom/UIEvent.cpp: (WebCore::UIEvent::layerX): (WebCore::UIEvent::layerY): * dom/UIEvent.h: 2011-03-29 Emil A Eklund Reviewed by Darin Adler. getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue https://bugs.webkit.org/show_bug.cgi?id=57266 Add null check to counterToCSSValue. Test: fast/css/getComputedStyle/counterIncrement-without-counter.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::counterToCSSValue): 2011-03-29 Gavin Peters Reviewed by Tony Gentilcore. Implement onerror events for https://bugs.webkit.org/show_bug.cgi?id=57182 These events are equired on link elements, see http://dev.w3.org/html5/spec/Overview.html#the-link-element After a discussion in WebKit-dev about the direction of prefetch in the loader, and about a path to adding the Link header, we decided to look at making onerror, onload and onbeforeload events more uniformly supported. See the thread at https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html . It turned out that part of adding onerror for link prefetch was to make the top CachedResource less abstract. It was pure virtual until prefetch became the first consumer to use an unspecialised implementation, and this CL continues that by adding a default checkNotify method to it. As it happens there were already two subclasses using what amounted to the generic checkNotify, so I also removed those, buying us some code cleanup with the change. Test: fast/dom/HTMLLinkElement/prefetch-onerror.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::onloadTimerFired): (WebCore::HTMLLinkElement::notifyFinished): * loader/cache/CachedImage.cpp: * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::checkNotify): (WebCore::CachedResource::data): (WebCore::CachedResource::error): * loader/cache/CachedResource.h: * loader/cache/CachedScript.cpp: * loader/cache/CachedScript.h: 2011-03-29 Eric Seidel Reviewed by Ryosuke Niwa. Add support for parsing unicode-bidi: -webkit-isolate https://bugs.webkit.org/show_bug.cgi?id=57181 Test: css3/unicode-bidi-insolate-parse.html * WebCore.xcodeproj/project.pbxproj: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): * css/CSSValueKeywords.in: * rendering/style/RenderStyleConstants.h: 2011-03-29 Patrick Gansterer Unreviewed WinCE build fix for r82193. * platform/wince/FileSystemWinCE.cpp: (WebCore::openTemporaryFile): 2011-03-28 Sheriff Bot Unreviewed, rolling out r82198. http://trac.webkit.org/changeset/82198 https://bugs.webkit.org/show_bug.cgi?id=57304 Broke Chromium Win build. (Requested by dave_levin on #webkit). * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): 2011-03-28 Ofri Wolfus Reviewed by Eric Seidel. RTL: Select elements with a size attribute are always left aligned. https://bugs.webkit.org/show_bug.cgi?id=50928 Added support for alignment in RenderListBox. Test: fast/forms/listbox-bidi-align.html * rendering/RenderListBox.cpp: (WebCore::itemOffsetForAlignment): (WebCore::RenderListBox::paintItemForeground): Add support for alignment and directionality. 2011-03-28 Kwang Yul Seo Reviewed by Benjamin Poulain. [Qt] Change TextureMapperVideoLayer to TextureMapperMediaLayer https://bugs.webkit.org/show_bug.cgi?id=57142 TextureMapperMediaLayer is a better name here because both video and plugins use this layer. Remove ENABLE(VIDEO) guard. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: * platform/graphics/qt/MediaPlayerPrivateQt.h: * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): * platform/graphics/texmap/TextureMapperNode.h: * platform/graphics/texmap/TextureMapperPlatformLayer.h: (WebCore::TextureMapperMediaLayer::layerType): 2011-03-28 Thomas Klausner Reviewed by David Levin. png-1.5 fixes https://bugs.webkit.org/show_bug.cgi?id=54406 Fix compilation with png-1.5: struct members were hidden, and a new API to terminate data processing was added (especially for WebKit). Compilation fixes, so no new tests. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): 2011-03-28 Kwang Yul Seo Reviewed by Adam Barth. Replace fprintf(stderr, ...) with LOG_ERROR https://bugs.webkit.org/show_bug.cgi?id=57216 LOG_ERROR is a better choice here. * bridge/jni/v8/JavaClassV8.cpp: (JavaClass::JavaClass): 2011-03-28 Steve Block Reviewed by Jeremy Orlow. Add a new JavaValue to type to represent a Java value in the Java bridge https://bugs.webkit.org/show_bug.cgi?id=57022 This change introduces a new JavaValue type and uses it in place of jvalue in the conversions to and from JavaNPObject used in the V8 Java bridge. Refactoring only, no new tests. * WebCore.gypi: * bridge/jni/JNIUtility.cpp: (JSC::Bindings::javaTypeFromClassName): (JSC::Bindings::signatureFromJavaType): (JSC::Bindings::getJNIField): (JSC::Bindings::callJNIMethod): * bridge/jni/JavaType.h: * bridge/jni/v8/JNIUtilityPrivate.cpp: (JSC::Bindings::convertNPVariantToJavaValue): (JSC::Bindings::convertJavaValueToNPVariant): (JSC::Bindings::jvalueToJavaValue): (JSC::Bindings::javaValueToJvalue): * bridge/jni/v8/JNIUtilityPrivate.h: * bridge/jni/v8/JavaNPObjectV8.cpp: (JSC::Bindings::JavaNPObjectInvoke): (JSC::Bindings::JavaNPObjectGetProperty): * bridge/jni/v8/JavaValueV8.h: Added. (JSC::Bindings::JavaValue::JavaValue): 2011-03-28 Patrick Gansterer Reviewed by Darin Adler. Use String instead of CString as return value of openTemporaryFile https://bugs.webkit.org/show_bug.cgi?id=55332 We usually store all paths as UTF-16. Do this for temporary files too. * WebCore.exp.in * platform/FileSystem.h: * platform/android/FileSystemAndroid.cpp: * platform/brew/FileSystemBrew.cpp: * platform/efl/FileSystemEfl.cpp: * platform/gtk/FileSystemGtk.cpp: * platform/haiku/FileSystemHaiku.cpp: * platform/mac/FileSystemMac.mm: * platform/qt/FileSystemQt.cpp: * platform/win/FileSystemWin.cpp: * platform/wince/FileSystemWinCE.cpp: * platform/wx/FileSystemWx.cpp: * plugins/PluginStream.cpp: (WebCore::PluginStream::destroyStream): * plugins/PluginStream.h: 2011-03-28 Jeff Johnson Reviewed by Pavel Feldman. Web Inspector: empty, non-functional window https://bugs.webkit.org/show_bug.cgi?id=56354 Check whether DOM local storage is enabled before attempting to access window.localStorage. No new tests. * inspector/front-end/Settings.js: (WebInspector.Settings.prototype.findSettingForAllProjects): (WebInspector.Settings.prototype._get): (WebInspector.Settings.prototype._set): 2011-03-28 Beth Dakin Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: Horizontal scroller stops appearing after going Forward -and corresponding- This patch rolls out revision 79053 and fixes the same bug in a better way. New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then sets the contents size to 0. This is called when a document is going into the page cache. * dom/Document.cpp: (WebCore::Document::setInPageCache): (WebCore::FrameView::resetScrollbarsAndClearContentsSize): Roll-out of 79053. * history/CachedFrame.cpp: (WebCore::CachedFrameBase::restore): * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::reset): (WebCore::FrameView::layout): * page/FrameView.h: 2011-03-28 Ojan Vafai Reviewed by Antti Koivisto. fix style sharing with :any and sibling selectors https://bugs.webkit.org/show_bug.cgi?id=57211 Test: fast/css/sibling-selectors.html * css/CSSStyleSelector.cpp: (WebCore::collectFeaturesFromList): 2011-03-27 Ojan Vafai Reviewed by Antti Koivisto. fix :-webkit-any(:last-child) https://bugs.webkit.org/show_bug.cgi?id=57207 We were passing the wrong arguments to checkSelector. Also, we were not passing through the encounteredLink bool. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * css/CSSStyleSelector.h: 2011-03-27 Ojan Vafai Reviewed by Antti Koivisto. fix :-webkit-any(:last-child) https://bugs.webkit.org/show_bug.cgi?id=57207 We were passing the wrong arguments to checkSelector. Also, we were not passing through the encounteredLink bool. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * css/CSSStyleSelector.h: 2011-03-28 Maciej Stachowiak Reviewed by Darin Adler. REGRESSION(r82152): fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html https://bugs.webkit.org/show_bug.cgi?id=57291 * platform/KURL.cpp: (WebCore::KURL::parse): Instead of considering URLs with credentials but no host invalid, consider them to have a host ending in @ (which fails down the line)/ 2011-03-28 Kent Tamura Reviewed by Dimitri Glazkov. Fix some problems of the appearance of form validation message bubble. https://bugs.webkit.org/show_bug.cgi?id=57208 No new tests. Validation message bubble appearance is not testable because it depends on a timer. * css/html.css: (::-webkit-validation-bubble): (::-webkit-validation-bubble-message): (::-webkit-validation-bubble-arrow): (::-webkit-validation-bubble-arrow-clipper): - Explicitly set margin, padding, and color. - Make the shadow darker. - Make the background color darker. - Make opacity larger. - Make the border color lighter. - Add inset shadows - Change the implementation of an arrow. Stop making a right triangle by the border trick. Use -webkit-transform instead. - Make min-width workable by changing display property of -webkit-validation-bubble to "inline-block". * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): Change the node structure. Before this change, -webkit-validation-bubble had three DIVs inside. After this change, it has two DIVs; -webkit-validation-bubble-arrow-clipper and -webkit-validation-bubble-message, and -webkit-validation-bubble-arrow-clipper contains -webkit-validation-bubble-arrow. 2011-03-28 Enrica Casucci Reviewed by Sam Weinig. REGRESSION: Can't enter pasted with context or Edit menu text in search or address field in the browser. https://bugs.webkit.org/show_bug.cgi?id=57275 We need to classify cut and paste actions as user typing actions even when the action is triggered by a context menu selection to allow the propagation of the textDidChangeInTextField event. * editing/EditorCommand.cpp: The following methods have been modified to properly set up the UserTypingGestureAction when the command source is the menu or a key binding sequence. (WebCore::executeCut): (WebCore::executePaste): (WebCore::executePasteAndMatchStyle): (WebCore::executePasteAsPlainText): (WebCore::executeDelete): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Changed to call execute command instead of referring to the specific method in the editor class. 2011-03-28 Oliver Hunt Reviewed by Geoffrey Garen. instanceof Array test fails when using iframes https://bugs.webkit.org/show_bug.cgi?id=17250 Update for new function and date apis Test: fast/js/js-constructors-use-correct-global.html * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.cpp: (WebCore::jsDateOrNull): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): 2011-03-28 Beth Dakin Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=57124 When the scroller style is changed via delegate method, the page needs a full relayout and repaint -and corresponding- Call into WebKitSystemInterface to associate the new painter with the existing painter controller. Reset the scrollbar frame rects to the new thickness -- normally this only happens when a scrollbar is created, so we have to reset the thickness here to pick up the new theme thickness. Finally, force a full relayout and style recall with setNeedsRecalcStyleInAllFrames() * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): setNeedsRecalcStyleInAllFrames() used to be a static method in Settings.cpp. This patch moves it to be a member function on Page so that it can be called from FrameView when the scrollbar style changes. * page/FrameView.cpp: (WebCore::FrameView::setNeedsRecalcStyleInAllFrames): * page/FrameView.h: * page/Page.cpp: (WebCore::Page::setNeedsRecalcStyleInAllFrames): * page/Page.h: * page/Settings.cpp: (WebCore::Settings::setStandardFontFamily): (WebCore::Settings::setFixedFontFamily): (WebCore::Settings::setSerifFontFamily): (WebCore::Settings::setSansSerifFontFamily): (WebCore::Settings::setCursiveFontFamily): (WebCore::Settings::setFantasyFontFamily): (WebCore::Settings::setMinimumFontSize): (WebCore::Settings::setMinimumLogicalFontSize): (WebCore::Settings::setDefaultFontSize): (WebCore::Settings::setDefaultFixedFontSize): (WebCore::Settings::setTextAreasAreResizable): (WebCore::Settings::setAuthorAndUserStylesEnabled): (WebCore::Settings::setFontRenderingMode): (WebCore::Settings::setAcceleratedCompositingEnabled): (WebCore::Settings::setShowDebugBorders): (WebCore::Settings::setShowRepaintCounter): * platform/ScrollableArea.h: (WebCore::ScrollableArea::setNeedsRecalcStyleInAllFrames): 2011-03-28 Dirk Pranke RS=Tony Chang. r81977 moved FontPlatformData.h from WebCore/platform/graphics/cocoa to platform/graphics. This change updates the chromium build accordingly. https://bugs.webkit.org/show_bug.cgi?id=57281 * platform/graphics/chromium/CrossProcessFontLoading.mm: 2011-03-28 Jer Noble Reviewed by Darin Adler. MediaPlayerPrivateAVFoundation should report that it supportsFullScreen() https://bugs.webkit.org/show_bug.cgi?id=57249 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 2011-03-28 Jer Noble Reviewed by Darin Adler. AVFoundation can indeed support full screen. MediaPlayerPrivateAVFoundation should report that it supportsFullScreen() https://bugs.webkit.org/show_bug.cgi?id=57249 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): Return true if using the new full screen APIs. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: 2011-03-28 Eric Carlson Reviewed by Darin Adler. http streams don't always display video with AVFoundation backend https://bugs.webkit.org/show_bug.cgi?id=57203 No new tests, we don't currently have tests for http live streams. Changes verified manually. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): Initialize m_shouldPrepareToRender. (WebCore::MediaPlayer::loadWithNextMediaEngine): Call prepareForRendering on new engine if m_shouldPrepareToRender is set. (WebCore::MediaPlayer::prepareForRendering): Set m_shouldPrepareToRender. * platform/graphics/MediaPlayer.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): Don't return true until m_isAllowedToRender has been set. (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Always call setUpVideoRendering, it has logic to figure out when setup is required. (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Call setUpVideoRendering when we aren't using the preferred rendering mode because if we get a file's metadata between the time supportsAcceleratedRendering() and paint() are called, we will allocate a software renderer even when we prefer a layer backed renderer. (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Return "unknown" until we have metadata. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use itemKVOProperties() instead of an explicit list of key path names. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): metadataKeyNames renamed to assetMetadataKeyNames, return an NSArray instead of a CFArrayRef since that is what the callers need. (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Return the duration of the player item, not the asset, because AVAsset.duration always returns an indefinite time for all streaming files. (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): metadataKeyNames renamed to assetMetadataKeyNames. (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Do nothing until metadata is available. (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Split size calculation logic off into sizeChanged(). (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): New. Use AVPlayerItem.presentationSize until tracks is non-NULL so we have a size as early as possible. (WebCore::MediaPlayerPrivateAVFoundationObjC::assetMetadataKeyNames): Renamed from metadataKeyNames. (WebCore::MediaPlayerPrivateAVFoundationObjC::itemKVOProperties): New, return an array of KVO observable properties. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to presentationSize change. 2011-03-28 Anders Carlsson Reviewed by Sam Weinig. Search field focus ring is missing https://bugs.webkit.org/show_bug.cgi?id=57270 Add an _automaticFocusRingDisabled method which returns YES. * platform/mac/ThemeMac.mm: (-[WebCoreFlippedView _automaticFocusRingDisabled]): 2011-03-28 Dimitri Glazkov Reviewed by Darin Adler. Move more events to EventDispatcher. https://bugs.webkit.org/show_bug.cgi?id=57247 No functional changes, covered by existing tests. * dom/EventDispatcher.cpp: (WebCore::eventTargetRespectingSVGTargetRules): Made a static function, since it's not used anywhere outside of the EventDispatcher. (WebCore::EventDispatcher::dispatchScopedEvent): Moved from Node.cpp. (WebCore::EventDispatcher::dispatchKeyEvent): Ditto. (WebCore::EventDispatcher::dispatchWheelEvent): Ditto. (WebCore::EventDispatcher::dispatchEvent): Changed to use eventTargetRespectingSVGTargetRules as a static function. * dom/EventDispatcher.h: Updated decls. * dom/Node.cpp: (WebCore::Node::dispatchScopedEvent): Replaced with calling EventDispatcher. (WebCore::Node::dispatchKeyEvent): Ditto. (WebCore::Node::dispatchWheelEvent): Ditto. 2011-03-28 Adele Peterson Reviewed by Eric Seidel. Fix for REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type https://bugs.webkit.org/show_bug.cgi?id=57173 Test: editing/spelling/grammar.html * WebCore.exp.in: Add symbol for new selectionStartHasMarkerFor method. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Every use of paragraph is specific to spelling or grammar, so to avoid confusion, we should explicitly use spellingParagraph or grammarParagraph. In the case of this bug, when we're consider ambiguous boundary characters (characters that could indicate word boundaries, but are used in the middle of words too, like apostrophes), we should use the use the spellingParagraph since the spellingParagraph is the only one operated on when this information is used. (WebCore::Editor::selectionStartHasMarkerFor): Changed from selectionStartHasSpellingMarkerFor so it can check for grammar as well as spelling. * editing/Editor.h: 2011-03-28 Dan Bernstein Reviewed by Darin Adler. REGRESSION: multicol crashes with positioned elements https://bugs.webkit.org/show_bug.cgi?id=48983 Test: fast/multicol/paginated-layer-crash.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintPaginatedChildLayer): Bring the logic for finding pagintating layers into sync with updatePagination() after r68069. (WebCore::RenderLayer::hitTestPaginatedChildLayer): Ditto. 2011-03-28 Maciej Stachowiak Reviewed by Darin Adler' . URLSs with non-empty username but empty hostname treat first path segment as hostname, potentially enabling XSS https://bugs.webkit.org/show_bug.cgi?id=57220 Test: http/tests/uri/username-with-no-hostname.html * platform/KURL.cpp: (WebCore::hostPortIsEmptyButUserPassIsNot): (WebCore::KURL::parse): 2011-03-28 Adam Barth Reviewed by Eric Seidel. script-src should block inline event handlers https://bugs.webkit.org/show_bug.cgi?id=57212 I considered wrapping this into the canExecute check, but that approach would require passing that function a bunch of context information to behave correctly once we add support for the "options" directive that re-enables these features. Test: http/tests/security/contentSecurityPolicy/script-src-none-inline-event.html * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): - This function was a mess. I couldn't resist cleaning it up a bunch. Notice that we ASSERT at the beginning of the function that scriptExecutionContext is a document and that both ways of getting the global object are the same when document->frame() is non-zero because the document must be active and there is a one-to-one relation between Frames and active Documents. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): * page/ContentSecurityPolicy.h: 2011-03-28 Jeff Miller Reviewed by Adam Roben. ResourceError::certificate() should return a PCCERT_CONTEXT https://bugs.webkit.org/show_bug.cgi?id=57262 * platform/network/cf/ResourceError.h: certificate() now returns a PCCERT_CONTEXT. * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::certificate): Added. 2011-03-28 David Hyatt Reviewed by Simon Fraser and Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=57221, memory corruption/crashes when positioned objects occur at the end of a line. The old code and new code for dealing with a trailing space object midpoint manipulated a raw array instead of the Vector. Otherwise this corruption would have been caught prior to check-in. I have patched the code to only go through the Vector and to make it handle the case that led to the corruption. Trailing positioned objects can occur both prior to and following the trailing space object's midpoint, so we have to be prepared to deal with both cases. This is already tested by fast/block/positioning/052.html, and that test now properly progresses like the other positioning tests did. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak): 2011-03-28 Andrei Popescu Reviewed by Steve Block. V8IDBKeyCustom.cpp does not compile with INDEXED_DATABASE disabled https://bugs.webkit.org/show_bug.cgi?id=57100 Close the ENABLE guard and the namespace in the right order. No new tests, just cleanup. * bindings/v8/custom/V8IDBAnyCustom.cpp: * bindings/v8/custom/V8IDBKeyCustom.cpp: 2011-03-28 Jeff Miller Reviewed by Adam Roben. Include certificate when sending a WebCore::ResourceError to UI process on Windows https://bugs.webkit.org/show_bug.cgi?id=57195 Add support for tracking the certificate in WebCore::ResourceError. * platform/network/ResourceErrorBase.cpp: (WebCore::ResourceErrorBase::copy): Call platformCopy() to copy platform-specific fields. * platform/network/ResourceErrorBase.h: (WebCore::ResourceErrorBase::platformCopy): Added. * platform/network/cf/ResourceError.h: Added constructor that takes certificate data, shadowed platformCopy, added m_certificate. (WebCore::ResourceError::certificate): Added. * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::ResourceError): Added constructor that takes certificate data. (WebCore::ResourceError::platformLazyInit): Read any certificate from the userInfo dictionary. (WebCore::ResourceError::platformCopy): Copy m_certificate. (WebCore::ResourceError::cfError): Add any certificate data to the userInfo dictionary in the CFErrorRef. 2011-03-28 Jessie Berlin Rubber-stamped by Adam Roben. Add an extra newline to the end of the generated Inspector.idl file so that it does not trigger the Windows "no newline at at end of file" warning. * inspector/generate-inspector-idl: 2011-03-28 Csaba Osztrogonác Buildfix after r82125. [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled https://bugs.webkit.org/show_bug.cgi?id=57087 * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Convert all char* to QString explicitly. (WebCore::MediaPlayerPrivateQt::getSupportedTypes): (WebCore::MediaPlayerPrivateQt::commitLoad): 2011-03-28 Sheriff Bot Unreviewed, rolling out r82099. http://trac.webkit.org/changeset/82099 https://bugs.webkit.org/show_bug.cgi?id=57245 Breaks live edits tests on chromium. (Requested by pfeldman on #webkit). * inspector/front-end/ScriptsPanel.js: (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._handleSave): (WebInspector.SourceFrameDelegate.prototype.editScriptSource): 2011-03-28 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: brush up and rename debugger domain functions. https://bugs.webkit.org/show_bug.cgi?id=57240 * inspector/Inspector.json: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::setFrontend): (WebCore::InspectorAgent::postWorkerNotificationToFrontend): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointsActive): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::removeBreakpoint): (WebCore::InspectorDebuggerAgent::editScriptSource): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::failedToParseSource): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::didContinue): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpoint): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): (WebInspector.DebuggerModel.prototype.removeBreakpoint): (WebInspector.DebuggerModel.prototype._didEditScriptSource): (WebInspector.DebuggerDispatcher.prototype.paused): (WebInspector.DebuggerDispatcher.prototype.resumed): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse): (WebInspector.DebuggerDispatcher.prototype.breakpointResolved): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked): * inspector/front-end/inspector.js: (WebInspector.didCreateWorker): (WebInspector.didDestroyWorker): 2011-03-28 David Kilzer Use forward class declaration instead of including header Reviewed by Dan Bernstein. Adding a "using namespace WebCore;" statement in a header may cause issues when is included before . Length.h defines the LengthType enum with a 'Fixed' value. CoreText.h includes MacTypes.h, which has a "typedef SInt32 Fixed;" statement, and then CoreText.h includes other headers that also use 'Fixed', but expect the typedef to be defined, not the enum. If another header includes "using namespace WebCore;" before CoreText.h, the following compiler errors result (paths abbreviated): CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous MacTypes.h:184: error: candidates are: typedef SInt32 Fixed Length.h:37: error: WebCore::LengthType WebCore::Fixed SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type * platform/mac/HTMLConverter.h: Use forward declaration of DocumentLoader class instead of including header. Remove the unused "using namespace WebCore;" statement. 2011-03-26 Dimitri Glazkov Reviewed by Eric Seidel. Introduce EventDispatcher, the new common way to fire events. https://bugs.webkit.org/show_bug.cgi?id=57168 The goal here is two-fold: 1) reduce the need to randomly sprinkle guards around the dispatch code by creating a well-scoped abstraction for dispatching events. 2) create a place where fiddly event-related things like creating event contexts for ancestors can be done lazily. Additionally, with all the free-standing static functions, this code was just begging to come out of Node.cpp. The first step is a near-mechanical extraction of mouse-related events from Node.cpp to EventDispatcher. For now, the call sites are just replaced with invoking EventDispatcher. Later, we can remove these methods from Node. Refactoring, no functional changes. * Android.mk: Added EventDispatcher to build system. * CMakeLists.txt: Ditto. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/DOMAllInOne.cpp: Ditto. * dom/EventDispatcher.cpp: Added. * dom/EventDispatcher.h: Added. * dom/Node.cpp: (WebCore::Node::dispatchScopedEvent): Replaced to use EventDispatcher. (WebCore::Node::dispatchEvent): Ditto. (WebCore::Node::dispatchMouseEvent): Ditto. (WebCore::Node::dispatchSimulatedClick): Ditto. * dom/Node.h: Updated decls. 2011-03-28 Dan Bernstein Reviewed by Maciej Stachowiak. Incomplete repaint of overflow in flipped lines writing modes https://bugs.webkit.org/show_bug.cgi?id=57197 Tests: fast/repaint/overflow-flipped-writing-mode-block.html fast/repaint/overflow-flipped-writing-mode-table.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): Flip the overflow rect before testing for intersection with the damage rect. * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): Made the intersection check more like the one in RenderBlock::paint(). 2011-03-28 Xiaomei Ji Reviewed by Ryosuke Niwa. move directionOfEnclosingBlock() to be global so that it could be reused. https://bugs.webkit.org/show_bug.cgi?id=57233. Provide global function directionOfEnclosingBlock(Node*) so that it could be reused in SelectionController and other functionalities that need enclosing block's direcionality, such as moving caret by word in visual order. No new functionality, so no new tests. * editing/SelectionController.cpp: (WebCore::SelectionController::directionOfEnclosingBlock): * editing/htmlediting.cpp: (WebCore::directionOfEnclosingBlock): * editing/htmlediting.h: 2011-03-28 Jarkko Sakkinen Reviewed by Benjamin Poulain. [Qt] fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html fails https://bugs.webkit.org/show_bug.cgi?id=56825 Fixes for context attribute handling: - Initialize depth and stencil buffer depending on whether they are enabled in context attributes. - Always enable depth buffer when stencil buffer is enabled. - Disable stencil buffer on OpenGL ES 2.0 - Cleaned up clutter code from initialization. Made code paths more sane. - Clear mask is now set correctly in reshape(). Tests: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::isValid): (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::reshape): (WebCore::GraphicsContext3DInternal::paint): (WebCore::GraphicsContext3DInternal::getProcAddress): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::bindFramebuffer): 2011-03-28 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: rename network domain events from didHappenSomething to somethingHappened. https://bugs.webkit.org/show_bug.cgi?id=57226 * inspector/Inspector.json: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::markResourceAsCached): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didReceiveContentLength): (WebCore::InspectorResourceAgent::didFinishLoading): (WebCore::InspectorResourceAgent::didFailLoading): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::setInitialContent): (WebCore::InspectorResourceAgent::didCommitLoad): (WebCore::InspectorResourceAgent::frameDetachedFromParent): (WebCore::InspectorResourceAgent::didCreateWebSocket): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::didCloseWebSocket): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.requestWillBeSent): (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached): (WebInspector.NetworkDispatcher.prototype.responseReceived): (WebInspector.NetworkDispatcher.prototype.dataReceived): (WebInspector.NetworkDispatcher.prototype.loadingFinished): (WebInspector.NetworkDispatcher.prototype.loadingFailed): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.frameDetached): (WebInspector.NetworkDispatcher.prototype.initialContentSet): (WebInspector.NetworkDispatcher.prototype.frameNavigated): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest): (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived): (WebInspector.NetworkDispatcher.prototype.webSocketClosed): 2011-03-28 Mikhail Naganov Reviewed by Pavel Feldman. WebInspector: [Chromium] Delete native CPU profiles and heap snapshots on binding disposal. https://bugs.webkit.org/show_bug.cgi?id=57099 * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot): * bindings/v8/ScriptHeapSnapshot.h: * bindings/v8/ScriptProfile.cpp: (WebCore::ScriptProfile::~ScriptProfile): * bindings/v8/ScriptProfile.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::resetState): 2011-03-24 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: fix console messages positions in formatted scripts. https://bugs.webkit.org/show_bug.cgi?id=57010 * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestMapping): (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.clearConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype._reset): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype.addConsoleMessage): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.addConsoleMessage): (WebInspector.ScriptsPanel.prototype.clearConsoleMessages): (WebInspector.ScriptsPanel.prototype._consoleMessageAdded): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.addMessage): (WebInspector.SourceFrame.prototype._addExistingMessagesToSource): (WebInspector.SourceFrame.prototype.addMessageToSource): 2011-03-27 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: refactor ResourceTreeModel to remove poor dependencies. https://bugs.webkit.org/show_bug.cgi?id=57186 - ResourceTreeModel is now event target (Object) - There is no ResourceTreeModel -> UI dependencies - NetworkManager -> ResourceTreeModel dependencies has been removed - NetworkManager is no longer dealing with the resources tree, it is only responsible for network events - ResourceTreeModel requests tree structure from the backend separately - Cached resources tree payload is now limited to url and type (no headers involved) - Resources tree is being rendered lazily upon request from the panel. * inspector/Inspector.json: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::resourceContent): (WebCore::InspectorResourceAgent::resourceContentBase64): (WebCore::buildObjectForFrameTree): (WebCore::InspectorResourceAgent::enable): (WebCore::InspectorResourceAgent::getCachedResources): (WebCore::InspectorResourceAgent::getResourceContent): * inspector/InspectorResourceAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::resourceStyleSheetText): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend): (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager): (WebInspector.NetworkManager.prototype.frontendReused): (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.didReceiveResponse): (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent): (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype._updateSummaryBar): (WebInspector.NetworkPanel.prototype._onFrameCommitLoad): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): (WebInspector.ResourceTreeModel.prototype.frontendReused): (WebInspector.ResourceTreeModel.prototype._processCachedResources): (WebInspector.ResourceTreeModel.prototype._addOrUpdateFrame): (WebInspector.ResourceTreeModel.prototype.frames): (WebInspector.ResourceTreeModel.prototype.subframes): (WebInspector.ResourceTreeModel.prototype.resources): (WebInspector.ResourceTreeModel.prototype._onCommitLoad): (WebInspector.ResourceTreeModel.prototype._onFrameDetachedFromParent): (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): (WebInspector.ResourceTreeModel.prototype._addResourceToFrame): (WebInspector.ResourceTreeModel.prototype.resourceForURL): (WebInspector.ResourceTreeModel.prototype._bindResourceURL): (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources): (WebInspector.ResourceTreeModel.prototype._clearResources): (WebInspector.ResourceTreeModel.prototype._callForFrameResources): (WebInspector.ResourceTreeModel.prototype._unbindResourceURL): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): (WebInspector.ResourceTreeModel.prototype._createResource): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype.show): (WebInspector.ResourcesPanel.prototype._populateResourceTree.populateFrame): (WebInspector.ResourcesPanel.prototype._populateResourceTree): (WebInspector.ResourcesPanel.prototype._frameAdded): (WebInspector.ResourcesPanel.prototype._frameDetached): (WebInspector.ResourcesPanel.prototype._resourceAdded): (WebInspector.ResourcesPanel.prototype._frameNavigated): (WebInspector.FrameTreeElement.prototype.setTitles): * inspector/front-end/inspector.js: (WebInspector.frontendReused): 2011-03-27 Ryosuke Niwa Reviewed by Eric Seidel. WebKit's behavior for text-align inherit differs from other browsers https://bugs.webkit.org/show_bug.cgi?id=56377 The bug was caused by WebKit's resolving text-align: start and text-align: end too early. As discussed on the bug, when text-align: start and text-align: end are inherited by descendent nodes, the alignment of the text in those nodes should be determined based on the directionality of the text, not by the directionality of the ancestor node from which text-align property is inherited. Fixed the bug by introducing new enum values to ETextAlign: TASTART and TAEND. These two values will align text to the left in a LTR context and to the right in a RTL context respectively. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added the support for TASTART and TAEND. (WebCore::CSSPrimitiveValue::operator ETextAlign): Ditto. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): No longer processes CSSValueStart and CSSValueEnd. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Added the support for TASTART and TAEND. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added the support for TASTART and TAEND. * rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect): Ditto. * rendering/style/RenderStyle.h: ETextAlign now has 10 values and requires 4 bits. * rendering/style/RenderStyleConstants.h: Added TASTART and TAEND to ETextAlign. 2011-03-28 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: fix breakpoints positions in formatted scripts. https://bugs.webkit.org/show_bug.cgi?id=56931 Add async requestMapping method to SourceFile interface as required for populating breakpoints sidebar pane when in "format all scripts" mode. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didRequestSourceMapping): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.didRequestSourceMapping): (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame): (WebInspector.PresentationBreakpoint): Breakpoint wrapper for UI. (WebInspector.PresentationBreakpoint.prototype.get sourceFileId): (WebInspector.PresentationBreakpoint.prototype.get lineNumber): (WebInspector.PresentationBreakpoint.prototype.get condition): (WebInspector.PresentationBreakpoint.prototype.get enabled): (WebInspector.PresentationBreakpoint.prototype.get url): (WebInspector.PresentationBreakpoint.prototype.get resolved): (WebInspector.PresentationBreakpoint.prototype.loadSnippet): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks): (WebInspector.ScriptFormatter.prototype.formatContent): * inspector/front-end/SourceFile.js: (WebInspector.SourceFile.prototype.requestSourceMapping): (WebInspector.FormattedSourceFile.prototype.requestSourceMapping): (WebInspector.FormattedSourceFile.prototype._didRequestContent): (WebInspector.SourceMapping): (WebInspector.SourceMapping.prototype.scriptLocationToSourceLocation): (WebInspector.SourceMapping.prototype.sourceLocationToScriptLocation): (WebInspector.FormattedSourceMapping): (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLocation): (WebInspector.FormattedSourceMapping.prototype.sourceLocationToScriptLocation): (WebInspector.FormattedSourceMapping.prototype._convertPosition): 2011-03-28 Nancy Piedra Reviewed by Csaba Osztrogonác. This patch fixes linking errors on Qt Webkit Windows MinGW builds. This patch sets the BUILDING_WEBKIT & QT_MAKEDLL macros so that QWEBKIT_EXPORT is defined as follows: #define QWEBKIT_EXPORT Q_DECL_EXPORT No new tests needed since only changing .pro file. * WebCore.pro: 2011-03-28 Andrey Adaikin Reviewed by Yury Semikhatsky. Web Inspector: source frame should show the error to user when live edit is failed https://bugs.webkit.org/show_bug.cgi?id=57002 * inspector/front-end/ScriptsPanel.js: (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._handleSave.didSaveScriptSource): (WebInspector.SourceFrame.prototype._handleSave): (WebInspector.SourceFrameDelegate.prototype.editScriptSource): 2011-03-26 Mario Sanchez Prada Reviewed by Martin Robinson. [GTK] Expose the AtkValue interface for WAI-ARIA sliders https://bugs.webkit.org/show_bug.cgi?id=56655 Implement AtkValue interface for WAI-ARIA sliders. Test: platform/gtk/accessibility/aria-slider-required-attributes.html * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification): Emit the 'property-change::accessible-value' signal when needed. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (core): New, returns a core object from an AtkValue. (webkitAccessibleValueGetCurrentValue): New, implements AtkValue. (webkitAccessibleValueGetMaximumValue): Ditto. (webkitAccessibleValueGetMinimumValue): Ditto. (webkitAccessibleValueSetCurrentValue): Ditto. (webkitAccessibleValueGetMinimumIncrement): Ditto. (atkValueInterfaceInit): Ditto. (GetAtkInterfaceTypeFromWAIType): Add ATK_TYPE_VALUE. (getInterfaceMaskFromObject): Set the WAI_VALUE bit for sliders. 2011-03-28 Maciej Stachowiak Reviewed by Dan Bernstein. Assigning location.path to something that doesn't start with / mangles the authority https://bugs.webkit.org/show_bug.cgi?id=57209 Tests: http/tests/uri/assign-path-with-leading-slash.html http/tests/uri/assign-path-without-leading-slash.html * platform/KURL.cpp: (WebCore::KURL::setPath): If the new path does not have a leading slash, add one. 2011-03-28 Ryosuke Niwa Reviewed by Eric Seidel. Extract functions to update logical width from computeInlineDirectionPositionsForLine https://bugs.webkit.org/show_bug.cgi?id=57213 Extracted updateLogicalWidthForLeftAlignedBlock, updateLogicalWidthForRightAlignedBlock, and updateLogicalWidthForCenterAlignedBlock from computeInlineDirectionPositionsForLine. They are used to update logical widths, logical left, and total logical width for left, right, and center aligned blocks. * rendering/RenderBlockLineLayout.cpp: (WebCore::updateLogicalWidthForLeftAlignedBlock): (WebCore::updateLogicalWidthForRightAlignedBlock): (WebCore::updateLogicalWidthForCenterAlignedBlock): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): 2011-03-28 Evan Martin Reviewed by Ryosuke Niwa. Refactor duplicate code in HTMLTextElement https://bugs.webkit.org/show_bug.cgi?id=57215 * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::childrenChanged): This method did an equivalent loop to the text() method on the same object. 2011-03-27 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. Don't call WebSocket::didClose() more than once. https://bugs.webkit.org/show_bug.cgi?id=57081 If WebSocket close() is called, and connection is established, then it will call didClose() that resets m_channel to 0. After that, when connection is closed, WebSocketChannel will call didClose for the WebSocket instance. Call WebSocketChannel::disconnect() before m_channel = 0 to make sure WebSocketChannel suppress the second didClose(). Test: http/tests/websocket/tests/close-unref-websocket.html * websockets/WebSocket.cpp: (WebCore::WebSocket::didClose): 2011-03-27 Adam Barth Reviewed by Eric Seidel. Fix script-src redirect handling https://bugs.webkit.org/show_bug.cgi?id=57196 Resource-loading requirements in CSP apply to each hop in the redirect chain. To make that work properly, we need to move enforcement into the loader. Fortunately, we already have a choke-point in the loader for enforcing this kind of policy. * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): * html/parser/HTMLDocumentParser.cpp: * html/parser/HTMLDocumentParser.h: * html/parser/HTMLScriptRunnerHost.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::canRequest): * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowScriptFromSource): * page/ContentSecurityPolicy.h: 2011-03-27 Jer Noble Reviewed by Maciej Stachowiak. Full Screen: disable keyboard access by default https://bugs.webkit.org/show_bug.cgi?id=56684 Pass whether keyboard access was requested up to ChromeClient when asking if fullscreen mode is supported. * dom/Document.cpp: (WebCore::Document::webkitRequestFullScreenForElement): * page/ChromeClient.h: (WebCore::ChromeClient::supportsFullscreenForElement): 2011-03-27 Patrick Gansterer Reviewed by Andreas Kling. [CMake] Generate WebKitVersion.h https://bugs.webkit.org/show_bug.cgi?id=57128 This file will be used for the user agent string by the CMake based ports. * CMakeLists.txt: 2011-03-27 Ben Taylor Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=57170 Fix last elements in an enum to remove a trailing comma. Sun Studio 12 CC errors out. Compile fix only, no actual code change. * dom/ExceptionCode.h: * editing/EditorInsertAction.h: * loader/FrameLoaderTypes.h: * platform/PlatformKeyboardEvent.h: * platform/ScrollTypes.h: * platform/graphics/BitmapImage.h: * platform/image-decoders/ImageDecoder.h: * platform/network/ProtectionSpace.h: * platform/network/ResourceHandleClient.h: * platform/network/ResourceRequestBase.h: * platform/text/TextCodec.h: 2011-03-27 Rob Buis Reviewed by Nikolas Zimmermann. Text on path positioning at zero startOffset https://bugs.webkit.org/show_bug.cgi?id=56245 Since for length 0 no previous point is set, choose epsilon length to get normal at starting point of the path. Test: svg/text/text-path-middle-align.svg * platform/graphics/Path.cpp: (WebCore::Path::normalAngleAtLength): 2011-03-27 Ben Taylor Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=57151, patch derived from set created by Thiago Macieria in bug https://bugs.webkit.org/show_bug.cgi?id=24932 Fix compile issue on Solaris 10/Sun Studio 12 regarding ambiguity on ?: functions * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::thisObject): 2011-03-26 Jer Noble Unreviewed build fix. Fix a bug which was causing the "skip back" button to be missing, causing the media layout tests to fail. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldRenderMediaControlPart): 2011-03-26 Dan Bernstein Reviewed by Maciej Stachowiak. REGRESSION (r80582): Angle bracket rendered upright in vertical mode https://bugs.webkit.org/show_bug.cgi?id=57169 Test: fast/blockflow/fallback-orientation.html * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): If the font has vertical glyphs, use it, rather than continuing down the fallback list. 2011-03-26 Maciej Stachowiak Reviewed by Darin Adler. Follow-up fix for crash with giant inline stylesheets - actually don't crash, and add test https://bugs.webkit.org/show_bug.cgi?id=56150 Test: fast/css/giant-stylesheet-crash.html * dom/StyleElement.cpp: (WebCore::StyleElement::process): 2011-03-22 Jer Noble Reviewed by Eric Carlson. Media controls must use full screen style when in new full screen mode. https://bugs.webkit.org/show_bug.cgi?id=56851 Add new full screen styles for the full screen media elements. * DerivedSources.make: Add fullScreenQuickTime.css. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSStyleSelector.cpp: Removed loadFullScreenRulesIfNeeded(). (WebCore::CSSStyleSelector::CSSStyleSelector): Ditto. (WebCore::CSSStyleSelector::styleForElement): Load full screen rules if needed. * css/fullscreenQuickTime.css: Added. * css/mediaControls.css: * html/shadow/MediaControls.cpp: (WebCore::isFullScreen): Added. (WebCore::MediaControls::create): Add new full screen volume controls. (WebCore::MediaControls::updateStyle): Ditto. (WebCore::MediaControls::update): Ditto. (WebCore::MediaControls::updateVolumeSliderContainer): Ditto. (WebCore::MediaControls::forwardEvent): Ditto. * rendering/MediaControlElements.cpp: (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Added. (WebCore::MediaControlFullscreenVolumeSliderElement::create): Added. (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Added. (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Addet (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): Added. (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Added. (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Added. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Added. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): Added. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Added. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Added. * rendering/MediaControlElements.h: Added m_overridePosition. (WebCore::MediaControlVolumeSliderContainerElement::setOverridesPosition): Added. * rendering/MediaControlElements.h: (WebCore::MediaControlVolumeSliderContainerElement::overridesPosition): Added. * rendering/RenderTheme.h: (WebCore::RenderTheme::extraFullScreenStyleSheet): Added. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Added. (WebCore::RenderThemeMac::shouldRenderMediaControlPart): Render seek forward and backward buttons. 2011-03-26 Jer Noble Reviewed by Dan Bernstein. RenderMedia should obey the view's flattening bit. https://bugs.webkit.org/show_bug.cgi?id=57156 Paint the current frame in software when the associated FrameView has its flattening bit set. * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): 2011-03-26 Patrick Gansterer Unreviewed build fix for !ENABLE(DOM_STORAGE). * storage/StorageTracker.cpp: Added #if ENABLE(DOM_STORAGE) like in the other storage files. 2011-03-26 Kwang Yul Seo Reviewed by Benjamin Poulain. [Qt] Remove GraphicsLayerTextureMapper::nativeLayer https://bugs.webkit.org/show_bug.cgi?id=57141 GraphicsLayer::nativeLayer was removed in r73380. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: 2011-03-26 Adam Barth Reviewed by Eric Seidel. Teach Content Security Policy how to parse source-list https://bugs.webkit.org/show_bug.cgi?id=54799 This patch is larger than I would like, but I wasn't sure how to make it any smaller while still being reasonably testable. I've left out some features (such as host wildcarding and 'self') so I can add them in later patches with tests. Test: http/tests/security/contentSecurityPolicy/source-list-parsing.html * bindings/ScriptControllerBase.cpp: * dom/ScriptElement.cpp: * html/parser/HTMLDocumentParser.cpp: * loader/FrameLoader.cpp: - Add include explicitly now that we're not spamming the include everywhere. * dom/Document.cpp: (WebCore::Document::initSecurityContext): - We need to pass the SecurityOrigin object to ContentSecurityPolicy so that it can resolve implicit parts of source patterns, such as the scheme. * dom/Document.h: - Forward declare ContentSecurityPolicy rather than including the header. Technically this could be a separate change, but I was getting annoyed at the world re-builds. * page/ContentSecurityPolicy.cpp: (WebCore::skipExactly): (WebCore::skipUtil): (WebCore::skipWhile): - Clean up these parser helper functions. We might consider moving them to a more general location. They're very helpful for writing secure HTTP header parsers. (WebCore::CSPSource::CSPSource): - New class to represent one source in a source-list. (WebCore::CSPSource::matches): (WebCore::CSPSource::schemeMatches): (WebCore::CSPSource::hostMatches): (WebCore::CSPSource::portMatches): (WebCore::CSPSource::isSchemeOnly): - Currently we represent scheme-only sources using with an empty m_host. Another approach I considered was using another bool, but that seemed slighly messier. (WebCore::CSPSourceList::CSPSourceList): - CSPSourceList doesn't need to ref SecurityOrigin because CSPSourceList is owned by ContentSecurityPolicy, which holds a ref. (WebCore::CSPSourceList::parse): (WebCore::CSPSourceList::matches): (WebCore::CSPSourceList::parseSource): (WebCore::CSPSourceList::parseScheme): (WebCore::CSPSourceList::parseHost): (WebCore::CSPSourceList::parsePort): - A basic "segment and recurse" parser. This parser causes us to take more branches than we need, but I don't think we need to squeeze every last ouch of performance out of this parser. This approach is more simple than some of the other approaches I tried. (WebCore::CSPSourceList::addSourceSelf): (WebCore::CSPDirective::CSPDirective): (WebCore::CSPDirective::allows): (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): (WebCore::ContentSecurityPolicy::parse): (WebCore::ContentSecurityPolicy::parseDirective): (WebCore::ContentSecurityPolicy::addDirective): - I couldn't resist re-writing this parser to use the helper functions and to match the style of the source-list parser. * page/ContentSecurityPolicy.h: (WebCore::ContentSecurityPolicy::create): - Accept a SecurityOrigin context object. 2011-03-26 Patrick Gansterer Unreviewed EFL and WinCE build fix for r81977. * platform/graphics/FontPlatformData.h: 2011-03-26 Patrick Gansterer Unreviewed WinCE build fix for r82000. * platform/wince/FileSystemWinCE.cpp: (WebCore::openFile): Added missing function. 2011-03-25 Kevin Ollivier [wx] Build fix, don't use the new FPD implementation yet, until we can merge ours with it. * platform/graphics/FontPlatformData.h: 2011-03-25 Jer Noble Reviewed by Eric Carlson. MediaPlayerPrivateQuickTimeVisualContext should use the Application Cache during load. https://bugs.webkit.org/show_bug.cgi?id=57047 No new tests. When loading a URL, checkk osee if the Appplication Cache has a version of that URL stored; if so, use the local path to that cached media instead of the remote URL. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal): * platform/graphics/win/QTMovie.cpp: (QTMovie::loadPath): * platform/graphics/win/QTMovie.h: 2011-03-25 Dan Bernstein Reviewed by Darin Adler. Missing expansion before ideograph at the beginning or end of a text run https://bugs.webkit.org/show_bug.cgi?id=57106 Test: fast/text/justify-ideograph-leading-expansion.html * platform/graphics/TextRun.h: Replaced TrailingExpansionBehavior enum with ExpansionBehavior flags. (WebCore::TextRun::TextRun): Constructors now take an expansionBehavior parameter. (WebCore::TextRun::allowsLeadingExpansion): Added this accessor. (WebCore::TextRun::allowsTrailingExpansion): Changed to use the m_expansionBehavior member. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion from the TextRun, allowing leading expansion when appropriate. (WebCore::WidthIterator::advance): Moved the last-glyph-in-run check to only apply to expansion after the glyph, not expansion before the glyph, since that is not trailing expansion. Added code to handle expansion before the first glyph. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::ComplexTextController): Initialize m_afterExpansion from the TextRun, allowing leading expansion when appropriate. Set m_runWidthSoFar to the leading expansion. (WebCore::ComplexTextController::offsetForPosition): Account for leading expansion. (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Similar to WidthIterator::advance() * platform/graphics/mac/ComplexTextController.h: Added m_leadingExpansion member variable. * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): Renamed m_hasSelectedChildren to m_hasSelectedChildrenOrCanHaveLeadingExpansion to reflect the use of this bit by InlineTextBox. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): Replaced calls to trailingExpansionBehavior() with expansionBehavior(). (WebCore::InlineTextBox::paint): Ditto. (WebCore::InlineTextBox::paintSelection): Ditto. (WebCore::InlineTextBox::paintCompositionBackground): Ditto. (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto. (WebCore::InlineTextBox::paintTextMatchMarker): Ditto. (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto. (WebCore::InlineTextBox::offsetForPosition): Ditto. (WebCore::InlineTextBox::positionForOffset): Ditto. * rendering/InlineTextBox.h: (WebCore::InlineTextBox::canHaveLeadingExpansion): Added this accessor. (WebCore::InlineTextBox::setCanHaveLeadingExpansion): Ditto. (WebCore::InlineTextBox::expansionBehavior): Replaced trailingExpansionBehavior() with this function, which also considers canHaveLeadingExpansion(). * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Call setCanHaveLeadingExpansion() on text boxes that can have leading expansion. Avoid negative expansion. * rendering/RootInlineBox.cpp: * rendering/RootInlineBox.h: (WebCore::RootInlineBox::hasSelectedChildren): Updated for renaming of the flag. (WebCore::RootInlineBox::setHasSelectedChildren): Ditto. 2011-03-23 Jer Noble Reviewed by Maciej Stachowiak. MediaPlayerPrivateAVFoundation should use the Application Cache during load. https://bugs.webkit.org/show_bug.cgi?id=56997 No new tests. When loading a URL, check to see if the Application Cache has a version of that URL stored; if so, use the local path to that cached media instead of the remote URL. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Check to see if the media should be loaded from the application cache. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForCacheResource): Added. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Split out from createAVPlayerForURL. 2011-03-25 Ben Taylor Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=57122. Solaris 10/SunStudio 12 expect both sides of a ?: operation to have the same types. Extracted from original https://bugs.webkit.org/show_bug.cgi?id=24932, patch 13 of 17, and originally created by Thiago Macieira. fixes a compile issue on Solaris 10/SunStudio 12 * loader/DocumentLoader.h: (WebCore::DocumentLoader::serverRedirectSourceForHistory): * loader/FrameLoader.cpp: (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithNavigationAction): 2011-02-03 Jer Noble Reviewed by Maciej Stachowiak. MediaPlayerPrivateQTKit should use the Application Cache during load. https://bugs.webkit.org/show_bug.cgi?id=53818 No new tests. When loading a URL, check to see if the Application Cache has a version of that URL stored; if so, use that data instead of the remote URL. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): (WebCore::MediaPlayerPrivateQTKit::createQTMovie): (WebCore::MediaPlayerPrivateQTKit::loadInternal): 2011-03-25 James Robinson Reviewed by Kenneth Russell. [chromium] Move draw implementations to CCLayerImpl for everything except content layers https://bugs.webkit.org/show_bug.cgi?id=56793 Moves the implementation of the layer's draw() function from LayerChromium subclasses to CCLayerImpl subclasses for all layer types except content layers. This gets us closer to decoupling the composite step itself from updating the layers. The biggest change in this patch is adding a set of CCLayerImpl subclasses to implement the different drawing routines and moving the code from each XXXLayerChromium to CCXXXLayerImpl. In order to render from the CCLayerImpl side all state needed at draw time also has to be synchronized, which is performed in pushPropertiesTo(). On the LayerRendererChromium side there are a few changes. I've split the updateContents calls on LayerChromiums into two operations tentatively named 'paintContentsIfNeeded' and 'updateCompositorResources'. paintContents() is used for any code that calls into WebKit in order to generate new pixel data. It's expected that this call may take a long period of time and may involve "odd" side effects. updateCompositorResources() is used for code that needs to update the compositor's texture data or other state. It is not expected that this callback will take long (since it's just inserting commands into the GL command stream, ideally) and this call is expected to have access to the compositor's context, unlike paintContents(). The updateAndDrawLayers cycle now looks like this: 1.) update the root content layer 2.) update the root layer scrollbars 3.) for each LayerChromium in tree order: a.) ensure a CCLayerImpl of the correct type exists for this layer b.) push all draw time properties from the LayerChromium to the CCLayerImpl c.) construct the appropriate draw transforms, render surfaces and render surface z-order sublayer lists 4.) for each LayerChromium in tree order, paint the layer's contents 5.) for each LayerChromium in tree order, update the associate compositor resources (textures, etc) 6.) draw the root layer and its scrollbars 7.) for each CCLayerImpl in render surface order, draw it Step 3 should really happen after step 5, but right now painting a content layer requires knowledge of the render surface properties and draw transforms in order to paint. We also currently push layer properties from LayerChromium->CCLayerImpls twice now - once at 3.b and once after 5 so we can pick up any texture updates. This will also get fixed when the paint dependency on render surfaces is resolved. I haven't modified the root layer or content layers in order to minimize conflicts with the other pending work in that area. Tests: compositing/ * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::createCCLayerImpl): (WebCore::CanvasLayerChromium::pushPropertiesTo): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::requiresClippedUpdateRect): (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::updateCompositorResources): (WebCore::ContentLayerChromium::bindContentsTexture): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::cleanupResources): (WebCore::LayerChromium::setLayerRenderer): (WebCore::LayerChromium::setName): (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::dumpLayer): (WebCore::LayerChromium::createCCLayerImpl): (WebCore::LayerChromium::createCCLayerImplIfNeeded): (WebCore::LayerChromium::ccLayerImpl): (WebCore::LayerChromium::layerRenderer): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::paintContentsIfDirty): (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): (WebCore::LayerRendererChromium::paintContentsRecursive): (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::createCCLayerImpl): (WebCore::PluginLayerChromium::setTextureId): (WebCore::PluginLayerChromium::pushPropertiesTo): * platform/graphics/chromium/PluginLayerChromium.h: (WebCore::PluginLayerChromium::textureId): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::createCCLayerImpl): (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::pushPropertiesTo): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp. (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl): (WebCore::CCCanvasLayerImpl::~CCCanvasLayerImpl): (WebCore::CCCanvasLayerImpl::draw): (WebCore::CCCanvasLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h. (WebCore::CCCanvasLayerImpl::create): (WebCore::CCCanvasLayerImpl::setTextureId): (WebCore::CCCanvasLayerImpl::setPremultipliedAlpha): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::descendantsDrawsContent): (WebCore::CCLayerImpl::updateCompositorResources): (WebCore::CCLayerImpl::writeIndent): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setAnchorPoint): (WebCore::CCLayerImpl::setAnchorPointZ): (WebCore::CCLayerImpl::setMasksToBounds): (WebCore::CCLayerImpl::setOpacity): (WebCore::CCLayerImpl::setPosition): (WebCore::CCLayerImpl::setPreserves3D): (WebCore::CCLayerImpl::setSublayerTransform): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp. (WebCore::CCPluginLayerImpl::CCPluginLayerImpl): (WebCore::CCPluginLayerImpl::~CCPluginLayerImpl): (WebCore::CCPluginLayerImpl::draw): (WebCore::CCPluginLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h. (WebCore::CCPluginLayerImpl::create): (WebCore::CCPluginLayerImpl::setTextureId): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Added. (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::setTexture): (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): (WebCore::CCVideoLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h. (WebCore::CCVideoLayerImpl::create): (WebCore::CCVideoLayerImpl::setSkipsDraw): (WebCore::CCVideoLayerImpl::setFrameFormat): 2011-03-25 Oliver Hunt Reviewed by Darin Adler. Allow defineOwnProperty to work on DOMObjects https://bugs.webkit.org/show_bug.cgi?id=57129 As other engines are allowing defineOwnProperty to be applied to host objects there's no reason for us to retain this restriction. * bindings/js/JSDOMWrapper.cpp: * bindings/js/JSDOMWrapper.h: 2011-03-25 Andy Estes Reviewed by Adele Peterson. REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js https://bugs.webkit.org/show_bug.cgi?id=49016 AC_QuickTime.js uses the common / paradigm to embed the QuickTime plug-in in web pages. r70748 removed our mapping of classids to MIME types, which causes WebKit to fall back from the object to the embed tag when QuickTime is embedded by this script. The script emits the following embed tag to embed a QuickTime movie with a poster frame: The expectation is that a QuickTime plug-in is instantiated to display the poster frame, since QuickTime registers for many common image MIME types. This is how Gecko behaves for embed. However, WebKit prefers to use its native image rendering for image embeds, in which case no movie is played when the poster frame is clicked. Fix this by changing embed to check for a plug-in that can handle the image type before rendering the image natively. This matches Gecko. Test: plugins/embed-prefers-plugins-for-images.html * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::HTMLEmbedElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): (WebCore::HTMLObjectElement::parametersForPlugin): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::isImageType): (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): * html/HTMLPlugInImageElement.h: (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::objectContentType): * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::resourceWillUsePlugin): (WebCore::SubframeLoader::requestPlugin): (WebCore::SubframeLoader::requestObject): (WebCore::SubframeLoader::shouldUsePlugin): * loader/SubframeLoader.h: 2011-03-23 Jer Noble Reviewed by Eric Carlson. Application Cache should save audio/ and video/ mime types as flat files https://bugs.webkit.org/show_bug.cgi?id=53784 No new tests, as this behavior is not possible to test without changes to the MediaPlayer engines. Store certain mime types as flat files alongside the Application Cache database. This requires plumbing the saved file path from ApplicationCacheStorage through to ApplicationCacheResource. (WebCore::ApplicationCacheStorage::openDatabase): Modify the CacheResourceData schema and add a new DeletedCacheResources table, add a new CacheResourceDataDeleted trigger. (WebCore::ApplicationCacheStorage::store): Add the new path data when adding new rows in CacheResourceData, and store media resources as flat files. (WebCore::ApplicationCacheStorage::loadCache): Pull the "path" column from CacheResourceData when loading cache items. (WebCore::ApplicationCacheStorage::remove): Call checkForDeletedResources. (WebCore::ApplicationCacheStorage::empty): Ditto. (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto. (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto. (WebCore::ApplicationCacheStorage::checkForDeletedResources): Walk through DeletedCacheResourceData looking for entries with non-empty "path" columns; if found, delete. (WebCore::ApplicationCacheStorage::flatFileAreaSize): Walk through CacheResourceData rows and sum the file size of those rows with flat file storage. (WebCore::ApplicationCacheStorage::verifySchemaVersion): Call deleteTables() instead of clearAllTables() directly. (WebCore::ApplicationCacheStorage::deleteTables): Call empty() before deleting the tables, so that flat files get deleted. (WebCore::ApplicationCacheStorage::shouldStoreResourceAsFlatFile): Added. (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Added. * loader/appcache/ApplicationCacheStorage.h: * platform/win/FileSystemWin.cpp: (WebCore::openFile): Implement openFile on Windows. 2011-03-24 David Hyatt Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=56909 Add a simplified normal flow layout path optimization for overflow recomputation and for positioned objects inside relative positioned containers. Currently there is an optimized code path for positioned objects, but as soon as we encounter a normal flow object in the containing block chain, we lose the optimization. This patch adds a new type of style difference called SimplifiedLayout that is returned when only overflow needs to be recomputed. Whenever a transform changes, this is the hint returned now instead of a full layout. In addition, when positioned objects need layout and start marking up the containing block chain, we now propagate the fact that the layout is simplified all the way up to the root, even when we encounter normal flow containing blocks. The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout() and is now used for all of these cases (in addition to what it handled before). The simplified layout optimization (even in ToT) did not work correctly when static distances needed to be recomputed. In order to make static distance computations work with simplified layout, positioned objects now always compute their static offsets, even if they explicitly specify left/top. That way normal flow layout never has to re-run when the positioned object moves. This makes movement of a positioned object along a single non-auto axis much faster when the other axis is auto. Because this code kicked in more often for absolutely positioned objects whose original display was inline, I went ahead and fixed the trailing space issue with those objects. This causes a bunch of layout tests to progress. Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::adjustPositionedBlock): (WebCore::RenderBlock::simplifiedNormalFlowLayout): (WebCore::RenderBlock::simplifiedLayout): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::setStaticPositions): (WebCore::RenderBlock::findNextLineBreak): * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::positionLineBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleWillChange): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::layoutHorizontalBox): (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): (WebCore::RenderObject::adjustStyleDifference): (WebCore::RenderObject::setStyle): (WebCore::RenderObject::styleDidChange): * rendering/RenderObject.h: (WebCore::RenderObject::needsLayout): (WebCore::RenderObject::needsPositionedMovementLayoutOnly): (WebCore::RenderObject::needsSimplifiedNormalFlowLayout): (WebCore::RenderObject::setNeedsLayout): (WebCore::RenderObject::setChildNeedsLayout): (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout): (WebCore::RenderObject::markContainingBlocksForLayout): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyleConstants.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): 2011-03-25 Martin Robinson Fix the GTK+ build until we can implement the new cross-platform FontPlatformData.h bits. * platform/graphics/FontPlatformData.h: Include the proper old font headers. (WebCore::FontPlatformData::FontPlatformData): Eliminate GTK+ specific bits of this file which reference our obsolete font implementation. (WebCore::FontPlatformData::hash): Ditto. 2011-03-25 Steve Falkenburg Reviewed by Brian Weinstein. Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll https://bugs.webkit.org/show_bug.cgi?id=57119 This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL not available in WebKit. The plug-in is fairly widespread, since it was included in a Windows Update push at one point. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::isPluginBlacklisted): Blacklist npwpf.dll. 2011-03-25 Tony Chang Try to fix the chromium mac build. We used the mac FontPlatformData on chromium mac. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/FontPlatformData.h: 2011-03-25 Tony Chang Build fix: have chromium and qt use the correct FontPlatformData.h https://bugs.webkit.org/show_bug.cgi?id=57115 * platform/graphics/FontPlatformData.h: 2011-03-25 Beth Dakin Reviewed by Dave Hyatt. Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow areas paint behind positive z-index content -and corresponding- Since overlay scrollbars don't clip the scrollable content like other scrollbars do, the only way to get them to paint on top of all possible scrollable content is to make them paint on top of everything. To do this, this patch adds a second trip through the layer tree if it contains overlay scrollbars that need painting. After calling paint() on the rootLayer, call paintOverlayScrollers() if containsDirtyOverlayScrollbars() is true. * page/FrameView.cpp: (WebCore::FrameView::paintContents): RenderLayer has two new member variable. m_containsDirtyOverlayScrollbars is a bool that is set on the root layer when it has child layers that need overlay scrollbars to be painted. m_cachedOverlayScrollbarOffset is an IntPoint to cache the tx and ty of the overlay scrollbars on the first (normal) pass through the layer tree. This prevents us from having to re-enter the render tree during the second (overlay-only) pass. Finally, there is also a new paint flag: PaintLayerPaintingOverlayScrollbars. * rendering/RenderLayer.h: (WebCore::RenderLayer::containsDirtyOverlayScrollbars): (WebCore::RenderLayer::setContainsDirtyOverlayScrollbars): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintOverlayScrollbars): (WebCore::RenderLayer::paintLayer): 2011-03-25 Jessie Berlin Reviewed by Sam Weinig. WebKit2: Need to be able to set and get the Cookie Storage Policy. https://bugs.webkit.org/show_bug.cgi?id=50780 * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::privateCookieStorage): Rename privateBrowsingCookieStorage to privateCookieStorage. (WebCore::currentCookieStorage): Ditto. (WebCore::setCurrentCookieStorage): Ditto. (WebCore::setCookieStoragePrivateBrowsingEnabled): Ditto. (WebCore::defaultCookieStorage): Return the default cookie storage. (WebCore::privateBrowsingCookieStorage): Return privateCookieStorage().get() * platform/network/cf/CookieStorageCFNet.h: 2011-03-25 Emil A Eklund Reviewed by Dimitri Glazkov. Text field "onchange" event is triggered if actual value unchanged https://bugs.webkit.org/show_bug.cgi?id=36314 Change RenderTextControl::subtreeHasChanged to only return true if the subtree has changed since the last event was triggered. * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::insertedIntoDocument): (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent): * html/HTMLFormControlElement.h: (WebCore::HTMLTextFormControlElement::setTextAsOfLastFormControlChangeEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): (WebCore::HTMLInputElement::setValue): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValue): (WebCore::HTMLTextAreaElement::setNonDirtyValue): 2011-03-25 Brent Fulgham Reviewed by David Hyatt. Clean up FontPlatformData structure so that a single implementation is used across all ports. This first patch works for the Windows build (both CG and WinCairo), and Cocoa. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/FontPlatformData.cpp: Added. (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): * platform/graphics/FontPlatformData.h: Added. (WebCore::toCTFontRef): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::hfont): (WebCore::FontPlatformData::useGDI): (WebCore::FontPlatformData::font): (WebCore::FontPlatformData::cgFont): (WebCore::FontPlatformData::size): (WebCore::FontPlatformData::setSize): (WebCore::FontPlatformData::syntheticBold): (WebCore::FontPlatformData::syntheticOblique): (WebCore::FontPlatformData::isColorBitmapFont): (WebCore::FontPlatformData::orientation): (WebCore::FontPlatformData::textOrientation): (WebCore::FontPlatformData::widthVariant): (WebCore::FontPlatformData::setOrientation): (WebCore::FontPlatformData::scaledFont): (WebCore::FontPlatformData::fontFace): (WebCore::FontPlatformData::hash): (WebCore::FontPlatformData::operator==): (WebCore::FontPlatformData::isHashTableDeletedValue): (WebCore::FontPlatformData::hashTableDeletedFontValue): * platform/graphics/cg/FontPlatformData.h: Removed. * platform/graphics/cocoa/FontPlatformData.h: Removed. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::~FontPlatformData): (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::platformDataAssign): * platform/graphics/win/FontPlatformDataCGWin.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::~FontPlatformData): (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::platformDataAssign): * platform/graphics/win/FontPlatformDataCairoWin.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::~FontPlatformData): (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::platformDataAssign): * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/cairo/FontPlatformData.h: Removed. 2011-03-25 Enrica Casucci Reviewed by Oliver Hunt. Pasteboard data's RTF data doesn't always include URLs via NSLinkAttributeName. https://bugs.webkit.org/show_bug.cgi?id=57107 If the selection is at the beginning of content inside an anchor tag we move the selection start to include the anchor. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeSelection): Modified to change the selection start according to the new rule. 2011-03-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: refactor Network domain's frame tree API https://bugs.webkit.org/show_bug.cgi?id=57103 * inspector/Inspector.json: * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForFrameResource): (WebCore::buildObjectForCachedResource): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::buildObjectForFrame): (WebCore::buildObjectForFrameTree): (WebCore::InspectorResourceAgent::didCommitLoad): (WebCore::InspectorResourceAgent::enable): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.willSendRequest): (WebInspector.NetworkDispatcher.prototype.didReceiveResponse): (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent): (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame): (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._addFramesRecursively): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype.addOrUpdateFrame): (WebInspector.ResourceTreeModel.prototype.didCommitLoadForFrame): (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources): (WebInspector.ResourceTreeModel.prototype._clearResources): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.addOrUpdateFrame): (WebInspector.ResourcesPanel.prototype.addResourceToFrame): 2011-03-25 Dave Hyatt Reviewed by Adele Peterson. REGRESSION(r77257): Only first page of a document is printed https://bugs.webkit.org/show_bug.cgi?id=56958 Test: printing/page-count-layout-overflow.html * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow to the right place. 2011-03-25 Benjamin Poulain Reviewed by Andreas Kling. [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled https://bugs.webkit.org/show_bug.cgi?id=57087 Use explicit conversion for string to avoid depending on the default codec installed by the user code. * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapToDataUrlMethod::invoke): (JSC::Bindings::QtPixmapInstance::valueOf): * platform/qt/LanguageQt.cpp: (WebCore::platformDefaultLanguage): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeSelection): * plugins/qt/PluginPackageQt.cpp: (WebCore::initializeGtk): * plugins/qt/PluginViewQt.cpp: (WebCore::getPluginDisplay): 2011-03-25 Chang Shu Reviewed by Ryosuke Niwa. rename Node::isContentEditable and all call sites to rendererIsEditable https://bugs.webkit.org/show_bug.cgi?id=54290 This is part of the effort to separate JS API HTMLElement isContentEditable from internal Node::rendererIsEditable. Code refactoring. No new tests. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isReadOnly): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): * dom/Document.cpp: (WebCore::acceptsEditingFocus): * dom/Node.cpp: (WebCore::Node::rendererIsEditable): (WebCore::Node::shouldUseInputMethod): (WebCore::Node::canStartSelection): (WebCore::Node::rootEditableElement): * dom/Node.h: (WebCore::Node::isContentEditable): (WebCore::Node::rendererIsEditable): (WebCore::Node::rendererIsRichlyEditable): * dom/Position.cpp: (WebCore::nextRenderedEditable): (WebCore::previousRenderedEditable): (WebCore::Position::atEditingBoundary): (WebCore::Position::parentEditingBoundary): (WebCore::Position::upstream): (WebCore::Position::downstream): (WebCore::Position::isCandidate): * dom/PositionIterator.cpp: (WebCore::PositionIterator::isCandidate): * editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::AppendNodeCommand): (WebCore::AppendNodeCommand::doApply): (WebCore::AppendNodeCommand::doUnapply): * editing/ApplyStyleCommand.cpp: (WebCore::containsNonEditableRegion): (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): (WebCore::enclosingDeletableElement): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): * editing/Editor.cpp: (WebCore::Editor::canDeleteRange): (WebCore::Editor::markMisspellingsOrBadGrammar): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): * editing/EditorCommand.cpp: (WebCore::verticalScrollDistance): * editing/FormatBlockCommand.cpp: (WebCore::enclosingBlockToSplitTreeTo): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/JoinTextNodesCommand.cpp: (WebCore::JoinTextNodesCommand::doApply): (WebCore::JoinTextNodesCommand::doUnapply): * editing/MergeIdenticalElementsCommand.cpp: (WebCore::MergeIdenticalElementsCommand::doApply): (WebCore::MergeIdenticalElementsCommand::doUnapply): * editing/RemoveNodeCommand.cpp: (WebCore::RemoveNodeCommand::doApply): (WebCore::RemoveNodeCommand::doUnapply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): * editing/SelectionController.cpp: (WebCore::SelectionController::selectFrameElementInParentIfFullySelected): (WebCore::SelectionController::setSelectionFromNone): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::executeApply): (WebCore::SplitElementCommand::doUnapply): * editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::doApply): (WebCore::SplitTextNodeCommand::doUnapply): (WebCore::SplitTextNodeCommand::doReapply): * editing/SplitTextNodeContainingElementCommand.cpp: (WebCore::SplitTextNodeContainingElementCommand::doApply): * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::canonicalPosition): * editing/WrapContentsInDummySpanCommand.cpp: (WebCore::WrapContentsInDummySpanCommand::doUnapply): (WebCore::WrapContentsInDummySpanCommand::doReapply): * editing/htmlediting.cpp: (WebCore::highestEditableRoot): (WebCore::lowestEditableAncestor): (WebCore::isEditablePosition): (WebCore::isRichlyEditablePosition): (WebCore::firstEditablePositionAfterPositionInRoot): (WebCore::extendRangeToWrappingNodes): (WebCore::enclosingNodeWithTag): (WebCore::enclosingNodeOfType): (WebCore::highestEnclosingNodeOfType): (WebCore::canMergeLists): * editing/visible_units.cpp: (WebCore::previousLeafWithSameEditability): (WebCore::previousLinePosition): (WebCore::nextLeafWithSameEditability): (WebCore::nextLinePosition): (WebCore::startOfParagraph): (WebCore::endOfParagraph): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): (WebCore::HTMLAnchorElement::defaultEventHandler): (WebCore::HTMLAnchorElement::setActive): (WebCore::HTMLAnchorElement::canStartSelection): (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::supportsFocus): * html/HTMLElement.cpp: (WebCore::HTMLElement::supportsFocus): (WebCore::HTMLElement::isContentEditable): (WebCore::HTMLElement::contentEditable): * html/HTMLElement.h: * page/DragController.cpp: (WebCore::DragController::operationForLoad): (WebCore::DragController::canProcessDrag): * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::selectCursor): * page/FocusController.cpp: (WebCore::relinquishesEditingFocus): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::isContentEditable): * rendering/RenderBlock.cpp: (WebCore::positionForPointRespectingEditingBoundaries): (WebCore::RenderBlock::hasLineIfEmpty): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::addOverflowFromInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::canBeProgramaticallyScrolled): * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): * rendering/RootInlineBox.cpp: (WebCore::isEditableLeaf): * svg/SVGAElement.cpp: (WebCore::SVGAElement::supportsFocus): 2011-03-25 Maciej Stachowiak Reviewed by Antti Koivisto. Crash when a wbr element is inserted inside mroot https://bugs.webkit.org/show_bug.cgi?id=56352 Test: mathml/wbr-in-mroot-crash.html * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::layout): Look for the first box model child of the first child, instead of just assuming. 2011-03-25 Vsevolod Vlasov Reviewed by Pavel Feldman. XML Viewer: extensions can't render original XML https://bugs.webkit.org/show_bug.cgi?id=56263 Added source xml to transformed document, renamed onload function. * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::transformDocumentToTreeView): * xml/XMLViewer.xsl: 2011-03-25 Benjamin Poulain Reviewed by Andreas Kling. [Qt] Get rid of the invalid string conversion with ::fromAscii() https://bugs.webkit.org/show_bug.cgi?id=57102 Replace ::fromAscii() with ::fromLatin1() to make sure the codec does not depend on the user code. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): * platform/qt/CookieJarQt.cpp: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): 2011-03-25 Sheriff Bot Unreviewed, rolling out r81953. http://trac.webkit.org/changeset/81953 https://bugs.webkit.org/show_bug.cgi?id=57096 "inspector test breakage: part 2/2" (Requested by apavlov on #webkit). * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getAllStyles): * inspector/InspectorCSSAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): * inspector/InspectorStyleSheet.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModel.prototype._styleSheetChanged): (WebInspector.CSSStyleModel.prototype._onRevert): (WebInspector.CSSStyleSheet): (WebInspector.CSSStyleSheet.prototype.setText): 2011-03-15 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js https://bugs.webkit.org/show_bug.cgi?id=56310 Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned by CSSAgent.getStyleSheet() anymore. Test: inspector/styles/get-set-stylesheet-text.html * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getAllStyleSheets): * inspector/InspectorCSSAgent.h: * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): * inspector/InspectorStyleSheet.h: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModel.prototype._styleSheetChanged): (WebInspector.CSSStyleModel.prototype._onRevert): (WebInspector.CSSStyleSheet): (WebInspector.CSSStyleSheet.prototype.setText): 2011-03-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: extension server should not convert all resources to HAR when there are no extensions. https://bugs.webkit.org/show_bug.cgi?id=57044 * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._notifyResourceFinished): (WebInspector.ExtensionServer.prototype._hasSubscribers): 2011-03-25 Leo Yang Reviewed by Nikolas Zimmermann. SVG element performance improvement https://bugs.webkit.org/show_bug.cgi?id=57077 SVG element was expanding nesting and elements in an inefficient way. After it expanded an or a element it would restart expanding from the shadow tree root. This behavior was leading about 160 millions of calls to expandUseElementInShadowTree or expandSymbolElementInShadowTree for a single shadow tree which is illustrated by http://upload.wikimedia.org/wikipedia/commons/4/4e/Sierpinski_carpet_6.svg. But the effective calls, which really expand or elements, were about 5200; others were passing-by calls, which are recursively down to the children. This patch is altering the expanding path to reduce the passing-by calls. It will expand elements in sibling chain where there is an effective call, because the effective call replaces element which is expanded and the replacement results lose of the sibling chain of the replaced on the upper recursion stack. With this patch the passing-by calls are reduced from about 160 millions to about 30 thousands. No functionality change, no new tests. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::expandUseElementsInShadowTree): (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): * svg/SVGUseElement.h: 2011-03-25 Dominic Cooney Reviewed by Kent Tamura. Makes keygen support autofocus attribute. https://bugs.webkit.org/show_bug.cgi?id=57091 Test: fast/forms/autofocus-keygen.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::attach): 2011-03-24 Gyuyoung Kim Reviewed by Antonio Gomes. [EFL] Add sound / mute button to MediaControl UI https://bugs.webkit.org/show_bug.cgi?id=56726 Add sound / mute button to MediaControl UI. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::edjeGroupFromFormType): (WebCore::RenderThemeEfl::emitMediaButtonSignal): (WebCore::RenderThemeEfl::paintMediaMuteButton): * platform/efl/RenderThemeEfl.h: 2011-03-24 Nikolas Zimmermann Reviewed by Darin Adler. Introduce WTF HexNumber.h https://bugs.webkit.org/show_bug.cgi?id=56099 Introduce a set of functions that ease converting from a bye or a number to a hex string, replacing several of these conversions and String::format("%x") usages all over WebCore. * ForwardingHeaders/wtf/HexNumber.h: Added. * css/CSSOMUtils.cpp: (WebCore::serializeCharacterAsCodePoint): * css/CSSParser.cpp: (WebCore::quoteCSSString): * inspector/InspectorResourceAgent.cpp: (WebCore::createReadableStringFromBinary): * platform/FileSystem.cpp: (WebCore::encodeForFileName): * platform/KURL.cpp: (WebCore::appendEscapedChar): * platform/UUID.cpp: (WebCore::createCanonicalUUIDString): * platform/graphics/Color.cpp: (WebCore::Color::serialized): * platform/network/FormDataBuilder.cpp: (WebCore::FormDataBuilder::encodeStringAsFormData): * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): 2011-03-24 Stephanie Lewis Reviewed by Geoff Garen. REGRESSION: ~10 MB increase in memory under CachedScripts Add back a call to destroy decoded data after access. Keep the SourceProviderCache around as long as their are still clients to use it. No new tests because there is no change in behavior. Current tests pass. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::script): (WebCore::CachedScript::destroyDecodedData): 2011-03-24 Stephanie Lewis Reviewed by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=57073 Rework the AtomicHTMLConstructor to reserve space for attributes based on the size of the attribute list. Saves 1.5 MB on Membuster. No new tests because there was no change in behavior. Current tests pass. * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::AtomicHTMLToken): (WebCore::AtomicHTMLToken::initializeAttributes): 2011-03-24 Sheriff Bot Unreviewed, rolling out r81916 and r81917. http://trac.webkit.org/changeset/81916 http://trac.webkit.org/changeset/81917 https://bugs.webkit.org/show_bug.cgi?id=57071 broke a test on platforms that do not have QuickTime installed (Requested by estes on #webkit). * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::HTMLEmbedElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): (WebCore::HTMLObjectElement::parametersForPlugin): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::isImageType): (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): * html/HTMLPlugInImageElement.h: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::objectContentType): * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::resourceWillUsePlugin): (WebCore::SubframeLoader::requestObject): (WebCore::SubframeLoader::shouldUsePlugin): * loader/SubframeLoader.h: 2011-03-24 Dimitri Glazkov Reviewed by Darin Adler. Eliminate Node::dispatchGenericEvent. https://bugs.webkit.org/show_bug.cgi?id=57045 No functional change, covered by existing tests. * dom/Node.cpp: (WebCore::Node::dispatchEvent): Combined with the body of dispatchGenericEvent, removed unnecessary extra refs and a stale comment. * dom/Node.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchLoadEvent): Changed to use dispatchEvent. * svg/SVGElement.cpp: (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto. * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::dispatchEvent): Ditto. The code here still works thanks to SVG-aware retargeting in Node. 2011-03-24 Chris Rogers Reviewed by Kenneth Russell. web audio: Properly sample-rate convert audio assets in chromium port https://bugs.webkit.org/show_bug.cgi?id=56980 No new tests since audio API is not yet implemented. * WebCore.gypi: * platform/audio/AudioBus.cpp: (WebCore::AudioBus::createBySampleRateConverting): (WebCore::AudioBus::createByMixingToMono): * platform/audio/AudioBus.h: * platform/audio/HRTFKernel.cpp: (WebCore::extractAverageGroupDelay): (WebCore::HRTFKernel::HRTFKernel): * platform/audio/SincResampler.cpp: * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): (WebCore::createBusFromInMemoryAudioFile): 2011-03-24 Rik Cabanier Reviewed by David Hyatt. REGRESSION (r81625): fast/css/percentage-non-integer.html fails on Windows https://bugs.webkit.org/show_bug.cgi?id=56829 Test: fast/css/percentage-non-integer.html * platform/Length.h: (WebCore::Length::calcValue): (WebCore::Length::calcMinValue): (WebCore::Length::calcFloatValue): 2011-03-24 Mihai Parparita Reviewed by James Robinson. [Chromium] Vertical Japanese text is not displayed on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=56962 Make Snow Leopard check added by r80740 into a runtime check for Chromium, since it uses the same binary on both Leopard and Snow Leopard. * platform/graphics/mac/FontMac.mm: (WebCore::hasBrokenCTFontGetVerticalTranslationsForGlyphs): (WebCore::showGlyphsWithAdvances): 2011-03-24 Brady Eidson Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=57058 Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::synchronousLoadDecisionForIconURL): Only add the DocumentLoader to the set if it's non-zero. (WebCore::IconDatabase::IconDatabase): Add more logging. (WebCore::IconDatabase::performURLImport): Dispatch the "didFinishURLImport" client callback using the following 3 methods. (WebCore::FinishedURLImport::FinishedURLImport): (WebCore::FinishedURLImport::performWork): (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): * loader/icon/IconDatabase.h: (WebCore::IconDatabase::create): Expose a PassOwnPtr<> creator. * WebCore.exp.in: 2011-03-23 Jer Noble Reviewed by Maciej Stachowiak. Application Cache should save audio/ and video/ mime types as flat files https://bugs.webkit.org/show_bug.cgi?id=53784 No new tests. ApplicationCacheResource::create() now takes an additional "path" parameter. To facilitate extracting this path information, two functions in ApplicationCacheHost have been made public. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveResponse): Pass along new "path" parameter. (WebCore::ApplicationCacheGroup::didFail): Ditto. * loader/appcache/ApplicationCacheHost.h: (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): Made public. (WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource): Made public. * loader/appcache/ApplicationCacheResource.cpp: (WebCore::ApplicationCacheResource::ApplicationCacheResource): Add new "path" parameter. * loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::create): Ditto. (WebCore::ApplicationCacheResource::path): New accessor. 2011-03-24 Andy Estes Reviewed by Darin Adler. REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js https://bugs.webkit.org/show_bug.cgi?id=49016 AC_QuickTime.js uses the common / paradigm to embed the QuickTime plug-in in web pages. r70748 removed our mapping of classids to MIME types, which causes WebKit to fall back from the object to the embed tag when QuickTime is embedded by this script. The script emits the following embed tag to embed a QuickTime movie with a poster frame: The expectation is that a QuickTime plug-in is instantiated to display the poster frame, since QuickTime registers for many common image MIME types. This is how Gecko behaves for embed. However, WebKit prefers to use its native image rendering for image embeds, in which case no movie is played when the poster frame is clicked. Fix this by changing embed to check for a plug-in that can handle the image type before rendering the image natively. This matches Gecko. Test: fast/images/embed-image-plugins-disabled.html * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin): * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::isImageType): (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): * html/HTMLPlugInImageElement.h: (WebCore::HTMLPlugInImageElement::preferPluginsForImages): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::objectContentType): * loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::resourceWillUsePlugin): (WebCore::SubframeLoader::requestPlugin): (WebCore::SubframeLoader::requestObject): (WebCore::SubframeLoader::shouldUsePlugin): * loader/SubframeLoader.h: 2011-03-24 Mike Reed Reviewed by James Robinson. Move lifetime management of grContext from a global to being per-SharedGraphicsContext3D, which correctly is 1:1 with the underlying opengl context. https://bugs.webkit.org/show_bug.cgi?id=54330 No new tests. Existing tests exercise this: * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): (WebCore::DrawingBuffer::publishToPlatformLayer): (WebCore::DrawingBuffer::setGrContext): * platform/graphics/gpu/DrawingBuffer.h: * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D): (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D): (WebCore::SharedGraphicsContext3D::getGrContext): * platform/graphics/gpu/SharedGraphicsContext3D.h: * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::~PlatformContextSkia): (WebCore::PlatformContextSkia::setSharedGraphicsContext3D): 2011-03-24 Dimitri Glazkov Reviewed by Darin Adler. Untangle dependency between event ancestor chain computation and InspectorDOMAgent. https://bugs.webkit.org/show_bug.cgi?id=57050 Inspector's list of event listeners does not need to invoke Node::getEventListeners, because it simply wants to collect all ancestors and never uses EventContext bits. No functional change, covered by existing tests. * dom/Node.cpp: (WebCore::getEventAncestors): Converted into a static function. (WebCore::Node::dispatchGenericEvent): Changed to pass node to getEventAncestors. * dom/Node.h: Removed decl, moved EventDispatchBehavior enum inside. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListenersForNode): Replaced the call to getEventAncestors with a simple ancestor traversal loop. 2011-03-24 Adam Klein Reviewed by David Levin. [fileapi] Make FileError and FileException accessible from WorkerContext https://bugs.webkit.org/show_bug.cgi?id=57041 * workers/WorkerContext.idl: 2011-03-24 Sam Weinig Reviewed by Anders Carlsson. Remove legacy version of findPlainText. https://bugs.webkit.org/show_bug.cgi?id=57056 * editing/TextIterator.cpp: * editing/TextIterator.h: Remove legacy overload of findPlainText that doesn't take an options parameter. 2011-03-24 Geoffrey Garen Reviewed by Oliver Hunt. Ensure that all compilation takes place within a dynamic global object scope https://bugs.webkit.org/show_bug.cgi?id=57054 * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): Updated for signature change. 2011-03-24 John Bauman Reviewed by Kenneth Russell. preserveDrawingBuffer=true is ignored https://bugs.webkit.org/show_bug.cgi?id=56987 Add code to the V8 and JSC bindings to support grabbing the value of preserveDrawingBuffer from the input context attributes. Also, in WebGLRenderingContext use the WebGLContextAttributes that were input directly, not those from the GraphicsContext3D which could have been changed. No new tests, as this can't be tested with DRT. However, this works when tested manually. * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::clearIfComposited): (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): 2011-03-24 Enrica Casucci Reviewed by Alexey Proskuryakov. WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working. https://bugs.webkit.org/show_bug.cgi?id=56975 Adding support in WebCore to implement readSelectionFromPasteboard to support Mac OS X services from WebKit2. * WebCore.exp.in: * editing/Editor.h: * editing/mac/EditorMac.mm: (WebCore::Editor::readSelectionFromPasteboard): Added entry point to call the paste functions with the specified pasteboard. 2011-03-24 Vsevolod Vlasov Reviewed by Pavel Feldman. Web Inspector: Inspector does not show correct transfer size for synchronous requests https://bugs.webkit.org/show_bug.cgi?id=56951 Fixed transfer size for synchronous load. Test: http/tests/inspector/network/network-size-sync.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::willLoadMediaElementURL): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): * loader/ResourceLoadNotifier.h: 2011-03-24 Brady Eidson Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=57030 REGRESSION (r81782): http/tests/inspector/extensions-resources-redirect.html sometimes crashes WebKit2's web process while handling a WebIconDatabaseProxy::ReceivedIconLoadDecision message The callback objects had some bogus ASSERTs and missed a relevant null check. If a callback was waiting on a message back from the UIProcess, but was invalidated from within the WebProcess in the meantime, it's perfectly valid to attempt to performCallback() after the callback function pointer has been cleared. * loader/icon/IconDatabaseBase.h: (WebCore::EnumCallback::performCallback): (WebCore::EnumCallback::invalidate): (WebCore::EnumCallback::EnumCallback): (WebCore::ObjectCallback::performCallback): (WebCore::ObjectCallback::invalidate): (WebCore::ObjectCallback::ObjectCallback): 2011-03-24 Sam Weinig Reviewed by Darin Adler. Dictionary text extraction is not correctly detecting word boundaries on bing.com https://bugs.webkit.org/show_bug.cgi?id=56995 * WebCore.exp.in: Add some editing related exports needed by WebKit2. 2011-03-24 Andy Estes Reviewed by Eric Seidel. REGRESSION (r80231): Bad cast in HTMLTreeBuilder with closed tags https://bugs.webkit.org/show_bug.cgi?id=56836 During fragment parsing, HTMLConstructionSite holds a reference to the fragment context's closest form ancestor. If a misnested form end tag is then encountered as the first node of the fragment, we will check to see if a corresponding form start tag is in scope even though no such tag exists. This led to isScope() walking the HTMLElementStack all the way to the root DocumentFragment and attempting to cast it to Element*. Fix this by ensuring that the inScope() family of functions operate in terms of ContainerNodes to account for the fragment case. Test: fast/parser/fragment-closest-form-ancestor.html * html/parser/HTMLElementStack.cpp: (WebCore::HTMLNames::isRootNode): (WebCore::HTMLNames::isScopeMarker): (WebCore::HTMLNames::isTableScopeMarker): (WebCore::HTMLNames::isTableBodyScopeMarker): (WebCore::HTMLNames::isTableRowScopeMarker): (WebCore::HTMLElementStack::hasOnlyHTMLElementsInScope): (WebCore::HTMLElementStack::inScope): 2011-03-24 Enrica Casucci Reviewed by Darin Adler. Repeated copy and paste-in-place operation results in increasingly verbose HTML. https://bugs.webkit.org/show_bug.cgi?id=56874 When we calculate the style to apply at the insertion point we compare the initial style at the insertion point against the style calculated at the span we wrap the copied markup fragment with. We could end up with a series of unnecessary spans to remove the initial style that simply grow our markup. The consists in moving the insertion point outside any inline element that could affect the fragment being inserted when we are not pasting and matching the style. Test: editing/pasteboard/paste-text-with-style.html * editing/ReplaceSelectionCommand.cpp: (WebCore::isInlineNodeWithStyle): Added. (WebCore::ReplaceSelectionCommand::doApply): Added logic to change the insertion point according to the new rules. 2011-03-24 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] When we render WebGL offscreen, color conversion cost a lot of CPU cycles https://bugs.webkit.org/show_bug.cgi?id=40884 The software fallback is now only needed for corner cases like a manual rendering of the page to QImage. Keeping the image with the last pixel values is no longer needed. Removing it reduce the performance for real-time rendering on software surface, but this case should no longer be supported. The conversion from OpenGL color space and coordinates is done manually for performance. This also fix the bug of the inverted X axis due to the transformation. The tests and benchmarks are done through Qt API tests. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::swapBgrToRgb): (WebCore::GraphicsContext3DInternal::paint): (WebCore::GraphicsContext3D::reshape): 2011-03-24 Nat Duca Reviewed by James Robinson. [chromium] Remove bool that forces compositor HUD to always be enabled https://bugs.webkit.org/show_bug.cgi?id=57034 * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::enabled): 2011-03-24 Nat Duca Reviewed by Kenneth Russell. [chromium] Add traceEvents to compositor https://bugs.webkit.org/show_bug.cgi?id=56965 * WebCore.gypi: * platform/chromium/TraceEvent.h: Added. (WebCore::internal::ScopeTracer::ScopeTracer): (WebCore::internal::ScopeTracer::~ScopeTracer): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateRootLayerContents): (WebCore::LayerRendererChromium::updateRootLayerScrollbars): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::finish): (WebCore::LayerRendererChromium::present): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::update): 2011-03-24 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: render XHRs matching JSON regex as JSON. https://bugs.webkit.org/show_bug.cgi?id=57035 * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): * inspector/front-end/RemoteObject.js: (WebInspector.LocalJSONObject.prototype.get description.switch.case): (WebInspector.LocalJSONObject.prototype.get description): (WebInspector.LocalJSONObject.prototype._concatenate): (WebInspector.LocalJSONObject.prototype.getProperties): (WebInspector.LocalJSONObject.prototype._children): * inspector/front-end/ResourceJSONView.js: Added. (WebInspector.ResourceJSONView): (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype.hasContent): (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype.show): (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype._initialize): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.resource-view.json): * inspector/front-end/inspector.html: 2011-03-24 Dimitri Glazkov Reviewed by Darin Adler. Move media controls subtree creation into one method. https://bugs.webkit.org/show_bug.cgi?id=56969 Mechanical move, no changes in functionality. The purpose of this patch is to align existing code closer with its future version, when MediaControls is an element whose tree is created at the instantiation. * html/shadow/MediaControls.cpp: (WebCore::MediaControls::create): Added, consolidating all subtree generation logic into one place. (WebCore::MediaControls::update): Replaced methods with one call. * html/shadow/MediaControls.h: Updated decls. * rendering/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::create): Moved setting of attributes here. (WebCore::MediaControlVolumeSliderElement::create): Ditto. 2011-03-24 Steve Falkenburg Reviewed by Darin Adler. Use proper string method to generate webloc string. https://bugs.webkit.org/show_bug.cgi?id=57028 * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::getWebLocData): 2011-03-24 Ben Taylor Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=32821 Fix conditionals which had an int for one case and a pointer for another. Fix is similar to https://bugs.webkit.org/show_bug.cgi?id=56198 No new tests. Fix compilation on Solaris 10 with SunStudio 12 C++ * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::valueForShadow): 2011-03-24 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: provide live edit callback to source frame delegate. https://bugs.webkit.org/show_bug.cgi?id=57003 * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.editScriptSource): (WebInspector.DebuggerModel.prototype._didEditScriptSource): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.editScriptSource): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource): 2011-03-24 Benjamin Poulain Reviewed by Andreas Kling. Regression: WebKit does not build with Python 3 following 56807 https://bugs.webkit.org/show_bug.cgi?id=56923 The module string does not have the function replace in Python 3. The str.replace function can do the same operation in this case and works with the versions 2 and 3. * inspector/generate-inspector-idl: 2011-03-24 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: brush up Network agent API. https://bugs.webkit.org/show_bug.cgi?id=57001 * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willSendRequestImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willSendRequest): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForResourceRequest): (WebCore::buildObjectForResourceResponse): (WebCore::buildObjectForCachedResource): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorResourceAgent::setExtraHeaders): * inspector/InspectorResourceAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createResourceReceiveResponseData): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithRequest): (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource): (WebInspector.NetworkDispatcher.prototype.willSendRequest): (WebInspector.NetworkDispatcher.prototype.didReceiveWebSocketHandshakeResponse): (WebInspector.NetworkDispatcher.prototype.didCloseWebSocket): * inspector/front-end/Resource.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest): (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::createResourceHandle): 2011-03-11 Steve Block Reviewed by Jeremy Orlow. JNIType is not specific to JNI so should be renamed https://bugs.webkit.org/show_bug.cgi?id=56197 This patch renames JNIType to JavaType, renames the values of the enum, and moves it out of JNIUtility.h to its own file. Also renames the corresponding JavaField and JavaMethod getters. No new tests, refactoring only. * GNUmakefile.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bridge/jni/JNIUtility.cpp: (JSC::Bindings::javaTypeFromClassName): (JSC::Bindings::signatureFromJavaType): (JSC::Bindings::javaTypeFromPrimitiveType): (JSC::Bindings::getJNIField): (JSC::Bindings::callJNIMethod): * bridge/jni/JNIUtility.h: * bridge/jni/JavaMethod.cpp: (JavaMethod::JavaMethod): (JavaMethod::signature): * bridge/jni/JavaMethod.h: (JSC::Bindings::JavaMethod::returnTypeClassName): (JSC::Bindings::JavaMethod::returnType): * bridge/jni/JavaType.h: Copied from Source/WebCore/bridge/jni/JavaMethod.h. * bridge/jni/jni_jsobject.mm: (JavaJSObject::toString): * bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertArrayInstanceToJavaArray): (JSC::Bindings::convertValueToJValue): * bridge/jni/jsc/JNIUtilityPrivate.h: * bridge/jni/jsc/JavaArrayJSC.cpp: (JavaArray::setValueAt): (JavaArray::valueAt): * bridge/jni/jsc/JavaClassJSC.cpp: * bridge/jni/jsc/JavaFieldJSC.cpp: (JavaField::JavaField): (JavaField::dispatchValueFromInstance): (JavaField::valueFromInstance): (JavaField::dispatchSetValueToInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JavaFieldJSC.h: (JSC::Bindings::JavaField::typeClassName): (JSC::Bindings::JavaField::type): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/v8/JNIUtilityPrivate.cpp: (JSC::Bindings::convertNPVariantToJValue): (JSC::Bindings::convertJValueToNPVariant): * bridge/jni/v8/JNIUtilityPrivate.h: * bridge/jni/v8/JavaFieldV8.cpp: (JavaField::JavaField): * bridge/jni/v8/JavaFieldV8.h: (JSC::Bindings::JavaField::typeClassName): (JSC::Bindings::JavaField::type): * bridge/jni/v8/JavaInstanceV8.cpp: (JavaInstance::invokeMethod): (JavaInstance::getField): * bridge/jni/v8/JavaNPObjectV8.cpp: (JSC::Bindings::JavaNPObjectInvoke): (JSC::Bindings::JavaNPObjectGetProperty): 2011-03-24 Ojan Vafai Was being a little braindead when I committed this. Only simple selectors are allowed, but sibling selectors are sibling selectors. * css/CSSStyleSelector.cpp: (WebCore::collectFeaturesFromList): 2011-03-23 MORITA Hajime Reviewed by Kent Tamura. Spellcheck feature specific symbols should be defined. https://bugs.webkit.org/show_bug.cgi?id=56818 * Introduced USE(UNIFIED_TEXT_CHECKING), USE(GRAMMAR_CHECKING) and USE(AUTOMATIC_TEXT_REPLACEMENT) * Replaced a part of of BUILDING_ON_* conditionals with them. Note that small amount of code path on Editor.cpp is now compiled under USE(GRAMMAR_CHECKING) because these code path is already built under non-Mac ports and Keeping them buildable for such platforms reduces the build breakage risk. These path is guarded by Settings thus should never get reached. No new tests. No behavioral change. * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): (WebCore::Editor::isSelectionUngrammatical): (WebCore::Editor::guessesForUngrammaticalSelection): (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection): (WebCore::Editor::markMisspellingsAfterTypingToWord): (WebCore::Editor::markMisspellingsOrBadGrammar): (WebCore::Editor::markBadGrammar): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::changeBackToReplacedString): (WebCore::Editor::markMisspellingsAndBadGrammar): * editing/Editor.h: * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): (WebCore::TextCheckingHelper::findFirstGrammarDetail): (WebCore::TextCheckingHelper::findFirstBadGrammar): (WebCore::TextCheckingHelper::isUngrammatical): (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): (WebCore::TextCheckingHelper::markAllBadGrammar): * loader/EmptyClients.h: * platform/text/TextCheckerClient.h: * platform/text/TextChecking.h: Added. 2011-03-23 Kent Tamura Reviewed by Dimitri Glazkov. [Chromium] Force to make validation bubble DIV position:absolute https://bugs.webkit.org/show_bug.cgi?id=56901 Test: fast/forms/interactive-validation-crash-by-style-override.html * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): Add position:absolute because we need to move the validation message to a good position. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::addChild): 2011-03-23 Mike Lawther Reviewed by Ojan Vafai. flex/bison tokens and grammar for CSS calc https://bugs.webkit.org/show_bug.cgi?id=54412 Tests: css3/calc/calc-errors.html css3/calc/minmax-errors.html css3/calc/simple-calcs.html css3/calc/simple-minmax.html * css/CSSGrammar.y: * css/CSSParserValues.cpp: (WebCore::CSSParserValueList::insertValueAt): (WebCore::CSSParserValueList::extend): * css/CSSParserValues.h: * css/tokenizer.flex: 2011-03-23 Adam Klein Reviewed by David Levin. Fix resolveLocalFileSystemURL (and sync version) error codes to match the spec https://bugs.webkit.org/show_bug.cgi?id=56961 See error code listing in the Files & Directories spec: http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#widl-LocalFileSystemSync-resolveLocalFileSystemSyncURL Note that the spec currently only specifies errors for the sync version; I've used the same codes for the async version. * page/DOMWindow.cpp: (WebCore::DOMWindow::resolveLocalFileSystemURL): * workers/WorkerContext.cpp: (WebCore::WorkerContext::resolveLocalFileSystemURL): (WebCore::WorkerContext::resolveLocalFileSystemSyncURL): 2011-03-23 Jia Pu Reviewed by Darin Adler. Hook up new AppKit autocorrection UI with WK2. https://bugs.webkit.org/show_bug.cgi?id=56055 This patch is to enable WK2 to utilize autocorrection UI on Mac OS X. It contains following major changes: 1. All but one autocorrection related message is synchronous. Since dismissing autocorrection panel can potentially cause editing to occur, a synchronous dismissCorrectionPanelSoon() function is introduced to ensure all editing commands occur in correct order. 2. Additional condition variable is needed to implement dismissCorrectionPanelSoon(). To improve maintainability, CorrectionPanel class is introduced to manage the internal state related to correction panel. This change is applied to both WK1 and WK2. 3. EditorClient::isShowingCorrectionPanel() has been removed. The original purpose is to allow editor to know when to handle ESC key event. Now this is handled internally in AppKit, so EditorClient::isShowingCorrectionPanel() isn't necessary anymore. 4. The Editor* argument in EditorClient::showCorrectionPanel() has been removed, since we can access object via WebView or WKView. * editing/Editor.cpp: (WebCore::Editor::markMisspellingsAfterTypingToWord): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::correctionPanelTimerFired): (WebCore::Editor::dismissCorrectionPanel): (WebCore::Editor::dismissCorrectionPanelSoon): (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate): * editing/Editor.h: * editing/EditorCommand.cpp: (WebCore::createCommandMap): * loader/EmptyClients.h: (WebCore::EmptyEditorClient::showCorrectionPanel): (WebCore::EmptyEditorClient::dismissCorrectionPanelSoon): * manual-tests/autocorrection/close-window-when-correction-is-shown.html: Added. * page/EditorClient.h: 2011-03-22 Ojan Vafai Reviewed by Antti Koivisto. move :not over to using selectorList instead of simpleSelector https://bugs.webkit.org/show_bug.cgi?id=56894 Saves memory and simplifies code. No new tests since existing tests cover this code. * css/CSSGrammar.y: Also removed extranenous calls to updateLastSelectorLineAndPosition in simple_selector_list. These happened to work, but are only actually needed in selector_list. * css/CSSParserValues.h: * css/CSSSelector.cpp: (WebCore::CSSSelector::specificityForOneSelector): Removed null-check. The parser null-checks, I don't see why we need to here. (WebCore::CSSSelector::selectorText): Ditto. (WebCore::CSSSelector::setArgument): (WebCore::CSSSelector::isSimple): * css/CSSSelector.h: * css/CSSSelectorList.cpp: (WebCore::forEachTagSelector): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::collectFeaturesFromSelector): (WebCore::collectFeaturesFromList): 2011-03-23 Carol Szabo Reviewed by David Hyatt. Made sure that renderers displaying counters are invalidated upon counter destruction. Assertion and incorrect rendering of counters. https://bugs.webkit.org/show_bug.cgi?id=56896 Test: fast/css/counters/2displays.html * rendering/CounterNode.cpp: (WebCore::CounterNode::~CounterNode): Added to make sure that its display renderers are always reset when the node is deleted. (WebCore::CounterNode::resetRenderers): Fixed bug that would prevent reset of second and subsequent display renderers. * rendering/CounterNode.h: * rendering/RenderCounter.cpp: (WebCore::destroyCounterNodeWithoutMapRemoval): removed unnecessary calls to resetRenderers() as the CounterNode destructor takes care of that now. 2011-03-23 Brian Weinstein Reviewed by Maciej Stachowiak. WebKit2: Need API to manage the Media Cache https://bugs.webkit.org/show_bug.cgi?id=56878 Add functions that need to be exported. * WebCore.exp.in: 2011-03-23 Robert Kroeger Reviewed by James Robinson. Correct use of ENABLE() Macro In http://trac.webkit.org/changeset/81618, I mis-used the ENABLE() macro. This patch corrects. https://bugs.webkit.org/show_bug.cgi?id=56964 * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: 2011-03-23 Jer Noble Reviewed by Simon Fraser. Scrubbing