2013-01-07 Justin Novosad Fixing memory read after free in CanvasRenderingContext2D::accessFont https://bugs.webkit.org/show_bug.cgi?id=106244 Reviewed by Abhishek Arya. Using a temporary String object to hold ref count on string that is passed by reference in CanvasRenderingContext2D::accessFont. Test: fast/canvas/canvas-measureText.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::accessFont): 2013-01-07 Anders Carlsson REGRESSION(r127727): Calendar picker is ignoring step https://bugs.webkit.org/show_bug.cgi?id=97893 Reviewed by Kent Tamura. There were two mistakes: - An if-statement to check step attribute validity was wrong, and - DateTiemChooserParameters.step was milleseconds when it should be number of days. This will be changing the DateTimeChooserParameters.step to milliseconds so we can handle steps for other input types in the future. Test: fast/forms/date/calendar-picker-appearance-with-step.html * Resources/pagepopups/calendarPicker.js: (CalendarPicker): * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::openPopup): If statement was wrong. 2012-09-20 Keishi Hattori REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker https://bugs.webkit.org/show_bug.cgi?id=97166 Reviewed by Kent Tamura. Fixing bug in r127727 so arrow keys work properly. Test: fast/forms/date/calendar-picker-key-operations.html * Resources/pagepopups/calendarPicker.js: (DaysTable.prototype._maybeSetPreviousMonth): (DaysTable.prototype._maybeSetNextMonth): 2012-09-18 John Mellor Text Autosizing: Ignore constrained heights in certain circumstances. https://bugs.webkit.org/show_bug.cgi?id=96848 Reviewed by Julien Chaffraix. Ignore constrained heights on html and body elements, as some sites (e.g. wikipedia) set height:100% on these, without intending to constrain the height of descendants. Also ignore constrained heights on ancestors of floats and out-of-flow positioned elements with no height set, since the height of these is determined independently from their ancestors. Test: fast/text-autosizing/constrained-height-body.html fast/text-autosizing/constrained-out-of-flow.html fast/text-autosizing/constrained-then-float-ancestors.html fast/text-autosizing/constrained-then-position-absolute-ancestors.html fast/text-autosizing/constrained-then-position-fixed-ancestors.html * rendering/TextAutosizer.cpp: (WebCore::contentHeightIsConstrained): Adjusted constrainedness algorithm. 2012-09-18 Tommy Widenflycht MediaStream API: Create a flag to enable PeerConnection00 https://bugs.webkit.org/show_bug.cgi?id=96989 Reviewed by Adam Barth. Adding the functionality to separately enable/disable PeerConnection00. For now it is enabled by default. Not testable, nor likely to cause issues. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::deprecatedPeerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::setDeprecatedPeerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled): (RuntimeEnabledFeatures): 2012-09-18 Bo Liu Revert 128780, 128676, 128645 https://bugs.webkit.org/show_bug.cgi?id=97022 Reviewed by Adam Barth. I made these revisions to add in-place reload behavior to ImagesEnabled setting. Reverting this for now due to them causing performance regression in chromium, possibly caused by increased calls to PermissionClient::imageAllowed. * WebCore.exp.in: * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::load): * loader/cache/CachedImage.h: (WebCore::CachedImage::stillNeedsLoad): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::didAddClient): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::canRequest): (WebCore::CachedResourceLoader::determineRevalidationPolicy): (WebCore::CachedResourceLoader::setAutoLoadImages): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): * page/Settings.cpp: (WebCore::setLoadsImagesAutomaticallyInAllFrames): (WebCore::Settings::Settings): (WebCore::Settings::setLoadsImagesAutomatically): (WebCore::Settings::loadsImagesAutomaticallyTimerFired): (WebCore::Settings::setImagesEnabled): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): * testing/InternalSettings.h: (Backup): (InternalSettings): * testing/InternalSettings.idl: 2012-09-18 John J. Barton Web Inspector: Set focus on the ExtensionPanel's iframe when it is selected https://bugs.webkit.org/show_bug.cgi?id=96148 Reviewed by Vsevolod Vlasov. ExtensionView ctor calls setDefaultFocusedElement with its iframe, ExtensionPanel ctor calls setDefaultFocusedElement with the extensionView and ExtensionPanel's setDefaultFocusedElement calls its grandparent impl Tests: Added hasFocus test to extensions/extension-panel.html * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): (WebInspector.ExtensionPanel.prototype.defaultFocusedElement): * inspector/front-end/ExtensionView.js: (WebInspector.ExtensionView): 2012-09-18 Martin Robinson [GTK] [WebKit2] Use XComposite window for accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=94417 Reviewed by Carlos Garcia Campos. Instead of rendering directly to the widget's native window, render to an offscreen window redirected to a Pixmap with XComposite. No new tests. This will be covered by the existing accelerated compositing tests, which should now give correct pixel results. * platform/gtk/RedirectedXCompositeWindow.cpp: (WebCore::RedirectedXCompositeWindow::resize): Add a call to XFlush which ensures that pending X11 operations complete. * platform/gtk/RedirectedXCompositeWindow.h: (WebCore::RedirectedXCompositeWindow::windowId): Added this accessor. 2012-09-18 Julien Chaffraix Tables without any descendant and auto logical width should have a 0px logical width https://bugs.webkit.org/show_bug.cgi?id=95521 Reviewed by Abhishek Arya. The code would wrongly add the border-spacing in the row direction to the table's logical width even if we didn't have a column. The new behavior matches FireFox and Opera. IE matches our old behavior for inline tables but our new behavior for normal tables which is a bug on their side. Tests: fast/table/empty-table-should-take-no-space.html fast/table/fixed-table-layout/empty-table-should-take-no-space-fixed-layout.html * rendering/RenderTable.h: (WebCore::RenderTable::borderSpacingInRowDirection): Added this new helper function to return the right border-spacing. Added a FIXME as the code always return the horizontal dimension which is wrong in vertical-writing mode. (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection): Changed to call borderSpacingInRowDirection. Added a comment as to why we don't add border-spacing on border-collapse: separate tables. 2012-09-18 Zan Dobersek [GTK] Build is broken without option --enable-unstable-features https://bugs.webkit.org/show_bug.cgi?id=96996 Reviewed by Martin Robinson. When searching for the bare feature define in feature_defines_unstable or feature_defines_overrides, search for the bare define followed by = character. This avoids incorrectly matching the ENABLE_VIDEO define to the ENABLE_VIDEO_TRACK overriding define (and works as well for other similarly named feature defines). No new tests - no new functionality. * GNUmakefile.am: 2012-09-18 Andrey Kosyakov Web Inspector: [Extensions API] postpone requests to add extensions until extension server is initialized https://bugs.webkit.org/show_bug.cgi?id=97012 Reviewed by Vsevolod Vlasov. - queue extensions being added unless initialization is complete; - add queued extensions upon completion of initialization; * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype.initExtensions): (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (WebInspector.ExtensionServer.prototype._innerAddExtension): 2012-09-18 Christophe Dumez [EFL] min-device-width failures in media tests https://bugs.webkit.org/show_bug.cgi?id=96920 Reviewed by Kenneth Rohde Christiansen. Return a realistic value (800x600) for screen resolution if it cannot be detected, instead of returning (0x0). This allows for some tests to pass on the build bots where X is not running. No new tests, already covered by existing tests. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): 2012-09-18 Simon Hausmann Fix compilation with Qt 5 on MeeGo 1.2 Harmattan https://bugs.webkit.org/show_bug.cgi?id=96937 Reviewed by Jocelyn Turcotte. The gl2ext.h header file on the platform is outdated. Instead use the newer copy from Qt through implicit inclusion of qopengl.h. Since Qt's declarations are based on newer Khronos headers, the multi sampling extensions do have the PROC suffix, we need the same workaround as QNX. * platform/graphics/opengl/Extensions3DOpenGLES.h: 2012-09-14 Andrey Kosyakov Web Inspector: [Extensions API] explicitly manage extension audit progress https://bugs.webkit.org/show_bug.cgi?id=96803 Reviewed by Alexander Pavlov. - create a sub-progress per audit category; - manage audit category progress within the category, not in the panel logic; - consider audit is done when all categories are done; - expose AuditResults.updateProgress(worked, totalWork) in the extensions API; - retain old magic for computing audit progress if extension specifies extension results count. * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback): (WebInspector.AuditsPanel.prototype._executeAudit): (WebInspector.AuditCategory.prototype.run.callbackWrapper): (WebInspector.AuditCategory.prototype.run): * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (injectedExtensionAPI.Audits.prototype.addCategory): (injectedExtensionAPI.AuditResultImpl.prototype.updateProgress): * inspector/front-end/ExtensionAuditCategory.js: (WebInspector.ExtensionAuditCategory.prototype.run): (WebInspector.ExtensionAuditCategoryResults): (WebInspector.ExtensionAuditCategoryResults.prototype.done): (WebInspector.ExtensionAuditCategoryResults.prototype._addResult): (WebInspector.ExtensionAuditCategoryResults.prototype.updateProgress): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onUpdateAuditProgress): (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun): * inspector/front-end/ProgressBar.js: (WebInspector.ProgressIndicator.prototype.done): Assure only first call to done() has effect. 2012-09-19 Allan Sandfeld Jensen Revert r127457 and following fixes due to several hit-testing regressions https://bugs.webkit.org/show_bug.cgi?id=96830 Reviewed by Antonio Gomes. The revert misssed one related follow-up. * dom/Document.cpp: (WebCore::Document::updateHoverActiveState): 2012-09-18 Mihnea Ovidenie [CSSRegions]Flag auto-height regions https://bugs.webkit.org/show_bug.cgi?id=96267 Reviewed by Julien Chaffraix. The regions having auto logical height should be flagged so that their height will computed as part of a 2 pass-layout mechanism. A valid region is flagged as having auto logical height if: - has auto logical height and is part of the normal flow - has auto logical height, is not part of normal flow and does not have logical top/bottom specified An invalid region (part of circular dependency) will not be marked even if its style matches the above situations. Test: fast/regions/autoheight-regions-mark.html * rendering/FlowThreadController.cpp: Keep a counter of auto logical height valid regions. (WebCore::FlowThreadController::FlowThreadController): (WebCore::FlowThreadController::layoutRenderNamedFlowThreads): Verify that the current number of auto logical height regions is correct by iterating over all the regions attached to the flow threads and compute the number of auto logical height regions on the spot. (WebCore): (WebCore::FlowThreadController::isAutoLogicalHeightRegionsFlagConsistent): Helper function that is used to verify the number of auto logical height regions. * rendering/FlowThreadController.h: (WebCore::FlowThreadController::hasAutoLogicalHeightRegions): (WebCore::FlowThreadController::incrementAutoLogicalHeightRegions): (WebCore::FlowThreadController::decrementAutoLogicalHeightRegions): (FlowThreadController): * rendering/RenderFlowThread.cpp: (WebCore): (WebCore::RenderFlowThread::autoLogicalHeightRegionsCount): Helper function that is used to count the number of regions marked as having auto logical height. * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag): (WebCore): (WebCore::RenderRegion::styleDidChange): For a region that is attached to a flow thread, verify whether the style change modified its auto logical height appearance. (WebCore::RenderRegion::attachRegion): Handle the case of attaching region to a flow thread and the detach/attach sequence when the region is moved in the render tree. (WebCore::RenderRegion::detachRegion): * rendering/RenderRegion.h: (WebCore::RenderRegion::shouldHaveAutoLogicalHeight): (WebCore::RenderRegion::hasAutoLogicalHeight): (RenderRegion): * rendering/RenderTreeAsText.cpp: For the regions that use auto logical height, modify the output to reflect that. (WebCore::writeRenderNamedFlowThreads): 2012-09-18 Shinya Kawanaka Disable adding an AuthorShadowRoot to replaced elements. https://bugs.webkit.org/show_bug.cgi?id=96978 Reviewed by Hajime Morita. We (people who implement Shadow DOM) have concluded that we don't support adding AuthorShadowRoot to replaced elements in the current spec, since it turned out that a lot of difficulties exist and it brings a lot of mess to our codebase. For now, we just disable adding AuthorShadowRoot to these replaced elements. Test: fast/dom/shadow/shadow-disable.html * html/HTMLImageElement.h: * html/HTMLKeygenElement.h: * html/HTMLMeterElement.h: * html/HTMLProgressElement.h: * html/HTMLTextAreaElement.h: 2012-09-17 Csaba Osztrogonác Unreviewed, rolling out r128826 and r128813. * ForwardingHeaders/runtime/JSDestructibleObject.h: Removed. * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/objc/objc_runtime.h: (ObjcFallbackObjectImp): * bridge/objc/objc_runtime.mm: (Bindings): (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/runtime_array.cpp: (JSC): (JSC::RuntimeArray::destroy): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_object.cpp: (Bindings): (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (RuntimeObject): 2012-09-17 Kent Tamura Export RuntimeEnabledFeatures::isLangAttributeAwareFormControlUIEnabled correctly https://bugs.webkit.org/show_bug.cgi?id=96855 Reviewed by Hajime Morita. * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): Add WEBCORE_TESTING. * testing/InternalSettings.cpp: Remove a workaround. (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): * testing/InternalSettings.h: ditto. 2012-09-17 Vivek Galatage [Gtk] Remove the unused variable warning in GamepadsGtk.cpp using ASSERT_UNUSED macro https://bugs.webkit.org/show_bug.cgi?id=96975 Reviewed by Kentaro Hara. Replacing a simple ASSERT with ASSERT_UNUSED to avoid the warning. No new tests as refactoring done. * platform/gtk/GamepadsGtk.cpp: (WebCore::GamepadDeviceGtk::readCallback): 2012-09-17 Roger Fong [Win] Null check timing function received from CoreAnimation when calling CACFAnimationGetTimingFunction. https://bugs.webkit.org/show_bug.cgi?id=96972 Reviewed by Timothy Horton When paused, some CSS animations cause CoreAnimation to pass back a null timing function when calling CACFAnimationGetTimingFunction. This patch fixes this simply by ensuring that if the output of this method is null, it does not get passed into CACFAnimationSetTimingFunction via the PlatformCAAnimation::copyTimingFunctionFrom method. * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copyTimingFunctionFrom): 2012-09-17 David Barton Convert MathML to use flexboxes https://bugs.webkit.org/show_bug.cgi?id=96843 Reviewed by Eric Seidel. Using the CSS Flexible Box Model simplifies MathML in many ways. Control over alignment, row vs. column layout, and child layout order are all much easier. Complexities involving floats, continuations, and most anonymous boxes are eliminated, as are their potential for crashes and security vulnerabilities. In a flexbox, column alignment is done with align-items or align-self, instead of text-align. vertical-align and baselinePosition() are replaced by the firstLineBoxBaseline() virtual function. Tested by existing tests. * css/mathml.css: (math): (math[display="block"]): (mo, mrow, mfenced, mfrac, msub, msup, msubsup, munder, mover, munderover, msqrt, mroot): (math, mrow, mfenced, msqrt, mroot): (msqrt > *): (mo, mfrac, munder, mover, munderover): (munder, mover, munderover): (mfrac > *): (mfrac[numalign="left"] > :first-child): (mfrac[numalign="right"] > :first-child): (mfrac[denomalign="left"] > :last-child): (mfrac[denomalign="right"] > :last-child): (msubsup > :last-child, mover > :last-child, munderover > :last-child): (msub > * + *, msup > * + *, msubsup > * + *, munder > * + *, mover > * + *, munderover > * + *): (mroot): (mroot > * + *): (mtable): * mathml/MathMLInlineContainerElement.cpp: (WebCore::MathMLInlineContainerElement::createRenderer): * mathml/mathtags.in: * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::RenderMathMLBlock): (WebCore::RenderMathMLBlock::computePreferredLogicalWidths): (WebCore::RenderMathMLBlock::baselinePosition): (WebCore::RenderMathMLBlock::renderName): (WebCore::RenderMathMLBlock::paint): (WebCore::RenderMathMLTable::firstLineBoxBaseline): * rendering/mathml/RenderMathMLBlock.h: (RenderMathMLBlock): (RenderMathMLTable): (WebCore::RenderMathMLTable::RenderMathMLTable): - Change RenderMathMLBlock's base class to RenderFlexibleBox, and its display to FLEX or INLINE_FLEX. - Add RenderMathMLTable for its firstLineBoxBaseline() function, like { vertical-align: middle }. * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::createMathMLOperator): (WebCore::RenderMathMLFenced::makeFences): - Use RenderMathMLRow::addChild as a more robust name for RenderBlock::addChild. (WebCore::RenderMathMLFenced::addChild): - All inline children of a flexbox are treated as blocks automatically. * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::fixChildStyle): (WebCore::RenderMathMLFraction::updateFromElement): - numalign and denomalign attributes are now handled by mathml.css. (WebCore::RenderMathMLFraction::addChild): (WebCore::RenderMathMLFraction::layout): (WebCore::RenderMathMLFraction::firstLineBoxBaseline): * rendering/mathml/RenderMathMLFraction.h: (RenderMathMLFraction): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): (WebCore::RenderMathMLOperator::createStackableStyle): (WebCore::RenderMathMLOperator::firstLineBoxBaseline): * rendering/mathml/RenderMathMLOperator.h: * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::RenderMathMLSubSup): (WebCore::RenderMathMLSubSup::fixScriptsStyle): (WebCore::RenderMathMLSubSup::addChild): (WebCore::RenderMathMLSubSup::styleDidChange): (WebCore::RenderMathMLSubSup::layout): * rendering/mathml/RenderMathMLSubSup.h: - Rename Sup to Super, to make it more readable vs. Sub. - Instead of vertical-align, msub and msup now use the m_scripts anonymous box like msubsup does. - Individual anonymous block wrappers are no longer needed around the superscript and subscript to lay them out in a column. - Handle msub and msup layout, and improve msubsup layout, by requiring a superscript's baseline to be at least (int) fontSize / 3 + 1 above the main baseline, and a subscript's baseline to be at least (int) fontSize / 5 + 1 below it. * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::unembellishedOperator): (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline): * rendering/mathml/RenderMathMLUnderOver.h: (RenderMathMLUnderOver): - RenderMathMLUnderOver no longer needs to use anonymous wrappers for column layout. Centering and child layout order (overscript first) are also handled by mathml.css. 2012-09-17 Ryuan Choi [EFL] Several key codes are not mapped with evas key name. https://bugs.webkit.org/show_bug.cgi?id=96915 Reviewed by Gyuyoung Kim. * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createWindowsKeyMap): Added missing items of hashmap for virtual key code. 2012-09-17 Filip Pizlo Unreviewed, fix build. * css/CSSRule.cpp: (SameSizeAsCSSRule): 2012-09-16 Mark Hahnenberg Delayed structure sweep can leak structures without bound https://bugs.webkit.org/show_bug.cgi?id=96546 Reviewed by Gavin Barraclough. This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only allocators. We now have separate allocators for our three types of objects: those objects with no destructors, those objects with destructors and with immortal structures, and those objects with destructors that don't have immortal structures. All of the objects of the third type (destructors without immortal structures) now inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction. No new tests. * ForwardingHeaders/runtime/JSDestructableObject.h: Added. * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject. (JSDOMWrapper): (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject, e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to use the NEEDS_DESTRUCTOR macro. (GenerateHeader): * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject. (ObjcFallbackObjectImp): * bridge/objc/objc_runtime.mm: (Bindings): (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject. (JSC): (JSC::RuntimeArray::destroy): * bridge/runtime_array.h: (JSC::RuntimeArray::create): (JSC): * bridge/runtime_object.cpp: Inherit from JSDestructibleObject. (Bindings): (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (RuntimeObject): 2012-09-17 Sheriff Bot Unreviewed, rolling out r128809. http://trac.webkit.org/changeset/128809 https://bugs.webkit.org/show_bug.cgi?id=96958 Broke the Windows build. (Requested by andersca on #webkit). * platform/win/BString.cpp: (WebCore::BString::~BString): (WebCore::BString::adoptBSTR): * platform/win/BString.h: (BString): 2012-09-17 Patrick Gansterer [WIN] Use BString in favour of BSTR to improve memory management https://bugs.webkit.org/show_bug.cgi?id=93128 Reviewed by Anders Carlsson. BString automatically calls SysFreeString() in its destructor which helps avoiding memory leaks. So it should be used instead of BSTR directly. Add operator& to BString to allow its usage for out parameters too (like COMPtr). This fixes already a few memory leaks in the existing code. * platform/win/BString.cpp: (WebCore::BString::~BString): (WebCore::BString::adoptBSTR): (WebCore::BString::clear): (WebCore): * platform/win/BString.h: (BString): (WebCore::BString::operator&): 2012-09-17 Tony Chang Make CSS.PrefixUsage histogram smaller to save memory https://bugs.webkit.org/show_bug.cgi?id=96941 Reviewed by Ojan Vafai. Each bucket costs about 12 bytes. This reduces the size of the histogram from 600 to 384, which will save about 2.5k per renderer and browser process. In the long run, we could probably generate a table in makeprop.pl that only has the webkit prefix values to save even more memory (there are 194 properties that start with -webkit). No new tests, just refactoring. * css/CSSParser.cpp: (WebCore::cssPropertyID): 2012-09-17 Rob Buis [BlackBerry] Enable VIDEO_TRACK https://bugs.webkit.org/show_bug.cgi?id=96949 Reviewed by Antonio Gomes. Turn on runtime feature for VIDEO_TRACK. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): 2012-09-17 Adam Barth Measure the usage of window.webkitIndexedDB so we can measure the transition to webkit.indexedDB https://bugs.webkit.org/show_bug.cgi?id=96943 Reviewed by Ojan Vafai. We don't yet support window.indexedDB but we will once https://bugs.webkit.org/show_bug.cgi?id=96548 lands. This metric will help us measure the transition from the prefixed to the unprefixed API. * Modules/indexeddb/DOMWindowIndexedDatabase.idl: * page/FeatureObserver.h: 2012-09-17 Adam Barth Measure usage of the legacy WebKitBlobBuilder API in the hopes of being able to remove it https://bugs.webkit.org/show_bug.cgi?id=96939 Reviewed by Ojan Vafai. In the course of standardization, the BlobBuilder API was removed in favor of just using the Blob constructor. This patch adds some measurement to see how often this legacy API is used. If the API is not used very much, we might be able to remove it. * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::create): * page/FeatureObserver.h: 2012-09-17 Joshua Bell IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null https://bugs.webkit.org/show_bug.cgi?id=96538 Reviewed by Tony Chang. Trivial implementation change to match the spec. Tests: storage/indexeddb/factory-deletedatabase-expected.html storage/indexeddb/intversion-long-queue-expected.html * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::deleteDatabase): 2012-09-17 Rick Byers Allow gesture events to set active/hover state. https://bugs.webkit.org/show_bug.cgi?id=96060 Reviewed by Antonio Gomes. Adds GestureTapDownCancel as a new PlatformGestureEvent type. On ports that support gesture events, use GestureTapDown to trigger active/hover states, and GestureTap/GestureTapDownCancel to clear them. This is superior to using touch events for a number of reasons: 1) some ports (chromium) avoid sending touch events unless absolutely necessary, since they hurt scroll performance by blocking threaded scrolling. 2) with touch, and element really shouldn't be 'active' when the user happens to be touching it while scrolling. In that case they aren't 'manipulating the element', they're manipulating the page or div that is scrolling. 3) similarly, there may be other gestures that involve touching the element which aren't really about manipulating that element (eg. pinch to zoom). Test: fast/events/touch/gesture/gesture-tap-active-state.html Test: fast/events/touch/gesture/gesture-tap-active-state-iframe.html * dom/GestureEvent.cpp: (WebCore::GestureEvent::create): * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::handleTouchEvent): * platform/PlatformEvent.h: 2012-09-17 Alec Flett IndexedDB: Use ScriptValue instead of SerializedScriptValue for get/openCursor https://bugs.webkit.org/show_bug.cgi?id=95409 Reviewed by Kentaro Hara. This reduces a bunch of serialization/deserialization when writing to objectstores with indexes. No new tests, as this covers core functionality of IndexedDB, and almost every test would fail. Some likely tests that would fail fundamentally include: storage/indexeddb/objectstore-basics.html storage/indexeddb/cursor-basics.html storage/indexeddb/index-basics.html * Modules/indexeddb/IDBAny.cpp: (WebCore::IDBAny::scriptValue): (WebCore::IDBAny::integer): (WebCore): (WebCore::IDBAny::set): * Modules/indexeddb/IDBAny.h: (WebCore): (IDBAny): (WebCore::IDBAny::create): * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBCursor.h: (WebCore): (IDBCursor): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::version): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::setResultCursor): (WebCore::IDBRequest::onSuccess): (WebCore): (WebCore::IDBRequest::onSuccessInternal): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBTransactionCallbacks.h: * bindings/v8/IDBBindingUtilities.cpp: (WebCore::deserializeIDBValue): (WebCore::injectIDBKeyIntoScriptValue): * bindings/v8/IDBBindingUtilities.h: (WebCore): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): 2012-09-17 Adam Barth We should make collecting metrics easier by adding an IDL attribute https://bugs.webkit.org/show_bug.cgi?id=96837 Reviewed by Kentaro Hara. Currently it is too hard to set up a good measurement experiment to see whether we can safely remove a feature (including vendor-prefixed features). This patch introduces the [V8MeasureAs] IDL attribute to make that process easier. When you add the [V8MeasureAs] IDL property to an API, we'll count what fraction of Page objects used that API. * Modules/notifications/DOMWindowNotifications.idl: * bindings/scripts/CodeGeneratorV8.pm: (GenerateFeatureObservation): (GenerateNormalAttrGetter): (GenerateReplaceableAttrSetter): (GenerateNormalAttrSetter): (GenerateOverloadedFunctionCallback): (GenerateFunctionCallback): (GenerateConstructorCallback): (GenerateNamedConstructorCallback): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::testObjAttrAttrGetter): (WebCore::TestObjV8Internal::testObjAttrAttrSetter): (WebCore::TestObjV8Internal::objMethodCallback): (WebCore): * page/Page.h: (WebCore::Page::featureObserver): (Page): 2012-09-17 Bear Travis [CSS Exclusions] Enable shape-inside for percentage lengths based on logical height https://bugs.webkit.org/show_bug.cgi?id=93547 Reviewed by Levi Weintraub. Shape-inside needs to be passed the logical size to use when computing percentage based coordinates. The CSS Regions-specific method computeInitialRegionRangeForBlock has been generalized to updateRegionsAndExclusionsLogicalSize. This method takes the pre-child-layout logical width and height, and uses them to compute the logical width and height that regions and exclusions should use for layout. Regions use a block's maximum possible logical height to compute a region's maximum extent. Exclusions use a block's fixed logical width and height, or 0 if one does not exist, to resolve percentage-based shape lengths. The default logical size used for resolving percentage based coordinates is tested in shape-inside-percentage-auto.html. Test: fast/exclusions/shape-inside/shape-inside-percentage.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateRegionsAndExclusionsLogicalSize): Calculates the logical height regions and exclusions should use, and updates their layout sizes through computeExclusionShapeSize and computeRegionRangeForBlock. (WebCore): (WebCore::RenderBlock::computeExclusionShapeSize): Pass the appropriate logical size to exclusion shapes so they can resolve percentage based coordinates. (WebCore::RenderBlock::layoutBlock): Call the new updateRegionsAndExclusionsLogicalSize method. * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::percentageLogicalHeightIsResolvable): Determine if percentage lengths based on logical height can be resolved. (WebCore): (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): Added declaration. * rendering/RenderBox.h: (RenderBox): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): Calling updateRegionsAndExclusionsLogicalSize rather than computeInitialRegionRangeForBlock. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Ditto. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutBlock): Ditto. 2012-09-17 Vangelis Kokkevis [chromium] Add gpu_test trace events tracking the creation of a DrawingBuffer and Canvas2DLayerBridge. They will be used by browser tests to verify the existence of WebGL and accelerated canvas. https://bugs.webkit.org/show_bug.cgi?id=96871 Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge): * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): 2012-09-17 Bo Liu Fix LoadImagesAutomatically cache behavior https://bugs.webkit.org/show_bug.cgi?id=96829 Reviewed by Adam Barth. I broke the caching behavior of LoadImagesAutomatically in http://trac.webkit.org/changeset/128645 This restores the original behavior that AutoLoadImage does not block loads from memory cache. Test: fast/loader/display-image-unset-allows-cached-image-load.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy): (WebCore::CachedResourceLoader::clientAllowsImage): (WebCore::CachedResourceLoader::shouldDeferImageLoad): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): 2012-09-17 Andrei Poenaru Web Inspector: Display Named Flows in the Tabbed Pane of the "CSS Named Flows" Drawer https://bugs.webkit.org/show_bug.cgi?id=96733 Reviewed by Alexander Pavlov. Added functionality to the Tabbed Pane from the CSS Named Flows Drawer. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSNamedFlowCollectionsView.js: (WebInspector.CSSNamedFlowCollectionsView.prototype._appendNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._removeNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._updateNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowInSidebar): (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowTab): (WebInspector.CSSNamedFlowCollectionsView.prototype._tabSelected): (WebInspector.CSSNamedFlowCollectionsView.prototype._tabClosed): (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown): (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide): (WebInspector.FlowTreeElement): (WebInspector.FlowTreeElement.prototype.setOverset): * inspector/front-end/CSSNamedFlowView.js: Added. (WebInspector.CSSNamedFlowView): (WebInspector.CSSNamedFlowView.prototype._createFlowTreeOutline): (WebInspector.CSSNamedFlowView.prototype._insertContentNode): (WebInspector.CSSNamedFlowView.prototype._insertRegion): (WebInspector.CSSNamedFlowView.prototype.get flow): (WebInspector.CSSNamedFlowView.prototype.set flow): (WebInspector.CSSNamedFlowView.prototype._updateRegionOverset): (WebInspector.CSSNamedFlowView.prototype._mergeContentNodes): (WebInspector.CSSNamedFlowView.prototype._mergeRegions): (WebInspector.CSSNamedFlowView.prototype._update): * inspector/front-end/ElementsPanel.js: * inspector/front-end/Images/regionEmpty.png: Added. * inspector/front-end/Images/regionFit.png: Added. * inspector/front-end/Images/regionOverset.png: Added. * inspector/front-end/WebKit.qrc: * inspector/front-end/cssNamedFlows.css: (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before): (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before): (.css-named-flow-collections-view .region-empty::before): (.css-named-flow-collections-view .region-fit::before): (.css-named-flow-collections-view .region-overset::before): (.css-named-flow-collections-view .split-view-contents .named-flow-element): 2012-09-17 Zan Dobersek [Gtk] Remove configuration options for stable features that are currently enabled https://bugs.webkit.org/show_bug.cgi?id=96621 Reviewed by Martin Robinson. Remove Automake conditional checking for features that are being removed in configure.ac. Unstable features that don't introduce dependencies are now disabled if necessary by being listed in the unstable feature defines overriding variable. No new tests - no new functionality. * GNUmakefile.am: * GNUmakefile.features.am: * bindings/gobject/GNUmakefile.am: 2012-09-17 Lauro Neto [Qt] Cleanup/refactor the user agent detection code https://bugs.webkit.org/show_bug.cgi?id=96822 Unreviewed build fix. Build fixes for Windows and Mac OS builds. * platform/qt/UserAgentQt.cpp: (WebCore::UserAgentQt::standardUserAgent): QLatin1String doesn't have a default contructor. Replaced #ifdef with #if. 2012-09-17 Lauro Neto Updates to the useragent patch [Qt] Cleanup/refactor the user agent detection code https://bugs.webkit.org/show_bug.cgi?id=96822 Reviewed by Simon Hausmann. Replaced Q_WS_*/Q_OS_* with WTF OS/CPU detection macros. Cleanup the check for unsupported OS. Replaced QString.arg() usage with simple string concatenation. * platform/qt/UserAgentQt.cpp: (WebCore::UserAgentQt::standardUserAgent): 2012-09-17 Sheriff Bot Unreviewed, rolling out r128759. http://trac.webkit.org/changeset/128759 https://bugs.webkit.org/show_bug.cgi?id=96929 New assertion hit on multiple platforms (Requested by carewolf on #webkit). * dom/Document.cpp: (WebCore::Document::updateHoverActiveState): 2012-09-17 Ilya Tikhonovsky Web Inspector: NMI: now when we can detect instrumented classes we can remove addInstrumentedMember and use addMember for everything. https://bugs.webkit.org/show_bug.cgi?id=96913 Reviewed by Yury Semikhatsky. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): * bindings/v8/IntrusiveDOMWrapperMap.h: * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::reportMemoryUsage): * css/CSSBorderImageSliceValue.cpp: (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage): * css/CSSCalculationValue.cpp: * css/CSSCanvasValue.cpp: (WebCore::CSSCanvasValue::reportDescendantMemoryUsage): * css/CSSCharsetRule.cpp: (WebCore::CSSCharsetRule::reportDescendantMemoryUsage): * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage): * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage): * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::reportDescendantMemoryUsage): * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage): * css/CSSFunctionValue.cpp: (WebCore::CSSFunctionValue::reportDescendantMemoryUsage): * css/CSSGradientValue.cpp: (WebCore::CSSGradientColorStop::reportMemoryUsage): (WebCore::CSSGradientValue::reportBaseClassMemoryUsage): (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage): (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage): * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::reportDescendantMemoryUsage): * css/CSSImportRule.cpp: (WebCore::CSSImportRule::reportDescendantMemoryUsage): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::reportDescendantMemoryUsage): * css/CSSPageRule.cpp: (WebCore::CSSPageRule::reportDescendantMemoryUsage): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage): * css/CSSProperty.cpp: (WebCore::CSSProperty::reportMemoryUsage): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::reportDescendantMemoryUsage): * css/CSSRule.cpp: (WebCore::CSSRule::reportBaseClassMemoryUsage): * css/CSSRuleList.h: * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::reportDescendantMemoryUsage): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::reportMemoryUsage): * css/CSSValue.cpp: (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage): * css/CSSVariableValue.h: (WebCore::CSSVariableValue::reportDescendantMemoryUsage): * css/FontFeatureValue.cpp: (WebCore::FontFeatureValue::reportDescendantMemoryUsage): * css/FontValue.cpp: (WebCore::FontValue::reportDescendantMemoryUsage): * css/MediaList.cpp: (WebCore::MediaList::reportMemoryUsage): * css/MediaQuery.cpp: (WebCore::MediaQuery::reportMemoryUsage): * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::reportMemoryUsage): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage): (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage): (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage): * css/ShadowValue.cpp: (WebCore::ShadowValue::reportDescendantMemoryUsage): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::reportMemoryUsage): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleRule.cpp: (WebCore::StyleRule::reportDescendantMemoryUsage): (WebCore::StyleRulePage::reportDescendantMemoryUsage): (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage): (WebCore::StyleRuleMedia::reportDescendantMemoryUsage): (WebCore::StyleRuleRegion::reportDescendantMemoryUsage): * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::reportDescendantMemoryUsage): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::reportMemoryUsage): * css/WebKitCSSKeyframeRule.cpp: (WebCore::StyleKeyframe::reportMemoryUsage): (WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage): * css/WebKitCSSKeyframesRule.cpp: (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage): (WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage): * css/WebKitCSSRegionRule.cpp: (WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage): * css/WebKitCSSSVGDocumentValue.cpp: (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage): * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage): * dom/Attribute.h: (WebCore::Attribute::reportMemoryUsage): * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/Element.h: (WebCore::Element::reportMemoryUsage): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::reportMemoryUsage): * dom/Event.cpp: (WebCore::Event::reportMemoryUsage): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/QualifiedName.cpp: (WebCore::QualifiedName::reportMemoryUsage): (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::reportMemoryUsage): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::reportMemoryUsage): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportMemoryUsage): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::reportMemoryUsage): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::reportMemoryUsage): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::reportMemoryUsage): * loader/SubstituteData.cpp: (WebCore::SubstituteData::reportMemoryUsage): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::reportMemoryUsage): * loader/cache/CachedFont.cpp: (WebCore::CachedFont::reportMemoryUsage): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::reportMemoryUsage): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::reportMemoryUsage): * loader/cache/CachedResourceHandle.cpp: (WebCore::CachedResourceHandleBase::reportMemoryUsage): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::reportMemoryUsage): * loader/cache/CachedSVGDocument.cpp: (WebCore::CachedSVGDocument::reportMemoryUsage): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::reportMemoryUsage): * loader/cache/CachedShader.cpp: (WebCore::CachedShader::reportMemoryUsage): * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::reportMemoryUsage): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::reportMemoryUsage): * page/Frame.cpp: (WebCore::Frame::reportMemoryUsage): * platform/KURL.cpp: (WebCore::KURL::reportMemoryUsage): * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::reportMemoryUsage): * platform/KURLWTFURLImpl.h: (WebCore::KURLWTFURLImpl::reportMemoryUsage): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::reportMemoryUsage): * platform/graphics/Image.cpp: (WebCore::Image::reportMemoryUsage): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::reportMemoryUsage): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::reportMemoryUsage): * rendering/style/DataRef.h: (WebCore::DataRef::reportMemoryUsage): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::reportMemoryUsage): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::reportMemoryUsage): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::reportMemoryUsage): * svg/SVGPaint.cpp: (WebCore::SVGPaint::reportDescendantMemoryUsage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::reportMemoryUsage): 2012-09-17 Allan Sandfeld Jensen [TouchAdjustment] Adjusted point outside bounds for non-rectilinear targets https://bugs.webkit.org/show_bug.cgi?id=96098 Reviewed by Antonio Gomes. Simplifies how snapTo tries to restrict the adjustment to the touch-area, and at the same fix it to give better guarantees. Test: touchadjustment/rotated-node.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::snapTo): 2012-09-17 Filip Spacek [BlackBerry] Use glDeleteProgram to delete OpenGL shader programs. https://bugs.webkit.org/show_bug.cgi?id=96771 Reviewed by Rob Buis. Reviewed internally by Arvid Nilsson. * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp: (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread): (WebCore::EGLImageLayerWebKitThread::~EGLImageLayerWebKitThread): (WebCore::EGLImageLayerWebKitThread::deleteFrontBuffer): (WebCore::EGLImageLayerWebKitThread::createShaderIfNeeded): (WebCore::EGLImageLayerWebKitThread::blitToFrontBuffer): * platform/graphics/blackberry/EGLImageLayerWebKitThread.h: (EGLImageLayerWebKitThread): 2012-09-17 Allan Sandfeld Jensen Revert r127457 and following fixes due to several hit-testing regressions https://bugs.webkit.org/show_bug.cgi?id=96830 Reviewed by Antonio Gomes. The revert misssed one related follow-up. * dom/Document.cpp: (WebCore::Document::updateHoverActiveState): 2012-09-17 Allan Sandfeld Jensen [TouchAdjustment] Adjusted point outside bounds for non-rectilinear targets https://bugs.webkit.org/show_bug.cgi?id=96098 Reviewed by Antonio Gomes. Simplifies how snapTo tries to restrict the adjustment to the touch-area, and at the same fix it to give better guarantees. Test: touchadjustment/rotated-node.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::snapTo): 2012-09-17 Yury Semikhatsky Unreviewed. Fix Mac compilation. * bindings/v8/DOMDataStore.h: added missing virtual modifier. (DOMDataStore): 2012-09-17 Yury Semikhatsky Web Inspector: NMI don't double count fields of StaticDOMDataStore https://bugs.webkit.org/show_bug.cgi?id=96911 Reviewed by Alexander Pavlov. Provided two separate memory usage reporting routines for static and scoped DOM data stores. * bindings/v8/DOMDataStore.cpp: * bindings/v8/DOMDataStore.h: (DOMDataStore): * bindings/v8/ScopedDOMDataStore.cpp: (WebCore::ScopedDOMDataStore::reportMemoryUsage): (WebCore): * bindings/v8/ScopedDOMDataStore.h: (ScopedDOMDataStore): * bindings/v8/StaticDOMDataStore.cpp: (WebCore::StaticDOMDataStore::reportMemoryUsage): (WebCore): * bindings/v8/StaticDOMDataStore.h: (StaticDOMDataStore): 2012-09-17 Christophe Dumez [EFL] autoscroll-in-textarea.html fails on EFL https://bugs.webkit.org/show_bug.cgi?id=94150 Reviewed by Kenneth Rohde Christiansen. Do not call adjustTextAreaStyle() from RenderThemeEfl::adjustTextAreaStyle(). This is consistent with Mac port implementation. Calling adjustTextAreaStyle() causes the TextArea in the test to display 6.5 rows instead of the 6 that are requested. This causes the test case to fail because the top row that is being displayed when scrolling down is different than the one expected. Test: fast/events/autoscroll-in-textarea.html * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustTextAreaStyle): 2012-09-17 Vsevolod Vlasov Web Inspector: XHR replay fixes: should remove replayed xhr from memory cache, should not assert. https://bugs.webkit.org/show_bug.cgi?id=96904 Reviewed by Yury Semikhatsky. Replayed request is now removed from meory cache before replaying. Request body is now set to 0 when it was not present in original request. Test: http/tests/inspector/network/network-xhr-replay.html * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::replayXHR): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::sendFromInspector): 2012-09-17 Alejandro Piñeiro AX: Regression (r126369) - toggle buttons no longer return accessible titles https://bugs.webkit.org/show_bug.cgi?id=94858 Reviewed by Chris Fleizach. After the addition of the ToggleButtonRole some logic broke because some parts of the code were assuming/waiting for a ButtonRole Test: platform/gtk/accessibility/aria-toggle-button-with-title.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::isImageButton): using isButton instead of a ButtonRole comparison (WebCore::AccessibilityNodeObject::isPressed): using isButton instead of a ButtonRole comparison (WebCore::AccessibilityNodeObject::actionElement): ToggleButtonRole also contemplated in order to call or not toElement (WebCore::AccessibilityNodeObject::title): ToggleButtonRole also contemplated in order to call or not textUnderElement * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::actionVerb): buttonAction also assigned to ToggleButtonRole (WebCore::AccessibilityObject::isButton): isButton now returns that an object is a button if it is a ButtonRole, a PopUpButtonRole or a ToggleButtonRole * accessibility/AccessibilityObject.h: (AccessibilityObject): isButton is now implemented on the .c file * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::actionVerb): ToggleButtonRole also returns a buttonAction 2012-09-14 Alexander Pavlov Web Inspector: Group selectors to highlight matched selector in the Styles pane of Elements Panel https://bugs.webkit.org/show_bug.cgi?id=96626 Reviewed by Vsevolod Vlasov. Introduced evaluation of element.webkitMatchesSelector() for every part of a selector group (delimited by commas). Non-matching selectors in groups are dimmed. If element styles have changed so that the element matches none of the selectors, the entire group is rendered as matched. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate.markCallback): (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylePropertiesSection): (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.mycallback): (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.trim): (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.resolvedCallback): (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup): (WebInspector.StylePropertiesSection.prototype._markMatchedSelectorsInGroup.matchesCallback): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector.markCallback): (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled): * inspector/front-end/elementsPanel.css: (.styles-section .selector): (.styles-section .selector-matches): 2012-09-17 Mike West Don't GC img elements blocked by CSP until error events fire. https://bugs.webkit.org/show_bug.cgi?id=94677 Reviewed by Jochen Eisinger. Currently, the GC checks that no load events are pending for an image element before reclaiming its memory. It's not, however, checking that error events are taken care of. This leads to the potential of firing an event on a DOM element that we've already collected. That's a Bad Thing. This patch adjusts the check to catch error events as well as load events, which should ensure that the element isn't collected until it's really ready. As a drive-by, it also changes the name of the check to 'hasPendingActivity' from 'hasPendingLoadEvent' for clarity. http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html should no longer crash, and the new http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash.html and fast/events/onerror-img-after-gc.html shouldn't crash either. Tests: fast/events/onerror-img-after-gc.html http/tests/security/contentSecurityPolicy/img-blocked-no-gc-crash.html * bindings/v8/V8GCController.cpp: (WebCore::calculateGroupId): Switch to using ImageLoader::hasPendingActivity(). * html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): Switch to using ImageLoader::hasPendingActivity(). * loader/ImageLoader.h: (WebCore::ImageLoader::hasPendingActivity): Added a check against pending error events in order to ensure that elements aren't garbage collected prematurely. Aslo renamed from ImageLoader::hasPendingLoadEvent for clarity. * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::haveLoadedRequiredResources): Switch to using ImageLoader::hasPendingActivity(). 2012-09-17 Philip Rogers Make SVGPathSegList.appendItem O(1) instead of O(n) https://bugs.webkit.org/show_bug.cgi?id=94048 Reviewed by Nikolas Zimmermann. Paths in SVG can be specified with a String (with the d attribute) or with an SVGPathSegList. In SVGPathElement a single representation is maintained: an SVGPathByteStream. To keep the byte stream synchronized with the d attribute and the PathSegList, this byte stream is rebuilt on every operation. As a result, any modification to the path is an O(n) operation. This patch takes advantage of the stream aspect of SVGPathByteStream to make SVGPathSegList.append an O(1) operation instead of O(n). When an SVGPathSeg is appended to an SVGPathSegList, this patch parses the SVGPathSeg and directly appends the resulting bytes to the byte stream. To achieve this some plumbing has been added to pass more information about the actual path changes from the SVGPathSegListTearOff to the SVGPathElement: instead of the generic commitChange() this patch adds commitChange(ListModification type). If we decide to change our internal path data structure in the future, this additional commitChange function can be used to pass the information needed to make SVGPathSegList synchronization faster. SVG Path Benchmark (http://bl.ocks.org/1296930) showing just the appendItem() time used in building a 5000 segment path (avg of 3 runs): WebKit without patch: 562 ms Firefox 18.01a: 55 ms Opera 12.50 internal: 27 ms WebKit with patch: 7 ms Test: perf/svg-path-appenditem.html This test proves the claim: SVGPathSegList.appendItem is now O(1). Additional tests that appendItem works are covered with existing tests. * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::append): This additional append method allows an SVGPathByteStream to be appended to another. * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::pathSegListChanged): By passing the extra ListModification type to pathSegListChanged, SVGPathElement is now able to only synchronize the parts of the byte stream that actually changed. In this patch only append is treated differently but one can imagine other performance improvements this additional information allows. * svg/SVGPathElement.h: (SVGPathElement): * svg/SVGPathParser.cpp: (WebCore::SVGPathParser::parsePathDataFromSource): During normal SVGPathSegList parsing we enforce that the path start with a moveto command. This function has been expanded to make that optional so that parsing can be performed elsewhere in the path (e.g., in the middle). * svg/SVGPathParser.h: (SVGPathParser): * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::commitChange): * svg/SVGPathSegList.h: (SVGPathSegList): * svg/SVGPathSegWithContext.h: (WebCore::SVGPathSegWithContext::commitChange): * svg/SVGPathUtilities.cpp: (WebCore::appendSVGPathByteStreamFromSVGPathSeg): This function reuses the SVGPathSegList parsing infrastructure to parse an SVGPathSegList with just the single SVGPathSeg that is being appended. The resulting byte stream can then be appended to the result path byte stream. (WebCore): * svg/SVGPathUtilities.h: (WebCore): * svg/properties/SVGListProperty.h: (WebCore::SVGListProperty::appendItemValues): (WebCore::SVGListProperty::appendItemValuesAndWrappers): (WebCore::SVGListProperty::commitChange): (SVGListProperty): * svg/properties/SVGPathSegListPropertyTearOff.h: (WebCore::SVGPathSegListPropertyTearOff::commitChange): (SVGPathSegListPropertyTearOff): 2012-09-16 James Robinson Chromium win build fix - listing a file that doesn't exist is a fatal errors in the msvs gyp generator. * WebCore.gypi: 2012-09-16 Dan Bernstein REGRESSION (r126763): css1/pseudo/firstline.html fails when using the complex text code path https://bugs.webkit.org/show_bug.cgi?id=96890 Reviewed by Sam Weinig. Test: fast/text/stale-TextLayout-from-first-line.html When a first-line style specifies a font, different pieces of the same RenderText can be laid out using different fonts, requiring a differet TextLayout for each piece. * rendering/RenderBlock.h: (RenderTextInfo): Added m_font data member. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::RenderTextInfo::RenderTextInfo): Added initializer for new data member. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added code to update the text layout in renderTextInfo if the font has changed. 2012-09-16 Kalev Lember [GTK] Missing dllexport causing linking errors on Windows platform https://bugs.webkit.org/show_bug.cgi?id=96888 Reviewed by Kentaro Hara. Define BUILDING_WebCore during the build to properly mark FrameDestructionObserver symbols with __declspec(dllexport) attribute. * GNUmakefile.am: 2012-09-15 Mike West Pause inspector when inline scripts are blocked by Content Security Policy. https://bugs.webkit.org/show_bug.cgi?id=93865 Reviewed by Pavel Feldman. When Content Security Policy blocks an inline script that's been injected after the document is parsed, a fairly unhelpful console warning is generated; it points at line 1, regardless of where the error occurred. This patch adjusts CSP to not only warn on the console, but also to notify the inspector that it should pause execution if the developer has toggled "Break on Exceptions". Developers will have a better chance of tracking down the error, as they'll have a complete call stack to work with. Tests: inspector/debugger/debugger-pause-on-blocked-event-handler.html inspector/debugger/debugger-pause-on-blocked-script-injection.html inspector/debugger/debugger-pause-on-blocked-script-url.html * English.lproj/localizedStrings.js: Adding localizable string for the new friendly pause message. * inspector/Inspector.json: Add CSPViolation as a recognized reason for pausing execution. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::scriptExecutionBlockedByCSP): Teach the InspectorDebuggerAgent about script blocking. If pause on exceptions is enabled, call 'InspectorDebuggerAgent::breakProgram', and pass in an error object with a description that points to CSP as the culprit. (WebCore): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl): Wire 'InspectorInstrumentation::scriptExecutionBlockedByCSP' to the InspectorDebuggerAgent backend. * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP): The public interface that should be kicked whenever CSP blocks script execution. (WebCore): * inspector/front-end/DebuggerModel.js: Add CSPViolation as a recognized reason for pausing execution. * inspector/front-end/ScriptsPanel.js: Add a friendly call stack status message for CSP violations. * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::checkNonceAndReportViolation): If script is blocked because the nonce doesn't match, report the blocked script to the inspector. (WebCore::CSPDirectiveList::checkInlineAndReportViolation): If inline script is blocked, report the blocked script to the inspector. This requires adding a bool parameter to differentiate blocking inline script from inline style. (WebCore::CSPDirectiveList::allowJavaScriptURLs): Tell 'checkInlineAndReportViolation' that we're dealing with script. (WebCore::CSPDirectiveList::allowInlineEventHandlers): Tell 'checkInlineAndReportViolation' that we're dealing with script. (WebCore::CSPDirectiveList::allowInlineScript): Tell 'checkInlineAndReportViolation' that we're dealing with script. (WebCore::CSPDirectiveList::allowInlineStyle): Tell 'checkInlineAndReportViolation' that we're not dealing with script. (WebCore::ContentSecurityPolicy::reportBlockedScriptExecutionToInspector): Public interface for the various CSP* classes to poke the inspector. (WebCore): * page/ContentSecurityPolicy.h: 2012-09-15 Florin Malita not working when the SVG doc is embedded as data https://bugs.webkit.org/show_bug.cgi?id=96816 Reviewed by Dirk Schulze. Updated SVGURIReference::isExternalURIReference() to correctly classify fragment-only URIs. Also, since the fragment-only test is cheap, it should be the first thing to try. Test: svg/custom/object-data-href.html * svg/SVGURIReference.h: (WebCore::SVGURIReference::isExternalURIReference): 2012-09-15 Benjamin Poulain Fix the build with WTF URL https://bugs.webkit.org/show_bug.cgi?id=96875 Reviewed by Adam Barth. Fix reportMemoryUsage, the implementation was only partial. * WebCore.exp.in: Export two more symbols as needed by API tests. * platform/KURLWTFURL.cpp: (WebCore::KURL::string): emptyString() return a reference, it makes more sense than nullAtom() here. * platform/KURLWTFURLImpl.h: (WebCore::KURLWTFURLImpl::reportMemoryUsage): 2012-09-11 Dirk Schulze Add ClipPathOperation for -webkit-clip-path organization https://bugs.webkit.org/show_bug.cgi?id=95619 Reviewed by Dean Jackson. This patch adds a new class ClipPathOperation to manage the values of the -webkit-clip-path property. ClipPathOperation stores a Path object for clipping and is a preparation for IRI references of the SVG 'clipPath' element. The structure of ClipPathOperation is simular to FilterOperation. ClipPathOperation will be extended to support IRI references directly in a second patch. No new tests. The changes just affect the backend. * GNUmakefile.list.am: Added new ClipPathOperation class. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSComputedStyleDeclaration.cpp: Use ClipPathOperation instead of BasicShape. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto. * css/StyleBuilder.cpp: Ditto. (WebCore): (WebCore::ApplyPropertyClipPath::setValue): (WebCore::ApplyPropertyClipPath::applyValue): (WebCore::ApplyPropertyClipPath::createHandler): * rendering/ClipPathOperation.h: Added. New handler for property values (BasicShape, references). (WebCore): (ClipPathOperation): (WebCore::ClipPathOperation::~ClipPathOperation): (WebCore::ClipPathOperation::operator!=): (WebCore::ClipPathOperation::getOperationType): Return the operation type. (WebCore::ClipPathOperation::isSameType): Helper function for =operator. (WebCore::ClipPathOperation::ClipPathOperation): (ShapeClipPathOperation): Inheriting class for managing BasicShapes. (WebCore::ShapeClipPathOperation::create): (WebCore::ShapeClipPathOperation::basicShape): (WebCore::ShapeClipPathOperation::windRule): (WebCore::ShapeClipPathOperation::path): (WebCore::ShapeClipPathOperation::operator==): (WebCore::ShapeClipPathOperation::ShapeClipPathOperation): * rendering/RenderLayer.cpp: Use ClipPathOperation to apply clipping. (WebCore::RenderLayer::paintLayerContents): * rendering/style/RenderStyle.h: * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): * rendering/svg/SVGRenderingContext.cpp: Ditto. (WebCore::SVGRenderingContext::prepareToRenderSVGContent): 2012-09-15 Andreas Kling REGRESSION(r127438): Google Docs to renders text too small. Reviewed by Antti Koivisto. Don't remove the inline StylePropertySet from ElementAttributeData in ~StyledElement. This behavior broke sharing of ElementAttributeData between elements with inline style, since destroying one element would effectively disable the inline style from all other elements that shared the same attribute data. What we actually want in ~StyledElement is to detach from any CSSOM wrapper that may have been instantiated. Added ElementAttributeData::detachCSSOMWrapperIfNeeded for this purpose and call that instead. Test: fast/dom/shared-inline-style-after-node-removal.html * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::detachCSSOMWrapperIfNeeded): (WebCore::ElementAttributeData::destroyInlineStyle): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/StyledElement.cpp: (WebCore::StyledElement::~StyledElement): (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (StyledElement): 2012-09-15 Kalev Lember [GTK] Include missing header files in the tarball https://bugs.webkit.org/show_bug.cgi?id=96860 Reviewed by Kentaro Hara. Build fix; dist two additional headers that are needed for building on Windows platform. * GNUmakefile.list.am: 2012-09-15 Michael Saboff Add 8 bit handling to SpaceSplitString https://bugs.webkit.org/show_bug.cgi?id=96823 Reviewed by Sam Weinig. Added templated functions based on character type to handle 8 and 16 bit string data. * dom/SpaceSplitString.cpp: (WebCore::hasNonASCIIOrUpper): (WebCore::SpaceSplitStringData::createVector): * dom/SpaceSplitString.h: (SpaceSplitStringData): 2012-09-15 Dan Bernstein REGRESSION (r125578): The monospace code path in RenderText::widthFromCache disagrees with Font::width on word spacing https://bugs.webkit.org/show_bug.cgi?id=96869 Reviewed by Eric Seidel. Test: fast/text/word-space-monospace.html This also fixes fast/css/word-spacing-characters.html * rendering/RenderText.cpp: (WebCore::RenderText::widthFromCache): Made the conditions for adding word spacing match the ones in WidthIterator. 2012-09-15 Dan Bernstein REGRESSION (r125578): Word spacing not applied to newline and tab characters that are treated as spaces https://bugs.webkit.org/show_bug.cgi?id=96865 Reviewed by Sam Weinig. Fixes fast/css/word-space-extra.html. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advanceInternal): Changed back to apply word spacing to all characters that are treated as spaces, except for tab characters when there are tab stops. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto. 2012-09-15 Dan Bernstein REGRESSION (r125578): The Mac complex text code path disagrees with the fast path on word spacing https://bugs.webkit.org/show_bug.cgi?id=96857 Reviewed by Anders Carlsson. Fixes the following tests when run with run-webkit-tests --complex-text: css2.1/20110323/c541-word-sp-001.htm css2.1/20110323/word-spacing-remove-space-002.htm css2.1/20110323/word-spacing-remove-space-003.htm css2.1/20110323/word-spacing-remove-space-004.htm css2.1/20110323/word-spacing-remove-space-005.htm css2.1/20110323/word-spacing-remove-space-006.htm Fixes fast/css/word-spacing-characters-complex-text.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Made the conditions for adding word spacing match the ones in WidthIterator again. 2012-09-15 Kent Tamura Unreviewed, rolling out r128669. http://trac.webkit.org/changeset/128669 https://bugs.webkit.org/show_bug.cgi?id=96637 Broke http/tests/workers/text-encoding.html on Chromium Linux (dbg) * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/ScopedPersistent.h: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::resetIsolatedWorlds): (WebCore::ScriptController::evaluateInIsolatedWorld): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.cpp: (WebCore::perContextDataForCurrentWorld): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setIsolatedWorldField): (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext): (WebCore::V8DOMWindowShell::destroyIsolatedShell): (WebCore): (WebCore::isolatedContextWeakCallback): (WebCore::V8DOMWindowShell::disposeContext): (WebCore::V8DOMWindowShell::initializeIfNeeded): (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin): * bindings/v8/V8DOMWindowShell.h: (V8DOMWindowShell): (WebCore::V8DOMWindowShell::getEntered): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-09-14 Sheriff Bot Unreviewed, rolling out r128673. http://trac.webkit.org/changeset/128673 https://bugs.webkit.org/show_bug.cgi?id=96847 Makes plugins/document-open.html crash (Requested by jamesr_ on #webkit). * dom/ContainerNode.cpp: (WebCore): (WebCore::ContainerNode::insertBeforeCommon): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeBetween): (WebCore::ContainerNode::removeChildren): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::parserAddChild): (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/ContainerNode.h: * dom/ContainerNodeAlgorithms.h: (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): (WebCore::ChildNodeInsertionNotifier::notify): (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): * dom/Document.cpp: (WebCore::Document::dispatchWindowEvent): (WebCore::Document::dispatchWindowLoadEvent): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): * dom/EventTarget.cpp: (WebCore): (WebCore::forbidEventDispatch): (WebCore::allowEventDispatch): (WebCore::eventDispatchForbidden): (WebCore::EventTarget::fireEventListeners): * dom/EventTarget.h: (WebCore): (WebCore::forbidEventDispatch): (WebCore::allowEventDispatch): * dom/Node.cpp: (WebCore::Node::dispatchSubtreeModifiedEvent): (WebCore::Node::dispatchFocusInEvent): (WebCore::Node::dispatchFocusOutEvent): (WebCore::Node::dispatchDOMActivateEvent): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): 2012-09-14 Julien Chaffraix Revert r127457 and following fixes due to several hit-testing regressions https://bugs.webkit.org/show_bug.cgi?id=96830 Reviewed by Antonio Gomes. This change reverts r127457, r127863 and r128505. * WebCore.exp.in: * WebCore.order: * dom/Document.cpp: (WebCore::Document::nodesFromRect): * dom/Document.h: (Document): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * rendering/HitTestRequest.h: * rendering/HitTestResult.cpp: (WebCore::HitTestLocation::HitTestLocation): * rendering/HitTestResult.h: (HitTestLocation): * rendering/RenderFrameBase.cpp: * rendering/RenderFrameBase.h: (RenderFrameBase): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-09-14 Joshua Bell IndexedDB: Calling close() during upgradeneeded handler should fire error at open request https://bugs.webkit.org/show_bug.cgi?id=96807 Reviewed by Tony Chang. Per spec, if the database connection is closed before the success event fires, the request should have an error event of type AbortError fired at it. Test: storage/indexeddb/intversion-close-in-upgradeneeded.html * Modules/indexeddb/IDBDatabase.h: (WebCore::IDBDatabase::isClosePending): Expose this state so an in-flight success can be morphed. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::close): Fire the appropriate error at connections that are mid-opening. * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::onSuccess): If the connection was closed before the success is enqueued - which can happen in multi-process ports with asynchronous messaging - convert the success to an error. 2012-09-14 Ryosuke Niwa Turn forbidEventDispatch and allowEventDispatch into a RAII object https://bugs.webkit.org/show_bug.cgi?id=96717 Reviewed by Abhishek Arya. Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch. * dom/ContainerNode.cpp: (WebCore): (WebCore::ContainerNode::insertBeforeCommon): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeBetween): (WebCore::ContainerNode::removeChildren): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::parserAddChild): (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/ContainerNode.h: (AssertNoEventDispatch): (WebCore::AssertNoEventDispatch::AssertNoEventDispatch): (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch): (WebCore::AssertNoEventDispatch::isEventDispatchForbidden): (WebCore): * dom/ContainerNodeAlgorithms.h: (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): (WebCore::ChildNodeInsertionNotifier::notify): (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): * dom/Document.cpp: (WebCore::Document::dispatchWindowEvent): (WebCore::Document::dispatchWindowLoadEvent): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): * dom/EventTarget.cpp: (WebCore): (WebCore::EventTarget::fireEventListeners): * dom/EventTarget.h: (WebCore): * dom/Node.cpp: (WebCore::Node::dispatchSubtreeModifiedEvent): (WebCore::Node::dispatchFocusInEvent): (WebCore::Node::dispatchFocusOutEvent): (WebCore::Node::dispatchDOMActivateEvent): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): 2012-09-14 Mike West JSC should throw a more descriptive exception when blocking 'eval' via CSP. https://bugs.webkit.org/show_bug.cgi?id=94331 Reviewed by Geoffrey Garen. Unless explicitly whitelisted, the 'script-src' Content Security Policy directive blocks 'eval' and 'eval'-like constructs such as 'new Function()'. When 'eval' is encountered in code, an 'EvalError' is thrown, but the associated message is poor: "Eval is disabled" doesn't give developers enough information about why their code isn't behaving as expected. This patch adds an 'errorMessage' parameter to the JavaScriptCore method used to disable 'eval'; ContentSecurityPolicy has the opportunity to pass in a more detailed and descriptive error that contains more context for the developer. The new error message is tested by adjusting existing tests; nothing new is required. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::initScript): Read the error message off the document's ContentSecurityPolicy. (WebCore::ScriptController::disableEval): * bindings/js/ScriptController.h: (ScriptController): Pipe the error message through to JSGlobalObject when disabling eval * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/js/WorkerScriptController.h: (WorkerScriptController): Pipe the error message through to JSGlobalObject when disabling eval * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::disableEval): * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::disableEval): * bindings/v8/WorkerScriptController.h: (WorkerScriptController): Placeholder for V8 piping to be built in webk.it/94332. * dom/Document.cpp: (WebCore::Document::disableEval): * dom/Document.h: (Document): * dom/ScriptExecutionContext.h: (ScriptExecutionContext): Pipe the error message through to the ScriptController when disabling eval. * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::evalDisabledErrorMessage): Accessor for the error message that ought be displayed to developers when 'eval' used while disabled for a specific directive list. (WebCore::CSPDirectiveList::setEvalDisabledErrorMessage): Mutator for the error message that ought be displayed to developers when 'eval' used while disabled for a specific directive list. (CSPDirectiveList): (WebCore::CSPDirectiveList::create): Upon creation of a CSPDirectiveList, set the error message if the directive list disables 'eval'. (WebCore::ContentSecurityPolicy::didReceiveHeader): Pass the error message into ScriptExecutionContext::disableEval. (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage): Public accessor for the policy's error message; walks the list of directive lists and returns the first error message found. (WebCore): * page/ContentSecurityPolicy.h: * workers/WorkerContext.cpp: (WebCore::WorkerContext::disableEval): * workers/WorkerContext.h: (WorkerContext): Pipe the error message through to the ScriptController when disabling eval. 2012-09-14 Dan Carney Remove V8DOMWindowShell::getEntered https://bugs.webkit.org/show_bug.cgi?id=96637 Reviewed by Adam Barth. V8DOMWindowShell::getEntered was refactored so that the window shell no longer has to be kept alive by a v8 context but rather a smaller object. No new tests. No change in functionality. * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/ScopedPersistent.h: (WebCore::ScopedPersistent::leakHandle): (ScopedPersistent): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::resetIsolatedWorlds): (WebCore::ScriptController::evaluateInIsolatedWorld): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.cpp: (WebCore::perContextDataForCurrentWorld): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setIsolatedWorldField): (WebCore::V8DOMWindowShell::toIsolatedContextData): (WebCore::isolatedContextWeakCallback): (WebCore::V8DOMWindowShell::disposeContext): (WebCore::V8DOMWindowShell::clearIsolatedShell): (WebCore): (WebCore::V8DOMWindowShell::initializeIfNeeded): (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin): * bindings/v8/V8DOMWindowShell.h: (V8DOMWindowShell): (IsolatedContextData): (WebCore::V8DOMWindowShell::IsolatedContextData::create): (WebCore::V8DOMWindowShell::IsolatedContextData::world): (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData): (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin): (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin): (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData): (WebCore::V8DOMWindowShell::enteredIsolatedContext): (WebCore::V8DOMWindowShell::enteredIsolatedContextData): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-09-14 Michelangelo De Simone [CSS Shaders] u_textureSize uniform should be set to the size of the texture. https://bugs.webkit.org/show_bug.cgi?id=95914 Reviewed by Dean Jackson. This adds support for the following shader uniform variables: uniform vec2 u_textureSize uniform vec4 u_meshBox uniform vec2 u_tileSize uniform vec2 u_meshSize The relevant section of the specification is: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables Tests: css3/filters/custom/custom-filter-u-mesh-box.html css3/filters/custom/custom-filter-u-mesh-size.html css3/filters/custom/custom-filter-u-texture-size.html css3/filters/custom/custom-filter-u-tile-size.html * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::bindProgramAndBuffers): 2012-09-14 Ojan Vafai Provide a runtime setting to disable position:sticky https://bugs.webkit.org/show_bug.cgi?id=96827 Reviewed by James Robinson. Have it be on by default so that only ports that both enable the define and don't want it on by default need to do something special. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::isValidKeywordPropertyAndValue): * css/CSSParserMode.h: (CSSParserContext): * dom/Document.cpp: (WebCore::Document::cssStickyPositionEnabled): (WebCore): * dom/Document.h: (Document): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): (WebCore::Settings::setCSSStickyPositionEnabled): (WebCore::Settings::cssStickyPositionEnabled): 2012-09-14 Simon Fraser Fix builds with CSS_IMAGE_RESOLUTION enabled after r128656. * css/StyleBuilder.cpp: (WebCore::ApplyPropertyImageResolution::applyInheritValue): (WebCore::ApplyPropertyImageResolution::applyInitialValue): 2012-09-14 Adam Barth Remove webkitPostMessage https://bugs.webkit.org/show_bug.cgi?id=96577 Reviewed by Ojan Vafai. webkitPostMessage works the same as postMessage. The spec and the implementation have been stable for a while. We should no longer be exposing this vendor-prefixed API. This patch places the webkitPostMessage API behind an ENABLE flag. We're going to try removing this API in the Chromium port. If we don't run into trouble, we'll remove it in all the other ports as well. This topic has been discussed on webkit-dev in http://lists.webkit.org/pipermail/webkit-dev/2012-April/020237.html and http://lists.webkit.org/pipermail/webkit-dev/2012-September/022189.html This patch introduces the ENABLE(LEGACY_VENDOR_PREFIXES) flag. Rather than having a flag for each vendor-prefixed API we're experimenting with removing, we'll add vendor prefixed APIs to this ENABLE when we want to try removing them. If we succeed, we'll just delete the APIs. If we fail, we'll remove them from the ENABLE. That way we avoid the churn of adding and removing many ENABLE macros. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.features.am: * bindings/js/JSDOMWindowCustom.cpp: (WebCore): * bindings/js/JSDedicatedWorkerContextCustom.cpp: (WebCore): * bindings/js/JSMessagePortCustom.cpp: (WebCore): * bindings/js/JSWorkerCustom.cpp: (WebCore): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore): * dom/MessagePort.idl: * page/DOMWindow.idl: * workers/DedicatedWorkerContext.idl: * workers/Worker.idl: 2012-09-14 Simon Fraser REGRESSION: transition doesn’t always override transition-property https://bugs.webkit.org/show_bug.cgi?id=96658 Reviewed by Dean Jackson. Setting the animation property on an Animation in CSSToStyleMap::mapAnimationProperty() is special because we have to call setAnimationMode(Animation::AnimateAll) as well as setting the property to CSSPropertyInvalid if it's for the initial state of the transition-property property. In order to fix this via StyleBuilder PropertyHandlers, we have to know, in ApplyPropertyAnimation::applyInitialValue(), which property is getting applied. This requires passing the CSSPropertyID down through all of the "apply" methods. Do some unrelated cleanup in CSSParser::parseTransitionShorthand(); the existing code was not safe with respect to adding new properties to the shorthand. Test: transitions/longhand-vs-shorthand-initial.html * css/CSSParser.cpp: (WebCore::CSSParser::parseTransitionShorthand): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyDefaultBase::applyInheritValue): (WebCore::ApplyPropertyDefaultBase::applyInitialValue): (WebCore::ApplyPropertyDefaultBase::applyValue): (WebCore::ApplyPropertyDefault::applyValue): (WebCore::ApplyPropertyNumber::applyValue): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::ApplyPropertyAuto::applyInheritValue): (WebCore::ApplyPropertyAuto::applyInitialValue): (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyColor::applyInheritValue): (WebCore::ApplyPropertyColor::applyInitialValue): (WebCore::ApplyPropertyColor::applyValue): (WebCore::ApplyPropertyDirection::applyValue): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyString::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFillLayer::applyInheritValue): (WebCore::ApplyPropertyFillLayer::applyInitialValue): (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFont::applyInheritValue): (WebCore::ApplyPropertyFont::applyInitialValue): (WebCore::ApplyPropertyFont::applyValue): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontWeight::applyValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): (WebCore::ApplyPropertyFontVariantLigatures::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyCounter::emptyFunction): (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCursor::applyInheritValue): (WebCore::ApplyPropertyCursor::applyInitialValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyTextAlign::applyValue): (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::applyInheritValue): (WebCore::ApplyPropertyPageSize::applyInitialValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): If the property is CSSPropertyWebkitTransitionProperty, call setAnimationMode(Animation::AnimateAll). (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): (WebCore::ApplyPropertyOutlineStyle::applyValue): (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): (WebCore::ApplyPropertyAspectRatio::applyInheritValue): (WebCore::ApplyPropertyAspectRatio::applyInitialValue): (WebCore::ApplyPropertyAspectRatio::applyValue): (WebCore::ApplyPropertyZoom::applyInheritValue): (WebCore::ApplyPropertyZoom::applyInitialValue): (WebCore::ApplyPropertyZoom::applyValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyClipPath::applyValue): (WebCore::ApplyPropertyWrapShape::applyValue): (WebCore::ApplyPropertyImageResolution::applyInheritValue): (WebCore::ApplyPropertyImageResolution::applyInitialValue): (WebCore::ApplyPropertyImageResolution::applyValue): * css/StyleBuilder.h: (PropertyHandler): (WebCore::PropertyHandler::applyInheritValue): (WebCore::PropertyHandler::applyInitialValue): (WebCore::PropertyHandler::applyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Pass in the property ID. 2012-09-14 Chang Shu Support constructor-type attribute in idls other than DOMWindow. https://bugs.webkit.org/show_bug.cgi?id=96821 Reviewed by Kentaro Hara. In CodeGeneratorJS.pm, we should not assume only DOMWindow uses Constructor attribute. So for other interfaces, we should pass castedThis->globalObject() instead of castedThis. Test: bindings/scripts/test/JS/JSTestObj.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjConstructorTestSubObj): (WebCore::jsTestObjConditionalAttr4Constructor): (WebCore::jsTestObjConditionalAttr5Constructor): (WebCore::jsTestObjConditionalAttr6Constructor): 2012-09-14 Tom Sepez ImageLoader can't be cleared when video element poster attribute removed. https://bugs.webkit.org/show_bug.cgi?id=96301 Reviewed by Abhishek Arya. Same problem as in https://bugs.webkit.org/show_bug.cgi?id=90801. We can't clear the image loader when the src attribute is cleared, because we might be inside a handler called on top of an image loader event dispatch. Instead we will rely on the OwnPtr relationship between the Element and the Image Loader to limit the lifetime of the loader to that of the element. Test: fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::parseAttribute): Remove permature clearing of m_imageLoader. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseAttribute): Remove permature clearing of m_imageLoader. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseAttribute): Remove permature clearing of m_imageLoader. 2012-09-14 Jeffrey Pfau Allow third-party storage blocking setting to change while a page is loaded https://bugs.webkit.org/show_bug.cgi?id=95790 Reviewed by Brady Eidson. Pipe through changes to the storage blocking policy to each document and plugin. Tests: http/tests/security/storage-blocking-loosened-local-storage.html http/tests/security/storage-blocking-loosened-plugin.html http/tests/security/storage-blocking-loosened-private-browsing-plugin.html http/tests/security/storage-blocking-loosened-shared-worker.html http/tests/security/storage-blocking-loosened-websql.html http/tests/security/storage-blocking-strengthened-local-storage.html http/tests/security/storage-blocking-strengthened-plugin.html http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html http/tests/security/storage-blocking-strengthened-shared-worker.html http/tests/security/storage-blocking-strengthened-websql.html * WebCore.exp.in: * dom/Document.cpp: Pipe changes through to the Document's SecurityOrigin. (WebCore::Document::storageBlockingStateDidChange): (WebCore): * dom/Document.h: (Document): * page/DOMWindow.cpp: Check to make sure access is allowed before returning a cached storage area. (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): * page/Page.cpp: (WebCore::Page::collectPluginViews): Refactored out into a function. (WebCore): (WebCore::Page::storageBlockingStateChanged): Pipe changes through to each PluginView. (WebCore::Page::privateBrowsingStateChanged): * page/Page.h: (Page): * page/Settings.cpp: (WebCore::Settings::setStorageBlockingPolicy): Tell Pages about changes to the storage blocking policy. (WebCore): * page/Settings.h: (Settings): * plugins/PluginViewBase.h: (WebCore::PluginViewBase::storageBlockingStateChanged): 2012-09-14 Dan Carney Prevent workers from calling back into other worlds https://bugs.webkit.org/show_bug.cgi?id=96790 Reviewed by Adam Barth. Added a few sanity checks to ensure callbacks are always using the correct world. No new tests. No new change in functionality. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getEventListener): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): (WebCore::WorldContextHandle::adjustedContext): * bindings/v8/WorldContextHandle.h: 2012-09-14 Dana Jansens Minimize collisions when hashing pairs https://bugs.webkit.org/show_bug.cgi?id=96022 Reviewed by Adrienne Walker. Use WTF::pairIntHash() to hash pairs of integers. * dom/Document.cpp: (WebCore::ImmutableAttributeDataCacheKey::hash): * dom/StyledElement.cpp: (WebCore::computePresentationAttributeCacheHash): * platform/graphics/Gradient.cpp: (WebCore::Gradient::hash): * platform/graphics/IntPointHash.h: (WTF::IntPointHash::hash): * platform/graphics/IntRectHash.h: * platform/graphics/IntSizeHash.h: * platform/graphics/blackberry/LayerTileIndex.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::SubimageCacheHash::hash): 2012-09-14 Rob Buis [BlackBerry] Use StringBuilder more in BlackBerry RSS classes https://bugs.webkit.org/show_bug.cgi?id=96820 Reviewed by Antonio Gomes. Use append/appendLiteral where possible. * platform/MIMETypeRegistry.cpp: (WebCore::mimeTypeAssociationMap): * platform/network/blackberry/rss/RSSAtomParser.cpp: (WebCore::RSSAtomParser::parseContent): (WebCore::RSSAtomParser::parseAuthor): * platform/network/blackberry/rss/RSSGenerator.cpp: (WebCore::RSSGenerator::generateHtml): * platform/network/blackberry/rss/RSSParserBase.cpp: (WebCore::textFromXMLAttr): (WebCore::textFromXMLNode): 2012-09-14 Alexandru Chiculita [CSS Shaders] Enable anti-aliasing on the FECustomFilter https://bugs.webkit.org/show_bug.cgi?id=96668 Reviewed by Dean Jackson. Added multisample frame buffer for the FECustomFilter. It will try to allocate a multisample framebuffer with a maximum sample count of 4. At the end it will blit the samples back to the original frame buffer, so that we can read the pixels back. This patch uses extensions GL_ANGLE_framebuffer_multisample, GL_ANGLE_framebuffer_blit and GL_OES_rgb8_rgba8. No new tests, multisampling is not working in Chromium DRT and has not pixel effect on WebKit Mac. * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::deleteRenderBuffers): (WebCore): (WebCore::FECustomFilter::deleteMultisampleRenderBuffers): (WebCore::FECustomFilter::drawFilterMesh): (WebCore::FECustomFilter::createMultisampleBuffer): (WebCore::FECustomFilter::resolveMultisampleBuffer): (WebCore::FECustomFilter::canUseMultisampleBuffers): (WebCore::FECustomFilter::resizeMultisampleBuffers): (WebCore::FECustomFilter::resizeContext): * platform/graphics/filters/FECustomFilter.h: 2012-09-14 Bo Liu Add in-place reload behavior to ImagesEnabled setting https://bugs.webkit.org/show_bug.cgi?id=95478 Reviewed by Adam Barth. Store ImagesEnabled setting in CachedResourceLoader similar to AutoLoadImages. Move FrameLoaderClient::allowImage to after a CachedImage has been created and store the cache for reload if it is blocked. Make sure when image loads are deferred by either ImagesEnabled or LoadImagesAutomatically, onload is not called. Added ImagesEnabled to InternalSettings for layout tests. Tests: fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html * WebCore.exp.in: * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::load): * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::didAddClient): * loader/cache/CachedResource.h: (WebCore::CachedResource::stillNeedsLoad): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::canRequest): (WebCore::CachedResourceLoader::determineRevalidationPolicy): (WebCore::CachedResourceLoader::setAutoLoadImages): (WebCore): (WebCore::CachedResourceLoader::setImagesEnabled): (WebCore::CachedResourceLoader::shouldDeferImageLoad): (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): (WebCore::CachedResourceLoader::imagesEnabled): * page/Settings.cpp: (WebCore::setImageLoadingSettings): (WebCore::Settings::Settings): (WebCore::Settings::setLoadsImagesAutomatically): (WebCore::Settings::imageLoadingSettingsTimerFired): (WebCore::Settings::setImagesEnabled): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::setImagesEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-09-14 Emil A Eklund https://bugs.webkit.org/show_bug.cgi?id=96226 REGRESSION (r128006): Three spatial navigation tests are failing Reviewed by Ryosuke Niwa. Fix spatial navigation regression by reverting parts of r128006. Specifically the change to remove the overridden boundingBox method in ContainerNode. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): (WebCore): (WebCore::ContainerNode::getLowerRightCorner): (WebCore::ContainerNode::boundingBox): * dom/ContainerNode.h: (ContainerNode): 2012-09-14 James Robinson Unreviewed, rolling out r128627. http://trac.webkit.org/changeset/128627 https://bugs.webkit.org/show_bug.cgi?id=96575 Breaks indexeddb content_browsertests in chromium * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): (WebCore::IDBDatabase::setVersion): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): 2012-09-14 Alexandru Chiculita [CSS Shaders] Refactor FECustomFilter to make it usable from platform dependent implementations https://bugs.webkit.org/show_bug.cgi?id=96801 Reviewed by Dean Jackson. I've refactored the FECustomFilter to allow FECustomFilterSkia.cpp to use the rendering part from outside. Also removed the Texture class as it is not available on some platforms. The changes for Skia will land in a different patch: https://bugs.webkit.org/show_bug.cgi?id=96579 No new tests, the existing custom filters tests should already cover this. * platform/graphics/filters/CustomFilterGlobalContext.cpp: (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::deleteRenderBuffers): (WebCore::FECustomFilter::drawFilterMesh): (WebCore): (WebCore::FECustomFilter::prepareForDrawing): (WebCore::FECustomFilter::programNeedsInputTexture): (WebCore::FECustomFilter::applyShader): (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::ensureInputTexture): (WebCore::FECustomFilter::uploadInputTexture): (WebCore::FECustomFilter::ensureFrameBuffer): (WebCore::FECustomFilter::resizeContextIfNeeded): (WebCore::FECustomFilter::resizeContext): (WebCore::FECustomFilter::bindProgramAndBuffers): * platform/graphics/filters/FECustomFilter.h: (FECustomFilter): 2012-09-14 Alexey Proskuryakov REGRESSION(r126717): It made inspector/styles/media-queries.html fail/flakey https://bugs.webkit.org/show_bug.cgi?id=95070 Roll out r126717, and another change that depends on it. r126717: Remove parent pointer from StyleSheetContents and StyleRuleImport r127123: Cache and share parsed imported stylesheets * css/CSSImportRule.cpp: * css/CSSImportRule.h: * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::willMutateRules): (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers): (WebCore::CSSStyleSheet::insertRule): (WebCore::CSSStyleSheet::ownerDocument): * css/CSSStyleSheet.h: (WebCore::CSSStyleSheet::clearOwnerRule): * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::StyleRuleImport): (WebCore::StyleRuleImport::~StyleRuleImport): (WebCore::StyleRuleImport::setCSSStyleSheet): (WebCore::StyleRuleImport::isLoading): (WebCore::StyleRuleImport::requestStyleSheet): * css/StyleRuleImport.h: (WebCore::StyleRuleImport::parentStyleSheet): (WebCore::StyleRuleImport::setParentStyleSheet): (WebCore::StyleRuleImport::clearParentStyleSheet): (ImportedStyleSheetClient): (WebCore::StyleRuleImport::ImportedStyleSheetClient::ImportedStyleSheetClient): (WebCore::StyleRuleImport::ImportedStyleSheetClient::~ImportedStyleSheetClient): (WebCore::StyleRuleImport::ImportedStyleSheetClient::setCSSStyleSheet): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::StyleSheetContents): (WebCore::StyleSheetContents::isCacheable): (WebCore::StyleSheetContents::parserAppendRule): (WebCore::StyleSheetContents::clearRules): (WebCore::StyleSheetContents::wrapperInsertRule): (WebCore::StyleSheetContents::wrapperDeleteRule): (WebCore::StyleSheetContents::parseAuthorStyleSheet): (WebCore::StyleSheetContents::parseStringAtLine): (WebCore::StyleSheetContents::checkLoaded): (WebCore::StyleSheetContents::notifyLoadedSheet): (WebCore::StyleSheetContents::startLoadingDynamicSheet): (WebCore::StyleSheetContents::rootStyleSheet): (WebCore::StyleSheetContents::singleOwnerNode): (WebCore::StyleSheetContents::singleOwnerDocument): (WebCore::StyleSheetContents::parentStyleSheet): * css/StyleSheetContents.h: (WebCore::StyleSheetContents::create): (StyleSheetContents): (WebCore::StyleSheetContents::ownerRule): (WebCore::StyleSheetContents::clearOwnerRule): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::parseStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet): 2012-09-14 Ojan Vafai Simplify some code in RenderBox::computePercentageLogicalHeight https://bugs.webkit.org/show_bug.cgi?id=96704 Reviewed by Tony Chang. This is strictly code cleanup. No behavior change. Also removed some comments that were what comments and/or were getting stale. * rendering/RenderBox.cpp: (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation): (WebCore): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: (RenderBox): 2012-09-14 Kent Tamura Unreviewed, a workaround for a mysterious crash on Apple Windows port. https://bugs.webkit.org/show_bug.cgi?id=96636 * testing/InternalSettings.cpp: Touch RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled only if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): * testing/InternalSettings.h: (Backup): 2012-09-14 David Grogan IndexedDB: Print console warning about setVersion https://bugs.webkit.org/show_bug.cgi?id=96575 Reviewed by Tony Chang. setVersion has been out of the spec for almost a year but there are still a lot of users. We show the warning once per database object as an approximation for once per page. No new tests, but 150-something rebaselines. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): (WebCore::IDBDatabase::setVersion): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): 2012-09-14 Michelangelo De Simone Use arrays in shaders https://bugs.webkit.org/show_bug.cgi?id=95223 Reviewed by Dean Jackson. Custom Filters' support for array() is introduced. Values within the array() function will be passed as uniforms to shaders. Values within array() are comma-separated; the specification will be updated accordingly: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18839 Test: css3/filters/custom/custom-filter-array.html * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForCustomFilterArrayParameter): (WebCore): (WebCore::valueForCustomFilterParameter): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * platform/graphics/filters/CustomFilterArrayParameter.h: Container for array() parameter values. (WebCore): (CustomFilterArrayParameter): (WebCore::CustomFilterArrayParameter::create): (WebCore::CustomFilterArrayParameter::size): (WebCore::CustomFilterArrayParameter::valueAt): (WebCore::CustomFilterArrayParameter::addValue): (WebCore::CustomFilterArrayParameter::blend): (WebCore::CustomFilterArrayParameter::operator==): (WebCore::CustomFilterArrayParameter::CustomFilterArrayParameter): * platform/graphics/filters/CustomFilterParameter.h: * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::bindProgramArrayParameters): (WebCore): (WebCore::FECustomFilter::bindProgramParameters): * platform/graphics/filters/FECustomFilter.h: (WebCore): (FECustomFilter): 2012-09-14 Tor Arne Vestbø [Qt] Remove old cruft from the qmake build system Rubber-stamped by Simon Hausmann. * DerivedSources.pri: * Target.pri: 2012-09-14 Tor Arne Vestbø [Qt] Make force_static_libs_as_shared work on Mac OS We had to move a few LIBS += around that were in the wrong place, and not caught when everything was just linked into the final QtWebKit library. Reviewed by Simon Hausmann. * WebCore.pri: 2012-09-14 Rick Byers Gesture events sent to wrong node when page is scrolled https://bugs.webkit.org/show_bug.cgi?id=96788 Reviewed by Antonio Gomes. Adjust the co-ordinate space correctly when doing hit testing for gesture events (as for all other event handling code here). Test: platform/chromium/plugins/gesture-events-scrolled.html * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): 2012-09-14 Mikhail Pozdnyakov [EFL] Attempt to create a theme for 0 sized element leads to assertion hit https://bugs.webkit.org/show_bug.cgi?id=96743 Reviewed by Kenneth Rohde Christiansen. RenderThemeEfl was not supposed to be created for the elements with '0' size and had an assertion on that causing crash in debug mode. Test: fast/forms/range/slider-zero-size-crash.html * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): 2012-09-14 Andrey Kosyakov Web Inspector: reuse WebInspector.ProgressIndicator in Audits panel https://bugs.webkit.org/show_bug.cgi?id=96755 Reviewed by Alexander Pavlov. - remove AuditProgressMonitor, use WebInspector.ProgressIndicator instead; - add annotations for a bunch of audit methods; - simplify control flow -- remove callbacks where possible. * English.lproj/localizedStrings.js: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView): (WebInspector.AuditLauncherView.prototype._setAuditRunning): (WebInspector.AuditLauncherView.prototype._launchButtonClicked.onAuditStarted): (WebInspector.AuditLauncherView.prototype._launchButtonClicked): (WebInspector.AuditLauncherView.prototype._createLauncherUI): (WebInspector.AuditLauncherView.prototype._updateResourceProgress): (WebInspector.AuditLauncherView.prototype._updateButton): * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype.doRun): (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun): (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun): (WebInspector.AuditRules.CacheControlRule.prototype.doRun): (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable): (WebInspector.AuditRules.CSSRuleBase.prototype.doRun.sheetsCallback): (WebInspector.AuditRules.CSSRuleBase.prototype._visitStyleSheet.sheetCallback): (WebInspector.AuditRules.CSSRuleBase.prototype._visitStyleSheet): (WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback): (WebInspector.AuditRules.CookieRuleBase.prototype.doRun): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback): (WebInspector.AuditsPanel.prototype._executeAudit): (WebInspector.AuditsPanel.prototype._auditFinishedCallback): (WebInspector.AuditsPanel.prototype.initiateAudit.else.onReload): (WebInspector.AuditsPanel.prototype.initiateAudit): (WebInspector.AuditCategory.prototype.run): (WebInspector.AuditRule.prototype.run): (WebInspector.AuditRule.prototype.doRun): * inspector/front-end/ProgressBar.js: (WebInspector.Progress.prototype.worked): (WebInspector.ProgressIndicator): (WebInspector.ProgressIndicator.prototype.cancel): (WebInspector.ProgressIndicator.prototype.setWorked): (WebInspector.ProgressIndicator.prototype.worked): (WebInspector.SubProgress.prototype.setWorked): (WebInspector.SubProgress.prototype.worked): * inspector/front-end/auditsPanel.css: (.audit-launcher-view .progress-bar-container): (.audit-launcher-view .progress-bar-container .progress-bar-stop-button): 2012-09-14 Vsevolod Vlasov Unreviewed inspector ui polish. * inspector/front-end/inspector.css: (#floating-status-bar-resizer): 2012-09-14 Vsevolod Vlasov Web Inspector: Get rid of setting values to innerHTML in inspector front-end. https://bugs.webkit.org/show_bug.cgi?id=96758 Reviewed by Alexander Pavlov. Removed innerHTML from WebGLProfileView. * inspector/front-end/WebGLProfileView.js: (WebInspector.WebGLProfileView.prototype._showTraceLog): 2012-09-14 Keishi Hattori Make time input lang attribute aware for testing https://bugs.webkit.org/show_bug.cgi?id=96728 Reviewed by Kent Tamura. This patch implements partial lang attribute support for input type=time that turns on only when enabled through InternalSettings. Test: fast/forms/time-multiple-fields/time-multiple-fields-localization.html * dom/Document.cpp: (WebCore::Document::getLocalizer): Returns a localizer for a given locale. Localizers are cached for repeated use. (WebCore): * dom/Document.h: (WebCore): (Document): * html/TimeInputType.cpp: (WebCore::TimeInputType::updateInnerTextValue): Use the locale for the input element. * html/shadow/DateTimeEditElement.cpp: (DateTimeEditBuilder): (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): (WebCore::DateTimeEditBuilder::visitField): (WebCore::DateTimeEditElement::layout): (WebCore::DateTimeEditElement::setValueAsDate): (WebCore::DateTimeEditElement::setEmptyValue): * html/shadow/DateTimeEditElement.h: (WebCore): (DateTimeEditElement): 2012-09-14 Sheriff Bot Unreviewed, rolling out r128566. http://trac.webkit.org/changeset/128566 https://bugs.webkit.org/show_bug.cgi?id=96760 Assertion failure in http/tests/websocket/tests/hybi/workers /close-code-and-reason.html (Requested by tkent1 on #webkit). * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/ScopedPersistent.h: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::resetIsolatedWorlds): (WebCore::ScriptController::evaluateInIsolatedWorld): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.cpp: (WebCore::perContextDataForCurrentWorld): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setIsolatedWorldField): (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext): (WebCore::V8DOMWindowShell::destroyIsolatedShell): (WebCore): (WebCore::isolatedContextWeakCallback): (WebCore::V8DOMWindowShell::disposeContext): (WebCore::V8DOMWindowShell::initializeIfNeeded): (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin): * bindings/v8/V8DOMWindowShell.h: (V8DOMWindowShell): (WebCore::V8DOMWindowShell::getEntered): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-09-14 Vsevolod Vlasov Web Inspector: Fix front end closure compilation errors. https://bugs.webkit.org/show_bug.cgi?id=96753 Reviewed by Alexander Pavlov. Closure compilation fix. Also fixed wrong parameters passed to JavaScriptSource constructor from CompilerScriptMapping. * inspector/front-end/CompilerScriptMapping.js: * inspector/front-end/Resource.js: 2012-09-14 Andrei Poenaru Web Inspector: Display Named Flows in the "CSS Named Flows" drawer https://bugs.webkit.org/show_bug.cgi?id=90871 Reviewed by Alexander Pavlov. Implemented CSS Regions support in WebInspector as a drawer. (feature is under an experimental flag) * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSNamedFlowCollectionsView.js: Added. (WebInspector.CSSNamedFlowCollectionsView): (WebInspector.CSSNamedFlowCollectionsView.prototype.showInDrawer): (WebInspector.CSSNamedFlowCollectionsView.prototype.reset): (WebInspector.CSSNamedFlowCollectionsView.prototype._setDocument): (WebInspector.CSSNamedFlowCollectionsView.prototype._documentUpdated): (WebInspector.CSSNamedFlowCollectionsView.prototype._setSidebarHasContent): (WebInspector.CSSNamedFlowCollectionsView.prototype._appendNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._removeNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._updateNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._resetNamedFlows): (WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowCreated): (WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowRemoved): (WebInspector.CSSNamedFlowCollectionsView.prototype._regionLayoutUpdated): (WebInspector.CSSNamedFlowCollectionsView.prototype._hashNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlow): (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowInSidebar): (WebInspector.CSSNamedFlowCollectionsView.prototype._selectedNodeChanged): (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlowForNode): (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown): (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var): (WebInspector.ElementsPanel.prototype._showNamedFlowCollections): * inspector/front-end/Images/namedFlowOverflow.png: Added. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/WebKit.qrc: * inspector/front-end/cssNamedFlows.css: Added. (.css-named-flow-collections-view .split-view-sidebar-left): (.css-named-flow-collections-view .tabbed-pane-header): (.css-named-flow-collections-view .info): (.css-named-flow-collections-view .split-view-sidebar-left .sidebar-content): (.css-named-flow-collections-view .split-view-sidebar-left .selection): (.css-named-flow-collections-view .split-view-contents .title): (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before): 2012-09-14 Yoshifumi Inoue Unreviewed fix for build break on Chromium-Linux Debug build. * html/DateTimeFieldsState.cpp: Initialize DateTimeFieldStates::emptyValue. * html/DateTimeFieldsState.h: Remove initialization of public static member variable emptyValue. 2012-09-14 Yoshifumi Inoue Create Localizer factory method for LocaleNone https://bugs.webkit.org/show_bug.cgi?id=96745 Reviewed by Kent Tamura. This patch introduces Localizer class and LocaleNone class which prodices a constructor of Localizer class for ports which don't use LocaleICU, LocaleMac nor LocaleWin. No new tests. This patch doesn't change behavior. * CMakeLists.txt: Added platform/text/LocaleNone.cpp and platform/text/Localizer.cpp. * GNUmakefile.list.am: Added platform/text/LocaleNone.cpp and platform/text/Localizer.{cpp,h} * Target.pri: Added platform/text/LocaleNone.cpp and platform/text/Localizer.cpp * WebCore.vcproj/WebCore.vcproj: Added platform/text/LocaleNone.cpp and platform/text/Localizer.{cpp,h} * platform/text/LocaleNone.cpp: Added. (WebCore::Localizer::create): (WebCore::LocaleNone::~LocaleNone): (WebCore::LocaleNone::initializeLocalizerData): 2012-09-14 Vsevolod Vlasov Unreviewed r128580 follow up: fixed qt minimal compilation. * loader/DocumentThreadableLoader.cpp: 2012-09-14 Keishi Hattori Refactor time format related methods on LocaleWin/Mac/ICU so that they override Localizer methods https://bugs.webkit.org/show_bug.cgi?id=96726 Reviewed by Kent Tamura. Refactoring time format related methods on LocaleWin/Mac/ICU so that they override Localizer methods. We can call them from the Localizer from now on. No new tests. No behavior change. Covered by existing tests. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::initializeDateTimeFormat): m_timeAMPMLabels is no longer a OwnPtr so we account for that. (WebCore::LocaleICU::timeFormat): Removing Text from end of function name because *FormatText() shoud return human readable text like "Day/Month/Year". (WebCore::LocaleICU::shortTimeFormat): (WebCore::LocaleICU::timeAMPMLabels): * platform/text/LocaleICU.h: (LocaleICU): * platform/text/LocaleWin.cpp: (WebCore::LocaleWin::timeFormat): (WebCore::LocaleWin::shortTimeFormat): (WebCore::LocaleWin::timeAMPMLabels): * platform/text/LocaleWin.h: (LocaleWin): * platform/text/LocalizedDateICU.cpp: (WebCore::localizedTimeFormatText): (WebCore::localizedShortTimeFormatText): * platform/text/LocalizedDateWin.cpp: (WebCore::localizedTimeFormatText): (WebCore::localizedShortTimeFormatText): * platform/text/Localizer.cpp: (WebCore): (WebCore::Localizer::timeFormat): (WebCore::Localizer::shortTimeFormat): (WebCore::Localizer::timeAMPMLabels): * platform/text/Localizer.h: (Localizer): We unified some of the member variables like m_timeAMPMLabels into this class. * platform/text/mac/LocaleMac.h: (LocaleMac): * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::timeFormat): (WebCore::LocaleMac::shortTimeFormat): * platform/text/mac/LocalizedDateMac.cpp: (WebCore::localizedTimeFormatText): (WebCore::localizedShortTimeFormatText): 2012-09-14 Keishi Hattori Add runtime flag that enables lang attribute for form controls in LayoutTests https://bugs.webkit.org/show_bug.cgi?id=96636 Reviewed by Kent Tamura. Lang attribute support for form controls will be incomplete and just for LayoutTests. No new tests. No behavior change. * WebCore.exp.in: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled): (WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled): (RuntimeEnabledFeatures): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled): (WebCore): * testing/InternalSettings.h: (Backup): (InternalSettings): * testing/InternalSettings.idl: 2012-09-14 Keishi Hattori LocaleMac should fallback to defaultLanguage for an invalid locale https://bugs.webkit.org/show_bug.cgi?id=96744 Reviewed by Kent Tamura. There is no way to tell if a locale identifier is valid or not in Cocoa so we look if we have a matching language in the list of ISOLanguageCodes given by NSLocale. Covered in LocaleMacTest.invalidLocale. * platform/text/mac/LocaleMac.mm: (WebCore): (WebCore::LocaleMac::LocaleMac): (WebCore::LocaleMac::create): 2012-09-14 Vsevolod Vlasov Web Inspector: Add ability to replay XHR in network panel. https://bugs.webkit.org/show_bug.cgi?id=95187 Reviewed by Yury Semikhatsky. Patch based on Pavel Chadnov's patch. This patch implements Replay XHR feature in web inspector. XMLHttpRequest's ThreadableLoaderClient is now used to map XMLHttpRequest object to ResourceLoader request identifiers. Before initiating load all XHR parameters are now sent to inspector. XMLHttpRequest parameters are stored in inspector's network request cache in XHRReplayData class. When XHR replay is requested, a new XMLHttpRequest is created based on stored data. Test: http/tests/inspector/network/network-xhr-replay.html * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::didFinishXHRLoading): * inspector/InspectorConsoleAgent.h: (InspectorConsoleAgent): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): (WebCore::InspectorInstrumentation::willLoadXHRImpl): (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): (WebCore::InspectorInstrumentation::willLoadXHR): (WebCore::InspectorInstrumentation::didFailXHRLoading): (WebCore::InspectorInstrumentation::didFinishXHRLoading): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): (WebCore): (WebCore::InspectorResourceAgent::willLoadXHR): (WebCore::InspectorResourceAgent::didFailXHRLoading): (WebCore::InspectorResourceAgent::didFinishXHRLoading): (WebCore::InspectorResourceAgent::replayXHR): * inspector/InspectorResourceAgent.h: (WebCore): (InspectorResourceAgent): * inspector/NetworkResourcesData.cpp: (WebCore::XHRReplayData::create): (WebCore): (WebCore::XHRReplayData::addHeader): (WebCore::XHRReplayData::XHRReplayData): (WebCore::NetworkResourcesData::xhrReplayData): (WebCore::NetworkResourcesData::setXHRReplayData): (WebCore::NetworkResourcesData::reuseXHRReplayData): (WebCore::NetworkResourcesData::clear): * inspector/NetworkResourcesData.h: (XHRReplayData): (WebCore::XHRReplayData::method): (WebCore::XHRReplayData::url): (WebCore::XHRReplayData::async): (WebCore::XHRReplayData::formData): (WebCore::XHRReplayData::headers): (WebCore::XHRReplayData::includeCredentials): (WebCore): (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): (ResourceData): (NetworkResourcesData): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._contextMenu): (WebInspector.NetworkLogView.prototype._replayXHR): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): added documentThreadableLoaderStartedLoadingForClient instrumentation so that inspector could map XMLHttpRequest to ResourceLoader's identifiers. * loader/cache/CachedResource.h: (WebCore::CachedResource::loader): DocumentThreadableLoader uses CachedResource::loader() to get ResourceLoader identifier. (CachedResource): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::sendFromInspector): Added a method for sending XMLHttpRequests based on request body stored in inspector. (WebCore): (WebCore::XMLHttpRequest::createRequest): Replaced will/didLoadXHRSynchonously instrumentations with willLoadXHR instrumentation. (WebCore::XMLHttpRequest::internalAbort): Added didFailXHRLoadingInstrumentation (WebCore::XMLHttpRequest::didFinishLoading): Added didFinishXHRLoading instrumentation * xml/XMLHttpRequest.h: (XMLHttpRequest): 2012-09-14 Yoshifumi Inoue [Forms] multiple fields time input UI should save/restore its value even if it has an empty field. https://bugs.webkit.org/show_bug.cgi?id=96714 Reviewed by Kent Tamura. This patch changes multiple fields time input UI to save/restore value of fields rather than time value. For this change, storage format of input type "time" is also changed. Before this patch, if user populates time fiels partially, all fields are reset to initial value after back/forward navigation. After this patch, partially populated fields are preserved after back/forward navigation. Fields of DateTimeEditElement are represented as 9 elements of string vector in FormControlState regardless actual fields in DateTimeEditElement for ease of restoring/saving. This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. No new tests. Existing test fast/forms/time-multiple-fields/time-multiple-fields-preserve-value-after-history-back.html convers this change. * WebCore.gypi: Chagned to add DateTimeFieldsState.{cpp.h} * html/DateTimeFieldsState.cpp: Added. (WebCore::getNumberFromFormControlState): Extracts unsigned integer or empty value from FormControlState. (WebCore::getAMPMFromFormControlState): Extracts AM/PM value or empty value from FormControlState. (WebCore::DateTimeFieldsState::DateTimeFieldsState): Initializes fields with empty value. (WebCore::DateTimeFieldsState::restoreFormControlState): Makes DateTimeFieldsState instance from FormControlState. (WebCore::DateTimeFieldsState::saveFormControlState): Makes FormControlState from DateTimeFieldsState. * html/DateTimeFieldsState.h: Added. (DateTimeFieldsState): (WebCore::DateTimeFieldsState::ampm): Returns AM/PM field value. (WebCore::DateTimeFieldsState::dayOfMonth): Returns day of month field value. (WebCore::DateTimeFieldsState::hour): Reutrns hour field value. (WebCore::DateTimeFieldsState::millisecond): Returns millisecond field value. (WebCore::DateTimeFieldsState::minute): Returns minute field value. (WebCore::DateTimeFieldsState::month): Returns month field value. (WebCore::DateTimeFieldsState::second): Returns second field value. (WebCore::DateTimeFieldsState::weekOfYear): Returns week of year field. (WebCore::DateTimeFieldsState::year): Returns year field value. (WebCore::DateTimeFieldsState::hasAMPM): Returns true if AM/PM field has value. (WebCore::DateTimeFieldsState::hasDayOfMonth): Returns true if day of month field has value. (WebCore::DateTimeFieldsState::hasHour): Returns true if hour field has value. (WebCore::DateTimeFieldsState::hasMillisecond): Returns true if millisecond field has value. (WebCore::DateTimeFieldsState::hasMinute): Returns true if minute field has value. (WebCore::DateTimeFieldsState::hasMonth): Returns true if month field has value. (WebCore::DateTimeFieldsState::hasSecond): Returns true if second field has value. (WebCore::DateTimeFieldsState::hasWeekOfYear): Returns true if week of year field has value. (WebCore::DateTimeFieldsState::hasYear): Returns true if year field has value. (WebCore::DateTimeFieldsState::setAMPM): Sets AM/PM field. (WebCore::DateTimeFieldsState::setDayOfMonth): Sets day of month field. (WebCore::DateTimeFieldsState::setHour): Sets hour field. (WebCore::DateTimeFieldsState::setMillisecond): Sets millisecond field. (WebCore::DateTimeFieldsState::setMinute): Sets minute field. (WebCore::DateTimeFieldsState::setMonth): Sets month field. (WebCore::DateTimeFieldsState::setSecond): Set second field. (WebCore::DateTimeFieldsState::setWeekOfYear): Sets week of year field. (WebCore::DateTimeFieldsState::setYear): Sets year field. * html/FormController.cpp: (WebCore::formStateSignature): Increment version number to 8 for incompatible change of FormControlState. * html/TimeInputType.cpp: (WebCore::TimeInputType::restoreFormControlState): Added to call DateTimeFieldsState::restoreFormControlState(). (WebCore::TimeInputType::saveFormControlState): Added to call DateTimeFieldsState::saveFormControlState(). * html/TimeInputType.h: (TimeInputType): Added declarations for restoreFormControlState() and saveFormControlState(). * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditElement::setValueAsDateTimeFieldsState): Added to set fields from DateTimeFieldsState. (WebCore::DateTimeEditElement::valueAsDateTimeFieldsState): Added to make DateTimeFieldsState from fields. * html/shadow/DateTimeEditElement.h: (DateTimeEditElement): Added declarations for setValueAsDateTimeFieldsState() and valueAsDateTimeFieldsState(). * html/shadow/DateTimeFieldElement.h: (DateTimeFieldElement): Added declarations for populateDateTimeFieldsState() and setValueAsDateTimeFieldsState(). * html/shadow/DateTimeFieldElements.cpp: (WebCore::DateTimeAMPMFieldElement::populateDateTimeFieldsState): Added to set AM/PM value to DateTimeFieldsState. (WebCore::DateTimeAMPMFieldElement::setValueAsDateTimeFieldsState): Added to set field value from DateTimeFieldsState. (WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState): Added to set hour value to DateTimeFieldsState. (WebCore::DateTimeHourFieldElement::setValueAsDateTimeFieldsState): Added to set field value from DateTimeFieldsState. (WebCore::DateTimeMillisecondFieldElement::populateDateTimeFieldsState): Added to set millisecond value to DateTimeFieldsState. (WebCore::DateTimeMillisecondFieldElement::setValueAsDateTimeFieldsState): Added to set field value from DateTimeFieldsState. (WebCore::DateTimeMinuteFieldElement::populateDateTimeFieldsState): Added to set minute value to DateTimeFieldsState. (WebCore::DateTimeMinuteFieldElement::setValueAsDateTimeFieldsState): Added to set field value from DateTimeFieldsState. (WebCore::DateTimeSecondFieldElement::populateDateTimeFieldsState): Added to set second value to DateTimeFieldsState. (WebCore::DateTimeSecondFieldElement::setValueAsDateTimeFieldsState): Added to set field value from DateTimeFieldsState. * html/shadow/DateTimeFieldElements.h: (DateTimeAMPMFieldElement): Added declarations of populateDateTimeFieldsState() and setValueAsDateTimeFieldsState(). (DateTimeHourFieldElement): ditto. (DateTimeMillisecondFieldElement): ditto. (DateTimeMinuteFieldElement): ditto. (DateTimeSecondFieldElement): ditto. * html/shadow/DateTimeNumericFieldElement.h: (DateTimeNumericFieldElement): Extend accessibility of maximum() and setEmptyValue() to protected. * html/shadow/DateTimeSymbolicFieldElement.h: (DateTimeSymbolicFieldElement): Extend accessibility of hasValue(), setEmptyValue() and valueAsInteger() to protected. 2012-09-14 Sheriff Bot Unreviewed, rolling out r128568. http://trac.webkit.org/changeset/128568 https://bugs.webkit.org/show_bug.cgi?id=96739 It broke 3 tests everywhere (Requested by Ossy on #webkit). * bindings/js/JSDictionary.h: (WebCore::JSDictionary::tryGetPropertyAndResult): 2012-09-13 Kenneth Rohde Christiansen Evas_Object* is a ref'ed structure, so tread it as such https://bugs.webkit.org/show_bug.cgi?id=96659 Reviewed by Adam Barth. Replace OwnPtr with RefPtr. * PlatformEfl.cmake: * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): (WebCore::RenderThemeEfl::loadTheme): (WebCore::RenderThemeEfl::applyPartDescriptionsFrom): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): (ThemePartCacheEntry): 2012-09-14 Zoltan Horvath Extend the coverage of the Custom Allocation Framework in WebCore https://bugs.webkit.org/show_bug.cgi?id=96512 Reviewed by Eric Seidel. Add WTF_MAKE_FAST_ALLOCATED macro to the following class/struct declarations because these or their child classes are instantiated by operator new. Covered by existing tests. * Modules/websockets/WebSocketDeflateFramer.cpp: (WebSocketExtensionDeflateFrame): * Modules/websockets/WebSocketDeflateFramer.h: (DeflateResultHolder): (InflateResultHolder): * Modules/websockets/WebSocketDeflater.h: (WebSocketDeflater): (WebSocketInflater): * Modules/websockets/WebSocketHandshake.h: (WebSocketHandshake): * bindings/js/ScriptDebugServer.h: (Task): * css/CSSCalculationValue.cpp: (CSSCalcPrimitiveValue): * css/CSSParserMode.h: (CSSParserContext): * css/CSSValuePool.h: (CSSValuePool): * css/StyleBuilder.h: (StyleBuilder): * css/StylePropertyShorthand.h: (StylePropertyShorthand): * css/StyleResolver.cpp: (RuleSet): * css/StyleRule.h: (StyleRuleBase): (StyleRule): * css/StyleRuleImport.h: (StyleRuleImport): * css/WebKitCSSKeyframeRule.h: (StyleKeyframe): * dom/CheckedRadioButtons.cpp: (RadioButtonGroup): * dom/ContextFeatures.h: (ContextFeaturesClient): * dom/DOMImplementation.h: (DOMImplementation): (XMLMIMETypeRegExp): * dom/Document.cpp: (ImmutableAttributeDataCacheKey): * dom/ElementShadow.h: (ElementShadow): * dom/GenericEventQueue.h: (GenericEventQueue): * dom/IdTargetObserverRegistry.h: (IdTargetObserverRegistry): * dom/NamedNodeMap.h: (NamedNodeMap): * dom/ScopedEventQueue.h: (ScopedEventQueue): * dom/StyledElement.cpp: (PresentationAttributeCacheEntry): (PresentationAttributeCacheCleaner): * editing/EditingStyle.cpp: (HTMLElementEquivalent): * editing/SpellChecker.h: (SpellChecker): * fileapi/ThreadableBlobRegistry.cpp: (BlobRegistryContext): * html/FormAssociatedElement.cpp: (FormAttributeTargetObserver): * html/FormController.h: (FormController): * html/HTMLInputElement.cpp: (ListAttributeTargetObserver): * html/PublicURLManager.h: (PublicURLManager): * html/StepRange.h: (StepDescription): * html/ValidationMessage.h: (ValidationMessage): * html/canvas/WebGLExtension.h: (WebGLExtension): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebGLRenderingContextLostCallback): (WebGLRenderingContextErrorMessageCallback): * html/parser/HTMLElementStack.h: (ElementRecord): * html/parser/HTMLMetaCharsetParser.h: (HTMLMetaCharsetParser): * inspector/DOMEditor.h: (DOMEditor): * inspector/InjectedScriptHost.h: (InspectableObject): * inspector/InjectedScriptManager.h: (InjectedScriptManager): * inspector/InspectorCSSAgent.cpp: (SelectorProfile): * inspector/InspectorCounters.h: (ThreadLocalInspectorCounters): * inspector/InspectorDOMAgent.cpp: (RevalidateStyleAttributeTask): * inspector/InspectorFrontendClientLocal.cpp: (InspectorBackendDispatchTask): * inspector/InspectorHistory.h: (InspectorHistory): (Action): * inspector/InspectorOverlay.h: (HighlightConfig): (InspectorOverlay): * inspector/InspectorState.h: (InspectorState): * inspector/InspectorStyleSheet.cpp: (ParsedStyleSheet): * inspector/InspectorWorkerAgent.cpp: (InspectorWorkerAgent::WorkerFrontendChannel): * inspector/NetworkResourcesData.h: (NetworkResourcesData): (ResourceData): * inspector/WorkerInspectorController.cpp: * loader/EmptyClients.h: (EmptyChromeClient): * loader/ResourceLoadScheduler.h: (ResourceLoadScheduler): (HostInformation): * loader/icon/IconDatabase.cpp: (DefaultIconDatabaseClient): (ClientWorkItem): * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): * page/ContentSecurityPolicy.h: (ContentSecurityPolicy): * page/FrameActionScheduler.h: (FrameActionScheduler): * page/MemoryInfo.cpp: (HeapSizeCache): * platform/CalculationValue.h: (CalcExpressionNode): * platform/Cursor.h: (Cursor): * platform/Decimal.h: (Decimal): * platform/Length.cpp: (CalculationValueHandleMap): * platform/MemoryPressureHandler.h: (MemoryPressureHandler): * platform/PlatformKeyboardEvent.h: (PlatformKeyboardEvent): * platform/ScrollAnimator.h: (ScrollAnimator): * platform/graphics/GlyphPageTreeNode.h: (GlyphPageTreeNode): * platform/graphics/GraphicsContext.h: (GraphicsContextStateSaver): * platform/graphics/GraphicsLayer.h: (AnimationValue): * platform/graphics/IntRect.h: (IntRect): * platform/graphics/ShadowBlur.cpp: (ScratchBuffer): * platform/graphics/TextRun.h: (TextRun): * platform/graphics/TiledBackingStoreBackend.h: (TiledBackingStoreBackend): * platform/graphics/WidthIterator.h: (WidthIterator): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient): * platform/graphics/opengl/Extensions3DOpenGL.h: (Extensions3DOpenGL): * platform/graphics/texmap/TextureMapper.h: (TextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (TextureMapperGLData): * platform/graphics/texmap/TextureMapperImageBuffer.h: (TextureMapperImageBuffer): * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): * platform/image-decoders/bmp/BMPImageReader.h: (BMPImageReader): * platform/image-decoders/gif/GIFImageReader.h: (GIFFrameReader): (GIFImageReader): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (JPEGImageReader): * platform/image-decoders/png/PNGImageDecoder.cpp: (PNGImageReader): * platform/network/BlobRegistryImpl.h: (BlobRegistryImpl): * platform/network/ResourceResponseBase.h: (CrossThreadResourceResponseDataBase): * platform/text/TextCodecICU.h: (ICUConverterWrapper): * rendering/FlowThreadController.h: (FlowThreadController): * rendering/RenderBoxRegionInfo.h: (RenderBoxRegionInfo): * rendering/RenderLayer.h: (ClipRects): (ClipRectsCache): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): * rendering/WrapShapeInfo.h: (WrapShapeInfo): * rendering/style/NinePieceImage.h: (NinePieceImageData): * rendering/svg/RenderSVGResourceFilter.h: (FilterData): * rendering/svg/RenderSVGResourceGradient.h: (GradientData): * rendering/svg/RenderSVGResourcePattern.h: (PatternData): * rendering/svg/SVGResources.h: (ClipperFilterMaskerData): (MarkerData): (FillStrokeData): * svg/SVGAngle.h: (SVGAngle): * svg/SVGLength.h: (SVGLength): * svg/SVGPreserveAspectRatio.h: (SVGPreserveAspectRatio): * svg/graphics/SVGImageCache.h: (SVGImageCache): * svg/properties/SVGPropertyInfo.h: (SVGPropertyInfo): * workers/WorkerEventQueue.h: (WorkerEventQueue): * xml/parser/MarkupTokenBase.h: (DoctypeDataBase): * xml/parser/XMLDocumentParserLibxml2.cpp: (PendingCallbacks): (OffsetBuffer): * xml/parser/XMLToken.h: (XMLDeclarationData): 2012-09-14 Andrey Adaikin Web Inspector: [WebGL] Refactoring: move the proxy wrapping method up to the base class https://bugs.webkit.org/show_bug.cgi?id=96515 Reviewed by Vsevolod Vlasov. Move the proxyObject() method up from WebGLRenderingContextResource to the Resource class, so that it could be reused later for wrapping a 2D context. * inspector/InjectedScriptWebGLModuleSource.js: (.): 2012-09-14 Kangil Han Fix unused parameter compile warnings in WebCore. https://bugs.webkit.org/show_bug.cgi?id=96712 Reviewed by Ryosuke Niwa. Fixed unused parameter compile warning messages(-Wunused-parameter) during EFL build. There are two kinds of stuff related to this warnings. First one is that the parameter value has not been used anywhere inside the function. Other one is that usability of parameter value is depended on option, i.e. ACCESSIBILITY. * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): (WebCore::AXObjectCache::postNotification): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::setGeolocationOverride): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::registerIntentService): * page/Frame.cpp: (WebCore::Frame::layerTreeAsText): * page/FrameView.cpp: (WebCore::FrameView::setScrollingPerformanceLoggingEnabled): * page/efl/EventHandlerEfl.cpp: (WebCore::EventHandler::tabsToAllFormControls): (WebCore::EventHandler::passMouseDownEventToWidget): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::scrollLayerForFrameView): * platform/RuntimeApplicationChecks.cpp: (WebCore::mainBundleIsEqualTo): * platform/ScrollView.cpp: (WebCore::ScrollView::platformSetScrollOrigin): * platform/cairo/WidgetBackingStoreCairo.cpp: (WebCore::createSurfaceForBackingStore): * platform/efl/ContextMenuEfl.cpp: (WebCore::platformMenuDescription): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::ContextMenuItem): * platform/efl/DragDataEfl.cpp: (WebCore::DragData::asFilenames): (WebCore::DragData::containsURL): (WebCore::DragData::asURL): * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadsEfl::onGamePadChange): * platform/efl/LocalizedStringsEfl.cpp: (WebCore::imageTitle): (WebCore::localizedMediaControlElementString): (WebCore::localizedMediaControlElementHelpText): (WebCore::localizedMediaTimeDescription): * platform/efl/PasteboardEfl.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writeImage): (WebCore::Pasteboard::documentFragment): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSliderTrackStyle): (WebCore::RenderThemeEfl::systemFont): (WebCore::RenderThemeEfl::paintMediaSliderThumb): (WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer): (WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack): (WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb): (WebCore::RenderThemeEfl::paintMediaCurrentTime): * platform/efl/ScrollbarEfl.cpp: (scrollbarEflEdjeMessage): * platform/efl/ScrollbarThemeEfl.cpp: (WebCore::ScrollbarThemeEfl::scrollbarThickness): (WebCore::ScrollbarThemeEfl::registerScrollbar): (WebCore::ScrollbarThemeEfl::unregisterScrollbar): * platform/efl/TemporaryLinkStubs.cpp: (WebCore::signedPublicKeyAndChallengeString): * platform/efl/WidgetEfl.cpp: (WebCore::Widget::setFocus): (WebCore::Widget::paint): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setPlatformTextDrawingMode): * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::orientationAtIndex): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsType): * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: (WebCore::Font::drawComplexText): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::adjustFocusRingLineWidth): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::setPlatformFillColor): (WebCore::GraphicsContext::setPlatformStrokeColor): (WebCore::GraphicsContext::setURLForRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::fillRoundedRect): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::syncContext): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBufferData::ImageBufferData): * platform/graphics/cairo/ImageCairo.cpp: (WebCore::Image::drawPattern): * platform/graphics/efl/IconEfl.cpp: (WebCore::Icon::createIconForFiles): (WebCore::Icon::paint): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::getSimilarFontPlatformData): (WebCore::FontCache::getTraitsInFamily): * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::gstGWorldSyncMessageCallback): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkMarshalVoidAndMiniObject): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcUriHandlerInit): (webKitWebSrcNeedDataCb): (webKitWebSrcEnoughDataCb): (webKitWebSrcSeekDataCb): (StreamingClient::didReceiveData): * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp: (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzCairoGetTable): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::readColorProfile): (WebCore::init_source): (WebCore::fill_input_buffer): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::rowAvailable): * platform/network/soup/CookieStorageSoup.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled): * platform/network/soup/DNSSoup.cpp: (WebCore::resolvedCallback): * platform/network/soup/ProxyResolverSoup.cpp: (soup_proxy_resolver_wk_init): (soupProxyResolverWkGetProxyURIAsync): (soupProxyResolverWkGetProxyURISync): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::sendRequestCallback): (WebCore::addFormElementsToSoupMessage): (WebCore::requestStartedCallback): (WebCore::closeCallback): (WebCore::readCallback): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustRepaintRect): 2012-09-14 Charles Wei Need to clear exception in JSDictionary for operations that might have. https://bugs.webkit.org/show_bug.cgi?id=96614 Reviewed by Kentaro Hara. Clear the exception if failed to convert the value inside the JSDictionary. Otherwise, it might impact the following operations on the dictionary. No new tests, the existing test at LayoutTest/storage/indexeddb/tutorial.html should work for JSC binding. * bindings/js/JSDictionary.h: (WebCore::JSDictionary::tryGetPropertyAndResult): 2012-09-14 Grzegorz Czajkowski Add method to get the list of all available dictionaries https://bugs.webkit.org/show_bug.cgi?id=96518 Reviewed by Carlos Garcia Campos. There is lack of the method in the TextCheckerEnchant class to get the list of all available/installed dictionaries. To set the dictionaries the client has to 'guess/hard code' the names of dictionaries that are not obvious and depend on OS configuration and installed packages. The list can be used by WebKit's GTK and EFL API for instance: webkit_web_context_set_spell_checking_languages(), ewk_text_checker_setting_spell_checking_languages_set() to set dictionaries used by Enchant. To avoid names conflict a new one has been introduced for former getSpellCheckingLanguages. It has been changed to loadedSpellCheckingLanguages as it gets the current (in use) dictionaries. Additionally the 'get' prefix has been removed according to WebKit coding style. * platform/text/enchant/TextCheckerEnchant.cpp: (TextCheckerEnchant::loadedSpellCheckingLanguages): Changed name from getSpellCheckingLanguages and added const modifier. (TextCheckerEnchant::availableSpellCheckingLanguages): A newly added method to get available/installed dictionaries. Its output can be used as input for updateSpellCheckingLanguages(). * platform/text/enchant/TextCheckerEnchant.h: (TextCheckerEnchant): 2012-09-14 Dan Carney Remove V8DOMWindowShell::getEntered https://bugs.webkit.org/show_bug.cgi?id=96637 Reviewed by Adam Barth. V8DOMWindowShell::getEntered was refactored so that the window shell no longer has to be kept alive by a v8 context but rather a smaller object. No new tests. No change in functionality. * bindings/v8/DOMData.cpp: (WebCore::DOMData::getCurrentStore): * bindings/v8/ScopedPersistent.h: (WebCore::ScopedPersistent::leakHandle): (ScopedPersistent): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::resetIsolatedWorlds): (WebCore::ScriptController::evaluateInIsolatedWorld): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.cpp: (WebCore::perContextDataForCurrentWorld): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setIsolatedWorldField): (WebCore::V8DOMWindowShell::toIsolatedContextData): (WebCore::isolatedContextWeakCallback): (WebCore::V8DOMWindowShell::disposeContext): (WebCore::V8DOMWindowShell::clearIsolatedShell): (WebCore): (WebCore::V8DOMWindowShell::initializeIfNeeded): (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin): * bindings/v8/V8DOMWindowShell.h: (V8DOMWindowShell): (IsolatedContextData): (WebCore::V8DOMWindowShell::IsolatedContextData::create): (WebCore::V8DOMWindowShell::IsolatedContextData::world): (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData): (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin): (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin): (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData): (WebCore::V8DOMWindowShell::enteredIsolatedContext): (WebCore::V8DOMWindowShell::enteredIsolatedContextData): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-09-14 Gyuyoung Kim Unreviewed, rolling out r128507. http://trac.webkit.org/changeset/128507 https://bugs.webkit.org/show_bug.cgi?id=96659 Revert. r128507 makes too many crashes in EFL layout test bots. * PlatformEfl.cmake: * platform/efl/RefPtrEfl.cpp: Renamed from Source/WTF/wtf/efl/RefPtrEfl.cpp. (WTF): (WTF::refIfNotNull): (WTF::derefIfNotNull): * platform/efl/RefPtrEfl.h: Renamed from Source/WTF/wtf/efl/RefPtrEfl.h. (WTF): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): (WebCore::RenderThemeEfl::loadTheme): (WebCore::RenderThemeEfl::applyPartDescriptionsFrom): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): (ThemePartCacheEntry): 2012-09-13 Patrick Gansterer Reuse floating point formatting of TextStream in [SVG]RenderTreeAsText.cpp https://bugs.webkit.org/show_bug.cgi?id=96264 Reviewed by Benjamin Poulain. RenderTreeAsText uses the same format for streaming out floats as TextStream does. Replace formatNumberRespectingIntegers() with a new overload to the operator<< to reuse the special cases for numbers which take advantage of StringBuilder::appendNumber() and avoid a temporary StringImpl. * platform/text/TextStream.cpp: (WebCore::hasFractions): (WebCore::TextStream::operator<<): * platform/text/TextStream.h: * rendering/RenderTreeAsText.cpp: (WebCore::operator<<): * rendering/RenderTreeAsText.h: * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::operator<<): 2012-09-13 Sheriff Bot Unreviewed, rolling out r128552. http://trac.webkit.org/changeset/128552 https://bugs.webkit.org/show_bug.cgi?id=96729 Still breaks the test on chromium linux debug. It's quite annoying. (Requested by rniwa on #webkit). * WebCore.exp.in: * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): * rendering/RenderWidget.cpp: (WebCore): (WebCore::widgetNewParentMap): (WebCore::RenderWidget::suspendWidgetHierarchyUpdates): (WebCore::RenderWidget::resumeWidgetHierarchyUpdates): (WebCore::moveWidgetToParentSoon): * rendering/RenderWidget.h: (RenderWidget): 2012-09-13 Kevin Funk Make compile with both OS(WINCE) and PLATFORM(QT) support https://bugs.webkit.org/show_bug.cgi?id=95536 Reviewed by Simon Hausmann. * WebCore.pri: Set defines for the WinCE platform build * platform/graphics/BitmapImage.cpp: Use default implementation in BitmapImage::reportMemoryUsage() when Qt support available * platform/graphics/GraphicsContext.cpp: Same as above: use default implementation * platform/win/ClipboardUtilitiesWin.cpp: Remove unnecessary include 2012-09-13 Keishi Hattori Create Localizer factory method for LocaleWin https://bugs.webkit.org/show_bug.cgi?id=96667 Reviewed by Kent Tamura. Preparing to use Localizer instead of LocaleMac/Win/ICU. No new tests. No behavior change. * platform/text/LocaleWin.cpp: (WebCore): (WebCore::extractLanguageCode): Extract the language code from a locale. (WebCore::LCIDFromLocaleInternal): Returns LCID for a given locale. Returns 0 when locale is invalid. (WebCore::LCIDFromLocale): Returns LCID for a given locale. Returns default language LCID when locale is invalid. (WebCore::Localizer::create): (WebCore::LocaleWin::currentLocale): 2012-09-13 Ryosuke Niwa suspend/resumeWidgetHierarchyUpdates should be a RAII object https://bugs.webkit.org/show_bug.cgi?id=96706 Reviewed by Simon Fraser. Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope. * WebCore.exp.in: Export new symbols. * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): * rendering/RenderWidget.cpp: (WebCore): (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap): (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): (WebCore::moveWidgetToParentSoon): * rendering/RenderWidget.h: (WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended): (WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove): (WebCore): (RenderWidget): 2012-09-13 Sheriff Bot Unreviewed, rolling out r128543. http://trac.webkit.org/changeset/128543 https://bugs.webkit.org/show_bug.cgi?id=96722 Caused LocaleWinTest.localizedNumberRoundTrip to fail (Requested by keishi on #webkit). * platform/text/LocaleWin.cpp: (WebCore::determineCurrentLCID): (WebCore): (WebCore::LocaleWin::currentLocale): 2012-09-13 Sheriff Bot Unreviewed, rolling out r128531. http://trac.webkit.org/changeset/128531 https://bugs.webkit.org/show_bug.cgi?id=96719 plugins/document-open.html crash on Chromium-Linux (Requested by tkent1 on #webkit). * WebCore.exp.in: * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): * rendering/RenderWidget.cpp: (WebCore): (WebCore::widgetNewParentMap): (WebCore::RenderWidget::suspendWidgetHierarchyUpdates): (WebCore::RenderWidget::resumeWidgetHierarchyUpdates): (WebCore::moveWidgetToParentSoon): * rendering/RenderWidget.h: (RenderWidget): 2012-09-13 Keishi Hattori Create Localizer factory method for LocaleWin https://bugs.webkit.org/show_bug.cgi?id=96667 Reviewed by Kent Tamura. Preparing to use Localizer instead of LocaleMac/Win/ICU. No new tests. Covered in LocaleWinTest.cpp. * platform/text/LocaleWin.cpp: (WebCore): (WebCore::extractLanguageCode): Extract the language code from a locale. (WebCore::LCIDFromLocaleInternal): Returns LCID for a given locale. Returns 0 when locale is invalid. (WebCore::LCIDFromLocale): Returns LCID for a given locale. Returns default language LCID when locale is invalid. (WebCore::Localizer::create): (WebCore::LocaleWin::currentLocale): 2012-09-13 Benjamin Poulain Improve the SourceProvider hierarchy https://bugs.webkit.org/show_bug.cgi?id=95635 Reviewed by Geoffrey Garen. Get rid of ScriptSourceProvider and StringSourceProvider, they have been made useless by JavaScript updates. On x86_64, this reduces the binary size by 6kb. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/CachedScriptSourceProvider.h: (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::updateCurrentStatementPosition): (WebCore::ScriptDebugServer::dispatchDidParseSource): (WebCore::ScriptDebugServer::dispatchFailedToParseSource): * bindings/js/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): (ScriptSourceCode): * bindings/js/ScriptSourceProvider.h: Removed. * bindings/js/StringSourceProvider.h: Removed. * bindings/js/WorkerScriptController.cpp: * bindings/objc/WebScriptObject.mm: * bridge/NP_jsobject.cpp: * bridge/jni/jni_jsobject.mm: 2012-09-13 Joshua Bell IndexedDB: Consolidate two-phase connection to avoid race conditions https://bugs.webkit.org/show_bug.cgi?id=90411 Reviewed by Tony Chang. Previously, IDB connections were opened by having the front-end (1) call through to a back-end open() method, eventually receive a success message with a back-end object handle, and (2) call into the back-end object to register front-end callbacks. This left the back-end's notion of an open connection in a limbo state between these two calls. In multi-process ports, a crash of the front-end process could leave the back-end wedged waiting for this second call (e.g. can't delete until all connections are closed). Simplify this by having the front-end pass through the callbacks into the back-end during the initial open() call, which eliminates the limbo state. No new tests - no functional changes. Chromium port's webkit_unit_tests updated. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::create): (WebCore::IDBDatabase::IDBDatabase): Db-callbacks is available at creation time. (WebCore::IDBDatabase::~IDBDatabase): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): Need to track db-callbacks as well. (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::databaseCallbacks): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall): (IDBDatabaseBackendImpl::PendingOpenCall): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): Ditto. (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::databaseCallbacks): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall): (IDBDatabaseBackendImpl::PendingOpenWithVersionCall): (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::connectionCount): Don't need to count limbo connections any more. (WebCore::IDBDatabaseBackendImpl::processPendingCalls): Pass through db-callbacks. (WebCore::IDBDatabaseBackendImpl::openConnection): No more limbo connections (yay!). (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): Pass through db-callbacks. (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): Ditto. (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Style. (WebCore::IDBDatabaseBackendImpl::close): Resolve FIXME about connectionCount. * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: (WebCore::IDBDatabaseCallbacksImpl::create): (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl): (WebCore::IDBDatabaseCallbacksImpl::connect): * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: (IDBDatabaseCallbacksImpl): * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): Mint the db-callbacks here... * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): ...passed through to here... * Modules/indexeddb/IDBFactoryBackendImpl.h: (IDBFactoryBackendImpl): * Modules/indexeddb/IDBFactoryBackendInterface.h: (IDBFactoryBackendInterface): * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::create): ...all the way to here... (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): (WebCore::IDBOpenDBRequest::onUpgradeNeeded): ...and finally hooked up here. (WebCore::IDBOpenDBRequest::onSuccess): (or here, if no upgrade needed). * Modules/indexeddb/IDBOpenDBRequest.h: (WebCore): (IDBOpenDBRequest): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): Tweak event/notification ordering; the notifying the database that the transaction is finished may unblock closing, which fires more events, and the delivery matters. Previously the close would be blocked by the transaction which gave the desired order. (WebCore::IDBTransaction::onComplete): Ditto. * inspector/InspectorIndexedDBAgent.cpp: New hookup logic. (WebCore): 2012-09-13 Ryosuke Niwa suspend/resumeWidgetHierarchyUpdates should be a RAII object https://bugs.webkit.org/show_bug.cgi?id=96706 Reviewed by Simon Fraser. Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope. * WebCore.exp.in: Export new symbols. * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): * rendering/RenderWidget.cpp: (WebCore): (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap): (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): (WebCore::moveWidgetToParentSoon): * rendering/RenderWidget.h: (WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope): (WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended): (WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove): (WebCore): (RenderWidget): 2012-09-13 Simon Fraser Lots of repaints in the top left tile on this site https://bugs.webkit.org/show_bug.cgi?id=96698 Reviewed by Anders Carlsson. When given a rect outside of the current tile coverage rect, TileCache::setNeedsDisplayInRect() would try to invalidate the top left tile. This would normally be a no-op, except when repaint counters are visible, in which case it would invalidate the counter area. Fix by doing an early return if the intersection between the repaint rect and the tile coverage rect is empty. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setNeedsDisplayInRect): 2012-09-13 Mark Rowe WebKit looks for some files on the system even when building against an SDK. Reviewed by David Kilzer. If an SDK is being used, pass it through to our custom invocations of the preprocessor. * DerivedSources.make: 2012-09-13 Tom Sepez ASSERT(!eventDispatchForbidden()) fires when removed plugin re-inserted as part of readyStateChange. https://bugs.webkit.org/show_bug.cgi?id=93639 Reviewed by Ryosuke Niwa. Removing a plugin causes a detach which can cancel the last remaining load on a page, resulting in a readyStateChange event during a time when things are inconsisent. Defer the detach which triggers this chain of events until after the node is fully removed from the document's elementsById map. Test: plugins/plugin-remove-readystatechange.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): 2012-09-13 Tim Horton Add optional debug logging when we fall into/out of threaded scrolling https://bugs.webkit.org/show_bug.cgi?id=93898 Reviewed by Simon Fraser. Add logging when we enter and exit the threaded scrolling mode, and logs the reasons we fall into main-thread scrolling. The logging output looks like this: SCROLLING: Switching to main-thread scrolling mode. Time: 15843.554718 Reason(s): viewport-constrained objects SCROLLING: Switching to threaded scrolling mode. Time: 15844.550866 SCROLLING: Switching to main-thread scrolling mode. Time: 15845.551214 Reason(s): viewport-constrained objects SCROLLING: Switching to threaded scrolling mode. Time: 15846.552619 SCROLLING: Switching to main-thread scrolling mode. Time: 15847.553587 Reason(s): viewport-constrained objects SCROLLING: Switching to threaded scrolling mode. Time: 15848.554084 No new tests, as this is just debugging logging. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): Construct a bitfield describing the reasons we fall into main-thread scrolling mode. * page/scrolling/ScrollingCoordinatorNone.cpp: (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/ScrollingTreeNode.cpp: (WebCore::ScrollingTreeNode::ScrollingTreeNode): * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::ScrollingTreeState): (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/ScrollingTreeState.h: (WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): Use the reasons bitfield instead of a boolean. * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): Add MainThreadScrollingReasons enum, with the current reasons that we might fallback to main-thread scrolling. * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::scrollingPerformanceLoggingEnabled): Fix a typo (scrollingPeformanceLoggingEnabled -> scrollingPerformanceLoggingEnabled). * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::update): (WebCore::ScrollingTreeNodeMac::setScrollPosition): (WebCore::logThreadedScrollingMode): Pretty-print the scrolling mode and shouldUpdateScrollLayerPositionOnMainThreadReason. 2012-09-13 Joshua Bell [V8] Binding: Generate batched attribute/const/callback struct names can collide https://bugs.webkit.org/show_bug.cgi?id=96700 Reviewed by Kentaro Hara. The V8 binding code generator spits out static arrays for batched configuration of consts, attributes, and callbacks. Prior to this patch, it would spit them out in the WebCore namespace with names like Callbacks which could collide with other code. This change renames them from to V8. Tests: Rebaselined the binding/scripts/test/V8/* results. No functional changes. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/scripts/test/V8/V8Float64Array.cpp: (Float64ArrayV8Internal): (WebCore): (WebCore::ConfigureV8Float64ArrayTemplate): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (TestActiveDOMObjectV8Internal): (WebCore): (WebCore::ConfigureV8TestActiveDOMObjectTemplate): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (TestCustomNamedGetterV8Internal): (WebCore): (WebCore::ConfigureV8TestCustomNamedGetterTemplate): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (TestEventConstructorV8Internal): (WebCore): (WebCore::ConfigureV8TestEventConstructorTemplate): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (TestEventTargetV8Internal): (WebCore): (WebCore::ConfigureV8TestEventTargetTemplate): * bindings/scripts/test/V8/V8TestException.cpp: (TestExceptionV8Internal): (WebCore): (WebCore::ConfigureV8TestExceptionTemplate): * bindings/scripts/test/V8/V8TestInterface.cpp: (TestInterfaceV8Internal): (WebCore): (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (TestMediaQueryListListenerV8Internal): (WebCore): (WebCore::ConfigureV8TestMediaQueryListListenerTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (TestObjV8Internal): (WebCore): (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (TestSerializedScriptValueInterfaceV8Internal): (WebCore): (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): 2012-09-13 Ryuan Choi [EFL] Improve string manipulation in EflKeyboardUtilities.cpp https://bugs.webkit.org/show_bug.cgi?id=96598 Reviewed by Benjamin Poulain. Uses ASCIILiteral for static strings as recommended by http://trac.webkit.org/wiki/EfficientStrings and uses HexNumber to remove String::format. No behavior change. Just a refactoring. * platform/efl/EflKeyboardUtilities.cpp: (WebCore::addCharactersToKeyMap): (WebCore::createKeyMap): (WebCore::createWindowsKeyMap): 2012-09-13 Ojan Vafai percentage heights in quirks mode with auto-sized body are computed incorrectly https://bugs.webkit.org/show_bug.cgi?id=96426 Reviewed by Tony Chang. In quirks mode, for the body element, we need to keep walking up to the html element if the body's height is auto. Also, we need to subtract the body/html elements margin/border/padding so that we properly get the body's content height. This behavior matches IE9, FF and Opera. None of this applies to standards mode since we don't walk up the containingBlock chain for auto-sized elements. Test: fast/css/percentage-height-auto-sized-body-quirks.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): 2012-09-13 Adrienne Walker Hide all ancestors of the full screen element when going full screen https://bugs.webkit.org/show_bug.cgi?id=96332 Reviewed by James Robinson. Since fixed position elements can now sometimes become stacking contexts, explicitly set position: static on full-screen ancestors so that there are no stacking context ancestors that could cause the full screen element to become incorrectly sorted. Test: fullscreen/full-screen-fixed-pos-parent.html * css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)): 2012-09-13 Adam Barth REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert https://bugs.webkit.org/show_bug.cgi?id=93654 Reviewed by Eric Seidel. When wrapping a Document, we need to ensure that the global object for the wrapper actually exists before trying to create the wrapper. In other cases in the DOM, we always touch the global object before trying to wrap a given DOM object. For Document, however, HTMLFrameElement.contentDocument is a rare way to get at a DOM object for a global object without first touching the Window object. Rather than writing custom bindings for HTMLFrameElement.contentDocument, this patch just makes toJS for Document ensure that toJS for DOMWindow has been called first. The V8 bindings have some similar code. Test: fast/dom/content-document-prototype.html * bindings/js/JSDocumentCustom.cpp: (WebCore::toJS): 2012-09-13 Anders Carlsson Fix build. * platform/graphics/Latin1TextIterator.h: (WebCore::Latin1TextIterator::Latin1TextIterator): (Latin1TextIterator): m_endCharacter is an unused private member variable, so just remove it to appease newer versions of clang. 2012-09-13 Hans Muller Typo in RenderStyle::isFlippedLinesWritingMode(), small refactoring possible https://bugs.webkit.org/show_bug.cgi?id=96679 Reviewed by Darin Adler. Fixed a typo in the comment for RenderStyle::isFlippedLinesWritingMode() and refactored the three RendersStyle::isXXXWritingMode() inlines to use the inlines defined in WritingMode.h. Moved the comments to WritingMode.h No new tests needed. * platform/text/WritingMode.h: (WebCore): * rendering/style/RenderStyle.h: 2012-09-13 Kenneth Rohde Christiansen Evas_Object* is a ref'ed structure, so tread it as such https://bugs.webkit.org/show_bug.cgi?id=96659 Reviewed by Adam Barth. Replace OwnPtr with RefPtr. * PlatformEfl.cmake: * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): (WebCore::RenderThemeEfl::loadTheme): (WebCore::RenderThemeEfl::applyPartDescriptionsFrom): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): (ThemePartCacheEntry): 2012-09-13 Michael Saboff Added 8 bit path to WidthIterator::advance() https://bugs.webkit.org/show_bug.cgi?id=96590 Reviewed by Geoffrey Garen. Added 8 bit path to advance() by adding a templatized advanceInternal private method and added a simple 8 bit Latin-1 TextIterator. Updated SurrogatePairAwareTextIterator by making both consume() and advance() inlined and adding consumeSlowCase() for surrogate handling. These changes are a performance progression on the Layout tests. No new tests because of no behavior changes. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/Latin1TextIterator.h: Copied from Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h. (Latin1TextIterator): (WebCore::Latin1TextIterator::Latin1TextIterator): (WebCore::Latin1TextIterator::consume): (WebCore::Latin1TextIterator::advance): (WebCore::Latin1TextIterator::characters): * platform/graphics/SurrogatePairAwareTextIterator.cpp: (WebCore::SurrogatePairAwareTextIterator::consumeSlowCase): * platform/graphics/SurrogatePairAwareTextIterator.h: (WebCore::SurrogatePairAwareTextIterator::consume): (SurrogatePairAwareTextIterator): (WebCore::SurrogatePairAwareTextIterator::advance): * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advanceInternal): (WebCore::WidthIterator::advance): * platform/graphics/WidthIterator.h: (WidthIterator): 2012-09-13 Yong Li [BlackBerry] ResourceRequest string optimizations https://bugs.webkit.org/show_bug.cgi?id=96661 Reviewed by Rob Buis. RIM PR# 207965. Call PlatformRequest's method to add the Accept-Language header. No new tests as no functional change. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::initializePlatformRequest): 2012-09-13 Sheriff Bot Unreviewed, rolling out r128489. http://trac.webkit.org/changeset/128489 https://bugs.webkit.org/show_bug.cgi?id=96686 Does not compile on windows (Requested by jamesr on #webkit). * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::create): (WebCore::IDBDatabase::IDBDatabase): (WebCore::IDBDatabase::~IDBDatabase): (WebCore::IDBDatabase::registerFrontendCallbacks): (WebCore): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall): (IDBDatabaseBackendImpl::PendingOpenCall): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall): (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::connectionCount): (WebCore::IDBDatabaseBackendImpl::processPendingCalls): (WebCore::IDBDatabaseBackendImpl::registerFrontendCallbacks): (WebCore): (WebCore::IDBDatabaseBackendImpl::openConnection): (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): (WebCore::IDBDatabaseBackendImpl::deleteDatabase): (WebCore::IDBDatabaseBackendImpl::close): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: (WebCore::IDBDatabaseCallbacksImpl::create): (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl): (WebCore::IDBDatabaseCallbacksImpl::unregisterDatabase): * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: (IDBDatabaseCallbacksImpl): * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): * Modules/indexeddb/IDBFactoryBackendImpl.h: (IDBFactoryBackendImpl): * Modules/indexeddb/IDBFactoryBackendInterface.h: (IDBFactoryBackendInterface): * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::create): (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): (WebCore::IDBOpenDBRequest::onUpgradeNeeded): (WebCore::IDBOpenDBRequest::onSuccess): * Modules/indexeddb/IDBOpenDBRequest.h: (IDBOpenDBRequest): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::onComplete): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-09-13 Tony Chang Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent https://bugs.webkit.org/show_bug.cgi?id=96676 Reviewed by Eric Seidel. There was computeAvailableFreeSpace() and lineBreakLength() shared some very similar code. Merge this code into mainAxisContentExtent(). No new tests, this is just a refactor. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::mainAxisContentExtent): Take contentLogicalHeight as a parameter, which is needed when determining the logical height. (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Use mainAxisContentExtent() and inline. (WebCore::RenderFlexibleBox::computeNextFlexLine): Use mainAxisContentExtent(). * rendering/RenderFlexibleBox.h: 2012-09-13 Glenn Hartmann Add new accelerated compositing for overflow scroll setting. https://bugs.webkit.org/show_bug.cgi?id=95885 Reviewed by James Robinson. wkb.ug/91117 introduces RenderLayer::usesCompositedScrolling(), which currently returns true if we're overflow scrolling and the element has been styled with '-webkit-overflow-scrolling: touch'. If this is true, we get promoted to a composited layer, the associated RenderLayerBacking gets special scrolling layers and in response to RenderLayer::scrollTo() we no longer have to invalidate everything to get the scrolled content in the right spot, thereby avoiding very expensive repaints. It's unfortunate that we require -webkit-overflow-scrolling: touch, though. It would be nice if RenderLayer::usesCompositedScrolling() returned true if the page would continue to behave correctly. This is what wkb.ug/94743 is intended to do. Unfortunately, when we become a composited layer, we switch from subpixel to grayscale anti-aliasing. We only want to auto-opt into composited scrolling if we don't mind the change in anti-aliasing, so we need a flag to enable/disable this feature. No new tests -- no change in behaviour. * page/Settings.h: (WebCore::Settings::setAcceleratedCompositingForOverflowScrollEnabled): (WebCore::Settings::acceleratedCompositingForOverflowScrollEnabled): (Settings): 2012-09-13 Joshua Bell IndexedDB: Consolidate two-phase connection to avoid race conditions https://bugs.webkit.org/show_bug.cgi?id=90411 Reviewed by Tony Chang. Previously, IDB connections were opened by having the front-end (1) call through to a back-end open() method, eventually receive a success message with a back-end object handle, and (2) call into the back-end object to register front-end callbacks. This left the back-end's notion of an open connection in a limbo state between these two calls. In multi-process ports, a crash of the front-end process could leave the back-end wedged waiting for this second call (e.g. can't delete until all connections are closed). Simplify this by having the front-end pass through the callbacks into the back-end during the initial open() call, which eliminates the limbo state. No new tests - no functional changes. Chromium port's webkit_unit_tests updated. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::create): (WebCore::IDBDatabase::IDBDatabase): Db-callbacks is available at creation time. (WebCore::IDBDatabase::~IDBDatabase): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): Need to track db-callbacks as well. (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::databaseCallbacks): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall): (IDBDatabaseBackendImpl::PendingOpenCall): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): Ditto. (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::databaseCallbacks): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall): (IDBDatabaseBackendImpl::PendingOpenWithVersionCall): (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::connectionCount): Don't need to count limbo connections any more. (WebCore::IDBDatabaseBackendImpl::processPendingCalls): Pass through db-callbacks. (WebCore::IDBDatabaseBackendImpl::openConnection): No more limbo connections (yay!). (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): Pass through db-callbacks. (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): Ditto. (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Style. (WebCore::IDBDatabaseBackendImpl::close): Resolve FIXME about connectionCount. * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: (WebCore::IDBDatabaseCallbacksImpl::create): (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl): (WebCore::IDBDatabaseCallbacksImpl::connect): * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: (IDBDatabaseCallbacksImpl): * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): Mint the db-callbacks here... * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): ...passed through to here... * Modules/indexeddb/IDBFactoryBackendImpl.h: (IDBFactoryBackendImpl): * Modules/indexeddb/IDBFactoryBackendInterface.h: (IDBFactoryBackendInterface): * Modules/indexeddb/IDBOpenDBRequest.cpp: (WebCore::IDBOpenDBRequest::create): ...all the way to here... (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): (WebCore::IDBOpenDBRequest::onUpgradeNeeded): ...and finally hooked up here. (WebCore::IDBOpenDBRequest::onSuccess): (or here, if no upgrade needed). * Modules/indexeddb/IDBOpenDBRequest.h: (WebCore): (IDBOpenDBRequest): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::onAbort): Tweak event/notification ordering; the notifying the database that the transaction is finished may unblock closing, which fires more events, and the delivery matters. Previously the close would be blocked by the transaction which gave the desired order. (WebCore::IDBTransaction::onComplete): Ditto. * inspector/InspectorIndexedDBAgent.cpp: New hookup logic. (WebCore): 2012-09-13 Tony Chang Flexitem margins should be based on content width, not width https://bugs.webkit.org/show_bug.cgi?id=96674 Reviewed by Ojan Vafai. Margins should be based on content width. Also remove some calls to mainAxisContentExtent() when we can use contentLogicalWidth instead. Tests: css3/flexbox/percent-margins.html has a new testcase. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): Use contentLogicalWidth instead of passing in the maximum value (only used in the width case). (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Don't pass in mainAxisContentExtent. (WebCore::RenderFlexibleBox::computeChildMarginValue): Use contentLogicalWidth and simplify the code. (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Remove unnecessary mainAxisContentExtent() call. (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Remove unnecessary flexboxAvailableContentExtent. (WebCore::RenderFlexibleBox::computeNextFlexLine): Remove unnecessary mainAxisContentExtent() call. (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Remove unnecessary mainAxisContentExtent() call. * rendering/RenderFlexibleBox.h: Remove unnecessary params. 2012-09-13 Thiago Marcos P. Santos [EFL] Assertion reached on RenderThemeEFL when setting a theme to an invalid path https://bugs.webkit.org/show_bug.cgi?id=96649 Reviewed by Kenneth Rohde Christiansen. Keep the consistence by restoring the reference to the old theme path when the new one cannot be loaded. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::setThemePath): 2012-09-13 Robert Kroeger [chromium] alter fling animation parameters. https://bugs.webkit.org/show_bug.cgi?id=96666 Reviewed by Adrienne Walker. Adjusted configuration parameters for fling animation to have a longer tail and more similarity between touchpad and touchscreen. Covered by existing tests. * platform/TouchFlingPlatformGestureCurve.cpp: (WebCore::TouchFlingPlatformGestureCurve::createForTouchPad): (WebCore::TouchFlingPlatformGestureCurve::createForTouchScreen): 2012-09-13 Joshua Bell IndexedDB: Properties of IDBKeyRange should default to undefined https://bugs.webkit.org/show_bug.cgi?id=96401 Reviewed by Adam Barth. Per the IndexedDB spec, properties of IDBKeyRange should be |undefined| if not set (i.e. range.upper if created with lowerBound(), and vice versa), rather than null. Test: storage/indexeddb/keyrange.html * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): Since IDBKeyRange is the only place where possibly-null keys are returned to script, change the JS value from null to undefined. And call v8Undefined(). It's faster. * bindings/js/custom/JSIDBKeyCustom.cpp: (WebCore::toJS): Ditto. 2012-09-13 Sami Kyostila Refactor paint overflow clipping https://bugs.webkit.org/show_bug.cgi?id=96625 Reviewed by Simon Fraser. The same logic for applying overflow clipping based on the cached size of a RenderBox has been duplicated to four different places. Consolidate them to a single RenderBox utility function. This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=96087. No new functionality; covered by existing tests. * rendering/RenderBox.cpp: (WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): (WebCore): (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderBox.h: (RenderBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): (WebCore::RenderInline::computeRectForRepaint): * rendering/RenderObject.cpp: (WebCore::RenderObject::computeRectForRepaint): 2012-09-13 Simon Hausmann Another prospective Qt/Windows build fix: Add missing CString.h include. * platform/qt/UserAgentQt.cpp: 2012-09-13 Dimitri Glazkov Stop shuttling PseudoId from StyleResolver to SelectorChecker. https://bugs.webkit.org/show_bug.cgi?id=96431 Reviewed by Eric Seidel. SelectorChecker retained extra state to store the PseudoId value of the element. It was sad, because we needed to explicitly maintain its integrity. Instead, we now just make it part of StyleResolver and feed to SelectorChecker as part of SelectorCheckingContext. No new tests, refactoring only. Covered by existing tests. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::SelectorChecker): Removed state initializer. (WebCore::SelectorChecker::checkSelector): Changed to look into context, rather than own member. * css/SelectorChecker.h: (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Added pseudoStyle as parameter. (SelectorCheckingContext): Added pseudoStyle as member. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Changed to look at own member, rather than m_checker. * css/StyleResolver.h: (StyleResolver): Added new member. 2012-09-13 Simon Hausmann Unreviewed prospective Qt/MSVC build fix. * platform/qt/UserAgentQt.cpp: (WebCore::UserAgentQt::standardUserAgent): Try to make the conversion from the 8-bit String to a QLatin1String successful. 2012-09-13 Lauro Neto [Qt][WK2] fast/forms/access-key-for-all-elements.html fails https://bugs.webkit.org/show_bug.cgi?id=73917 Reviewed by Simon Hausmann. Access-key tests were failing due to hardcoded Mac OS X in the Qt WK2 user agent string. This commit moves the WK1 implementation to a shared one to be used by both versions. Adds the shared user agent implementation. * Target.pri: * platform/qt/UserAgentQt.cpp: Added. (WebCore): (WebCore::UserAgentQt::standardUserAgent): * platform/qt/UserAgentQt.h: Added. (WebCore): (UserAgentQt): 2012-09-13 Kenneth Rohde Christiansen [EFL] Use RefPtr for storing cairo_surface_t https://bugs.webkit.org/show_bug.cgi?id=96647 Reviewed by Simon Hausmann. Refactoring, covered by existing tests. * platform/efl/RenderThemeEfl.cpp: (WebCore::createSurfaceForBackingStore): (WebCore::RenderThemeEfl::ThemePartCacheEntry::create): (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse): (WebCore::RenderThemeEfl::paintThemePart): * platform/efl/RenderThemeEfl.h: (WebCore::RenderThemeEfl::ThemePartCacheEntry::surface): (ThemePartCacheEntry): 2012-09-13 Allan Sandfeld Jensen Move updateHoverActiveState to Document. https://bugs.webkit.org/show_bug.cgi?id=95858 Reviewed by Antonio Gomes. RenderLayer::updateHoverActiveState contains the logic that updates hover and active states based on hit-tests, but hover and active states are document states, and does have any relation to layers other than documents having atleast one layer. By moving the function it will be in the same place as other active/hover state maintainace, and we avoid excessive updates of the state from hit-testing flow threads. * dom/Document.cpp: (WebCore::commonAncestor): (WebCore::Document::updateHoverActiveState): * dom/Document.h: (Document): * page/EventHandler.cpp: (WebCore::EventHandler::sendContextMenuEventForKey): * rendering/RenderFrameBase.cpp: (WebCore::RenderFrameBase::nodeAtPoint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): * rendering/RenderLayer.h: * rendering/RenderView.cpp: (WebCore::RenderView::hitTest): * rendering/RenderView.h: (RenderView): 2012-09-13 Allan Sandfeld Jensen REGRESSION: hit test doesn't take iframe scroll position into account https://bugs.webkit.org/show_bug.cgi?id=96541 Reviewed by Antonio Gomes. Convert the coordinate correctly by taking scroll position plus frame borders and padding into account. Test: fast/events/touch/touch-inside-iframe-scrolled.html * rendering/RenderFrameBase.cpp: (WebCore::RenderFrameBase::nodeAtPoint): 2012-09-13 Ilya Tikhonovsky Web Inspector: NMI: remove the dependency of platform sources from WebCore header introduced by NMI instrumentation. https://bugs.webkit.org/show_bug.cgi?id=96367 Reviewed by Yury Semikhatsky. the target is to move 'platform' specific instrumentation code from WebCoreMemoryInstrumentation into the new PlatformMemoryInstrumentation. Drive by fix: New type DOM.Image was introduced. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/WebCoreMemoryInstrumentation.cpp: (WebCore): * dom/WebCoreMemoryInstrumentation.h: (WebCoreMemoryTypes): * inspector/InspectorMemoryAgent.cpp: (WebCore): * platform/KURL.cpp: * platform/KURLGoogle.cpp: * platform/PlatformMemoryInstrumentation.cpp: Copied from Source/WebCore/platform/graphics/GeneratedImage.cpp. (WebCore): * platform/PlatformMemoryInstrumentation.h: Copied from Source/WebCore/platform/graphics/GeneratedImage.cpp. (WebCore): (PlatformMemoryTypes): * platform/SharedBuffer.cpp: * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::reportMemoryUsage): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::reportMemoryUsage): * platform/graphics/GeneratedImage.cpp: (WebCore::GeneratedImage::reportMemoryUsage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::reportMemoryUsage): * platform/graphics/GeneratorGeneratedImage.h: * platform/graphics/Image.cpp: (WebCore::Image::reportMemoryUsage): * platform/network/FormData.cpp: (WebCore::FormData::reportMemoryUsage): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::reportMemoryUsage): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::reportMemoryUsage): 2012-09-13 Ilya Tikhonovsky Web Inspector: NMI: instrument KURL directly. https://bugs.webkit.org/show_bug.cgi?id=96624 Reviewed by Yury Semikhatsky. I replaced traits based instrumentation of KURL with reportMemoryUsage functions. CString* were also instrumented. Drive by fix: Instrumentation code in QualifiedName was moved to cpp. * bindings/v8/V8DOMMap.h: * dom/Attribute.h: * dom/QualifiedName.cpp: (WebCore::QualifiedName::reportMemoryUsage): (WebCore): (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): * dom/QualifiedName.h: (QualifiedNameImpl): (QualifiedName): * dom/WebCoreMemoryInstrumentation.cpp: * dom/WebCoreMemoryInstrumentation.h: (WebCore): * platform/KURL.cpp: (WebCore::KURL::reportMemoryUsage): (WebCore): * platform/KURL.h: (KURL): * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::reportMemoryUsage): * platform/KURLGooglePrivate.h: (KURLGooglePrivate): * platform/KURLWTFURLImpl.h: (KURLWTFURLImpl): (WebCore::KURLWTFURLImpl::reportMemoryUsage): 2012-09-13 Kent Tamura Update binding test expectation for http://trac.webkit.org/changeset/128400 https://bugs.webkit.org/show_bug.cgi?id=91933 * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore::JSFloat64Array::getOwnPropertySlotByIndex): (WebCore::JSFloat64Array::putByIndex): * bindings/scripts/test/JS/JSFloat64Array.h: (JSFloat64Array): * bindings/scripts/test/JS/JSTestActiveDOMObject.h: (JSTestActiveDOMObject): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex): (WebCore): * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: (JSTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestEventConstructor.h: (JSTestEventConstructor): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex): * bindings/scripts/test/JS/JSTestEventTarget.h: (JSTestEventTarget): * bindings/scripts/test/JS/JSTestException.h: (JSTestException): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::putByIndex): (WebCore): * bindings/scripts/test/JS/JSTestInterface.h: (JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (JSTestNamedConstructor): * bindings/scripts/test/JS/JSTestNode.h: (JSTestNode): * bindings/scripts/test/JS/JSTestObj.h: (JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (JSTestSerializedScriptValueInterface): 2012-09-13 Mikhail Pozdnyakov [EFL] REGRESSION (r128274): fast/overflow/overflow-height-float-not-removed-crash.html https://bugs.webkit.org/show_bug.cgi?id=96619 Reviewed by Kenneth Rohde Christiansen. ThemePartCacheEntry::create() can return '0' if creation fails, this was not checked while Theme Part cache populating. A NULL pointer was dereferenced then causing crash. Test: fast/overflow/overflow-height-float-not-removed-crash.html. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::getThemePartFromCache): 2012-09-13 Filip Pizlo [Qt][Win] REGRESSION(r128400): It broke the build https://bugs.webkit.org/show_bug.cgi?id=96617 Reviewed by Simon Hausmann. * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): 2012-09-13 Alexander Pavlov Web Inspector: CSS domain sends events while it is not enabled https://bugs.webkit.org/show_bug.cgi?id=96615 Reviewed by Yury Semikhatsky. The CSS agent is put into and removed from the instrumenting agents set upon enable() and disable(), respectively. Tests will be shortly landed as a part of the new pure protocol testing harness. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::setFrontend): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::reset): (WebCore): (WebCore::InspectorCSSAgent::resetNonPersistentData): (WebCore::InspectorCSSAgent::enable): (WebCore::InspectorCSSAgent::disable): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): 2012-09-12 Ilya Tikhonovsky Web Inspector: NMI: migrate core instrumentation code to WTF namespace https://bugs.webkit.org/show_bug.cgi?id=96511 Reviewed by Yury Semikhatsky. After moving core NMI code to WTF namespace I removed forward declarations of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add forward declaration into wtf/Forward.h * bindings/v8/DOMDataStore.h: (WebCore): * bindings/v8/ScriptProfiler.h: (WebCore): * bindings/v8/V8DOMMap.h: (WebCore): * bindings/v8/V8PerIsolateData.h: (WebCore): * bindings/v8/V8ValueCache.h: (WebCore): * css/CSSProperty.h: * css/CSSRule.h: (WebCore): * css/CSSSelectorList.h: (WebCore): * css/CSSStyleDeclaration.h: (WebCore): * css/CSSStyleSheet.h: (WebCore): * css/CSSValue.h: * css/MediaList.h: (WebCore): * css/MediaQuery.h: * css/MediaQueryExp.h: * css/StylePropertySet.h: (WebCore): * css/StyleResolver.h: * css/StyleRule.h: (WebCore): * css/StyleRuleImport.h: (WebCore): * css/StyleSheetContents.h: (WebCore): * css/WebKitCSSKeyframeRule.h: * css/WebKitCSSKeyframesRule.h: (WebCore): * css/WebKitCSSMixFunctionValue.h: * dom/DocumentEventQueue.h: (WebCore): * dom/ElementAttributeData.h: (WebCore): * dom/Event.h: (WebCore): * dom/Node.h: (WebCore): * dom/WebCoreMemoryInstrumentation.cpp: (WTF): (WTF::WebCore::KURL): * dom/WebCoreMemoryInstrumentation.h: (WebCore): (WTF): * inspector/MemoryInstrumentationImpl.h: * loader/DocumentLoader.h: (WebCore): * loader/FrameLoader.h: (WebCore): * loader/ResourceLoader.h: (WebCore): * loader/SubstituteData.h: * loader/cache/CachedCSSStyleSheet.h: (WebCore): * loader/cache/CachedRawResource.h: (WebCore): * loader/cache/CachedResource.h: (WebCore): * loader/cache/CachedResourceHandle.h: * loader/cache/CachedResourceLoader.h: (WebCore): * loader/cache/CachedScript.h: (WebCore): * loader/cache/CachedShader.h: * loader/cache/CachedXSLStyleSheet.h: (WebCore): * loader/cache/MemoryCache.h: (WebCore): * page/Frame.h: (WebCore): * platform/SharedBuffer.h: * platform/graphics/CrossfadeGeneratedImage.h: (WebCore): * platform/graphics/Image.h: (WebCore): * platform/network/FormData.h: (WebCore): * platform/network/ResourceRequestBase.h: * platform/network/ResourceResponseBase.h: * rendering/style/RenderStyle.h: (WebCore): * rendering/style/StyleRareInheritedData.h: (WebCore): * rendering/style/StyleRareNonInheritedData.h: (WebCore): 2012-09-13 Raul Hudea [CSSRegions][CSSOM] Implement Element.getRegionFlowRanges https://bugs.webkit.org/show_bug.cgi?id=78493 Reviewed by David Hyatt. Implement the getRegionFlowRanges function from the CSS Regions spec. It is implemented by iterating over the content nodes and figuring out which nodes have boundingBox intersecting the region box and figuring out the start and end positions. Tests: fast/regions/get-region-flow-ranges-absolute-pos.html fast/regions/get-region-flow-ranges-content-nodes.html fast/regions/get-region-flow-ranges-display-none.html fast/regions/get-region-flow-ranges-empty-regions.html fast/regions/get-region-flow-ranges-fixed-pos.html fast/regions/get-region-flow-ranges-horiz-bt.html fast/regions/get-region-flow-ranges-inline-only.html fast/regions/get-region-flow-ranges-text-vert-lr.html fast/regions/get-region-flow-ranges-text.html fast/regions/get-region-flow-ranges-vert-lr.html fast/regions/get-region-flow-ranges-vert-rl.html fast/regions/get-region-flow-ranges-writing-modes-rl-rb-lr.html fast/regions/get-region-flow-ranges-writing-modes-tb-rl-lr.html fast/regions/get-region-flow-ranges.html * dom/Element.cpp: (WebCore::Element::webkitGetRegionFlowRanges): (WebCore): * dom/Element.h: * dom/Element.idl: added the webkitGetRegionFlowRanges method * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) (WebCore::RenderBlock::hasNextPage): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage): Added a slower path which works without LayoutState (WebCore::RenderBlock::clampToStartAndEndRegions): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) * rendering/RenderBox.cpp: (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) (WebCore::computeInlineStaticDistance): Use the logicalTopOfFlowThreadContentRect instead of offsetFromLogicalTopOfFirstPage (renamed) * rendering/RenderNamedFlowThread.cpp: (WebCore::isContainedInNodes): (WebCore): (WebCore::boxIntersectsRegion): (WebCore::RenderNamedFlowThread::getRanges): returns a vector of Ranges that contains Node that are part of a region * rendering/RenderNamedFlowThread.h: (RenderNamedFlowThread): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::logicalTopOfFlowThreadContentRect): Returns the logical top of a rectangle inside the flow thread content (WebCore): (WebCore::RenderRegion::logicalBottomOfFlowThreadContentRect): Returns the logical bottom of a rectangle inside the flow thread content (WebCore::RenderRegion::getRanges): proxy the getRanges call to its named flow thread * rendering/RenderRegion.h: (RenderRegion): (WebCore::RenderRegion::logicalTopForFlowThreadContent): Renamed from offsetFromLogicalTopOfFirstPage (WebCore::RenderRegion::logicalBottomForFlowThreadContent): Returns the logical bottom of the FlowThreadContent rect 2012-09-13 Adam Barth new test fast/canvas/canvas-css-crazy.html fails on Mac https://bugs.webkit.org/show_bug.cgi?id=96582 Reviewed by Csaba Osztrogonác. We represent 0 pointers with null, not undefined. Test: fast/canvas/canvas-css-crazy.html * bindings/js/JSCanvasRenderingContextCustom.cpp: (WebCore::toJS): 2012-09-12 Alexander Pavlov Web Inspector: [Styles] Styles not updated when there is a heavy stream of DOM updates https://bugs.webkit.org/show_bug.cgi?id=96482 Reviewed by Vsevolod Vlasov. Update the Styles pane even if there is a pending rebuild update for the same current node. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): 2012-09-12 Chris Fleizach AX: svg:image not accessible https://bugs.webkit.org/show_bug.cgi?id=96341 Unreviewed. Build fix for non-SVG ports. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 2012-09-12 Yoshifumi Inoue New time input needs accessibility https://bugs.webkit.org/show_bug.cgi?id=96032 Reviewed by Chris Fleizach. This patch adds accessibility support into multiple fields time input UI by setting "role" HTML attribute of DateTimeFieldElement to "spinbutton" and changing ARIA attributes to post value change notification. This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. Tests: fast/forms/time-multiple-fields/time-multiple-fields-ax-aria-attributes.html fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification.html * html/shadow/DateTimeFieldElement.cpp: (WebCore::DateTimeFieldElement::DateTimeFieldElement): Changed to set "role" HTML attribute to "spinbutton". (WebCore::DateTimeFieldElement::initialize): Changed to set new parameter axHelpText to aria-help attribute and set aria-valuemax and aria-valuemin attributes. (WebCore::DateTimeFieldElement::updateVisibleValue): Changed to set aria-valuetext and aria-valuenow attributes. * html/shadow/DateTimeFieldElement.h: (DateTimeFieldElement): Changed to add new parameter axHelpText to initialize(). * html/shadow/DateTimeFieldElements.cpp: (WebCore::DateTimeAMPMFieldElement::create): Changed to add new argument. (WebCore::DateTimeHourFieldElement::create): ditto. (WebCore::DateTimeMillisecondFieldElement::create): ditto. (WebCore::DateTimeMinuteFieldElement::create): ditto. (WebCore::DateTimeSecondFieldElement::create): ditto. * html/shadow/DateTimeNumericFieldElement.cpp: (WebCore::DateTimeNumericFieldElement::maximum): Added for DateTimeFieldElement::initialize(). (WebCore::DateTimeNumericFieldElement::minimum): ditto. * html/shadow/DateTimeNumericFieldElement.h: (DateTimeNumericFieldElement): Added maximum() and minimum() declarations. * html/shadow/DateTimeSymbolicFieldElement.cpp: (WebCore::DateTimeSymbolicFieldElement::maximum): Added for DateTimeFieldElement::initialize(). (WebCore::DateTimeSymbolicFieldElement::minimum): ditto. * html/shadow/DateTimeSymbolicFieldElement.h: (DateTimeSymbolicFieldElement): Added maximum() and minimum() declarations. 2012-09-12 Sheriff Bot Unreviewed, rolling out r127876. http://trac.webkit.org/changeset/127876 https://bugs.webkit.org/show_bug.cgi?id=96600 mouse click doesn't work for spin button if spin button in iframe (Requested by yosin on #webkit). * WebCore.exp.in: * WebCore.order: * dom/Document.cpp: (WebCore::Document::nodesFromRect): * dom/Document.h: (Document): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::createContextMenu): * page/DragController.cpp: (WebCore::DragController::canProcessDrag): (WebCore::DragController::startDrag): * page/EventHandler.cpp: (WebCore::EventHandler::updateAutoscrollRenderer): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::bestClickableNodeForTouchPoint): (WebCore::EventHandler::bestContextMenuNodeForTouchPoint): (WebCore::EventHandler::bestZoomableAreaForTouchPoint): (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: (EventHandler): * page/FocusController.cpp: (WebCore::updateFocusCandidateIfNeeded): * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): (WebCore::Frame::documentAtPoint): * page/TouchDisambiguation.cpp: (WebCore::findGoodTouchTargets): * rendering/HitTestRequest.h: * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): 2012-09-09 Filip Pizlo JSC should have property butterflies https://bugs.webkit.org/show_bug.cgi?id=91933 Reviewed by Geoffrey Garen. Teach the DOM that to intercept get/put on indexed properties, you now have to override getOwnPropertySlotByIndex and putByIndex. No new tests because no new behavior. One test was rebased because indexed property iteration order now matches other engines (indexed properties always come first). * bindings/js/ArrayValue.cpp: (WebCore::ArrayValue::get): * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): * bindings/js/JSDOMStringListCustom.cpp: (WebCore::toDOMStringList): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::deletePropertyByIndex): (WebCore): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): (WebCore): (WebCore::JSDOMWindow::putByIndex): (WebCore::JSDOMWindow::deletePropertyByIndex): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::getOwnPropertySlotByIndex): (WebCore): (WebCore::JSDOMWindowShell::putByIndex): (WebCore::JSDOMWindowShell::deletePropertyByIndex): * bindings/js/JSDOMWindowShell.h: (JSDOMWindowShell): * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::deletePropertyByIndex): (WebCore): * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::populateContextMenuItems): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::deletePropertyByIndex): (WebCore): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::deletePropertyByIndex): (WebCore): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): (RuntimeArray): 2012-09-12 Kent Tamura Introduce ValidationMessageClient https://bugs.webkit.org/show_bug.cgi?id=96238 Reviewed by Hajime Morita. ValidationMessageClient interface is responsible to operate validation message UI for interactive form validation. If a Page object has a ValidtionMessageClient, ValidationMessae class uses ValidtionMessageClient instead of Shadow DOM. No new tests because of no behavior changes. * GNUmakefile.list.am: Add ValidtionMessageClient.h. * Target.pri: ditto. * WebCore.gypi: ditto. * WebCore.xcodeproj/project.pbxproj: ditto. * html/ValidationMessage.cpp: (WebCore::ValidationMessage::~ValidationMessage): Hide a validation message via ValidationMessageClient if it is available. (WebCore::ValidationMessage::validationMessageClient): A helper function to get Page::validationMessageClient. (WebCore::ValidationMessage::updateValidationMessage): Adding title attribute is not neeeded if ValidationMessageClient is used. It shoudl be handled in a ValidtionMessageClient implementation. (WebCore::ValidationMessage::setMessage): Show a validation message via ValidationMessageClient if it is available. (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Add an assertion that ValidationMessageClient should not be available. (WebCore::ValidationMessage::buildBubbleTree): ditto. (WebCore::ValidationMessage::requestToHideMessage): Hide a validation message via ValidationMessageClient if it is available. (WebCore::ValidationMessage::shadowTreeContains): Always returns false if ValidationMessageClient is available, it means no Shadow DOM. (WebCore::ValidationMessage::deleteBubbleTree): Add an assertion that ValidationMessageClient should not be available. (WebCore::ValidationMessage::isVisible): Ask ValidationMessageClient for visibility if it is available. * html/ValidationMessage.h: (WebCore): Add a comment. (ValidationMessage): Add validtionMessageClient member function. * page/Page.cpp: (WebCore::Page::Page): Initialize m_validationMessageClient. (WebCore::Page::PageClients::PageClients): Initialize validationMessageClient member with 0. So, existing code makes Page::m_validationMessageClient 0. * page/Page.h: (PageClients): Add validationMessageClient member. (WebCore::Page::validationMessageClient): Added. Accessor for m_validationMessageClient. (Page): Add m_validationMessageClient. * page/Settings.h: (Settings): Updated the comment for setInteractiveFormValidationEnabled. * page/ValidationMessageClient.h: Added. 2012-09-12 Dmitry Titov [V8] OOM in Workers due to external memory retention. https://bugs.webkit.org/show_bug.cgi?id=96459 Reviewed by David Levin. Added memory checks to the locations in Workers code that are about to invoke the next JS block. * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/v8/V8GCController.cpp: (WebCore): (WebCore::workingSetEstimateMBMutex): Added a Mutex-protected accessors to a static caching WS estimate. (WebCore::V8GCController::gcEpilogue): (WebCore::V8GCController::checkMemoryUsage): * bindings/v8/V8GCController.h: (V8GCController): * bindings/v8/V8WorkerContextEventListener.cpp: (WebCore::V8WorkerContextEventListener::callListenerFunction): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::evaluate): 2012-09-12 Julien Chaffraix REGRESSION(r122501): replaced elements with percent width are wrongly size when inserted inside an auto-table layout https://bugs.webkit.org/show_bug.cgi?id=95892 Reviewed by Ojan Vafai. r122501 exposed an issue in how preferred logical widths are computed on replaced objects. The code relies on the logical width computation methods. Unfortunately the previous code relies on the layout information, which may not be up-to-date during preferred logical width computation. Test: fast/table/bad-replaced-sizing-preferred-logical-widths.html fast/replaced/vertical-writing-mode-max-logical-width.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeMaxPreferredLogicalWidth): Added this helper method. The main difference with the old code is that it handles the percent logical width properly before calling the old code path. This is not totally right but before forking the whole code, it's better to have more evidence that forking preferred logical widths and logical width computation is the way to go. (WebCore::RenderReplaced::computePreferredLogicalWidths): Changed to call computeMaxPreferredLogicalWidth. Also fixed an existing bug in vertical-writing modes where we would add the wrong paddings and borders. * rendering/RenderReplaced.h: (RenderReplaced): Added computeMaxPreferredLogicalWidth. 2012-09-12 Max Vujovic [CSS Shaders] Cached validated programs are destroyed and recreated when there is only one custom filter animating https://bugs.webkit.org/show_bug.cgi?id=96563 Reviewed by Dean Jackson. Before this patch, in FilterEffectRenderer::build, we would first clear the old effects and then create the new effects. Suppose we have one FECustomFilter animating on the page. This FECustomFilter holds the last reference to the cached validated program. Before this patch, we would first destroy the old FECustomFilter, which would destroy its cached validated program. Then, we would create the new FECustomFilter and have to recreate the validated program. This patch makes FilterEffectRenderer::build keep the old effects around until we're done creating the new effects. This way, we won't recreate validated programs. No new tests. We can't test this because the validated program cache is not exposed to web pages. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): 2012-09-12 Tony Chang flex item sized incorrectly in a column flexbox with height set via top/bottom https://bugs.webkit.org/show_bug.cgi?id=94855 Reviewed by Ojan Vafai. Stop using computeContentLogicalHeight() to get the height of the flexbox and use computeLogicalHeight directly. This properly takes into account out of flow positioning. We can actually refactor some of this into common code, but I want to do that as a separate pass. Test: css3/flexbox/columns-height-set-via-top-bottom.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Fix out of date comment. (WebCore::RenderFlexibleBox::mainAxisContentExtent): Use computeLogicalHeight instead of computeContentLogicalHeight. This code actually never gets used-- I'll try to remove in a follow up. (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Use computeLogicalHeight instead of computeContentLogicalHeight. (WebCore::RenderFlexibleBox::lineBreakLength): Use computeLogicalHeight instead of computeContentLogicalHeight. 2012-09-12 Adam Barth [V8] V8DOMWrapper::perContextData has no callers and can be removed https://bugs.webkit.org/show_bug.cgi?id=96574 Reviewed by Kentaro Hara. * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): 2012-09-12 Alexandru Chiculita [CSS Shaders] Implement transform parameter animations for CSS Custom Filters https://bugs.webkit.org/show_bug.cgi?id=94980 Reviewed by Dean Jackson. Based on patch from Joshua Netterfield . According to Section 39.2 of Filter Effects 1.0 Editor's draft (https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html), animations of transforms should be handled following the CSS3 transform interpolation rules. This patch implements this functionality. Test: css3/filters/custom/custom-filter-transforms-animation.html * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore): * platform/graphics/filters/CustomFilterNumberParameter.h: (WebCore::CustomFilterNumberParameter::blend): * platform/graphics/filters/CustomFilterOperation.cpp: (WebCore::blendCustomFilterParameters): (WebCore::CustomFilterOperation::blend): * platform/graphics/filters/CustomFilterOperation.h: (WebCore): (WebCore::CustomFilterOperation::blendingNeedsRendererSize): Some filters need the box size, so that they could compute Transforms. Right now only the CustomFilterOperation needs that, but I've implemented using this generic function. (CustomFilterOperation): * platform/graphics/filters/CustomFilterParameter.h: (CustomFilterParameter): * platform/graphics/filters/CustomFilterTransformParameter.h: (CustomFilterTransformParameter): (WebCore::CustomFilterTransformParameter::blend): * platform/graphics/filters/FilterOperation.h: (WebCore::FilterOperation::FilterOperation::blend): (FilterOperation): (WebCore::FilterOperation::FilterOperation::blendingNeedsRendererSize): * platform/graphics/transforms/TransformOperations.cpp: Extracted the blending functions from CSSPropertyAnimation.cpp so that they could be reused from other classes. (WebCore::TransformOperations::blendByMatchingOperations): (WebCore): (WebCore::TransformOperations::blendByUsingMatrixInterpolation): Used when the TransformOperations do not match. (WebCore::TransformOperations::blend): Uses when the caller doesn't know whether the TransformOperations match or not. * platform/graphics/transforms/TransformOperations.h: (TransformOperations): 2012-09-12 Alec Flett IndexedDB: Use ScriptValue instead of SerializedScriptValue when possible https://bugs.webkit.org/show_bug.cgi?id=94023 Reviewed by Kentaro Hara. Transition the put/add/update methods to accept direct ScriptValue objects rather than SerializedScriptValues, to eliminate lots of redundant deserialization/serialization steps while storing values. Also see https://bugs.webkit.org/show_bug.cgi?id=95409 for followup get/openCursor work, following this. No new tests, this is a performance refactor of core IDB functionality. Most existing tests cover correctness. Tests that might fail include: storage/indexeddb/objectstore-basics.html storage/indexeddb/keypath-basics.html storage/indexeddb/index-basics.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::generateIndexKeysForValue): (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * bindings/v8/IDBBindingUtilities.cpp: (WebCore): (WebCore::createIDBKeyFromScriptValueAndKeyPath): (WebCore::deserializeIDBValue): (WebCore::canInjectIDBKeyIntoScriptValue): * bindings/v8/IDBBindingUtilities.h: (WebCore): 2012-09-12 Chris Fleizach AX: svg:image not accessible https://bugs.webkit.org/show_bug.cgi?id=96341 Reviewed by Adele Peterson. Test: accessibility/svg-image.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 2012-09-12 Ojan Vafai percentage widths rendered wrong in vertical writing mode with orthogonal parent https://bugs.webkit.org/show_bug.cgi?id=96308 Reviewed by Tony Chang. When the containingBlock is in a perpendicular writing-mode, we need to use it's logicalWidth as the availableHeight for computing percentage values. Tests: fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html fast/writing-mode/percentage-height-orthogonal-writing-modes.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::availableLogicalHeightUsing): Added some FIXMEs for perpendicular writing mode cases. 2012-09-12 Adam Barth [v8] document.getCSSCanvasContext doesn't need to be custom https://bugs.webkit.org/show_bug.cgi?id=96560 Reviewed by Eric Seidel. Instead of having a special case for toV8(CanvasRenderingContext*) inlined into this custom function, we should just make the toV8 function itself custom. Test: fast/canvas/canvas-css-crazy.html * UseV8.cmake: * WebCore.gypi: * bindings/v8/custom/V8DocumentCustom.cpp: * dom/Document.idl: * html/canvas/CanvasRenderingContext.idl: 2012-09-12 Eric Seidel HTML parser fails to propertly close 4 identical nested formatting elements https://bugs.webkit.org/show_bug.cgi?id=96385 Reviewed by Adam Barth. Add missing Adoption agency step 4.a to fix one of our two outlying Adoption Agency bugs. This is the same step that Opera was missing (must have been recently added to the spec). * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2012-09-12 Siraj Razick [GTK] Protect RedirectedXCompositeWindow with USE(GLX) when building the clutter AC backend https://bugs.webkit.org/show_bug.cgi?id=96165 Reviewed by Martin Robinson. RedirectedXCompositeWindow.cpp and RedirectedXCompositeWindow.h files requies openGL specific headers to compile so when we build webkit clutter AC backend these files failed to compile, This patch protects these two files with USE(GLX) when building webkit with Clutter AC backend. No new tests since this is a build fix * platform/gtk/RedirectedXCompositeWindow.cpp: * platform/gtk/RedirectedXCompositeWindow.h: protects both the files with USE(GLX) 2012-09-12 Ojan Vafai RenderBox::computeLogicalClientHeight is incorrectly named https://bugs.webkit.org/show_bug.cgi?id=94288 Reviewed by Tony Chang. Just renamed a couple methods to make it more clear what they return. No behavior changes. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computeContentLogicalHeight): (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing): (WebCore::RenderBox::availableLogicalHeightUsing): * rendering/RenderBox.h: (RenderBox): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::mainAxisContentExtent): (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): (WebCore::RenderFlexibleBox::lineBreakLength): 2012-09-12 Joshua Bell IndexedDB: The |source| property of IDBFactory.open() request should be null https://bugs.webkit.org/show_bug.cgi?id=96551 Reviewed by Tony Chang. Per the IDB spec, the source property of the IDBOpenDBRequest returned by IDBFactory.open() should be set to null. We were setting it to the IDBFactory object instead. Tests: storage/indexeddb/basics.html storage/indexeddb/basics-workers.html storage/indexeddb/mozilla/event-source.html storage/indexeddb/readonly.html * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): 2012-09-12 Sheriff Bot Unreviewed, rolling out r128353. http://trac.webkit.org/changeset/128353 https://bugs.webkit.org/show_bug.cgi?id=96565 Re-land change that broke tests on Chromium. Tests are now disabled, will rebaseline after this rolls. (Requested by dmazzoni on #webkit). * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::determineAccessibilityRole): (WebCore::AccessibilityNodeObject::canHaveChildren): (WebCore): (WebCore::AccessibilityNodeObject::accessibilityIsIgnored): (WebCore::AccessibilityNodeObject::isWebArea): (WebCore::AccessibilityNodeObject::isImageButton): (WebCore::AccessibilityNodeObject::isAnchor): (WebCore::AccessibilityNodeObject::isNativeTextControl): (WebCore::AccessibilityNodeObject::isSearchField): (WebCore::AccessibilityNodeObject::isNativeImage): (WebCore::AccessibilityNodeObject::isImage): (WebCore::AccessibilityNodeObject::isPasswordField): (WebCore::AccessibilityNodeObject::isInputImage): (WebCore::AccessibilityNodeObject::isProgressIndicator): (WebCore::AccessibilityNodeObject::isSlider): (WebCore::AccessibilityNodeObject::isMenuRelated): (WebCore::AccessibilityNodeObject::isMenu): (WebCore::AccessibilityNodeObject::isMenuBar): (WebCore::AccessibilityNodeObject::isMenuButton): (WebCore::AccessibilityNodeObject::isMenuItem): (WebCore::AccessibilityNodeObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityNodeObject::isEnabled): (WebCore::AccessibilityNodeObject::isIndeterminate): (WebCore::AccessibilityNodeObject::isPressed): (WebCore::AccessibilityNodeObject::isChecked): (WebCore::AccessibilityNodeObject::isHovered): (WebCore::AccessibilityNodeObject::isMultiSelectable): (WebCore::AccessibilityNodeObject::isReadOnly): (WebCore::AccessibilityNodeObject::isRequired): (WebCore::AccessibilityNodeObject::headingLevel): (WebCore::AccessibilityNodeObject::valueDescription): (WebCore::AccessibilityNodeObject::isARIARange): (WebCore::AccessibilityNodeObject::valueForRange): (WebCore::AccessibilityNodeObject::maxValueForRange): (WebCore::AccessibilityNodeObject::minValueForRange): (WebCore::AccessibilityNodeObject::stepValueForRange): (WebCore::AccessibilityNodeObject::isHeading): (WebCore::AccessibilityNodeObject::isLink): (WebCore::AccessibilityNodeObject::isControl): (WebCore::AccessibilityNodeObject::isFieldset): (WebCore::AccessibilityNodeObject::isGroup): (WebCore::AccessibilityNodeObject::selectedRadioButton): (WebCore::AccessibilityNodeObject::selectedTabItem): (WebCore::AccessibilityNodeObject::checkboxOrRadioValue): (WebCore::AccessibilityNodeObject::anchorElement): (WebCore::AccessibilityNodeObject::actionElement): (WebCore::AccessibilityNodeObject::mouseButtonListener): (WebCore::AccessibilityNodeObject::isDescendantOfBarrenParent): (WebCore::AccessibilityNodeObject::alterSliderValue): (WebCore::AccessibilityNodeObject::increment): (WebCore::AccessibilityNodeObject::decrement): (WebCore::AccessibilityNodeObject::changeValueByStep): (WebCore::AccessibilityNodeObject::changeValueByPercent): (WebCore::AccessibilityNodeObject::isGenericFocusableElement): (WebCore::AccessibilityNodeObject::labelForElement): (WebCore::AccessibilityNodeObject::ariaAccessibilityDescription): (WebCore::siblingWithAriaRole): (WebCore::AccessibilityNodeObject::menuElementForMenuButton): (WebCore::AccessibilityNodeObject::menuForMenuButton): (WebCore::AccessibilityNodeObject::menuItemElementForMenu): (WebCore::AccessibilityNodeObject::menuButtonForMenu): (WebCore::AccessibilityNodeObject::accessibilityDescription): (WebCore::AccessibilityNodeObject::helpText): (WebCore::AccessibilityNodeObject::hierarchicalLevel): (WebCore::AccessibilityNodeObject::textUnderElement): (WebCore::AccessibilityNodeObject::title): (WebCore::AccessibilityNodeObject::text): (WebCore::AccessibilityNodeObject::stringValue): (WebCore::accessibleNameForNode): (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements): (WebCore::AccessibilityNodeObject::elementsFromAttribute): (WebCore::AccessibilityNodeObject::ariaLabeledByElements): (WebCore::AccessibilityNodeObject::ariaLabeledByAttribute): (WebCore::AccessibilityNodeObject::canSetFocusAttribute): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::node): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObject): (WebCore::AccessibilityRenderObject::isReadOnly): (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::accessibilityDescription): (WebCore::AccessibilityRenderObject::text): (WebCore::AccessibilityRenderObject::contentChanged): (WebCore): (WebCore::AccessibilityRenderObject::canHaveChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-09-12 Michael Saboff Element::classAttributeChanged should use characters8/16 to find first non-whitespace https://bugs.webkit.org/show_bug.cgi?id=96446 Reviewed by Benjamin Poulain. Made two new static templated methods to handle 8 or 16 bit class names. No functional change, so no new tests. * dom/Element.cpp: (WebCore::classStringHasClassName): (WebCore::Element::classAttributeChanged): 2012-09-12 Adam Barth [V8] V8DOMWrapper::constructorForType is unnecessary now that we can get V8PerContextData from the v8::Context https://bugs.webkit.org/show_bug.cgi?id=96556 Reviewed by Eric Seidel. These functions no longer serve a purpose now that we can get the V8PerContextData directly from the context. Previously we had to find the Frame in order to find the per-context data. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorGetter): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::installDOMWindow): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): * bindings/v8/V8PerContextData.cpp: (WebCore::V8PerContextData::from): * bindings/v8/V8PerContextData.h: (V8PerContextData): - Changed this function to accept an arbitrary context rather than requiring the caller to use the current context. 2012-09-12 Sheriff Bot Unreviewed, rolling out r128318 and r128332. http://trac.webkit.org/changeset/128318 http://trac.webkit.org/changeset/128332 https://bugs.webkit.org/show_bug.cgi?id=96547 Caused accessibility test failures on snow leopard (Requested by jamesr_ on #webkit). * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::determineAccessibilityRole): (WebCore::AccessibilityNodeObject::accessibilityIsIgnored): (WebCore::AccessibilityNodeObject::canSetFocusAttribute): * accessibility/AccessibilityNodeObject.h: (AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::node): * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::AccessibilityRenderObject::isWebArea): (WebCore::AccessibilityRenderObject::isImageButton): (WebCore::AccessibilityRenderObject::isAnchor): (WebCore::AccessibilityRenderObject::isNativeTextControl): (WebCore::AccessibilityRenderObject::isSearchField): (WebCore::AccessibilityRenderObject::isNativeImage): (WebCore::AccessibilityRenderObject::isImage): (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isInputImage): (WebCore::AccessibilityRenderObject::isProgressIndicator): (WebCore::AccessibilityRenderObject::isSlider): (WebCore::AccessibilityRenderObject::isMenuRelated): (WebCore::AccessibilityRenderObject::isMenu): (WebCore::AccessibilityRenderObject::isMenuBar): (WebCore::AccessibilityRenderObject::isMenuButton): (WebCore::AccessibilityRenderObject::isMenuItem): (WebCore::AccessibilityRenderObject::isPressed): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityRenderObject::isChecked): (WebCore::AccessibilityRenderObject::isHovered): (WebCore::AccessibilityRenderObject::isMultiSelectable): (WebCore::AccessibilityRenderObject::isReadOnly): (WebCore::AccessibilityRenderObject::headingLevel): (WebCore::AccessibilityRenderObject::isHeading): (WebCore::AccessibilityRenderObject::isLink): (WebCore::AccessibilityRenderObject::isControl): (WebCore::AccessibilityRenderObject::isFieldset): (WebCore::AccessibilityRenderObject::isGroup): (WebCore::AccessibilityRenderObject::selectedRadioButton): (WebCore::AccessibilityRenderObject::selectedTabItem): (WebCore::AccessibilityRenderObject::actionElement): (WebCore::AccessibilityRenderObject::mouseButtonListener): (WebCore::AccessibilityRenderObject::alterSliderValue): (WebCore::AccessibilityRenderObject::increment): (WebCore::AccessibilityRenderObject::decrement): (WebCore::siblingWithAriaRole): (WebCore::AccessibilityRenderObject::menuElementForMenuButton): (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuItemElementForMenu): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::hierarchicalLevel): (WebCore::AccessibilityRenderObject::checkboxOrRadioValue): (WebCore::AccessibilityRenderObject::valueDescription): (WebCore::AccessibilityRenderObject::stepValueForRange): (WebCore::AccessibilityRenderObject::isARIARange): (WebCore::AccessibilityRenderObject::valueForRange): (WebCore::AccessibilityRenderObject::maxValueForRange): (WebCore::AccessibilityRenderObject::minValueForRange): (WebCore::accessibleNameForNode): (WebCore::AccessibilityRenderObject::accessibilityDescriptionForElements): (WebCore::AccessibilityRenderObject::elementsFromAttribute): (WebCore::AccessibilityRenderObject::ariaLabeledByElements): (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): (WebCore::labelForElement): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): (WebCore::AccessibilityRenderObject::accessibilityDescription): (WebCore::AccessibilityRenderObject::isDescendantOfBarrenParent): (WebCore::AccessibilityRenderObject::text): (WebCore::AccessibilityRenderObject::isRequired): (WebCore::AccessibilityRenderObject::changeValueByStep): (WebCore::AccessibilityRenderObject::changeValueByPercent): (WebCore::AccessibilityRenderObject::isEnabled): (WebCore::AccessibilityRenderObject::isGenericFocusableElement): (WebCore::AccessibilityRenderObject::canHaveChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-09-12 Christophe Dumez [EFL] Compilation error in RenderThemeEfl.cpp https://bugs.webkit.org/show_bug.cgi?id=96540 Unreviewed build fix. Fix compilation error in RenderThemeEfl.cpp when building in debug mode. * platform/efl/RenderThemeEfl.h: (WebCore::RenderThemeEfl::canvas): (WebCore::RenderThemeEfl::edje): 2012-09-12 Sami Kyostila Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING https://bugs.webkit.org/show_bug.cgi?id=96251 Reviewed by Simon Fraser. Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING to better describe the feature it controls. No tests because of no change in runtime behavior. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::usesCompositedScrolling): * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-09-12 Levi Weintraub Inline repainting can be off-by-one with sub-pixel enabled https://bugs.webkit.org/show_bug.cgi?id=95882 Reviewed by Eric Seidel. With sub-pixel layout enabled, context accumulated from containing renderers is used to properly pixel snap. Selection repaint rects are stored outside the affected renderers, and are handed to the embedder without the context to correctly determine the snapped values. This can result in repaint areas smaller than what's needed. This could be fixed three ways: - by changing selection repaint rects to an IntRect and pixel snapping the values before storing them outside the render tree. This is the narrowest solution. - by adapting layout to store pixel snapping hints along with the size/location of the renderer. This is the best possible solution, as it would help solve a lot of pixel snapping issues and reduce complexity of handling. I eventually intend on implementing this. - by reverting repaintUsingContainer to IntRects and using pixel snapping when possible, and enclosingIntRect where we lack context. This implements the last solution, as it's the least invasive, but can potentially fix numerous sub-pixel repaint issues. Test: fast/sub-pixel/selection/selection-rect-in-sub-pixel-table.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::scrollTo): (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): (WebCore::RenderObject::repaint): (WebCore::RenderObject::repaintRectangle): (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderObject.h: (RenderObject): * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::repaint): (WebCore::RenderBlockSelectionInfo::repaint): 2012-09-12 Michael Saboff Build fixed for http://trac.webkit.org/changeset/128243 Unreviewed build fix. Change UnicodeString::extract for gcc based on ICU fix described in http://bugs.icu-project.org/trac/ticket/8197. * icu/unicode/unistr.h: (UnicodeString::extract): 2012-09-12 Christopher Cameron [chromium] Evict textures through the texture manager instead of the resource provider https://bugs.webkit.org/show_bug.cgi?id=96463 Reviewed by James Robinson. When deleting contents textures' resources on the impl thread, do the deletion through the CCPrioritizedTextureManager instead of the CCResourceProvider. This requires traversing the backings list on the impl thread while the main thread is running, so remove the one remaining traversal of the backings list by the main thread. This traversal happens when unlinking textures that were evicted by the impl thread, so explicitly send the list of evicted backings from the impl thread to the main thread. Unify all resource deletion paths in the CCPrioritizedTextureManager. Always perform the sequence of eviction (deleting the GL resource) and then destruction of evicted backings (deleting the objects). Also, use the same function (evictBackingsToReduceMemory) to reduce memory consumption both during commit and when done by the impl thread in response to a request by the GPU memory manager. Note that destroying only some of the resources at a time during texture eviction (as opposed all resources) is still not supported because the texture upload queues cannot be only-partially invalidated yet. Updated tests to take this behavior into account. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::reduceContentsTexturesMemoryOnImplThread): (WebCore): (WebCore::CCLayerTreeHost::getEvictedContentTexturesBackings): (WebCore::CCLayerTreeHost::unlinkEvictedContentTexturesBackings): (WebCore::CCLayerTreeHost::deleteEvictedContentTexturesBackings): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore::CCLayerTreeHostImpl::setContentsTexturesPurged): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::evictBackingsToReduceMemory): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::reduceMemoryOnImplThread): (WebCore::CCPrioritizedTextureManager::getEvictedBackings): (WebCore::CCPrioritizedTextureManager::unlinkEvictedBackings): (WebCore): (WebCore::CCPrioritizedTextureManager::deleteEvictedBackings): (WebCore::CCPrioritizedTextureManager::evictBackingResource): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::releaseContentsTexturesOnImplThread): (WebCore): (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::releaseContentsTexturesOnImplThread): (WebCore): (WebCore::CCThreadProxy::scheduledActionBeginFrame): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (BeginFrameAndCommitState): (CCThreadProxy): 2012-09-12 Mike Fenton [BlackBerry] Add custom messages for input type validation. https://bugs.webkit.org/show_bug.cgi?id=96533 Reviewed by Antonio Gomes. PR 179148. Add validation messages for Email, MultipleEmail and Url. Reviewed Internally by Nima Ghanavatian. * platform/blackberry/LocalizedStringsBlackBerry.cpp: (WebCore::validationMessageTypeMismatchForEmailText): (WebCore::validationMessageTypeMismatchForMultipleEmailText): (WebCore::validationMessageTypeMismatchForURLText): 2012-09-12 Mark Pilgrim [Chromium] Remove unused notifyFormStateChanged function in PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=96527 Reviewed by Kentaro Hara. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-09-12 Mihnea Ovidenie [CSSRegions]Shrink RenderFlowThread size by using bit flags https://bugs.webkit.org/show_bug.cgi?id=96503 Reviewed by Andreas Kling. Use bit fields instead of full bool. No new functionality, just refactoring. Functionality covered by existing tests in fast/regions. * rendering/RenderFlowThread.h: 2012-09-12 Max Vujovic [CSS Shaders] Remove direct texture access via u_texture https://bugs.webkit.org/show_bug.cgi?id=93871 Reviewed by Dean Jackson. Remove the author-accessible "u_texture" sampler, which referenced the DOM element texture. Additionally, reject shaders with author-defined sampler uniforms. When we implement texture parameters, we will allow shaders whose samplers are bound to valid textures. We must not allow OpenGL to give unbound samplers a default value of 0 because that references the DOM element texture, which should be inaccessible to the author's shader code. Test: css3/filters/custom/custom-filter-no-element-texture-access.html * platform/graphics/ANGLEWebKitBridge.cpp: (WebCore::getValidationResultValue): Add a file-static function to easily query the integer values that ANGLE exposes about the last validation result. The new getUniforms method and the existing validateShaderSource method now both use getValidationResultValue. (WebCore): (WebCore::ANGLEWebKitBridge::validateShaderSource): Use the new getValidationResultValue function instead of ANGLE's ShGetInfo function. (WebCore::ANGLEWebKitBridge::getUniforms): Add a new public method to ANGLEWebKitBridge which gets the info about all of the uniforms in the last validated vertex shader or fragment shader. Uniform info includes name, type, and size. * platform/graphics/ANGLEWebKitBridge.h: (ANGLEShaderSymbol): (WebCore::ANGLEShaderSymbol::isSampler): Returns true if the symbol's data type is a GLSL sampler (e.g. sampler2D, samplerCube). (WebCore): (ANGLEWebKitBridge): * platform/graphics/filters/CustomFilterCompiledProgram.cpp: (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram): Take in an additional programType constructor parameter. (WebCore::CustomFilterCompiledProgram::initializeParameterLocations): Remove the author-accessible DOM element texture sampler "u_texture". Only find the location of the internal DOM element texture sampler "css_u_texture" if the author is using the CSS mix function. * platform/graphics/filters/CustomFilterCompiledProgram.h: * platform/graphics/filters/CustomFilterProgramInfo.h: (CustomFilterProgramInfo): (WebCore::CustomFilterProgramInfo::programType): Add the new CustomFilterProgramType enum. In CustomFilterProgramInfo, we plan to replace mixSettings.enabled with a programType. See: https://bugs.webkit.org/show_bug.cgi?id=96448 * platform/graphics/filters/CustomFilterValidatedProgram.cpp: Reject all shaders that have sampler uniforms defined. (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): (WebCore::CustomFilterValidatedProgram::compiledProgram): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::bindProgramAndBuffers): Add an assert to verify that the DOM element texture is bound only if the author is using the CSS mix function. 2012-09-12 Dominic Mazzoni Assert hit in is multiSelectable() https://bugs.webkit.org/show_bug.cgi?id=96530 Reviewed by Chris Fleizach. Fix crash if element isn't a select element. This bug slipped through in a refactoring change (bug 96323). Covered by existing tests. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::isMultiSelectable): 2012-09-11 MORITA Hajime [Scoped Style] NodeRareData::m_numberOfScopedHTMLStyleChildren could be replaced with a node flag. https://bugs.webkit.org/show_bug.cgi?id=96450 Reviewed by Dimitri Glazkov. This change gets rid of NodeRareData::m_numberOfScopedHTMLStyleChildren by replacing it with a Node flag called HasScopedHTMLStyleChildFlag. Instead of tracking the number of certain node, this chagne compute the number when necessary. Now we no longer need to hit rareData() for each hasScopedHTMLStyleChild() call. Note that because such a re-counting occurs only when the scoped
When processing the