2012-07-26 Gavin Peters Guard Prerenderer against inserting prerenders into detached documents. https://bugs.webkit.org/show_bug.cgi?id=92401 Reviewed by Adam Barth. If the document is detached, we should not launch a prerender. Test: fast/dom/HTMLLinkElement/prerender-insert-after-stop.html * loader/Prerenderer.cpp: (WebCore::Prerenderer::render): 2012-07-26 Sheriff Bot Unreviewed, rolling out r123525. http://trac.webkit.org/changeset/123525 https://bugs.webkit.org/show_bug.cgi?id=92421 it needed to be rolled out after r123779 too (Requested by jchaffraix on #webkit). * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): 2012-07-26 Pravin D Outline is always painted on the first table row regardless of the row it's set on https://bugs.webkit.org/show_bug.cgi?id=92389 Reviewed by Eric Seidel. The outlines of all the rows are drawn on the row instead of their respective rows. The paint offset for the outlines does not take the row location into account. Test: fast/table/table-row-outline-paint.html * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::paintOutlineForRowIfNeeded): The row's location is taken into account for calculating the correct paint offset for its outline. 2012-07-26 Antoine Labour [chromium] Combine color matrix filters and apply them in a single pass. https://bugs.webkit.org/show_bug.cgi?id=92059 Reviewed by Stephen White. Sequential color matrix filters can easily be combined, by simply multiplying the color matrices and applying it in a single pass. This helps dramatically with performance (bandwidth savings by avoiding extra copy & clear, also saves fragment shader processing). Covered by css3/filters layout tests, added effect-brightness-clamping and effect-brightness-clamping-hw. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): 2012-07-26 Ryosuke Niwa Href attribute with javascript protocol is stripped when content is pasted into a XML doucment https://bugs.webkit.org/show_bug.cgi?id=92310 Reviewed by Adam Barth. The bug was caused by setAttributeNS's stripping attributes for which isAttributeToRemove return true instead of setting an empty string. Changing this in setAttributeNS is problematic because it will trigger a logic, in HTMLAnchorElement for example, to resolve the URL. Fixed the bug by making XML parsers call parserSetAttributes instead of setAttributeNS. After this patch, handleNamespaceAttributes and handleElementAttributes simply fills up a Vector with which startElementNs (or parseStartElement in Qt) calls parserSetAttributes. * dom/Element.cpp: (WebCore::Element::parserSetAttributes): Sets emptyAtom instead of nullAtom as nullAtom can be turned into "null". (WebCore::Element::parseAttributeName): Extracted from setAttributeNS. (WebCore::Element::setAttributeNS): No longer takes FragmentScriptingPermission. * dom/Element.h: (Element): * editing/markup.cpp: (WebCore::completeURLs): Don't resolve URLs when it's empty since empty attribute has a canonical meaning in some cases. e.g. * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::handleNamespaceAttributes): Renamed from handleElementNamespaces. Call parserSetAttributes even when exiting early to be maintain the same behavior. (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::startElementNs): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::handleNamespaceAttributes): Use XMLNSNames::xmlnsNamespaceURI. Call parserSetAttributes even when exiting early to be maintain the same behavior. (WebCore::handleElementAttributes): (WebCore::XMLDocumentParser::parseStartElement): 2012-07-26 Dan Bernstein element with no intrinsic size and max-width gets sized incorrectly https://bugs.webkit.org/show_bug.cgi?id=92410 Reviewed by Dean Jackson. Test: svg/css/max-width-2.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): The rule for computing the width for elements whose computed width and height are both auto and which have no intrinsic size, but have an intrinsic ratio was applied only to elements with a content renderer (such as with an SVG source). Removed the requirement to have a content renderer, so that it will apply to all elements including . 2012-07-26 Tony Chang Regression: r123696 made css3/flexbox tests failing https://bugs.webkit.org/show_bug.cgi?id=92352 Reviewed by Levi Weintraub. Use roundedLayoutUnit so ports without subpixel layout still pass existing tests. Covered by css3/flexbox/flex-algorithm-min-max.html which should pass again. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::resolveFlexibleLengths): 2012-07-26 Emil A Eklund Contained div with right 0 sometimes overlaps parent div https://bugs.webkit.org/show_bug.cgi?id=91521 Reviewed by Levi Weintraub. Due to unnecessary rounding in clientLogicalWidth and clientLogicalHeight we lost precision when computing the width and position of render boxes. Change clientLogicalWidth/Height to return values with subpixel precision to avoid this. Test: fast/sub-pixel/position-right-aligns-with-container.html * rendering/RenderBox.h: (WebCore::RenderBox::clientLogicalWidth): (WebCore::RenderBox::clientLogicalHeight): Remove unnecessary rounding. 2012-07-26 Chang Shu Build broken when svg is disabled. https://bugs.webkit.org/show_bug.cgi?id=92393. Reviewed by Laszlo Gombos. Need to surpress unused parameters warning. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::buildReferenceFilter): 2012-07-25 Jer Noble Add diagnostic messages when media and plugins load or fail to load. https://bugs.webkit.org/show_bug.cgi?id=92341 Reviewed by Anders Carlsson. Send diagnostic messages when a media or plugin element loads or fails to load. Include in the trace the media engine description, error code, or plugin mime type. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): Send a diagnostic message. * html/HTMLMediaElement.cpp: (WebCore::stringForNetworkState): Added convenience function to stringify network states. (WebCore::HTMLMediaElement::mediaLoadingFailed): Send a diagnostic message. (WebCore::HTMLMediaElement::setReadyState): Send a diagnostic message. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): Send a diagnostic message. 2012-07-26 Sheriff Bot Unreviewed, rolling out r123159, r123165, r123168, r123492, and r123650. http://trac.webkit.org/changeset/123159 http://trac.webkit.org/changeset/123165 http://trac.webkit.org/changeset/123168 http://trac.webkit.org/changeset/123492 http://trac.webkit.org/changeset/123650 https://bugs.webkit.org/show_bug.cgi?id=92406 allowing inline-table anonymous wrappers is a bad idea due to tons of corner cases that should be properly handled (Requested by jchaffraix on #webkit). * rendering/RenderInline.cpp: (WebCore::RenderInline::addChildIgnoringContinuation): * rendering/RenderTable.cpp: (WebCore::RenderTable::createAnonymousWithParentRenderer): 2012-07-26 Jer Noble Add a ChromeClient method to send diagnostic logging messages from WebCore to the client. https://bugs.webkit.org/show_bug.cgi?id=92340 Reviewed by Anders Carlsson. Add a new ChromeClient menthod, to be implemented by WebKit and WebKit2, which sends a diagnostic logging message up to the client. * page/ChromeClient.h: (WebCore::ChromeClient::logDiagnosticMessage): * page/ChromeClient.h: (WebCore::ChromeClient::logDiagnosticMessage): (ChromeClient): * page/DiagnosticLoggingKeys.cpp: Added. (WebCore::DiagnosticLoggingKeys::mediaLoadedKey): (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey): (WebCore::DiagnosticLoggingKeys::pluginLoadedKey): (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey): (WebCore::DiagnosticLoggingKeys::passKey): (WebCore::DiagnosticLoggingKeys::failKey): (WebCore::DiagnosticLoggingKeys::noopKey): * page/DiagnosticLoggingKeys.h: Added. (DiagnosticLoggingKeys): Add the new files DiagnosticLoggingKeys.cpp,h to the project: * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-07-25 Jer Noble Add setting to enable and disable diagnostic logging. https://bugs.webkit.org/show_bug.cgi?id=92337 Reviewed by Anders Carlsson. Add a new entry in Settings, defaulting to false. * page/Settings.cpp: (WebCore::Settings::Settings): Default the new setting to false. * page/Settings.h: (WebCore::Settings::setDiagnosticLoggingEnabled): Simple accessor. (WebCore::Settings::diagnosticLoggingEnabled): Ditto. 2012-07-26 Olivier Blin Add FastMalloc statistics in window.internals https://bugs.webkit.org/show_bug.cgi?id=91274 Reviewed by Ryosuke Niwa. Test: fast/harness/fastmallocstatistics-object.html * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCoreTestSupport.vcproj: * WebCore.xcodeproj/project.pbxproj: * testing/FastMallocStatistics.h: Added. (WebCore): (FastMallocStatistics): (WebCore::FastMallocStatistics::create): (WebCore::FastMallocStatistics::reservedVMBytes): (WebCore::FastMallocStatistics::committedVMBytes): (WebCore::FastMallocStatistics::freeListBytes): (WebCore::FastMallocStatistics::FastMallocStatistics): * testing/FastMallocStatistics.idl: Added. * testing/Internals.cpp: (WebCore::Internals::fastMallocStatistics): (WebCore): * testing/Internals.h: (WebCore): (Internals): * testing/Internals.idl: 2012-07-26 Adrienne Walker [chromium] Remove redundant surface origin transforms https://bugs.webkit.org/show_bug.cgi?id=91815 Reviewed by Stephen White. Bug 91417 changed draw transforms to become equivalent to origin transforms for surfaces. This change removes them as they are no longer needed for anything. No new tests. Just a refactoring. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::computeScrollCompensationMatrixForChildren): (WebCore::calculateDrawTransformsInternal): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::leaveToRenderTarget): (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-25 Andrey Kosyakov Web Inspector: simplify handling of status bar items https://bugs.webkit.org/show_bug.cgi?id=92143 Reviewed by Pavel Feldman. - split status bars into "global" (always in the bottom) and "panel" (on top of the drawer when drawer is shown) - use "inner" status bar section in global status bar to display either panel status bar items or drawer view items (depending on drawer visibility) - let panels/views manage their counters as part of their status bar items, not through special interface members; - get rid of absolute positioning in the status bars where possible; * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype.get statusBarItems): * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide.animationFinished): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._startStatusBarDragging): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.wasShown): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.get statusBarItems): (WebInspector.TimelinePanel.prototype.willHide): * inspector/front-end/elementsPanel.css: (.crumbs): * inspector/front-end/inspector.css: (#main): (body.drawer-visible #main-panels): (.status-bar): (.status-bar-item): (#panel-status-bar-placeholder): (body.drawer-visible #panel-status-bar-placeholder): (#panel-status-bar-resizer): (#panel-status-bar): (#panel-status-bar > div): (#error-warning-count): (#drawer): (#drawer-contents): (.status-bar-items): (.drawer-header): (#inner-status-bar): (.search-status-bar-item): (.search-status-bar-message): (.search-status-bar-progress): (body:not(.platform-mac) .search-status-bar-progress): (body.platform-mac .search-status-bar-progress): (.search-status-bar-stop-button-item): (.search-status-bar-stop-button .glyph): (.search-results-status-bar-message): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector.showViewInDrawer): (WebInspector._closePreviousDrawerView): * inspector/front-end/timelinePanel.css: (.timeline-records-counter): 2012-07-26 Christophe Dumez [EFL][WK2] Implement Network Information provider https://bugs.webkit.org/show_bug.cgi?id=92343 Reviewed by Kenneth Rohde Christiansen. Moved Network Information provider code from WebKit1 to WebCore so that it can be shared with WebKit2. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/NetworkInfoProviderEfl.cpp: Copied from Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp. (WebCore): (WebCore::NetworkInfoProviderEfl::NetworkInfoProviderEfl): (WebCore::NetworkInfoProviderEfl::startUpdating): (WebCore::NetworkInfoProviderEfl::stopUpdating): (WebCore::NetworkInfoProviderEfl::bandwidth): * platform/efl/NetworkInfoProviderEfl.h: Added. (WebCore): (NetworkInfoProviderEfl): 2012-07-25 Pavel Feldman Web Inspector: SASS source mapping straw man (behind experiment) https://bugs.webkit.org/show_bug.cgi?id=92265 Reviewed by Vsevolod Vlasov. This change introduces SASS mapping support (behind the experiment). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype.resourceBinding): (WebInspector.CSSStyleModel.prototype.setSourceMapping): (WebInspector.CSSStyleModel.prototype.resetSourceMappings): (WebInspector.CSSStyleModel.prototype._rawLocationToUILocation): (WebInspector.CSSLocation): (WebInspector.CSSRule): (WebInspector.CSSRule.prototype.get isRegular): (WebInspector.CSSRule.prototype.uiLocation): * inspector/front-end/ContentProviders.js: (WebInspector.StaticContentProvider.prototype.contentType): * inspector/front-end/SASSSourceMapping.js: Added. (WebInspector.SASSSourceMapping): (WebInspector.SASSSourceMapping.prototype._populate): (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent): (WebInspector.SASSSourceMapping.prototype._resourceAdded): (rawLocationToUILocation): (uiLocationToRawLocation): (uiSourceCodes): (reset): (WebInspector.SASSSource): (WebInspector.SASSSource.prototype.isEditable): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/StylesPanel.js: (WebInspector.StylesUISourceCodeProvider): (WebInspector.StylesUISourceCodeProvider.prototype.rawLocationToUILocation): (WebInspector.StylesUISourceCodeProvider.prototype.uiLocationToRawLocation): (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded): (WebInspector.StylesUISourceCodeProvider.prototype.reset): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/UISourceCode.js: (WebInspector.UILocation.prototype.uiLocationToRawLocation): (WebInspector.UILocation.prototype.url): * inspector/front-end/Workspace.js: (WebInspector.Workspace): * inspector/front-end/inspector.html: 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-27 Chris Fleizach WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation https://bugs.webkit.org/show_bug.cgi?id=91911 Reviewed by Anders Carlsson. The ARIA spec states that the title attribute should be used as the last resort for a description of an element. WebKit needs to honor that. Test: platform/mac/accessibility/title-attribute-used-as-last-resort.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::accessibilityDescription): 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-26 Olivier Blin Add FastMalloc statistics in window.internals https://bugs.webkit.org/show_bug.cgi?id=91274 Reviewed by Ryosuke Niwa. Test: fast/harness/fastmallocstatistics-object.html * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCoreTestSupport.vcproj: * WebCore.xcodeproj/project.pbxproj: * testing/FastMallocStatistics.h: Added. (WebCore): (FastMallocStatistics): (WebCore::FastMallocStatistics::create): (WebCore::FastMallocStatistics::reservedVMBytes): (WebCore::FastMallocStatistics::committedVMBytes): (WebCore::FastMallocStatistics::freeListBytes): (WebCore::FastMallocStatistics::FastMallocStatistics): * testing/FastMallocStatistics.idl: Added. * testing/Internals.cpp: (WebCore::Internals::fastMallocStatistics): (WebCore): * testing/Internals.h: (WebCore): (Internals): * testing/Internals.idl: 2012-07-26 Adrienne Walker [chromium] Remove redundant surface origin transforms https://bugs.webkit.org/show_bug.cgi?id=91815 Reviewed by Stephen White. Bug 91417 changed draw transforms to become equivalent to origin transforms for surfaces. This change removes them as they are no longer needed for anything. No new tests. Just a refactoring. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::computeScrollCompensationMatrixForChildren): (WebCore::calculateDrawTransformsInternal): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::leaveToRenderTarget): (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-25 Andrey Kosyakov Web Inspector: simplify handling of status bar items https://bugs.webkit.org/show_bug.cgi?id=92143 Reviewed by Pavel Feldman. - split status bars into "global" (always in the bottom) and "panel" (on top of the drawer when drawer is shown) - use "inner" status bar section in global status bar to display either panel status bar items or drawer view items (depending on drawer visibility) - let panels/views manage their counters as part of their status bar items, not through special interface members; - get rid of absolute positioning in the status bars where possible; * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype.get statusBarItems): * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide.animationFinished): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._startStatusBarDragging): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.wasShown): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.get statusBarItems): (WebInspector.TimelinePanel.prototype.willHide): * inspector/front-end/elementsPanel.css: (.crumbs): * inspector/front-end/inspector.css: (#main): (body.drawer-visible #main-panels): (.status-bar): (.status-bar-item): (#panel-status-bar-placeholder): (body.drawer-visible #panel-status-bar-placeholder): (#panel-status-bar-resizer): (#panel-status-bar): (#panel-status-bar > div): (#error-warning-count): (#drawer): (#drawer-contents): (.status-bar-items): (.drawer-header): (#inner-status-bar): (.search-status-bar-item): (.search-status-bar-message): (.search-status-bar-progress): (body:not(.platform-mac) .search-status-bar-progress): (body.platform-mac .search-status-bar-progress): (.search-status-bar-stop-button-item): (.search-status-bar-stop-button .glyph): (.search-results-status-bar-message): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector.showViewInDrawer): (WebInspector._closePreviousDrawerView): * inspector/front-end/timelinePanel.css: (.timeline-records-counter): 2012-07-26 Christophe Dumez [EFL][WK2] Implement Network Information provider https://bugs.webkit.org/show_bug.cgi?id=92343 Reviewed by Kenneth Rohde Christiansen. Moved Network Information provider code from WebKit1 to WebCore so that it can be shared with WebKit2. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/NetworkInfoProviderEfl.cpp: Copied from Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp. (WebCore): (WebCore::NetworkInfoProviderEfl::NetworkInfoProviderEfl): (WebCore::NetworkInfoProviderEfl::startUpdating): (WebCore::NetworkInfoProviderEfl::stopUpdating): (WebCore::NetworkInfoProviderEfl::bandwidth): * platform/efl/NetworkInfoProviderEfl.h: Added. (WebCore): (NetworkInfoProviderEfl): 2012-07-25 Pavel Feldman Web Inspector: SASS source mapping straw man (behind experiment) https://bugs.webkit.org/show_bug.cgi?id=92265 Reviewed by Vsevolod Vlasov. This change introduces SASS mapping support (behind the experiment). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype.resourceBinding): (WebInspector.CSSStyleModel.prototype.setSourceMapping): (WebInspector.CSSStyleModel.prototype.resetSourceMappings): (WebInspector.CSSStyleModel.prototype._rawLocationToUILocation): (WebInspector.CSSLocation): (WebInspector.CSSRule): (WebInspector.CSSRule.prototype.get isRegular): (WebInspector.CSSRule.prototype.uiLocation): * inspector/front-end/ContentProviders.js: (WebInspector.StaticContentProvider.prototype.contentType): * inspector/front-end/SASSSourceMapping.js: Added. (WebInspector.SASSSourceMapping): (WebInspector.SASSSourceMapping.prototype._populate): (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent): (WebInspector.SASSSourceMapping.prototype._resourceAdded): (rawLocationToUILocation): (uiLocationToRawLocation): (uiSourceCodes): (reset): (WebInspector.SASSSource): (WebInspector.SASSSource.prototype.isEditable): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/StylesPanel.js: (WebInspector.StylesUISourceCodeProvider): (WebInspector.StylesUISourceCodeProvider.prototype.rawLocationToUILocation): (WebInspector.StylesUISourceCodeProvider.prototype.uiLocationToRawLocation): (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded): (WebInspector.StylesUISourceCodeProvider.prototype.reset): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/UISourceCode.js: (WebInspector.UILocation.prototype.uiLocationToRawLocation): (WebInspector.UILocation.prototype.url): * inspector/front-end/Workspace.js: (WebInspector.Workspace): * inspector/front-end/inspector.html: 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-27 Chris Fleizach WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation https://bugs.webkit.org/show_bug.cgi?id=91911 Reviewed by Anders Carlsson. The ARIA spec states that the title attribute should be used as the last resort for a description of an element. WebKit needs to honor that. Test: platform/mac/accessibility/title-attribute-used-as-last-resort.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::accessibilityDescription): 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-26 Vsevolod Vlasov Unreviewed r123761 follow-up, inspector closure compilation fix. * inspector/front-end/Script.js: (WebInspector.Script.Location.prototype.uiLocation): * inspector/front-end/ScriptSnippetModel.js: 2012-07-26 Patrick Gansterer Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext) https://bugs.webkit.org/show_bug.cgi?id=92113 Reviewed by Simon Hausmann. Cleanup the definition of the two methods across different ports and replace the calls to them with LocalWindowsContext where possible. * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintThumb): 2012-07-26 Vsevolod Vlasov Web Inspector: Introduce generic LiveLocation, make Script.Location inherit it. https://bugs.webkit.org/show_bug.cgi?id=92388 Reviewed by Pavel Feldman. Introduced abstract LiveLocation implemented by Script.Location. * inspector/front-end/Script.js: (WebInspector.Script.Location): (WebInspector.Script.Location.prototype.uiLocation): (WebInspector.Script.Location.prototype.dispose): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.LiveLocation): (WebInspector.LiveLocation.prototype.update): (WebInspector.LiveLocation.prototype.rawLocation): (WebInspector.LiveLocation.prototype.uiLocation): (WebInspector.LiveLocation.prototype.dispose): * inspector/front-end/inspector.html: 2012-07-26 Joshua Netterfield [BlackBerry] readPixels on FBOs are limited to canvas size on SGX platforms https://bugs.webkit.org/show_bug.cgi?id=92301 Reviewed by Rob Buis. This fixes fast/canvas/webgl/uninitialized-test.html on BlackBerry, no new tests. * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): 2012-07-26 Alexei Filippov Web Inspector: reduce auto refresh rate of the live native memory diagram https://bugs.webkit.org/show_bug.cgi?id=92372 Reviewed by Pavel Feldman. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart.prototype.wasShown): 2012-07-26 Alexei Filippov Web Inspector: add GC button to the profiles panel toolbar. https://bugs.webkit.org/show_bug.cgi?id=92369 Reviewed by Pavel Feldman. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked): * inspector/front-end/profilesPanel.css: (.garbage-collect-status-bar-item .glyph): 2012-07-26 Allan Sandfeld Jensen Move region from HitTestResult to HitTestPoint. https://bugs.webkit.org/show_bug.cgi?id=92367 Reviewed by Antonio Gomes. Moves the region to HitTestPoint where it makes more sense, and use this change to simplify hit-testing a new region in RenderFlowThread. No new functionality. No new tests. * rendering/HitTestResult.cpp: (WebCore::HitTestPoint::HitTestPoint): (WebCore::HitTestPoint::operator=): (WebCore::HitTestResult::HitTestResult): (WebCore::HitTestResult::operator=): * rendering/HitTestResult.h: (HitTestPoint): (WebCore::HitTestPoint::region): (HitTestResult): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestLayer): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::nodeAtPoint): * rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): 2012-07-26 Jan Keromnes Web Inspector: ExtensionView constructor shouldn't take parent argument https://bugs.webkit.org/show_bug.cgi?id=92326 Reviewed by Pavel Feldman. ExtensionView's constructor took a parent element parameter and auto- showed itself in the constructor. This didn't allow lazy showing and was confusing because it didn't work like a classic View object. Fixed. No new tests needed: Refactoring with no behavior changes. * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel): (WebInspector.ExtensionSidebarPane.prototype.setPage): * inspector/front-end/ExtensionView.js: (WebInspector.ExtensionView): 2012-07-26 Joshua Netterfield [WebGL] ANGLEWebKitBridge should support ESSL platforms https://bugs.webkit.org/show_bug.cgi?id=92295 Reviewed by Rob Buis. This tells ANGLEWebKitBridge to output ESSL code for the BlackBerry platform. This eliminates the need for a previous hack. In addition, some (GLSL) ANGLE output that could not be compiled (for example, glsl-mat4-to-mat3.html) now compiles. * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): 2012-07-26 Pavel Feldman Web Inspector: replace "textInput" keyboard event listener breakpoint with "input" https://bugs.webkit.org/show_bug.cgi?id=92384 Reviewed by Vsevolod Vlasov. * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.EventListenerBreakpointsSidebarPane): 2012-07-26 Jer Noble Add a MediaPlayer API to retrieve the description of the current media engine. https://bugs.webkit.org/show_bug.cgi?id=92336 Reviewed by Eric Carlson. Add a utility function which retrieves, for diagnostic purposes, a brief description of the current media engine. Stubs have been added for each of the MediaPlayerPrivate subclasses which return the name of the class. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::engineDescription): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::engineDescription): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (WebCore::MediaPlayerPrivate::engineDescription): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::engineDescription): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (WebCore::MediaPlayerPrivateQTKit::engineDescription): * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivateQt::engineDescription): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (WebCore::MediaPlayerPrivate::engineDescription): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::engineDescription): 2012-07-26 Pavel Feldman Web Inspector: Edits of styles declared after invalid selector are not applied https://bugs.webkit.org/show_bug.cgi?id=92382 Reviewed by Vsevolod Vlasov. Now popping selectorless rules as well. Test: inspector/styles/styles-edit-property-after-invalid-rule.html * css/CSSParser.cpp: (WebCore::CSSParser::createStyleRule): 2012-07-26 Joshua Netterfield [WebGL] GraphicsContext3D::readPixels has extraneous code from GraphicsContext3D::readPixelsIMG https://bugs.webkit.org/show_bug.cgi?id=92302 Reviewed by Noam Rosenthal. This undoes a mistake from https://bugs.webkit.org/show_bug.cgi?id=90567. No new tests, because it introduces no new functionality, but it makes the WebGL aquarium demo run quite a bit smoother on SGX :) * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::readPixels): 2012-07-26 Yury Semikhatsky Unreviewed. Revert r123740 as it breaks AppleMac compilation. * WebCore.exp.in: * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-26 Yury Semikhatsky Unreviewed. Fix AppleMac compilation after r123740. * WebCore.exp.in: Added missing symbol. 2012-07-26 Yury Semikhatsky Web Inspector: move StringImpl size calculation to StringImpl https://bugs.webkit.org/show_bug.cgi?id=92359 Reviewed by Pavel Feldman. Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to StringImpl::sizeInBytes(); * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-26 Charles Wei Remove redundant include of PageGroup.h in FrameLoader.cpp https://bugs.webkit.org/show_bug.cgi?id=92357 Reviewed by Kentaro Hara. No new tests, just remove redundant include file. * loader/FrameLoader.cpp: 2012-07-26 Eric Seidel 2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute https://bugs.webkit.org/show_bug.cgi?id=92257 Reviewed by Andreas Kling. This check was added 7 years ago by hyatt in: http://trac.webkit.org/changeset/10984 And then later made slow after triggering an ASSERT added: http://trac.webkit.org/changeset/97670 SVG uses a "type" attribute (and it is animatable), but only when used on filter elements: http://www.w3.org/TR/SVG/attindex.html In any case, this does not apply here, and is certainly not what this check was originally intended for. I've moved the check to canShareStyleWithControl as it is only needed when the elements in question are both input elements. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-07-26 Yury Semikhatsky Web Inspector: add memory reporting routine to StyleResolver https://bugs.webkit.org/show_bug.cgi?id=92259 Reviewed by Vsevolod Vlasov. SyleResolver::reportMemoryUsage is added for estimating StyleResolver memory footprint. * css/StyleResolver.cpp: (RuleData): (RuleSet): (RuleSetSelectorPair): (WebCore::StyleResolver::Features::reportMemoryUsage): (WebCore): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (Features): (StyleResolver): * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryClassInfo::addInstrumentedHashSet): (WebCore::MemoryClassInfo::addInstrumentedVector): (WebCore::MemoryInstrumentation::addHashMap): (WebCore): (WebCore::MemoryInstrumentation::addInstrumentedCollection): 2012-07-26 Tommy Widenflycht MediaStream API: Remove DeprecatedPeerConnection https://bugs.webkit.org/show_bug.cgi?id=92106 Reviewed by Adam Barth. Since we are getting ready to add an updated PeerConnection the old DeprecatedPeerConnection will have to go. No new tests, and old tests converted to use PeerConnection00. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/mediastream/DOMWindowMediaStream.idl: * Modules/mediastream/DeprecatedPeerConnection.cpp: Removed. * Modules/mediastream/DeprecatedPeerConnection.h: Removed. * Modules/mediastream/DeprecatedPeerConnection.idl: Removed. * Modules/mediastream/SignalingCallback.h: Removed. * Modules/mediastream/SignalingCallback.idl: Removed. * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * UseJSC.cmake: * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: Removed. * dom/EventTargetFactory.in: * platform/mediastream/DeprecatedPeerConnectionHandler.h: Removed. * platform/mediastream/DeprecatedPeerConnectionHandlerClient.h: Removed. * platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Removed. * platform/mediastream/chromium/DeprecatedPeerConnectionHandler.cpp: Removed. * platform/mediastream/chromium/DeprecatedPeerConnectionHandlerInternal.cpp: Removed. * platform/mediastream/chromium/DeprecatedPeerConnectionHandlerInternal.h: Removed. * platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp: Removed. 2012-07-26 Mike West CSP 1.1: Implement the Content Security Policy script interface. https://bugs.webkit.org/show_bug.cgi?id=91707 Reviewed by Adam Barth. The CSP 1.1 editor's draft defines a script interface that gives developers the ability to query a document regarding the restrictions set by it's currently active content security policy[1]. This patch exposes that API in terms of a new DOMSecurityPolicy object. Data for the API is gathered from the existing ContentSecurityPolicy object on the containing document. CSP's various methods have been extended with a `reportingStatus` parameter which, unsurprisingly, determines whether a violation report should be sent for blocked resources. This allows us to reuse the same codepaths by simply using ContentSecurityPolicy::SuppressReport when querying on behalf of the API, and ContentSecurityPolicy::SendReport when checking resources a page wants to load. This feature is gated on the CSP_NEXT flag, which is currently disabled for all ports other than Chromium. [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-interfaces--experimental Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-alloweval.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive.html http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * WebCore.gypi: * bindings/gobject/GNUmakefile.am: * WebCore.xcodeproj/project.pbxproj: We added a new object, so let's tell _everyone!_ * dom/Document.cpp: (WebCore::Document::securityPolicy): Expose the SecurityPolicy object via Document, gated on CSP_NEXT. (WebCore): * dom/Document.h: (WebCore): (Document): * dom/Document.idl: Adding the SecurityPolicy object to the document, gated on CSP_NEXT. * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::checkInline): (WebCore::CSPDirectiveList::checkNonce): (WebCore::CSPDirectiveList::checkSource): Extracting the core checks out into separate methods. (WebCore::CSPDirectiveList::checkEvalAndReportViolation): Use checkEval. (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Use checkNonce. (WebCore::CSPDirectiveList::checkInlineAndReportViolation): Use checkInline. (WebCore::CSPDirectiveList::checkSourceAndReportViolation): Use checkSource. (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): (WebCore::CSPDirectiveList::allowInlineScript): (WebCore::CSPDirectiveList::allowInlineStyle): (WebCore::CSPDirectiveList::allowEval): (WebCore::CSPDirectiveList::allowScriptFromSource): (WebCore::CSPDirectiveList::allowObjectFromSource): (WebCore::CSPDirectiveList::allowChildFrameFromSource): (WebCore::CSPDirectiveList::allowImageFromSource): (WebCore::CSPDirectiveList::allowStyleFromSource): (WebCore::CSPDirectiveList::allowFontFromSource): (WebCore::CSPDirectiveList::allowMediaFromSource): (WebCore::CSPDirectiveList::allowConnectToSource): These methods now branch on `reportingStatus`: if `SendReoport`, they call `checkXAndReportViolation`, otherwise, they call `checkX`. (WebCore::CSPDirectiveList::gatherReportURIs): New method that gathers the violation report URIs into a DOMStringList. (WebCore::isAllowedByAllWithCallStack): (WebCore::isAllowedByAllWithContext): (WebCore::isAllowedByAllWithURL): These now pass reportingStatus through to the various `allowX` methods. (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): (WebCore::ContentSecurityPolicy::allowInlineScript): (WebCore::ContentSecurityPolicy::allowInlineStyle): (WebCore::ContentSecurityPolicy::allowEval): (WebCore::ContentSecurityPolicy::allowScriptFromSource): (WebCore::ContentSecurityPolicy::allowObjectFromSource): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): (WebCore::ContentSecurityPolicy::allowImageFromSource): (WebCore::ContentSecurityPolicy::allowStyleFromSource): (WebCore::ContentSecurityPolicy::allowFontFromSource): (WebCore::ContentSecurityPolicy::allowMediaFromSource): (WebCore::ContentSecurityPolicy::allowConnectToSource): These accept a new `reportingStatus` parameter, which is passed through to the CSPDirectiveList methods. (WebCore::ContentSecurityPolicy::isActive): New method that returns `true` if policy is active. (WebCore::ContentSecurityPolicy::gatherReportURIs): New method that returns a DOMStringList of violation report URIs. * page/ContentSecurityPolicy.h: (WebCore): * page/DOMSecurityPolicy.cpp: Added. (WebCore::DOMSecurityPolicy::DOMSecurityPolicy): (WebCore): (WebCore::DOMSecurityPolicy::~DOMSecurityPolicy): (WebCore::DOMSecurityPolicy::isActive): (WebCore::DOMSecurityPolicy::reportURIs): (WebCore::DOMSecurityPolicy::allowsInlineScript): (WebCore::DOMSecurityPolicy::allowsInlineStyle): (WebCore::DOMSecurityPolicy::allowsEval): (WebCore::DOMSecurityPolicy::allowsConnectionTo): (WebCore::DOMSecurityPolicy::allowsFontFrom): (WebCore::DOMSecurityPolicy::allowsFrameFrom): (WebCore::DOMSecurityPolicy::allowsImageFrom): (WebCore::DOMSecurityPolicy::allowsMediaFrom): (WebCore::DOMSecurityPolicy::allowsObjectFrom): (WebCore::DOMSecurityPolicy::allowsScriptFrom): (WebCore::DOMSecurityPolicy::allowsStyleFrom): * page/DOMSecurityPolicy.h: Added. (WebCore): (DOMSecurityPolicy): (WebCore::DOMSecurityPolicy::create): * page/DOMSecurityPolicy.idl: Added. 2012-07-26 Gyuyoung Kim Unreviewed. Fix build break on mac win port by r123716. * platform/KURL.h: (KURL): 2012-07-26 Sheriff Bot Unreviewed, rolling out r123715. http://trac.webkit.org/changeset/123715 https://bugs.webkit.org/show_bug.cgi?id=92356 Breaks compilation on multiple platforms (Requested by vsevik on #webkit). * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::getResponseBody): * inspector/InspectorResourceAgent.h: (InspectorResourceAgent): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::setContent): (WebCore::NetworkResourcesData::ResourceData::dataLength): (WebCore::NetworkResourcesData::ResourceData::appendData): (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (ResourceData): (WebCore::NetworkResourcesData::ResourceData::cachedResource): (NetworkResourcesData): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::~CachedResource): (WebCore::CachedResource::removeClient): (WebCore::CachedResource::deleteIfPossible): * loader/cache/CachedResource.h: (CachedResource): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::evict): * testing/InternalSettings.cpp: * testing/Internals.cpp: * testing/Internals.h: (Internals): 2012-07-26 Gyuyoung Kim Add *explicit* keyword to constructors in WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=92238 Reviewed by Kentaro Hara. As a step to let *explicit* keyword add to constructors which have a parameter, *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit type conversion. Some files in platform directory can't use explicit keyword because of build breaks. No new tests. Covered by existing tests. * platform/AutodrainedPool.h: (AutodrainedPool): * platform/ContentType.h: (ContentType): * platform/ContextMenu.h: (ContextMenu): * platform/ContextMenuItem.h: (ContextMenuItem): * platform/Cursor.h: (WebCore::SharedCursor::SharedCursor): (Cursor): * platform/KURL.h: (WebCore::KURL::KURL): (KURL): * platform/KURLGooglePrivate.h: (KURLGooglePrivate): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): * platform/Pasteboard.h: (Pasteboard): * platform/PlatformEvent.h: (WebCore::PlatformEvent::PlatformEvent): * platform/PlatformKeyboardEvent.h: (PlatformKeyboardEvent): * platform/PlatformMouseEvent.h: (PlatformMouseEvent): * platform/PlatformPasteboard.h: (PlatformPasteboard): * platform/PlatformTouchEvent.h: (PlatformTouchEvent): * platform/PlatformWheelEvent.h: (PlatformWheelEvent): * platform/RunLoop.h: (TimerBase): * platform/ScrollAnimator.h: (ScrollAnimator): * platform/ScrollAnimatorNone.h: (ScrollAnimatorNone): * platform/SharedBuffer.h: (SharedBuffer): * platform/WheelFlingPlatformGestureCurve.h: (WheelFlingPlatformGestureCurve): * platform/Widget.h: (Widget): 2012-07-26 Vsevolod Vlasov Web Inspector: Resource agent's reference to cached resources should be weak. https://bugs.webkit.org/show_bug.cgi?id=92108 Reviewed by Pavel Feldman. NetworkResourcesData now stores a raw pointer to CachedResource. CachedResource now notifies InspectorInstrumentation that it will be destroyed. InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents. Destroyed resources content is saved to NetworkResourcesData. Changed content size variables type in NetworkResourcesData from int to size_t. Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl): (WebCore::InspectorInstrumentation::registerInstrumentingAgents): (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willDestroyCachedResource): (WebCore): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveData): (WebCore::InspectorResourceAgent::willDestroyCachedResource): (WebCore): (WebCore::InspectorResourceAgent::getResponseBody): * inspector/InspectorResourceAgent.h: (InspectorResourceAgent): * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::ResourceData): (WebCore::NetworkResourcesData::ResourceData::setContent): (WebCore::NetworkResourcesData::ResourceData::dataLength): (WebCore::NetworkResourcesData::ResourceData::appendData): (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): (WebCore::NetworkResourcesData::setResourceContent): (WebCore::NetworkResourcesData::maybeAddResourceData): (WebCore::NetworkResourcesData::maybeDecodeDataToContent): (WebCore::NetworkResourcesData::removeCachedResource): (WebCore): (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): (WebCore::NetworkResourcesData::ensureFreeSpace): * inspector/NetworkResourcesData.h: (ResourceData): (WebCore::NetworkResourcesData::ResourceData::base64Encoded): (WebCore::NetworkResourcesData::ResourceData::cachedResource): (NetworkResourcesData): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::~CachedResource): (WebCore::CachedResource::removeClient): (WebCore::CachedResource::deleteIfPossible): * loader/cache/CachedResource.h: (CachedResource): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): (WebCore::CachedResourceLoader::garbageCollectDocumentResources): (WebCore::CachedResourceLoader::clearPreloads): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::evict): * testing/InternalSettings.cpp: * testing/Internals.cpp: (WebCore::Internals::garbageCollectDocumentResources): (WebCore): * testing/Internals.h: (Internals): 2012-07-26 Luke Macpherson Fix null ptr deref in CSSParser::storeVariableDeclaration(). https://bugs.webkit.org/show_bug.cgi?id=92333 Reviewed by Andreas Kling. Fix null pointer deref that occurs if the CSSParserValue couldn't be converted to a CSSValue. Test fast/css/variables/variable-unparseable-value-crash.html added. * css/CSSParser.cpp: (WebCore::CSSParser::storeVariableDeclaration): 2012-07-26 Shinya Kawanaka Add UserAgentShadowDOM to FormControlElement just before adding AuthorShadowDOM https://bugs.webkit.org/show_bug.cgi?id=90866 Reviewed by Hajime Morita. It ensures that UserAgentShadowDOM is the oldest ShadowDOM. To show ValidationMessage, WebKit adds a Shadow DOM to some of FormControlElements. ValidationMessage assumes that the added Shadow DOM is the oldest, however, there was a case that a page author might add a Shadow DOM before ValidationMessage adds a Shadow DOM. It will break the assumption that the Shadow DOM added by ValidationMessage is the oldest. So we have prohibited a page author adding a Shadow DOM to FormControlElement. To add UserAgentShadowDOM, we use a callback which is called before a page author adding a Shadow DOM. It adds a UserAgentShadowDOM if it does not exist, so we can ensure that UserAgentShadowDOM is the oldest. Tests: fast/dom/shadow/input-with-validation-without-shadow.html fast/dom/shadow/input-with-validation.html fast/dom/shadow/shadowdom-for-button-complex-shadow.html fast/dom/shadow/shadowdom-for-button-only-shadow.html fast/dom/shadow/shadowdom-for-button-without-shadow.html fast/dom/shadow/shadowdom-for-fieldset-complex-shadow.html fast/dom/shadow/shadowdom-for-fieldset-only-shadow.html fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html fast/dom/shadow/shadowdom-for-keygen-complex-shadow.html fast/dom/shadow/shadowdom-for-keygen-only-shadow.html fast/dom/shadow/shadowdom-for-keygen-without-shadow.html fast/dom/shadow/shadowdom-for-object-complex-shadow.html fast/dom/shadow/shadowdom-for-object-only-shadow.html fast/dom/shadow/shadowdom-for-object-without-shadow.html fast/dom/shadow/shadowdom-for-output-complex-shadow.html fast/dom/shadow/shadowdom-for-output-only-shadow.html fast/dom/shadow/shadowdom-for-output-without-shadow.html fast/dom/shadow/shadowdom-for-select-complex-shadow.html fast/dom/shadow/shadowdom-for-select-only-shadow.html fast/dom/shadow/shadowdom-for-select-without-shadow.html fast/dom/shadow/shadowdom-for-textarea-complex-shadow.html fast/dom/shadow/shadowdom-for-textarea-only-shadow.html fast/dom/shadow/shadowdom-for-textarea-without-shadow.html * dom/ShadowRoot.cpp: (WebCore::allowsAuthorShadowRoot): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::ensureUserAgentShadowRoot): Ensures the existence of a UserAgentShadowRoot. If it does not exist, we create it with empty content. (WebCore): * html/FormAssociatedElement.h: (FormAssociatedElement): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::willAddAuthorShadowRoot): (WebCore): * html/HTMLFormControlElement.h: (HTMLFormControlElement): * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): When AuthroShadowRoot does not a shadow element, ValidationMessage does not have a renderer. So we have to check the existence of renderer. (WebCore::ValidationMessage::buildBubbleTree): 2012-07-26 Kaustubh Atrawalkar [DRT] LTC:: pageNumberForElementById() could be moved to Internals https://bugs.webkit.org/show_bug.cgi?id=92091 Reviewed by Adam Barth. Move the pageNumberForElementById from LayoutTestCotroller to Internals and remove the old platform specific implementations as it exclusively tests WebCore functionality. Covered by existing test cases. * testing/Internals.cpp: (WebCore::Internals::counterValue): (WebCore): (WebCore::Internals::pageNumber): * testing/Internals.h: (Internals): (WebCore::Internals::pageNumber): * testing/Internals.idl: 2012-07-25 MORITA Hajime [Chromium][Win] animation on RTL direction is reverse https://bugs.webkit.org/show_bug.cgi?id=92236 Reviewed by Kent Tamura. This change modfies the way to handle RTL progress bar painting. Originally it computes the flipped coordinates. This change uses transformation for the flip. DirectionFlippingScope handles it. * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::paintProgressBar): Applied DirectionFlippingScope * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::determinateProgressValueRectFor): - Deleted RTL handling in favor of DirectionFlippingScope (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::DirectionFlippingScope): (WebCore): (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope): * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): (DirectionFlippingScope): Added. * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::paintProgressBar): Applied DirectionFlippingScope 2012-07-25 Vineet Chaudhary https://bugs.webkit.org/show_bug.cgi?id=92260 Repalce "int" with "long" from WebCore/*.idls Reviewed by Adam Barth. As per the WebIDL spec IDL shouldn't have int attributes but long instead. Repalced attributes types int with long from WebCore/*.idls. No new tests. TestObj.idl already covers this. There should be no behavioural changes. * dom/Touch.idl: Repalce int with long. * dom/WebKitNamedFlow.idl: Ditto. * html/canvas/ArrayBuffer.idl: Ditto. * html/canvas/WebGLActiveInfo.idl: Ditto. * html/canvas/WebGLShaderPrecisionFormat.idl: Ditto. * page/WebKitAnimation.idl: Ditto. 2012-07-25 Shinya Kawanaka The elements in ShadowDOM of meter or progress should not be modifiable. https://bugs.webkit.org/show_bug.cgi?id=92199 Reviewed by Hajime Morita. A user can set -webkit-user-modify: read-write to the elements in Shadow DOM in a meter or progress element. This might cause a undesired crash like Bug 65738. They should be unmodifiable. We add default css values to elements in ShadowDOM of meter or progress to prohibit editing them. Tests: fast/html/meter-user-modify.html fast/html/progress-user-modify.html * css/html.css: Added -webkit-user-modify: read-only !important; for these elements so that they won't be changed by a user. (meter::-webkit-meter-bar): (meter::-webkit-meter-optimum-value): (meter::-webkit-meter-suboptimum-value): (meter::-webkit-meter-even-less-good-value): (progress::-webkit-progress-bar): (progress::-webkit-progress-value): 2012-07-25 Joshua Netterfield [BlackBerry] GraphicsContext3D::paintToCanvas should not swap 0th and 2nd components of color https://bugs.webkit.org/show_bug.cgi?id=92314 Reviewed by Rob Buis. No new tests, because it corrects existing functionality, but it makes BlackBerry pass canvas-text.html and others. * platform/graphics/GraphicsContext3D.h: * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): 2012-07-25 Joshua Netterfield [BlackBerry] GraphicsContext3D::reshapeFBOs does not report when bound FBOs should be restored https://bugs.webkit.org/show_bug.cgi?id=92304 Reviewed by Rob Buis. No new tests, because it corrects existing functionality, but it makes BlackBerry pass framebuffer-bindings-unaffected-on-resize.html. * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): 2012-07-25 Joshua Netterfield [BlackBerry] readPixels should set alpha to 255 instead of 0 when alpha is disabled https://bugs.webkit.org/show_bug.cgi?id=92303 Reviewed by Rob Buis. No new tests, because it corrects existing functionality, but it makes BlackBerry pass context-attributes-alpha-depth-stencil-antialias.html. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::readPixels): 2012-07-25 Joshua Netterfield [WebGL] fast/canvas/webgl/framebuffer-object-attachment.html fails on certain platforms https://bugs.webkit.org/show_bug.cgi?id=92296 Reviewed by Rob Buis. No new tests, because it introduces no new functionality, only fixes the above mentioned test. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::checkStatus): 2012-07-25 Xingnan Wang IndexedDB: IDBTransaction::abort() should throw DOMException https://bugs.webkit.org/show_bug.cgi?id=92069 Reviewed by Kentaro Hara. Keep aligned with the W3C spec. http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void Test: storage/indexeddb/transaction-abort.html. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::abort): (WebCore): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-07-25 Tony Chang flexitems can overflow the flexbox due to rounding https://bugs.webkit.org/show_bug.cgi?id=92163 Reviewed by Levi Weintraub. Don't round flex item sizes and use LayoutPoint for the location of flex items. Test: css3/flexbox/flex-rounding.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::resolveFlexibleLengths): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::layoutColumnReverse): 2012-07-25 Jonathan Dong [BlackBerry] Integrate certmgr with CredentialBackingStore https://bugs.webkit.org/show_bug.cgi?id=92183 Reviewed by George Staikos. Integrated BlackBerry::Platform::CertMgrWrapper with CredentialBackingStore, when certmgr is ready we save the password in certmgr and retrieve it from certmgr. RIM PR: 171991 Internally reviewed by Joe Mason . No new tests since there's no functional change. * platform/network/blackberry/CredentialBackingStore.cpp: (WebCore::hashCredentialInfo): (WebCore): (WebCore::CredentialBackingStore::CredentialBackingStore): (WebCore::CredentialBackingStore::open): (WebCore::CredentialBackingStore::addLogin): (WebCore::CredentialBackingStore::updateLogin): (WebCore::CredentialBackingStore::getLogin): * platform/network/blackberry/CredentialBackingStore.h: (CredentialBackingStore): 2012-07-25 Kent Tamura REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms https://bugs.webkit.org/show_bug.cgi?id=91804 Reviewed by Hajime Morita. The complexity of FormKeyGenerator::formKey() was O(N) where N is the number form elements with an identical action URL, and formKey() is called for every form. So, it's O(N^2). A page in www.reddit.com contains hundreds of form elements with action="#". So FormController:: formElementsState() took a few seconds on a slow machine. In order to avoid O(N^2) operation, storing a map from form signatures to next index numbers, instead of storing existing formKey strings. No new tests. Just a performance improvement. Note: This is a re-landing of r123191. We rolled it out because of suspicion of a performance regression. However it was innocent. * html/FormController.cpp: (FormKeyGenerator): Remove m_existingKeys. Add a map from a form signature string to the next index number. (WebCore::formSignature): Returns a signature string for a form, without an index number. This is like "actionURL [name1 name2 ]" (WebCore::FormKeyGenerator::formKey): Creates a formKey string by concatenating a formSignature and #n. N is obtained from m_formSignatureToNextIndexMap in O(1). (WebCore::FormKeyGenerator::willDeleteForm): Remove the code for m_existingKeys. 2012-07-25 Benjamin Poulain Initialize QualifiedName's strings from the read only data segment https://bugs.webkit.org/show_bug.cgi?id=92226 Reviewed by Anders Carlsson. Modify the initialization of static QualifiedName to initialize the AtomicString with the data from the read only memory. Overall, HTMLNames::init() gets 10% faster. * dom/QualifiedName.cpp: (WebCore::QualifiedName::QualifiedName): * dom/QualifiedName.h: (QualifiedName): Remove the useless constructor taking a char* and get rid of the init() function. The AtomicString representing the name should be constructed by the caller of QualifiedName. Because the init() code is relatively large and is only executed once, it is important to keep the AtomicString construction separate. The function createQualifiedName() was added to improve the cache use. The short version let us reduce the code one more instruction per call. * dom/make_names.pl: (printQualifiedNameMaker): (printShortQualifiedNameMaker): (printNamesCppFile): (printDefinitions): 2012-07-25 Yoshifumi Inoue [Forms] Move HTMLInputElement::updateInnerTextValue to InputType class https://bugs.webkit.org/show_bug.cgi?id=92230 Reviewed by Kent Tamura. This patch moves implementaion of HTMLInputElement::updateInnerTextValue() into input type classes, removes updateInnerTextValue() from HTMLInputElement, and updates call site of updateInnerTextValue(). No new tests. This patch doesn't change behavior. * html/DateInputType.cpp: (WebCore::DateInputType::handleBlurEvent): Updated call site of updateInnerTextValue(). * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): Updated call site of updateInnerTextValue(). (WebCore::HTMLInputElement::parseAttribute): Updated call site of updateInnerTextValue(). (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Updated call site of updateInnerTextValue(). (WebCore::HTMLInputElement::setSuggestedValue): Updated call site of updateInnerTextValue(). * html/HTMLInputElement.h: (HTMLInputElement): Removed updateInnerTextValue(). * html/InputType.cpp: (WebCore::InputType::updateInnerTextValue): Added default implementaion. * html/InputType.h: (InputType): Added declaration of updateInnerTextValue(). * html/NumberInputType.cpp: (WebCore::NumberInputType::handleBlurEvent): Updated call site of updateInnerTextValue(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): Updated call site of updateInnerTextValue(). (WebCore::TextFieldInputType::updateInnerTextValue): Moved implementaion from HTMLInputElement. * html/TextFieldInputType.h: (TextFieldInputType): Added declaration of updateInnerTextValue(). 2012-07-25 Dana Jansens [chromium] Move ephemeral data for a single frame in LayerRendererChromium into a structure with a scoped lifetime equal to the frame https://bugs.webkit.org/show_bug.cgi?id=92294 Reviewed by Adrienne Walker. The LayerRendererChromium class has a number of member variables that are used while drawing a single frame. Because they are member variables, their lifetimes are not clear, and some are even updated between frames, which is not needed. This change creates a LRC::DrawingFrame structure that holds the data used while drawing the current frame, and an instance of this structure is held and passed around to functions in LayerRendererChromium, moving all of the data out from being member variables on the class to being function arguments on the relevant methods. The projection and window matrices are a part of this frame data, and are not used externally, so they are removed from the CCRenderer interface and included within the DrawingFrame structure. Covered by existing tests, no change in behaviour intended. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::clearFramebuffer): (WebCore::LayerRendererChromium::drawFrame): (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawCheckerboardQuad): (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::drawTexturedQuad): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): (WebCore::LayerRendererChromium::isCurrentRenderPass): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useScopedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::setScissorToRect): (WebCore::LayerRendererChromium::setDrawFramebufferRect): * platform/graphics/chromium/LayerRendererChromium.h: (DrawingFrame): (WebCore::LayerRendererChromium::DrawingFrame::DrawingFrame): (LayerRendererChromium): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): 2012-07-19 Adrienne Walker [chromium] Make all compositor screen space transforms operate on content rects https://bugs.webkit.org/show_bug.cgi?id=91807 Reviewed by Kenneth Russell. Previously, surface screen space transforms operated on surface content space but layer screen space transforms operated on layer space. For the purpose of consistency, unify these two so that they both operate on content space. No tests, because no change in behavior expected. Just a refactoring. * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::savePaintRects): (WebCore::CCDebugRectHistory::savePropertyChangedRects): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::markOccludedBehindLayer): (WebCore::::occluded): (WebCore::::unoccludedContentRect): 2012-07-25 Dan Bernstein Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column https://bugs.webkit.org/show_bug.cgi?id=92311 Reviewed by Anders Carlsson. Tests: fast/multicol/hit-test-end-of-column.html fast/multicol/hit-test-gap-block-axis.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last line on a given column from returning the next line in the next column, added a check if the hit occurred within the pagination strut of a line. Covered by the first test. (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding into the top of the next column. Covered by the second test. 2012-07-25 David Grogan IndexedDB: Make db.version return an integer if appropriate https://bugs.webkit.org/show_bug.cgi?id=92195 Reviewed by Tony Chang. Make use of the existing IDBAny mechanism to return an integer if integer versions have been used. No new tests - no change in behavior expected. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::version): (WebCore): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabase.idl: 2012-07-25 Michael Saboff Convert HTML parser to handle 8-bit resources without converting to UChar* https://bugs.webkit.org/show_bug.cgi?id=90321 Reviewed by Geoffrey Garen. No new tests, no new functionality therefore covered by existing tests. Changed the parsing of HTML to handle 8-bit strings without converting the whole string to 16-bits. Primary change was to use the appropriate character pointer type (LChar* or UChar*) depending on the source string. This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and incrementAndGetCurrentChar{8,16} methods. In SegmentedString, the advance() and advanceAndUpdateLineNumber() methods have been refactored into a state machine managed pair of function pointers. The possible functions have not only the 8 and 16 bitness factored out, they also have the "exclude line numbers" logic factored out for advanceAndUpdateLineNumber(). This provides a net speed-up even with the 8/16 bit testing. Other changes involve using String methods to access and compare with the source data. * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar() instead of SegmentedString '*' operator. * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of SegmentedString '*' operator. * html/parser/HTMLParserIdioms.cpp: (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of SegmentedString '*' operator. * loader/cache/CachedScript.cpp: (WebCore::CachedScript::script): Updated to use new String::dataSize() method. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::operator=): (WebCore::SegmentedString::clear): (WebCore::SegmentedString::append): (WebCore::SegmentedString::prepend): (WebCore::SegmentedString::advanceSubstring): (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current advance function. (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data. (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data. (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number. (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number. (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both 8 and 16 bit advance. (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case advanceAndUpdateLineNumber function for both 8 and 16 bit data. (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted. * platform/text/SegmentedString.h: (WebCore::SegmentedSubstring::SegmentedSubstring): (WebCore::SegmentedSubstring::clear): (SegmentedSubstring): (WebCore::SegmentedSubstring::is8Bit): New getter. (WebCore::SegmentedSubstring::appendTo): (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case. (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case. (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions that pre-increments the 8 bit pointer and returns the next character. (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions that pre-increments the 16 bit pointer and returns the next character. (WebCore::SegmentedSubstring::currentSubString): (WebCore::SegmentedSubstring::getCurrentChar): (WebCore::SegmentedSubstring::incrementAndGetCurrentChar): (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::push): (WebCore::SegmentedString::isEmpty): (WebCore::SegmentedString::lookAhead): (WebCore::SegmentedString::lookAheadIgnoringCase): (WebCore::SegmentedString::advance): (WebCore::SegmentedString::advanceAndUpdateLineNumber): (WebCore::SegmentedString::advanceAndASSERT): (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): (WebCore::SegmentedString::advancePastNonNewline): (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber): (WebCore::SegmentedString::currentChar): (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case functions. (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and change to slow case functions when only one character left. (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance functions based on current substring. (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith(). (WebCore::SegmentedString::lookAheadSlowCase): * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::consumeCharacterReference): Changed to use currentChar() instead of SegmentedString '*' operator. * xml/parser/MarkupTokenizerBase.h: (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use currentChar() instead of SegmentedString '*' operator. (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance): 2012-07-25 Sheriff Bot Unreviewed, rolling out r123625 and r123672. http://trac.webkit.org/changeset/123625 http://trac.webkit.org/changeset/123672 https://bugs.webkit.org/show_bug.cgi?id=92315 Broke Windows and gcc builds (Requested by rniwa on #webkit). * platform/AutodrainedPool.h: (AutodrainedPool): * platform/ContentType.h: (ContentType): * platform/ContextMenu.h: (ContextMenu): * platform/ContextMenuItem.h: (ContextMenuItem): * platform/Cursor.h: (WebCore::SharedCursor::SharedCursor): (Cursor): * platform/KURL.h: (WebCore::KURL::KURL): (KURL): * platform/KURLGooglePrivate.h: (KURLGooglePrivate): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): * platform/Pasteboard.h: (Pasteboard): * platform/PlatformEvent.h: (WebCore::PlatformEvent::PlatformEvent): * platform/PlatformKeyboardEvent.h: (PlatformKeyboardEvent): * platform/PlatformMouseEvent.h: (PlatformMouseEvent): * platform/PlatformPasteboard.h: (PlatformPasteboard): * platform/PlatformTouchEvent.h: (PlatformTouchEvent): * platform/PlatformWheelEvent.h: (PlatformWheelEvent): * platform/RunLoop.h: (TimerBase): * platform/ScrollAnimator.h: (ScrollAnimator): * platform/ScrollAnimatorNone.h: (ScrollAnimatorNone): * platform/SharedBuffer.h: (SharedBuffer): * platform/WheelFlingPlatformGestureCurve.h: (WheelFlingPlatformGestureCurve): * platform/Widget.h: (Widget): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdateResourceRequest): 2012-07-25 Ryosuke Niwa Windows build fix attempt after r123625. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdateResourceRequest): 2012-07-25 Kwang Yul Seo Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately. https://bugs.webkit.org/show_bug.cgi?id=92240 Reviewed by Adam Barth. This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle the context element case. No new tests, covered by existing tests. * html/parser/HTMLStackItem.h: (WebCore::HTMLStackItem::create): (WebCore::HTMLStackItem::HTMLStackItem): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): 2012-07-25 Nico Weber [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=92207 Reviewed by Tony Chang. It's no longer needed after http://crrev.com/148290 and http://crrev.com/148187. * WebCore.gyp/WebCore.gyp: 2012-07-25 Dana Jansens [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass https://bugs.webkit.org/show_bug.cgi?id=91885 Reviewed by Adrienne Walker. We move the filter operations to CCRenderPass to avoid having variable-length data in a WebCompositorQuad in order to serialize, and also to avoid requiring a virtual destructor for the quad classes. The drawFrame method now takes a CCRenderPassIdHashMap in order to connect RenderPass quads to their source RenderPass. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::drawFrame): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore::CCRenderPass::filters): (WebCore::CCRenderPass::setFilters): (CCRenderPass): (WebCore::CCRenderPass::backgroundFilters): (WebCore::CCRenderPass::setBackgroundFilters): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): 2012-07-25 Mike Reed fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy https://bugs.webkit.org/show_bug.cgi?id=92276 Reviewed by Stephen White. PlatformContextSkia::beginLayerClippedToImage This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet, so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy. This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a deep copy. No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until Skia rev. 4722 or later lands. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::beginLayerClippedToImage): 2012-07-25 Li Yin It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode. https://bugs.webkit.org/show_bug.cgi?id=91364 Reviewed by Kenneth Russell. Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero. Test: webaudio/javascriptaudionode.html * Modules/webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::create): 2012-07-24 Shawn Singh [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code. https://bugs.webkit.org/show_bug.cgi?id=88953 Reviewed by Adrienne Walker. This is part 1 of trying to reduce the root layer special case. This tries to reduce the special-ness of the root layer from the perspective of outside code. After this patch, code that uses calcDrawTransforms() no longer needs to initialize the root layer's surface, and no longer needs to manually append the root layer to the renderSurfaceLayerList. Unit tests were also updated (much cleaner!) to account for this change. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore): (WebCore::setupRootLayerAndSurfaceForRecursion): (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): 2012-07-25 Taiju Tsuiki FileSystem should provide a way to delete filesystem. https://bugs.webkit.org/show_bug.cgi?id=91861 Reviewed by Adam Barth. We will add a test when we wire-up the feature to Inspector. * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem (WebCore::deleteFileSystem): (WebCore): (WebCore::LocalFileSystem::deleteFileSystem): * Modules/filesystem/LocalFileSystem.h: (LocalFileSystem): * platform/AsyncFileSystem.cpp: Add deleteFileSystem (WebCore): (WebCore::AsyncFileSystem::deleteFileSystem): * platform/AsyncFileSystem.h: (AsyncFileSystem): * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem (WebCore::AsyncFileSystem::deleteFileSystem): (WebCore): * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem (WebCore::AsyncFileSystem::deleteFileSystem): (WebCore): 2012-07-25 Andrey Adaikin Web Inspector: Add more jsdocs to InjectedScriptSource.js https://bugs.webkit.org/show_bug.cgi?id=92255 Reviewed by Pavel Feldman. * inspector/InjectedScriptSource.js: 2012-07-24 Dana Jansens [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad https://bugs.webkit.org/show_bug.cgi?id=92182 Reviewed by Adrienne Walker. By changing the HUD into a quad, we are able to create a HUD and pass it to the host compositor, allowing the HUD to be used for renderers under Ubercompositor. This also removes the special drawing code for the HUD from LayerRendererChromium, allowing us to move finishDrawingFrame into LayerRendererChromium as a private method and remove it from the CCRenderer interface. Finally, we can remove the CCFontAtlas transport code from CCProxy and its implementations as the atlas can be synced to impl thread through the usual layer commit mechanism. The debug HUD is not covered by tests. * WebCore.gypi: * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added. (WebCore): (WebCore::HeadsUpDisplayLayerChromium::create): (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium): (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium): (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl): * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added. (WebCore): (HeadsUpDisplayLayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawFrame): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::savePropertyChangedRects): * platform/graphics/chromium/cc/CCDebugRectHistory.h: * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp. (WebCore): (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl): (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl): (WebCore::CCHeadsUpDisplayLayerImpl::willDraw): (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads): (WebCore::CCHeadsUpDisplayLayerImpl::didDraw): (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext): (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents): (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter): (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText): (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h. (WebCore): (CCHeadsUpDisplayLayerImpl): (WebCore::CCHeadsUpDisplayLayerImpl::create): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::layerIsAlwaysDamaged): This flag is used to mark the HUD as always damaged, so that it is continually drawn on the impl thread. It is also used as a hint by the CCDebugRectHistory class to not include the layer in the display of damage, since always damaged is not interesting damage. (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::willCommit): (WebCore::CCLayerTreeHost::didCommit): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeSettings): (WebCore::CCLayerTreeSettings::showDebugInfo): (WebCore::CCLayerTreeSettings::showDebugRects): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-07-25 'Pavel Feldman' Web Inspector: follow up to r123612, fixing CSS value suggest. Not reviewed, minor JS fix. * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype): 2012-07-25 Michael Saboff Unreviewed build fix after r123624. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::clearGeolocationOverride): Changed ASSERT_UNUSED() to UNUSED_PARAM(). 2012-07-25 Pavel Feldman Web inspector auto-completes "optimizequality" but then complains https://bugs.webkit.org/show_bug.cgi?id=92262 Reviewed by Timothy Hatcher. Fixed optimizeSpeed, optimizeLegibility, geometricPrecision. * inspector/front-end/CSSKeywordCompletions.js: 2012-07-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=89114 REGRESSION (r112919): Setting scrollTop after setting display from none to block fails -and corresponding- Reviewed by Simon Fraser. ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() both have an optimization in place so that they do not call notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with this optimization because it allowed RenderLayers to restore a scrollOffset from the Element if there is one cached there. This caused the RenderLayer to have a scrollOffset that is improperly out-of-synch with the ScrollAnimator's currentPosition (which will just be 0,0 since it is being re-created like the RenderLayer). This fix makes sure they are in synch by calling setCurrentPosition() on the ScrollAnimator when the cached position is non-zero. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): 2012-07-25 Andreas Kling Make ElementAttributeData a variable-sized object to reduce memory use. Reviewed by Ryosuke Niwa. Take advantage of the fact that we know at ElementAttributeData construction time how many attributes it needs to accomodate and allocate exactly as much space as needed instead of using a Vector. For elements that never have their attribute list mutated (the vast majority), this saves a lot of memory and removes the indirection to Vector's heap-allocated storage. Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure that nothing tries to mutate an element with a raw attribute array. When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using a Vector as backing instead. This is triggered when calling Element::mutableAttributeData(). This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at . That is a ~35% reduction in DOM attribute memory use. Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic adding of "class" attributes. For more static pages, savings are even greater. Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where needed. Not a big deal but avoids double lookup of attributes when removing them. * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttribute): (WebCore::Element::attributes): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::cloneAttributesFromElement): Sprinkle const on ElementAttributeData* pointers. Switch to using mutableAttributeData() in code paths that modify attributes. (WebCore::Element::normalizeAttributes): Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes length() and attributeItem(index), use those to iterate directly over the attributes. (WebCore::Element::createMutableAttributeData): Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new ElementAttributeData (mutable and empty.) * dom/Element.h: (WebCore::Element::attributeData): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureAttributeData): (WebCore::Element::ensureUpdatedAttributeData): Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing attempts to modify an ElementAttributeData that may be immutable. ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData(). The goal of having methods be const is to prevent conversion from one ElementAttributeData object to another, so that pointers remain intact and no unnecessary work gets done. (WebCore::Element::mutableAttributeData): Added, returns a guaranteed mutable ElementAttributeData* pointer. * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::createImmutable): Creates a new ElementAttributeData tailored to fit the provided Vector. (WebCore::ElementAttributeData::ElementAttributeData): Moved constructors out-of-line, getting too complex for header files. ElementAttributeData(const Vector&) creates an immutable ElementAttributeData containing the provided attributes in an array tacked onto the end of the object. (WebCore::ElementAttributeData::~ElementAttributeData): Free the attribute vector if mutable. For immutable objects, manually invoke destructor on each Attribute object, since these won't be destroyed automatically by ~ElementAttributeData. (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): Make these const, as they should always have been- they don't affect the ElementAttributeData, only the global DOM Attr <-> ElementAttributeData mappings. (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::ensureMutableInlineStyle): Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically have mutable attribute data. There's still inlineStyle() for that, which may return null. These are only for use where you need a valid StylePropertySet*, even if there is no inline style attribute, e.g in editing code that wants to add style. (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation): (WebCore::ElementAttributeData::destroyInlineStyle): Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that contain a style attribute will have a valid inlineStyle() with that style data. This is just an interface for ~StyledElement to destroy the style object. It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to clean up properly and we don't store one in this class. (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): Sprinkle ASSERT(isMutable()). Always go straight for m_mutableAttributeVector since we know that's the storage being used. (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): Use length() and attributeItem(index) to iterate over the attributes. (WebCore::ElementAttributeData::cloneDataFrom): Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already a semi-rare occurrence. Updated code to handle both immutable and mutable source objects. This could (WebCore::ElementAttributeData::getAttributeNode): Const correctness. * dom/ElementAttributeData.h: (ElementAttributeData): Turn attribute storage into what's effectively union { OwnPtr>; Attribute[]; } The new m_isMutable bit determines which union member should be used for access. (WebCore::ElementAttributeData::create): (WebCore::ElementAttributeData::createImmutable): Added createImmutable(const Vector&) as a complement to create(). (WebCore::ElementAttributeData::setClass): (WebCore::ElementAttributeData::setIdForStyleResolution): (WebCore::ElementAttributeData::inlineStyle): (WebCore::ElementAttributeData::setAttributeStyle): Make these const, and their data member counterparts 'mutable'. An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution, m_inlineStyleDecl and m_attributeStyle. (WebCore::ElementAttributeData::reportMemoryUsage): Updated for isMutable(). (WebCore::ElementAttributeData::makeMutable): Returns a mutable clone of itself. (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::length): (WebCore::ElementAttributeData::attributeItem): Check isMutable() to know how to access attribute storage. * dom/StyledElement.cpp: (WebCore::StyledElement::style): (WebCore::StyledElement::setInlineStyleProperty): Simplify by using StyledElement::ensureInlineStyle(). (WebCore::StyledElement::classAttributeChanged): Use mutableAttributeData() if the attribute is being removed completely. In other cases, tiptoe around without causing the attribute data to go mutable. (WebCore::StyledElement::removeInlineStyleProperty): Use mutableAttributeData() if/when actually removing something. (WebCore::StyledElement::addSubresourceAttributeURLs): Const correctness. * dom/StyledElement.h: (WebCore::StyledElement::ensureInlineStyle): This now implies conversion to mutable attribute data. Used by codepaths that add/remove properties, so conversion is inevitable. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * svg/properties/SVGAnimatedPropertyMacros.h: (WebCore::SVGSynchronizableAnimatedProperty::synchronize): Use mutableAttributeData() as appropriate. * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): Const correctness. 2012-07-25 Andrew Wilson Unreviewed, rolling out r123560. http://trac.webkit.org/changeset/123560 https://bugs.webkit.org/show_bug.cgi?id=90321 Breaks chromium valgrind tests. * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::append): * html/parser/HTMLEntityParser.cpp: (WebCore::HTMLEntityParser::consumeNamedEntity): * html/parser/HTMLParserIdioms.cpp: (WebCore::stripLeadingAndTrailingHTMLSpaces): * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::script): * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::operator=): (WebCore::SegmentedString::clear): (WebCore::SegmentedString::append): (WebCore::SegmentedString::prepend): (WebCore::SegmentedString::advanceSubstring): (WebCore::SegmentedString::advance): (WebCore::SegmentedString::advanceSlowCase): (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): * platform/text/SegmentedString.h: (WebCore::SegmentedSubstring::SegmentedSubstring): (WebCore::SegmentedSubstring::clear): (WebCore::SegmentedSubstring::appendTo): (SegmentedSubstring): (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::push): (WebCore::SegmentedString::isEmpty): (WebCore::SegmentedString::lookAhead): (WebCore::SegmentedString::lookAheadIgnoringCase): (WebCore::SegmentedString::advance): (WebCore::SegmentedString::advanceAndASSERT): (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber): (SegmentedString): (WebCore::SegmentedString::advancePastNonNewline): (WebCore::SegmentedString::advanceAndUpdateLineNumber): (WebCore::SegmentedString::operator*): (WebCore::SegmentedString::operator->): (WebCore::SegmentedString::current): (WebCore::SegmentedString::equalsLiterally): (WebCore::SegmentedString::equalsIgnoringCase): (WebCore::SegmentedString::lookAheadInline): (WebCore::SegmentedString::lookAheadSlowCase): * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::consumeCharacterReference): * xml/parser/MarkupTokenizerBase.h: (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance): 2012-07-25 Konrad Piascik Web Inspector: Geolocation override https://bugs.webkit.org/show_bug.cgi?id=89365 Reviewed by Pavel Feldman. Re-added the m_page member variable for GeolocationController since it's now being used by InspectorInstrumentaiton. Added a way to override the GeolocationPosition and GeolocationError using Web Inspector. Curretnly only PositionError can be set. This will be hidden behind the experiments flag for now. Tests: inspector/geolocation-error.html inspector/geolocation-success.html inspector/geolocation-watchPosition.html * English.lproj/localizedStrings.js: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::GeolocationController): (WebCore::GeolocationController::positionChanged): * Modules/geolocation/GeolocationController.h: (GeolocationController): * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::overrideGeolocationPosition): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::setGeolocationOverride): (WebCore): (WebCore::InspectorPageAgent::clearGeolocationOverride): (WebCore::InspectorPageAgent::canOverrideGeolocation): (WebCore::InspectorPageAgent::overrideGeolocationPosition): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked): (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement): * inspector/front-end/UserAgentSupport.js: (WebInspector.UserAgentSupport.GeolocationPosition): (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput): (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride): * inspector/front-end/inspector.js: (WebInspector.doLoadedDone): 2012-07-25 Shawn Singh [chromium] Build fix for clang builds after r123628 https://bugs.webkit.org/show_bug.cgi?id=92266 Reviewed by Adrienne Walker. An un-used variable was causing build failures for clang builds after the refactoring in r123628. It is correct to simply remove this value. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): 2012-07-25 Hans Wennborg Speech JavaScript API: extract function from SpeechRecognitionResult::emma() https://bugs.webkit.org/show_bug.cgi?id=92232 Reviewed by Adam Barth. Extract code for creating emma-qualified names to a helper function. Just a refactoring; covered by the existing test. * Modules/speech/SpeechRecognitionResult.cpp: (WebCore::emmaQualifiedName): (WebCore): (WebCore::SpeechRecognitionResult::emma): 2012-07-25 Adrienne Walker [chromium] Unify compositor quadTransform/drawTransform/originTransform https://bugs.webkit.org/show_bug.cgi?id=91417 Reviewed by Kenneth Russell. drawTransform used to operate on centered layer rects. To unify quad transforms, draw transforms, and origin transforms, make draw transforms operate on content rects with the origin in the top left. This essentially eliminates the need for surface origin transforms, which will be eliminated in a future patch. Also, remove the unused CCLayerImpl::getDrawRect function. No-op refactoring. Tested by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::drawableContentRect): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleContentRect): (WebCore::calculateDrawTransformsInternal): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::markOccludedBehindLayer): (WebCore::::occluded): (WebCore::::unoccludedContentRect): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): 2012-07-25 Tommy Widenflycht MediaStream API: Update MediaStreamTrack to match the specification https://bugs.webkit.org/show_bug.cgi?id=90180 Reviewed by Adam Barth. MediaStreamTracks are now required to show the status of the underlying source, and trigger events when that status changes. Test: fast/mediastream/MediaStreamTrack.html * GNUmakefile.list.am: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::addTrack): * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::create): (WebCore::MediaStreamTrack::MediaStreamTrack): (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::setEnabled): (WebCore::MediaStreamTrack::readyState): (WebCore): (WebCore::MediaStreamTrack::sourceChangedState): (WebCore::MediaStreamTrack::stop): (WebCore::MediaStreamTrack::interfaceName): (WebCore::MediaStreamTrack::scriptExecutionContext): (WebCore::MediaStreamTrack::eventTargetData): (WebCore::MediaStreamTrack::ensureEventTargetData): * Modules/mediastream/MediaStreamTrack.h: * Modules/mediastream/MediaStreamTrack.idl: * WebCore.gypi: * dom/EventNames.h: (WebCore): * dom/EventTargetFactory.in: * platform/chromium/support/WebMediaStreamDescriptor.cpp: * platform/chromium/support/WebMediaStreamSource.cpp: (WebKit::WebMediaStreamSource::setReadyState): (WebKit): (WebKit::WebMediaStreamSource::readyState): * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h. (WebCore): (WebCore::MediaStreamSource::create): (WebCore::MediaStreamSource::MediaStreamSource): (WebCore::MediaStreamSource::setReadyState): (WebCore::MediaStreamSource::addObserver): (WebCore::MediaStreamSource::removeObserver): * platform/mediastream/MediaStreamSource.h: (Observer): (WebCore::MediaStreamSource::Observer::~Observer): (MediaStreamSource): (WebCore::MediaStreamSource::readyState): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenterChromium::queryMediaStreamSources): (WebCore::MediaStreamCenterChromium::didCreateMediaStream): 2012-07-25 Allan Sandfeld Jensen Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit. https://bugs.webkit.org/show_bug.cgi?id=91061 Reviewed by Adam Barth. The two functions are currently both returning the flooredLayoutUnit when subpixel layout is enabled. This patch changes them to return the correct fractional rounded value. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::fromFloatCeil): (FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::fromFloatRound): * rendering/LayoutTypes.h: (WebCore::roundedLayoutUnit): (WebCore::ceiledLayoutUnit): * rendering/RenderBlock.cpp: (WebCore::updatePreferredWidth): 2012-07-25 Gyuyoung Kim Add *explicit* keyword to constructors in WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=92238 Reviewed by Kentaro Hara. As a step to let *explicit* keyword add to constructors which have a parameter, *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit type conversion. Some files in platform directory can't use explicit keyword because of build breaks. No new tests. Covered by existing tests. * platform/AutodrainedPool.h: (AutodrainedPool): * platform/ContentType.h: (ContentType): * platform/ContextMenu.h: (ContextMenu): * platform/ContextMenuItem.h: (ContextMenuItem): * platform/Cursor.h: (WebCore::SharedCursor::SharedCursor): (Cursor): * platform/KURL.h: (WebCore::KURL::KURL): (KURL): * platform/KURLGooglePrivate.h: (KURLGooglePrivate): * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): * platform/Pasteboard.h: (Pasteboard): * platform/PlatformEvent.h: (WebCore::PlatformEvent::PlatformEvent): * platform/PlatformKeyboardEvent.h: (PlatformKeyboardEvent): * platform/PlatformMouseEvent.h: (PlatformMouseEvent): * platform/PlatformPasteboard.h: (PlatformPasteboard): * platform/PlatformTouchEvent.h: (PlatformTouchEvent): * platform/PlatformWheelEvent.h: (PlatformWheelEvent): * platform/RunLoop.h: (TimerBase): * platform/ScrollAnimator.h: (ScrollAnimator): * platform/ScrollAnimatorNone.h: (ScrollAnimatorNone): * platform/SharedBuffer.h: (SharedBuffer): * platform/WheelFlingPlatformGestureCurve.h: (WheelFlingPlatformGestureCurve): * platform/Widget.h: (Widget): 2012-07-25 Allan Sandfeld Jensen NodesFromRect and area-based hit-testing can not handle CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=85792 Reviewed by Eric Seidel. To support the combination of CSS transforms and rect based hit testing, we need to test against the transformed rect, instead of the original rect. This patch makes HitTestPoint store the exact transformed FloatPoint and FloatQuad, and modifies the intersection methods so that they will use a new FloatQuad based intersection when transforms requires it. Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html fast/dom/nodesFromRect/nodesFromRect-scale.html * platform/graphics/FloatQuad.cpp: (WebCore::determinant): (WebCore::rightMostCornerToVector): (WebCore::FloatQuad::intersectsRect): (WebCore::FloatQuad::isCounterclockwise): * platform/graphics/FloatQuad.h: (FloatQuad): * rendering/HitTestResult.cpp: (WebCore::HitTestPoint::HitTestPoint): (WebCore::HitTestPoint::operator=): (WebCore::HitTestPoint::move): (WebCore::HitTestPoint::intersectsRect): (WebCore::HitTestPoint::intersects): * rendering/HitTestResult.h: (HitTestPoint): (WebCore::HitTestPoint::isRectilinear): (WebCore::HitTestPoint::transformedPoint): (WebCore::HitTestPoint::transformedRect): * rendering/HitTestingTransformState.cpp: (WebCore::HitTestingTransformState::flattenWithTransform): (WebCore::HitTestingTransformState::mappedArea): (WebCore::HitTestingTransformState::boundsOfMappedArea): * rendering/HitTestingTransformState.h: (WebCore::HitTestingTransformState::create): (WebCore::HitTestingTransformState::HitTestingTransformState): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): (WebCore::RenderLayer::createLocalTransformState): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::hitTestChildLayerColumns): * rendering/RenderLayer.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): 2012-07-25 Kwang Yul Seo Add HTMLStackItem.h to project files https://bugs.webkit.org/show_bug.cgi?id=92221 Reviewed by Adam Barth. Added HTMLStackItem.h introduced in r123399 to project files. Project file changes only, no change in behavior thus no new tests. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-07-25 Sheriff Bot Unreviewed, rolling out r123606. http://trac.webkit.org/changeset/123606 https://bugs.webkit.org/show_bug.cgi?id=92247 broke Windows build of Chromium (Requested by tomhudson on #webkit). * Resources/colorSuggestionPicker.css: Removed. * Resources/colorSuggestionPicker.js: Removed. * WebCore.gyp/WebCore.gyp: 2012-07-25 Pavel Feldman Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand. https://bugs.webkit.org/show_bug.cgi?id=92253 Reviewed by Vsevolod Vlasov. Bug fix with a test and more compilation markup. Test: inspector/styles/styles-disable-then-enable-overriden-ua.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.update): (WebInspector.StylePropertyTreeElement): (WebInspector.StylePropertyTreeElement.prototype): 2012-07-25 Vsevolod Vlasov Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value. https://bugs.webkit.org/show_bug.cgi?id=92225 Reviewed by Pavel Feldman. Added tooltip with property value description on the property's valueElement. * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): 2012-07-25 Pavel Feldman https://bugs.webkit.org/show_bug.cgi?id=91931 Reviewed by Vsevolod Vlasov. - Synthetic shorthand values are now only returned for source-less styles - CSSAgents reports longhands along with the property names in getSupportedCSSProperties - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles) - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now Test: inspector/styles/styles-overriden-properties.html * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getSupportedCSSProperties): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::styleWithProperties): * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions): (WebInspector.CSSCompletions.requestCSSNameCompletions): (WebInspector.CSSCompletions.prototype._closest): (WebInspector.CSSCompletions.prototype.longhands): (WebInspector.CSSCompletions.prototype.shorthands): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration): (WebInspector.CSSStyleDeclaration.prototype.longhandProperties): (WebInspector.CSSStyleDeclaration.prototype.shorthandValue): (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty): (WebInspector.CSSProperty): (WebInspector.CSSProperty.parsePayload): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded): (WebInspector.StylePropertiesSection.prototype.update): (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.StylePropertyTreeElement.prototype): 2012-07-25 Keishi Hattori Implement ColorSuggestionPicker page popup https://bugs.webkit.org/show_bug.cgi?id=92109 Reviewed by Kent Tamura. Implements ColorSuggestionPicker page popup. This will be used in certain ports as the datalist UI for

TEXT
reconstructTheActiveFormattingElements calls this method to open a second tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it should be "1". Created a ref-counted container class, HTMLStackItem to hold the original token and the namespace URI as well as the element. Changed HTMLElementStack and HTMLFormattingElementList to use HTMLStackItem. Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token instead of the saved element. Updated test expectation for html5lib/runner-expected.txt because now resources/scripted/adoption01.dat passes. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertFormattingElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::createElementFromSavedToken): (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): * html/parser/HTMLConstructionSite.h: (HTMLConstructionSite): (WebCore::HTMLConstructionSite::currentElementRecord): * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::ElementRecord::ElementRecord): (WebCore::HTMLElementStack::ElementRecord::replaceElement): (WebCore::HTMLElementStack::pushRootNode): (WebCore::HTMLElementStack::pushHTMLHtmlElement): (WebCore::HTMLElementStack::pushRootNodeCommon): (WebCore::HTMLElementStack::pushHTMLHeadElement): (WebCore::HTMLElementStack::pushHTMLBodyElement): (WebCore::HTMLElementStack::push): (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/parser/HTMLElementStack.h: (WebCore::HTMLElementStack::ElementRecord::element): (WebCore::HTMLElementStack::ElementRecord::node): (WebCore::HTMLElementStack::ElementRecord::stackItem): (ElementRecord): (HTMLElementStack): * html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::swapTo): (WebCore::HTMLFormattingElementList::append): * html/parser/HTMLFormattingElementList.h: (WebCore::HTMLFormattingElementList::Entry::Entry): (WebCore::HTMLFormattingElementList::Entry::isMarker): (WebCore::HTMLFormattingElementList::Entry::stackItem): (WebCore::HTMLFormattingElementList::Entry::element): (WebCore::HTMLFormattingElementList::Entry::replaceElement): (WebCore::HTMLFormattingElementList::Entry::operator==): (WebCore::HTMLFormattingElementList::Entry::operator!=): (Entry): (HTMLFormattingElementList): * html/parser/HTMLStackItem.h: Added. (WebCore): (HTMLStackItem): (WebCore::HTMLStackItem::create): (WebCore::HTMLStackItem::element): (WebCore::HTMLStackItem::node): (WebCore::HTMLStackItem::token): (WebCore::HTMLStackItem::namespaceURI): (WebCore::HTMLStackItem::HTMLStackItem): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2012-07-23 Andreas Kling Report the extra memory used by immutable StylePropertySet objects. Reviewed by Anders Carlsson. Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object size on top of sizeof(T). Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array tacked onto the end of the object when m_isMutable == false. * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): * dom/MemoryInstrumentation.h: (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore::MemoryClassInfo::MemoryClassInfo): 2012-07-23 Gregg Tavares Fix WebGL texSubImage2D for cube maps https://bugs.webkit.org/show_bug.cgi?id=91927 Reviewed by Kenneth Russell. Fixes texSubImage2D so any size rectangle can be passed in for cube maps. Test: fast/canvas/webgl/tex-sub-image-cube-maps.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::copyTexImage2D): (WebCore::WebGLRenderingContext::texImage2DBase): (WebCore::WebGLRenderingContext::texSubImage2DBase): (WebCore::WebGLRenderingContext::validateTexFuncParameters): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-07-23 Sheriff Bot Unreviewed, rolling out r123387. http://trac.webkit.org/changeset/123387 https://bugs.webkit.org/show_bug.cgi?id=92036 Broke chromium win build (Requested by tony^work on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-23 Kwang Yul Seo Ref-count AtomicHTMLToken https://bugs.webkit.org/show_bug.cgi?id=91981 Reviewed by Adam Barth. Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703. No new tests - no functional changes. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertFormattingElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * html/parser/HTMLConstructionSite.h: (HTMLConstructionSite): * html/parser/HTMLToken.h: (WebCore::AtomicHTMLToken::create): (AtomicHTMLToken): (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer): (WebCore::HTMLTreeBuilder::constructTreeFromToken): (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): (WebCore::HTMLTreeBuilder::processToken): (WebCore::HTMLTreeBuilder::processDoctypeToken): (WebCore::HTMLTreeBuilder::processFakeStartTag): (WebCore::HTMLTreeBuilder::processFakeEndTag): (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): (WebCore::HTMLTreeBuilder::attributesForIsindexInput): (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): (WebCore): (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTagForInTable): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): (WebCore::HTMLTreeBuilder::processEndTagForInTableBody): (WebCore::HTMLTreeBuilder::processEndTagForInRow): (WebCore::HTMLTreeBuilder::processEndTagForInCell): (WebCore::HTMLTreeBuilder::processEndTagForInBody): (WebCore::HTMLTreeBuilder::processEndTagForInTable): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processComment): (WebCore::HTMLTreeBuilder::processCharacter): (WebCore::HTMLTreeBuilder::processEndOfFile): (WebCore::HTMLTreeBuilder::defaultForBeforeHTML): (WebCore::HTMLTreeBuilder::defaultForBeforeHead): (WebCore::HTMLTreeBuilder::defaultForInHead): (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript): (WebCore::HTMLTreeBuilder::defaultForAfterHead): (WebCore::HTMLTreeBuilder::processStartTagForInHead): (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): (WebCore::HTMLTreeBuilder::processTokenInForeignContent): (WebCore::HTMLTreeBuilder::parseError): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): * html/parser/TextDocumentParser.cpp: (WebCore::TextDocumentParser::insertFakePreElement): 2012-07-23 Scott Graham Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium https://bugs.webkit.org/show_bug.cgi?id=91667 Reviewed by Tony Chang. Using native tools instead of cygwin version improves build time performance by roughly 50% (on top of previous cl-instead-of-gcc change). Also, use - instead of / for cl flags because a layer of project generator converts them to \ otherwise, which causes the preprocessing to fail (very slowly because of the cygwin-loop with a sleep 1). No new tests. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-06-12 Jer Noble MediaController.currentTime should be kept stable during script execution. https://bugs.webkit.org/show_bug.cgi?id=88555 Reviewed by Eric Carlson. Test: media/media-controller-time-constant.html To keep MediaController.currentTime stable, add a new m_position variable and a new m_clearPositionTimer timer. Both must be mutable variables as they will be updated from within const functions. Calls to currentTime() will result in stable values until the next runloop iteration. * html/MediaController.cpp: (MediaController::MediaController): (MediaController::currentTime): (MediaController::setCurrentTime): (MediaController::clearPositionTimerFired): * html/MediaController.h: 2012-07-23 Huang Dongsung Destroy CSS decoded data more eagerly once they become dead caches. https://bugs.webkit.org/show_bug.cgi?id=91733 Reviewed by Geoffrey Garen. Internal review by Kwang Yul Seo. There are three CachedResources with decoded data: CachedImage, CachedScript and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved(). We must apply the same policy here in CachedCSSStyleSheet because priority inversion can occur. For example, we can't destroy the decoded data of CachedImages when they are referenced by CachedCSSStyleSheet as background, mask or border images. No new tests - no new testable functionality. * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): (WebCore::CachedCSSStyleSheet::didAddClient): (WebCore::CachedCSSStyleSheet::allClientsRemoved): (WebCore::CachedCSSStyleSheet::destroyDecodedData): (WebCore): (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired): * loader/cache/CachedCSSStyleSheet.h: (CachedCSSStyleSheet): 2012-07-23 Simon Fraser Part 2 of: Implement sticky positioning https://bugs.webkit.org/show_bug.cgi?id=90046 Reviewed by Ojan Vafai. Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky' value for position, returning it from getComputedStyle(), and storing it in RenderStyle. Test: fast/css/sticky/parsing-position-sticky.html * Configurations/FeatureDefines.xcconfig: * css/CSSComputedStyleDeclaration.cpp: (WebCore::getPositionOffsetValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EPosition): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2012-07-23 Stephen Chenney Crash when setting empty class name on a new element https://bugs.webkit.org/show_bug.cgi?id=92024 Reviewed by Andreas Kling. Add a check for null attributeData() when setting the className to an empty string on a newly created element. New SVG elements have null attributeData() on baseVal upon creation. Test: svg/custom/empty-className-baseVal-crash.html * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData() 2012-07-23 Shawn Singh [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design https://bugs.webkit.org/show_bug.cgi?id=80622 Reviewed by Adrienne Walker. clipRect(), usesLayerClipping(), and drawableContentRect() have been very confusing in CCLayerTreeHostCommon for a while. This patch refactors it so that (1) clipping is only done locally in calcDrawTransforms, and (2) the layer's drawableContentRect value is now meaningful value outside of calcDrawTransforms. Additionally, the layer is now always clipped to the root surface's contentBounds (which are set to the viewport bounds). This refactor not only makes calcDrawTransforms far more readable and intuitive, but this patch enables more upcoming beneficial refactors, including the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953. Tests are also significantly updated to keep up with this refactoring change. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): Removed m_usesLayerClipping and m_clipRect and associated accessors. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): Updated comment * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): Removed m_usesLayerClipping and m_clipRect and associated accessors. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): removed setClipRect code that no longer applies * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateLayerScissorRect): scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect. (WebCore::calculateSurfaceScissorRect): scissor rect is now a little bit tighter, except when filters are involved. (WebCore::layerClipsSubtree): new helper function (WebCore): (WebCore::calculateVisibleContentRect): (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsInternal): - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns, - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping. - removed the boolean return value, which was redundant with drawableContentRectOfSubtree. - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic. - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space. (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms): (WebCore::pointIsClippedBySurfaceOrClipRect): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::layerScissorRectInTargetSurface): Updated this accessor. It could be removed in the future, but not appropriate for this patch. * platform/graphics/chromium/cc/CCRenderSurface.h: 2012-07-23 Patrick Gansterer [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system. * CMakeLists.txt: 2012-07-23 Ryosuke Niwa REGRESSION(r123281): childNodes sometimes returns wrong nodes https://bugs.webkit.org/show_bug.cgi?id=92014 Reviewed by Anders Carlsson. The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()), NOT firstNode(forward, rootNode(), previous) as evident from the argument list of the function. Test: fast/dom/NodeList/childNodes-reverse-iteration.html * html/HTMLCollection.cpp: (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): 2012-07-23 Steve VanDeBogart Chrome/Skia: PDF print output does not have clickable links. https://bugs.webkit.org/show_bug.cgi?id=91171 Reviewed by Stephen White. Connect GraphicsContext::setURLForRect to Skia's new API for annotations. Printing is not generally testable. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-23 Pierre Rossi Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client https://bugs.webkit.org/show_bug.cgi?id=91006 Reviewed by Ryosuke Niwa. The rationale here is that the client doesn't need to know about the touch event handler count. needTouchEvents was already used for that purpose. Test: fast/events/touch/touch-handler-count.html * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed. (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER flag for the document if we reach a count of zero. The rationale being that hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for the same purpose. * dom/Document.h: (Document): (WebCore::Document::touchEventHandlerCount): * loader/EmptyClients.h: * page/ChromeClient.h: (ChromeClient): * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged. (WebCore::Frame::setDocument): call needsTouchEvents directly. * page/Frame.h: Ditto. (Frame): * testing/Internals.cpp: (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly for additional testing. (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-23 Caio Marcelo de Oliveira Filho [Qt] RenderThemeQtMobile highlight colors are not being used https://bugs.webkit.org/show_bug.cgi?id=92004 Reviewed by Noam Rosenthal. The issue here is that setPaletteFromPageClientIfExists() is being used as a virtual function, but it isn't, so when platformActiveSelectionBackgroundColor() runs, it doesn't pick the right palette. Besides fixing this virtual behavior, the patch changes the structure a bit, because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme to set the palette, which isn't exactly what the function name says. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor): (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor): (WebCore::RenderThemeQt::platformFocusRingColor): (WebCore::RenderThemeQt::systemColor): (WebCore::RenderThemeQt::getMediaControlForegroundColor): (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack): Use the virtual colorPalette() to get the palette. (WebCore::RenderThemeQt::colorPalette): (WebCore): Removed the code for getting the page client from here since it is used only by the QStyle variant. * platform/qt/RenderThemeQt.h: (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::colorPalette): (WebCore): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): 2012-07-23 Simon Fraser Part 1 of: Implement sticky positioning https://bugs.webkit.org/show_bug.cgi?id=90046 Reviewed by Ojan Vafai. Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially. Sort the ENABLE_CSS lines in the file. Make sure all the flags are in FEATURE_DEFINES. * Configurations/FeatureDefines.xcconfig: 2012-07-23 Sheriff Bot Unreviewed, rolling out r123339. http://trac.webkit.org/changeset/123339 https://bugs.webkit.org/show_bug.cgi?id=92006 massive media tests failure (Requested by philn on #webkit). * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): * platform/graphics/gstreamer/GStreamerVersioning.cpp: (setGstElementClassMetadata): * platform/graphics/gstreamer/GStreamerVersioning.h: 2012-07-21 Vincent Scheib webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access. https://bugs.webkit.org/show_bug.cgi?id=91892 Reviewed by Adam Barth. PointerLockElement only returned when requested from the document that owns it. Tests: http/tests/fullscreen/fullscreenelement-different-origin.html http/tests/fullscreen/fullscreenelement-same-origin.html http/tests/pointer-lock/pointerlockelement-different-origin.html http/tests/pointer-lock/pointerlockelement-same-origin.html * dom/Document.cpp: (WebCore::Document::webkitPointerLockElement): 2012-07-23 Philippe Normand [GTK][jhbuild] Switch to GStreamer 0.11 build https://bugs.webkit.org/show_bug.cgi?id=91727 Reviewed by Gustavo Noronha Silva. Add a new function to encapsulate the GStreamer API removal of GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this macro can now be replaced by calling the g_object_is_floating function. * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): * platform/graphics/gstreamer/GStreamerVersioning.cpp: (gstObjectIsFloating): * platform/graphics/gstreamer/GStreamerVersioning.h: 2012-07-23 Christophe Dumez [EFL] media/controls-styling.html is failing https://bugs.webkit.org/show_bug.cgi?id=91984 Reviewed by Eric Carlson. Make sure that the CSS properties letter-spacing, word-spacing, line-height, text-transform, text-indent, text-shadow, text-decoration and color do not affect the media element controls, that display text. No new tests. Already tested by media/controls-styling.html and media/controls-styling-strict.html * css/mediaControlsEfl.css: (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 2012-07-23 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing header files. 2012-07-23 Kent Tamura Replace some instances of shadowAncestorNode() with shadowHost() https://bugs.webkit.org/show_bug.cgi?id=91966 Reviewed by Hajime Morita. shadowAncestorNode() is deprecated. We should use shadowHost(). No new tests. This doesn't change any behavior. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): * dom/TreeScope.cpp: (WebCore::listTreeScopes): * html/HTMLSummaryElement.cpp: (WebCore::isClickableControl): * html/shadow/DetailsMarkerControl.cpp: (WebCore::DetailsMarkerControl::summaryElement): * html/shadow/MeterShadowElement.cpp: (WebCore::MeterShadowElement::meterElement): * html/shadow/ProgressShadowElement.cpp: (WebCore::ProgressShadowElement::progressElement): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::TrackLimiterElement::shadowPseudoId): (WebCore::SliderContainerElement::shadowPseudoId): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::defaultEventHandler): (WebCore::TextControlInnerTextElement::createRenderer): (WebCore::TextControlInnerTextElement::customStyleForRenderer): (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::step): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setState): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): 2012-07-23 Pavel Feldman [WK2] REGRESSION r122966: Crash when closing tab with Web Inspector open in WebKit::PageOverlay https://bugs.webkit.org/show_bug.cgi?id=91782 Reviewed by Yury Semikhatsky. hideHighlight was never called once user hovered over a node. * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::update): 2012-07-23 Peter Beverloo [Chromium] Build fix for the Windows builder following r123311 https://bugs.webkit.org/show_bug.cgi?id=91979 Unreviewed build fix. Changeset r123311 moved the TextCodecWinCE.{cpp,h} files to the Windows directory. Update Chromium's references to these files to fix the build. * WebCore.gypi: 2012-07-23 Patrick Gansterer [WIN] Remove ICU dependencies from UniscribeController https://bugs.webkit.org/show_bug.cgi?id=91921 Reviewed by Ryosuke Niwa. Replace ICU specific functions and macros with the corresponding code from WTF::Unicode. This allows us to use UniscribeController with an other Unicode implementation too. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::advance): 2012-07-23 Christophe Dumez [EFL] media/controls-styling-strict.html is failing https://bugs.webkit.org/show_bug.cgi?id=91960 Reviewed by Kenneth Rohde Christiansen. Use "display: -webkit-box;" instead of inline-block for current-time control. This is needed because inline-block behaves differently in strict mode. No new test, already tested by media/controls-styling-strict.html * css/mediaControlsEfl.css: (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): 2012-07-23 Carlos Garcia Campos Unreviewed. Fix GTK+ build with ENABLE_DATALIST_ELEMENT. Add an implementation for virtual pure methods sliderTickSize() and sliderTickOffsetFromTrackCenter() when HTML5 datalist element is enabled. * platform/gtk/RenderThemeGtk.cpp: (WebCore): (WebCore::RenderThemeGtk::sliderTickSize): (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter): * platform/gtk/RenderThemeGtk.h: 2012-07-23 Patrick Gansterer Replace getCurrentLocalTime() with GetLocalTime() in LocaleWin.cpp https://bugs.webkit.org/show_bug.cgi?id=91937 Reviewed by Ryosuke Niwa. The windows function returns the required year directly and removes one additonal dependecy on getCurrentLocalTime(). * platform/text/LocaleWin.cpp: (WebCore::LocaleWin::LocaleWin): 2012-07-23 Vsevolod Vlasov Web Inspector: Drag and drop should not be started on right mouse click. https://bugs.webkit.org/show_bug.cgi?id=91728 Reviewed by Pavel Feldman. Introduced WebInspector.installDragHandle method to control drag and drop support, checking whichg mouse button is pressed. Simplified WebInspector._elementDragStart, removed "element" parameter. Simplified tab moving support in TabbedPane, removed "mousemove" handler. Removed while loop determining which element was dragged in TimelineOverviewPane, each drag support is now installed independently. Drive-by: fixed TimelineOverviewPane window moving on resources-dividers-label-bar drang-and-drop. Drive-by: fixed CSSStyleModel compilation. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._positionResizers): (WebInspector.DataGrid.prototype._startResizerDragging): (WebInspector.DataGrid.prototype._endResizerDragging): * inspector/front-end/Drawer.js: (WebInspector.Drawer): (WebInspector.Drawer.prototype._animationDuration): (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging): (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging): * inspector/front-end/SidebarOverlay.js: (WebInspector.SidebarOverlay.prototype.set _startResizerDragging): (WebInspector.SidebarOverlay.prototype._endResizerDragging): (WebInspector.SidebarOverlay.prototype._installResizer): * inspector/front-end/Spectrum.js: * inspector/front-end/SplitView.js: (WebInspector.SplitView.prototype._startResizerDragging): (WebInspector.SplitView.prototype._endResizerDragging): (WebInspector.SplitView.prototype.installResizer): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPaneTab.prototype._createTabElement): (WebInspector.TabbedPaneTab.prototype._tabMouseDown): (WebInspector.TabbedPaneTab.prototype._startTabDragging): (WebInspector.TabbedPaneTab.prototype._endTabDragging): * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewWindow): (WebInspector.TimelineOverviewWindow.prototype._leftResizeElementDragging): (WebInspector.TimelineOverviewWindow.prototype._rightResizeElementDragging): (WebInspector.TimelineOverviewWindow.prototype._startWindowSelectorDragging): (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging): (WebInspector.TimelineOverviewWindow.prototype._startWindowDragging): (WebInspector.TimelineOverviewWindow.prototype._windowDragging): (WebInspector.TimelineOverviewWindow.prototype._endWindowDragging): (WebInspector.TimelineOverviewWindow.prototype._moveWindow): (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._startSplitterDragging): (WebInspector.TimelinePanel.prototype._endSplitterDragging): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDragEnd): * inspector/front-end/UIUtils.js: (WebInspector.installDragHandle): (WebInspector._elementDragStart): (WebInspector._elementDragEnd): * inspector/front-end/timelinePanel.css: (#timeline-overview-grid .resources-dividers-label-bar): 2012-07-23 Hayato Ito ComposedShadowTreeWalker should skip an empty insertion points. https://bugs.webkit.org/show_bug.cgi?id=91826 Reviewed by Hajime Morita. ComposedShadowTreeWalker wrongly returns 'null' if it encounters an insertion point into where no nodes are distributed. We should skip such an insertion point and continue walking using the next possible node, which might be a next sibling or a next distributed node, and resolve the next node recursively. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseLightChildren): (WebCore): (WebCore::ComposedShadowTreeWalker::traverseSiblings): (WebCore::ComposedShadowTreeWalker::traverseNode): (WebCore::ComposedShadowTreeWalker::traverseDistributedeNodes): (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint): (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree): (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeWalker): 2012-07-23 Patrick Gansterer Rename TextCodecWinCE to TextCodecWin https://bugs.webkit.org/show_bug.cgi?id=91947 Reviewed by Ryosuke Niwa. Since TextCodecWinCE is used by other (non-upstreamed) windows ports too, TextCodecWin is a better name for the implementation. Also remove the dependency on WinCE FontCache to make it more usable. * PlatformWinCE.cmake: * platform/text/TextEncodingRegistry.cpp: (WebCore::extendTextCodecMaps): * platform/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.cpp. * platform/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.h. 2012-07-22 Kentaro Hara [V8] CodeGeneratorV8.pm should support static attributes https://bugs.webkit.org/show_bug.cgi?id=91764 Reviewed by Adam Barth. CodeGeneratorJS.pm already supports static attributes. CodeGeneratorV8.pm should also support them. Tests: bindings/scripts/test/TestObj.idl bindings/scripts/test/TestSupplemental.idl * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): * bindings/scripts/test/TestObj.idl: Added defined(TESTING_V8). * bindings/scripts/test/TestSupplemental.idl: Added test cases for static attributes in supplemental IDL files. * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results. (WebCore): (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr): The generated code is wrong since CodeGeneratorJS.pm does not support static attributes for supplemental IDL files. I will fix it in a follow-up patch. (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr): (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results. (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter): (TestInterfaceV8Internal): (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter): (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::staticReadOnlyIntAttrAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::staticStringAttrAttrGetter): (WebCore::TestObjV8Internal::staticStringAttrAttrSetter): (WebCore): 2012-07-22 Gyuyoung Kim Missing *explicit* keyword in storage and workers. https://bugs.webkit.org/show_bug.cgi?id=91934 Reviewed by Kentaro Hara. Some constructors missed to use *explicit* keyword. They need to be added *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion. No new tests. Convered by existing tests. * storage/StorageAreaImpl.h: (StorageAreaImpl): * storage/StorageMap.h: (StorageMap): * storage/StorageSyncManager.h: (StorageSyncManager): * storage/StorageTask.h: (StorageTask): * storage/StorageTracker.h: (StorageTracker): * workers/SharedWorker.h: (SharedWorker): * workers/Worker.h: (Worker): * workers/WorkerLocation.h: (WebCore::WorkerLocation::WorkerLocation): * workers/WorkerMessagingProxy.h: (WorkerMessagingProxy): 2012-07-23 Kent Tamura Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively https://bugs.webkit.org/show_bug.cgi?id=91941 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * accessibility/AXObjectCache.cpp: (WebCore::createFromRenderer): * accessibility/AccessibilityProgressIndicator.cpp: * accessibility/AccessibilityProgressIndicator.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/html.css: * html/HTMLMeterElement.cpp: * html/HTMLMeterElement.h: * html/HTMLMeterElement.idl: * html/HTMLProgressElement.cpp: * html/HTMLProgressElement.h: * html/HTMLProgressElement.idl: * html/HTMLTagNames.in: * html/shadow/MeterShadowElement.cpp: * html/shadow/MeterShadowElement.h: Wrap with #if ENABLE(METER_ELEMENT). * html/shadow/ProgressShadowElement.cpp: * html/shadow/ProgressShadowElement.h: Wrap with #if ENABLE(PROGRESS_ELEMENT). * page/DOMWindow.idl: * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): (WebCore::RenderThemeEfl::edjeGroupFromFormType): (WebCore): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/gtk/RenderThemeGtk.cpp: (WebCore): * platform/gtk/RenderThemeGtk.h: (RenderThemeGtk): * platform/gtk/RenderThemeGtk2.cpp: (WebCore): * platform/gtk/RenderThemeGtk3.cpp: (WebCore): * platform/qt/RenderThemeQt.cpp: (WebCore): * platform/qt/RenderThemeQt.h: (WebCore): (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): * rendering/RenderMeter.cpp: * rendering/RenderMeter.h: * rendering/RenderObject.h: (RenderObject): * rendering/RenderProgress.cpp: * rendering/RenderProgress.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): (WebCore): * rendering/RenderTheme.h: (WebCore): (RenderTheme): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): * rendering/RenderThemeChromiumLinux.h: * rendering/RenderThemeChromiumSkia.cpp: (WebCore): * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): * rendering/RenderThemeChromiumWin.cpp: (WebCore): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore): 2012-07-22 Kent Tamura Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT https://bugs.webkit.org/show_bug.cgi?id=91928 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * html/HTMLDetailsElement.cpp: * html/HTMLDetailsElement.idl: * html/HTMLSummaryElement.cpp: * html/HTMLTagNames.in: * html/shadow/DetailsMarkerControl.cpp: * rendering/RenderDetailsMarker.cpp: * rendering/RenderDetailsMarker.h: * rendering/RenderObject.h: (RenderObject): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): 2012-07-21 Dan Bernstein SVG-as-image (constrained) intrinsic size calculation is wrong in vertical writing modes https://bugs.webkit.org/show_bug.cgi?id=91918 Reviewed by Anders Carlsson. Test: svg/as-image/svg-intrinsic-size-rectangular-vertical.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): When there is a content renderer, it returns a physical intrinsic size and aspect ratio. The code was already accounting for this by taking the reciprocal of the aspect ratio in the vertical case. Made it also transpose the size itself, turning it from physical to logical. Moved this code after setting m_intrinsicSize, since that member variable is always physical. 2012-07-21 Patrick Gansterer Cleanup TextEncoding USE(XXX_UNICODE) macros https://bugs.webkit.org/show_bug.cgi?id=91923 Reviewed by Andreas Kling. Replace PLATFORM(QT) with USE(QT4_UNICODE) and OS(WINCE) with USE(WINCE_UNICODE). This gives us more flexibility in choosing the unicode backend for a port. * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::encode): * platform/text/TextEncodingRegistry.cpp: (WebCore::extendTextCodecMaps): 2012-07-21 Patrick Gansterer Remove unnecessary ICU header includes from SimpleFontDataWin.cpp https://bugs.webkit.org/show_bug.cgi?id=91922 Reviewed by Kentaro Hara. This allows us to use SimpleFontDataWin with an other Unicode implementation too. * platform/graphics/win/SimpleFontDataWin.cpp: 2012-07-21 Kwang Yul Seo A start tag whose tag name is "html" in the "in body" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=91916 Reviewed by Eric Seidel. According to the HTML5 spec, a start tag whose tag name is "html" in the "in body" insertion mode is a parse error. Added HTMLTreeBuilder::processHtmlStartTagForInBody(AtomicHTMLToken&) to call parseError(token). Removed "FIXME: parse error" from HTMLConstructionSite::insertHTMLHtmlStartTagInBody and HTMLConstructionSite::insertHTMLBodyStartTagInBody because we already marked the call sites of these two methods with parseError(token). No behavior change because parseError(token) is just a marker. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): (WebCore): (WebCore::HTMLTreeBuilder::processStartTagForInHead): * html/parser/HTMLTreeBuilder.h: 2012-07-20 Czene Tamás double data type shoud be changed to float in ColorMatrix https://bugs.webkit.org/show_bug.cgi?id=91499 Reviewed by Nikolas Zimmermann. * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::matrix): (WebCore::saturate): (WebCore::huerotate): (WebCore::luminance): (WebCore::effectType): 2012-07-20 Stephen White [chromium] Take current transformation matrix into account when deciding on resize algorithm for drawPattern. https://bugs.webkit.org/show_bug.cgi?id=90624 Reviewed by Adrienne Walker. Since the pattern shader uses both the current transformation matrix and the pattern matrix when transforming pixels, we need to do the same when computing the resampling mode. Also removed the resampling hint code, added in r60658, since it appears to be dead (caller was removed in r76379). Covered by existing tests, such as fast/borders/border-image-scale-transform.html. * platform/graphics/skia/ImageSkia.cpp: (WebCore::computeResamplingMode): Pass in the matrix to be used for computing the destination width and height (for awesome resampling). Remove the image resampling hint code. (WebCore::paintSkBitmap): Pass in the CTM to computeResamplingMode(). (WebCore::Image::drawPattern): Concatenate the CTM and the pattern matrix, and pass that to computeResamplingMode() and TransformDimensions(). Invert the CTM's scale and apply it to the pattern transform, so their concatenation gives identity scale. * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: Remove the image resampling hint (dead code). 2012-07-20 Kwang Yul Seo Anything else in the "in table" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=91915 Reviewed by Adam Barth. According to the HTML5 spec, anything else in the "in table" insertion mode is a parse error. No behavior change because parseError(token) is just a marker. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTagForInTable): 2012-07-20 Kent Tamura Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT https://bugs.webkit.org/show_bug.cgi?id=91846 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * css/html.css: * html/HTMLDataListElement.cpp: * html/HTMLDataListElement.h: * html/HTMLDataListElement.idl: * html/HTMLInputElement.cpp: (WebCore): (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::insertedInto): (WebCore::HTMLInputElement::removedFrom): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLInputElement.idl: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): (WebCore::HTMLOptionElement::childrenChanged): (WebCore): * html/HTMLOptionElement.h: (HTMLOptionElement): * html/HTMLTagNames.in: * html/InputType.cpp: (WebCore): * html/InputType.h: (InputType): * html/RangeInputType.cpp: (WebCore): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::layout): * page/DOMWindow.idl: * platform/efl/RenderThemeEfl.cpp: (WebCore): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/qt/RenderThemeQt.cpp: (WebCore): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * rendering/RenderTheme.cpp: (WebCore): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): (WebCore::RenderThemeChromiumLinux::paintSliderTrack): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::paintSliderTrack): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderTrack): (WebCore): 2012-07-18 Ryosuke Niwa Unify HTMLCollection and DynamicNodeList https://bugs.webkit.org/show_bug.cgi?id=91335 Reviewed by Anders Carlsson. This is the grand unification of HTMLCollection and DynamicNodeList. It merges implementations of item() and length() in ChildNodeList, DynamicNodeList, and HTMLCollection. The unified implementation is based on the one used for HTMLCollection, that has been improved over the last few days; see r122660 and r122672 for examples. There are five key changes: 1. Made itemBeforeOrAfter aware of DynamicNodeList. 2. itemBeforeOrAfter and related functions take and return Node* to support ChildNodeList. 3. Renamed InvalidCollectionType to NodeListCollectionType since DynamicNodeLists need to be identified itemBeforeOrAfter. 4. Renamed itemAfter to virtualItemAfter in subclasses of HTMLCollection, and devirtualized itemAfter used in common cases to avoid performance regressions. To make this intent clear, SupportItemBefore and DoNotSupportItemBefore have been renamed to DoesNotOverrideItemAfter and OverridesItemAfter. This change also help us detect a subclass of HTMLCollection that passes in a wrong value to ItemBeforeSupportType by making forward iterations fail (hit an assertion or doesn't iterate at all) as well as backward iterations. 5. Restricted the use of elementsArrayOffset to subclasses that provide virtualItemAfter. This patch completes my effort to share code between HTMLCollection and DynamicNodeList. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): (WebCore): Removed length() and item(). (WebCore::ChildNodeList::nodeMatches): * dom/ChildNodeList.h: (ChildNodeList): * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): * dom/Document.cpp: (WebCore::Document::registerNodeListCache): (WebCore::Document::unregisterNodeListCache): * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeListCacheBase::invalidateCache): (WebCore::DynamicNodeList::length): (WebCore::DynamicNodeList::item): * dom/DynamicNodeList.h: (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes new boolean argument shouldOnlyIncludeDirectChildren indicating whether the non-child descendents should be included or not. This is necessary to identify ChildNodeList in itemBeforeOrAfter. (WebCore::DynamicNodeListCacheBase::ownerNode): Moved from DynamicNodeListCacheBase and HTMLCollectionCacheBase. (WebCore::DynamicNodeListCacheBase::document): Moved from DynamicNodeListCacheBase. (WebCore::DynamicNodeListCacheBase::rootNode): Ditto. (WebCore::DynamicNodeListCacheBase::overridesItemAfter): Renamed from supportsItemBefore and the return value has been negated. (WebCore::DynamicNodeListCacheBase::shouldOnlyIncludeDirectChildren): Added. (WebCore::DynamicNodeListCacheBase): (WebCore::DynamicNodeList::DynamicNodeList): Takes NodeListType to determine the value of shouldOnlyIncludeDirectChildren. (DynamicNodeList): (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::MicroDataItemList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): * html/CollectionType.h: * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::HTMLAllCollection): * html/HTMLCollection.cpp: (WebCore::shouldOnlyIncludeDirectChildren): (WebCore::rootTypeFromCollectionType): (WebCore::invalidationTypeExcludingIdAndNameAttributes): (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::isAcceptableElement): (WebCore::firstNode): Extracted from itemBeforeOrAfter. (WebCore::DynamicNodeListCacheBase::iterateForNextNode): Ditto. (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): Takes and returns Node*. Special case ChildNodeList since there is no need to skip any node. When "this" is a node list, call nodeMatches instead of isAcceptableElement. (WebCore::DynamicNodeListCacheBase::itemBefore): No longer takes offsetInArray since the use of elementsArrayOffset has been restricted to HTMLCollections that provides virtualItemAfter. (WebCore::DynamicNodeListCacheBase::itemAfter): Calls virtualItemAfter if necessary. Otherwise assert offsetInArray is zero since we should never be using this variable when virtualItemAfter is not provided. (WebCore::DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem): (WebCore::DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem): (WebCore::DynamicNodeListCacheBase::setItemCache): Updates m_cachedElementsArrayOffset in HTMLCollection if and only if virtualItemAfter is provided. This is safe because node lists never provide virtualItemAfter. (WebCore::DynamicNodeListCacheBase::cachedElementsArrayOffset): Similarly, returns m_cachedElementsArrayOffset if virtualItemAfter is provided. (WebCore::DynamicNodeListCacheBase::lengthCommon): (WebCore::DynamicNodeListCacheBase::itemCommon): Note that supportsItemBefore() is equivalent to !overridesItemAfter() here. (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Uses Node* through out the function. Since itemBefore never uses offsetInArray, always sets 0 for that. Note that we never call itemBefore and virtualItemAfter on the same object. (WebCore::HTMLCollection::virtualItemAfter): Added only to make the class "concrete". (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::tags): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollectionCacheBase): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::base): (HTMLCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::virtualItemAfter): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): (WebCore::HTMLNameCollection::virtualItemAfter): * html/HTMLNameCollection.h: (HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::virtualItemAfter): (WebCore::HTMLPropertiesCollection::updateNameCache): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::virtualItemAfter): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): 2012-07-20 Joshua Bell IndexedDB: Simplify backend interface classes https://bugs.webkit.org/show_bug.cgi?id=91901 Reviewed by Tony Chang. The IDBTransactionBackendInterface included several methods only used by the real implementation objects, not via the interfaces. Expose a static Impl::from(Interface) method for transaction, and migrate all of the backend-internal uses from Interface to Impl. No new tests - no functional changes. * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl): * Modules/indexeddb/IDBCursorBackendImpl.h: (WebCore): (WebCore::IDBCursorBackendImpl::create): (IDBCursorBackendImpl): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal): (WebCore::IDBDatabaseBackendImpl::objectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::setVersionInternal): (WebCore::IDBDatabaseBackendImpl::transactionStarted): (WebCore::IDBDatabaseBackendImpl::transactionFinished): (WebCore::IDBDatabaseBackendImpl::transaction): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (WebCore): (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::openCursor): (WebCore::IDBIndexBackendImpl::openKeyCursor): (WebCore::IDBIndexBackendImpl::countInternal): Drop unused transaction argument. (WebCore::IDBIndexBackendImpl::count): (WebCore::IDBIndexBackendImpl::get): (WebCore::IDBIndexBackendImpl::getKey): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): (WebCore): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteFunction): (WebCore::IDBObjectStoreBackendImpl::clear): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::deleteIndex): (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): (WebCore::IDBObjectStoreBackendImpl::openCursor): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::count): (WebCore::IDBObjectStoreBackendImpl::countInternal): Drop unused transaction argument. * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore): (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::objectStore): * Modules/indexeddb/IDBTransactionBackendImpl.h: (WebCore::IDBTransactionBackendImpl::from): (IDBTransactionBackendImpl): (WebCore::IDBTransactionBackendImpl::mode): * Modules/indexeddb/IDBTransactionBackendInterface.h: (IDBTransactionBackendInterface): 2012-07-20 Joshua Bell IndexedDB: "ASSERTION FAILED: !m_requestFinished" hit in IDBRequest::dispatchEvent https://bugs.webkit.org/show_bug.cgi?id=86911 Reviewed by Tony Chang. Clean up the IDBRequest/IDBCursor relationship and the IDBRequest lifecycle. The IDBRequest's m_cursor/setCursor() calls are renamed to m_pendingCursor/setPendingCursor() to clarify that the request will move between two states - either there's a cursor request in-flight c/o a continue() or advance() call, or the result has come in (cursor, null-for-done, or error). Since they were only ever used together, resetReadyState() is merged into setResultCursor(). The m_requestFinished flag becomes redundant and is dropped - the ASSERT reported in the bug becomes an ASSERT(m_readyState == PENDING) and m_readyState tracking is already correct. Test: storage/indexeddb/request-continue-abort.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): Unreachable code path now dead and gone. (WebCore::IDBCursor::continueFunction): Ditto. * Modules/indexeddb/IDBRequest.cpp: Most functions just add state assertions. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::setCursorDetails): (WebCore::IDBRequest::setPendingCursor): Merge with old resetReadyState(). (WebCore): (WebCore::IDBRequest::getResultCursor): Helper, since digging cursor out of IDBAny is pesky. (WebCore::IDBRequest::setResultCursor): Just moved in the file to be with its friends. (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onError): Just assertions, re-ordering, re-naming. (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::hasPendingActivity): (WebCore::IDBRequest::dispatchEvent): Simplify! (WebCore::IDBRequest::enqueueEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): 2012-07-20 Andrew Scherkus [chromium] Don't display fullscreen button for video elements not containing video https://bugs.webkit.org/show_bug.cgi?id=91811 Reviewed by Eric Carlson. Covered by media/media-document-audio-repaint.html * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::reset): 2012-07-20 Dmitry Titov [Chromium] Out of Memory is observed when a large object is passed to a Web Worker. https://bugs.webkit.org/show_bug.cgi?id=91535. Reviewed by David Levin. No new tests because of no new behavior and lack of mechanism to monitor used memory. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext): (WebCore): (WebCore::SerializedScriptValue::~SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context). 2012-07-20 David Grogan IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types https://bugs.webkit.org/show_bug.cgi?id=91414 Reviewed by Adam Barth. No new tests because no new behavior. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::metadata): No behavior change, this just needs a dummy parameter to match the modified API. * Modules/indexeddb/IDBMetadata.h: (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata): (IDBDatabaseMetadata): 2012-07-18 Gustavo Noronha Silva [Soup] Unnecessary RefPtr usage and null check https://bugs.webkit.org/show_bug.cgi?id=91636 Reviewed by Martin Robinson. Small clean up of code that is not necessary; no change in functionality. * platform/network/soup/SocketStreamHandleSoup.cpp: (WebCore::SocketStreamHandle::connected): 2012-07-20 Mark Salisbury Typo in FontCacheWin.cpp causes return value from getCachedFontData() in getLastResortFallbackFont() to be ignored https://bugs.webkit.org/show_bug.cgi?id=91506 Reviewed by Joseph Pecoraro. No new test. The "fallback fallback" code ends up creating a font, so you always get a fallback font even with this code bug. A test would be buggy, being highly platform dependent on what the "fallback fallback" font is on the particular windows machine the test runs on. * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getLastResortFallbackFont): 2012-07-20 Stephen White [chromium] Clean up scratch texture usage in Chromium's implementation of GPU-accelerated filters. https://bugs.webkit.org/show_bug.cgi?id=83370 Reviewed by Adrienne Walker. There didn't used to be a safe way to allocate a scratch texture, and hold into it beyond the lifetime of GrAutoScratchTexture. Now there is: detach(). Covered by existing tests in css3/filters. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): Use a GrAutoScratchTexture to allocate the destination texture, and detach() to detach it from the cache before placing it in an SkGrTexturePixelRef. This means we no longer need to do any lock/ unlock trickery with the TextureCacheEntry, since the refcount is enough to keep the texture away from the cache's prying hands. 2012-07-20 Stephen White [chromium] Clean up scratch texture usage in Chromium's implementation of GPU-accelerated filters. https://bugs.webkit.org/show_bug.cgi?id=83370 Reviewed by Adrienne Walker. There didn't used to be a safe way to allocate a scratch texture, and hold into it beyond the lifetime of GrAutoScratchTexture. Now there is: detach(). Covered by existing tests in css3/filters. * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): Use a GrAutoScratchTexture to allocate the destination texture, and detach() to detach it from the cache before placing it in an SkGrTexturePixelRef. This means we no longer need to do any lock/ unlock trickery with the TextureCacheEntry, since the refcount is enough to keep the texture away from the cache's prying hands. 2012-07-19 Andrew Scherkus [chromium] CSS tweaks to media controls to prevent styles from being overridden https://bugs.webkit.org/show_bug.cgi?id=91802 Reviewed by Eric Carlson. Having the buttons declared as inline caused them to not be included in the box layout, resulting in styles set outside the media element to affect the position of the buttons. In a similar vein, it was also possible to override the font-style attribute for the time display. Test: media/controls-styling-strict.html * css/mediaControlsChromium.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): 2012-07-20 Han Shen [Chromium] Compilation fails under gcc 4.7 https://bugs.webkit.org/show_bug.cgi?id=90227 Reviewed by Tony Chang. Disable warnings about c++0x compatibility in gcc newer than 4.6. * WebCore.gyp/WebCore.gyp: 2012-07-20 Vincent Scheib Unreviewed compile fix, r123247 included unintended changes to Document.cpp. See http://trac.webkit.org/changeset/123247. * dom/Document.cpp: (WebCore::Document::webkitExitPointerLock): 2012-07-20 Ryosuke Niwa REGRESSION(r122873): 15% regression on Dromaeo/dom-attr https://bugs.webkit.org/show_bug.cgi?id=91827 Reviewed by Anders Carlsson. Move shouldInvalidateNodeListCaches from Document.cpp to Node.cpp since it's only called in Node::invalidateNodeListCachesInAncestors. Test: PerformanceTests/Dromaeo/dom-attr.html. * dom/Document.cpp: (WebCore): * dom/Node.cpp: (WebCore::shouldInvalidateNodeListCachesForAttr): Extracted from shouldInvalidateNodeListCaches to unroll the loop in shouldInvalidateNodeListCaches. Apparently gcc wasn't doing the right thing. (WebCore::Document::shouldInvalidateNodeListCaches): (WebCore::Document::invalidateNodeListCaches): (WebCore::Node::invalidateNodeListCachesInAncestors): 2012-07-20 Nico Weber Fix more -Wunused-private-field violations https://bugs.webkit.org/show_bug.cgi?id=91876 Reviewed by Adam Barth. As of http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120716/061102.html the warning finds more bugs. Fix them. * html/FTPDirectoryDocument.cpp: (FTPDirectoryDocumentParser): (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource): * inspector/InspectorDOMStorageResource.h: (InspectorDOMStorageResource): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): * rendering/svg/RenderSVGTextPath.h: 2012-07-20 Adam Klein CodeGeneratorInspector.py is unnecessarily chatty https://bugs.webkit.org/show_bug.cgi?id=91758 Reviewed by Vsevolod Vlasov. The code aded in r123091 included a "print" statement for each written file. This makes for noisy build output, especially noticeable in the Chromium ninja build (where build output takes up a single line of the console). If this print statement is generally useful, it should be hidden behind a --verbose commandline option, as we do for the binding generators. * inspector/CodeGeneratorInspector.py: (SmartOutput.close): Remove print statement. 2012-07-20 Stephen White [chromium] Enable GPU-accelerated skia implementation of feDiffuseLighting, feSpecularLighting. https://bugs.webkit.org/show_bug.cgi?id=91865 Reviewed by Dirk Schulze. Translate the light parameters into the appropriate SkLightingImageFilter calls. This path is only enabled when the filters are created with the Accelerated flag set. This will be covered by tests in svg/filters/* when they are added to the virtual GPU tests. * WebCore.gypi: * platform/graphics/filters/FELighting.h: (FELighting): * platform/graphics/filters/skia/FELightingSkia.cpp: Added. (WebCore): (WebCore::FELighting::platformApplySkia): 2012-07-20 Pavel Feldman Web Inspector: disable fake workers inspection. https://bugs.webkit.org/show_bug.cgi?id=91867 Reviewed by Vsevolod Vlasov. 'Fake workers' is unreliable error-prone way to debug workers. There are a lot of frameworks supporting it. Inspector should not do that since it has a more powerful native worker inspection capabilities. Port owners should enable it in case they want to provide workers debugging. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): * inspector/InjectedScriptHost.h: (InjectedScriptHost): * inspector/InjectedScriptHost.idl: * inspector/Inspector.json: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::enable): * inspector/InspectorAgent.h: (WebCore): (InspectorAgent): * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/front-end/InjectedFakeWorker.js: Removed. * inspector/front-end/ScriptsPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane): * inspector/front-end/externs.js: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::contextDestroyed): * workers/AbstractWorker.h: (AbstractWorker): * workers/SharedWorker.cpp: (WebCore::SharedWorker::create): * workers/Worker.cpp: (WebCore::Worker::create): 2012-07-20 Sheriff Bot Unreviewed, rolling out r123182. http://trac.webkit.org/changeset/123182 https://bugs.webkit.org/show_bug.cgi?id=91863 Causing ASSERT crashes in tests accessibility/canvas.html and accessibility/canvas-accessibilitynodeobject.html (Requested by jernoble on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * accessibility/AXObjectCache.cpp: (WebCore): * accessibility/AXObjectCache.h: (AXObjectCache): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid): (WebCore): (WebCore::AccessibilityARIAGrid::create): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::create): * accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::create): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::create): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::create): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): (WebCore::AccessibilityMediaControlsContainer::create): (WebCore::AccessibilityMediaTimeline::create): (WebCore::AccessibilityMediaTimeDisplay::create): * accessibility/AccessibilityMenuList.cpp: * accessibility/AccessibilityMenuList.h: (WebCore::AccessibilityMenuList::create): * accessibility/AccessibilityNodeObject.cpp: Removed. * accessibility/AccessibilityNodeObject.h: Removed. * accessibility/AccessibilityObject.h: (AccessibilityObject): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::create): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::create): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): (WebCore): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): (WebCore::AccessibilityRenderObject::ariaRoleAttribute): (WebCore::AccessibilityRenderObject::updateAccessibilityRole): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): (WebCore::AccessibilityRenderObject::childrenChanged): (WebCore::AccessibilityRenderObject::canHaveChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::setRenderer): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::create): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore::AccessibilityTable::~AccessibilityTable): (WebCore): (WebCore::AccessibilityTable::create): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::create): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::create): 2012-07-20 Christophe Dumez [EFL] Proxy configuration should honor the no_proxy environment variable https://bugs.webkit.org/show_bug.cgi?id=91747 Reviewed by Kenneth Rohde Christiansen. Implement a custom Proxy URI Resolver for libsoup so that we can use it in EFL port. This custom proxy resolver brings support for setting exceptions so that the proxy is not used for the specified hosts. By default, the proxy is not used for localhost and 127.0.0.1. No new tests, no behavior change for layout tests. * PlatformEfl.cmake: * platform/network/soup/ProxyResolverSoup.cpp: Added. (soup_proxy_resolver_wk_init): (soupProxyResolverWkFinalize): (soupProxyResolverWkSetProperty): (soupProxyResolverWkGetProperty): (shouldBypassProxy): (idle_return_proxy_uri): (soupProxyResolverWkGetProxyURIAsync): (soupProxyResolverWkGetProxyURISync): (soup_proxy_resolver_wk_class_init): (soup_proxy_resolver_wk_interface_init): (soupProxyResolverWkNew): * platform/network/soup/ProxyResolverSoup.h: Added. 2012-07-20 Pierre Rossi ColorChooserClient should expose the element's location https://bugs.webkit.org/show_bug.cgi?id=91767 Reviewed by Kent Tamura. The rationale is that the chrome client could have an interest in placing the picker next to the element for usability reasons. No new tests as there is not much logic here: Just exposing a geometry information to WebKit. * html/ColorInputType.cpp: (WebCore::ColorInputType::elementRectRelativeToWindow): (WebCore): * html/ColorInputType.h: (ColorInputType): * platform/ColorChooserClient.h: (ColorChooserClient): 2012-07-20 Thiago Marcos P. Santos [WK2] WebIntents doesn't build if mutation observers is disabled https://bugs.webkit.org/show_bug.cgi?id=91839 Reviewed by Kenneth Rohde Christiansen. WebIntents was depending on a code protected by ENABLE(MUTATION_OBSERVERS). Now the code is also enabled by ENABLE(WEB_INTENTS). * bindings/js/JSDictionary.cpp: (WebCore): * bindings/js/JSDictionary.h: 2012-07-20 Mihnea Ovidenie [CSSRegions]Assert failure when layout positioned objects in regions https://bugs.webkit.org/show_bug.cgi?id=90792 Reviewed by Andreas Kling. Before clamping the containing block (for an out-of-flow positioned element inside a named flow) to the region, we have to test whether the region is not null, which can happen when the named flow does not have attached regions. Tests: fast/regions/positioned-vrl-in-named-flow.html fast/regions/positioned-vrl-in-parent-named-flow.html fast/regions/positioned-with-vrl-parent-in-named-flow.html * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalHeight): 2012-07-20 Stephen Chenney SVG Filter Effect sub-region not applied for some filters https://bugs.webkit.org/show_bug.cgi?id=89767 Reviewed by Dirk Schulze. The filter effect region for SVG feGaussian and feDropShadow filters was incorrectly set, failing to account for the radius of the blur. This patch fixes the problem and removes an unneccessary clip operation when the filter result is blitted into the target. That clip was clipping the shadow from webkit-shadow. Tests: svg/filters/feDropShadow-subregion.svg svg/filters/feGaussianBlur-subregion.svg * platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::determineAbsolutePaintRect): Moved the code that clips the paint rect by the filter effect subregion to come after the paint is modified by the filter radius. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Moved the code that clips the paint rect by the filter effect subregion to come after the paint is modified by the filter radius. * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::postApplyResource): Removed a clip that is unnecessary and that was incorrectly clipping drop shadows. 2012-07-19 Pavel Feldman Web Inspector: Status bar icons are misaligned by 1px to the right https://bugs.webkit.org/show_bug.cgi?id=91757 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.css: (.glyph): (.glyph.shadow): 2012-07-20 Andrei Poenaru Web Inspector: Protocol Extension: add getNamedFlowCollection command https://bugs.webkit.org/show_bug.cgi?id=91607 Reviewed by Pavel Feldman. Extended the protocol with "getNamedFlowCollection" command. This command returns the CSS Named Flows from the document. Test: inspector/styles/protocol-getNamedFlowCollection-command.html * dom/WebKitNamedFlowCollection.cpp: (WebCore::WebKitNamedFlowCollection::namedFlowsNames): (WebCore): * dom/WebKitNamedFlowCollection.h: (WebKitNamedFlowCollection): * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::getNamedFlowCollection): (WebCore): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::assertDocument): (WebCore): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync): 2012-07-20 Eugene Klyuchnikov Web Inspector: Timeline: forward compatibility for load. https://bugs.webkit.org/show_bug.cgi?id=91714 Reviewed by Pavel Feldman. Accept records of unrecognized types and render them as "unknown". Test: inspector/timeline/timeline-load-incompatible.html * English.lproj/localizedStrings.js: Added UI string. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.recordStyle): Add missing record styles at runtime. (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails): Add some common information for default case. 2012-07-20 MORITA Hajime Another unreviewed Mac build fix against r123184. * WebCore.exp.in: 2012-07-20 Mihnea Ovidenie [CSSRegions]Crash when flowing a region into itself https://bugs.webkit.org/show_bug.cgi?id=90289 Reviewed by Andreas Kling. If a region is designed to receive itself as content through a named flow, we avoid a circular dependency by not attaching the region to the desired named flow. In such occasions, the region's attached flow thread object is null and we have to check this pointer before using it in RenderRegion::styleDidChange. Test: fast/regions/flow-region-into-itself-crash.html * rendering/RenderRegion.cpp: (WebCore::RenderRegion::styleDidChange): 2012-07-20 MORITA Hajime Unreviewed Mac build fix against r123184. * WebCore.exp.in: 2012-07-17 Kinuko Yasuda If value for responseType defined as type that not supported, it should not throw an exception in XHR 2 https://bugs.webkit.org/show_bug.cgi?id=90976 Reviewed by Alexey Proskuryakov. http://www.w3.org/TR/XMLHttpRequest2/#the-responsetype-attribute The spec does not say it should throw an exception when a non-supported type is set, and other browsers do not throw it either. Test: fast/xmlhttprequest/xmlhttprequest-responsetype-set-type.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): Stop throwing an exception when non-supported type is given. 2012-07-20 Matt Falkenhagen Show or hide depending on the open attribute https://bugs.webkit.org/show_bug.cgi?id=90931 Reviewed by Kent Tamura. Test: fast/dom/HTMLDialogElement/dialog-open.html * css/html.css: Add CSS for dialog. This is copied verbatim from the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/#flow-content-1 (dialog:not([open])): (dialog): * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::close): Set open to false, to hide the dialog. (WebCore::HTMLDialogElement::show): Set open to true, to show the dialog. (WebCore): (WebCore::HTMLDialogElement::isPresentationAttribute): Make openAttr a presentation attribute, to work around bug 91058 * html/HTMLDialogElement.h: (HTMLDialogElement): * html/HTMLDialogElement.idl: 2012-07-20 Shinya Kawanaka Needs pseudo id to point the inner element of an img elemnet for styling https://bugs.webkit.org/show_bug.cgi?id=91590 Reviewed by Hajime Morita. We introduce pseudo id to point the element in UserAgentShadowDOM. This enables us to style the inner element of an img element shadow. Please see also http://trac.webkit.org/wiki/ShadowDOMForReplacedElements Test: fast/dom/shadow/shadowdom-for-image-with-pseudo-id.html * html/shadow/ImageInnerElement.cpp: (WebCore::ImageInnerElement::shadowPseudoId): (WebCore): * html/shadow/ImageInnerElement.h: (ImageInnerElement): 2012-07-20 Kent Tamura REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms https://bugs.webkit.org/show_bug.cgi?id=91804 Reviewed by Hajime Morita. The complexity of FormKeyGenerator::formKey() was O(N) where N is the number of form elements with an identical action URL, and formKey() is called for every form. So, it's O(N^2). A page in www.reddit.com contains hundreds of form elements with action="#". So FormController:: formElementsState() took a few seconds on a slow machine. In order to avoid O(N^2) operation, storing a map from form signatures to next index numbers, instead of storing existing formKey strings. No new tests. Just a performance improvement. * html/FormController.cpp: (FormKeyGenerator): Remove m_existingKeys. Add a map from a form signature string to the next index number. (WebCore::formSignature): Returns a signature string for a form, without an index number. This is like "actionURL [name1 name2 ]" (WebCore::FormKeyGenerator::formKey): Creates a formKey string by concatenating a formSignature and #n. N is obtained from m_formSignatureToNextIndexMap in O(1). (WebCore::FormKeyGenerator::willDeleteForm): Remove the code for m_existingKeys. 2012-07-20 Keishi Hattori Fix crash in WebCore::HTMLInputElement::dataList https://bugs.webkit.org/show_bug.cgi?id=91818 Reviewed by Kent Tamura. Fix crash that occurs when setting slider appearance on a regular node. Test: fast/forms/range/slider-appearance-crash.html * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintSliderTicks): Check if node is an input element. 2012-07-20 Kent Tamura [Chromium] Fix an assertion failure in TextFieldDecorationElement::hostInput() https://bugs.webkit.org/show_bug.cgi?id=91824 Reviewed by Hajime Morita. No new tests. This code is used only in Chromium browser. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::hostInput): Use shadowHost(), and allow to return 0. (WebCore::TextFieldDecorationElement::defaultEventHandler): Check 0. 2012-07-19 Simon Hausmann [Qt] Compile WebCore without QtWidgets https://bugs.webkit.org/show_bug.cgi?id=91819 Reviewed by Kenneth Rohde Christiansen. * WebCore.pri: QT += opengl is not needed for Qt 5, given that QtGui has OpenGL support built in with the QOpenGL* classes. 2012-07-19 MORITA Hajime [Refactoring] Replace Node's Document pointer with a TreeScope pointer https://bugs.webkit.org/show_bug.cgi?id=59816 Reviewed by Ryosuke Niwa. Before this change, Node::treeScope() fetches the TreeScope object from ElementRareData. This approach has several shortcomings: - rareData() call is slow due to a hashtable lookup. - In shadow tree, each node has its tree scope in ElementRareData, that means the rare-data is no longer rare in that case. This change gets rid of ElementRareData::m_treeScope by replacing Node::m_document with Node::m_treeScope. And retrieves the document of Node through m_treeScope. Note that Node::document() is a hot function and naive replacemennt of m_document with m_treeScope can hurt the speed. This change employs some tricks to address it. - This change introduces Node::InShadowTree flag, if the flag is off, that means m_treeScope is actually a document an can be returned as the result. this eliminates an extract dereference. - Node::m_treeScope can be null. But we don't want to issue any extra conditional statement. So this change represents a null TreeScope as TreeScope::nullInstance(), which saves one conditional statement. With these changes, the Node::document() slowdown is minimized to unnoticeable size. No new tests. Covered by existing tests. * dom/Document.cpp: Took care of connectio betwen TreeScope. (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::suggestedMIMEType): * dom/Document.h: (WebCore::Node::treeScope): Now just return m_treeScope, taking care of nullInstance() case. (WebCore): (WebCore::Node::setTreeScope): Now just sets m_treeScope. (WebCore::Node::documentInternal): Extracted from document() to have ASSERT-free version. (WebCore::Node::document): Re-implemented over treeScope() and the flag. (WebCore::Node::isDocumentNode): Re-implemented using treeScope() (WebCore::Node::Node): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::reportMemoryUsage): * dom/Node.h: (Node): (WebCore::Node::inDocument): (WebCore::Node::isInShadowTree): Rewrote to use InShadowTree flag. * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): Eliminated m_treeScope. (NodeRareData): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::ShadowRoot): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore): (WebCore::TreeScope::setParentTreeScope): Added. (WebCore::TreeScope::isDocumentScope): Added. (WebCore::TreeScope::nullInstance): Added. * dom/TreeScope.h: Added m_parentTreeScope. (WebCore): (WebCore::TreeScope::rootDocument): Added. (TreeScope): * dom/TreeScopeAdopter.cpp: No longer calls setDocument() (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveNodeToNewDocument): * editing/MoveSelectionCommand.cpp: Includes Document.h to find inlined Node functions * editing/RemoveNodeCommand.cpp: Includes Document.h to find inlined Node functions * editing/RemoveNodePreservingChildrenCommand.cpp: Includes Document.h to find inlined Node functions * inspector/PageConsoleAgent.cpp: Includes Document.h to find inlined Node functions 2012-07-19 David Hyatt SVG not properly respecting max-width. https://bugs.webkit.org/show_bug.cgi?id=91474 My previous checkin for 91474 accidentally inverted width and height in the division case for the computation of height. When I fixed this inversion, I discovered that elements are in fact also broken with max-width handling, and that furthermore, trying to apply the same max-width fix by calling RenderBox::computeReplacedLogicalWidth/Height failed because those methods call intrinsicLogicalWidth()/Height(). Becuase m_intrinsicSize is out-of-date and does not reflect the values we just obtained from the contentRenderer, we use the default 300x150 values for object and fail to render. In order to both fix SVG/ with max-width constraints and to keep rendering correctly even when there are no max-width constraints, I was forced to update the m_intrinsicSize immediately in order to make sure that the RenderBox methods returned the right values when computing the width/height constrained to max/min-width/height values. Reviewed by Dan Bernstein. Added two new tests in svg/as-image. One test covers non-rectangular images to test for the inversion mistake I made. The second test applies a max-width to and shows that we have never gotten this right before. An existing test in svg/as-image/ already covers basic use (and tests that the intrinsic size of 300x150 is not used when an explicit non-percentage size is specified on the SVG itself). * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Add a check to update m_intrinsicSize when we know it should apply, so that the calls to check against min/max-width fetch this correct size. * rendering/RenderReplaced.h: (RenderReplaced): Make m_intrinsicSize mutable because of the mutation that occurs during the method above. It may be that we should re-evaluate whether all of these methods should be const, but this would impact RenderBox methods as well, so I chose to hold off going down that rabbit hole. 2012-07-19 Dominic Mazzoni AX: Need AccessibilityObjects for nodes without renderers in canvas subtree https://bugs.webkit.org/show_bug.cgi?id=87899 Reviewed by Chris Fleizach. Refactors AccessibilityRenderObject so that it inherits from a new class, AccessibilityNodeObject, that can be constructed from a Node without a renderer. Modifies AXObjectCache so that it automatically creates an AccessibilityNodeObject for elements in a canvas subtree but not otherwise. A new layout test verifies that this correctly exposes an accessibility tree with appropriate roles for elements in a canvas subtree. This patch does not try to complete the implementation of AccessibilityNodeObject. Most AX methods are still unimplemented and need to be migrated from AccessibilityRenderObject to AccessibilityNodeObject in a future patch. This patch also doesn't change anything outside of WebCore/accessibility, so the rest of WebCore only calls AXObjectCache when there are changes to a RenderObject, not to a Node. Accessible notifications on nodes without renderers need to be implemented in a future patch. Test: accessibility/canvas-accessibilitynodeobject.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::get): (WebCore): (WebCore::createFromNode): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::remove): * accessibility/AccessibilityARIAGrid.cpp: (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid): (WebCore): (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid): (WebCore::AccessibilityARIAGrid::init): (WebCore::AccessibilityARIAGrid::create): * accessibility/AccessibilityARIAGrid.h: (AccessibilityARIAGrid): * accessibility/AccessibilityARIAGridCell.cpp: (WebCore::AccessibilityARIAGridCell::create): * accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::create): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityList.cpp: (WebCore::AccessibilityList::create): * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::create): * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::create): (WebCore::AccessibilityMediaControlsContainer::create): (WebCore::AccessibilityMediaTimeline::create): (WebCore::AccessibilityMediaTimeDisplay::create): * accessibility/AccessibilityMenuList.cpp: (WebCore::AccessibilityMenuList::create): (WebCore): * accessibility/AccessibilityMenuList.h: (AccessibilityMenuList): * accessibility/AccessibilityNodeObject.cpp: Added. (WebCore): (WebCore::AccessibilityNodeObject::AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::init): (WebCore::AccessibilityNodeObject::create): (WebCore::AccessibilityNodeObject::detach): (WebCore::AccessibilityNodeObject::childrenChanged): (WebCore::AccessibilityNodeObject::updateAccessibilityRole): (WebCore::AccessibilityNodeObject::firstChild): (WebCore::AccessibilityNodeObject::lastChild): (WebCore::AccessibilityNodeObject::previousSibling): (WebCore::AccessibilityNodeObject::nextSibling): (WebCore::AccessibilityNodeObject::parentObjectIfExists): (WebCore::AccessibilityNodeObject::parentObject): (WebCore::AccessibilityNodeObject::elementRect): (WebCore::AccessibilityNodeObject::setNode): (WebCore::AccessibilityNodeObject::document): (WebCore::AccessibilityNodeObject::determineAccessibilityRole): (WebCore::AccessibilityNodeObject::addChildren): (WebCore::AccessibilityNodeObject::accessibilityIsIgnored): (WebCore::AccessibilityNodeObject::canSetFocusAttribute): (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute): (WebCore::AccessibilityNodeObject::ariaRoleAttribute): (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent): * accessibility/AccessibilityNodeObject.h: Added. (WebCore): (AccessibilityNodeObject): (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject): (WebCore::AccessibilityNodeObject::node): (WebCore::AccessibilityNodeObject::isDetached): (WebCore::toAccessibilityNodeObject): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isAccessibilityNodeObject): * accessibility/AccessibilityProgressIndicator.cpp: (WebCore::AccessibilityProgressIndicator::create): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::AccessibilityRenderObject): (WebCore::AccessibilityRenderObject::init): (WebCore): (WebCore::AccessibilityRenderObject::create): (WebCore::AccessibilityRenderObject::detach): (WebCore::AccessibilityRenderObject::setRenderer): (WebCore::AccessibilityRenderObject::canHaveChildren): (WebCore::AccessibilityRenderObject::addCanvasChildren): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::create): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore): (WebCore::AccessibilityTable::~AccessibilityTable): (WebCore::AccessibilityTable::init): (WebCore::AccessibilityTable::create): * accessibility/AccessibilityTable.h: (AccessibilityTable): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::create): * accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::create): 2012-07-19 Dan Bernstein The ATSUI-based complex text code is unused https://bugs.webkit.org/show_bug.cgi?id=91816 Reviewed by Sam Weinig. * WebCore.gypi: Removed references to the files deleted in this change. * WebCore.xcodeproj/project.pbxproj: Ditto. * platform/graphics/FontCache.h: (FontCache): Replaced USE(CORE_TEXT) with PLATFORM(MAC) || PLATFORM(CHROMIUM) && OS(DARWIN). * platform/graphics/SimpleFontData.h: (SimpleFontData): Removed USE(ATSUI)-only code, replaced USE(CORE_TEXT) with (PLATFORM(CHROMIUM) && OS(DARWIN)). * platform/graphics/mac/ComplexTextController.cpp: Removed USE(ATSUI)-only code. Moved collectComplexTextRunsForCharacters() and the ComplexTextRun constructor out of this file. * platform/graphics/mac/ComplexTextController.h: Removed USE(ATSUI)-only code and removed #if USE(CORE_TEXT) because anyone including this header is using Core Text. * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Removed. * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved from ComplexTextController.cpp into this file and merged with createTextRunFromFontDataCoreText(). (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved from ComplexTextController.cpp into this file and merged with collectComplexTextRunsForCharactersCoreText(). * platform/graphics/mac/SimpleFontDataATSUI.mm: Removed. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Remove USE(ATSUI)-only code. (WebCore::SimpleFontData::platformDestroy): Ditto. * platform/text/mac/ShapeArabic.c: Removed. * platform/text/mac/ShapeArabic.h: Removed. 2012-07-19 Kent Tamura Introduce Node::shadowHost() https://bugs.webkit.org/show_bug.cgi?id=91814 Reviewed by Hajime Morita. Introduce Node::shadowHost(), which return the host element, or 0. Node::shadowAncestorNode() is used to obtain a shadow host. However it is confusing because it returns 'this' if this is not in a shadow tree. Replaces one callsite of shadowAncestorNode() with shadowHost(). No behavior change. * dom/Node.cpp: (WebCore::Node::shadowHost): Added. * dom/Node.h: (Node): Declare shadowHost(), and add a comment to shadowAncestorNode(). * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::hostInput): Replace shadowAncestorNode() with shaodwHost(). 2012-07-19 Kent Tamura Form state restore: Need to identify a form by its content https://bugs.webkit.org/show_bug.cgi?id=91209 Reviewed by Hajime Morita. Add names of the first two controls of a form to its formKey string. By this change, we can correctly restore states to reordered forms like webkit.org/b/91209#c0. Tests: Added test cases to fast/forms/state-restore-per-form.html. * html/FormController.cpp: (WebCore::recordFormStructure): Append at most two name attribute values. (WebCore::createKey): Insert a string built by recordFromStructure(). (WebCore::formStateSignature): Bump the version. 2012-07-19 Wei James enable Web Audio for chromium android port https://bugs.webkit.org/show_bug.cgi?id=89428 Reviewed by Kenneth Russell. * WebCore.gyp/WebCore.gyp: * platform/audio/FFTFrameStub.cpp: (WebCore::FFTFrame::doFFT): 2012-07-19 David Hyatt SVG images broken when max-width specified. https://bugs.webkit.org/show_bug.cgi?id=91474 SVG images were computing intrinsic dimensions when width and height were auto that did not respect min-max width/height. Normal images had code that applied these constraints properly. Looking at the code before the check-in that broke things, these constraints used to be applied to all images regardless of type via calcAspectRatioLogicalWidth/Height. This patch leaves the new function structure in place but converts the code to be more like it was prior to the introduction of the regression. Instead of raw intrinsic sizes being used in the SVG case, now all image types get the intrinsic sizes constrained when doing width/height computations. Reviewed by Dan Bernstein. Test: svg/as-image/svg-intrinsic-size.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): Rename computeIntrinsicRatioInformationForRenderBox to computeAspectRatioInformationForRenderBox. Also rename the intrinsicSize reference to constrainedSize to reflect the fact that the size is not necessarily the intrinsic size any longer but instead a size where both axes have been constrained based off the max-min values of the opposite axes. Move the constraining code out of RenderReplaced::computeIntrinsicRatioInformation into this function so that the SVG code path appies the constraints as well. The movement of this code is what fixes the bug. (WebCore::RenderReplaced::computeIntrinsicRatioInformation): Changed to remove the code that constrains the returned size, since it is shifting to computeAspectRatioInformationForRenderBox instead. (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/RenderReplaced.h: (RenderReplaced): Patch the name of the reference passed in to computeReplacedLogicalWidth/Height to be constrainedSize instead of intrinsicSize, so that it is more obvious that the returned result is not just the intrinsic size of the image. 2012-07-19 Dmitry Titov Unreviewed, reverting http://trac.webkit.org/changeset/123149. It broke an IDB test on Chromium page cycler. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore): * bindings/v8/SerializedScriptValue.h: * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): 2012-07-19 Julien Chaffraix [CSS2.1] Anonymous tables should be inline/block-level based off their parent https://bugs.webkit.org/show_bug.cgi?id=15365 Reviewed by Abhishek Arya. This change makes us match bullet 3 "Generate missing parents" of section 17.2.1 http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes": "If a table is contained by an inline element, then the anonymous tables should be inline-tables." Patch based on an earlier change by Kang-Hao (Kenny) Lu . Tests: css2.1/20110323/inline-table-002b.html fast/dynamic/insert-before-table-part-in-continuation.html fast/table/inline-table-in-continuation.html fast/table/inline-table-with-caption.html * rendering/RenderTable.cpp: (WebCore::RenderTable::createAnonymousWithParentRenderer): Added a check to determine if we should be inline or block based on our parent to match CSS 2.1. * rendering/RenderInline.cpp: (WebCore::RenderInline::addChildIgnoringContinuation): Changed the child addition logic to not wrap a table part in an inline context. This change works as intended as we will call RenderObject::addChild which will create an anonymous inline table that will be added under |this| instead of the table part. As the table is inline, it doesn't need to be wrapped when we recursively call RenderInline::addChild. 2012-07-19 Chris Fleizach WebKit should pass element value as the default description for web views https://bugs.webkit.org/show_bug.cgi?id=91763 Reviewed by Anders Carlsson. Update the logic for determining the description for the AXWebArea to include the document's title. Test: platform/mac/accessibility/document-title-used-for-description.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::webAreaAccessibilityDescription): Move web area description handling into a separate method. (WebCore::AccessibilityRenderObject::accessibilityDescription): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): 2012-07-19 Zeev Lieber <zlieber@chromium.org> [Chromium] Textures drawn during occlusion are incorrectly re-used when unoccluded. https://bugs.webkit.org/show_bug.cgi?id=91537 Reviewed by Adrienne Walker. Detecting if any external occlusion occurs when drawing a texture. If external occlusion happens, the texture is marked as "incomplete" in LayerRendererChromium, and is not being considered for re-use. Minor refactoring of CCQuadCuller - extracted interface (CCQuadSink) and united append() and appendSurface() methods. Added unit tests to verify this fix; also added test to try clipping instead of occlusion. * platform/graphics/chromium/LayerRendererChromium.cpp: (LayerRendererChromium::CachedTexture): (WebCore::LayerRendererChromium::CachedTexture::create): (WebCore::LayerRendererChromium::CachedTexture::~CachedTexture): (WebCore::LayerRendererChromium::CachedTexture::isComplete): (WebCore::LayerRendererChromium::CachedTexture::setIsComplete): (WebCore::LayerRendererChromium::CachedTexture::CachedTexture): (WebCore): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: (CCIOSurfaceLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendDebugBorderQuad): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): (WebCore::CCLayerImpl::appendQuads): (CCLayerImpl): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::unoccludedContentRect): (WebCore::::unoccludedContributingSurfaceContentRect): (WebCore): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::CCQuadCuller): (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (WebCore): (CCQuadCuller): (WebCore::CCQuadCuller::~CCQuadCuller): (WebCore::CCQuadCuller::hasExternalOcclusion): * platform/graphics/chromium/cc/CCQuadSink.h: (WebKit): (WebCore): (CCQuadSink): (WebCore::CCQuadSink::~CCQuadSink): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::CCRenderPass): (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::hasExternalOcclusion): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::CCRenderSurface): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (WebCore::CCRenderSurface::setHasExternalOcclusion): (WebCore::CCRenderSurface::hasExternalOcclusion): (CCRenderSurface): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-07-19 Simon Fraser <simon.fraser@apple.com> Keep overlap testing on for descendants of an animating element https://bugs.webkit.org/show_bug.cgi?id=91787 Reviewed by Beth Dakin. RenderLayerCompositor::computeCompositingRequirements() would turn off overlap testing for descendants of a layer that has a 3D transform, or has an animating transform. This could cause compositing changes inside an animating element when transitions start and stop, which is undesirable. Instead, we can keep overlap testing on for descendants of that animating element, but we have to turn it off for layers later in z-order. Also enhance the "IndirectCompositingReason" flags so that in the compositing log output, we can distinguish between layers that were composited as a result of overlap testing from those compositing for stacking reasons. Test: compositing/layer-creation/animation-overlap-with-children.html * rendering/RenderLayer.h: New IndirectCompositingReason value to distinguish overlap from stacking. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): Use an IndirectCompositingReason enum rather than a bool to track whether the layer starts as composited. Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer())) check that turned off overlap testing for descendants of this layer. Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers. Turn overlap testing off for layers later in the z-order. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into account. (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output. 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-19 Simon Fraser <simon.fraser@apple.com> Keep overlap testing on for descendants of an animating element https://bugs.webkit.org/show_bug.cgi?id=91787 Reviewed by Beth Dakin. RenderLayerCompositor::computeCompositingRequirements() would turn off overlap testing for descendants of a layer that has a 3D transform, or has an animating transform. This could cause compositing changes inside an animating element when transitions start and stop, which is undesirable. Instead, we can keep overlap testing on for descendants of that animating element, but we have to turn it off for layers later in z-order. Also enhance the "IndirectCompositingReason" flags so that in the compositing log output, we can distinguish between layers that were composited as a result of overlap testing from those compositing for stacking reasons. Test: compositing/layer-creation/animation-overlap-with-children.html * rendering/RenderLayer.h: New IndirectCompositingReason value to distinguish overlap from stacking. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): Use an IndirectCompositingReason enum rather than a bool to track whether the layer starts as composited. Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer())) check that turned off overlap testing for descendants of this layer. Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers. Turn overlap testing off for layers later in the z-order. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into account. (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output. 2012-07-19 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Enable CSS shaders in Qt (software mode) https://bugs.webkit.org/show_bug.cgi?id=85140 Reviewed by Simon Hausmann. Added missing files to the Qt build. No new tests, WebGL is still disabled by default in the bots. * Target.pri: 2012-07-17 Dmitry Titov <dimich@chromium.org> [Chromium] Out of Memory is observed when a large object is passed to a Web Worker. https://bugs.webkit.org/show_bug.cgi?id=91535. Reviewed by Dave Levin. No new tests because of no new behavior and lack of mechanism to monitor used memory. * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext): (WebCore): (WebCore::SerializedScriptValue::~SerializedScriptValue): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context). 2012-07-19 Dan Bernstein <mitz@apple.com> In flipped blocks writing modes, no flipping occurs when mapping RenderText’s local coordinates to absolute https://bugs.webkit.org/show_bug.cgi?id=91780 Reviewed by Anders Carlsson. Test: fast/writing-mode/flipped-blocks-text-map-local-to-container.html When RenderObject::mapLocalToContainer() was called on a RenderText with ApplyContainerFlip, it would not flip (if the container was not a box) but it would always pass DoNotApplyContainerFlip when recurring to the parent. This meant that no one applied the flip. * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): Made the setting of applyContainerFlip to false unconditional on the container actually being flipped. * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Rather than always passing DoNotApplyContainerFlip when recurring to the parent, changed this function to pass through the value of applyContainerFlip it was called with, unless it applied the flip itself. 2012-07-19 Erik Arvidsson <arv@chromium.org> Window top should not be replaceable https://bugs.webkit.org/show_bug.cgi?id=91755 Reviewed by Adam Barth. Window top is readonly and unforgable and should not be replaceable. http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-window-object This change brings JSC inline with all other browsers. No new tests. Modified existing tests. * page/DOMWindow.idl: 2012-07-19 Max Feil <mfeil@rim.com> [BlackBerry] Only maintain the hole punch rect while html5 video is being renderered https://bugs.webkit.org/show_bug.cgi?id=91689 Reviewed by Antonio Gomes. The hole punch rectangle needs to be present if and only if html5 video content is being rendered. Otherwise unwanted content may show through from behind the browser tab's window. I am not adding any new tests because the difficulty of testing for this case outweighs the benefit. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::updateStates): 2012-07-19 Bem Jones-Bey <bjonesbe@adobe.com> [CSS Exclusions] - Code cleanup: make shape parsing use isComma() instead of manual checks https://bugs.webkit.org/show_bug.cgi?id=91760 Reviewed by Eric Seidel. Remove code duplication by making the rectangle, circle, and ellipse methods use isComma() to detect a comma. No new tests needed: no new functionality added. * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): 2012-07-19 Raymond Toy <rtoy@google.com> Limit maximum delay of DelayNode. https://bugs.webkit.org/show_bug.cgi?id=91675 Reviewed by Kenneth Russell. Clip the maximum delay of a DelayNode to a reasonable maximum. Test: webaudio/delaynode-maxdelaylimit.html * Modules/webaudio/DelayNode.cpp: (WebCore): Add maximumAllowedDelayTime. (WebCore::DelayNode::DelayNode): Clip max delay. 2012-07-14 Robert Hogan <robert@webkit.org> CSS 2.1 failure: text-indent-intrinsic-003 fails https://bugs.webkit.org/show_bug.cgi?id=80576 Reviewed by Eric Seidel. Negative values of text-indent should be distributed across inline children until used up. This fixes text-indent-intrinsic-003 and text-indent-intrinsic-004. Tests: css2.1/20110323/text-indent-intrinsic-001.htm css2.1/20110323/text-indent-intrinsic-002.htm css2.1/20110323/text-indent-intrinsic-003.htm css2.1/20110323/text-indent-intrinsic-004.htm * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): If text-indent is negative, keep applying it to inline children in the first formatted line until it's reduced to zero. This isn't a consideration when text-indent is a positive value. 2012-07-19 Douglas Stockwell <dstockwell@google.com> Crash in WebCore::StyleResolver::collectMatchingRulesForList https://bugs.webkit.org/show_bug.cgi?id=90803 Reviewed by Andreas Kling. When a ProcessingInstruction was removed from the document the owner was removed, but the style resolver was not guaranteed to be updated. It was then possible for an inconsistent version of the stylesheet to remain visible in the DOM. Fixed by removing an invalid condition and mirroring the logic from StyleElement. Test: fast/css/xml-stylesheet-removed.xhtml * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::removedFrom): Mirror the logic from StyleElement -- always update the style resolver. 2012-07-19 Bem Jones-Bey <bjonesbe@adobe.com> Shape-inside / shape-outside should support percent-based measurements https://bugs.webkit.org/show_bug.cgi?id=90311 Reviewed by Andreas Kling. Update the CSS Parser to accept percentage length values for exclusion shapes. Testing added to LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html * css/CSSParser.cpp: (WebCore::CSSParser::parseExclusionShapeRectangle): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): (WebCore::CSSParser::parseExclusionShapePolygon): 2012-07-19 Tony Chang <tony@chromium.org> Unreviewed, rolling out r123117. http://trac.webkit.org/changeset/123117 https://bugs.webkit.org/show_bug.cgi?id=91667 Breaks chromium-win compile. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-19 James Simonsen <simonjam@chromium.org> Regression(120096): Protect the element used by ImageLoader until the end of notifyFinished(). https://bugs.webkit.org/show_bug.cgi?id=90471 Reviewed by Brady Eidson. Test: http/tests/security/video-poster-cross-origin-crash.html * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): Hang on to the element until we're done. * loader/ImageLoader.cpp: (WebCore::ImageLoader::setImage): No behavior change. (WebCore): (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Split off from old setImage, minus calling updatedHasPendingLoadEvent(). (WebCore::ImageLoader::notifyFinished): Invoke updatedHasPendingLoadEvent when done with cross origin errors. * loader/ImageLoader.h: (ImageLoader): 2012-07-19 Scott Graham <scottmg@chromium.org> Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium https://bugs.webkit.org/show_bug.cgi?id=91667 Reviewed by Kentaro Hara. Using native tools instead of cygwin version improves build time performance by roughly 50% (on top of previous cl-instead-of-gcc change). No new tests. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/rule_bison.py: * bindings/scripts/preprocessor.pm: (applyPreprocessor): * make-hash-tools.pl: 2012-07-19 Andrey Kosyakov <caseq@chromium.org> Web Inspector: CPU bars are not cleared along with the rest of the timeline panel https://bugs.webkit.org/show_bug.cgi?id=91753 Reviewed by Pavel Feldman. - remove early bail-outs in refreshMainThreadBars; let it run to clear bars for the non-existent / invisible events; * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._refreshMainThreadBars): 2012-07-19 Joshua Bell <jsbell@chromium.org> IndexedDB: Throw native TypeErrors per spec https://bugs.webkit.org/show_bug.cgi?id=91679 Reviewed by Kentaro Hara. Per the IDB spec, the advance(), openCursor(), openKeyCursor() and transaction() methods supposed to throw true native JavaScript TypeError objects as exceptions rather than DOMException objects. Implement this by adding a special DOMException code that is tested for in the binding layer. Tests: storage/indexeddb/cursor-advance.html storage/indexeddb/index-basics.html storage/indexeddb/index-basics-workers.html storage/indexeddb/objectstore-cursor.html storage/indexeddb/transaction-basics.html * Modules/indexeddb/IDBCursor.cpp: Use the new DOMException code. (WebCore::IDBCursor::advance): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBDatabase.cpp: Ditto. (WebCore::IDBDatabase::setVersion): * Modules/indexeddb/IDBDatabaseException.cpp: Remove temporary cruft/mark as legacy. (WebCore): * Modules/indexeddb/IDBDatabaseException.h: Ditto. * Modules/indexeddb/IDBDatabaseException.idl: Ditto. * Modules/indexeddb/IDBFactory.cpp: Use the new DOMException code. (WebCore::IDBFactory::open): (WebCore::IDBFactory::deleteDatabase): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Use the new DOMException code. * Modules/indexeddb/IDBTransaction.cpp: Use the new DOMException code. (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): Intercept new DOMException code, throw native TypeError. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): Ditto. * dom/ExceptionCode.h: Add new DOMException code. 2012-07-19 Joshua Bell <jsbell@chromium.org> Roll out r121610 and r122487 which may have been causing flaky crashes https://bugs.webkit.org/show_bug.cgi?id=91637 Reviewed by Kentaro Hara. Flaky crashes started in random tests following r121610. It's not clear that r121610 is to blame, but we'd like to prove or disprove it. If this doesn't resolve the crashes, this patch should be rolled out. * WebCore.gypi: * bindings/v8/NPObjectWrapper.cpp: Added. (WebCore): (NPProxyObject): (WebCore::NPObjectWrapper::NPObjectWrapper): (WebCore::NPObjectWrapper::create): (WebCore::NPObjectWrapper::clear): (WebCore::NPObjectWrapper::getWrapper): (WebCore::NPObjectWrapper::getUnderlyingNPObject): (WebCore::NPObjectWrapper::getObjectForCall): (WebCore::NPObjectWrapper::NPAllocate): (WebCore::NPObjectWrapper::NPDeallocate): (WebCore::NPObjectWrapper::NPPInvalidate): (WebCore::NPObjectWrapper::NPHasMethod): (WebCore::NPObjectWrapper::NPInvoke): (WebCore::NPObjectWrapper::NPInvokeDefault): (WebCore::NPObjectWrapper::NPHasProperty): (WebCore::NPObjectWrapper::NPGetProperty): (WebCore::NPObjectWrapper::NPSetProperty): (WebCore::NPObjectWrapper::NPRemoveProperty): (WebCore::NPObjectWrapper::NPNEnumerate): (WebCore::NPObjectWrapper::NPNConstruct): (WebCore::NPObjectWrapper::NPInvokePrivate): * bindings/v8/NPObjectWrapper.h: Added. (WebCore): (NPObjectWrapper): * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (_NPN_Invoke): (_NPN_InvokeDefault): (_NPN_EvaluateHelper): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bindings/v8/NPV8Object.h: (WebCore): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::clearScriptObjects): (WebCore::ScriptController::windowScriptNPObject): * bindings/v8/ScriptController.h: (ScriptController): 2012-07-19 Andrey Kosyakov <caseq@chromium.org> Web Inspector: minimize number of properties on WebInspector.TimelinePresentationModel.Record https://bugs.webkit.org/show_bug.cgi?id=91744 Reviewed by Pavel Feldman. - replace most properties on TimelinePresentationModel.Record with getters; This reduces the amount of memory we use for timeline presentation model records almost by 2x. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.get children): (WebInspector.TimelinePresentationModel.Record.prototype.get category): (WebInspector.TimelinePresentationModel.Record.prototype.get title): (WebInspector.TimelinePresentationModel.Record.prototype.get startTime): (WebInspector.TimelinePresentationModel.Record.prototype.get data): (WebInspector.TimelinePresentationModel.Record.prototype.get type): (WebInspector.TimelinePresentationModel.Record.prototype.get frameId): (WebInspector.TimelinePresentationModel.Record.prototype.get endTime): (WebInspector.TimelinePresentationModel.Record.prototype.get totalHeapSize): (WebInspector.TimelinePresentationModel.Record.prototype.get usedHeapSize): (WebInspector.TimelinePresentationModel.Record.prototype.get _selfTime): (WebInspector.TimelinePresentationModel.Record.prototype.get stackTrace): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel.Record.prototype.calculateAggregatedStats): 2012-07-19 Dongwoo Im <dw.im@samsung.com> [EFL] Fix build break when WEB_AUDIO is enabled. https://bugs.webkit.org/show_bug.cgi?id=91735 Unreviewed build fix. New files are added for the Web Audio fearure. These files should be included into the CMakeLists.txt file. * CMakeLists.txt: Add the newly created files into the CMakeLists.txt 2012-07-19 Simon Hausmann <simon.hausmann@nokia.com> [Qt] Remove support for Qt versions before 4.8.0 https://bugs.webkit.org/show_bug.cgi?id=91730 Reviewed by Kenneth Rohde Christiansen. Remove Qt version check #ifdefs for Qt versions before 4.8.0. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect): * platform/qt/ThirdPartyCookiesQt.cpp: (WebCore::urlsShareSameDomain): (WebCore::thirdPartyCookiePolicyPermits): 2012-07-19 Peter Rybin <peter.rybin@gmail.com> Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build https://bugs.webkit.org/show_bug.cgi?id=90642 Reviewed by Yury Semikhatsky. A small intermediate writer is added. It handles comparing old and new source before actual writing. * inspector/CodeGeneratorInspector.py: (flatten_list): (SmartOutput): (SmartOutput.__init__): (SmartOutput.write): (SmartOutput.close): 2012-07-19 Mario Sanchez Prada <msanchez@igalia.com> [GTK] MHTML files not being loaded due to reported mime type not supported https://bugs.webkit.org/show_bug.cgi?id=89978 Reviewed by Carlos Garcia Campos. Make 'message/rfc822' a supported MIME type for MHTML files in GTK. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Add 'message/rfc822' to the list of MIME types to be considered to avoid them bypasing cross-domain security checks, only for GTK. * loader/archive/ArchiveFactory.cpp: (WebCore::archiveMIMETypes): Add 'message/rfc822' to the list of supported MIME types when MHTML support is enabled in GTK. 2012-07-19 Jan Keromnes <janx@linux.com> Web Inspector: Factor ExtensionView into separate file https://bugs.webkit.org/show_bug.cgi?id=91699 Reviewed by Vsevolod Vlasov. The class ExtensionView was defined in ExtensionPanel.js but needed to be in a separate file since it is going to be reused somewhere else. Current test coverage is enough since no behavior was changed. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ExtensionPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-19 Shinya Kawanaka <shinyak@chromium.org> [Refactoring] Use userAgentShadowRoot() to take user agent shadow root. https://bugs.webkit.org/show_bug.cgi?id=91716 Reviewed by Hajime Morita. We have introduced Element::userAgentShadowRoot in r123071 to take user agent shadow root. We have used shadow()->oldestShadowRoot() to take the user agent shadow root, however its code intention was not so clear. Using userAgentShadowRoot() will make it clearer. No new tests, simple refactoring. * html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): (WebCore::ColorInputType::shadowColorSwatch): * html/FileInputType.cpp: (WebCore::FileInputType::createShadowSubtree): (WebCore::FileInputType::multipleAttributeChanged): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::findMainSummary): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::willAddAuthorShadowRoot): (WebCore::HTMLImageElement::imageElement): (WebCore::HTMLImageElement::innerElement): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shadowSelect): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::innerTextElement): (WebCore::HTMLTextAreaElement::updatePlaceholderText): * html/InputType.cpp: (WebCore::InputType::destroyShadowSubtree): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): (WebCore::RangeInputType::createShadowSubtree): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): (WebCore::TextFieldInputType::updatePlaceholderText): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::deleteBubbleTree): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::trackLimiterElementOf): 2012-07-19 Keishi Hattori <keishi@webkit.org> Redraw slider tick marks when datalist changes. https://bugs.webkit.org/show_bug.cgi?id=89544 Reviewed by Kent Tamura. Updating the datalist should redraw the slider tick marks. This patch monitors the id target element of the list attribute using ListAttributeTargetObserver and notifies changes to the option element inside of a datalist element. Test: fast/forms/datalist/update-range-with-datalist.html * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::optionElementChildrenChanged): Called when a child option element's value might have changed. (WebCore): * html/HTMLDataListElement.h: (HTMLDataListElement): * html/HTMLInputElement.cpp: (ListAttributeTargetObserver): Inherits IdTargetObserver. (WebCore): (WebCore::HTMLInputElement::parseAttribute): Observe the form attribute target. (WebCore::HTMLInputElement::insertedInto): Observe the form attribute id target. (WebCore::HTMLInputElement::removedFrom): Remove the observer. (WebCore::HTMLInputElement::resetListAttributeTargetObserver): (WebCore::HTMLInputElement::listAttributeTargetChanged): (WebCore::ListAttributeTargetObserver::create): (WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver): (WebCore::ListAttributeTargetObserver::idTargetChanged): * html/HTMLInputElement.h: (WebCore): (HTMLInputElement): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): If the value attribute changed, notify the owner datalist element. (WebCore::HTMLOptionElement::childrenChanged): If the children changed, notify the owner datalist element. (WebCore): (WebCore::HTMLOptionElement::ownerDataListElement): The datalist that the option element is inside of. * html/HTMLOptionElement.h: (WebCore): (HTMLOptionElement): * html/InputType.cpp: (WebCore): (WebCore::InputType::listAttributeTargetChanged): * html/InputType.h: (InputType): * html/RangeInputType.cpp: (WebCore): (WebCore::RangeInputType::listAttributeTargetChanged): * html/RangeInputType.h: (RangeInputType): 2012-07-19 Dongwoo Im <dw.im@samsung.com> CodeGeneratorV8.pm : @enabledAtRuntime is not used in GenerateHeader. https://bugs.webkit.org/show_bug.cgi?id=91715 Reviewed by Kentaro Hara. @enabledAtRuntime is not used in GenerateHeader. We can remove it from GenerateHeader. No new tests as this has no functional changes. * bindings/scripts/CodeGeneratorV8.pm: Remove @enabledAtRuntime from GenerateHeader. (GenerateHeader): 2012-07-19 Abhishek Arya <inferno@chromium.org> Crash in FontCache::releaseFontData. https://bugs.webkit.org/show_bug.cgi?id=91710 Reviewed by Tim Horton. Revert back change made to StyleResolver in r122896. The maximum font size clamp is required there since transformed sizes use that code path. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-07-18 Ryosuke Niwa <rniwa@webkit.org> Another build fix after r123065. Don't list deleted file in gypi. * WebCore.gypi: 2012-07-18 Keishi Hattori <keishi@webkit.org> Implement painting slider tick marks https://bugs.webkit.org/show_bug.cgi?id=87844 Reviewed by Kent Tamura. This implements painting slider tick marks for <datalist> support for input type=range. This does not support automatic update when list target changes, and it will be fixed in a follow up patch (Bug 89544). Tests: fast/forms/datalist/input-appearance-range-with-datalist-rtl.html fast/forms/datalist/input-appearance-range-with-datalist-zoomed.html fast/forms/datalist/input-appearance-range-with-datalist.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::sliderThumbElement): (WebCore): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.h: (WebCore::InputType::sliderThumbElement): * html/RangeInputType.cpp: (WebCore::RangeInputType::typeMismatchFor): We need HTMLInputElement::isValidValue("foo") to return false. (WebCore): (WebCore::RangeInputType::sliderThumbElement): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderContainer::layout): Slider height needs to be increased for the tick marks. * platform/efl/RenderThemeEfl.cpp: (WebCore): (WebCore::RenderThemeEfl::sliderTickSize): (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::sliderTickSize): (WebCore): (WebCore::RenderThemeQt::sliderTickOffsetFromTrackCenter): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * rendering/RenderTheme.cpp: (WebCore): (WebCore::RenderTheme::paintSliderTicks): * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeChromiumCommon.cpp: (WebCore::RenderThemeChromiumCommon::supportsDataListUI): * rendering/RenderThemeChromiumLinux.cpp: (WebCore): (WebCore::RenderThemeChromiumLinux::sliderTickSize): Tick size for horizontal slider. i.e. Width is length along the track. (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter): Offset from middle of draw rect to draw the ticks. Minus value means above the track. (WebCore::RenderThemeChromiumLinux::paintSliderTrack): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::sliderTickSize): (WebCore::RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::RenderThemeChromiumWin::paintSliderThumb): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderTrack): (WebCore): (WebCore::RenderThemeMac::sliderTickSize): (WebCore::RenderThemeMac::sliderTickOffsetFromTrackCenter): 2012-07-18 Shinya Kawanaka <shinyak@chromium.org> Element wants to have userAgentShadowRoot() https://bugs.webkit.org/show_bug.cgi?id=91564 Reviewed by Eric Carlson. We introduce Element::userAgentShadowRoot() to return a UserAgentShadowRoot. It returns the oldest shadow root if any, and checks the type of ShadowRoot in debug build. Previously, we have used elementShadow()->oldestShadowRoot() to get UserAgentShadowRoot. The class implementor will know the oldest shadow root is UserAgentShadowRoot, but it is not clear for the other people. This method will make the code intention clearer. We will introduce userAgentShadowRoot to the other elements (e.g. HTMLInputElement) after this patch. No new tests, simple refactoring. * dom/Element.cpp: (WebCore::Element::userAgentShadowRoot): (WebCore): * dom/Element.h: (Element): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createShadowSubtree): (WebCore::HTMLMediaElement::willAddAuthorShadowRoot): (WebCore::HTMLMediaElement::mediaControls): (WebCore::HTMLMediaElement::hasMediaControls): (WebCore::HTMLMediaElement::createMediaControls): 2012-07-18 Gyuyoung Kim <gyuyoung.kim@samsung.com> [CMAKE] Remove duplicated #ifdef guard in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=91575 Reviewed by Dirk Pranke. CMake files have used ENABLE_XXX macro. However, almost source and idl files are already protected by #ifdef. So, we don't need to guard them in CMake files again. In SVG idl files case, blackberry port doesn't support it yet. So, SVG idl files are handled by WebCore_SVG_IDL_FILES macro. No new tests. This patch isn't for functionality. * CMakeLists.txt: * PlatformBlackBerry.cmake: Change SVG_IDL_FILES with WebCore_SVG_IDL_FILES. 2012-07-18 Hironori Bono <hbono@chromium.org> Move contents right when a vertical scrollbar is shown at the left side of an RTL element. https://bugs.webkit.org/show_bug.cgi?id=85856 Reviewed by Hajime Morita. This change prevents the scrollWidth value from being cropped by the width of a scrollbar when a vertical scrollbar is shown at the left side of an RTL element. This change also increases the clientLeft value by this scrollbar width and move contents right to improve compliance with CSSOM <http://www.w3.org/TR/cssom-view>. Tests: scrollbars/rtl/div-horizontal.html scrollbars/rtl/div-vertical.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): Move contents to the right. * rendering/RenderBox.cpp: (WebCore::RenderBox::topLeftLocationOffset): Move the top-left corner to the right to prevent WebKit from cropping scrollWidth. * rendering/RenderBox.h: (WebCore::RenderBox::clientLeft): Increase clientLeft by the width of a scrollbar. 2012-07-18 Kent Tamura <tkent@chromium.org> Form state restore: Classify form control sates by owners in internal and serialized representations https://bugs.webkit.org/show_bug.cgi?id=91594 Reviewed by Hajime Morita. Before this change, the internal representation of form control states was a map like: {name, type, formKey} -> [FormControlState, FormControlState, ...] Also, the serialized representation was: [name, type, formKey, FormControlState, name, type, formKey, formControlState, ...] This changes these represenations. The internal representation is A map owned by FormController: formKey -> SavedFormState SavedFormState owns a map like: {name, type} -> [FormControlState, FormControlState, ...] The serialized representation is: [formKey, count, name, type, FormControlState, name, type, FormControlState, name, type, FormControlState, .... formKey, count, name, type, FormControlState, name, type, FormControlState, name, type, FormControlState, ....] The serialized representation would be smaller in many cases because each of items doesn't have formKey. Tests: Covered by fast/forms/state-restore-broken-state.html, state-restore-per-form.html, and state-restore-skip-stateless.html. * html/FormController.cpp: (FormElementKey): Remove formKey argument and m_formKey. (WebCore::FormElementKey::FormElementKey): (WebCore::FormElementKey::operator=): (WebCore::FormElementKey::ref): (WebCore::FormElementKey::deref): (WebCore::operator==): (SavedFormState): - The role of SavedFromState was changed. It represented all of control states. Now it represent control states owned by a signle form. - Make this non-copyable and fast-allocated. - Add m_controlStateCount, a counter of FormControlState (WebCore::SavedFormState::SavedFormState): Initialize m_controlStateCount. (WebCore::isNotFormControlTypeCharacter): Moved from another place in this file. (WebCore::SavedFormState::deserialize): Added. Build a SavedFromState with the specified stateVector. (WebCore::SavedFormState::serializeTo): Added. m_controlStateCount is needed here. (WebCore::SavedFormState::appendControlState): - Remove formKey arguement. - Update m_controlStateCount. (WebCore::SavedFormState::takeControlState): ditto. (WebCore::formStateSignature): Bump the version. (WebCore::FormController::createSavedFormStateMap): Added. Build a SavedFormStateMap from the form control list. This is a helper for formElementsState, and classifies controls in the document. (WebCore::FormController::formElementsState): Build a SavedFormStateMap with createSavedFormStateMap(), then serializes it. (WebCore::FormController::setStateForNewFormElements): Deserialize SavedFormState, and build SavedFormStateMap. (WebCore::FormController::takeStateForFormElement): Finds the corresponding SavedFormState with a formKey, and uses it. * html/FormController.h: Declare createSavedFormStateMap(), and moved typedefs for it. 2012-07-18 Antoine Labour <piman@chromium.org> [chromium] Introduce CCResourceProvider, replacing TextureAllocator and hiding textures from clients to allow transport https://bugs.webkit.org/show_bug.cgi?id=91044 Reviewed by Adrienne Walker. This does several things: - Add a CCResourceProvider class, that hides textures and the 3D context from layers (except those that need it). Instead layers manage "resources". In the future, resources are expected to be transportable to a "parent" CCResourceProvider to allow flattening of nested compositors. - Replace texture ids by resource ids in DrawQuads (allowing them to be serializable). - Replace TextureAllocator uses by the CCResourceProvider class. - Upload of data is done through the CCResourceProvider instead of explicit GL calls. - External textures are wrapped into a resource at draw time (see caveat/FIXME in CCTextureLayerImpl). - Rendering with the resources is done through an explicit beginRenderFrom/endRenderFrom that exposes the texture only between that pair. - Merge all the LayerTextureSubImage instances (one per layer), into a single instance on the CCResourceProvider. Added CCResourceProviderTest, the refactoring is covered by existing tests. * WebCore.gypi: * platform/chromium/support/WebCompositorTextureQuad.cpp: (WebKit::WebCompositorTextureQuad::create): (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad): * platform/chromium/support/WebCompositorTileQuad.cpp: (WebKit::WebCompositorTileQuad::create): (WebKit::WebCompositorTileQuad::WebCompositorTileQuad): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapCanvasLayerTextureUpdater::create): (WebCore::BitmapCanvasLayerTextureUpdater::BitmapCanvasLayerTextureUpdater): (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (Texture): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (Texture): (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::create): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): (ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::applyFilters): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): (WebCore::LayerRendererChromium::drawTextureQuad): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useScopedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::finishCurrentFramebuffer): (WebCore): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): (WebCore::LayerRendererChromium::resourceProvider): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::LayerTextureSubImage): (WebCore::LayerTextureSubImage::upload): (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/LayerTextureSubImage.h: (WebKit): (LayerTextureSubImage): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore): (Texture): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::ManagedTexture): (WebCore::ManagedTexture::reserve): (WebCore::ManagedTexture::allocate): (WebCore::ManagedTexture::steal): (WebCore::ManagedTexture::clear): * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::resourceId): (ManagedTexture): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::copyTexture): (WebCore): (WebCore::AcceleratedTextureCopier::flush): * platform/graphics/chromium/TextureCopier.h: (TextureCopier): (AcceleratedTextureCopier): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::TextureManager): (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore): (WebCore::TextureManager::create): (TextureManager): (TextureInfo): (EvictionEntry): * platform/graphics/chromium/TextureUploader.h: (TextureUploader): * platform/graphics/chromium/ThrottledTextureUploader.cpp: (WebCore::ThrottledTextureUploader::uploadTexture): * platform/graphics/chromium/ThrottledTextureUploader.h: (ThrottledTextureUploader): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed. * platform/graphics/chromium/TrackingTextureAllocator.h: Removed. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::willDraw): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: (CCIOSurfaceLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::willDraw): (WebCore::CCLayerImpl::didDraw): (WebCore::CCLayerImpl::contentsResourceId): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (WebCore::CCLayerTreeHostImpl::resourceProvider): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: (WebCore::CCPrioritizedTexture::acquireBackingTexture): (WebCore::CCPrioritizedTexture::resourceId): (WebCore::CCPrioritizedTexture::upload): (WebCore::CCPrioritizedTexture::beginRenderTo): (WebCore::CCPrioritizedTexture::endRenderTo): (WebCore): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: (WebCore): (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::Backing::resourceId): (WebCore::CCPrioritizedTexture::Backing::Backing): (Backing): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted): (WebCore::CCPrioritizedTextureManager::createBacking): (WebCore::CCPrioritizedTextureManager::destroyBacking): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (WebCore::CCPrioritizedTextureManager::create): (CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::maskResourceId): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore): (CCRenderer): * platform/graphics/chromium/cc/CCResourceProvider.cpp: Added. (WebCore): (WebCore::textureToStorageFormat): (WebCore::isTextureFormatSupportedForStorage): (WebCore::CCResourceProvider::create): (WebCore::CCResourceProvider::~CCResourceProvider): (WebCore::CCResourceProvider::graphicsContext3D): (WebCore::CCResourceProvider::inUseByConsumer): (WebCore::CCResourceProvider::createResource): (WebCore::CCResourceProvider::createResourceFromExternalTexture): (WebCore::CCResourceProvider::deleteResource): (WebCore::CCResourceProvider::deleteOwnedResources): (WebCore::CCResourceProvider::upload): (WebCore::CCResourceProvider::beginRenderTo): (WebCore::CCResourceProvider::endRenderTo): (WebCore::CCResourceProvider::beginRenderFrom): (WebCore::CCResourceProvider::endRenderFrom): (WebCore::CCResourceProvider::CCResourceProvider): (WebCore::CCResourceProvider::initialize): * platform/graphics/chromium/cc/CCResourceProvider.h: Added. (WebKit): (WebCore): (CCResourceProvider): (WebCore::CCResourceProvider::maxTextureSize): (WebCore::CCResourceProvider::numResources): (Resource): * platform/graphics/chromium/cc/CCScopedTexture.cpp: (WebCore::CCScopedTexture::CCScopedTexture): (WebCore::CCScopedTexture::allocate): (WebCore::CCScopedTexture::free): * platform/graphics/chromium/cc/CCScopedTexture.h: (WebCore::CCScopedTexture::create): (CCScopedTexture): (WebCore::CCScopedTexture::beginRenderTo): (WebCore::CCScopedTexture::endRenderTo): (WebCore::CCScopedTexture::beginRenderFrom): (WebCore::CCScopedTexture::endRenderFrom): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl): (WebCore): (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (WebCore::CCScrollbarLayerImpl::setBackTrackResourceId): (WebCore::CCScrollbarLayerImpl::setForeTrackResourceId): (WebCore::CCScrollbarLayerImpl::setThumbResourceId): (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::recreateContext): (WebCore::CCSingleThreadProxy::doCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCTexture.h: (WebCore::CCTexture::id): (WebCore::CCTexture::setId): (CCTexture): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::CCTextureLayerImpl): (WebCore::CCTextureLayerImpl::willDraw): (WebCore): (WebCore::CCTextureLayerImpl::appendQuads): (WebCore::CCTextureLayerImpl::didDraw): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): * platform/graphics/chromium/cc/CCTextureUpdater.h: (WebCore): (CCTextureUpdater): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::resourceId): (WebCore::DrawableTile::setResourceId): (WebCore::DrawableTile::DrawableTile): (DrawableTile): (WebCore::CCTiledLayerImpl::contentsResourceId): (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt): (WebCore::CCTiledLayerImpl::appendQuads): (WebCore::CCTiledLayerImpl::pushTileProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::appendQuads): (WebCore::CCVideoLayerImpl::didDraw): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::copyPlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): (FramePlane): (WebCore::CCVideoLayerImpl::FramePlane::FramePlane): 2012-07-18 Hayato Ito <hayato@chromium.org> [Shadow] A 'selectstart' event fired on distributed nodes should not be stopped at shadow boundary of the parent shadow host. https://bugs.webkit.org/show_bug.cgi?id=90508 Reviewed by Dimitri Glazkov. We should not stop some kinds of events at the shadow boundary of a shadow host if the event is fired on distributed nodes. See the spec for such kinds of events. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::ensureEventAncestors): (WebCore::inTheSameScope): (WebCore): (WebCore::EventDispatcher::determineDispatchBehavior): * dom/EventDispatcher.h: (EventDispatcher): 2012-07-18 Julien Chaffraix <jchaffraix@webkit.org> Crash in RenderTableSection::addCell. http://webkit.org/b/89496 Reviewed by Abhishek Arya. The issue comes from RenderBox::splitAnonymousBoxesAroundChild that would move sections across tables but didn't force the table to do a synchronous section recalc. This opened the way for race conditions where we would query the table column structure while it's dirty (this is not uncommon but as usually the table's column representation is always bigger or more split than a section's, it's usually harmless). The fix is to force a synchronous section recalc. Test: fast/table/split-table-no-section-update-crash.html * rendering/RenderBox.cpp: (WebCore::markBoxForRelayoutAfterSplit): Changed to call forceSectionsRecalc ie force a section recalc. * rendering/RenderTable.cpp: (WebCore::RenderTable::recalcSections): Added missing ASSERT for unneeded calls. * rendering/RenderTable.h: (WebCore::RenderTable::forceSectionsRecalc): Added this helper function. 2012-07-18 Julien Chaffraix <jchaffraix@webkit.org> Avoid calling GraphicsContext drawing primitives for 0px borders https://bugs.webkit.org/show_bug.cgi?id=90039 Reviewed by Eric Seidel. The current code would happily call GraphicsContext to draw empty (0px) borders. There is no good use case for going all the way to GraphicsContext in this case as 0px borders, regardless of the border-style, will not be painted. Thus this is a waste of time on all platforms. On Chromium, this trigger some issues with pdf rendering as Skia interprets 0px lines as very thin lines. This change adds 0-checks in the border painting code as well as ASSERTs for performance and to catch future bad use. Test: fast/borders/0px-borders.html * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawRect): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::drawRect): Added an ASSERT on all platforms to catch incorrect use. * rendering/RenderBoxModelObject.cpp: (WebCore::BorderEdge::shouldRender): Changed to not render 0px borders, which should avoid unneeded work in the patining code (context saving / restoring or transparency layer push). (WebCore::RenderBoxModelObject::paintOneBorderSide): Added an ASSERT here that the border side is not empty. * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): Added an early return with a comment as to why it's not feasible to ASSERT as would be best. 2012-07-18 Elliott Sprehn <esprehn@gmail.com> REGRESSION (r89900): Assertion failure on null view() when destroying the document https://bugs.webkit.org/show_bug.cgi?id=91547 Reviewed by Abhishek Arya. Check for document destruction during insertion to avoid crash on null RenderView when trying to count the number of RenderQuote and RenderCounter objects. Test: fast/css-generated-content/bug91547.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): 2012-07-18 Nat Duca <nduca@chromium.org> [chromium] Add histogram for tracking compositor-thread frame rate https://bugs.webkit.org/show_bug.cgi?id=91692 Reviewed by Adrienne Walker. This patch tracks the interval between compositor thread frames and pushes it into a platform histogram. This allows us to track compositor-thread frame rate in the wild. * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: (WebCore::CCFrameRateCounter::markBeginningOfFrame): 2012-07-18 Dan Bernstein <mitz@apple.com> Hit testing in the gap between pages returns incorrect results https://bugs.webkit.org/show_bug.cgi?id=91695 Reviewed by Dave Hyatt. Test: fast/multicol/hit-test-gap-between-pages.html * rendering/RenderBlock.h: (RenderBlock): Promoted adjustPointToColumnContents from private to protected. * rendering/RenderView.cpp: (WebCore::RenderView::updateHitTestResult): If we get here, and we make the document element the inner node, adjust the local point for columns. 2012-07-18 Joshua Bell <jsbell@chromium.org> IndexedDB: Direction parameter ignored by some openCursor() overloads https://bugs.webkit.org/show_bug.cgi?id=91687 Reviewed by Tony Chang. A few of the openCursor() and openKeyCursor() overloads were not passing along the direction parameter, resulting in the default direction being used. Trivial fixes. Also, added a whitespace fix to a relevant console warning. Test: storage/indexeddb/cursor-overloads.html * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): 2012-07-18 Erik Arvidsson <arv@chromium.org> [V8] Improve Replaceable extended attribute https://bugs.webkit.org/show_bug.cgi?id=91668 Reviewed by Adam Barth. Replaceable is working by chance in the V8 bindings because V8 does not correctly handle read only properties on the prototype chain. With this change we generate a setter that uses ForceSet to replace the existing property when set. Test: fast/dom/Window/replaceable.html * bindings/scripts/CodeGeneratorV8.pm: (GenerateReplaceableAttrSetter): (GenerateFunctionCallback): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::replaceableAttribute): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_get_replaceable_attribute): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjReplaceableAttribute): (WebCore::setJSTestObjReplaceableAttribute): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj replaceableAttribute]): (-[DOMTestObj setReplaceableAttribute:]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::replaceableAttributeAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::TestObjReplaceableAttrSetter): (WebCore): 2012-07-18 Erik Arvidsson <arv@chromium.org> [V8] Remove temporary flag override for es52_globals https://bugs.webkit.org/show_bug.cgi?id=91681 Reviewed by Adam Barth. V8 has now changed their default value for the es52_globals so we no longer needs this override. No new tests. No change in functionality. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): 2012-07-18 Alexandre Elias <aelias@google.com> [chromium] Ubercomp: add id to SharedQuadState https://bugs.webkit.org/show_bug.cgi?id=91670 Reviewed by Adrienne Walker. This assigns an integer ID to SharedQuadState objects and a corresponding ID to quads. This ID is unique only within a RenderPass and currently is just set to the index in the shared quad state list. This is redundant with the pointer and exists to simplify serialization. I found out that pointer rewriting within a pickler is blocked by pointers to memory being const there, so the reassignment will have to be performed in the application layer anyway. In that case, it's simplest to add some ID integers. No new tests (will introduce them when making use of the ID). * platform/chromium/support/WebCompositorQuad.cpp: (WebKit::WebCompositorQuad::WebCompositorQuad): (WebKit::WebCompositorQuad::setSharedQuadState): (WebKit): * platform/chromium/support/WebCompositorSharedQuadState.cpp: (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): (WebKit::WebCompositorSharedQuadState::create): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-07-18 Alexandre Elias <aelias@google.com> [chromium] Ubercomp: clean up CCRenderer interface https://bugs.webkit.org/show_bug.cgi?id=91555 Reviewed by Adrienne Walker. I replaced the one-by-one RenderPass calls with a new drawFrame() method that directly takes a CCRenderPassList, and moved a small amount of code from CCLayerTreeHostImpl to implement it. In ubercomp mode, we will produce a frame bundle rather than a command-stream, so the full list is easier to work with. Also, give empty default implementations for the methods that don't need to do anything in a non-GL context, and make private setScissorToRect. No new tests (no-op refactoring). * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawFrame): (WebCore): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore::CCRenderer::viewportChanged): (WebCore::CCRenderer::decideRenderPassAllocationsForFrame): (WebCore::CCRenderer::haveCachedResourcesForRenderPassId): (CCRenderer): (WebCore::CCRenderer::finishDrawingFrame): (WebCore::CCRenderer::doNoOp): (WebCore::CCRenderer::isContextLost): 2012-07-18 Pravin D <pravind.2k4@gmail.com> Content size of child having percent height inside a fixed height container having overflow:auto is wrongly calculated https://bugs.webkit.org/show_bug.cgi?id=11355 Reviewed by Julien Chaffraix. The content height of a child must be container height minus padding, border width and height of horizontal scrollbar(if any). Tests: fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto.html fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Subtracting the height of the scrollbar from the client height when the client has percentage height. 2012-07-18 Pravin D <pravind.2k4@gmail.com> Content size of child having percent height inside a fixed height container having overflow:auto is wrongly calculated https://bugs.webkit.org/show_bug.cgi?id=11355 Reviewed by Julien Chaffraix. The content height of a child must be container height minus padding, border width and height of horizontal scrollbar(if any). Tests: fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto.html fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Subtracting the height of the scrollbar from the client height when the client has percentage height. 2012-07-18 Anantanarayanan G Iyengar <ananta@chromium.org> [chromium] Ensure that the compositor code which is aware of flipped status of video-textures per platform sets the flipped bit to false on Windows. https://bugs.webkit.org/show_bug.cgi?id=91562 Reviewed by Adrienne Walker. No new tests. (HW video decode is still only being tested manually for orientation) * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-07-18 Emil A Eklund <eae@chromium.org> Replace uses of RenderBox::x(), y() in rendering code with with point and size methods https://bugs.webkit.org/show_bug.cgi?id=91549 Reviewed by Eric Seidel. Replaces uses of RenderBox::x() and RenderBox::y() with RenderBox::location(), RenderBox::locationOffset() and RenderBox::frameRect(). No new tests, no change in functionality. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::positionNewFloats): Use child->frameRect() and child->location() instead of constructing a rect and size from the x, y, width and height values. * rendering/RenderBox.cpp: (WebCore::RenderBox::repaintDuringLayoutIfMoved): Compare and copy m_frameRect directly instead of comparing and copying the individual values. (WebCore::RenderBox::localCaretRect): Use location() instead of x() and y(). * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Use pixelSnappedIntSize and RenderBox::size() instead of computing and snapping the width and height separately. * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): USe locationOffset() instead of creating a new LayoutSize object from the x() and y() values. * rendering/RenderInline.cpp: (WebCore::RenderInline::updateHitTestResult): Move by Size instead of x and y value. (WebCore::RenderInline::addFocusRingRects): Move by Size instead of x and y value. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::offsetFromContainer): Shrink offset by size instead of using x and y values. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): (WebCore::RenderTableSection::setLogicalPositionForCell): Use child->frameRect() and child->location() instead of constructing a rect and size from the x, y, width and height values. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writeRenderSVGTextBox): Use location() instead of x() and y(). 2012-07-18 Tony Chang <tony@chromium.org> [chromium] Unreviewed, try to fix the chromium-win build after r123014. * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: 2012-07-18 Joshua Bell <jsbell@chromium.org> IndexedDB: Fix some coding style violations https://bugs.webkit.org/show_bug.cgi?id=91565 Reviewed by Tony Chang. In declarations, put the * next to the type not the identifier. Remove k as a prefix for various constants. No new tests - no functional changes. * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::prefetchContinueInternal): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::computeFileIdentifier): * Modules/indexeddb/IDBKey.h: (WebCore::IDBKey::IDBKey): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getDatabaseNames): (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData): (WebCore::IDBLevelDBBackingStore::deleteDatabase): (WebCore::IDBLevelDBBackingStore::getObjectStores): (WebCore::getNewObjectStoreId): (WebCore::IDBLevelDBBackingStore::createObjectStore): (WebCore::IDBLevelDBBackingStore::deleteObjectStore): (WebCore::getNewVersionNumber): (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber): (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord): (WebCore::IDBLevelDBBackingStore::getIndexes): (WebCore::getNewIndexId): (WebCore::IDBLevelDBBackingStore::createIndex): (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord): (WebCore): * Modules/indexeddb/IDBLevelDBCoding.cpp: (IDBLevelDBCoding): (WebCore::IDBLevelDBCoding::maxIDBKey): (WebCore::IDBLevelDBCoding::minIDBKey): (WebCore::IDBLevelDBCoding::decodeVarInt): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): (WebCore::IDBLevelDBCoding::encodeIDBKeyPath): (WebCore::IDBLevelDBCoding::decodeIDBKeyPath): (WebCore::IDBLevelDBCoding::compare): (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix): (WebCore::IDBLevelDBCoding::KeyPrefix::encode): (WebCore::IDBLevelDBCoding::KeyPrefix::compare): (WebCore::IDBLevelDBCoding::KeyPrefix::type): (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode): (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode): (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode): (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode): (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode): (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode): (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode): (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode): (WebCore::IDBLevelDBCoding::IndexNamesKey::decode): (WebCore::IDBLevelDBCoding::IndexNamesKey::encode): (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode): (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode): (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode): (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode): (WebCore::IDBLevelDBCoding::IndexDataKey::decode): * Modules/indexeddb/IDBLevelDBCoding.h: (IDBLevelDBCoding): (ObjectStoreDataKey): (ExistsEntryKey): 2012-07-18 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call SQLiteFileSystem-related functions directly https://bugs.webkit.org/show_bug.cgi?id=91631 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * Modules/webdatabase/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin): * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/sql/chromium/SQLiteFileSystemChromium.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): (WebCore::SQLiteFileSystem::getDatabaseFileSize): * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: 2012-07-18 Oliver Hunt <oliver@apple.com> WebKit provides APIs that make it possible for JSC to attempt to initialise the heap without initialising threading https://bugs.webkit.org/show_bug.cgi?id=91663 Reviewed by Filip Pizlo. Initialising a JSGlobalData now requires us to have initialised JSC's threading logic, as that also initialises the JSC VM runtime options. WebKit provides a number of routines that make use of commonJSGlobalData() that can be used before webcore has called the appropriate initialisation routine. This patch makes the minimal change of ensuring that commonJSGlobalData initialises threading before attempting to create the common heap. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::commonJSGlobalData): 2012-07-18 Michael Saboff <msaboff@apple.com> Make TextCodecUTF8 handle 8 bit data without converting to UChar's https://bugs.webkit.org/show_bug.cgi?id=90320 Reviewed by Oliver Hunt. Change UTF8 Codec to produce 8-bit strings when data fits in 8-bit range. First we try decoding the string as all 8-bit and then fall back to 16 bit when we find the first character that doesn't fit in 8 bits. Then we take the already decoded data and copy / convert it to a 16-bit buffer and then continue process the rest of the stream as 16-bits. No new tests, no change in functionality. * platform/text/TextCodecUTF8.cpp: (WebCore::TextCodecUTF8::handleError): (WebCore::TextCodecUTF8::decode): * platform/text/TextCodecUTF8.h: (TextCodecUTF8): 2012-07-18 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl https://bugs.webkit.org/show_bug.cgi?id=91169 Reviewed by Adrienne Walker. This extends CCVideoLayerImpl to support TEXTURE_RECTANGLE_ARB. This texture target is used by the Mac hardware accelerated video decoder. No new tests (HW video decode on Mac is being tested manually.). * platform/chromium/support/WebCompositorIOSurfaceQuad.cpp: (WebKit::WebCompositorIOSurfaceQuad::create): Added an orientation argument. (WebKit::WebCompositorIOSurfaceQuad::WebCompositorIOSurfaceQuad): Added an orientation argument. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawIOSurfaceQuad): Added support for non-flipped IOSurface textures. * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): Changed TextureIOSurfaceProgram to be non-flipped. To draw flipped textures drawIOSurfaceQuad sets a different value for texTransformLocation. * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::appendQuads): Updated call to CCIOSurfaceDrawQuad constructor. * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): Added support for drawing TEXTURE_RECTANGLE_ARB textures. 2012-07-18 Michael Saboff <msaboff@apple.com> Make TextCodecLatin1 handle 8 bit data without converting to UChar's https://bugs.webkit.org/show_bug.cgi?id=90319 Reviewed by Oliver Hunt. Updated codec to create 8 bit strings where possible. We assume that the incoming stream can all be decoded as 8-bit values. If we find a 16-bit value, we take the already decoded data and copy / convert it to a 16-bit buffer and then continue process the rest of the stream as 16-bits. No new tests, functionality covered with existing tests. * platform/text/TextCodecASCIIFastPath.h: (WebCore::copyASCIIMachineWord): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): 2012-07-18 Dimitri Glazkov <dglazkov@chromium.org> Fix up old name in RuleSet::addRulesFromSheet https://bugs.webkit.org/show_bug.cgi?id=91646 Reviewed by Andreas Kling. Simple parameter rename, no change in functionality. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Renamed styleSelector to resolver to reflect recent rename of the parameter type. 2012-07-18 Vincent Scheib <scheib@chromium.org> Unify allowfullscreen logic in Document::webkitFullScreenEnabled and fullScreenIsAllowedForElement. https://bugs.webkit.org/show_bug.cgi?id=91448 Reviewed by Adrienne Walker. Unifies redundant traversal logic and static cast previously used to determine if an element or document can be made fullscreen. This clean up prepares for pointer lock, which will use the same logic. Added a test to detect an edge case of an owning document with fullscreen permision moving an iframe to fullscreen, while that iframe does not have permision for its contents to be made fullscreen. Test: fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html * dom/Document.cpp: (WebCore::isAttributeOnAllOwners): (WebCore::Document::fullScreenIsAllowedForElement): (WebCore::Document::webkitFullscreenEnabled): 2012-07-18 Christophe Dumez <christophe.dumez@intel.com> [EFL] Add central error management to EFL port https://bugs.webkit.org/show_bug.cgi?id=91598 Reviewed by Kenneth Rohde Christiansen. Define possible error types in ErrorsEfl so that we can reuse the header in both WebKit1 and WebKit2. This is inspired from the GTK port. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/ErrorsEfl.cpp: Added. (WebCore): (WebCore::cancelledError): (WebCore::blockedError): (WebCore::cannotShowURLError): (WebCore::interruptedForPolicyChangeError): (WebCore::cannotShowMIMETypeError): (WebCore::fileDoesNotExistError): (WebCore::pluginWillHandleLoadError): (WebCore::downloadNetworkError): (WebCore::downloadCancelledByUserError): (WebCore::downloadDestinationError): (WebCore::printError): (WebCore::printerNotFoundError): (WebCore::invalidPageRangeToPrint): * platform/efl/ErrorsEfl.h: Added. (WebCore): 2012-07-18 Varun Jain <varunjain@chromium.org> [chromium] Fix crash in DragImageTest caused by r122996 https://bugs.webkit.org/show_bug.cgi?id=91653 Reviewed by Tony Chang. Covered by existing DragImageTest. * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::deleteDragImage): 2012-07-18 Varun Jain <varunjain@chromium.org> [chromium] Drag image for image elements should be scaled with device scale factor. https://bugs.webkit.org/show_bug.cgi?id=89688 Reviewed by Adam Barth. Modified ManualTest: ManualTests/chromium/drag-image-accounts-for-device-scale.html * page/Frame.cpp: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::dragImageSize): (WebCore::deleteDragImage): (WebCore::scaleDragImage): (WebCore::dissolveDragImageToFraction): (WebCore::createDragImageFromImage): * platform/chromium/DragImageRef.h: (DragImageChromium): (WebCore): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::copyImage): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia): (WebCore::BitmapImageSingleFrameSkia::create): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): * platform/graphics/skia/NativeImageSkia.h: (NativeImageSkia): (WebCore::NativeImageSkia::resolutionScale): 2012-07-18 Yong Li <yoli@rim.com> [BlackBerry] Move about: URL handling out of WebCore https://bugs.webkit.org/show_bug.cgi?id=91541 Reviewed by Rob Buis. Remove about URL handling from our NetworkJob. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::initialize): (WebCore::NetworkJob::cancelJob): (WebCore::NetworkJob::sendResponseIfNeeded): * platform/network/blackberry/NetworkJob.h: (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): 2012-07-18 Tony Chang <tony@chromium.org> Unreviewed, rolling out r122984. http://trac.webkit.org/changeset/122984 https://bugs.webkit.org/show_bug.cgi?id=91171 Broken the shared build, need to export a SkData in skia * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-18 Rob Buis <rbuis@rim.com> Alignment crash in MIMESniffer https://bugs.webkit.org/show_bug.cgi?id=89787 Reviewed by Yong Li. PR 169064 Prevent ASSERT on unaligned data. Special-case handling of unaligned data to maskedCompareSlowCase. No test, too hard to reproduce. * platform/network/MIMESniffing.cpp: (std::maskedCompareSlowCase): (std): (std::maskedCompare): 2012-07-18 Steve VanDeBogart <vandebo@chromium.org> Chrome/Skia: PDF print output does not have clickable links. https://bugs.webkit.org/show_bug.cgi?id=91171 Reviewed by Stephen White. Connect GraphicsContext::setURLForRect to Skia's new API for annotations. Printing is not generally testable. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setURLForRect): 2012-07-18 Philippe Normand <pnormand@igalia.com> [GStreamer] 0.11 build broken https://bugs.webkit.org/show_bug.cgi?id=91629 Reviewed by Alexis Menard. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkitVideoSinkProposeAllocation): Pass null GstStructure to gst_query_add_allocation_meta(). Our propose-allocation method is simple enough to not need to set it. 2012-07-18 Chris Fleizach <cfleizach@apple.com> AX: <input type="submit"> unlabelled. https://bugs.webkit.org/show_bug.cgi?id=91563 Reviewed by Adele Peterson. Make sure the default value is returned if there is no other value specified. Test: platform/mac/accessibility/submit-button-default-value.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): 2012-07-17 Shawn Singh <shawnsingh@chromium.org> [chromium] Remove awkward anchorPoint usage that implicity affects layer position https://bugs.webkit.org/show_bug.cgi?id=91472 Reviewed by Adrienne Walker. Covered by existing layout tests and unit tests, several existing unit tests updated. In GraphicsLayerChromium, anchorPoint() implicity affects position(). Therefore, unit tests needed to remember to set anchorPoint correctly when trying to position layers for testing. However, it's easy to forget that initialization, and probably shouldn't be necessary anyway since conceptually anchorPoint does not affect layer position. This patch removes the "actualPosition + anchorPoint" quirk in GraphicsLayerChromium, so that this problem is avoided. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::updateLayerPosition): No longer computes position + anchorPoint. Instead this is done in calcDrawTransformsInternal. (WebCore::GraphicsLayerChromium::updateLayerSize): No longer affects computation of position. (WebCore::GraphicsLayerChromium::updateAnchorPoint): No longer affects computation of position (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): Position is initialized to zero instead of relative to anchorPoint * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): explicitly use position + anchorPoint in this code, for both layer and replica. Note that replicaLayer now uses its own anchorPoint, which seems to be more consistent with Safari behavior. 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: [Regression] Save as file is missing in Network panel preview/response tabs. https://bugs.webkit.org/show_bug.cgi?id=91625 Reviewed by Vsevolod Vlasov. * inspector/front-end/HandlerRegistry.js: * inspector/front-end/NetworkPanel.js: 2012-07-18 Dirk Schulze <krit@webkit.org> SVG CSS property types with <number> don't support exponents https://bugs.webkit.org/show_bug.cgi?id=52542 Reviewed by Nikolas Zimmermann. Parse numbers in SVG presentation attributes with SVG parser to support scientific notations. The SVG parser is already well tested and has some extra checks for edge like protection from overflow. The patch is based upon a patch of Bear Travis. Test: svg/css/scientific-numbers.html * css/CSSParser.cpp: (WebCore::CSSParser::lex): Use SVG parser to parse numbers of SVG attributes. * svg/SVGParserUtilities.cpp: (WebCore::parseSVGNumber): Added accessor to call from CSSParser with double value. (WebCore): * svg/SVGParserUtilities.h: (WebCore): 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: beautify the paused in debugger message, make it configurable from the front-end. https://bugs.webkit.org/show_bug.cgi?id=91628 Reviewed by Vsevolod Vlasov. Made message smaller, using consistent font; Made message configurable from the front-end. * English.lproj/localizedStrings.js: * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::setPausedInDebuggerMessage): (WebCore::InspectorOverlay::update): (WebCore::InspectorOverlay::drawPausedInDebugger): * inspector/DOMNodeHighlighter.h: (InspectorOverlay): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setOverlayMessage): (WebCore): (WebCore::InspectorDebuggerAgent::clear): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::setOverlayMessage): * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._setDebuggerPausedDetails): 2012-07-18 Douglas Stockwell <dstockwell@chromium.org> WebCore::StylePropertySet::addParsedProperties - crash https://bugs.webkit.org/show_bug.cgi?id=91153 Reviewed by Andreas Kling. WebKitCSSKeyframeRule::style exposed an immutable StylePropertySet. Modified to create a mutable copy on demand. Test: fast/css/css-keyframe-style-mutate-crash.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/WebKitCSSKeyframeRule.cpp: (WebCore::StyleKeyframe::mutableProperties): Added, creates a mutable copy of properties as required. (WebCore::WebKitCSSKeyframeRule::style): * css/WebKitCSSKeyframeRule.h: (WebCore::StyleKeyframe::properties): Made const, use mutableProperties to mutate. 2012-07-18 Huang Dongsung <luxtella@company100.net> [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect. https://bugs.webkit.org/show_bug.cgi?id=91595 Reviewed by Noam Rosenthal. Internal review by Kwang Yul Seo. Currently, TextureMapperLayer creates an ImageBuffer as big as m_state.needsDisplayRect if m_state.needsDispaly is false. The size of m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may consume more memory than the size of the layerRect. It even can cause crash if m_state.needsDisplayRect is too big. No new tests, covered by existing tests. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::updateBackingStore): 2012-07-18 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] We should update the status in NetworkJob if there is a new one from libcurl. https://bugs.webkit.org/show_bug.cgi?id=91475 Reviewed by Yong Li. Libcurl sometimes sends multiple status messages, we need to keep the last one in NetworkJob. We originally had the m_statusReceived check, then we found out that libcurl sometimes sent additional 401 codes and added the 401 exception to the check, and now we're removing the whole check(so we don't need the exception either). RIM PR# 163172 Reviewed internally by Joe Mason. No new tests. This is caused by libcurl's multiple status messages. So we don't need to write a test case for webkit. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyStatusReceived): 2012-07-18 Kevin Ellis <kevers@chromium.org> TOUCH_ADJUSTMENT is too aggressive when snapping to large elements. https://bugs.webkit.org/show_bug.cgi?id=91262 Reviewed by Antonio Gomes. Constrains the extent to which the touch point can be adjusted when generating synthetic mouse events when TOUCH_ADJUSTEMNT is enabled. Previously, the target position snapped to the center of the target element, which can be far removed from the touch position when tapping on or near a large element. The refined strategy is to leave the adjusted position unchanged if tapping within the element or to snap to the center of the overlap region if the touch point lies outside the bounds of the element, but the touch area and element bounds overlap. For non-rectilineary bounds, a point lying outside the element boundary is pulled towards the center of the element, by an amount limited by the radius of the touch area. Tests: touchadjustment/big-div.html touchadjustment/rotated-node.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::contentsToWindow): (TouchAdjustment): (WebCore::TouchAdjustment::snapTo): (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric): 2012-07-18 Sergey Rogulenko <rogulenko@google.com> Web Inspector: adding pause icon for JavaScript debugging https://bugs.webkit.org/show_bug.cgi?id=90880 Reviewed by Pavel Feldman. Refactored DOMNodeHighlighter into InspectorOverlay class and added a feature to show a "pause" screen when the Javascript debugger is paused. * inspector/DOMNodeHighlighter.cpp: (WebCore::InspectorOverlay::InspectorOverlay): (WebCore::InspectorOverlay::paint): (WebCore::InspectorOverlay::drawOutline): (WebCore::InspectorOverlay::getHighlight): (WebCore::InspectorOverlay::setPausedInDebugger): (WebCore::InspectorOverlay::hideHighlight): (WebCore): (WebCore::InspectorOverlay::highlightNode): (WebCore::InspectorOverlay::setHighlightData): (WebCore::InspectorOverlay::clearHighlightData): (WebCore::InspectorOverlay::highlightedNode): (WebCore::InspectorOverlay::update): (WebCore::InspectorOverlay::drawHighlight): (WebCore::InspectorOverlay::drawPausedInDebugger): * inspector/DOMNodeHighlighter.h: (WebCore): (InspectorOverlay): (WebCore::InspectorOverlay::create): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::drawHighlight): (WebCore::InspectorController::getHighlight): (WebCore::InspectorController::highlightedNode): * inspector/InspectorController.h: (WebCore): (InspectorController): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::handleMousePress): (WebCore::InspectorDOMAgent::mouseDidMoveOverElement): (WebCore::InspectorDOMAgent::setSearchingForNode): (WebCore::InspectorDOMAgent::setHighlightDataFromConfig): (WebCore::InspectorDOMAgent::setInspectModeEnabled): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightNode): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::hideHighlight): * inspector/InspectorDOMAgent.h: (WebCore): (WebCore::InspectorDOMAgent::create): (InspectorDOMAgent): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::create): (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::didPaint): * inspector/InspectorPageAgent.h: (WebCore): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::create): (WebCore::PageDebuggerAgent::PageDebuggerAgent): (WebCore::PageDebuggerAgent::disable): (WebCore): (WebCore::PageDebuggerAgent::didPause): (WebCore::PageDebuggerAgent::didContinue): * inspector/PageDebuggerAgent.h: (WebCore): (PageDebuggerAgent): 2012-07-17 Andrey Kosyakov <caseq@chromium.org> Web Inspector: intern strings when processing timeline records https://bugs.webkit.org/show_bug.cgi?id=91531 Reviewed by Pavel Feldman. - added StringPool that is capable of interning strings; - used it in TimelineModel to process all incoming records; * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel): (WebInspector.TimelineModel.prototype._addRecord): (WebInspector.TimelineModel.prototype.reset): * inspector/front-end/utilities.js: 2012-07-18 Scott Graham <scottmg@chromium.org> Use cl to preprocess IDL for Chromium Windows generate_supplemental_dependency https://bugs.webkit.org/show_bug.cgi?id=91548 Reviewed by Kentaro Hara. Use cl.exe as preprocessor for IDL files rather than cygwin gcc. Cuts two minute execution time on Windows by a bit better than 50%. No new tests. * WebCore.gyp/WebCore.gyp: * bindings/scripts/preprocessor.pm: (applyPreprocessor): 2012-07-18 Pavel Feldman <pfeldman@chromium.org> Web Inspector: remove search replace from behind experiment, polish the behavior https://bugs.webkit.org/show_bug.cgi?id=91519 Reviewed by Vsevolod Vlasov. - This change makes replace loop with no boundary, removes the loop parameter from jumpToNext/Previous; - Lays out replace as a second row - Fixes replace all with no search matches - Splits Search and Search and Replace - Introduces explicit Next / Previous buttons in the search mode - Introduces editRange on the TextEditor so that it was preserving the undo stack (we'll need to fix editor so that it does not require it). * English.lproj/localizedStrings.js: * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel.prototype.performSearch): (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult): (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult): (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.performSearch): (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult): (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult): (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult): (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult): (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult): (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult): (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult): (WebInspector.ScriptsPanel.prototype.replaceSelectionWith): (WebInspector.ScriptsPanel.prototype.replaceAllWith): * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype.cancelSearch): (WebInspector.SearchController.prototype.resetSearch): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype._updateReplaceVisibility): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): (WebInspector.SearchController.prototype._updateReplaceDetailsVisibility): (WebInspector.SearchController.prototype._replace): (WebInspector.SearchController.prototype._replaceAll): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): (WebInspector.SourceFrame.prototype.replaceSearchMatchWith): (WebInspector.SourceFrame.prototype.replaceAllWith): (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.editRange): * inspector/front-end/inspector.css: (.toolbar-search-replace .search-replace): (.toolbar-search): (.toolbar-search-replace): (.toolbar-search-close-button): (.toolbar-search-close-button:hover): (.toolbar-search-close-button:active): (.toolbar-search input[type="checkbox"]): (.toolbar-search-replace .toolbar-replace-control): 2012-07-18 YoungTaeck Song <youngtaeck.song@samsung.com> [WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=91584 Reviewed by Noam Rosenthal. This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation. Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled. * CMakeLists.txt: * PlatformEfl.cmake: * platform/graphics/GraphicsContext3D.h: (GraphicsContext3D): * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::platformGraphicsContext3D): 2012-07-18 Zoltan Horvath <zoltan@webkit.org> [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt https://bugs.webkit.org/show_bug.cgi?id=91600 Reviewed by Andreas Kling. Use NativeImageQt::defaultFormatForAlphaEnabledImages() and NativeImageQt::defaultFormatForOpaqueImages() instead of the direct imagetypes at the appropriate places. Covered by existing tests. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::paintToCanvas): * platform/graphics/qt/PathQt.cpp: (WebCore::scratchContext): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawRepaintCounter): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): 2012-07-18 Andrey Kosyakov <caseq@chromium.org> Web Inspector: create timeline detail records lazily https://bugs.webkit.org/show_bug.cgi?id=91513 Reviewed by Pavel Feldman. - only create timeline record details when these are used; * inspector/front-end/TimelinePanel.js: (WebInspector.TimelineRecordListRow.prototype.update): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails): (WebInspector.TimelinePresentationModel.Record.prototype.details): 2012-07-18 Simon Hausmann <simon.hausmann@nokia.com> [ANGLE] On QT, use Bison and Flex during ANGLE build https://bugs.webkit.org/show_bug.cgi?id=91108 Reviewed by Kenneth Rohde Christiansen. Add derived source generators for the two angle bison parsers and flex based lexers. * DerivedSources.pri: * Target.pri: 2012-07-18 Dominik Röttsches <dominik.rottsches@intel.com> [EFL][WK2] Too early assertion failure if default theme is not available https://bugs.webkit.org/show_bug.cgi?id=91608 Reviewed by Kenneth Rohde Christiansen. After bug 90107 we're setting a default theme path, which leads to a themeChanged() call initializing edje in createEdje() - if that theme path is not available we run into a premature assertion failure. We need to give the embedder a chance to override the default theme path before failing - so only the usages of m_edje should be guarded with assertions. No new tests, no change in rendering behavior. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::themePartCacheEntryReset): Adding an assertion to ensure m_edje is present - so that all usages of m_edje are now guarded. (WebCore::RenderThemeEfl::createEdje): Not hitting assertion if theme path doesn't contain the theme object file, allowing the embedder to override with a new path. 2012-07-18 Vsevolod Vlasov <vsevik@chromium.org> IndexedDB: IDBLevelDBBackingStore compilation fails because of unused variable. https://bugs.webkit.org/show_bug.cgi?id=91612 Reviewed by Pavel Feldman. Replaced ASSERT with ASSERT_UNUSED. * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): 2012-07-18 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r117738) [Forms] Default step base should be 0 (=1970-01) for input type month https://bugs.webkit.org/show_bug.cgi?id=91603 Reviewed by Kent Tamura. This patch restores default step base value to 0 (=1970-01) as before r117738. No new tests. Existing test(fast/forms/month/month-stepup-stepdown-from-renderer.html) covers this case, although it is disabled. * html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange): Changed default value of step base to defaultMonthStepBase instead of DateComponents::minimumMonth(). 2012-07-18 Ryuan Choi <ryuan.choi@samsung.com> [EFL] Cursor is not drawn when opengl_x11 backend is choosen. https://bugs.webkit.org/show_bug.cgi?id=89142 Reviewed by Simon Hausmann. If theme based cursor is not given, WebKit/Efl only uses Ecore_X based cursor as a fallback after checked whether current engine is using EcoreX. This patch adds opengl_x11 which is one of Ecore_X based engine in check lists to draw fallback cursor. * platform/efl/EflScreenUtilities.cpp: (WebCore::isUsingEcoreX): 2012-07-18 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r122345): HTMLCollection::length() sometimes returns a wrong value https://bugs.webkit.org/show_bug.cgi?id=91587 Reviewed by Benjamin Poulain. The bug was caused by my douchey code that set the length cache to be the *offset* of the last item in a HTMLCollection. Clearly, the length of a collection that contains the last item at offset n is n + 1. Fixed that. Also removed the call to setLengthCache in HTMLCollection::length since it must have set by previous calls to itemBeforeOrAfterCachedItem already. This will allow us to catch regressions like this in ports that use JSC bindings as well. Test: fast/dom/htmlcollection-length-after-item.html * html/HTMLCollection.cpp: (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): 2012-07-18 Yoshifumi Inoue <yosin@chromium.org> Decimal::toString should not round integer value. https://bugs.webkit.org/show_bug.cgi?id=91481 Reviewed by Kent Tamura. This patch makes Decimal::toString not to round an integer value before converting string. Tests: WebKit/chromium/tests/DecimalTest.cpp: DecimalTest.toString * platform/Decimal.cpp: (WebCore::Decimal::toString): When the value is an integer, we don't round coefficient to be DBL_DIG(15) digits because double can represent an integer without rounding error. 2012-07-18 Luke Macpherson <macpherson@chromium.org> Fix null pointer dereference introduced by Changeset 121874. https://bugs.webkit.org/show_bug.cgi?id=91578 Reviewed by Pavel Feldman. In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that dereferences the return value of ownerDocument() without doing a null check. This was a bad idea. No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::ensureSourceData): 2012-07-17 Yoshifumi Inoue <yosin@chromium.org> Decimal constructor with 99999999999999999 loses last digit https://bugs.webkit.org/show_bug.cgi?id=91579 Reviewed by Kent Tamura. This patch changes maximum coefficient value handling in Decimal::EncodedData constructor not to lose the last digit. It was used ">=" operator for comparison instead of ">" operator. Tests: WebKit/chromium/tests/DecimalTest.cpp * platform/Decimal.cpp: (WebCore::Decimal::EncodedData::EncodedData): Replace ">=" to ">" for not getting rid of the last digit for maximum coefficient value. 2012-07-17 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed Web Inspector: followup fix for r122920. Add collected Loaders size to InspectorMemoryBlock * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): 2012-07-17 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: show loaders memory consumption on the memory chart. https://bugs.webkit.org/show_bug.cgi?id=90686 Reviewed by Pavel Feldman. Size of FrameLoader, DocumentLoader, ResourceLoader and their resources should be shown on the memory pie chart. It is covered by existing WebInspector performance tests infrastructure. * WebCore.exp.in: * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryInstrumentation::addRawBuffer): (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl): (WebCore): (WebCore::MemoryClassInfo::addInstrumentedHashSet): (WebCore::MemoryClassInfo::addRawBuffer): (WebCore::MemoryInstrumentation::addInstrumentedHashSet): (WebCore::MemoryInstrumentation::addVector): * inspector/InspectorMemoryAgent.cpp: (WebCore): (WebCore::domTreeInfo): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::reportMemoryUsage): (WebCore): * loader/DocumentLoader.h: (WebCore): (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportMemoryUsage): (WebCore): * loader/FrameLoader.h: (WebCore): (FrameLoader): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::reportMemoryUsage): (WebCore): * loader/ResourceLoader.h: (WebCore): (ResourceLoader): * page/Frame.cpp: (WebCore::Frame::reportMemoryUsage): (WebCore): * page/Frame.h: (WebCore): (Frame): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::reportMemoryUsage): (WebCore): * platform/SharedBuffer.h: (WebCore): (SharedBuffer): 2012-07-17 Kent Tamura <tkent@chromium.org> Fix an assertion failure in CalendarPickerElement::hostInput(). https://bugs.webkit.org/show_bug.cgi?id=91568 Reviewed by Hajime Morita. Test: fast/forms/date/calendar-picker-type-change-onclick.html * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::defaultEventHandler): It's possible that this function is called when the element is detached from the document tree. 2012-07-17 Kent Tamura <tkent@chromium.org> Form state: Make a new class handling HashMap<FormElementKey, Deque<>> https://bugs.webkit.org/show_bug.cgi?id=91480 Reviewed by Hajime Morita. This is a preparation of Bug 91209, "Form state restore: Need to identify a from by its content." Make a new class which is responsible to handle "HashMap<FormElementKey, Deque<FormControlState>, FormElementKeyHash, FormElementKeyHashTraits>." Also, move the FormElementKey class declaration and related structs from FormController.h to FormController.cpp because FormElementKey is used only in FormController.cpp. No new tests. Just a refactoring. * html/FormController.cpp: (WebCore::FormElementKey): Moeved from FormController.h. (WebCore::FormElementKey::FormElementKey): Moved from the bottom of FormController.cpp (WebCore::FormElementKey::~FormElementKey): ditto. (WebCore::FormElementKey::operator=): ditto. (WebCore::FormElementKey::ref): ditto. (WebCore::FormElementKey::deref): ditto. (WebCore::operator==): Moved from FormController.h (FormElementKeyHash): ditto. (WebCore::FormElementKeyHash::equal): ditto. (WebCore::FormElementKeyHash::hash): Moved from the bottom of FormController.cpp (WebCore::FormElementKeyHashTraits::constructDeletedValue): Moved from FormController.h (WebCore::FormElementKeyHashTraits::isDeletedValue): ditto. (WebCore::SavedFormState): Added. (WebCore::SavedFormState::isEmpty): (WebCore::SavedFormState::SavedFormState): Added. The constructor. (WebCore::SavedFormState::create): Added. A factory function. (WebCore::SavedFormState::appendControlState): Moved some code from FormController::setStateForNewFormElements. (WebCore::SavedFormState::takeControlState): Moved some code from FormController::takeStateForFormElement. (WebCore::FormController::setStateForNewFormElements): - Creates SavedFormState if needed. - Uses SavedFormState::appendControlState. (WebCore::FormController::takeStateForFormElement): Uses SavedFormState. * html/FormController.h: (FormController): 2012-07-17 MORITA Hajime <morrita@google.com> [Shadow DOM] Some distribution invalidation can drop necessary reattachment. https://bugs.webkit.org/show_bug.cgi?id=88843 Reviewed by Dimitri Glazkov. Following scenario caused this problem: - Inserting a Text node as a shadow child triggers invalidateDistribution(), which doen't reattach the shadow's host element. - Then inserting a <content> element after that triggers another invalidateDistribution(), which should reattach its host because <content> can affect not only distribution of new nodes, but also existing distribution. - Since the first invalidateDistribution() has marked the distribution as invalidated, the second invalidateDistribution() call returns early without any reattachment, even though it needs one. This change adds InvalidationType parameter to invalidateDistribution(), which asks ElementShadow to reattach the host regardless of its validity state. InsertionPoint::insertedInto() uses this flag to ensure that its insertion always results a reattachment. Test: fast/dom/shadow/content-after-style.html * dom/ElementShadow.cpp: (WebCore::ElementShadow::addShadowRoot): Passes InvalidationType. (WebCore::ElementShadow::removeAllShadowRoots): Passes InvalidationType. (WebCore::ElementShadow::invalidateDistribution): Added a InvalidationType parameter. * dom/ElementShadow.h: * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::insertedInto): Passes InvalidationType. 2012-07-17 Jon Lee <jonlee@apple.com> Teach CodeGenerator to support for static, readonly, attributes https://bugs.webkit.org/show_bug.cgi?id=88920 <rdar://problem/11650330> Reviewed by Oliver Hunt. Update the parser to be able to accept the static keyword for attribute. We will treat static attributes like custom static functions. They call the implementing class directly, and pass in the ExecState as a script context. * bindings/scripts/CodeGeneratorJS.pm: (GetAttributeGetterName): Factor out the construction of the attribute getter function name. (GetAttributeSetterName): Factor out the construction of the attribute setter function name. (GenerateHeader): Determine that a class has read-write properties only if there is a read-write attribute that is not static. (GenerateAttributesHashTable): Skip static attributes in the object hash table. They will be added to the constructor hash table. (GenerateImplementation): Look for static attributes to add to the constructor hash table. Make a call to the static function in the class. * bindings/scripts/IDLParser.pm: (ParseInterface): Update the processing because of the regex change. * bindings/scripts/IDLStructure.pm: Update the attribute regex. * bindings/scripts/test/JS/JSTestObj.cpp: Update test results. * bindings/scripts/test/JS/JSTestObj.h: Update test results. * bindings/scripts/test/TestObj.idl: Add test cases. 2012-07-17 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Rename HarfBuzzFace to HarfBuzzNGFace https://bugs.webkit.org/show_bug.cgi?id=91458 Reviewed by Tony Chang. There are HarfbuzzFace class (for old-harfbuzz) and HarfBuzzFace (for harfbuzz-ng) class. The difference is too subtle. Make them more distinct. No new tests. No changes in behavior. * WebCore.gyp/WebCore.gyp: Rename HarfBuzzFace to HarfBuzzNGFace. * WebCore.gypi: Ditto. * platform/graphics/FontPlatformData.h: Ditto. (FontPlatformData): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto. (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp. (WebCore): (WebCore::floatToHarfBuzzPosition): (WebCore::getGlyph): (WebCore::getGlyphHorizontalAdvance): (WebCore::getGlyphHorizontalOrigin): (WebCore::getGlyphExtents): (WebCore::harfbuzzCoreTextGetFontFuncs): (WebCore::releaseTableData): (WebCore::harfbuzzCoreTextGetTable): (WebCore::HarfBuzzNGFace::createFace): (WebCore::HarfBuzzNGFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzNGFace::createFace): (WebCore::HarfBuzzNGFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp. (WebCore): (WebCore::harfbuzzFaceCache): (WebCore::HarfBuzzNGFace::HarfBuzzNGFace): (WebCore::HarfBuzzNGFace::~HarfBuzzNGFace): * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.h. (WebCore): (HarfBuzzNGFace): (WebCore::HarfBuzzNGFace::create): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): 2012-07-17 Kinuko Yasuda <kinuko@chromium.org> Record metrics to measure the usage of Blob([ArrayBuffer]) to eventually deprecate it https://bugs.webkit.org/show_bug.cgi?id=90534 Reviewed by Jian Li. We are removing ArrayBuffer support in Blob constructor (in favor of ArrayBufferView) but before doing that we should record its use relative to ArrayBufferView. http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob No new tests as this has no functional changes. * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::append): 2012-07-17 Joshua Bell <jsbell@chromium.org> IndexedDB: Key generator state not maintained across connections https://bugs.webkit.org/show_bug.cgi?id=91456 Reviewed by Tony Chang. Explicitly store key generator state for each object store in the backing store, rather than deriving it from the maximum key in the data (which violates the spec if data is deleted). This change eliminates a (fragile) per-store cache of the value to simplify the code. A cache could be re-introduced, requiring an "onbeforecommit" hook for object stores, but it seems cleaner to save that for a follow-up patch. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states. (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored). (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state. (WebCore): (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber): (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally checking to see if the new value is greater than the old. (If caller got the value via getKeyGeneratorCurrentNumber it is safe to skip the check.) * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBLevelDBCoding.cpp: * Modules/indexeddb/IDBLevelDBCoding.h: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache. (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task. (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto. (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below. (WebCore::IDBObjectStoreBackendImpl::generateKey): (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-07-17 Joshua Bell <jsbell@chromium.org> IndexedDB: Key generator state not maintained across connections https://bugs.webkit.org/show_bug.cgi?id=91456 Reviewed by Tony Chang. Explicitly store key generator state for each object store in the backing store, rather than deriving it from the maximum key in the data (which violates the spec if data is deleted). This change eliminates a (fragile) per-store cache of the value to simplify the code. A cache could be re-introduced, requiring an "onbeforecommit" hook for object stores, but it seems cleaner to save that for a follow-up patch. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states. (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored). (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state. (WebCore): (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber): (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally checking to see if the new value is greater than the old. (If caller got the value via getKeyGeneratorCurrentNumber it is safe to skip the check.) * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBLevelDBCoding.cpp: * Modules/indexeddb/IDBLevelDBCoding.h: * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache. (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task. (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto. (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below. (WebCore::IDBObjectStoreBackendImpl::generateKey): (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-07-17 Alec Flett <alecflett@chromium.org> IndexedDB: createIndex should throw INVALID_ACCESS_ERR instead of NOT_SUPPORTED_ERR https://bugs.webkit.org/show_bug.cgi?id=91553 Reviewed by Tony Chang. Update createIndex to throw an INVALID_ACCESS_ERR as per the IndexedDB spec. No new tests: existing tests have been updated * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): * Modules/indexeddb/IDBDatabaseException.h: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): 2012-07-17 Adam Barth <abarth@webkit.org> DragImageChromiumMac.cpp is never compiled and can be removed https://bugs.webkit.org/show_bug.cgi?id=91545 Reviewed by Tony Chang. This file would only be compiled on chromium-mac, but it's excluded from that build. This is likely left over from the CG configuration. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/DragImageChromiumMac.cpp: Removed. 2012-07-17 Roger Fong <roger_fong@apple.com> Assertion failure/crash on Windows when using a font in an SVG element with an unresaonbly large font size https://bugs.webkit.org/show_bug.cgi?id=91273 Radar: <rdar://problem/8355401> Reviewed by Tim Horton. When using a font in an SVG element with an unreasonably large font size in Windows, WebKit crashes. The problem has to do with font sizes overflowing into negative values in the Windows specific code. The fix is to cap the font sizes to something reasonable when the font style is getting processed. The fix will apply to both CSS and SVG so that behaviour is consistent. Test: svg/text/font-size-too-large-crash.svg * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFontSize::applyValue): This is where the font size capping now occurs. Caps size to 1000000. Both CSS and SVG reach the font size capping code here. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Capping here removed, moved to StyleBuilder.cpp. 2012-07-17 David Barr <davidbarr@chromium.org> Add parsing and style application for css3-images image-orientation https://bugs.webkit.org/show_bug.cgi?id=89624 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation Test: fast/css/image-orientation/image-orientation.html * css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation. (WebCore): Add CSSPropertyImageOrientation to computedProperties. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings. * css/CSSParser.cpp: Add parsing rule for image-orientation. (WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle. * css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum. (WebCore): Add conditional include for ImageOrientation.h. (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles. (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations. * css/CSSProperty.cpp: Add CSSPropertyImageOrientation. (WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited. * css/CSSPropertyNames.in: Add image-orientation. * css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation. (WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum. * css/StyleResolver.cpp: Handle CSSPropertyImageOrientation. (WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder. * rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation. * rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation. (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors. (WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison. * rendering/style/StyleRareInheritedData.h: Add m_imageOrientation. (StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum. 2012-07-17 Adrienne Walker <enne@google.com> REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view() https://bugs.webkit.org/show_bug.cgi?id=91525 Reviewed by Julien Chaffraix. Fix by doing an early out check. This is intended to fix the crash in http://crbug.com/137161. No new test, because unfortunately a layout test is ill-suited to reproing this kind of Document creation/destruction bug. * rendering/RenderObject.cpp: (WebCore::RenderObject::willRenderImage): 2012-07-17 Emil A Eklund <eae@chromium.org> vertical-align: middle causes overflow with subpixel layout https://bugs.webkit.org/show_bug.cgi?id=91464 Reviewed by Eric Seidel. Using vertical-align: middle in combination with an overflow value other than visible can cause the overflow height to be computed incorrectly. Test: fast/sub-pixel/vertical-align-middle-overflow.html * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::verticalPositionForBox): Round verticalPosition after calculation instead of flooring the result of the xHeight calculation. By flooring it the resulting value is in effect rounded up which can cause the height of the box to grow by one. By rounding the resulting value thevertical position is more accurate and the off by one error is avoided. 2012-07-17 Emil A Eklund <eae@chromium.org> Incorrect offset used for scrollWidth/Height calculation https://bugs.webkit.org/show_bug.cgi?id=91461 Reviewed by Eric Seidel. Due to a different offset being used to calculate the scrollWidth/Height and pixelSnappedClientWidth/Height the scroll value can be off by one in same cases. This can causes scrollbars to appear even when there is no overflow. Test: fast/sub-pixel/block-with-margin-overflow.html * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): Change location offset passed to snapSizeToPixel to include x() to match offset used by pixelSnappedClientWidth. (WebCore::RenderBox::scrollHeight): Change location offset passed to snapSizeToPixel to include y() to match offset used by pixelSnappedClientHeight. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clampScrollOffset): Change calculation to use pixelSnappedClientWidth/Height as it is subtracted from the pixel snapped scrollWidth/Height values. (WebCore::RenderLayer::scrollWidth): (WebCore::RenderLayer::scrollHeight): Change RenderLayer versions of scrollWidth/Height to include x()/y() as per the RenderBox versions. 2012-07-16 Emil A Eklund <eae@chromium.org> Inconsistent rounding in table layout causes background color to bleed through https://bugs.webkit.org/show_bug.cgi?id=91410 Reviewed by Eric Seidel. At certain zoom levels a rounding error in the table layout code cases the table background color to bleed through between cells. Tables layout happens on pixel bounds however the paint offset wasn't correctly rounded. Test: fast/sub-pixel/table-rows-no-gaps.html * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): Round paintOffset before passing it to the paint method of the children. 2012-07-12 MORITA Hajime <morrita@google.com> [Shadow DOM] <video> with <shadow> crashes https://bugs.webkit.org/show_bug.cgi?id=91055 Reviewed by Kent Tamura. This is similar to Bug 90480, where an undesired renderer is created by locating an insertion point on the shadow boundary. This change adds a guard for such case by cheking whether the source node of each to-be-created renderer comes from the UA shadow tree, which is allowed to have a renderer. Test: fast/dom/shadow/insertion-point-video-crash.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check. (WebCore::HTMLMediaElement::mediaControls): Added const. (WebCore::HTMLMediaElement::hasMediaControls): Added const. * html/HTMLMediaElement.h: (HTMLMediaElement): 2012-07-12 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object. https://bugs.webkit.org/show_bug.cgi?id=91057 Reviewed by Kent Tamura. This patch changes NSLocale object of LocaleMac::m_locale variable to current NSLocale object rather than newly created NSLocale object from locale identifier. No new tests. We don't have way to change system preferences from test scripts and restoring them. To test this patch, we need to do so. * platform/text/mac/LocaleMac.h: (LocaleMac): Added a constructor which takes NSLocale object. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object. (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier. 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=83016 Reviewed by Martin Robinson. * platform/network/soup/CookieStorageSoup.cpp: (WebCore::soupCookiesChanged): Do not notify about changes in other cookie jars than the current one. 2012-07-12 Philip Rogers <pdr@google.com> Refactor RenderSVGShape bounding box code https://bugs.webkit.org/show_bug.cgi?id=90655 Reviewed by Nikolas Zimmermann. RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by not caching the object bounding box and instead computing it on each call. For consistency and performance objectBoundingBox has been refactored to return a cached value. createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement now updates the internal state of the shape (bounding boxes, etc) from the associated element. RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement. After this change all bounding box computation is now handled in updateShapeFromElement. Because subclasses override updateShapeFromElement it will be easy for them to have custom bounding box code there (as will happen for RenderSVGPath in a followup patch). strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call. Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and m_strokeBoundingBox of RenderSVGShape instead of having their own. This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code. No new tests, just a refactoring. * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::updateShapeFromElement): (WebCore): (WebCore::RenderSVGEllipse::fillShape): (WebCore::RenderSVGEllipse::strokeShape): (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): * rendering/svg/RenderSVGEllipse.h: (RenderSVGEllipse): (WebCore::RenderSVGEllipse::isEmpty): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): (WebCore): (WebCore::RenderSVGRect::fillShape): (WebCore::RenderSVGRect::strokeShape): (WebCore::RenderSVGRect::shapeDependentStrokeContains): (WebCore::RenderSVGRect::shapeDependentFillContains): * rendering/svg/RenderSVGRect.h: (RenderSVGRect): (WebCore::RenderSVGRect::isEmpty): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::updateShapeFromElement): (WebCore): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::calculateObjectBoundingBox): (WebCore::RenderSVGShape::calculateStrokeBoundingBox): (WebCore::RenderSVGShape::updateRepaintBoundingBox): * rendering/svg/RenderSVGShape.h: (RenderSVGShape): (WebCore::RenderSVGShape::objectBoundingBox): (WebCore::RenderSVGShape::strokeBoundingBox): 2012-07-12 Kent Tamura <tkent@chromium.org> Do not save the form state signature if nothing is saved https://bugs.webkit.org/show_bug.cgi?id=91050 Reviewed by Hajime Morita. This change will reduce the size of HistoyItem. Test: fast/forms/state-restore-empty-state.html * html/FormController.cpp: (WebCore::FormController::formElementsState): If stateVector has only the signature string, clear it. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91051> Fix the Qt Mac build after r122400. Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path, which revealed that the code made assumptions about which headers had already been included. * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in a declaration of UpdateSystemActivity when targeting Leopard. 2012-07-11 Matt Falkenhagen <falken@chromium.org> Add dialog element feature toggle to InternalSettings https://bugs.webkit.org/show_bug.cgi?id=90934 Reviewed by Hajime Morita. This enables layout tests to be written for dialog although the feature is disabled by default. Tests: fast/dom/HTMLDialogElement/dialog-disabled.html fast/dom/HTMLDialogElement/dialog-enabled.html * WebCore.exp.in: Added newly exported symbol. * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag. (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag. (WebCore::InternalSettings::setDialogElementEnabled): Added. (WebCore): * testing/InternalSettings.h: Added support for dialog. (Backup): (InternalSettings): * testing/InternalSettings.idl: Added support for dialog. 2012-07-11 Kent Tamura <tkent@chromium.org> Accessing width or height of a detached image input element causes crash https://bugs.webkit.org/show_bug.cgi?id=90885 Reviewed by Kentaro Hara. Test: fast/forms/image/width-and-height-of-detached-input.html * html/ImageInputType.cpp: (WebCore::ImageInputType::height): Add null check for m_imageLoader. (WebCore::ImageInputType::width): ditto. 2012-07-11 Kent Tamura <tkent@chromium.org> Do not save state of stateless form controls https://bugs.webkit.org/show_bug.cgi?id=90964 Reviewed by Hajime Morita. By Bug 89409, we started to store unmodified form control state. However we don't need to make such state for the following types. - password - submit - reset - button - keygen Test: fast/forms/state-restore-skip-stateless.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState): Added. Disable saving state for submit, reset, and button types. * html/BaseButtonInputType.h: (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState. * html/HTMLFormControlElementWithState.h: (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState): Added. Checks InputType::shouldSaveAndRestoreFormControlState first. * html/HTMLInputElement.h: (HTMLInputElement): Override shouldSaveAndRestoreFormControlState. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState) Added. Disable saving state for <keygen>.: * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState. * html/InputType.cpp: (WebCore::InputType::shouldSaveAndRestoreFormControlState): Added. Enable saving state for all types by default. * html/InputType.h: (InputType): Add shouldSaveAndRestoreFormControlState. * html/PasswordInputType.cpp: (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState): Added. Disabled saving state. (WebCore::PasswordInputType::saveFormControlState): Because shouldSaveAndRestoreFormControlState() returns false, saveFormControlState should be never called. * html/PasswordInputType.h: (PasswordInputType): Override shouldSaveAndRestoreFormControlState. 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com> Compilation error with GLES2 when using gl2ext.h from ANGLE. https://bugs.webkit.org/show_bug.cgi?id=91030 Reviewed by Kenneth Russell. gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header, but we should work around it until fixed headers are integrated. * platform/graphics/opengl/Extensions3DOpenGLES.h: (Extensions3DOpenGLES): Removed the "PROC" suffix to work around the header bug. 2012-07-11 Mark Rowe <mrowe@apple.com> Attempt to fix the Chromium Mac build after r122400. * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if building for a new enough version of OS X. 2012-07-11 Kent Tamura <tkent@chromium.org> [Mac] Sort project.pbxproj * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file 2012-07-11 Dan Bernstein <mitz@apple.com> When a table row height grows because of pagination, not all cells’ heights are adjusted https://bugs.webkit.org/show_bug.cgi?id=91043 Reviewed by Sam Weinig. The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad side effects: earlier cells on the row would not grow by the same amount, and later cells on the row would factor the existing growth into their intrinsic padding. Test: fast/multicol/table-row-height-increase.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height, the additional height needed is recorded, and the cell is shrunk back to row height. Then after finishing the row, all cells occurring on the row (including cells spanning it but not starting on it) are grown by the same amount. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions. Reviewed by Dan Bernstein. The deployment target is already set to the version that we're targeting, and it's that setting which determines which functionality from the SDK is available to us. * Configurations/Base.xcconfig: 2012-07-11 Mark Rowe <mrowe@apple.com> Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build. Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros Reviewed by Filip Pizlo. * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available. * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared. * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are available. * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared. 2012-07-11 Mark Rowe <mrowe@apple.com> <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros This removal was handled by a script that translates the relevant macros in to the equivalent checks using the system availability macros. Reviewed by Filip Pizlo. * WebCore.exp.in: * accessibility/AccessibilityList.h: * accessibility/AccessibilityTable.h: * accessibility/mac/AXObjectCacheMac.mm: * editing/mac/EditorMac.mm: * loader/MainResourceLoader.cpp: * loader/MainResourceLoader.h: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: * page/mac/SettingsMac.mm: * platform/LocalizedStrings.cpp: * platform/MemoryPressureHandler.cpp: * platform/audio/mac/AudioBusMac.mm: * platform/graphics/Gradient.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/ca/GraphicsLayerCA.cpp: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: * platform/graphics/ca/mac/TileCache.mm: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/cg/ImageBufferDataCG.cpp: * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/cg/ImageCG.cpp: * platform/graphics/cg/ImageSourceCG.cpp: * platform/graphics/cg/PathCG.cpp: * platform/graphics/cocoa/FontPlatformDataCocoa.mm: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/ComplexTextControllerCoreText.mm: * platform/graphics/mac/FontCacheMac.mm: * platform/graphics/mac/FontCustomPlatformData.cpp: * platform/graphics/mac/FontMac.mm: * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/graphics/mac/WebLayer.h: * platform/graphics/mac/WebLayer.mm: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/mac/CursorMac.mm: * platform/mac/DisplaySleepDisabler.cpp: * platform/mac/DisplaySleepDisabler.h: * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/MemoryPressureHandlerMac.mm: * platform/mac/NSScrollerImpDetails.h: * platform/mac/PlatformEventFactoryMac.mm: * platform/mac/PopupMenuMac.mm: * platform/mac/ScrollAnimatorMac.mm: * platform/mac/ScrollElasticityController.mm: * platform/mac/SharedTimerMac.mm: * platform/mac/SuddenTermination.mm: * platform/mac/WebCoreFullScreenWindow.mm: * platform/mac/WebCoreNSCellExtras.h: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/mac/WebFontCache.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/network/Credential.h: * platform/network/ResourceHandle.h: * platform/network/cf/DNSCFNet.cpp: * platform/network/cf/ProxyServerCFNet.cpp: * platform/network/cf/ResourceRequest.h: * platform/network/cf/ResourceRequestCFNet.cpp: * platform/network/cf/SocketStreamHandleCFNet.cpp: * platform/network/mac/AuthenticationMac.mm: * platform/network/mac/CookieStorageMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/network/mac/ResourceRequestMac.mm: * platform/network/mac/WebCoreURLResponse.mm: * platform/text/TextChecking.h: * platform/text/cf/HyphenationCF.cpp: * platform/text/mac/HyphenationMac.mm: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerCompositor.cpp: * rendering/RenderThemeMac.mm: 2012-07-11 Robert Kroeger <rjkroege@chromium.org> Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true https://bugs.webkit.org/show_bug.cgi?id=89580 WebKit GTK and Chromium Linux force vertical wheel events to scroll horizontally when over horizontal scroll bars. This is undesirable for touchpad scrolling with hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas. Reviewed by Adam Barth. Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html * page/EventHandler.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: (EventHandler): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 2012-07-11 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Build fix for r122373. * platform/chromium/support/WebCompositorSharedQuadState.cpp: (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): 2012-07-11 Shinya Kawanaka <shinyak@chromium.org> SVGUseElement should not use Element::ensureShadowRoot(). https://bugs.webkit.org/show_bug.cgi?id=90938 Reviewed by Hajime Morita. We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM. This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create a shadow subtree is to create a method createShadowSubtree(), I obeyed it. No new tests. Simple refactoring. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::create): (WebCore::SVGUseElement::createShadowSubtree): (WebCore): * svg/SVGUseElement.h: (SVGUseElement): 2012-07-11 Alexandre Elias <aelias@google.com> [chromium] Move compositor quads to Platform/chromium/public https://bugs.webkit.org/show_bug.cgi?id=90582 Reviewed by Adrienne Walker. This moves CCSharedQuadState, CCDrawQuad, and all but two CC*DrawQuad classes to the WebKit namespace, as a first step to pushing them across the process boundary for the ubercompositor. - The intent is to serialize the class hierarchy using the same mechanism as WebInputEvent. In order to do this, there are three requirements: pure POD data, a method returning size, and a packing pragma. - Private data members are fine with this kind of serializer, and a default constructor is not needed. Because of that, we can maintain the same encapsulation and convenient APIs (behind WEBKIT_IMPLEMENTATION) as the original classes. To ease the transition, the original WebCore headers still exist and typedef to the new classes. - However, SharedQuadState will be serialized using the normal IPC_STRUCT_TRAITS macro, so I made its members public. A custom serializer (on quad lists) will maintain the pointers from quads to SharedQuadStates. - I converted the Material casting mechanism to materialCast() methods living in the derived classes. That way, the WebCompositorQuad header doesn't need to know about all its derived classes. - Quad classes not yet transitioned can still be used in non-ubercompositor mode. CCRenderPassDrawQuad and CCYUVVideoDrawQuad are currently non-POD and I left them in their original files. This approach is the best I've found so far, since it preserves all WebCore-facing APIs and avoids unnecessary code duplication (new quad types or members can be added by modifying only one place). There also should not be an unreasonable amount of custom serializer code required. No new tests. (No-op refactoring.) * WebCore.gypi: * platform/chromium/support/WebCompositorQuad.cpp: Added. (WebKit): (WebKit::WebCompositorQuad::WebCompositorQuad): (WebKit::WebCompositorQuad::opaqueRect): (WebKit::WebCompositorQuad::setQuadVisibleRect): (WebKit::WebCompositorQuad::size): * platform/chromium/support/WebCompositorSharedQuadState.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp. (WebKit): (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState): (WebKit::WebCompositorSharedQuadState::create): (WebKit::WebCompositorSharedQuadState::isLayerAxisAlignedIntRect): * platform/chromium/support/WebCompositorSolidColorQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp. (WebKit): (WebKit::WebCompositorSolidColorQuad::create): (WebKit::WebCompositorSolidColorQuad::WebCompositorSolidColorQuad): (WebKit::WebCompositorSolidColorQuad::materialCast): * platform/chromium/support/WebCompositorTextureQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp. (WebKit): (WebKit::WebCompositorTextureQuad::create): (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad): (WebKit::WebCompositorTextureQuad::setNeedsBlending): (WebKit::WebCompositorTextureQuad::materialCast): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: (WebCore::CCCheckerboardDrawQuad::create): (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad): (WebCore::CCCheckerboardDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h: (CCCheckerboardDrawQuad): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: (WebCore::CCDebugBorderDrawQuad::create): (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad): (WebCore::CCDebugBorderDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: (CCDebugBorderDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed. * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: (WebCore::CCIOSurfaceDrawQuad::create): (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad): (WebCore::CCIOSurfaceDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: (CCIOSurfaceDrawQuad): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): * platform/graphics/chromium/cc/CCSharedQuadState.h: (WebCore): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: (WebCore::CCStreamVideoDrawQuad::create): (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad): (WebCore::CCStreamVideoDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: (CCStreamVideoDrawQuad): * platform/graphics/chromium/cc/CCTextureDrawQuad.h: (WebCore): * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: (WebCore::CCTileDrawQuad::create): (WebCore::CCTileDrawQuad::CCTileDrawQuad): (WebCore::CCTileDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCTileDrawQuad.h: (CCTileDrawQuad): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: (WebCore::CCYUVVideoDrawQuad::create): (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad): (WebCore::CCYUVVideoDrawQuad::materialCast): (WebCore): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: (CCYUVVideoDrawQuad): 2012-07-11 Robert Kroeger <rjkroege@chromium.org> [chromium] [regression] Don't use ScrollByPrecisePixels on Chromium Mac. https://bugs.webkit.org/show_bug.cgi?id=91020 Reviewed by Adam Barth. A change in https://bugs.webkit.org/show_bug.cgi?id=87535 to improve the operation of smooth scrolling incorrectly caused Chromium Mac to use the wrong scroll granularity on hasPreciseScrollingDeltas() == true wheelevent scrolls. Exclude the change on the Chromium Mac platform. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): Adjusted #ifdef to exclude Chromium Mac from ScrollByPrecisePixels change. 2012-07-11 Jia Pu <jpu@apple.com> On Mac, autocorrection sometimes fails to take place in Safari. https://bugs.webkit.org/show_bug.cgi?id=89982 Reviewed by Ryosuke Niwa. We should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should early return in markAndReplaceFor(). Also, since we don't want autocorrection to happen when we only change selection, not the content, so we shouldn't set TextCheckingTypeCorrection flag in markMisspellingsAndBadGrammar() as this function is triggered only by selection change. * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): (WebCore::Editor::markMisspellingsAndBadGrammar): 2012-07-11 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122361. http://trac.webkit.org/changeset/122361 https://bugs.webkit.org/show_bug.cgi?id=91027 Broke Windows build and fast/forms/state-restore-broken- state.html (Requested by rniwa on #webkit). * testing/Internals.idl: 2012-07-10 Simon Fraser <simon.fraser@apple.com> Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode https://bugs.webkit.org/show_bug.cgi?id=90919 Reviewed by Antti Koivisto. r121124 added a fast path for geometry mapping that goes via layers when possible. However, this broke paginated pages, which put the root (RenderView) layer into column mode, because it failed to check for columns on the ancestor layer. Rather than make a risky change to convertToLayerCoords(), add a local function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(), but doesn't check for compositing (compositing itself is not a reason to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer to check whether the ancestor has columns, which fixes the bug. Test: compositing/columns/geometry-map-paginated-assert.html * rendering/RenderGeometryMap.cpp: (WebCore::canMapViaLayer): (WebCore::RenderGeometryMap::pushMappingsToAncestor): 2012-07-11 Dana Jansens <danakj@chromium.org> [chromium] Rename layerRect to contentRect for rects that live in content space https://bugs.webkit.org/show_bug.cgi?id=90843 Reviewed by Adrienne Walker. Dropped the layerTransform() from CCSharedQuadState, as nothing should be using it to draw with. RenderPasses need a weird drawTransform right now which was stored in layerTransform, so moved this to the RenderPass quad. No new tests. No change in behaviour. * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::update): (WebCore::ContentLayerChromium::needMoreUpdates): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::update): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::visibleContentOpaqueRegion): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::visibleContentRect): (WebCore::LayerChromium::setVisibleContentRect): (LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawIOSurfaceQuad): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateBounds): (WebCore::TiledLayerChromium::setNeedsDisplayRect): (WebCore::TiledLayerChromium::invalidateContentRect): (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::setTexturePriorities): (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): (WebCore::TiledLayerChromium::visibleContentOpaqueRegion): (WebCore::TiledLayerChromium::updateContentRect): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::visibleContentRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): (WebCore::CCLayerImpl::appendDebugBorderQuad): (WebCore::CCLayerImpl::visibleContentOpaqueRegion): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::visibleContentRect): (WebCore::CCLayerImpl::setVisibleContentRect): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::contentRectToTileIndices): (WebCore::CCLayerTilingData::opaqueRegionInContentRect): (WebCore::CCLayerTilingData::setBounds): * platform/graphics/chromium/cc/CCLayerTilingData.h: (CCLayerTilingData): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleContentRect): (WebCore::layerShouldBeSkipped): (WebCore): (WebCore::calculateVisibleAndScissorRectsInternal): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::addOcclusionBehindLayer): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::drawTransform): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect): * platform/graphics/chromium/cc/CCSharedQuadState.h: (CCSharedQuadState): (WebCore::CCSharedQuadState::visibleContentRect): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion): 2012-07-11 Chris Fleizach <cfleizach@apple.com> ARIA spinbutton role incorrectly mapped to ProgressIndicatorRole https://bugs.webkit.org/show_bug.cgi?id=77298 Reviewed by Anders Carlsson. * accessibility/AccessibilityObject.cpp: (WebCore::createARIARoleMap): 2012-07-11 Huang Dongsung <luxtella@company100.net> BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized. https://bugs.webkit.org/show_bug.cgi?id=90757 Reviewed by Simon Fraser. The current code fortunately has worked so far because only BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized. startAnimation returns at the first line becase shouldAnimate() always return false in this case. if (m_frameTimer || !shouldAnimate() || frameCount() <= 1) return; This change is needed because parallel image decoders call BitmapImage::frameIsCompleteAtIndex in other places too. No new tests, manually tested whether the caller exists or not that calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is initialized. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameIsCompleteAtIndex): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Update code to use the new constant name. * platform/wx/PasteboardWx.cpp: (WebCore::Pasteboard::documentFragment): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Ignore array and sequence types for attributes as well as functions since the CPP bindings do not yet support them. * bindings/scripts/CodeGeneratorCPP.pm: (SkipAttribute): 2012-07-11 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Use DOMStringList instead of DOMString[] for in / out type. * testing/Internals.idl: 2012-07-11 Dana Jansens <danakj@chromium.org> [chromium] Minimum size used for occlusion tracking should be a setting on CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=90993 Reviewed by Adrienne Walker. Move the default minimum size used for occlusion tracking from the CCOcclusionTracker class into CCLayerTreeSettings. This value is then used on both threads as the lower limit for any occlusion to be remembered. This allows us to use (0, 0) as the minimum size for tests, allowing all occlusion to be tracked. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.h: 2012-07-11 Anders Carlsson <andersca@apple.com> Add -Wtautological-compare and -Wsign-compare warning flags https://bugs.webkit.org/show_bug.cgi?id=90994 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2012-07-11 Dean Jackson <dino@apple.com> TileCache layers have wrong border debug color https://bugs.webkit.org/show_bug.cgi?id=90922 Reviewed by Simon Fraser. Commit r122152 updated the layer hierarchy when a tile cache is being used by the view. As part of that, GraphicsLayerClient::shouldUseTileCache() was changed to return false in some situations (the idea was that it should only be called from the createGraphicsLayer method). However there were two other call points: one that sets the debug colors on borders, the other was a call that keeps the document background in sync. Add a new method usingTileCache() that returns the current state. Also fix a FIXME where the debug code always called into the client rather than caching the value on the GraphicsLayer. Test: compositing/document-background-color.html * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::updateDebugIndicators): check the local variable when setting the debug colors. * platform/graphics/GraphicsLayer.h: (GraphicsLayer): new bool member variable m_usingTileCache. * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::usingTileCache): new virtual method to query if this client is actually using the tile cache. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): set the member variable m_usingTileCache if the GraphicsLayerClient says we are. * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::usingTileCache): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): call usingTileCache() rather than shouldUseTileCache(), because the latter's value might not always reflect the existence of a cache. 2012-07-11 Ryosuke Niwa <rniwa@webkit.org> Clang build fix after r122345. Also let XCode do its own thing. * WebCore.xcodeproj/project.pbxproj: * html/HTMLCollection.cpp: (WebCore::HTMLCollectionWithArrayStorage::item): * html/HTMLCollection.h: (HTMLCollectionWithArrayStorage): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::itemInArrayAfter): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::itemInArrayAfter): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): 2012-07-11 Arnaud Renevier <a.renevier@sisa.samsung.com> [Gtk] allow building with css-filters https://bugs.webkit.org/show_bug.cgi?id=90908 Reviewed by Eric Seidel. Add support for css-filters in Source/WebCore/GNUmakefile.am configure.ac No functional change, so no new tests. * GNUmakefile.am: 2012-07-10 Ryosuke Niwa <rniwa@webkit.org> HTMLFormCollection::item and HTMLPropertiesCollection::item should share code https://bugs.webkit.org/show_bug.cgi?id=90932 Reviewed by Anders Carlsson. Merged HTMLFormCollection::item and HTMLPropertiesCollection::item as HTMLCollectionWithArrayStorage::item, which can be merged into HTMLCollection::item in a follow up patch. Also moved the call to invalidateCacheIfNeeded into HTMLCollection::updateNameCache() as done in HTMLPropertiesCollection. In addition, moved the early bail out for when the base element doesn't have itemscope attribute from individual functions to updateRefElements so that HTMLCollectionWithArrayStorage::item doesn't need to have this check. * html/HTMLCollection.cpp: (WebCore::HTMLCollectionWithArrayStorage::item): Added. It's based on HTMLPropertiesCollection::item but it only has the single loop (as supposed to nested loops) as HTMLFormCollection doesn't have multiple items per element in the array unlike HTMLPropertiesCollection. In addition, offsetInArray (was i in HTMLPropertiesCollection::item) is incremented in each itemAfter due to this semantic difference in each itemAfter. (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): * html/HTMLCollection.h: (HTMLCollectionWithArrayStorage): (WebCore::HTMLCollectionWithArrayStorage::HTMLCollectionWithArrayStorage): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::calcLength): Merged numberOfFormControlElements since it was only called here. (WebCore::HTMLFormCollection::itemAfter): Added. HTMLFormCollection has exactly one item per element in the array so we increment the offset in each iteration. Note that when we're continuing a search, we need to increment the offset in order to avoid returning the same item. (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::updateRefElements): Set m_hasItemRefElements true upfront since we never fail to update ref elements. Bail out as soon as we cleared the m_itemRefElements when the base element doesn't have itemscope content attribute. (WebCore::HTMLPropertiesCollection::itemAfter): Added. We reset previousItem to null because the existing itemAfter requires previousItem be null when we're moving to a new entry in m_itemRefElements. (WebCore::HTMLPropertiesCollection::calcLength): (WebCore::HTMLPropertiesCollection::cacheFirstItem): (WebCore::HTMLPropertiesCollection::updateNameCache): Merged findProperties since this was the only caller. (WebCore::HTMLPropertiesCollection::names): (WebCore::HTMLPropertiesCollection::namedItem): (WebCore::HTMLPropertiesCollection::hasNamedItem): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): Made updateRefElements public as it's called in HTMLCollectionWithArrayStorage::item. 2012-07-11 Sami Kyostila <skyostil@chromium.org> RenderView layer is marked as fixed position container in the scrolling tree if page scale != 1 https://bugs.webkit.org/show_bug.cgi?id=89216 Reviewed by Simon Fraser. Render layers with CSS transforms should become containers for any fixed positioned descendants. However, because this check is done with RenderLayer::hasTransform(), we also end up marking the RenderLayer for the RenderView as fixed position container if a non-identity page scale factor is used. This is because page scale is applied as a transform for that layer. This breaks fixed position layers, because they become fixed relative to the RenderView layer instead of outer scroll clip layer. The fix is to avoid marking any root layers as fixed position containers. No new test because the scrolling tree isn't currently testable. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-07-11 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r116203): overflow sections don't have scrollbars https://bugs.webkit.org/show_bug.cgi?id=90052 Reviewed by Simon Fraser. This issue stems from RenderLayers with overlay scrollbars not being considered self-painting. After r120395 (follow-up of r116203), we ignore subtrees that have no self-painting layer for painting. Normal scrollbars are painted by their renderer so they were properly painted. However overlay scrollbars need to be painted by their RenderLayer as a separate phase (see bug 57057) so they were not painted anymore. The fix is simple: make RenderLayer with overlay scrollbars self-painting as they should have been in the first place. Unfortunately no tests as I don't think we have a good way of testing overlay scrollbars. Tested manually though on the super simple test case from the bug. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::shouldBeSelfPaintingLayer): Overlay scrollbars make the layer self-painting. (WebCore::RenderLayer::updateScrollbarsAfterLayout): Added a call to updateSelfPaintingLayer. (WebCore::RenderLayer::styleChanged): Moved the call to updateSelfPaintingLayer after recomputing the scrollbars to ensure proper behavior. Added a comment underlining the reason. (WebCore::RenderLayer::updateSelfPaintingLayer): Renamed as it is now called during layout too. * rendering/RenderLayer.h: (RenderLayer): Updated after updateSelfPaintingLayer rename. 2012-07-11 Allan Sandfeld Jensen <allan.jensen@nokia.com> NodesFromRect doesn't work on SVG root elements. https://bugs.webkit.org/show_bug.cgi?id=89990 Reviewed by Antonio Gomes. Adds support for rect-based hit-testing on the SVG root element. This means that while rect-based hit-testing is still not supported within SVG elements, that at least it works on SVG root elements as it would on any other replaced element. Test: fast/dom/nodesFromRect-svg.html * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): 2012-07-11 Joshua Netterfield <jnetterfield@rim.com> [Qt] REGRESSION(r122250): It broke USE(3D_GRAPHICS)=1 and ENABLE(WEBGL)=0 builds https://bugs.webkit.org/show_bug.cgi?id=90943 Reviewed by Csaba Osztrogonác. Uses proper guarding in Extensions3DOpenGLCommon and Extensions3DOpenGLES as per https://bugs.webkit.org/show_bug.cgi?id=90506. No new tests, becasue there is no new functionality. * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Use proper guarding. * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Use proper guarding. 2012-07-10 Pavel Feldman <pfeldman@chromium.org> Web Inspector: migrate from background images to CSS for statusbar rendering. https://bugs.webkit.org/show_bug.cgi?id=90902 Reviewed by Vsevolod Vlasov. This change removes statusbar* images and uses gradients and borders to re-create original inspector look. * WebCore.gypi: * inspector/front-end/Images/statusbarBackground.png: Removed. * inspector/front-end/Images/statusbarBottomBackground.png: Removed. * inspector/front-end/Images/statusbarButtons.png: Removed. * inspector/front-end/Images/statusbarMenuButton.png: Removed. * inspector/front-end/Images/statusbarMenuButtonSelected.png: Removed. * inspector/front-end/StatusBarButton.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (body.drawer-visible #main-status-bar): (body.drawer-visible #main-status-bar::after): (.status-bar-background): (.status-bar > div): (.glyph): (button.status-bar-item): (.status-bar button.status-bar-item:active): (select.status-bar-item): (select.status-bar-item, select.status-bar-item:hover): (body.detached .alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar .status-bar-item): (.alternate-status-bar-buttons-bar .status-bar-item.emulate-active): (#drawer): (body.drawer-visible #drawer-contents): (#drawer-status-bar): * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (button.status-bar-item.scripts-navigator-show-hide-button): (button.status-bar-item.scripts-navigator-show-hide-button:active): (button.status-bar-item.scripts-debugger-show-hide-button): (button.status-bar-item.scripts-debugger-show-hide-button:active): 2012-07-11 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] crash in CookieDatabaseBackingStore. https://bugs.webkit.org/show_bug.cgi?id=90270 Reviewed by George Staikos. There is one case for this crash. 1. A browser crashes and locks cookies' database for a while. 2. Open a new browser when the old one doesn't finish crashing. 3. The new one writes the cookies' database and receives a SQLITE_BUSY error in CookieDatabaseBackingStore's invokeOpen. So this database isn't opened. 4. invokeGetCookiesWithLimit returns 0. 5. Crash happens when using a null pointer. Add function setBusyTimeout(1000) and a guard for cookies' pointer. setBusyTimeout will call sqlite3_busy_timeout. When the SQLite database is accessed for reading it is locked for writing until the reading access is finished. Another process cannot access the database while it is locked. The timeout time sets a limit while this process tries to access the locked database. If the database is unlocked within the timeout time it can be accessed, otherwise an access fails. No new tests. This crash is hard to reproduce, and it happens only on our platform. * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp: (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase): 2012-07-11 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Move revisions support to UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=90888 Reviewed by Pavel Feldman. Moved revisions support to UISourceCode. Revision management code is moved unchanged where possible and should be refactored later. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): revision is now added to uiSourceCode, not resource. * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._notifyUISourceCodeContentCommitted): Extension server is now listening for Workspace.UISourceCodeContentCommitted event instead of ResourceTreeModel.ResourceContentCommitted. * inspector/front-end/Resource.js: * inspector/front-end/ResourceTreeModel.js: ResourceTreeModel.ResourceContentCommitted renamed to Workspace.UISourceCodeContentCommitted. * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): ResourceSourceFrame is not update when revisions are added anymore as resource conenten is considered immutable now * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.populateRevisions): (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.showHistory): (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem): (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryView.prototype._revealUISourceCode.get if): (WebInspector.RevisionHistoryView.prototype._revealUISourceCode): (WebInspector.RevisionHistoryView.prototype._reset): * inspector/front-end/ScriptSnippetModel.js: Snippets are not loaded before ResourceTreeModel.mainFrame is available anymore. (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.requestOriginalContent): (WebInspector.UISourceCode.prototype._setContent): (WebInspector.UISourceCode.prototype.addRevision): (WebInspector.UISourceCode.prototype._restoreRevisionHistory): (WebInspector.UISourceCode.prototype._clearRevisionHistory): (WebInspector.UISourceCode.prototype.revertToOriginal): (WebInspector.UISourceCode.prototype.revertAndClearHistory): (WebInspector.UISourceCode.prototype.revertAndClearHistory.clearHistory): (WebInspector.UISourceCode.prototype.commitWorkingCopy): (WebInspector.UISourceCode.prototype.canonicalMimeType): (WebInspector.Revision): (WebInspector.Revision._revisionHistoryRegistry): (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist): (WebInspector.Revision._ensureStaleRevisionsFileteredOut): (WebInspector.Revision.prototype.get uiSourceCode): (WebInspector.Revision.prototype.get timestamp): (WebInspector.Revision.prototype.get content): (WebInspector.Revision.prototype.revertToThis): (WebInspector.Revision.prototype.contentURL): (WebInspector.Revision.prototype.contentType): (WebInspector.Revision.prototype.requestContent): (WebInspector.Revision.prototype.searchInContent): (WebInspector.Revision.prototype._persist): * inspector/front-end/UserAgentSupport.js: Drive-by closure compilation fix. * inspector/front-end/Workspace.js: * inspector/front-end/inspector.js: ScriptSnippetModel is now created after ResourceTreeModel. 2012-07-11 MORITA Hajime <morrita@google.com> WebCoreSupport needs objects each of which follows major WebCore objects https://bugs.webkit.org/show_bug.cgi?id=88499 Reviewed by Alexey Proskuryakov. This change - Makes Internals rough lifetime to follow Document. Note that Internals can survive longer than Document in same case. Internals::m_document is cleared when the document destruction is notified. - Makes InternalSettings rough lifetime to follow the Page. This is done by making InternalSettings a supplement of the page. Now InternalSettings object is created per Page instead of per Frame. Per-test setting clearance is done by newly introduced InternalSettings::Backup, which recovers the modified settings and refreshes it for each time a test starts. * WebCore.exp.in: * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::from): (WebCore::InternalSettings::~InternalSettings): (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::reset): (WebCore::InternalSettings::settings): (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame): (WebCore::InternalSettings::setFixedPositionCreatesStackingContext): (WebCore::InternalSettings::allowRoundingHacks): (WebCore::InternalSettings::userPreferredLanguages): (WebCore::InternalSettings::setUserPreferredLanguages): (WebCore::InternalSettings::setShouldDisplayTrackKind): (WebCore::InternalSettings::shouldDisplayTrackKind): (WebCore::InternalSettings::setPagination): * testing/InternalSettings.h: (Backup): (InternalSettings): (WebCore::InternalSettings::page): * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore): (WebCore::Internals::contextDocument): (WebCore::Internals::frame): (WebCore::Internals::settings): (WebCore::Internals::setPagination): Replaced as an alias. (WebCore::Internals::userPreferredLanguages): Replaced as an alias. (WebCore::Internals::setUserPreferredLanguages): Replaced as an alias. (WebCore::Internals::setShouldDisplayTrackKind): Replaced as an alias. (WebCore::Internals::shouldDisplayTrackKind): Replaced as an alias. (WebCore::Internals::emitInspectorDidBeginFrame): (WebCore::Internals::emitInspectorDidCancelFrame): (WebCore::Internals::allowRoundingHacks): Replaced as an alias. * testing/Internals.h: (WebCore): (Internals): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): 2012-07-11 Yoshifumi Inoue <yosin@chromium.org> [Mac] Expose time format related functions https://bugs.webkit.org/show_bug.cgi?id=90956 Reviewed by Kent Tamura. This patch introduces localizedTimeFormatText, localizedShortTimeFormatText and timeAMPMLabels for Mac within feature flag ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. See also: ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965 Win version: https://bugs.webkit.org/show_bug.cgi?id=90236 No new tests. This patch doesn't change behavior. * platform/text/mac/LocalizedDateMac.cpp: (WebCore::localizedTimeFormatText): Added. (WebCore::localizedShortTimeFormatText): Added. (WebCore::timeAMPMLabels): Added. 2012-07-11 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Adding HarfBuzz-ng for Linux https://bugs.webkit.org/show_bug.cgi?id=90362 Reviewed by Tony Chang. This patch adds harfbuzz-ng support for Chromium Linux port as a part of transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng callbacks by using Skia APIs. For now, the feature is enabled only when WTF_USE_HARFBUZZ_NG is defined. No new tests. No change in behavior now. * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files. * WebCore.gypi: Added HarfBuzzFaceSkia.cpp * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG). (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG). (WebCore::substituteWithVerticalGlyphs): 2012-07-11 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Clean up FileSystem related code https://bugs.webkit.org/show_bug.cgi?id=90592 Reviewed by Vsevolod Vlasov. Clean up FileSystem related code in Inspector as follows: - Clean up layout tests and add test case for error case, - Fix error handling on request, - s/GetFileSystemRootTask/FileSystemRootRequest/g - s/ReadDirectoryTask/DirectoryContentRequest/g - s/ReadFileTask/FileContentRequest/g Tests: http/tests/inspector/filesystem/request-directory-content.html http/tests/inspector/filesystem/request-file-content.html http/tests/inspector/filesystem/request-filesystem-root.html http/tests/inspector/filesystem/request-metadata.html * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): Add early error handling. (WebCore::InspectorFileSystemAgent::requestDirectoryContent): Add early error handling. (WebCore::InspectorFileSystemAgent::requestMetadata): Add early error handling. (WebCore::InspectorFileSystemAgent::requestFileContent): Add early error handling. * inspector/InspectorFileSystemAgent.h: Remove unused forward declaration and unused header. (WebCore): (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestMetadata): Add early error handling. (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileContent): Add early error handling. 2012-07-09 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Forward message loop instrumentation data to frontend. https://bugs.webkit.org/show_bug.cgi?id=89584 Reviewed by Yury Semikhatsky. Transmit collected message loop tasks to inspector frontend. Now "Program" should be a top-level event on browsers that support message loop instrumentation. Frontend was changed so that user will not see any changes. * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): Added new event type - "Program" (WebCore::InspectorTimelineAgent::willProcessTask): Begin "Program" event. (WebCore::InspectorTimelineAgent::didProcessTask): Finish "Program" event. (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): Do not add counters to "Program" events. (WebCore): (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic): Renamed from "setHeapSizeStatistic" * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): Unwraps "Program" events. (WebInspector.MemoryStatistics.prototype._innerRecordAdded): Renamed from "_onRecordAdded" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): Unwraps "Program" events. (WebInspector.TimelineFrameController.prototype._innerAddRecord): Renamed from "_addRecord" * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): Filter out "Program" category. (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): Filter out "Program" category. (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): Unwraps "Program" events. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): Added "Program" category. (WebInspector.TimelinePresentationModel.recordStyle): Ditto. (WebInspector.TimelinePresentationModel.prototype.addRecord): Unwraps "Program" events. (WebInspector.TimelinePresentationModel.prototype._addRecord): Renamed from "addRecord" 2012-07-11 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Adding HarfBuzz-ng for Linux https://bugs.webkit.org/show_bug.cgi?id=90362 Reviewed by Tony Chang. This patch adds harfbuzz-ng support for Chromium Linux port as a part of transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng callbacks by using Skia APIs. For now, the feature is enabled only when WTF_USE_HARFBUZZ_NG is defined. No new tests. No change in behavior now. * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files. * WebCore.gypi: Added HarfBuzzFaceSkia.cpp * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG). (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto. (WebCore): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto. (FontPlatformData): * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added. (WebCore): (WebCore::SkiaScalarToHarfbuzzPosition): (WebCore::SkiaGetGlyphWidthAndExtents): (WebCore::harfbuzzGetGlyph): (WebCore::harfbuzzGetGlyphHorizontalAdvance): (WebCore::harfbuzzGetGlyphHorizontalOrigin): (WebCore::harfbuzzGetGlyphExtents): (WebCore::harfbuzzSkiaGetFontFuncs): (WebCore::harfbuzzSkiaGetTable): (WebCore::destroyPaint): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG). (WebCore::substituteWithVerticalGlyphs): 2012-07-11 Kenneth Russell <kbr@google.com> compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion https://bugs.webkit.org/show_bug.cgi?id=82412 Reviewed by Adrienne Walker. When compositing premultipliedAlpha=false WebGL canvases, use a separate blend function for the alpha channel to avoid writing alpha < 1. This makes the behavior more consistent with all other compositing results and avoids situations where the alpha channel is preserved on some platforms and discarded on others. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawTextureQuad): Use separate alpha blend function when compositing premultipliedAlpha=false WebGL canvases. 2012-07-10 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Windows] Implement functions for localized time format information https://bugs.webkit.org/show_bug.cgi?id=90236 Reviewed by Kent Tamura. This patch introduces following localized time format related functions: - localizedTimeFormatText - localizeShortTimeFormatText() - timeAMPMLabels for Windows in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. See also: ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965 Mac version: https://bugs.webkit.org/show_bug.cgi?id=90237 Tests: WebKit/chromium/tests/LocalWinTest.cpp * platform/text/LocaleWin.cpp: (WebCore::mapCharacterToDateTimeFieldType): Added. (WebCore::convertWindowsTimeFormatToLDML): Added. (WebCore::LocaleWin::timeFormatText): Added. (WebCore::LocaleWin::shortTimeFormatText): Added. (WebCore::LocaleWin::timeAMPMLabels): Added. * platform/text/LocaleWin.h: (LocaleWin): Added time format related functions and variables. * platform/text/LocalizedDateWin.cpp: (WebCore::localizedTimeFormatText): Added. (WebCore::localizedShortTimeFormatText): Added. (WebCore::timeAMPMLabels): Added. 2012-07-10 Douglas Stockwell <dstockwell@chromium.org> Style not updated for element with display:none becoming first/last-child https://bugs.webkit.org/show_bug.cgi?id=90356 Reviewed by Kent Tamura. Always trigger style recalc when an element without a renderer becomes the first/last-child. Tests: fast/css/first-child-display-change.html fast/css/last-child-display-change.html * dom/Element.cpp: (WebCore::checkForSiblingStyleChanges): 2012-07-10 Shinya Kawanaka <shinyak@chromium.org> ShadowRoot should know its type in debug build. https://bugs.webkit.org/show_bug.cgi?id=90933 Reviewed by Hajime Morita. For assertion, ShadowRoot should know its type is UserAgentShadowRoot or AuthorShadowRoot. This patch also renames ShadowRootCreationPurpose to ShadowRootType, since it is suitable name for ShadowRoot to have. No new tests, since it is used only for assertion. * dom/Element.cpp: (WebCore::Element::ensureShadowRoot): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::create): * dom/ShadowRoot.h: (ShadowRoot): (WebCore::ShadowRoot::type): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::createShadowSubtree): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::createShadowSubtree): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::createShadowSubtree): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::createShadowSubtree): * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::createShadowSubtree): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::createShadowSubtree): * html/InputType.cpp: (WebCore::InputType::destroyShadowSubtree): Asserts that ShadowRoot type is UserAgentShadowRoot. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::getDecorationRootAndDecoratedRoot): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::createShadowSubtree): 2012-07-10 George Staikos <staikos@webkit.org> Add missing binding type String for IndexedDB. https://bugs.webkit.org/show_bug.cgi?id=90351 Reviewed by Nikolas Zimmermann. No new tests because it's already covered by IDB tests. * bindings/js/JSIDBAnyCustom.cpp: (WebCore::toJS): 2012-07-10 Brian Anderson <brianderson@chromium.org> [chromium] Make full texture updates explicit https://bugs.webkit.org/show_bug.cgi?id=90507 Reviewed by Adrienne Walker. Covered by existing tests. * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::updatePart): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::appendFullUpdate): (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): 2012-07-10 Shinya Kawanaka <shinyak@chromium.org> Crash in nextLinePosition() due to accessing a removed root line box. https://bugs.webkit.org/show_bug.cgi?id=90484 Reviewed by Abhishek Arya. When <object> element is reattached, the 'content' style is compared to the old style. If it is not the same, a flag to recalc style is enabled. Because of this, the recalc style flag is not cleared in updateLayoutIgnorePendingStyleSheets() in nextLinePosition(), and it causes the second layout in isEditablePosition(p). Then 'RootInlineBox root' is invalidated, but it's used after that. When the content of the same <object> elements are compared, they should be the same. However, operator== for ContentData is not implemented correctly (it compares a pointer instead of content). So operator== does not hold for the content of the same <object> elements. Test: editing/execCommand/crash-extend-selection-forward.html * rendering/style/ContentData.cpp: (WebCore::operator==): Compares the instance of data instead of pointer. 2012-07-10 Joshua Bell <jsbell@chromium.org> IndexedDB: Ensure transaction abort events are deterministic in multiprocess ports https://bugs.webkit.org/show_bug.cgi?id=90412 Reviewed by Tony Chang. In multi-process ports (e.g. Chromium), transaction aborts triggered on the front-end could be initiated while a "success" event was in-flight from the back end. This would lead to apparently flaky behavior when requests would sometimes report success and sometimes report an error. Address this by having front-end triggered aborts do the abort steps immediately, then send the async abort request to the back end. No new tests - behavior in single process ports (and DRT) covered by existing tests. Will enable currently disabled Chromium tests to be enabled (crbug.com/83226). * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): Initialize a new m_requestAborted flag, used to prevent dispatching if an in-flight request comes in after the abort. (WebCore::IDBRequest::abort): Set flag to prevent double dispatching. (WebCore::IDBRequest::onError): Handle aborted-then-received-event case. (WebCore::IDBRequest::onSuccess): Ditto. (WebCore::IDBRequest::onSuccessWithContinuation): Ditto. (WebCore::IDBRequest::dispatchEvent): On uncaught error, trigger abort on transaction front-end. * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::abort): Do abort steps locally first, then notify back-end. (WebCore::IDBTransaction::onAbort): If abort wasn't triggered locally, clean up is still necessary. 2012-07-10 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION(r112113): absolutely positioned INPUT boxes with a table cell containing block have a 0px height https://bugs.webkit.org/show_bug.cgi?id=89209 Reviewed by Ojan Vafai. Test: fast/forms/input-in-table-cell-no-value.html The issue comes from the layout code not properly resetting the overriden heigth between layouts. The test case relies on a table cell as it requires a 2 pass layout. Between the 2 passes, different code paths would be taken, leading to previous values being used to over-constrain the inner content. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): Ensure consistent layout by resetting any overriden conditional height. 2012-07-10 Kevin Ellis <kevers@chromium.org> Input elements with type=range do not have default touch handlers. https://bugs.webkit.org/show_bug.cgi?id=88807 Reviewed by Antonio Gomes. This patch adds support for touch event handling on input elements and dragging a slider with touch start and move events. Previously, manipulating a slider on a touch screen required generation of synthetic mouse events. Tests: fast/events/touch/touch-slider-no-js-touch-listener.html fast/events/touch/touch-slider.html * dom/Event.cpp: (WebCore::Event::isTouchEvent): (WebCore): * dom/Event.h: (Event): * dom/Touch.cpp: (WebCore::Touch::Touch): * dom/Touch.h: (WebCore::Touch::absoluteLocation): (Touch): * dom/TouchEvent.cpp: (WebCore::TouchEvent::isTouchEvent): (WebCore): * dom/TouchEvent.h: (TouchEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::~HTMLInputElement): (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::defaultEventHandler): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore): (WebCore::InputType::handleTouchEvent): (WebCore::InputType::hasTouchEventHandler): * html/InputType.h: (WebCore): (ClickHandlingState): (InputType): * html/RangeInputType.cpp: (WebCore): (WebCore::RangeInputType::handleTouchEvent): (WebCore::RangeInputType::hasTouchEventHandler): * html/RangeInputType.h: (RangeInputType): * html/shadow/SliderThumbElement.h: (SliderThumbElement): 2012-07-10 Pravin D <pravind.2k4@gmail.com> Re-factoring recalcColumn in AutoTableLayout.cpp for readability https://bugs.webkit.org/show_bug.cgi?id=89636 Reviewed by Julien Chaffraix. No test case required. Code re-factoring. * rendering/AutoTableLayout.cpp: Added a const integer place holder for 32760. (WebCore::AutoTableLayout::recalcColumn): Changes : 1) Moved the continue statement above the bool cellHasContent for an early return. 2) Replaced the constant 32760 by a placeholder. 3) Initialization of columnLayout max and min logical widths is made common for both cells having col span == 1 and span > 1. 4) Removed redundant check for cell logical width type. 2012-07-10 Adam Barth <abarth@webkit.org> WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed https://bugs.webkit.org/show_bug.cgi?id=90910 Reviewed by Eric Seidel. We've already removed the code that implements Hixie76 WebSockets. This patch just removes the WebCore::Setting that used to control which WebSocket protocol version we'd use. I've left the WebKit-layer APIs in place, but they now don't do anything. I'll remove all the Chromium callers shortly. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): 2012-07-10 Philip Rogers <pdr@google.com> Crash due to SVG animation element not removed from target (before reset) https://bugs.webkit.org/show_bug.cgi?id=90750 Reviewed by Abhishek Arya. Previously we were not removing an animation element from SVGDocumentExtensions::m_animatedElements which led to a crash. This change properly removes animation elements in resetTargetElement which both fixes this bug and will prevent others from hitting it in the future. Test: svg/animations/dynamic-modify-attributename-crash2.svg * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget): removeAllAnimationElementsFromTarget now adds all the animation elements to a vector and iterates over it because the changes to resetTargetElement would have caused us to modify the underlying hashset as we iterated. Note that before we deleted animationElementsForTarget in removeAllAnimationElementsFromTarget but that logic is now handled in removeAnimationElementFromTarget which is called during resetTargetElement. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::removedFrom): Because of the changes in resetTargetElement, removedFrom was able to be refactored. This patch changes removedFrom to call resetTargetElement rather than have duplicated logic. There is a very small change in logic here: animationAttributeChanged() is now called in removedFrom(). (WebCore::SVGSMILElement::resetTargetElement): resetTargetElement now fully resets the target, including removing it from m_animatedElements. This will prevent future instances of this bug. 2012-07-10 Helder Correia <helder.correia@nokia.com> [Qt] Repaint counter for accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=90116 Reviewed by Noam Rosenthal. No new tests, just introducing a debug feature. For this feature to be enabled, the environment variable QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled, both repaint counters and tile borders will be painted. Important notes: - Only WebKit2 is targetted for now. - There is no integration with Preferences. That aproach was taken initially but revealed complex and overkill for such a debugging-only functionality. Thus, to disable it simply restart with the environment variable unset or set to some other value. A Qt-specific drawRepaintCounter() function was added to TextureMapperGL. A QImage is used as scratch buffer to paint borders and counters. It is then uploaded to a BitmapTexture acquired from the pool and finally draw by TextureMapper. The actual compositing happens inside LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile now has a repaint counter which gets incremented in LayerBackingStore::updateTile(). * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore): (WebCore::TextureMapperGL::drawRepaintCounter): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperImageBuffer.h: 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Replace use of ManagedTexture with CCScopedTexture for impl thread and remove implTextureManager from LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=90841 Reviewed by Adrienne Walker. Remove the TextureManager from LayerRendererChromium, which was the last instance of the class in the compositor. Instead of using ManagedTexture objects for RenderPass textures, use instances of CCScopedTexture, which manage the lifetime of the allocated texture ids. TextureManager will be removed entirely once all callers of memoryUseBytes() have been removed. No new tests. No change in behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::releaseRenderPassTextures): (WebCore): (WebCore::LayerRendererChromium::renderPassTextureSize): (WebCore::LayerRendererChromium::renderPassTextureFormat): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawQuad): (WebCore::applyFilters): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::isCurrentRenderPass): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useScopedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: (WebCore::TrackingTextureAllocator::create): (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCRenderer.h: (WebCore): (CCRenderer): 2012-07-10 Dean Jackson <dino@apple.com> REGRESSION (r109610): Order of values in shorthand animation makes a difference https://bugs.webkit.org/show_bug.cgi?id=84533 <rdar://problem/11831924> <rdar://problem/11815787> Reviewed by Simon Fraser. A previous revision (r109610) updated the parsing of the animation shorthand to make sure that animation-name wouldn't clobber other styles. The side effect of this was that we'd no longer find animation-name if it wasn't first in the list. This commit reverts the change and fixes it in a different way, by always parsing animation-name as the last property in the shorthand. This means that keywords for timing functions, fill modes and iteration will match before animation name. In other words, if you want an animation called "forwards" you should use the longhand property, because the shorthand will first match that against animation-fill-mode. Test: animations/animation-shorthand-name-order.html * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationShorthand): make a new array of longhand properties to check for, with name as the last entry rather than the first. Use this array to test the properties in the shorthand. 2012-07-10 Huang Dongsung <luxtella@company100.net> Fix a potential bug of BitmapImage::frameCount(). https://bugs.webkit.org/show_bug.cgi?id=90756 Reviewed by Simon Fraser. If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This does not mean that the frame count is actually 0. So we must set m_haveFrameCount to true only when m_frameCount is not 0. The current code is okay because BitmapImage::frameCount() is never called before the decoder is initialized. However, this no longer holds true once we introduce parallel image decoders. No new tests, no behavior change. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameCount): 2012-07-10 Ojan Vafai <ojan@chromium.org> Build fix. Removing unused variable from http://trac.webkit.org/changeset/122264. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeContentLogicalHeightUsing): 2012-07-10 Ryosuke Niwa <rniwa@webkit.org> HTMLPropertiesCollection should share more code with HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=90842 Reviewed by Anders Carlsson. Got rid of HTMLPropertiesCollection::m_cache, and added m_itemRefElements, m_propertyNames, m_propertyCache, m_hasPropertyNameCache, and m_hasItemRefElements to HTMLPropertiesCollection itself. These are caches specific to HTMLPropertiesCollection. Note that hasNameCache has been renamed to m_hasPropertyNameCache and itemRefElementPosition has been replaced by cachedElementsArrayOffset() in HTMLCollectionCacheBase (also used in HTMLFormCollection). Also deleted all methods on m_cache except updatePropertyCache since caches can be accessed directly from HTMLPropertiesCollection. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::invalidateCache): * html/HTMLCollection.h: (HTMLCollection): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): (WebCore): (WebCore::HTMLPropertiesCollection::updateRefElements): (WebCore::HTMLPropertiesCollection::itemAfter): (WebCore::HTMLPropertiesCollection::calcLength): (WebCore::HTMLPropertiesCollection::cacheFirstItem): (WebCore::HTMLPropertiesCollection::item): (WebCore::HTMLPropertiesCollection::findProperties): (WebCore::HTMLPropertiesCollection::updateNameCache): (WebCore::HTMLPropertiesCollection::names): (WebCore::HTMLPropertiesCollection::namedItem): (WebCore::HTMLPropertiesCollection::hasNamedItem): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): (WebCore::HTMLPropertiesCollection::clearCache): (WebCore::HTMLPropertiesCollection::updatePropertyCache): 2012-07-10 Ojan Vafai <ojan@chromium.org> Add support for min-height:auto and min-width:auto https://bugs.webkit.org/show_bug.cgi?id=88437 Reviewed by Tony Chang. Right now auto does the same thing as min-height/min-width:0. For flex-items it should be the same as min-content (followup patch). http://dev.w3.org/csswg/css3-flexbox/#min-size-auto Tests: fast/css/auto-min-size.html fast/css/deprecated-flexbox-auto-min-size.html * WebCore.order: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return 0px for the computed value of auto. * css/CSSParser.cpp: (WebCore::CSSParser::validWidth): (WebCore): (WebCore::CSSParser::validHeight): (WebCore::CSSParser::parseValue): * css/CSSParser.h: (CSSParser): Restructure width/height parsing to reduce code duplication and make it easier to add auto as a valid min value. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSizeConstraints): This code was unnecessarily checking intrinsicOrAuto since auto was previously not an allowed value for minWidth/minHeight. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): (WebCore::RenderBox::sizesLogicalWidthToFitContent): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computeContentLogicalHeightUsing): (WebCore::RenderBox::computeReplacedLogicalWidth): (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::RenderBox::computePositionedLogicalHeight): (WebCore::RenderBox::computePositionedLogicalHeightUsing): Need to pass a SizeType to all these methods so that we know if the Length we're working with is a min length since auto has a different meaning now for min lengths. * rendering/RenderBox.h: (RenderBox): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): (WebCore::RenderFlexibleBox::lineBreakLength): (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/RenderScrollbarPart.cpp: (WebCore::calcScrollbarThicknessUsing): (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/style/RenderStyle.h: Default minHeight/minWidth to auto instead of 0px. 2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle() https://bugs.webkit.org/show_bug.cgi?id=90826 Reviewed by Adam Barth. No new tests. The change to this file is refactoring only. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike(). 2012-07-10 Raymond Toy <rtoy@google.com> AudioFIFO not correctly wrapping the write index on push https://bugs.webkit.org/show_bug.cgi?id=90901 Reviewed by Chris Rogers. No new tests * platform/audio/AudioFIFO.cpp: (WebCore::AudioFIFO::push): Wrap the write index, not read index! 2012-07-10 Dana Jansens <danakj@chromium.org> [chromium] Avoid allocating render pass textures that have no content https://bugs.webkit.org/show_bug.cgi?id=90702 Reviewed by Adrienne Walker. When OOM conditions are hit, textures are not allocated for some layers which can prevent any quads from being present for a render surface. This is used as a signal to prevent the RenderPass from allocating a texture. Replace the CCLayerTreeHostImpl::removePassesWithCachedTextures() method with a general removeRenderPasses() which takes a culling control object and will remove passes based on the inputs from the control object. This new method is used for the old purpose of removing passes with cached textures, as well as to remove passes that do not have any quad inputs. Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass): (WebCore::CCLayerTreeHostImpl::removeRenderPasses): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CullRenderPassesWithCachedTextures): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListBegin): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListEnd): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListNext): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::CullRenderPassesWithCachedTextures): (CCLayerTreeHostImpl): (CullRenderPassesWithNoQuads): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListBegin): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListEnd): (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListNext): 2012-07-10 Joshua Netterfield <jnetterfield@rim.com> Make GC3D and E3D more maintainable for GLES platforms https://bugs.webkit.org/show_bug.cgi?id=90567 Reviewed by Rob Buis. This patch cleans up code for WebGL on OpenGLES platforms which use GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL, GraphicsContext3DOpenGLCommon, and GraphicsContext3DOpenGLES, this patch is an attempt to refactor this code in a way that will help BlackBerry and other teams support WebGL on mobile platforms with as little use of "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the separation of Extensions3DOpenGL into Extensions3DOpenGLCommon, Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction of OpenGLESShims. This patch is created in large part by Jonathan Feldstein. No new tests: no new behaviour. * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build * Target.pri: Add new Extensions3DOpenGL* to WebGL builds * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function. (WebCore): * platform/graphics/OpenGLESShims.h: Added. * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports (WebCore): (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon (WebCore): (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::supports): (WebCore::Extensions3DOpenGLCommon::ensureEnabled): (WebCore::Extensions3DOpenGLCommon::isEnabled): (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does. (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLCommon): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG): (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG): (WebCore::Extensions3DOpenGLES::createVertexArrayOES): (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES): (WebCore::Extensions3DOpenGLES::isVertexArrayOES): (WebCore::Extensions3DOpenGLES::bindVertexArrayOES): (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports (WebCore::Extensions3DOpenGLES::getExtensions): * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::isTexture): (WebCore): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::deleteBuffer): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): (WebCore::GraphicsContext3D::releaseShaderCompiler): 2012-07-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=90646 <rdar://problem/11648478> 3-pass pagination slows down pagination Improve the logical top estimate function for margin collapsing to be more accurate. In particular make the basic case of <body><p> or <body><h1> no longer be wrong. This estimate being incorrect is not a big deal most of the time, but when paginating it is a very big deal, since you have to relayout everything whenever your vertical placement is wrong. Improving the estimation exposed a bug in an existing layout test. I had to clean up the buggy code written for negative margin-related float detection and fix an invalid layout test to actually be correct. Reviewed by Simon Fraser. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::marginBeforeEstimateForChild): (WebCore): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::marginValuesForChild): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): 2012-07-10 Alexei Filippov <alexeif@chromium.org> Web Inspector: Count inspector memory used to traverse DOM in native memory snapshots. https://bugs.webkit.org/show_bug.cgi?id=90456 Inspector may take significant amount of memory when traversing DOM structure. Take it into account and report under inspector memory. Reviewed by Pavel Feldman. * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryInstrumentation::calculateContainerSize): (WebCore::MemoryInstrumentation::reportHashMap): (WebCore::MemoryInstrumentation::reportHashSet): (WebCore::MemoryInstrumentation::reportVector): * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::domTreeInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): 2012-07-10 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [GTK] Fix memory leaks by adopting allocation of GdkPixbuf https://bugs.webkit.org/show_bug.cgi?id=90790 Reviewed by Carlos Garcia Campos. Fixed a memory leak in paintGdkPixbuf by adopting an allocation of GdkPixbuf. No new tests. No change in behavior. * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintGdkPixbuf): 2012-07-10 Konrad Piascik <kpiascik@rim.com> Web Inspector: Geolocation override https://bugs.webkit.org/show_bug.cgi?id=89365 Reviewed by Yong Li. Added a way to override the geoloation of a client using Web Inspector. New tests added. * LayoutTests/inspector/geolocation-success.html: * LayoutTests/inspector/getlocation-error.html: * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::GeolocationController): Now store and save the Page in m_page. (WebCore::GeolocationController::positionChanged): Check if position is overriden in Web Inspector. * Modules/geolocation/GeolocationController.h: (GeolocationController): Add member variable m_page for Page*. * inspector/Inspector.json: Add new methods for setting and clearing the GeoloationPosition and GeolocationError objects in InspectorPageAgent. * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::checkGeolocationPositionOrErrorImpl): Add methods to check whether GeolocationPosition or GeolocationError are set in InspectorPageAgent. * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::checkGeolocationPositionOrError): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize new member variables of GeolocationPosition and GeolocationError. (WebCore::InspectorPageAgent::setGeolocationData): Set Position and Error data and call appropriate GeolocaitonController methods. (WebCore): (WebCore::InspectorPageAgent::clearGeolocationData): (WebCore::InspectorPageAgent::sendGeolocationError): * inspector/InspectorPageAgent.h: (WebCore::InspectorPageAgent::geolocationPosition): Getter for GeolocationPosition. (InspectorPageAgent): * inspector/front-end/Settings.js: Added new settings for GeolocationPosition and GeolocationError * inspector/front-end/SettingsScreen.js: Added new control for Geolocaiton. (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked): (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if): (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput): (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement): * inspector/front-end/UserAgentSupport.js: New GeolocationPosition Object added along with setting helper methods. Added new setting changed handlers for Position and Error. (WebInspector.UserAgentSupport.GeolocationPosition): (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting): (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput): (WebInspector.UserAgentSupport.prototype.get _onGeolocationErrorChanged): 2012-07-10 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Refactor resource revisions before moving to UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=90855 Reviewed by Pavel Feldman. Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier. Restoring revisions from local storage is separated from filtering out stale persisted revisions. Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore. Renamed localStorage field for persisting revisions: "resource-history" -> "revision-history" * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.addRevision): (WebInspector.Resource.prototype._restoreRevisionHistory): (WebInspector.Resource.prototype._clearRevisionHistory): (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory): (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.Revision): (WebInspector.Revision._revisionHistoryRegistry): (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist): (WebInspector.Revision._ensureStaleRevisionsFileteredOut): (WebInspector.Revision.prototype._persist): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._processCachedResources): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): * inspector/front-end/RevisionHistoryView.js: * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._revisionAdded): 2012-07-10 Alice Cheng <alice_cheng@apple.com> Editing: Reproducible crasher when pasting a 0x0 image into Mail https://bugs.webkit.org/show_bug.cgi?id=90640 <rdar://problem/11141920> Reviewed by Brady Eidson. 0x0 images don't get a resource representation in the WebArchive, so we need a null check Test: TestWebKitAPI/Tests/mac/0.png TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm * platform/mac/PasteboardMac.mm: (WebCore::documentFragmentWithImageResource): 2012-07-10 Nikita Vasilyev <me@elv1s.ru> Web Inspector: Make the Tab character 4 spaces width https://bugs.webkit.org/show_bug.cgi?id=90172 Reviewed by Pavel Feldman. Do it to match most code editors' behavior. * inspector/front-end/inspectorCommon.css: (body): 2012-07-10 Eric Seidel <eric@webkit.org> REGRESSION (r122168): Layout Test http/tests/misc/script-defer.html is failing https://bugs.webkit.org/show_bug.cgi?id=90845 Reviewed by Alexey Proskuryakov. I was a bit overzealous in removing bool returns. This one still makes sense. This just reverts the wrong part of my previous change. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): * html/parser/HTMLScriptRunner.h: (HTMLScriptRunner): 2012-07-10 Kevin Ellis <kevers@chromium.org> Input type=range issue with events not being raised when value set in js https://bugs.webkit.org/show_bug.cgi?id=84674 Fix dispatching of change and click events for the input slider. Prior to the fix, change events were not fired if the new value matched the value at last change notification based on expected behavior for text fields. Clicks were not fired if the thumb element was repositioned under the cursor on mouse down. Reviewed by Kent Tamura. Tests: fast/events/click-range-slider.html fast/events/onchange-range-slider.html * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): 2012-07-10 Huang Dongsung <luxtella@company100.net> Don't destroy the decoded data of an image if WebKit is about to render the image. https://bugs.webkit.org/show_bug.cgi?id=90721 Reviewed by Antti Koivisto. When the cache capacity of the MemoryCache is exceeded, the decoded data of all the CachedImages are destroyed. Even the images inside the viewport are destroyed. However, if the images need to be rendered again due to scoll events or animation, they must be decoded again. As an extreme case, if there is an animation with an image when MemoryCache is almost full, the image must be decoded every frame. This slows down animation and needlessly consumes CPU cycles. Therefore, it is better to not destory the decoded data of an image if the image is inside the viewport because there is high chance that the image needs to be rendered again soon. This patch reduces the unnecessary repetition of image decoding on low memory, and also relieves the memory fragmentation because it avoids reallocation of image frames. In addition, there is another positive side effect. Currently, CachedImageClient::willRenderImage() is used only to determine if GIF animation needs to be paused or not in CachedImage::shouldPauseAnimation(). This patch makes GIF animation outside the viewort be paused. This is also a prerequisite for parallel image decoders. Because parallel image decoders decode an image asynchronously, clients cannot render the image at the time when the request is made. Clients can draw the image later after receiving image decoding complete notification. However, there is a problem because MemoryCache can destroy the decoded data before clients actually render the image. So parallel image decoders must prevent the decoded data from being destroyed if the image will be rendered soon. This patch may consume a little more memory, but furtunately the peak memory usage is almost the same. No new tests - no new testable functionality. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::likelyToBeUsedSoon): (WebCore): (WebCore::CachedImage::shouldPauseAnimation): * loader/cache/CachedImage.h: (CachedImage): * loader/cache/CachedResource.h: (CachedResource): (WebCore::CachedResource::likelyToBeUsedSoon): * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::pruneLiveResourcesToSize): * rendering/RenderObject.cpp: (WebCore::RenderObject::willRenderImage): 2012-07-10 Kent Tamura <tkent@chromium.org> RTL calendar picker for <input type=date> is too narrow and clipped https://bugs.webkit.org/show_bug.cgi?id=90864 Reviewed by Kentaro Hara. Tests: ManualTests/forms/calendar-picker.html * Resources/calendarPicker.js: (fixWindowSize): Checks the left edge of elemenets in RTL. (layout): Add dir=ltr for the manual test, which re-uses the document. 2012-07-10 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122178. http://trac.webkit.org/changeset/122178 https://bugs.webkit.org/show_bug.cgi?id=90857 browser tests, PrerenderBrowserTest.PrerenderFavicon and other tests, started to fail (Requested by hayato on #webkit). * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::iconURLs): (WebCore::Document::addIconURL): (WebCore::Document::setUseSecureKeyboardEntryWhenActive): * dom/Document.h: (Document): * html/HTMLLinkElement.cpp: * html/HTMLLinkElement.h: (HTMLLinkElement): * testing/Internals.cpp: * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-10 Adam Barth <abarth@webkit.org> LayoutTestController.dumpConfigurationForViewport should move to Internals https://bugs.webkit.org/show_bug.cgi?id=45652 Reviewed by Eric Seidel. This patch replaces LayoutTestController.dumpConfigurationForViewport with Internals.configurationForViewport. The old dumpConfigurationForViewport function just ended up calling WebCore functions anyway, so there's no benefit in implementing the API in the LayoutTestController. As a result, these tests can now run on every port. * testing/Internals.cpp: (WebCore::Internals::configurationForViewport): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-07-10 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Fix GTK+ build after r122175. * platform/graphics/texmap/TextureMapperLayer.cpp: Include CString.h when using cairo. 2012-07-10 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Mac] Form related layout tests cause timeout https://bugs.webkit.org/show_bug.cgi?id=90851 Reviewed by Kent Tamura. This patch changed to pass a valid argument to LocaleMac constructor. No new tests. No more timeout in tests listed in the bug. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::currentLocale): Changed to pass local identifier string instead of NSLocale object. 2012-07-10 Yuta Kitamura <yutak@chromium.org> WebSocket: Remove hixie76 protocol implementation https://bugs.webkit.org/show_bug.cgi?id=88620 Reviewed by Adam Barth. This change removes code that implements the old hixie-76 WebSocket protocol which isn't used anymore. No new tests are added, because the code using the current protocol should not be affected. Tests for hixie-76 protocol are skipped (these tests will be removed eventually). * Modules/websockets/ThreadableWebSocketChannel.h: * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: (ThreadableWebSocketChannelClientWrapper): * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::connect): (WebCore::WebSocket::send): (WebCore::WebSocket::protocol): (WebCore::WebSocket::extensions): (WebCore::WebSocket::binaryType): (WebCore::WebSocket::setBinaryType): (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didClose): (WebCore::WebSocket::getFramingOverhead): * Modules/websockets/WebSocket.h: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::send): (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::processBuffer): (WebCore::WebSocketChannel::startClosingHandshake): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): * Modules/websockets/WebSocketChannel.h: (WebSocketChannel): * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::WebSocketHandshake): (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): (WebCore::WebSocketHandshake::readServerHandshake): (WebCore::WebSocketHandshake::checkResponseHeaders): * Modules/websockets/WebSocketHandshake.h: * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask): (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): (Peer): (Bridge): 2012-07-09 Gavin Barraclough <barraclough@apple.com> Threadsafety issues in WebScriptObject https://bugs.webkit.org/show_bug.cgi?id=90849 Reviewed by Filip Pizlo. WebScriptObject maintains a NSMap of wrapper objects. A race condition exists between a wrapper being retrieved from the map, and being released - if the final release on an object is called between a call to getJSWrapper and the subsequent retain, we may end up with a stale object reference. We can make this safe by hoisting the removal from the map from delloc up into release (if the retainCount is 1), and locking release against retrieval from the map. Since release may be called from another thread, and NSMap is not threadsafe, we'd better lock around all access to the map (this fix already necessitates get & remove to be locked, so this just adds 'add', too). * bindings/objc/WebScriptObject.mm: (WebCore::createJSWrapper): - lock around getJSWrapper, retain. (-[WebScriptObject _setImp:originRootObject:rootObject:]): - lock around addJSWrapper. (-[WebScriptObject release]): - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper. (-[WebScriptObject dealloc]): - removeJSWrapper call hoisted into release. 2012-07-09 Christophe Dumez <christophe.dumez@intel.com> [EFL] Battery status code needs refactoring to be reused in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=90760 Reviewed by Hajime Morita. Rename BatteryClientEfl to BatteryProviderEfl and remove dependency on BatteryController by introducing the BatteryProviderEflClient interface. This will allow reusing the BatteryProviderEfl class in WebKit2. No new tests. Already tested by batterystatus/*. * PlatformEfl.cmake: * platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp. (WebCore): (WebCore::BatteryProviderEfl::BatteryProviderEfl): (WebCore::BatteryProviderEfl::batteryStatus): (WebCore::BatteryProviderEfl::startUpdating): (WebCore::BatteryProviderEfl::stopUpdating): (WebCore::BatteryProviderEfl::setBatteryStatus): (WebCore::BatteryProviderEfl::timerFired): (WebCore::BatteryProviderEfl::getBatteryStatus): (WebCore::BatteryProviderEfl::setBatteryClient): * platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h. (WebCore): (BatteryProviderEfl): (WebCore::BatteryProviderEfl::~BatteryProviderEfl): * platform/efl/BatteryProviderEflClient.h: Added. (WebCore): (BatteryProviderEflClient): 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Fix a wrong fix of r122194. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): 2012-07-09 Matt Falkenhagen <falken@chromium.org> Add ENABLE_DIALOG_ELEMENT and skeleton files https://bugs.webkit.org/show_bug.cgi?id=90521 Reviewed by Kent Tamura. This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added. The feature is diabled by default. No new tests, as there is no behavior change. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog. (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled): (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): * dom/ContextFeatures.cpp: (WebCore::ContextFeatures::dialogElementEnabled): (WebCore): * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off. * html/HTMLDialogElement.cpp: Added. (WebCore): (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::create): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::show): * html/HTMLDialogElement.h: Added. (WebCore): (HTMLDialogElement): * html/HTMLDialogElement.idl: Added. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Remove an assertion starting to fail on interactive_ui_tests on Chromium OS. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): 2012-07-09 Hayato Ito <hayato@chromium.org> Unreviewed gardening. Build fix after r122175 * WebCore.gypi: Remove Source/WebCore/platform/graphics/qt/Extensions3DQt.{cpp,h} 2012-07-09 Kiran Muppala <cmuppala@apple.com> Improve performance of RenderInline::absoluteQuads for deeply nested inlines. https://bugs.webkit.org/show_bug.cgi?id=90715 Reviewed by Maciej Stachowiak. No new tests: functionality unchanged. * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a RenderGeometryMap and use it for subsequent mappings. (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext): (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()): 2012-07-09 Yoshifumi Inoue <yosin@chromium.org> [Chromium-Mac] Implement functions for localized time format information https://bugs.webkit.org/show_bug.cgi?id=90237 Reviewed by Kent Tamura. This patch introduces following localized time format related functions: - localizeTimeFormatText() - localizeShortTimeFormatText() - timeAMPMLabels for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS. These function will be used by input type "time" with multiple input fields UI. Note: ICU version of localized time format functions are implemented in https://bugs.webkit.org/show_bug.cgi?id=89965 Tests: WebKit/chromium/tests/LocaleMacTest.cpp * platform/text/mac/LocaleMac.h: (LocaleMac): Added time format related functions and variables. * platform/text/mac/LocaleMac.mm: (WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter. (WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter. (WebCore::LocaleMac::createTimeFormatter): Added. (WebCore::LocaleMac::createShortTimeFormatter): Added. (WebCore::LocaleMac::timeFormatText): Added. (WebCore::LocaleMac::shortTimeFormatText): Added. (WebCore::LocaleMac::timeAMPMLabels): Added. 2012-07-09 Alexandru Chiculita <achicu@adobe.com> [CSS Shaders] The FECustomFilter is not making the GL context active https://bugs.webkit.org/show_bug.cgi?id=90840 Reviewed by Dean Jackson. I've added a couple of makeContextCurrent() in the FECustomFilter related classes. Also, removed the assumption that GraphicsContext3D::create() never returns 0. No new tests, this was crashing on existing tests. * platform/graphics/filters/CustomFilterCompiledProgram.cpp: (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram): (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): * platform/graphics/filters/CustomFilterGlobalContext.cpp: (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): * platform/graphics/filters/CustomFilterMesh.cpp: (WebCore::CustomFilterMesh::CustomFilterMesh): (WebCore::CustomFilterMesh::~CustomFilterMesh): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::deleteRenderBuffers): (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::initializeContext): * platform/graphics/filters/FECustomFilter.h: (FECustomFilter): 2012-07-09 Kent Tamura <tkent@chromium.org> REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden. https://bugs.webkit.org/show_bug.cgi?id=90774 Reviewed by Andreas Kling. Test: fast/forms/hidden/change-type-to-hidden-after-updating-value.html * dom/Element.cpp: (WebCore::Element::setAttributeInternal): Pass a copy of the existing Attribute object. 2012-07-07 Philippe Normand <pnormand@igalia.com> [GStreamer] cache video dimensions https://bugs.webkit.org/show_bug.cgi?id=90733 Reviewed by Martin Robinson. Invalidate the cached video dimensions whenever the video-sink sink pad caps change and let ::naturalSize() lazily recalculate them. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::naturalSize): (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): 2012-07-09 Eric Penner <epenner@google.com> [chromium] Merge updates and idle updates into one pass https://bugs.webkit.org/show_bug.cgi?id=90324 Reviewed by Adrienne Walker. We no longer need to do painting is passes in order to allocate memory in the right order. So this merges updates and idle updates into one pass. Covered by existing unit tests (some of which are updated with this patch). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::needMoreUpdates): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::needMoreUpdates): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::updateLayerRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::paintMasksForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-07-09 Yoshifumi Inoue <yosin@chromium.org> [Platform] Introduce LocaleMac class https://bugs.webkit.org/show_bug.cgi?id=90248 Reviewed by Kent Tamura. This patch moves implementation of localized date format related functions into LocaleMac class as of LocaleWin class for ease of maintain and using specific locale in testing rather than system default locale. Tests: WebKit/chromium/tests/LocaleMacTest.cpp * WebCore.gyp/WebCore.gyp: Include LocaleMac.mm * WebCore.gypi: * platform/text/mac/LocaleMac.h: Replace LocaleWin to LocaleMac. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::LocaleMac): (WebCore::LocaleMac::~LocaleMac): (WebCore::LocaleMac::create): (WebCore::LocaleMac::currentLocale): (WebCore::LocaleMac::createShortDateFormatter): (WebCore::LocaleMac::parseDate): (WebCore::LocaleMac::formatDate): (WebCore::LocaleMac::dateFormatText): (WebCore::LocaleMac::monthLabels): (WebCore::LocaleMac::weekDayShortLabels): (WebCore::LocaleMac::firstDayOfWeek): * platform/text/mac/LocalizedDateMac.cpp: (WebCore::parseLocalizedDate): (WebCore::formatLocalizedDate): (WebCore::localizedDateFormatText): (WebCore::monthLabels): (WebCore::weekDayShortLabels): (WebCore::firstDayOfWeek): * platform/text/mac/LocalizedDateMac.mm: Removed. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Create CCScopedTexture class for creating/freeing textures https://bugs.webkit.org/show_bug.cgi?id=89485 Reviewed by Adrienne Walker. This class provides a standard way to create texture ids in a way that ensures they will be freed later. Also includes a CCTexture base class that holds textureId, size, and format together in a struct that can be used in place of storing an unsigned textureId in other classes. Unit tests: CCScopedTexureTest.NewScopedTexture CCScopedTexureTest.CreateScopedTexture CCScopedTexureTest.ScopedTextureIsDeleted CCScopedTexureTest.LoseScopedTexture * WebCore.gypi: * platform/graphics/chromium/cc/CCScopedTexture.cpp: Added. (WebCore): (WebCore::CCScopedTexture::CCScopedTexture): (WebCore::CCScopedTexture::~CCScopedTexture): (WebCore::CCScopedTexture::allocate): (WebCore::CCScopedTexture::free): (WebCore::CCScopedTexture::leak): * platform/graphics/chromium/cc/CCScopedTexture.h: Added. (WebCore): (CCScopedTexture): (WebCore::CCScopedTexture::create): * platform/graphics/chromium/cc/CCTexture.cpp: Added. (WebCore): (WebCore::CCTexture::setDimensions): (WebCore::CCTexture::bytes): (WebCore::CCTexture::memorySizeBytes): * platform/graphics/chromium/cc/CCTexture.h: Added. (WebCore): (CCTexture): (WebCore::CCTexture::CCTexture): (WebCore::CCTexture::id): (WebCore::CCTexture::size): (WebCore::CCTexture::format): (WebCore::CCTexture::setId): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: deleteDatabase fails if transaction running in other database https://bugs.webkit.org/show_bug.cgi?id=90822 Reviewed by Tony Chang. The IDBLevelDBBackingStore was preventing a deleteDatabase() from running if any other database was running a transaction. Fix by just creating a scratch LevelDBTransaction for the delete steps. Test: storage/indexeddb/deletedatabase-transaction.html * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use a LevelDBTransaction directly. 2012-07-09 Pete Williamson <petewil@google.com> Changed the behavior of iconURLs to always recalculate the list. https://bugs.webkit.org/show_bug.cgi?id=88665 Reviewed by Kent Tamura.. As it turns out, it can contain stale URLs in the case that some script manipulates the DOM, which breaks scripts trying to reset the favicon URL. Also added a method in Internals to allow tests to get the list of icon Tests: fast/dom/icon-url-change.html fast/dom/icon-url-list.html * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class * dom/Document.cpp: (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace * dom/Document.h: (Document): removed the addIconURL method which is no longer used * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor (WebCore): (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor * html/HTMLLinkElement.h: (HTMLLinkElement): declared the icon type and size accessors * testing/Internals.cpp: (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list (WebCore): * testing/Internals.h: (Internals): declared the method for unit testing the icon URL list * testing/Internals.idl: exported the Document::iconURLs function 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Gcc build fix after r122174. * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::decrementAccessCount): 2012-07-09 Alice Cheng <alice_cheng@apple.com> Editing: Autocorrection in blockquotes causes text to break out of quote https://bugs.webkit.org/show_bug.cgi?id=90487 <rdar://problem/11769020> Reviewed by Enrica Casucci. Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html SpellingCorrectionCommand uses ReplaceSelectionCommand to replace the misspelled word with the auto-corrected word. Specifically, ReplaceSelectionCommand does a smart copy, where it breaks out of blockquotes. Thus, the fix is to substitute ReplaceSelectionCommand with InserTextCommand. * editing/SpellingCorrectionCommand.cpp: (WebCore::SpellingCorrectionCommand::doApply): 2012-07-09 No'am Rosenthal <noam.rosenthal@nokia.com> Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE() https://bugs.webkit.org/show_bug.cgi?id=90506 Reviewed by Martin Robinson. GraphicsContext3D, ANGLEWebKitBridge and Extensions3D are now guarded with USE(3D_GRAPHICS) instead of ENABLE(WEBGL). No new tests, build changes only. * Target.pri: Removed references to unused files. * WebCore.pri: Updated the Qt build so that the basic 3D-graphics sources can be compiled even when WebGL is disabled. * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/GraphicsContext3D.cpp: * platform/graphics/opengl/Extensions3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/qt/QWebPageClient.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: * platform/graphics/cairo/DrawingBufferCairo.cpp: * platform/graphics/cairo/GLContext.h: (GLContext): * platform/graphics/cairo/GraphicsContext3DCairo.cpp: * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: * platform/graphics/cg/GraphicsContext3DCG.cpp: * platform/graphics/clutter/DrawingBufferClutter.cpp: * platform/graphics/clutter/GraphicsContext3DClutter.cpp: * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: * platform/graphics/efl/GraphicsContext3DEfl.cpp: * platform/graphics/efl/GraphicsContext3DPrivate.cpp: * platform/graphics/filters/CustomFilterCompiledProgram.cpp: * platform/graphics/filters/CustomFilterCompiledProgram.h: * platform/graphics/filters/CustomFilterGlobalContext.cpp: * platform/graphics/filters/CustomFilterGlobalContext.h: * platform/graphics/filters/CustomFilterMesh.cpp: * platform/graphics/filters/CustomFilterMesh.h: * platform/graphics/filters/CustomFilterProgram.cpp: (WebCore): * platform/graphics/filters/CustomFilterProgram.h: * platform/graphics/filters/FECustomFilter.cpp: * platform/graphics/filters/FECustomFilter.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore): * platform/graphics/glx/GLContextGLX.h: (GLContextGLX): * platform/graphics/gpu/DrawingBuffer.cpp: * platform/graphics/gpu/mac/DrawingBufferMac.mm: * platform/graphics/gpu/qt/DrawingBufferQt.cpp: * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/qt/Extensions3DQt.cpp: Removed. * platform/graphics/qt/Extensions3DQt.h: Removed. * platform/graphics/skia/GraphicsContext3DSkia.cpp: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Chaned ENABLE(WEBGL) to USE(3D_GRAPHICS) 2012-07-09 Yongjun Zhang <yongjun_zhang@apple.com> Consider closing unused localStorage database after a timeout. https://bugs.webkit.org/show_bug.cgi?id=90713 For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds), we can close the underlying sqlite database. Reviewed by Brady Eidson. Test: storage/domstorage/storage-close-database-on-idle.html * storage/Storage.cpp: (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it. (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it. * storage/StorageArea.h: (StorageArea): * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::StorageAreaImpl): (WebCore::StorageAreaImpl::incrementAccessCount): (WebCore): (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document referencing to this storageArea. (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database. * storage/StorageAreaImpl.h: (StorageAreaImpl): * storage/StorageAreaSync.cpp: (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out. * storage/StorageTracker.cpp: (WebCore): (WebCore::StorageTracker::StorageTracker): * storage/StorageTracker.h: (WebCore::StorageTracker::storageDatabaseIdleInterval): (WebCore::StorageTracker::setStorageDatabaseIdleInterval): set the timeout value that we will wait before closing the database. This is currently used by DumpRenderTree only. (StorageTracker): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string https://bugs.webkit.org/show_bug.cgi?id=90474 Reviewed by Tony Chang. Test: storage/indexeddb/transaction-basics.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBDatabase.idl: 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: Remove obsolete accessor plumbing https://bugs.webkit.org/show_bug.cgi?id=90812 Reviewed by Tony Chang. No new tests - just deleting code. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::IDBTransaction): Since backend mode() is disconnected, can no longer assert that front-end/back-end modes match; not worth it to keeping the plumbing. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Remove HashMap workaround for layers with id=0 in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=90825 Reviewed by Adrienne Walker. Layer ids are no longer allowed to be 0, and the behaviour is guarded with asserts, so this workaround is not needed any longer. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): 2012-07-09 Vincent Scheib <scheib@chromium.org> Pointer Lock requestPointerLock rejects locking an element not in a document. https://bugs.webkit.org/show_bug.cgi?id=90821 Reviewed by Adrienne Walker. Test: pointer-lock/lock-element-not-in-dom.html * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): 2012-07-09 Eric Seidel <eric@webkit.org> document.write of scripts that also document.write sometimes writes async https://bugs.webkit.org/show_bug.cgi?id=89102 Reviewed by Adam Barth. When a script tag is first encountered, the TreeBuilder holds the element and returns out to the outer HTMLDocumentParser parse loop. The HTMLDocumentParser then takes the script element and passes it to the HTMLScriptRunner for execution. However, if the script is an "external script" the HTMLScriptRunner may have to wait for that parser blocking script to load, and may store the script in its own m_parserBlockingScript member. While the HTMLScriptRunner has this not-yet-loaded-script the parser is also blocked. Because the "paused" state of the parser was held as a separate bool on the TreeBuilder we'd have to be careful to update it to reflect the current state of this pending script on the HTMLScriptRunner. This patch removes this separate "paused" bool and makes the HTMLDocumentParser responsible for the "paused" state of the parser through the isWaitingForScripts() function which knows how to check both the TreeBuilder and the ScriptRunner for possible parser-blocking scripts. I suspect this change may actually fix a bunch of edge cases where we were not checking for the HTMLScriptRunner's parser blocking script and thus incorrectly ending the parser, or not starting the pre-load scanner, etc. As part of this change I also renamed m_haveParsingBlockingScript in HTMLScriptRunner to match the naming style used elsewhere in the parser, as well as removed all the "bool" return values for these parse/execute functions as they are no longer useful (or correct). The correct way is always to check HTMLDocumentParser::isWaitingForScripts(). Test: fast/parser/cached-script-document-write.html * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible): (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): (WebCore::HTMLDocumentParser::canTakeNextToken): (WebCore::HTMLDocumentParser::isWaitingForScripts): (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTMLDocumentParser::notifyFinished): (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::~HTMLScriptRunner): (WebCore::HTMLScriptRunner::executeParsingBlockingScript): (WebCore::HTMLScriptRunner::execute): (WebCore::HTMLScriptRunner::hasParserBlockingScript): (WebCore::HTMLScriptRunner::executeParsingBlockingScripts): (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad): (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): (WebCore::HTMLScriptRunner::requestParsingBlockingScript): (WebCore::HTMLScriptRunner::runScript): * html/parser/HTMLScriptRunner.h: (HTMLScriptRunner): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::takeScriptToProcess): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processTokenInForeignContent): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::hasParserBlockingScript): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Microdata tests are flaky https://bugs.webkit.org/show_bug.cgi?id=90830 Reviewed by Antti Koivisto. The bug was caused by SpaceSplitString's not copying on write properly. Even if there was exactly one owner of the SpaceSplitString, we should still not modify m_data since m_data is associated with a particular m_keyString in sharedDataMap(). The only situation in which we can safely modify m_data is when m_data's m_keyString is null meaning that it had been unique'ed. Furthermore, this optimization had not been used for class lists because class list's refCount is always zero as its ref and deref are forwarded to the associated Element's ref and deref. This fix re-enables the optimization for class lists. This behavior change is tested by existing microdata API tests. Without this patch, some tests such as properties-collection-add-remove-property.html fail on the first run when several tests were ran in the same WebKit instance. * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::isUnique): (WebCore::SpaceSplitString::ensureUnique): 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Decouple RenderPass drawing from CCRenderSurface https://bugs.webkit.org/show_bug.cgi?id=90573 Reviewed by Adrienne Walker. Removes the managed textures from CCRenderSurface and stores them in a HashMap in LayerRendererChromium. At the start of a frame, all textures for the frame are reserved, and unneeded textures are deleted. After each quad is drawn, evicted textures (ie temporary textures used for background filters) are deleted to keep within memory limits. At the end of the frame, all surface contents textures are kept reserved and thus not deleted. We add a numeric identifier to CCRenderPass which can be used to identify the pass across serialization in the future, and is used in the interface to LayerRendererChromium. Also we add to the CCRenderPass a contentsChangedSinceLastFrame() flag so that the value does not need to be retrieved from the CCRenderSurface. The pointer from CCRenderPass to CCRenderSurface remains for some code in the CCLayerTreeHostImpl, and will be addressed in the future, but the pointer is no longer used at all while drawing a frame inside LayerRendererChromium. Covered by existing tests, no intended change in behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderPassTextures): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore): (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::create): (WebCore::CCRenderPass::CCRenderPass): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): (WebCore::CCRenderPass::id): (WebCore::CCRenderPass::setFramebufferOutputRect): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::renderPassId): (WebCore::CCRenderPassDrawQuad::contentsChangedSinceLastFrame): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::pushTileProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-07-09 Adam Klein <adamk@chromium.org> Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver https://bugs.webkit.org/show_bug.cgi?id=90810 Reviewed by Ojan Vafai. This is in preparation for removing the vendor prefix from the MutationObserver constructor on Window (currently it's called WebKitMutationObserver). Doing the WebCore-internal rename first makes that change a much smaller one, which is especially useful because there's ongoing discussion of when the prefix should be removed from the web-facing API. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSMainThreadExecState.cpp: (WebCore::JSMainThreadExecState::didLeaveScriptContext): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSMutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp. (WebCore): (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8MutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp. (WebCore): (WebCore::V8MutationObserver::constructorCallback): * dom/CharacterData.cpp: * dom/ChildListMutationScope.h: (WebCore::ChildListMutationScope::ChildListMutationScope): * dom/DOMAllInOne.cpp: * dom/Document.h: (WebCore::Document::hasMutationObserversOfType): * dom/Element.cpp: * dom/MutationCallback.h: (WebCore): (MutationCallback): * dom/MutationCallback.idl: * dom/MutationObserver.cpp: Renamed from Source/WebCore/dom/WebKitMutationObserver.cpp. (WebCore): (WebCore::MutationObserver::ObserverLessThan::operator()): (WebCore::MutationObserver::create): (WebCore::MutationObserver::MutationObserver): (WebCore::MutationObserver::~MutationObserver): (WebCore::MutationObserver::validateOptions): (WebCore::MutationObserver::observe): (WebCore::MutationObserver::takeRecords): (WebCore::MutationObserver::disconnect): (WebCore::MutationObserver::observationStarted): (WebCore::MutationObserver::observationEnded): (WebCore::activeMutationObservers): (WebCore::MutationObserver::enqueueMutationRecord): (WebCore::MutationObserver::setHasTransientRegistration): (WebCore::MutationObserver::deliver): (WebCore::MutationObserver::deliverAllMutations): * dom/MutationObserver.h: Renamed from Source/WebCore/dom/WebKitMutationObserver.h. (WebCore): (MutationObserver): * dom/MutationObserver.idl: Renamed from Source/WebCore/dom/WebKitMutationObserver.idl. * dom/MutationObserverInterestGroup.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): (WebCore::MutationObserverInterestGroup::isOldValueRequested): (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): * dom/MutationObserverInterestGroup.h: (WebCore::MutationObserverInterestGroup::createForChildListMutation): (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): (WebCore::MutationObserverInterestGroup::createForAttributesMutation): (MutationObserverInterestGroup): * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::create): (WebCore::MutationObserverRegistration::MutationObserverRegistration): (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): * dom/MutationObserverRegistration.h: (MutationObserverRegistration): (WebCore::MutationObserverRegistration::isSubtree): (WebCore::MutationObserverRegistration::observer): (WebCore::MutationObserverRegistration::deliveryOptions): (WebCore::MutationObserverRegistration::mutationTypes): * dom/Node.cpp: (WebCore::Node::collectMatchingObserversForMutation): (WebCore::Node::getRegisteredMutationObserversOfType): (WebCore::Node::registerMutationObserver): * dom/Node.h: (Node): * dom/NodeRareData.h: * page/DOMWindow.idl: 2012-07-09 Filip Pizlo <fpizlo@apple.com> Unreviewed, rolling out http://trac.webkit.org/changeset/122116 and http://trac.webkit.org/changeset/122119 * GNUmakefile.list.am: * PlatformBlackBerry.cmake: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext3D.h: (WebCore): * platform/graphics/OpenGLESShims.h: * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore): * platform/graphics/clutter/GraphicsContext3DClutter.cpp: (WebCore): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): (WebCore::Extensions3DOpenGL::supports): (WebCore): (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): (WebCore::Extensions3DOpenGL::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGL::getTranslatedShaderSourceANGLE): (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM): * platform/graphics/opengl/Extensions3DOpenGL.h: (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: * platform/graphics/opengl/Extensions3DOpenGLCommon.h: * platform/graphics/opengl/Extensions3DOpenGLES.cpp: * platform/graphics/opengl/Extensions3DOpenGLES.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::systemAllowsMultisamplingOnATICards): (WebCore): (WebCore::GraphicsContext3D::validateAttributes): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Build fix after r122115 and some cleanups. * html/HTMLCollection.h: (HTMLCollection): * html/HTMLElement.cpp: (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): 2012-07-09 Dean Jackson <dino@apple.com> Tiled drawing means some elements can disappear behind the page https://bugs.webkit.org/show_bug.cgi?id=88906 Reviewed by Simon Fraser. The compositing layers in the tile cache could become siblings of the compositing layers for page elements. This meant that in some 3d transforms, the elements could disappear behind the page background (which is rendered into the tile cache) or intersect with the tile cache tiles. Fix this by inserting a flattening layer between the tile cache and the page, ensuring that the cache will always be rendered first. I was able to reuse the clipping layer for this, because the tile cache is attached to the RenderView, so there should never be a case where we have both a clipping layer and tiles. The unfortunate part of this code is the temporary state variable that wraps the call to GraphicsLayer::create. Because that method calls back into the object, we need to make sure we don't create another tile cache. Also added some obvious names to the tile cache layers to help with debugging. Test: compositing/tile-cache-must-flatten.html * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): give the tile host layer a name. (WebCore::TileCache::createTileLayer): * platform/graphics/ca/mac/WebTileCacheLayer.mm: (WebCore): give each tile layer a name. * rendering/RenderLayerBacking.cpp: (WebCore): (WebCore::RenderLayerBacking::shouldUseTileCache): check if we're in the middle of creating the primary graphics layer before answering. (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): wrap our call to createGraphicsLayer with a message to indicate we are making the layer that should get a tile cache. (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): needs to make sure the flattening layer is in the tree. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::updateInternalHierarchy): (WebCore::RenderLayerBacking::updateClippingLayers): (WebCore::RenderLayerBacking::backingStoreMemoryEstimate): * rendering/RenderLayerBacking.h: rename m_clippingLayer to m_containmentLayer because it can now either be the clip or the tile cache flattener. Also a new state property used when creating the main graphics layer. (WebCore::RenderLayerBacking::hasClippingLayer): (WebCore::RenderLayerBacking::clippingLayer): (WebCore::RenderLayerBacking::parentForSublayers): (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer): (WebCore::RenderLayerBacking::tileCacheFlatteningLayer): (RenderLayerBacking): 2012-07-09 Christophe Dumez <christophe.dumez@intel.com> [EFL] Log significant Gamepad API-related events https://bugs.webkit.org/show_bug.cgi?id=90595 Reviewed by Antonio Gomes. Log significant Gamepad API-related events in GamepadsEfl. No new tests, no behavior change. * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadDeviceEfl::deviceFile): (GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::readCallback): (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): 2012-07-09 Simon Fraser <simon.fraser@apple.com> Reduce the amount of flashing when falling into tiled layers https://bugs.webkit.org/show_bug.cgi?id=90808 Reviewed by Dean Jackson. Implement +prefetchedTiles so that CATiledLayer renders more tiles at a time, reducing the appearance of flashing. * platform/graphics/mac/WebTiledLayer.mm: (+[WebTiledLayer prefetchedTiles]): 2012-07-09 Leandro Gracia Gil <leandrogracia@chromium.org> SurroundingText should not advance character iterators if they are at end. https://bugs.webkit.org/show_bug.cgi?id=90560 Reviewed by Ryosuke Niwa. CharacterIterator and BackwardsCharacterIterator try to advance their internal TextIterator without checking if they already are at end. This can cause crashes in TextIterator::advance. Test: platform/chromium/editing/surrounding-text/surrounding-text.html * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): (WebCore::SurroundingText::rangeFromContentOffsets): 2012-07-09 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] [WK2] Ecore errors from ecore_evas_screen_geometry_get() https://bugs.webkit.org/show_bug.cgi?id=90609 Reviewed by Daniel Bates. Do not call ecore_evas_screen_geometry_get() if ecoreEvas is null. No new tests. This patch doesn't change behavior. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenRect): Early return if Evas is null. 2012-07-09 Alexandru Chiculita <achicu@adobe.com> [CSS Filters] Blur filter is not repainted correctly when applied on a parent of a fixed element https://bugs.webkit.org/show_bug.cgi?id=90087 Reviewed by Simon Fraser. Added a new method, RenderLayer::hasAncestorWithFilterOutsets, to check that there's no filter with outsets (ie. blur) applied on top level fixed positioned elements, nor any of its parent layers. In the event of a blur filter we need to disable the fast scrolling optimization, otherwise the outsets of the filter will be carried around the page and repainting will not work correctly. Tests: css3/filters/blur-filter-page-scroll-parents.html css3/filters/blur-filter-page-scroll-self.html * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): * rendering/RenderLayer.cpp: (WebCore): (WebCore::RenderLayer::hasAncestorWithFilterOutsets): * rendering/RenderLayer.h: (RenderLayer): 2012-07-09 Joshua Bell <jsbell@chromium.org> IndexedDB: Empty arrays shouldn't be valid key paths https://bugs.webkit.org/show_bug.cgi?id=90798 Reviewed by Tony Chang. Other IDB implementations already enforce this although it is not yet in the spec (see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17657). If an empty array is passed as the key path arg to IDBDatabase.createObjectStore() or IDBObjectStore.createIndex(), a SYNTAX_ERR DOMException is now thrown. Test: storage/indexeddb/keypath-arrays.html storage/indexeddb/keypath-basics.html * Modules/indexeddb/IDBKeyPath.cpp: (WebCore::IDBKeyPath::isValid): Test for empty array. 2012-07-09 Dana Jansens <danakj@chromium.org> [chromium] Create render surfaces on main thread only for the current frame https://bugs.webkit.org/show_bug.cgi?id=89793 Reviewed by Adrienne Walker. Previously we would create render surfaces for animating layers in the main thread since these layers might have a surface on impl, in order to assist culling. This makes it very difficult to estimate how much texture memory is needed for RenderSurfaces on the main thread, in order to keep contents+surface memory below our limit. Here we stop doing this, and create RenderSurfaces on both threads under the same conditions, so main thread has surfaces only if the layers in its current frame demand them. While this may reduce paint culling within an animating subtree, this seems like an edge case and knowing the amount of surface memory needed for the frame is important. Animation tests in CCLayerTreeHostCommonTest used to verify that these layers got surfaces, so now no longer do. Creation of surfaces under other conditions is covered by other CCLayerTreeHostCommonTests. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r122116. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 2012-07-09 Ryosuke Niwa <rniwa@webkit.org> EFL build fix after r122115. * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::create): 2012-07-09 Joshua Netterfield <jnetterfield@rim.com> Make GC3D and E3D more maintainable for GLES platforms https://bugs.webkit.org/show_bug.cgi?id=90567 Reviewed by Rob Buis. This patch cleans up code for WebGL on OpenGLES platforms which use GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL, GraphicsContext3DOpenGLCommon, and GraphicsContext3DOpenGLES, this patch is an attempt to refactor this code in a way that will help BlackBerry and other teams support WebGL on mobile platforms with as little use of "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the separation of Extensions3DOpenGL into Extensions3DOpenGLCommon, Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction of OpenGLESShims. This patch is created in large part by Jonathan Feldstein. No new tests: no new behaviour. * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build * Target.pri: Add new Extensions3DOpenGL* to WebGL builds * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function. (WebCore): * platform/graphics/OpenGLESShims.h: Added. * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports (WebCore): (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon (WebCore): (Extensions3DOpenGL): * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon): (WebCore::Extensions3DOpenGLCommon::supports): (WebCore::Extensions3DOpenGLCommon::ensureEnabled): (WebCore::Extensions3DOpenGLCommon::isEnabled): (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB): (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does. (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLCommon): * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added. (WebCore): (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES): (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG): (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG): (WebCore::Extensions3DOpenGLES::createVertexArrayOES): (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES): (WebCore::Extensions3DOpenGLES::isVertexArrayOES): (WebCore::Extensions3DOpenGLES::bindVertexArrayOES): (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports (WebCore::Extensions3DOpenGLES::getExtensions): * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h. (WebCore): (Extensions3DOpenGLES): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::isTexture): (WebCore): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::deleteBuffer): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::validateAttributes): (WebCore): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore): (WebCore::GraphicsContext3D::releaseShaderCompiler): 2012-07-02 Ryosuke Niwa <rniwa@webkit.org> Make HTMLCollection RefCounted https://bugs.webkit.org/show_bug.cgi?id=90414 Reviewed by Sam Weinig. Make HTMLCollection ref counted and stop forwarding ref and deref to its owner (m_base) so as to align its life time management to that of DynamicNodeList. After this patch, each HTMLCollection is owned by JSC/V8 and m_cachedCollections in ElementRareData and m_collection in Document merely hold raw pointers for the caching purpose. These raw pointers are cleared when each HTMLCollection is destructed via corresponding removeCachedHTMLCollection's. In the destructor of HTMLCollection, we use the CollectionType to decide whether base() is an element or an document, and call the appropriate removeCachedHTMLCollection except for WindowNamedItems and DocumentNamedItems. For those two types, we need to know the atomic string name associated with the collection just like many DynamicNodeList to remove the cache, so we let HTMLNameCollection directly call removeWindowNamedItemCache and removeDocumentNamedItemCache. We'll cleanup this mess in a follow up patch using a nice class hierarchy and virtual destructors. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::getDocumentLinks): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::openSearchDescriptionURL): (WebCore): (WebCore::Document::cachedCollection): (WebCore::Document::removeCachedHTMLCollection): (WebCore::Document::images): (WebCore::Document::applets): (WebCore::Document::embeds): (WebCore::Document::plugins): (WebCore::Document::objects): (WebCore::Document::scripts): (WebCore::Document::links): (WebCore::Document::forms): (WebCore::Document::anchors): (WebCore::Document::all): (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): (WebCore::Document::removeWindowNamedItemCache): (WebCore::Document::removeDocumentNamedItemCache): * dom/Document.h: (Document): * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): (WebCore::ElementRareData::ensureCachedHTMLCollection): (WebCore::Element::removeCachedHTMLCollection): (WebCore): * dom/Element.h: (Element): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::cachedHTMLCollection): (WebCore::ElementRareData::removeCachedHTMLCollection): * html/CollectionType.h: (WebCore): Since WindowNamedItems is not a part of UnnamedDocumentCachedType, we shouldn't addd 1. (WebCore::isUnnamedDocumentCachedType): (WebCore::isNodeCollectionType): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::create): * html/HTMLAllCollection.h: (HTMLAllCollection): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::itemAfter): * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (HTMLCollection): (WebCore::HTMLCollection::base): * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::options): * html/HTMLDataListElement.h: (HTMLDataListElement): * html/HTMLElement.cpp: (WebCore::HTMLElement::children): (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::elements): * html/HTMLFieldSetElement.h: (HTMLFieldSetElement): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::create): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): * html/HTMLFormElement.h: (HTMLFormElement): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): (WebCore::HTMLMapElement::areas): * html/HTMLMapElement.h: (HTMLMapElement): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): (WebCore::HTMLNameCollection::~HTMLNameCollection): (WebCore): * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): (HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::create): * html/HTMLOptionsCollection.h: (HTMLOptionsCollection): * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectedOptions): (WebCore::HTMLSelectElement::options): * html/HTMLSelectElement.h: (HTMLSelectElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): (WebCore::HTMLTableElement::tBodies): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::insertCell): (WebCore::HTMLTableRowElement::deleteCell): (WebCore::HTMLTableRowElement::cells): * html/HTMLTableRowElement.h: (HTMLTableRowElement): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::create): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::insertRow): (WebCore::HTMLTableSectionElement::deleteRow): (WebCore::HTMLTableSectionElement::rows): * html/HTMLTableSectionElement.h: (HTMLTableSectionElement): 2012-07-09 Pavel Feldman <pfeldman@chromium.org> Web Inspector: unindent line ending block upon { hit. https://bugs.webkit.org/show_bug.cgi?id=90795 Reviewed by Vsevolod Vlasov. Added block-start / block-end markup into the highlighter. * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/TextEditor.js: (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.TextEditorMainPanel.prototype._unindentAfterBlock): 2012-07-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r122107. http://trac.webkit.org/changeset/122107 https://bugs.webkit.org/show_bug.cgi?id=90794 Build failure on Mac debug bots (Requested by falken_ on #webkit). * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): * dom/ContextFeatures.cpp: * dom/ContextFeatures.h: * html/HTMLDialogElement.cpp: Removed. * html/HTMLDialogElement.h: Removed. * html/HTMLDialogElement.idl: Removed. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Andrei Onea <onea@adobe.com> [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent https://bugs.webkit.org/show_bug.cgi?id=90759 Reviewed by Andreas Kling. Renamed NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent as per CSS Regions spec: http://www.w3.org/TR/css3-regions/#dom-named-flow Tests: fast/regions/get-regions-by-content-horiz-bt.html fast/regions/get-regions-by-content-horiz-tb.html fast/regions/get-regions-by-content-vert-lr.html fast/regions/get-regions-by-content-vert-rl.html fast/regions/get-regions-by-content.html fast/regions/get-regions-by-content2.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::getRegionsByContent): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-07-09 Matt Falkenhagen <falken@chromium.org> Add ENABLE_DIALOG_ELEMENT and skeleton files https://bugs.webkit.org/show_bug.cgi?id=90521 Reviewed by Kent Tamura. This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added. The feature is diabled by default. No new tests, as there is no behavior change. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog. (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled): (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): * dom/ContextFeatures.cpp: (WebCore::ContextFeatures::dialogElementEnabled): (WebCore): * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off. * html/HTMLDialogElement.cpp: Added. (WebCore): (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::create): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::show): * html/HTMLDialogElement.h: Added. (WebCore): (HTMLDialogElement): * html/HTMLDialogElement.idl: Added. * html/HTMLElementsAllInOne.cpp: * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-07-09 Pavel Feldman <pfeldman@chromium.org> Web Inspector: inspector does not reflect newly created text nodes from contenteditable https://bugs.webkit.org/show_bug.cgi?id=90779 Reviewed by Vsevolod Vlasov. We need to report first text node as inserted, otherwise we fail to report character data modified on it. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::characterDataModified): 2012-07-09 Andrey Kosyakov <caseq@chromium.org> REGRESSION(r121980) Layout Test inspector/timeline/timeline-frames.html started to crash. https://bugs.webkit.org/show_bug.cgi?id=90747 Reviewed by Pavel Feldman. - consider didCancelFrame() call normal if there is no pending frame, remove assertion; - always set empty data object for frame records; * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCancelFrame): (WebCore::InspectorTimelineAgent::commitFrameRecord): 2012-07-09 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add FileContentView for FileSystemView https://bugs.webkit.org/show_bug.cgi?id=90529 Adding FileContentView to Inspector. This class provides preview of text files in FileSystem. Reviewed by Vsevolod Vlasov. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileContentView.js: Added. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView.prototype.get visibleView): (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): (WebInspector.FileSystemView.EntryTreeElement.prototype.refresh): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-09 Carlos Garcia Campos <cgarcia@igalia.com> [SOUP] Use soup_cookie_jar_is_persistent() to set whether cookie is a session one or not https://bugs.webkit.org/show_bug.cgi?id=90769 Reviewed by Gustavo Noronha Silva. It's currently set to false, because there were no API to know whether cookies were persistent or not. Now that we bumped libsoup requirements, we can use soup_cookie_jar_is_persistent(). * platform/network/soup/CookieJarSoup.cpp: (WebCore::getRawCookies): 2012-07-09 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add text file support for FileSystemAgent::requestFileContent https://bugs.webkit.org/show_bug.cgi?id=90439 Reviewed by Vsevolod Vlasov. * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileContent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype.requestFileContent): (WebInspector.FileSystemModel.File.prototype.requestFileContent): (WebInspector.FileSystemRequestManager.prototype._fileContentReceived): (WebInspector.FileSystemDispatcher.prototype.fileContentReceived): 2012-07-09 MORITA Hajime <morrita@google.com> [Chromium] ContextFeaturesClient::isEnabled is slow https://bugs.webkit.org/show_bug.cgi?id=90367 Reviewed by Kent Tamura. * dom/ContextFeatures.h: (WebCore::ContextFeaturesClient::urlDidChange): Added. (WebCore::ContextFeatures::urlDidChange): Added. (WebCore): * dom/Document.cpp: (WebCore::Document::setURL): Added an urlDidChange() call. 2012-07-09 Andrei Onea <onea@adobe.com> [CSSRegions] Implement NamedFlow::firstEmptyRegionIndex attribute https://bugs.webkit.org/show_bug.cgi?id=90608 Reviewed by Andreas Kling. Implemented NamedFlow::firstEmptyRegionIndex as per spec: http://www.w3.org/TR/css3-regions/#dom-named-flow Test: fast/regions/webkit-named-flow-first-empty-region-index.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): (WebCore): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-07-08 Yoshifumi Inoue <yosin@chromium.org> [Platform-Mac] Derive LocaleMac.{cpp,h} and LocalizedDateMac.cpp from LocaleWin https://bugs.webkit.org/show_bug.cgi?id=90752 Reviewed by Kent Tamura. This patch is preparation of introducing LocaleMac class for localize date form. This patch copies LocaleWin and LocalizedDateWin.cpp as below: - LocaleMac.h from LocaleWin.h - LocaleMac.mm from LocaliedDateMac.mm - LocaliedDateMac.cpp from LocalizedDateWin.cpp Due by git, diffs are appeared as new thing. I'll do svn copy at landing time. No new tests. This patch doesn't change behavior. * platform/text/mac/LocaleMac.h: Copied from platform/text/LocaleWin.h * platform/text/mac/LocaleMac.mm: Copied from platform/text/mac/LocalizedDateMac.mm * platform/text/mac/LocalizedDateMac.cpp: Copied from platform/text/LocalizedDateWin.cpp 2012-07-08 Laszlo Gombos <laszlo.1.gombos@nokia.com> Introduce a build flag for low quality JPEG images https://bugs.webkit.org/show_bug.cgi?id=90748 Reviewed by Adam Barth. Introduce build options for no JPEG dithering (USE(LOW_QUALITY_IMAGE_NO_JPEG_DITHERING)) and no JPEG fancy upsampling (USE(LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING)). No new tests as there is no change in functionality. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (ditherMode): (doFancyUpsampling): 2012-07-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121968. http://trac.webkit.org/changeset/121968 https://bugs.webkit.org/show_bug.cgi?id=90749 Caused a link error on chromium Win dbg. (Requested by hayato on #webkit). * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): * platform/MemoryUsageSupport.cpp: * platform/MemoryUsageSupport.h: (MemoryUsageSupport): * platform/chromium/MemoryUsageSupportChromium.cpp: 2012-07-08 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] Make setForceDownload a setter method. https://bugs.webkit.org/show_bug.cgi?id=90591 Reviewed by Rob Buis. * platform/network/blackberry/ResourceRequest.h: (WebCore::ResourceRequest::setForceDownload): 2012-07-05 MORITA Hajime <morrita@google.com> Heap-use-after-free in WebCore::RenderObject::destroyAndCleanupAnonymousWrappers https://bugs.webkit.org/show_bug.cgi?id=90480 Reviewed by Kent Tamura. If <select> has any insertion point, the attachment phase unpextedly creates a renderer for distributed node and added to the renderer of the <select>, which breaks an assumption and results the crash. This change tighten the childShouldCreateRenderer() to forbid child renderers even from distributed nodes. There is an exception as always: ValidationMessage can create a ShadowRoot to <select>, which generates usually-forbidden child renderers. This change introduces HTMLFormControlElement::validationMessageContains() to let these renderers in. Test: fast/dom/shadow/insertion-point-list-menu-crash.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::validationMessageContains): (WebCore): * html/HTMLFormControlElement.h: (HTMLFormControlElement): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childShouldCreateRenderer): * html/ValidationMessage.cpp: (WebCore::ValidationMessage::contains): (WebCore): * html/ValidationMessage.h: (WebCore): (ValidationMessage): 2012-07-07 Kwang Yul Seo <skyul@company100.net> Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition https://bugs.webkit.org/show_bug.cgi?id=90726 Reviewed by Adam Barth. HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently, m_lastScriptElementStartPosition is used to store the text position in "script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition later in "script" end tag. Because HTMLTreeBuilder handles one script tag at a time, we can store the text position directly to m_scriptToProcessStartPosition in "script" start tag. No behavior change, so no new tests. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/parser/HTMLTreeBuilder.h: (HTMLTreeBuilder): 2012-07-08 Philip Rogers <pdr@google.com> Refactor RenderSVGShape to not contain fallback code https://bugs.webkit.org/show_bug.cgi?id=90514 Reviewed by Nikolas Zimmermann. The interaction between RenderSVGShape and {RenderSVGEllipse, RenderSVGRect} was too coupled and it was not clear when a path existed or who controlled falling back to path codepaths in RenderSVGShape. This patch cleans up RenderSVGShape so that it does not track fallback state and does not have special handling for creating a shape in strokeContains. Because some functions of RenderSVGShape can be called without a path existing, each of these functions has switched to using the path() function which asserts that a path exists. There is only one remaining use of hasPath() in RenderSVGShape which I plan to remove in a followup patch. This patch also cleans up RenderSVGRect and RenderSVGEllipse. These classes now handle fallback tracking themselves and choose when to use their optimized strokeContains codepaths. No new tests as this is just a refactoring. * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::RenderSVGEllipse): (WebCore::RenderSVGEllipse::createShape): (WebCore::RenderSVGEllipse::objectBoundingBox): (WebCore::RenderSVGEllipse::strokeBoundingBox): (WebCore::RenderSVGEllipse::fillShape): (WebCore::RenderSVGEllipse::strokeShape): (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): (WebCore::RenderSVGEllipse::shapeDependentFillContains): * rendering/svg/RenderSVGEllipse.h: (WebCore::RenderSVGEllipse::isEmpty): (RenderSVGEllipse): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::RenderSVGRect): (WebCore::RenderSVGRect::createShape): (WebCore::RenderSVGRect::objectBoundingBox): (WebCore::RenderSVGRect::strokeBoundingBox): (WebCore::RenderSVGRect::fillShape): (WebCore::RenderSVGRect::strokeShape): (WebCore::RenderSVGRect::shapeDependentStrokeContains): (WebCore::RenderSVGRect::shapeDependentFillContains): * rendering/svg/RenderSVGRect.h: (WebCore::RenderSVGRect::isEmpty): (RenderSVGRect): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::RenderSVGShape): (WebCore::RenderSVGShape::createShape): (WebCore::RenderSVGShape::isEmpty): (WebCore::RenderSVGShape::objectBoundingBox): (WebCore::RenderSVGShape::shapeDependentStrokeContains): (WebCore::RenderSVGShape::shapeDependentFillContains): (WebCore::RenderSVGShape::strokeContains): (WebCore::RenderSVGShape::layout): (WebCore::RenderSVGShape::hasSmoothStroke): (WebCore): * rendering/svg/RenderSVGShape.h: (RenderSVGShape): 2012-07-08 Kinuko Yasuda <kinuko@chromium.org> XHR.send should support ArrayBufferView https://bugs.webkit.org/show_bug.cgi?id=90536 XHR.send should support ArrayBufferView according to the latest draft and also eventually deprecate ArrayBuffer. Spec: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-send Reviewed by Kenneth Russell. Test: http/tests/xmlhttprequest/send-array-buffer.html http/tests/xmlhttprequest/send-data-view.html * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::send): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::sendCallback): * xml/XMLHttpRequest.cpp: (WebCore): (WebCore::XMLHttpRequest::send): * xml/XMLHttpRequest.h: (XMLHttpRequest): * xml/XMLHttpRequest.idl: 2012-07-08 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: CodeGeneratorInspector.py should not generate statements with no effect https://bugs.webkit.org/show_bug.cgi?id=90697 Reviewed by Vsevolod Vlasov. Fix to remove the statements with no effect. The check for errors is added only when some valid statements exist. No new tests as generator related patch. * inspector/CodeGeneratorInspector.py: (Generator.process_command): 2012-07-06 Lauro Neto <lauro.neto@openbossa.org> [Qt] Avoid deep copy of QImage in GraphicsContext3D::getImageData() https://bugs.webkit.org/show_bug.cgi?id=90705 Reviewed by Noam Rosenthal. Use QImage.constBits() as argument to packPixels instead of bits() to avoid deep copying it. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-07-06 Andy Estes <aestes@apple.com> Fix errors reported by generate-bindings.pl after r121882. * DerivedSources.make: Specify the correct path for notifications idl files now that notifications/ lives in WebCore/Modules/. 2012-07-06 Justin Novosad <junov@chromium.org> Drawing to accelerated 2D canvas causes compositor to recompute layer tree https://bugs.webkit.org/show_bug.cgi?id=90630 Reviewed by Simon Fraser. No new tests: covered by existing canvas/compositing layout tests Before this change, there was no distinction between canvas changes that require recomputing the compositor tree and canvas changes that only require re-display. The new CanvasPixelsChanged member of enum ContentChangeType requests re-display without re-layout. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): * rendering/RenderBoxModelObject.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::contentChanged): 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: get rid of this._lastMarkedRange in TextEditor. https://bugs.webkit.org/show_bug.cgi?id=90691 Reviewed by Vsevolod Vlasov. We don't need it, should use setSelection instead. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.markAndRevealRange): (WebInspector.TextEditor.prototype._handleSelectionChange): (WebInspector.TextEditor.prototype.setSelection): (WebInspector.TextEditor.prototype._handleFocused): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Snippet renaming behavior is not correct. https://bugs.webkit.org/show_bug.cgi?id=90689 Reviewed by Pavel Feldman. Navigator overlay is now not closed when editing is canceled. Esc handler in NavigatorOverlayController is not installed as a shortcut anymore since it should not be called until all underlying DOM elements handled the key down event. * inspector/front-end/NavigatorOverlayController.js: (WebInspector.NavigatorOverlayController.prototype.set showNavigatorOverlay): (WebInspector.NavigatorOverlayController.prototype._keyDown): (WebInspector.NavigatorOverlayController.prototype._innerHideNavigatorOverlay): * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype.rename.commitHandler): (WebInspector.NavigatorView.prototype.rename.cancelHandler): (WebInspector.NavigatorView.prototype.rename.afterEditing): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype._itemRenamingRequested): (WebInspector.SnippetsNavigatorView.prototype._handleRenameSnippet): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._itemRenamingRequested.callback): (WebInspector.ScriptsPanel.prototype._itemRenamingRequested): 2012-07-06 Andreas Kling <kling@webkit.org> Separate mutating CSSStyleDeclaration operations. <http://webkit.org/b/89945> Reviewed by Antti Koivisto. Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration. PropertySetCSSStyleDeclaration now has: - propertySet() const - ensureMutablePropertySet() This is prep work for supporting immutable ElementAttributeData objects, the idea being that calling ensureMutablePropertySet() may cause the element to convert its internal attribute storage (which also holds the inline StylePropertySet.) * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): * css/PropertySetCSSStyleDeclaration.h: (PropertySetCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::propertySet): (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet): 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: text editor scrolls 2px horizontally as one navigates the source code. https://bugs.webkit.org/show_bug.cgi?id=90682 Reviewed by Vsevolod Vlasov. Removing the hack that is glueing the scroller to the left. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype._updatePanelOffsets): (WebInspector.TextEditorChunkedPanel.prototype._scroll): * inspector/front-end/textEditor.css: 2012-07-06 Andrey Kosyakov <caseq@chromium.org> Web Inspector: get rid of cancellable records in Timeline, manage frame records explicitly https://bugs.webkit.org/show_bug.cgi?id=90684 Reviewed by Pavel Feldman. - drop handling of "cancelable" records; - keep frame record until other records come (or frame is canceled) * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didBeginFrame): (WebCore::InspectorTimelineAgent::didCancelFrame): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::pushCurrentRecord): (WebCore::InspectorTimelineAgent::commitFrameRecord): (WebCore::InspectorTimelineAgent::clearRecordStack): * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry): (TimelineRecordEntry): (InspectorTimelineAgent): 2012-07-06 Alexei Filippov <alexeif@chromium.org> Web Inspector: Add native memory used by GlyphCache to the snapshot https://bugs.webkit.org/show_bug.cgi?id=90615 Reviewed by Yury Semikhatsky. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::addPlatformComponentsInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::memoryUsageByComponents): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): (ComponentInfo): (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::glyphCacheVisitor): (WebCore): (WebCore::MemoryUsageSupport::memoryUsageByComponents): 2012-07-06 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> [Qt] Switch to new-style Qt 5 configure tests Use explicit project file action instead of syncqt magic. https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * WebCore.pri: 2012-07-06 Pavel Feldman <pfeldman@chromium.org> Web Inspector: start searching from the cursor position in the Sources panel. https://bugs.webkit.org/show_bug.cgi?id=90677 Reviewed by Vsevolod Vlasov. Web Inspector: start searching from the cursor position in the Sources panel. Drive-by: select whole match upon search cancel. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.lastSelection): (WebInspector.TextEditor.prototype._handleFocused): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.prototype.serializeToObject): (WebInspector.TextRange.prototype.compareTo): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Snippets should be correctly (re)loaded when inspector is open and on navigation. https://bugs.webkit.org/show_bug.cgi?id=90672 Reviewed by Pavel Feldman. Snippets are now reloaded from the storage on ScriptSnippetMapping reset. Fixed snippets storage. * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel): (WebInspector.ScriptSnippetModel.prototype._loadSnippets): (WebInspector.ScriptSnippetModel.prototype._reset): * inspector/front-end/SnippetStorage.js: (WebInspector.Snippet.fromObject): 2012-07-06 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Implement snippets removing. https://bugs.webkit.org/show_bug.cgi?id=90674 Reviewed by Pavel Feldman. * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorView.prototype.rename.afterEditing): * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.removeUISourceCode): (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): (WebInspector.ScriptsPanel.prototype._revealExecutionLine): * inspector/front-end/TabbedEditorContainer.js: 2012-07-06 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: fix inspector front-end compilation. * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/SearchController.js: 2012-07-06 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add memory reporting routine to Document https://bugs.webkit.org/show_bug.cgi?id=90668 Reviewed by Pavel Feldman. Added methods for reporting HashSet, ListHashSet and Vector memory footprint. Made Document report its size along with its internal collections sizes. * dom/Document.cpp: (WebCore::Document::reportMemoryUsage): (WebCore): * dom/Document.h: (Document): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportHashMap): (WebCore::MemoryObjectInfo::reportHashSet): (WebCore::MemoryObjectInfo::reportListHashSet): (WebCore::MemoryObjectInfo::reportVector): (WebCore::MemoryObjectInfo::memoryInstrumentation): (WebCore::MemoryInstrumentation::reportHashMap): (WebCore): (WebCore::MemoryInstrumentation::reportHashSet): (WebCore::MemoryInstrumentation::reportListHashSet): (WebCore::MemoryInstrumentation::reportVector): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-06 Gabor Rapcsanyi <rgabor@webkit.org> Fixing defines for NEON intrinsics. https://bugs.webkit.org/show_bug.cgi?id=90666 Reviewed by Zoltan Herczeg. Existing tests cover this issue. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyGeneric): * platform/graphics/filters/arm/FEGaussianBlurNEON.h: * platform/graphics/filters/arm/NEONHelpers.h: 2012-07-05 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Workspace should dispatch WorkspaceReset event on navigation. https://bugs.webkit.org/show_bug.cgi?id=90616 Reviewed by Pavel Feldman. Workspace UISourceCodeProviders are now reset on navigation. UISourceCodeRemoved event is not dispatched from UISourceCodeProviders on reset (page navigation) anymore. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.reset): * inspector/front-end/DebuggerScriptMapping.js: (WebInspector.DebuggerScriptMapping): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._reset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._loadUISourceCodes): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog): * inspector/front-end/StylesPanel.js: (WebInspector.StylesUISourceCodeProvider): (WebInspector.StylesUISourceCodeProvider.prototype.reset): * inspector/front-end/Workspace.js: (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodeProviders): (WebInspector.Workspace): (WebInspector.Workspace.prototype.registerUISourceCodeProvider): (WebInspector.Workspace.prototype._reset): 2012-07-05 Arnaud Renevier <arno@renevier.net> [GTK] Showing the context menu in the Web Inspector can crash the browser https://bugs.webkit.org/show_bug.cgi?id=88800 Reviewed by Carlos Garcia Campos. Remove ContextMenuItem from its parent before appending it again to a new parent No new tests, behavior is unchanged. * platform/gtk/ContextMenuGtk.cpp: (WebCore::ContextMenu::appendItem): 2012-07-05 Dongwoo Im <dw.im@samsung.com> [EFL] Unreviewed, Fix build break when WEB_AUDIO is enabled. https://bugs.webkit.org/show_bug.cgi?id=90653 Unreviewed build fix. A new file, AudioFIFO.cpp, is added for the Web Audio fearure. This file should be included into the CMakeLists.txt file. * CMakeLists.txt: Add the newly created file into the CMakeLists.txt 2012-07-05 Mike West <mkwst@chromium.org> Multiple Content Security Policy headers are correctly processed as separate headers. https://bugs.webkit.org/show_bug.cgi?id=90629 Headers of the same name are normalized into a single, comma-separated string as per RFC2616, section 4.2. We didn't correctly account for this in ContentSecurityPolicy::didReceiveHeader. Now we do by walking through the header string, looking for commas and processing each block in turn. This oversight bit Firefox as well, and was patched in February: https://bugzilla.mozilla.org/show_bug.cgi?id=717511 Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/directive-parsing-multiple-headers.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): 2012-07-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121921. http://trac.webkit.org/changeset/121921 https://bugs.webkit.org/show_bug.cgi?id=90648 caused hundreds of crashes on Mac (Requested by pizlo on #webkit). * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): * editing/TextIterator.cpp: (WebCore::CharacterIterator::advance): (WebCore::BackwardsCharacterIterator::advance): 2012-07-05 Anders Carlsson <andersca@apple.com> Type-ahead doesn't work in options inside optgroups https://bugs.webkit.org/show_bug.cgi?id=90647 <rdar://problem/5604894> Reviewed by Dan Bernstein. Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace. * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): 2012-07-05 Hayato Ito <hayato@chromium.org> [Crash] Click an element which will be 'display: none' on focus. https://bugs.webkit.org/show_bug.cgi?id=90516 Reviewed by Hajime Morita. EventHandler::handleMousePressEventSingleClick checks whether innerNode has a renderer in the beginning of the function. But the renderer may disappear in the middle of the function since its style has just become 'display:none'. As a result, it touches null renderer in EventHandler.cpp:517: VisiblePosition visiblePos(innerNode->renderer()->positionForPoint(event.localPoint())); In the case of 'display:none', we don't have to continue. So call updateLayoutIgnorePendingStylesheets() in the beginning so that we can early exit and do not touch null renderer. Test: fast/events/display-none-on-focus-crash.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): 2012-07-05 Benjamin Poulain <bpoulain@apple.com> Double release of resources if the load is canceled in a callback of ResourceLoader::didFinishLoading https://bugs.webkit.org/show_bug.cgi?id=90431 Reviewed by Anders Carlsson. In ResourceLoader::didFinishLoadingOnePart(), we invoke didFinishLoad() on the WebKit client. If WebKit causes the current frame to cancel the load synchronously, the resources are already freed when ResourceLoader::didFinishLoadingOnePart() ends. When ResourceLoader::didFinishLoading() subsequently invokes releaseResources(), we are releasing the resources a second time. This patch add a second check for cancellation after invoking ResourceLoader::didFinishLoadingOnePart() to avoid such issues. The previous check at the beginning of ResourceLoader::didFinishLoading() has been removed because it is redundant with ResourceLoader::didFinishLoadingOnePart(). * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFinishLoadingOnePart): 2012-07-05 Simon Fraser <simon.fraser@apple.com> Add a utility method for hasOverflowClip() or hasClip() https://bugs.webkit.org/show_bug.cgi?id=90635 Reviewed by Dean Jackson. Add RenderObject::hasClipOrOverflowClip() as a convenience method since we end up calling hasOverfFlowClip() || hasClip() a lot in the layer code. No new tests; refactoring only. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer): (WebCore::RenderLayerCompositor::clipsCompositingDescendants): * rendering/RenderObject.h: (WebCore::RenderObject::hasClipOrOverflowClip): 2012-07-05 Yongjun Zhang <yongjun_zhang@apple.com> Code refactoring: move mimeTypeFromUTITree to a separate file. https://bugs.webkit.org/show_bug.cgi?id=90619 We should move UTI handling related code to a separate file. Reviewed by David Kilzer. * WebCore.xcodeproj/project.pbxproj: Add UTIUtilities.h/UTIUtilities.mm to xcode project, and drive-by fix that happened when editing the Xcode project file. * platform/network/mac/UTIUtilities.h: Added. (WebCore): * platform/network/mac/UTIUtilities.mm: Added. move mimeTypeFromUTITree to UTIUtilities.mm. (WebCore): (WebCore::mimeTypeFromUTITree): * platform/network/mac/WebCoreURLResponse.mm: include UTIUtilities.h to use mimeTypeFromUTITree. (WebCore): 2012-07-05 Leandro Gracia Gil <leandrogracia@chromium.org> Character iterators should not advance if they are at end https://bugs.webkit.org/show_bug.cgi?id=90560 Reviewed by Ryosuke Niwa. CharacterIterator and BackwardsCharacterIterator try to advance their internal TextIterator without checking if they already are at end. This can cause crashes in TextIterator::advance. Test: platform/chromium/editing/surrounding-text/surrounding-text.html * editing/SurroundingText.cpp: (WebCore::SurroundingText::SurroundingText): * editing/TextIterator.cpp: (WebCore::CharacterIterator::advance): (WebCore::BackwardsCharacterIterator::advance): 2012-07-05 John Mellor <johnme@chromium.org> Text Autosizing: Add basic framework https://bugs.webkit.org/show_bug.cgi?id=88655 Follow-up patch tweaking method signatures. Reviewed by Simon Fraser. No functional change, so no new tests. * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::processSubtree): (WebCore::TextAutosizer::processBlock): (WebCore::TextAutosizer::processText): (WebCore): * rendering/TextAutosizer.h: (TextAutosizer): 2012-07-05 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move cursor to the current search match. https://bugs.webkit.org/show_bug.cgi?id=90621 Reviewed by Vsevolod Vlasov. After closing the search dialog, the cursor should be at the latest search match location. * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.markAndRevealRange): (WebInspector.TextEditor.prototype._handleFocused): 2012-07-05 Behdad Esfahbod <behdad@behdad.org> Subpixel layout broken with spans with CSS position other than static https://bugs.webkit.org/show_bug.cgi?id=90097 Reviewed by Eric Seidel. In InlineBox, don't truncate size to integers when returning. In RenderBlock, don't round-up width to next integer. Round-up to next LayoutUnit instead. Test: Added fast/sub-pixel/size-of-span-with-different-positions.html Adjust expected outputs affected by the rounding changes. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::fromFloatCeil): (FractionalLayoutUnit): * rendering/InlineBox.h: (WebCore::InlineBox::size): * rendering/RenderBlock.cpp: (WebCore::updatePreferredWidth): 2012-07-05 Nate Chapin <japhet@chromium.org> REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace https://bugs.webkit.org/show_bug.cgi?id=88436 Reviewed by Brady Eidson. Test: http/tests/multipart/multipart-replace-non-html-content.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load, rather than multiple times in a multipart load. (WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is actually committed, and multipart data is often not committed until the part is finished. Check whether the SharedBuffer is non-null instead. * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell was cleared as part of creation of a new Document. Check it before using it. 2012-07-05 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move search field to the bottom of the page. https://bugs.webkit.org/show_bug.cgi?id=90610 Reviewed by Vsevolod Vlasov. This is the first step in the Search/replace implementation. This change moves search field from the inspector toolbar to the inspector view footer that is visible upon Cmd/Ctrl+F. * English.lproj/localizedStrings.js: * inspector/front-end/InspectorView.js: (WebInspector.InspectorView): (WebInspector.InspectorView.prototype._pushToHistory): (WebInspector.InspectorView.prototype.panelsElement): (WebInspector.InspectorView.prototype.setFooterElement): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._reset): * inspector/front-end/SearchController.js: (WebInspector.SearchController): (WebInspector.SearchController.prototype.updateSearchLabel): (WebInspector.SearchController.prototype.cancelSearch): (WebInspector.SearchController.prototype._updateSearchNavigationButtonState): (WebInspector.SearchController.prototype.focusSearchField): (WebInspector.SearchController.prototype._onKeyDown): (WebInspector.SearchController.prototype._onNextButtonSearch): (WebInspector.SearchController.prototype._onPrevButtonSearch): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/inspector.css: (#search): (.toolbar-search-container): (.toolbar-search-navigation): (.toolbar-search-navigation:hover): (.toolbar-search-navigation.toolbar-search-navigation-prev): (.toolbar-search-navigation.toolbar-search-navigation-next): (.toolbar-search-navigation-hidden): (.status-bar): (.search-drawer-header input[type="search"].search-config-search): (.inspector-footer): (.inspector-footer > div): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.get _setCompactMode): (WebInspector.postDocumentKeyDown): 2012-07-05 Sergey Rogulenko <rogulenko@google.com> Web Inspector: added low-level instrumentation support for TimelineAgent https://bugs.webkit.org/show_bug.cgi?id=90264 Reviewed by Pavel Feldman. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::timelineAgentForOrphanEvents): (WebCore::InspectorInstrumentation::setTimelineAgentForOrphanEvents): (WebCore::InspectorInstrumentation::threadSpecificTimelineAgentForOrphanEvents): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): 2012-07-05 John Mellor <johnme@chromium.org> Text Autosizing: Add test framework and simple test. https://bugs.webkit.org/show_bug.cgi?id=90561 Exposes methods allowing Layout Tests to enable Text Autosizing and get the same results as if they were running on a mobile device. Reviewed by Adam Barth. Test: fast/text-autosizing/simple-paragraph.html * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore): (WebCore::Settings::setTextAutosizingWindowSizeOverride): * page/Settings.h: (Settings): (WebCore::Settings::textAutosizingWindowSizeOverride): * rendering/TextAutosizer.cpp: (WebCore::TextAutosizer::boostSubtree): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setTextAutosizingEnabled): (WebCore): (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Web Inspector: timeline events in the vicinity of event dividers some times are tricky to expand https://bugs.webkit.org/show_bug.cgi?id=90572 Reviewed by Pavel Feldman. - do not use resources-event-divider-padding; - make dividers larger and use border-color to visualize them; - move resources-<color>-divider to timelinePanel.css, as they're not used outside of timeline; * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.createEventDivider): * inspector/front-end/inspectorCommon.css: * inspector/front-end/timelinePanel.css: (.timeline .resources-event-divider): (.resources-red-divider): (.resources-blue-divider): (.resources-orange-divider): (.resources-divider.last): (.timeline .resources-event-divider.timeline-frame-divider): 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Web Inspector: incorrect height of main timeline pane after switching to memory mode https://bugs.webkit.org/show_bug.cgi?id=90387 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._splitterDragging): (WebInspector.TimelinePanel.prototype.set _setSplitterPosition): (WebInspector.TimelinePanel.prototype._overviewModeChanged): 2012-07-05 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: Add support for keyboard increment / decrement on numbers in attributes in Elements Panel https://bugs.webkit.org/show_bug.cgi?id=89586 Reviewed by Pavel Feldman Refactoring the key events while editing style property values. Migrated the code to UIUtils.js and referred from StylesSidebarPane.js, ElementsTreeOutline.js and MetricsSidebarPane.js. No new tests as code refactoring and UI feature added to ElementsTreeOutline.js * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingAttribute.handleKeyDownEvents): (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._handleKeyDown.finishHandler): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown.customNumberHandler): (WebInspector.MetricsSidebarPane.prototype._handleKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._handleNameOrValueUpDown.finishHandler): (WebInspector.StylesSidebarPane.prototype._handleNameOrValueUpDown): * inspector/front-end/UIUtils.js: (WebInspector._modifiedHexValue): (WebInspector._modifiedFloatNumber): (WebInspector.handleElementValueModifications): 2012-07-05 Gabor Rapcsanyi <rgabor@webkit.org> NEON intrinsics should be used with gaussian blur filter https://bugs.webkit.org/show_bug.cgi?id=90166 Reviewed by Zoltan Herczeg. Rewrite inline assembly to NEON intrinsics for better portabilty and readibility. Remove unnecessary FEGaussianBlurNEON.cpp and add NEONHelpers.h to the project which will contains the shared NEON code of the filters. Existing tests cover this issue. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyGeneric): (WebCore::FEGaussianBlur::platformApplyWorker): * platform/graphics/filters/FEGaussianBlur.h: (FEGaussianBlur): * platform/graphics/filters/arm/FEGaussianBlurNEON.cpp: Removed. * platform/graphics/filters/arm/FEGaussianBlurNEON.h: (WebCore::boxBlurNEON): * platform/graphics/filters/arm/NEONHelpers.h: Added. (WebCore): (WebCore::loadRGBA8AsFloat): (WebCore::storeFloatAsRGBA8): 2012-07-05 Sam D <dsam2912@gmail.com> Web Inspector: Having a "Scroll into view" for nodes through web inspector. https://bugs.webkit.org/show_bug.cgi?id=89554 Added options for scrolling-into-view the element node through web inspector. Reviewed by Pavel Feldman. No new tests. UI change. * English.lproj/localizedStrings.js: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (.): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.callFunction): 2012-07-05 Zan Dobersek <zandobersek@gmail.com> Add Gamepad logging channel https://bugs.webkit.org/show_bug.cgi?id=90570 Reviewed by Carlos Garcia Campos. Add a new logging channel for logging significant events that are related to Gamepad API implementation. No new tests - no new testable functionality. * platform/Logging.cpp: (WebCore): (WebCore::getChannelFromName): * platform/Logging.h: (WebCore): * platform/gtk/GamepadsGtk.cpp: Log when a device is registered or unregistered. (WebCore::GamepadsGtk::registerDevice): (WebCore::GamepadsGtk::unregisterDevice): 2012-07-05 Peter Wang <peter.wang@torchmobile.com.cn> Web Inspector: [JSC] support JS execution in the context of an isolated world https://bugs.webkit.org/show_bug.cgi?id=85709 Reviewed by Gavin Barraclough. No new test case for this bug. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::collectIsolatedContexts): (WebCore): 2012-07-04 Huang Dongsung <luxtella@company100.net> Add virtual keyword to ~BitmapImage and ~StillImage because ~Image is virtual. https://bugs.webkit.org/show_bug.cgi?id=90447 Reviewed by Alexey Proskuryakov. No new tests. This patch doesn't change behavior. * platform/graphics/BitmapImage.h: (BitmapImage): * platform/graphics/qt/StillImageQt.h: (StillImage): 2012-07-04 Mike West <mkwst@chromium.org> Implement the script-nonce Content Security Policy directive. https://bugs.webkit.org/show_bug.cgi?id=89577 Reviewed by Adam Barth. This patch implements the (experimental) script-nonce Content Security Policy directive from the 1.1 spec, which allows for selective execution of script by specifying a "nonce" attribute for the script tag. Script is only loaded and executed if it both matches the nonce and matches the script-src whitelist (if present). The implementation is gated on the ENABLE_CSP_NEXT flag, which is currently disabled for all ports other than Chromium. Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental Tests: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-badnonce.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-emptynonce.html http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::executeScript): Passing the nonce attribute through to check against CSP. * html/HTMLAttributeNames.in: * html/HTMLScriptElement.idl: Adding the `nonce` attribute to the script tag. * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::logInvalidNonce): (WebCore): (WebCore::CSPDirectiveList::checkNonceAndReportViolation): (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): If a nonce is set, deny JavaScript URLs and inline event handlers. (WebCore::CSPDirectiveList::allowScriptNonce): (WebCore::CSPDirectiveList::parseScriptNonce): (WebCore::CSPDirectiveList::addDirective): (WebCore::isAllowedByAllWithNonce): (WebCore::ContentSecurityPolicy::allowScriptNonce): * page/ContentSecurityPolicy.h: (WebCore): 2012-07-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> Notifications should be in Modules/notifications https://bugs.webkit.org/show_bug.cgi?id=82121 Reviewed by Adam Barth. The notifications directory is now self-contained. This patch moves it to the Modules directory. No new tests, covered by existing tests. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * Modules/notifications/DOMWindowNotifications.cpp: Renamed from Source/WebCore/notifications/DOMWindowNotifications.cpp. (WebCore): (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::~DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore::DOMWindowNotifications::disconnectFrameForPageCache): (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame): (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame): (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame): * Modules/notifications/DOMWindowNotifications.h: Renamed from Source/WebCore/notifications/DOMWindowNotifications.h. (WebCore): (DOMWindowNotifications): * Modules/notifications/DOMWindowNotifications.idl: Renamed from Source/WebCore/notifications/DOMWindowNotifications.idl. * Modules/notifications/Notification.cpp: Renamed from Source/WebCore/notifications/Notification.cpp. (WebCore): (WebCore::Notification::Notification): (WebCore::Notification::~Notification): (WebCore::Notification::create): (WebCore::getAndAddEventListener): (WebCore::Notification::interfaceName): (WebCore::Notification::show): (WebCore::Notification::close): (WebCore::Notification::eventTargetData): (WebCore::Notification::ensureEventTargetData): (WebCore::Notification::contextDestroyed): (WebCore::Notification::finalize): (WebCore::Notification::dispatchShowEvent): (WebCore::Notification::dispatchClickEvent): (WebCore::Notification::dispatchCloseEvent): (WebCore::Notification::dispatchErrorEvent): (WebCore::Notification::taskTimerFired): (WebCore::Notification::permissionLevel): (WebCore::Notification::permissionString): (WebCore::Notification::requestPermission): * Modules/notifications/Notification.h: Renamed from Source/WebCore/notifications/Notification.h. (WebCore): (Notification): (WebCore::Notification::cancel): (WebCore::Notification::isHTML): (WebCore::Notification::setHTML): (WebCore::Notification::url): (WebCore::Notification::setURL): (WebCore::Notification::iconURL): (WebCore::Notification::title): (WebCore::Notification::body): (WebCore::Notification::dir): (WebCore::Notification::setDir): (WebCore::Notification::replaceId): (WebCore::Notification::setReplaceId): (WebCore::Notification::tag): (WebCore::Notification::setTag): (WebCore::Notification::direction): (WebCore::Notification::scriptExecutionContext): (WebCore::Notification::detachPresenter): (WebCore::Notification::setBody): (WebCore::Notification::refEventTarget): (WebCore::Notification::derefEventTarget): * Modules/notifications/Notification.idl: Renamed from Source/WebCore/notifications/Notification.idl. * Modules/notifications/NotificationCenter.cpp: Renamed from Source/WebCore/notifications/NotificationCenter.cpp. (WebCore): (WebCore::NotificationCenter::create): (WebCore::NotificationCenter::NotificationCenter): (WebCore::NotificationCenter::checkPermission): (WebCore::NotificationCenter::requestPermission): (WebCore::NotificationCenter::stop): (WebCore::NotificationCenter::requestTimedOut): (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): * Modules/notifications/NotificationCenter.h: Renamed from Source/WebCore/notifications/NotificationCenter.h. (WebCore): (NotificationCenter): (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): (WebCore::NotificationCenter::client): (NotificationRequestCallback): * Modules/notifications/NotificationCenter.idl: Renamed from Source/WebCore/notifications/NotificationCenter.idl. * Modules/notifications/NotificationClient.h: Renamed from Source/WebCore/notifications/NotificationClient.h. (WebCore): (NotificationClient): (WebCore::NotificationClient::clearNotifications): (WebCore::NotificationClient::~NotificationClient): * Modules/notifications/NotificationController.cpp: Renamed from Source/WebCore/notifications/NotificationController.cpp. (WebCore): (WebCore::NotificationController::NotificationController): (WebCore::NotificationController::~NotificationController): (WebCore::NotificationController::create): (WebCore::NotificationController::clientFrom): (WebCore::NotificationController::supplementName): (WebCore::provideNotification): * Modules/notifications/NotificationController.h: Renamed from Source/WebCore/notifications/NotificationController.h. (WebCore): (NotificationController): (WebCore::NotificationController::from): (WebCore::NotificationController::client): * Modules/notifications/NotificationPermissionCallback.h: Renamed from Source/WebCore/notifications/NotificationPermissionCallback.h. (WebCore): (NotificationPermissionCallback): (WebCore::NotificationPermissionCallback::~NotificationPermissionCallback): * Modules/notifications/NotificationPermissionCallback.idl: Renamed from Source/WebCore/notifications/NotificationPermissionCallback.idl. * Modules/notifications/WorkerContextNotifications.cpp: Renamed from Source/WebCore/notifications/WorkerContextNotifications.cpp. (WebCore): (WebCore::WorkerContextNotifications::WorkerContextNotifications): (WebCore::WorkerContextNotifications::~WorkerContextNotifications): (WebCore::WorkerContextNotifications::from): (WebCore::WorkerContextNotifications::webkitNotifications): * Modules/notifications/WorkerContextNotifications.h: Renamed from Source/WebCore/notifications/WorkerContextNotifications.h. (WebCore): (WorkerContextNotifications): * Modules/notifications/WorkerContextNotifications.idl: Renamed from Source/WebCore/notifications/WorkerContextNotifications.idl. * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: 2012-07-04 Hayato Ito <hayato@chromium.org> Remove inline keywords from functions which can not be inlined in ComposedShadowTreeWalker https://bugs.webkit.org/show_bug.cgi?id=90432 Reviewed by Hajime Morita. No new tests - no functional changes. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseParent): (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): 2012-07-04 Luke Macpherson <macpherson@chromium.org> Inspector crashes when trying to inspect a page with CSS variables https://bugs.webkit.org/show_bug.cgi?id=89818 Reviewed by Antti Koivisto. Patch works by fixing treating handling of CSSPropertyID == CSSPropertyVariable as a special case, and looking up the author-defined property name from the CSSValue. Added test inspector/styles/variables/css-variables.html that inspects an element using CSS variables. Test is skipped when variables are compiled out. * css/CSSProperty.cpp: (WebCore::CSSProperty::cssName): (WebCore): (WebCore::CSSProperty::cssText): * css/CSSProperty.h: (CSSProperty): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::item): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::populateAllProperties): 2012-07-04 Anthony Scian <ascian@rim.com> Web Inspector [JSC]: Implement ScriptCallStack::stackTrace https://bugs.webkit.org/show_bug.cgi?id=40118 Reviewed by Yong Li. Implemented stub for createScriptCallStack to call into Interpreter and extract the current stack frames, iterate through the frames and create the return result required. No new tests, manually tested thrown exception and inspector tracebacks. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-07-04 Dana Jansens <danakj@chromium.org> [chromium] Respect memory needed for RenderSurfaces when reserving contents textures https://bugs.webkit.org/show_bug.cgi?id=89901 Reviewed by Adrienne Walker. Treat the memory allocation given to a tab as an allocation for its contents and surfaces. Then only use up contents memory such that the surface textures will still fit within the limit. Report histograms for the amount of contents and surface texture memory used by each frame generated by the main thread. In the context of ubercomp, each nested compositor will use less memory for contents ensuring that the root compositor has space for surfaces caused by that nested compositor. Since surface memory can no longer be taken by contents, we remove the preferred memory limit from the texture manager. Tests: TiledLayerChromiumTest.dontAllocateContentsWhenTargetSurfaceCantBeAllocated CCPrioritizedTextureTest.renderSurfacesReduceMemoryAvailableOutsideRootSurface CCPrioritizedTextureTest.renderSurfacesReduceMemoryAvailableForRequestLate CCPrioritizedTextureTest.whenRenderSurfaceNotAvailableTexturesAlsoNotAvailable * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawBackgroundFilters): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::setTexturePriorities): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::prioritizeTextures): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::didUseContentsTextureMemoryBytes): (WebCore): (WebCore::CCOverdrawMetrics::didUseRenderSurfaceTextureMemoryBytes): (WebCore::CCOverdrawMetrics::recordMetricsInternal): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (CCOverdrawMetrics): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::requestLate): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (WebCore::CCPrioritizedTextureManager::create): (WebCore::CCPrioritizedTextureManager::memoryForRenderSurfacesBytes): (CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: (WebCore::CCPriorityCalculator::uiPriority): (WebCore::CCPriorityCalculator::visiblePriority): (WebCore): (WebCore::CCPriorityCalculator::renderSurfacePriority): (WebCore::CCPriorityCalculator::priorityFromDistance): (WebCore::CCPriorityCalculator::priorityFromVisibility): * platform/graphics/chromium/cc/CCPriorityCalculator.h: (CCPriorityCalculator): 2012-07-04 John Mellor <johnme@chromium.org> Text Autosizing: Add basic framework https://bugs.webkit.org/show_bug.cgi?id=88655 This adds a highly simplified foundation that subsequent Text Autosizing patches can build upon. I've refactored this code (since the earlier combined diff uploaded to http://webkit.org/b/84186) to touch as few files as possible. Reviewed by Adam Barth. No new tests. I plan to add a test framework as my next Text Autosizing patch. * WebCore.gypi: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore): (Document): (WebCore::Document::textAutosizer): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/TextAutosizer.cpp: Added. (WebCore): (WebCore::TextAutosizer::TextAutosizer): (WebCore::TextAutosizer::~TextAutosizer): (WebCore::TextAutosizer::create): (WebCore::TextAutosizer::boostSubtree): (WebCore::TextAutosizer::boostBlock): (WebCore::TextAutosizer::boostText): (WebCore::TextAutosizer::treatAsInline): (WebCore::TextAutosizer::traverseNext): (WebCore::TextAutosizer::cloneRenderStyleWithState): * rendering/TextAutosizer.h: Added. (WebCore): (TextAutosizer): 2012-07-04 Andrey Kosyakov <caseq@chromium.org> Unreviewed, rolling out r121767. http://trac.webkit.org/changeset/121767 https://bugs.webkit.org/show_bug.cgi?id=89584 Crashes inspected page while recording timeline due to conflict with BeginFrame in record stack * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willProcessTask): (WebCore::InspectorTimelineAgent::didProcessTask): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.recordStyle): (WebInspector.TimelinePresentationModel.categoryForRecord): (WebInspector.TimelinePresentationModel.forAllRecords): (WebInspector.TimelinePresentationModel.prototype.addRecord): 2012-07-04 Dana Jansens <danakj@chromium.org> [chromium] Clear RenderSurfaces still when no idle paint will be done https://bugs.webkit.org/show_bug.cgi?id=90553 Reviewed by Adrienne Walker. Currently if idle painting is disabled, updateLayers() will early-out. But this prevents it from doing cleanup and clearing all RenderSurface pointers, leaving the layer tree in an unexpected state. Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): 2012-07-04 John Mellor <johnme@chromium.org> Text Autosizing: Add compile flag and runtime setting https://bugs.webkit.org/show_bug.cgi?id=87394 This patch renames Font Boosting to Text Autosizing and adds compile guards around the runtime setting. Reviewed by Adam Barth. No functionality yet, so no new tests. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * Target.pri: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setTextAutosizingEnabled): * page/Settings.h: (Settings): (WebCore::Settings::textAutosizingEnabled): 2012-07-03 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Emulate pseudo styles (hover etc.) of non-selected elements https://bugs.webkit.org/show_bug.cgi?id=86630 Reviewed by Pavel Feldman. - A map of pseudo-states for all bound DOM nodes is maintained in the backend and queried whenever StyleResolver calculates the effective element style. - In the frontend, markers are introduced to distinguish elements that have forced pseudo styles set for them. Additionally, dimmed markers are added for collapsed nodes, whose descendants have forced pseudo styles. More ElementDecorator subtypes will be added for other types of markers. Test: inspector/styles/force-pseudo-state.html * English.lproj/localizedStrings.js: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::reset): (WebCore::InspectorCSSAgent::forcePseudoState): (WebCore::InspectorCSSAgent::recalcStyleForPseudoStateIfNeeded): (WebCore::InspectorCSSAgent::elementForId): (WebCore::InspectorCSSAgent::didRemoveDocument): (WebCore::InspectorCSSAgent::didRemoveDOMNode): (WebCore::InspectorCSSAgent::resetPseudoStates): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::unbind): (WebCore::InspectorDOMAgent::didRemoveDOMNode): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.get this): (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._setPseudoClassForNodeId): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._createNodeDecorators): (WebInspector.ElementsTreeOutline.prototype.updateOpenCloseTags): (WebInspector.ElementsTreeOutline.ElementDecorator): (WebInspector.ElementsTreeOutline.ElementDecorator.prototype.decorate): (WebInspector.ElementsTreeOutline.ElementDecorator.prototype.decorateAncestor): (WebInspector.ElementsTreeOutline.PseudoStateDecorator): (WebInspector.ElementsTreeOutline.PseudoStateDecorator.prototype.decorate): (WebInspector.ElementsTreeOutline.PseudoStateDecorator.prototype.decorateAncestor): (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): (WebInspector.ElementsTreeElement.prototype._populateForcedPseudoStateItems): (WebInspector.ElementsTreeElement.prototype.updateTitle): (WebInspector.ElementsTreeElement.prototype._createDecoratorElement): (WebInspector.ElementsTreeElement.prototype._updateDecorations): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.get forcedPseudoClasses): (WebInspector.StylesSidebarPane.prototype._updateForcedPseudoStateInputs): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener): * inspector/front-end/elementsPanel.css: (#elements-content .elements-gutter-decoration): (#elements-content .elements-gutter-decoration.elements-has-decorated-children): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: fix search on the network panel. https://bugs.webkit.org/show_bug.cgi?id=90557 Reviewed by Vsevolod Vlasov. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._highlightNthMatchedRequest): 2012-07-04 Kwang Yul Seo <skyul@company100.net> Stop tracking line number in tokenizer https://bugs.webkit.org/show_bug.cgi?id=90544 Reviewed by Adam Barth. Because SegmentedString knows how to track the current line and column, a tokenizer does not need to keep track of the current line by itself. No behavior change, so no new tests. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::lineNumber): (WebCore::HTMLDocumentParser::textPosition): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore): (WebCore::HTMLTokenizer::nextToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processScriptStartTag): * html/track/WebVTTTokenizer.cpp: (WebCore::WebVTTTokenizer::reset): (WebCore::WebVTTTokenizer::nextToken): * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): * platform/text/SegmentedString.h: (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber): (WebCore::SegmentedString::advanceAndUpdateLineNumber): (SegmentedString): * xml/parser/MarkupTokenizerBase.h: (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance): (WebCore::MarkupTokenizerBase::emitAndResumeIn): (WebCore::MarkupTokenizerBase::emitEndOfFile): (WebCore::MarkupTokenizerBase::reset): (MarkupTokenizerBase): * xml/parser/MarkupTokenizerInlineMethods.h: (WebCore): * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2012-07-04 Ryuan Choi <ryuan.choi@samsung.com> [CMAKE] Add GENERATE_BINDINGS macro to share the codes which use generate-bindings.pl. https://bugs.webkit.org/show_bug.cgi?id=90258 Reviewed by Rob Buis. Use GENERATE_BINDINGS instead of using generate-bindings.pl directly. * UseJSC.cmake: * UseV8.cmake: * PlatformBlackBerry.cmake: 2012-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: UISourceCode should take care of adding revision after committing working copy. https://bugs.webkit.org/show_bug.cgi?id=90549 Reviewed by Pavel Feldman. Revision is now added in UISourceCode.commitWorkingCopy synchronously even if saving to JS VM or CSS model failed. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype._callOrSetTimeout): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.commitWorkingCopy): * inspector/front-end/Workspace.js: (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodeForURL): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: move settings button back to the right. https://bugs.webkit.org/show_bug.cgi?id=90552 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.css: (button.status-bar-item:active, button.status-bar-item.emulate-active): (button.settings-status-bar-item): 2012-07-04 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Get rid of ResourceDomainModelBinding and DebuggerResourceBinding, make Resource.setContent private. https://bugs.webkit.org/show_bug.cgi?id=90531 Reviewed by Pavel Feldman. Resource.setContent made private. It is delegating now to UISourceCodes which take care of domain specific actions. DebuggerResourceBinding was be removed and DebuggerResourceBinding.setScriptSource was moved to JavaScriptSource. ResourceDomainModelBinding was removed as well. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding): * inspector/front-end/DebuggerResourceBinding.js: Removed. * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): (WebInspector.JavaScriptSource.prototype._setScriptSource.didEditScriptSource): (WebInspector.JavaScriptSource.prototype._setScriptSource): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._setContent): (WebInspector.Resource.prototype.revertToOriginal): (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.ResourceRevision.prototype.revertToThis): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.isEditable): * inspector/front-end/UISourceCode.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: (WebInspector.Workspace): * inspector/front-end/inspector.html: 2012-07-04 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: follow up to r121843, reduce inspector dock timeout to 200ms. * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseDown): 2012-07-04 Ian Vollick <vollick@chromium.org> [chromium] Correctly reject accelerated animations with certain rotations. https://bugs.webkit.org/show_bug.cgi?id=89768 Reviewed by James Robinson. UnitTests: GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation GraphicsLayerChromiumTest.createTransformAnimationWithRotationInvolvingNegativeAngles GraphicsLayerChromiumTest.createTransformAnimationWithSmallRotationInvolvingLargeAngles * platform/graphics/chromium/AnimationTranslationUtil.cpp: (WebCore::appendKeyframe): (WebCore::isRotationType): (WebCore): (WebCore::causesRotationOfAtLeast180Degrees): (WebCore::CCKeyframedTransformAnimationCurve): (WebCore::createActiveAnimation): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::addAnimation): 2012-07-04 Pavel Feldman <pfeldman@chromium.org> Web Inspector: "Dock to right" shouldn't be in the settings dialog https://bugs.webkit.org/show_bug.cgi?id=76917 Reviewed by Vsevolod Vlasov. Introduced 'long click-enabled' options for status bar buttons. Made dock/undock one of them. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton.prototype._clicked): (WebInspector.StatusBarButton.prototype.set visible): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseDown): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled.mouseUp): (WebInspector.StatusBarButton.prototype.makeLongClickEnabled): (WebInspector.StatusBarButton.prototype._showOptions.mouseOver): (WebInspector.StatusBarButton.prototype._showOptions.mouseOut): (WebInspector.StatusBarButton.prototype._showOptions.mouseUp): (WebInspector.StatusBarButton.prototype._showOptions): * inspector/front-end/UIUtils.js: (WebInspector.elementDragStart): (WebInspector.elementDragEnd): (WebInspector.GlassPane): (WebInspector.GlassPane.prototype.dispose): * inspector/front-end/inspector.css: (.long-click-glyph): (.long-click-glyph.shadow): (button.status-bar-item:active:not(.emulate-inactive), button.status-bar-item.emulate-active): (.alternate-status-bar-buttons-bar): (.alternate-status-bar-buttons-bar .status-bar-item): * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._createDockOptions.onClick.set else): (WebInspector._createDockOptions.onClick): 2012-07-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121813. http://trac.webkit.org/changeset/121813 https://bugs.webkit.org/show_bug.cgi?id=90522 Causes browser_tests failure: ErrorPageTest.DNSError_GoBack2{Forward2,AndForward} on Chromium {Linux,Mac,Win} (Requested by yosin on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): (WebCore::DocumentLoader::setupForReplaceByMIMEType): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): 2012-07-04 Kihong Kwon <kihong.kwon@samsung.com> [EFL] Change format of return value of navigator.language https://bugs.webkit.org/show_bug.cgi?id=89639 Reviewed by Kenneth Rohde Christiansen. Remove encoding type from return value of navigator.language. For example, from en-US.UTF-8 to en-US. Use exist test case (fast/js/navigator-language.html). * platform/efl/LanguageEfl.cpp: (WebCore::platformLanguage): 2012-07-03 Carlos Garcia Campos <cgarcia@igalia.com> [GTK] Don't show accel labels in context menu items https://bugs.webkit.org/show_bug.cgi?id=90437 Reviewed by Martin Robinson. When a context menu item is created with a GtkMenuItem that has been created from a GtkAction, if the action has an accelerator, it's shown in the menu item label, like menu items in a menu bar. In that case we should reset the accel closure of the menu item label, like GtkUIManager does for popup menus, to make sure the accelerator is not shown. This isn't needed for all other ContextMenuIem constructors, because the GtkAction is created without accelerator by webkit in those cases. * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::ContextMenuItem::ContextMenuItem): 2012-07-03 Christophe Dumez <christophe.dumez@intel.com> [EFL] Move BatteryClientEfl from WebKit to WebCore https://bugs.webkit.org/show_bug.cgi?id=90063 Reviewed by Kenneth Rohde Christiansen. Move BatteryClientEfl class from WebKit to WebCore so that it can be reused in WebKit2. No new tests, no behavior change. * PlatformEfl.cmake: * platform/efl/BatteryClientEfl.cpp: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp. (WebCore): (WebCore::BatteryClientEfl::BatteryClientEfl): (WebCore::BatteryClientEfl::setController): (WebCore::BatteryClientEfl::startUpdating): (WebCore::BatteryClientEfl::stopUpdating): (WebCore::BatteryClientEfl::batteryControllerDestroyed): (WebCore::BatteryClientEfl::setBatteryStatus): (WebCore::BatteryClientEfl::timerFired): (WebCore::BatteryClientEfl::getBatteryStatus): (WebCore::BatteryClientEfl::setBatteryClient): * platform/efl/BatteryClientEfl.h: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h. (WebCore): (BatteryClientEfl): (WebCore::BatteryClientEfl::~BatteryClientEfl): (WebCore::BatteryClientEfl::batteryStatus): 2012-07-03 Huang Dongsung <luxtella@company100.net> Add a comment in order to clarify why BitmapImage::frameHasAlphaAtIndex returns true as default. https://bugs.webkit.org/show_bug.cgi?id=90445 Reviewed by Eric Seidel. No new tests. This patch doesn't change behavior. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::frameHasAlphaAtIndex): (WebCore): 2012-07-03 Alex Sakhartchouk <alexst@chromium.org> [chromium] Avoid calling getUniformLocation??() in the compositor startup https://bugs.webkit.org/show_bug.cgi?id=90217 Reviewed by Adrienne Walker. This change allows chrome compositor to bind uniform locations instead of querying them from the graphics context by using GL_CHROMIUM_bind_uniform_location. The extention itself is tested in chromium and the change in webkit simply adds plumbing to allow its usage. Existing pixel tests would be able to verify proper behaviour. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tileCheckerboardProgram): (WebCore::LayerRendererChromium::solidColorProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderPassProgram): (WebCore::LayerRendererChromium::renderPassProgramAA): (WebCore::LayerRendererChromium::renderPassMaskProgram): (WebCore::LayerRendererChromium::renderPassMaskProgramAA): (WebCore::LayerRendererChromium::tileProgram): (WebCore::LayerRendererChromium::tileProgramOpaque): (WebCore::LayerRendererChromium::tileProgramAA): (WebCore::LayerRendererChromium::tileProgramSwizzle): (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque): (WebCore::LayerRendererChromium::tileProgramSwizzleAA): (WebCore::LayerRendererChromium::textureProgram): (WebCore::LayerRendererChromium::textureProgramFlip): (WebCore::LayerRendererChromium::textureIOSurfaceProgram): (WebCore::LayerRendererChromium::videoYUVProgram): (WebCore::LayerRendererChromium::videoStreamTextureProgram): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::ProgramBindingBase::ProgramBindingBase): (WebCore::ProgramBindingBase::~ProgramBindingBase): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::link): (WebCore): (WebCore::ProgramBindingBase::cleanup): (WebCore::ProgramBindingBase::createShaderProgram): (WebCore::ProgramBindingBase::cleanupShaders): * platform/graphics/chromium/ProgramBinding.h: (ProgramBindingBase): (WebCore::ProgramBinding::initialize): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTex::init): (WebCore::VertexShaderPosTexYUVStretch::init): (WebCore::VertexShaderPos::init): (WebCore::VertexShaderPosTexTransform::init): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderTile::init): (WebCore::VertexShaderVideoTransform::init): (WebCore::FragmentTexAlphaBinding::init): (WebCore::FragmentTexOpaqueBinding::init): (WebCore::FragmentShaderOESImageExternal::init): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderYUVVideo::init): (WebCore::FragmentShaderColor::init): (WebCore::FragmentShaderCheckerboard::init): * platform/graphics/chromium/ShaderChromium.h: (VertexShaderPosTex): (VertexShaderPosTexYUVStretch): (VertexShaderPos): (WebCore::VertexShaderPosTexIdentity::init): (VertexShaderPosTexTransform): (VertexShaderQuad): (VertexShaderTile): (VertexShaderVideoTransform): (FragmentTexAlphaBinding): (FragmentTexOpaqueBinding): (FragmentShaderOESImageExternal): (FragmentShaderRGBATexAlphaAA): (FragmentTexClampAlphaAABinding): (FragmentShaderRGBATexAlphaMask): (FragmentShaderRGBATexAlphaMaskAA): (FragmentShaderYUVVideo): (FragmentShaderColor): (FragmentShaderCheckerboard): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureCopier.h: (WebCore::AcceleratedTextureCopier::create): (AcceleratedTextureCopier): 2012-07-03 Erik Arvidsson <arv@chromium.org> [V8] Remove enableFasterDOMStoreAccess which is never used https://bugs.webkit.org/show_bug.cgi?id=90489 Reviewed by Adam Barth. No new tests. Dead code removal. * bindings/v8/V8DOMMap.cpp: * bindings/v8/V8DOMMap.h: (WebCore): 2012-07-03 Joshua Bell <jsbell@chromium.org> Binding: IDL type DOMString[] shouldn't match null https://bugs.webkit.org/show_bug.cgi?id=84217 Reviewed by Kentaro Hara. Similar to r121714, IDL overloads with T[] (which is only minimally supported) were being treated as Nullable by default during overloaded method dispatching, which deviates from the WebIDL specification. Extend the previous change to look for Nullable (specified by "?" type suffix in the IDL) for array types. Also, after inspection of the spec, use a strict "is this an Array?" test in the JS generator rather than an "inherits from Array.prototype?" test, to match the WebIDL spec. IDL files with affected overloads are modified to include the "?" suffix so that no behavior changes are introduced by this patch - the JS and V8 generator results before/after the change show no diffs apart from the stricter isJSArray() test. Test: bindings/scripts/test/TestObj.idl (a non-Nullable T[] overload) * Modules/indexeddb/IDBDatabase.idl: Tag T[] overloads with ? suffix. * Modules/indexeddb/IDBObjectStore.idl: Ditto. * Modules/vibration/NavigatorVibration.idl: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Check isNullable for T[]. (GenerateParametersCheckExpression): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateParametersCheckExpression): * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): (WebCore): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/TestObj.idl: Tag existing T[] with ?, add non-? T[]. * bindings/scripts/test/V8/V8TestObj.cpp: Rebaselined. (WebCore::TestObjV8Internal::overloadedMethod9Callback): (TestObjV8Internal): (WebCore::TestObjV8Internal::overloadedMethodCallback): 2012-07-03 Nate Chapin <japhet@chromium.org> REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace https://bugs.webkit.org/show_bug.cgi?id=88436 Reviewed by Brady Eidson. Test: http/tests/multipart/multipart-replace-non-html-content.php * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load, rather than multiple times in a multipart load. (WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is actually committed, and multipart data is often not committed until the part is finished. Check whether the SharedBuffer is non-null instead. * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell was cleared as part of creation of a new Document. Check it before using it. 2012-07-03 Raymond Toy <rtoy@google.com> Add AudioFIFO class and simplify AudioPullFIFO https://bugs.webkit.org/show_bug.cgi?id=90398 Reviewed by Chris Rogers. No new tests. This code will be used in audio back-end implementation. Add AudioFIFO class to implement main parts of FIFO. Simplify implementation of AudioPushFIFO by using AudioFIFO. * WebCore.gypi: Add new files. New AudioFIFO class * platform/audio/AudioFIFO.cpp: Copied from Source/WebCore/platform/audio/AudioPullFIFO.cpp. (WebCore): (WebCore::AudioFIFO::AudioFIFO): (WebCore::AudioFIFO::consume): (WebCore::AudioFIFO::push): (WebCore::AudioFIFO::findWrapLengths): * platform/audio/AudioFIFO.h: Copied from Source/WebCore/platform/audio/AudioPullFIFO.h. (WebCore): (AudioFIFO): (WebCore::AudioFIFO::framesInFifo): (WebCore::AudioFIFO::updateIndex): Use AudioFIFO * platform/audio/AudioPullFIFO.cpp: (WebCore::AudioPullFIFO::AudioPullFIFO): (WebCore::AudioPullFIFO::consume): (WebCore::AudioPullFIFO::fillBuffer): * platform/audio/AudioPullFIFO.h: (AudioPullFIFO): 2012-07-03 Nate Chapin <japhet@chromium.org> Protect this DocumentThreadableLoader in cancel() to handle reentrancy properly. https://bugs.webkit.org/show_bug.cgi?id=90483 Reviewed by Abhishek Arya. No new tests, covered by http/tests/xmlhttprequest/reentrant-cancel.html * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::cancel): 2012-07-03 Tony Chang <tony@chromium.org> [chromium] Unreviewed, update .gitignore to handle VS2010 files. * WebCore.gyp/.gitignore: 2012-07-03 Zan Dobersek <zandobersek@gmail.com> [Gtk][Gamepads] 'warning: comparison is always true due to limited range of data type [-Wtype-limits]' in GamepadsGtk.cpp https://bugs.webkit.org/show_bug.cgi?id=90477 Reviewed by Martin Robinson. Vector::find() returns value of type size_t, springing errors when assigning the value to a variable of type unsigned. Use size_t type for that variable instead. No new tests - no changed functionality. * platform/gtk/GamepadsGtk.cpp: (WebCore::GamepadsGtk::unregisterDevice): 2012-07-03 Dominik Röttsches <dominik.rottsches@intel.com> Fix LayoutUnit usage in RenderImage::imageDimensionsChanged https://bugs.webkit.org/show_bug.cgi?id=90173 Reviewed by Eric Seidel. The appropriate type should be used for storing width() and height() into local temporary variables. No new tests, no change in behavior. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageDimensionsChanged): 2012-07-03 Sergio Villar Senin <svillar@igalia.com> [TextureMapper] Typo in edge-distance anti-aliasing code https://bugs.webkit.org/show_bug.cgi?id=90475 Reviewed by Martin Robinson. No new tests. This just fixes a typo. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [Extensions API] Resource manipulations should be based on UISourceCode thus extending Sources Panel. https://bugs.webkit.org/show_bug.cgi?id=89868 Reviewed by Pavel Feldman. Extensions API is now based on both ScriptsPanel acting as a UISourceCodeProvider and ResourceTreeModel. Extensions API resource could be for any content provider now. Extensions API resource.setContent implementation is now based on UISourceCode editing methods. Drive-by StyleSource insremental editing timeout fix. * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): (WebInspector.ExtensionServer.prototype._makeResource): (WebInspector.ExtensionServer.prototype._onGetPageResources): (WebInspector.ExtensionServer.prototype._getResourceContent): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): (WebInspector.ExtensionServer.prototype._notifyResourceAdded): (WebInspector.ExtensionServer.prototype._notifyResourceContentCommitted): * inspector/front-end/JavaScriptSource.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.uiSourceCodes): (WebInspector.ScriptsPanel.prototype.uiSourceCodeForURL): (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.workingCopyCommitted): (WebInspector.StyleSource.prototype.workingCopyChanged): (WebInspector.StyleSource.prototype._callOrSetTimeout): (WebInspector.StyleSource.prototype._commitIncrementalEdit): (WebInspector.StyleSource.prototype._clearIncrementalUpdateTimer): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype.workingCopy): (WebInspector.UISourceCode.prototype.setWorkingCopy): (WebInspector.UISourceCode.prototype.isDirty): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Anonymous scripts (evals) should not be added to Workspace. https://bugs.webkit.org/show_bug.cgi?id=90467 Reviewed by Pavel Feldman. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): 2012-07-03 Robert Hogan <robert@webkit.org> CSS 2.1 failure: floats-wrap-top-below-inline-* fail https://bugs.webkit.org/show_bug.cgi?id=88171 Reviewed by Eric Seidel. When shifting a line or element left or right to avoid a float use the height of the line or element to determine whether the float is inside the element or if it overlaps the bottom of the element. Do this by passing the height of the element to the interval tree used to detect the overlap with it's containing block's floats. The height is zero by default so callers to logical[Left|Right]OffsetForLine will need to pass the height if they want to use it to detect floats to avoid. Tests: css2.1/20110323/floats-wrap-top-below-bfc-001l.htm css2.1/20110323/floats-wrap-top-below-bfc-001r.htm css2.1/20110323/floats-wrap-top-below-bfc-002l.htm css2.1/20110323/floats-wrap-top-below-bfc-002r.htm css2.1/20110323/floats-wrap-top-below-bfc-003l.htm css2.1/20110323/floats-wrap-top-below-bfc-003r.htm css2.1/20110323/floats-wrap-top-below-inline-001l.htm css2.1/20110323/floats-wrap-top-below-inline-001r.htm css2.1/20110323/floats-wrap-top-below-inline-002l.htm css2.1/20110323/floats-wrap-top-below-inline-002r.htm css2.1/20110323/floats-wrap-top-below-inline-003l.htm css2.1/20110323/floats-wrap-top-below-inline-003r.htm css2.1/20110323/floats-zero-height-wrap-001.htm css2.1/20110323/floats-zero-height-wrap-002.htm fast/block/float/floats-wrap-inside-inline-001.htm fast/block/float/floats-wrap-inside-inline-002.htm fast/block/float/floats-wrap-inside-inline-003.htm fast/block/float/floats-wrap-inside-inline-004.htm fast/block/float/floats-wrap-inside-inline-005.htm * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): (WebCore::::collectIfNeeded): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::getClearDelta): * rendering/RenderBlock.h: (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::startOffsetForLine): (WebCore::RenderBlock::endOffsetForLine): (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): (RenderBlock): (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter): (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue): (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue): (FloatIntervalSearchAdapter): * rendering/RenderBlockLineLayout.cpp: (WebCore::logicalBottomForLine): (WebCore): (WebCore::LineWidth::updateAvailableWidth): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Introduce Workspace make it UISourceCode provider for ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=90466 Reviewed by Pavel Feldman. Introduced WebInspector.Workspace as a model (UISourceCode provider) behind ScriptsPanel. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/Workspace.js: Added. (WebInspector.CompositeUISourceCodeProvider): (WebInspector.CompositeUISourceCodeProvider.prototype._registerUISourceCodeProvider): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeAdded): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeReplaced): (WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeRemoved): (WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodes): (WebInspector.Workspace): (WebInspector.Workspace.prototype.registerUISourceCodeProvider): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: 2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Make use of .qmake.cache for caching features Instead of loading() features from the files that need them (and re-running a bunch of checks), we now run feature detection as part of configure.pro, and have build-webkit write the computed feature-defines and CONFIG to .qmake.cache, which is then loaded by qmake _before_ even defaults_pre when building WebKit.pro. At some point we'll be able to selectivly prevent running of config tests in configure.pro, which means we don't need a separate code-path for the build-webkit --help case. We should also move the code in build-webkit that now uses .webkit.config to detect clean builds, to use .qmake.cache, since we now store the same thing there. Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * DerivedSources.pri: * WebCore.pri: 2012-07-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121766. http://trac.webkit.org/changeset/121766 https://bugs.webkit.org/show_bug.cgi?id=90465 It caused flakey build errors on the bots (Requested by Ossy on #webkit). * DerivedSources.pri: * WebCore.pri: 2012-07-03 George Staikos <staikos@webkit.org> [BlackBerry] Enable Custom Scheme Handlers for BlackBerry. https://bugs.webkit.org/show_bug.cgi?id=90422 Reviewed by Rob Buis. * page/NavigatorRegisterProtocolHandler.cpp: (WebCore::initProtocolHandlerWhitelist): Disable the overrides as they're undesired by BlackBerry 2012-07-03 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Forward message loop instrumentation data to frontend. https://bugs.webkit.org/show_bug.cgi?id=89584 Reviewed by Yury Semikhatsky. Transmit collected message loop tasks to inspector frontend. Now "Program" should be a top-level event on browsers that support message loop instrumentation. Frontend was changed so that user will not see any changes. * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): Added new event type - "Program" (WebCore::InspectorTimelineAgent::willProcessTask): Begin "Program" event. (WebCore::InspectorTimelineAgent::didProcessTask): Finish "Program" event. (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): Do not add counters to "Program" events. (WebCore): (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic): Renamed from "setHeapSizeStatistic" * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): Unwraps "Program" events. (WebInspector.MemoryStatistics.prototype._innerRecordAdded): Renamed from "_onRecordAdded" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): Unwraps "Program" events. (WebInspector.TimelineFrameController.prototype._innerAddRecord): Renamed from "_addRecord" * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): Filter out "Program" category. (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createStatusbarButtons): Filter out "Program" category. (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): Unwraps "Program" events. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): Added "Program" category. (WebInspector.TimelinePresentationModel.recordStyle): Ditto. (WebInspector.TimelinePresentationModel.prototype.addRecord): Unwraps "Program" events. (WebInspector.TimelinePresentationModel.prototype._addRecord): Renamed from "addRecord" 2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Make use of .qmake.cache for caching features Instead of loading() features from the files that need them (and re-running a bunch of checks), we now run feature detection as part of configure.pro, and have build-webkit write the computed feature-defines and CONFIG to .qmake.cache, which is then loaded by qmake _before_ even defaults_pre when building WebKit.pro. At some point we'll be able to selectivly prevent running of config tests in configure.pro, which means we don't need a separate code-path for the build-webkit --help case. We should also move the code in build-webkit that now uses .webkit.config to detect clean builds, to use .qmake.cache, since we now store the same thing there. Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> https://bugs.webkit.org/show_bug.cgi?id=90461 Reviewed by Tor Arne Vestbø. * DerivedSources.pri: * WebCore.pri: 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> inspector/debugger/script-snippet-model.html fails https://bugs.webkit.org/show_bug.cgi?id=90385 Reviewed by Pavel Feldman. * inspector/front-end/ScriptSnippetModel.js: 2012-07-03 Alexander Pavlov <apavlov@chromium.org> [REGRESSION] Crash when copying a StyleRuleMedia with a NULL m_mediaQueries https://bugs.webkit.org/show_bug.cgi?id=90459 Reviewed by Andreas Kling. Create StyleRuleMedia with a non-NULL MediaQuerySet. The respective NULL checks for it were all over the code, except the copy constructor. Added the check, just in case. * css/CSSParser.cpp: (WebCore::CSSParser::createMediaRule): * css/StyleRule.cpp: (WebCore::StyleRuleMedia::StyleRuleMedia): 2012-07-03 Andrey Kosyakov <caseq@chromium.org> Web Inspector: display time intervals measured with console.time() and console.timeEnd() in Timeline https://bugs.webkit.org/show_bug.cgi?id=90442 Reviewed by Pavel Feldman. - added Time and TimeEnd record types produced by console.time() and console.timeEnd() - connect Time to TimeEnd in "glue" mode to better visualize the interval; - always make Time a top-level record; * English.lproj/localizedStrings.js: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::startConsoleTimingImpl): (WebCore::InspectorInstrumentation::stopConsoleTimingImpl): * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): (WebCore::InspectorTimelineAgent::didStartTiming): (WebCore): (WebCore::InspectorTimelineAgent::didStopTiming): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.recordStyle): (WebInspector.TimelinePresentationModel.categoryForRecord): (WebInspector.TimelinePresentationModel.prototype.reset): (WebInspector.TimelinePresentationModel.prototype.addRecord): (WebInspector.TimelinePresentationModel.prototype._findParentRecord): (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): 2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk> [Qt][Win] Fix broken QtWebKit5.lib linking https://bugs.webkit.org/show_bug.cgi?id=88321 Reviewed by Kenneth Rohde Christiansen. * platform/PlatformExportMacros.h: 2012-07-03 Philip Rogers <pdr@google.com> Fix text positioning with non-bmp characters. https://bugs.webkit.org/show_bug.cgi?id=87681 Reviewed by Nikolas Zimmermann. Previously when constructing metrics for tspans with non-bmp characters, each non-bmp character treated as a skipped character in the same way that spaces are ignored. This made sense because the initial SVGCharacterDataMap for <text> is indexed by character index (not string length) so the high portion of a non-bmp character was treated as a skipped space. Unfortunately, this led to a bug because skipped spaces lead to an offset in the positioning values list but non-bmp characters do not. This change switches the code to use a new offset for non-bmp characters, surrogatePairCharacters, which does not affect the positioning values list. Tests: svg/text/non-bmp-tspans-expected.svg svg/text/non-bmp-tspans.svg * rendering/svg/SVGTextMetricsBuilder.cpp: (WebCore::SVGTextMetricsBuilder::measureTextRenderer): 2012-07-03 Gyuyoung Kim <gyuyoung.kim@samsung.com> Improve test cases for network information APIs https://bugs.webkit.org/show_bug.cgi?id=90162 Reviewed by Adam Barth. Existing implementation doesn't test port implementation in network info APIs. This patch lets test cases use bandwidth and metered functions implemented by port layer. In addition, expected results need to check return type instead of property name. No new tests. Covered by existing tests. * Modules/networkinfo/NetworkInfoConnection.cpp: (WebCore::NetworkInfoConnection::bandwidth): (WebCore::NetworkInfoConnection::metered): 2012-07-03 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] [WK2] Don't call eina_iterator_free() if iterator is NULL https://bugs.webkit.org/show_bug.cgi?id=90076 Reviewed by Kenneth Rohde Christiansen. Add a null check to prevent calling eina_iterator_free() when iterator is NULL. No new tests. This patch doesn't change behavior. * platform/efl/FileSystemEfl.cpp: (WebCore::listDirectory): Early return when iterator is NULL. 2012-07-03 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text https://bugs.webkit.org/show_bug.cgi?id=90440 Reviewed by Vsevolod Vlasov. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingTextNode): 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Save scroll selection and cursor position of SourceFrames in sources panel. https://bugs.webkit.org/show_bug.cgi?id=90294 Reviewed by Yury Semikhatsky. Scroll and selection change handling is now delegated from TextViewer to SourceFrame. SourceFrame now dispatches ScrollChanged and SelectionChanged events. TabbedEditorContainer now saves scroll and selection information together with the url history and restores scroll and selection on resource opening. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.highlightLine): (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineHighlight): (WebInspector.SourceFrame.prototype.revealLine): (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineToReveal): (WebInspector.SourceFrame.prototype.scrollToLine): (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded): (WebInspector.SourceFrame.prototype._clearLineToScrollTo): (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded): (WebInspector.SourceFrame.prototype._wasShownOrLoaded): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype.selectionChanged): (WebInspector.SourceFrame.prototype.scrollChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.selectionChanged): (WebInspector.TextViewerDelegateForSourceFrame.prototype.scrollChanged): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners): (WebInspector.TabbedEditorContainer.prototype._scrollChanged): (WebInspector.TabbedEditorContainer.prototype._selectionChanged): (WebInspector.TabbedEditorContainer.prototype._appendFileTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.HistoryItem): (WebInspector.TabbedEditorContainer.HistoryItem.fromObject): (WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject): (WebInspector.TabbedEditorContainer.History): (WebInspector.TabbedEditorContainer.History.fromObject): (WebInspector.TabbedEditorContainer.History.prototype.index): (WebInspector.TabbedEditorContainer.History.prototype.selectionRange): (WebInspector.TabbedEditorContainer.History.prototype.updateSelectionRange): (WebInspector.TabbedEditorContainer.History.prototype.scrollLineNumber): (WebInspector.TabbedEditorContainer.History.prototype.updateScrollLineNumber): (WebInspector.TabbedEditorContainer.History.prototype.update): (WebInspector.TabbedEditorContainer.History.prototype.remove): (WebInspector.TabbedEditorContainer.History.prototype.save): (WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.fromObject): (WebInspector.TextRange.prototype.clone): (WebInspector.TextRange.prototype.serializeToObject): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleScrollChanged): (WebInspector.TextViewer.prototype.scrollToLine): (WebInspector.TextViewer.prototype._handleSelectionChange): (WebInspector.TextViewer.prototype.setSelection): (WebInspector.TextViewer.prototype.wasShown): (WebInspector.TextViewer.prototype._handleFocused): (WebInspector.TextViewer.prototype.willHide): (WebInspector.TextViewerDelegate.prototype.selectionChanged): (WebInspector.TextViewerDelegate.prototype.scrollChanged): (WebInspector.TextEditorChunkedPanel.prototype.scrollToLine): 2012-07-03 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Make DirectoryContentView sortable https://bugs.webkit.org/show_bug.cgi?id=90361 Reviewed by Vsevolod Vlasov. * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): * inspector/front-end/DirectoryContentView.js: (WebInspector.DirectoryContentView): (WebInspector.DirectoryContentView.prototype.showEntries): (WebInspector.DirectoryContentView.prototype._sort): (WebInspector.DirectoryContentView.Node.comparator.isDirectoryCompare): (WebInspector.DirectoryContentView.Node.comparator.nameCompare): (WebInspector.DirectoryContentView.Node.comparator.typeCompare): (WebInspector.DirectoryContentView.Node.comparator.sizeCompare): (WebInspector.DirectoryContentView.Node.comparator): (WebInspector.DirectoryContentView.Node.prototype._metadataReceived): 2012-07-03 Jan Keromnes <janx@linux.com> Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor https://bugs.webkit.org/show_bug.cgi?id=89939 Reviewed by Vsevolod Vlasov. Fixed LayoutTests and PerformanceTests accordingly. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover): (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition): (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine): (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded): (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.defaultFocusedElement): (WebInspector.SourceFrame.prototype.get textEditor): (WebInspector.SourceFrame.prototype.clearMessages): (WebInspector.SourceFrame.prototype.highlightLine): (WebInspector.SourceFrame.prototype._clearLineHighlight): (WebInspector.SourceFrame.prototype.revealLine): (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.onTextEditorContentLoaded): (WebInspector.SourceFrame.prototype._setTextEditorDecorations): (WebInspector.SourceFrame.prototype.searchCanceled): (WebInspector.SourceFrame.prototype.jumpToSearchResult): (WebInspector.SourceFrame.prototype.addMessageToSource): (WebInspector.SourceFrame.prototype.removeMessageFromSource): (WebInspector.SourceFrame.prototype.inheritScrollPositions): (WebInspector.TextEditorDelegateForSourceFrame): * inspector/front-end/TextViewer.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/textViewer.css: Removed. 2012-07-03 Charles Wei <charles.wei@torchmobile.com.cn> IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath https://bugs.webkit.org/show_bug.cgi?id=88338 Reviewed by David Levin. If the indexedDB runs in main thread it can access the GroupSettings via the document; otherwise, we need to pass the page GroupSettings to the worker thread so that accessible to the indexedDB running in WorkerContext. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: (DedicatedWorkerThread): * workers/DefaultSharedWorkerRepository.cpp: (SharedWorkerProxy): (WebCore::SharedWorkerProxy::groupSettings): (WebCore): (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded): * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: (SharedWorkerThread): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WorkerThreadStartupData): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::groupSettings): (WebCore): * workers/WorkerThread.h: (WorkerThread): 2012-07-03 Balazs Kelemen <kbalazs@webkit.org> [Qt][WK2] fast/viewport/viewport-91.html still fails after r121555 and r121661 https://bugs.webkit.org/show_bug.cgi?id=90376 Reviewed by Csaba Osztrogonác. No new tests, this is only a build alignment. Export ViewportArguments::deprecatedTargetDPI since it is used in WebKit2. * WebCore.exp.in: 2012-07-02 Martin Robinson <mrobinson@igalia.com> [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing https://bugs.webkit.org/show_bug.cgi?id=90308 Reviewed by Noam Rosenthal. Add an edge-distance anti-aliasing implementation for the TextureMapper. Currently this implementation is not active for tiled layers. This implementation is based on the one in the Chromium compositor originally written by David Raveman. When a layer is transformed in a way that leaves its edge dimensions across pixel boundaries, edge distance anti-aliasing will do a cheaper form of anti-aliasing than full-scene anti-aliasing to make the transition from the layer pixel to the background pixel smoother. No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated compositing and 3D transforms, when those test harnesses are capable of producing pixel output (in progress). * platform/graphics/texmap/TextureMapper.h: Add an enum which is used to tell the texture mapper what edges of a texture are exposed. This will be used for properly dealing with tiled layers in the future. * platform/graphics/texmap/TextureMapperBackingStore.cpp: Properly pass information about exposed layer edges to the TextureMapper while painting. * platform/graphics/texmap/TextureMapperBackingStore.h: (TextureMapperTile): Modified arguments include exposed edges. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): Renamed from drawRect, this method can now draw quads that have non unit-rect texture coordinates. This is necessary because the edge distance approach draws such quad. (WebCore::TextureMapperGL::drawBorder): Call drawQuad now instead of drawRect. (WebCore::TextureMapperGL::drawTexture): Pass the exposedEdges argument down. (WebCore::TextureMapperGL::drawTextureRectangleARB): Call drawQuad now instead of drawRect. (WebCore::viewportMatrix): Added this helper which can calculate the viewport transform based on the current OpenGL viewport settings. (WebCore::scaleLineEquationCoeffecientsToOptimizeDistanceCalculation): Added this helper which optimizes the fragment shader by precalculating some constant parts of the distance calculation. (WebCore::getStandardEquationCoeffecientsForLine): Given two end points of line segment get the coeffecients of the line in the standard form of the line equation. (WebCore::quadToEdgeArray): Converts a FloatQuad to an array of four sets of pre-scaled line coefficients so that they can be passed to OpenGL. (WebCore::scaledVectorDifference): Helper which helps expand a quad of arbitrary orientation. (WebCore::inflateQuad): Inflate a quad of arbitrary orientation. The transform may flip it so we have to look at neighboring points to expand the quad. (WebCore::TextureMapperGL::drawTextureWithAntialiasing): Activate the anti-aliasing program and set up all uniforms. (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Abstract out common operations from drawTexture to be used with drawTextureWithAntialiasing. * platform/graphics/texmap/TextureMapperGL.h: (WebCore::TextureMapperGL::DrawQuad::DrawQuad): Add this small type which stores information necessary to draw a quad -- it's original destination rect and the final size mapped to texture coordinates. (TextureMapperGL): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Add the new exposedEdges argument. * platform/graphics/texmap/TextureMapperImageBuffer.h: Ditto. * platform/graphics/texmap/TextureMapperShaderManager.cpp: Add the new fragment shader for doing edge-distance AA and a program which uses that shader. * platform/graphics/texmap/TextureMapperShaderManager.h: Ditto. 2012-07-02 Dan Bernstein <mitz@apple.com> Column height and count calculation ignores most overflow https://bugs.webkit.org/show_bug.cgi?id=90392 Reviewed by Dean Jackson. Test: fast/multicol/overflow-content.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::relayoutForPagination): Changed to compute the overflow from children and use the layout overflow height rather the content height. 2012-07-02 Chris Guan <chris.guan@torchmobile.com.cn> [BlackBerry] Refactor : move the implementation of getMIMETypeForExtension and getPreferredExtensionForMIMEType into BlackBerry platform https://bugs.webkit.org/show_bug.cgi?id=90360 Reviewed by Antonio Gomes. We should have one implementation for getMIMETypeForExtension and getPreferredExtensionForMIMEType for both webkit and platform, so I move this implementation to BlackBerry platform. No new test cases , because no behavior changed. * platform/blackberry/MIMETypeRegistryBlackBerry.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): 2012-07-02 Emil A Eklund <eae@chromium.org> Position replaced elements on pixel bounds https://bugs.webkit.org/show_bug.cgi?id=90354 Reviewed by Eric Seidel. To avoid sizing and repaint issues we should layout replaced elements on pixel bounds. We already ensure that replaced elements are sized in full pixels and that they are painted on pixel bounds. By also ensuring that they are placed on pixel bounds we avoid pixel having the size be expanded by pixel snapping and repainting/invalidation rect issues when scrolling. Test: fast/repaint/repaint-during-scroll-with-zoom.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computePositionedLogicalWidthReplaced): (WebCore::RenderBox::computePositionedLogicalHeightReplaced): 2012-07-02 Nico Weber <thakis@chromium.org> Fix new -Wunused-private-field violations https://bugs.webkit.org/show_bug.cgi?id=90417 Reviewed by Ryosuke Niwa. No intended behavior change. * inspector/InspectorFileSystemAgent.cpp: (WebCore): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: (CCPrioritizedTextureManager): 2012-07-02 Yoshifumi Inoue <yosin@chromium.org> Build fix for Chromimum r121710 removed WebCore/platform/qt/GraphicsLayerQt.{cpp,h}. However, that patch didn't remove them from WebCore.gypi. * WebCore.gypi: Removed GraphicsLayerQt.{cpp,h} 2012-07-02 Joshua Bell <jsbell@chromium.org> IDL overloads should not treat wrapper types as nullable by default https://bugs.webkit.org/show_bug.cgi?id=90218 Reviewed by Kentaro Hara. Wrapper types were being treated as Nullable by default during overloaded method dispatching, which deviates from the WebIDL specification. This change introduces the "?" type suffix into the parser, and treats wrapper types only nullable if specified. (The behavior of array types and other non-wrapper types are not changed, and only overloaded methods are checked.) IDL files with affected overloads are modified to include the "?" suffix so that no behavior changes are introduced by this patch - the JS and V8 generator results before/after the change show no diffs. Test: bindings/scripts/test/TestObj.idl (a non-nullable overload) * Modules/indexeddb/IDBDatabase.idl: Added "?" where necessary. * Modules/indexeddb/IDBIndex.idl: Added "?" where necessary. * Modules/indexeddb/IDBObjectStore.idl: Added "?" where necessary. * Modules/webaudio/AudioContext.idl: Added "?" where necessary. * Modules/webaudio/AudioNode.idl: Added "?" where necessary. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheckExpression): Add isNullable check. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheckExpression): Add isNullable check. * bindings/scripts/IDLParser.pm: Parse/set isNullable. (parseParameters): * bindings/scripts/IDLStructure.pm: Add basic type suffix parsing. * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): (WebCore): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/TestObj.idl: Mark previous overload params with ?, add new one without. * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethod8Callback): (TestObjV8Internal): (WebCore::TestObjV8Internal::overloadedMethodCallback): * dom/DataTransferItemList.idl: Added "?" where necessary. * fileapi/WebKitBlobBuilder.idl: Added "?" where necessary. * html/DOMURL.idl: Added "?" where necessary. * html/canvas/CanvasRenderingContext2D.idl: Added "?" where necessary. * html/canvas/WebGLRenderingContext.idl: Added "?" where necessary. 2012-07-02 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Get rid of GraphicsLayerQt https://bugs.webkit.org/show_bug.cgi?id=78598 Reviewed by Luiz Agostini. Remove GraphicsLayerQt.h/cpp, as well as references to the non-TextureMapper code paths in GraphicsContext3DQt and MediaPlayerPrivateQt. No new tests, removing unused code paths. * Target.pri: * platform/graphics/PlatformLayer.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): (WebCore): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore): * platform/graphics/qt/GraphicsLayerQt.cpp: Removed. * platform/graphics/qt/GraphicsLayerQt.h: Removed. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::invalidateRect): (WebCore::PluginView::platformStart): 2012-07-02 Behdad Esfahbod <behdad@behdad.org> LayoutUnit::epsilon() is wrong https://bugs.webkit.org/show_bug.cgi?id=90083 Reviewed by Eric Seidel. Do division in floats, not integers. No new tests. No code using the affected function. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::epsilon): 2012-07-02 Tim Horton <timothy_horton@apple.com> Compositing layer sync should cause deferred repaints to be fired immediately https://bugs.webkit.org/show_bug.cgi?id=90401 <rdar://problem/11792028> Reviewed by Simon Fraser and Antti Koivisto. If we sync compositing layers and allow the repaint to be deferred, there is time for a visible flash to occur. Instead, stop the deferred repaint timer and repaint immediately. No new tests, configuration and timing dependent. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): (WebCore::FrameView::checkStopDelayingDeferredRepaints): (WebCore::FrameView::stopDelayingDeferredRepaints): Split off from checkStopDelayingDeferredRepaints. * page/FrameView.h: (FrameView): Add stopDelayingDeferredRepaints. 2012-07-02 Benjamin Poulain <bpoulain@apple.com> Do not do any logging initialization when logging is disabled https://bugs.webkit.org/show_bug.cgi?id=90228 Reviewed by Simon Fraser. Initializating of the logging channels was taking time on startup. When logging is disabled (and the LOG macro does nothing), we should aslo disable logging channels and initialization. This patch #ifdef the Logging initialization with the macro LOG_DISABLED. * WebCore.exp.in: * make-export-file-generator: Explicitely adds Assertions.h so that LOG_DISABLED is defined. * platform/Logging.cpp: * platform/Logging.h: * platform/blackberry/LoggingBlackBerry.cpp: * platform/efl/LoggingEfl.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/gtk/LoggingGtk.cpp: * platform/mac/LoggingMac.mm: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ensureSessionIsInitialized): * platform/qt/LoggingQt.cpp: * platform/win/LoggingWin.cpp: * platform/wx/LoggingWx.cpp: 2012-07-02 Dan Bernstein <mitz@apple.com> <rdar://problem/11787030> In vertical writing modes, child following float-clearing block has incorrect logical top https://bugs.webkit.org/show_bug.cgi?id=90359 Reviewed by Anders Carlsson. Test: fast/writing-mode/logical-height-after-clear.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloatsIfNeeded): Changed to use logicalTop() and logicalHeight() instead of y() and height(). 2012-07-02 Arko Saha <arko@motorola.com> Microdata: Fix build failure after r121580. https://bugs.webkit.org/show_bug.cgi?id=90378 Reviewed by Ryosuke Niwa. * html/HTMLElement.cpp: (WebCore::HTMLElement::properties): * html/HTMLElement.h: 2012-07-02 Tommy Widenflycht <tommyw@google.com> MediaStream API: Update MediaStreamTrackList to match the specification https://bugs.webkit.org/show_bug.cgi?id=90171 Reviewed by Adam Barth. The latest update to the specification added add and remove methods with corresponding callbacks. The callbacks can be triggered both from JS and from the platform layer. Test: fast/mediastream/MediaStreamTrackList.html * CMakeLists.txt: * GNUmakefile.list.am: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::~MediaStream): (WebCore::MediaStream::streamEnded): (WebCore::MediaStream::addTrack): (WebCore): (WebCore::MediaStream::removeTrack): * Modules/mediastream/MediaStream.h: (MediaStream): * Modules/mediastream/MediaStreamTrackEvent.cpp: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp. (WebCore): (WebCore::MediaStreamTrackEvent::create): (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): (WebCore::MediaStreamTrackEvent::~MediaStreamTrackEvent): (WebCore::MediaStreamTrackEvent::track): (WebCore::MediaStreamTrackEvent::interfaceName): * Modules/mediastream/MediaStreamTrackEvent.h: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.h. (WebCore): (MediaStreamTrackEvent): * Modules/mediastream/MediaStreamTrackEvent.idl: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.idl. * Modules/mediastream/MediaStreamTrackList.cpp: (WebCore::MediaStreamTrackList::create): (WebCore::MediaStreamTrackList::MediaStreamTrackList): (WebCore::MediaStreamTrackList::detachOwner): (WebCore): (WebCore::MediaStreamTrackList::add): (WebCore::MediaStreamTrackList::remove): (WebCore::MediaStreamTrackList::stop): (WebCore::MediaStreamTrackList::interfaceName): (WebCore::MediaStreamTrackList::scriptExecutionContext): (WebCore::MediaStreamTrackList::eventTargetData): (WebCore::MediaStreamTrackList::ensureEventTargetData): * Modules/mediastream/MediaStreamTrackList.h: (MediaStreamTrackList): * Modules/mediastream/MediaStreamTrackList.idl: * WebCore.gypi: * dom/EventNames.h: (WebCore): * dom/EventNames.in: * dom/EventTargetFactory.in: * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::addMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenter::removeMediaStreamTrack): * platform/mediastream/MediaStreamCenter.h: (MediaStreamCenter): * platform/mediastream/MediaStreamDescriptor.h: (MediaStreamDescriptorOwner): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack): (WebCore::MediaStreamCenterChromium::addMediaStreamTrack): (WebCore::MediaStreamCenterChromium::removeMediaStreamTrack): * platform/mediastream/chromium/MediaStreamCenterChromium.h: (WebKit): (MediaStreamCenterChromium): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: (WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack): (WebCore): (WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: (MediaStreamCenterGStreamer): 2012-07-02 Andrey Kosyakov <caseq@chromium.org> Web Inspector: incorrect height of main timeline pane after switching to memory mode https://bugs.webkit.org/show_bug.cgi?id=90387 Reviewed by Pavel Feldman. - update cached container height when setting vertical splitter position. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.set _setSplitterPosition): 2012-07-02 Christophe Dumez <christophe.dumez@intel.com> [MICRODATA] Build failure in html/HTMLPropertiesCollection.h https://bugs.webkit.org/show_bug.cgi?id=90379 Reviewed by Ryosuke Niwa. Switch HTMLCollection::append() visibility from private to protected so that HTMLPropertiesCollection subclass can call it. This fixes build when MICRODATA flag is turned on. No new tests, build fix. * html/HTMLCollection.h: (HTMLCollectionCacheBase): 2012-07-02 Kwang Yul Seo <skyul@company100.net> A start "body" tag in the "in body" insertion mode is a parse error https://bugs.webkit.org/show_bug.cgi?id=90373 Reviewed by Eric Seidel. According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody), a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here. No behavior change because parseError(token) is just a marker. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): 2012-07-02 Raphael Kubo da Costa <rakuco@webkit.org> [EFL] Unreviewed build fix with ENABLE_NETSCAPE_PLUGIN_API after r121467. * plugins/efl/PluginPackageEfl.cpp: (WebCore::PluginPackage::load): Move the declaration of `err' before the first `goto' statement. 2012-07-02 Alexei Filippov <alexeif@chromium.org> Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal. https://bugs.webkit.org/show_bug.cgi?id=89889 Number of DOM nodes native snapshots can handle was limited by the process stack size because of recursion used to traverse the nodes. The patch changes the recursion to a stack based algorithm. Reviewed by Yury Semikhatsky. * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (InstrumentedPointerBase): (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase): (InstrumentedPointer): (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer): (WebCore::MemoryInstrumentation::reportInstrumentedPointer): (WebCore): (WebCore::::process): * inspector/InspectorMemoryAgent.cpp: (WebCore): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add requestFileContent command and fileContentReceived event https://bugs.webkit.org/show_bug.cgi?id=89642 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/read-file.html * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileContent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype.requestMetadata): (WebInspector.FileSystemModel.prototype.requestFileContent): (WebInspector.FileSystemModel.File.prototype.get resourceType): (WebInspector.FileSystemModel.File.prototype.requestFileContent): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototype._metadataReceived): (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileContent): (WebInspector.FileSystemRequestManager.prototype._fileContentReceived): (WebInspector.FileSystemDispatcher.prototype.metadataReceived): (WebInspector.FileSystemDispatcher.prototype.fileContentReceived): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add refresh button to FileSystemView status bar https://bugs.webkit.org/show_bug.cgi?id=90244 Reviewed by Vsevolod Vlasov. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView): (WebInspector.FileSystemView.prototype.get statusBarItems): (WebInspector.FileSystemView.prototype.showView): (WebInspector.FileSystemView.prototype._refresh): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): 2012-06-22 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Implement snippets evaluation. https://bugs.webkit.org/show_bug.cgi?id=88707 Reviewed by Pavel Feldman. Implemented snippet evaluation and adjusted breakpoints behavior when editing snippet. Snippets are evaluated using separate compile and run. Breakpoints are updated after compilation (once scriptId is available they can be set in debugger). If separate compile and run is not supported by port or debugger is paused we fall back to evaluation in console. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.runScript.runCallback): (WebInspector.ConsoleView.prototype.runScript): (WebInspector.ConsoleView.prototype._printResult): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype._didEditContent): (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing): (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing): (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.ScriptSnippetModel.prototype.deleteScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent): (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback): (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet): (WebInspector.ScriptSnippetModel.prototype._rawLocationToUILocation): (WebInspector.ScriptSnippetModel.prototype._removeBreakpoints): (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints): (WebInspector.ScriptSnippetModel.prototype._evaluationSourceURL): (WebInspector.SnippetJavaScriptSource.prototype.isDivergedFromVM): (WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted): (WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged): (WebInspector.SnippetJavaScriptSource.prototype.evaluate): (WebInspector.SnippetJavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing): (WebInspector.SnippetJavaScriptSource.prototype.breakpointStorageId): * inspector/front-end/ScriptsNavigator.js: (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet): 2012-06-26 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: StyleSource should set content using CSSStyleModelResourceBinding directly. https://bugs.webkit.org/show_bug.cgi?id=89891 Reviewed by Pavel Feldman. StyleSource now calls CSS resource binding directly. CSS resource binding now adds resource revision only after setStyleSheetText call returns from backend. Resource.revertAndClearHistory is now clearing history asynchronously since Resource.setContent adds revision that should be removed as well. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule): (WebInspector.CSSStyleModel.prototype.resourceBinding): (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent.innerCallback): (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.revertAndClearHistory): (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory): * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.prototype._createResourceItem): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSource.prototype.workingCopyCommitted): (WebInspector.StyleSource.prototype.workingCopyChanged): 2012-07-02 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add DirectoryContentView for FileSystemView https://bugs.webkit.org/show_bug.cgi?id=89961 Reviewed by Vsevolod Vlasov. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DirectoryContentView.js: Added. * inspector/front-end/FileSystemView.js: (WebInspector.FileSystemView): (WebInspector.FileSystemView.EntryTreeElement.prototype.onattach): (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect): (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-07-02 Christophe Dumez <christophe.dumez@intel.com> [EFL] Fix compilation error in GamepadsEfl.cpp in debug mode https://bugs.webkit.org/show_bug.cgi?id=90369 Unreviewed, EFL build fix. * platform/efl/GamepadsEfl.cpp: (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): 2012-07-02 Nikita Vasilyev <me@elv1s.ru> Web Inspector: Design WebSockets panel https://bugs.webkit.org/show_bug.cgi?id=89461 Use DataGrid to display the data. Put "Data" column first. Make it wider. Remove "Mask" column since it appears to be always true for outgoing frames, and false for incoming. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): Don't show Preview, Response, Cookies and Timing tabs for succefuly established WebSocket connection. * inspector/front-end/ResourceWebSocketFrameView.js: (WebInspector.ResourceWebSocketFrameView): * inspector/front-end/networkPanel.css: (.resource-websocket): (.resource-websocket, .resource-websocket .data-grid): (.resource-websocket .data-grid .data): (.resource-websocket td): (.resource-websocket .data-column div): (.resource-websocket-row-outcoming): (.resource-websocket-row-outcoming:not(.selected) td): (.resource-websocket-row-outcoming:not(.selected) td, .resource-websocket-row-outcoming:not(.selected) + tr td): (.resource-websocket-row-opcode): (.resource-websocket-row-opcode td): (.resource-websocket-row-opcode td, .resource-websocket-row-opcode + tr td): (.resource-websocket-row-error): 2012-07-02 Vineet Chaudhary <rgf748@motorola.com> [V8Binding] Merging v8NumberArray()/v8NumberArrayToVector() to v8Array()/toNativeArray() respectively. https://bugs.webkit.org/show_bug.cgi?id=90338 Reviewed by Kentaro Hara. We can remove v8NumberArray() and v8NumberArrayToVector() implementaion merging them to current v8Array() and toNativeArray() traits. Tests: TestObj.idl Shouldn't cause any behavioural changes. * bindings/scripts/CodeGeneratorV8.pm: Removed float[]/double[] specific binding code. (IsRefPtrType): (GetNativeType): (JSValueToNative): (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test. (WebCore::TestObjV8Internal::floatArrayAttrGetter): (WebCore::TestObjV8Internal::floatArrayAttrSetter): (WebCore::TestObjV8Internal::doubleArrayAttrGetter): (WebCore::TestObjV8Internal::doubleArrayAttrSetter): * bindings/v8/V8Binding.h: Added templates for float and double. (WebCore::v8Array): (WebCore::toNativeArray): 2012-07-02 Konrad Piascik <kpiascik@rim.com> [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555 https://bugs.webkit.org/show_bug.cgi?id=90286 Reviewed by Daniel Bates. Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result was truncated. Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes. * dom/ViewportArguments.h: (ViewportArguments): 2012-06-28 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add v8 bindings memory info to the native memory graph https://bugs.webkit.org/show_bug.cgi?id=90149 Reviewed by Pavel Feldman. Size of V8 binding maps is now reported on the memory chart. * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::collectBindingMemoryInfo): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::reportMemoryUsage): (WebCore): * bindings/v8/DOMDataStore.h: (WebCore): (DOMDataStore): * bindings/v8/IntrusiveDOMWrapperMap.h: (WebCore::ChunkedTable::reportMemoryUsage): (ChunkedTable): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectBindingMemoryInfo): (WebCore): * bindings/v8/ScriptProfiler.h: (WebCore): (ScriptProfiler): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::reportMemoryUsage): (WebCore): (WebCore::StringCache::reportMemoryUsage): * bindings/v8/V8Binding.h: (WebCore): (StringCache): (V8BindingPerIsolateData): * bindings/v8/V8DOMMap.h: (WebCore): (AbstractWeakReferenceMap): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore): (WebCore::MemoryInstrumentation::reportHashMap): added a method for reporting size of a HashMap. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::domTreeInfo): 2012-07-01 Christophe Dumez <christophe.dumez@intel.com> [EFL] Add Gamepad support https://bugs.webkit.org/show_bug.cgi?id=90170 Reviewed by Kenneth Rohde Christiansen. Add support for the Gamepad feature on the EFL port. The implementation of this class relies on the Linux kernel joystick API. Gamepad devices are recognized through the GamepadsEfl class, of which implementation is based on Eeze library. This way devices are properly registered on connection as objects of the GamepadDeviceEfl class which inherits GamepadDeviceLinux. GamepadDeviceEfl reads the joystick data through an Ecore_Fd_Handler and updates the device state accordingly. The GamepadsEfl object is then polled for gamepads data through the sampleGamepads method. No new tests - already tested by gamepad/* * CMakeLists.txt: * PlatformEfl.cmake: * platform/efl/GamepadsEfl.cpp: Added. (WebCore): (GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::create): (WebCore::GamepadDeviceEfl::GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::~GamepadDeviceEfl): (WebCore::GamepadDeviceEfl::readCallback): (GamepadsEfl): (WebCore::GamepadsEfl::onGamePadChange): (WebCore::GamepadsEfl::GamepadsEfl): (WebCore::GamepadsEfl::~GamepadsEfl): (WebCore::GamepadsEfl::registerDevice): (WebCore::GamepadsEfl::unregisterDevice): (WebCore::GamepadsEfl::updateGamepadList): (WebCore::sampleGamepads): 2012-07-01 James Robinson <jamesr@chromium.org> Unreviewed, rolling out r121635. http://trac.webkit.org/changeset/121635 https://bugs.webkit.org/show_bug.cgi?id=90286 Breaks compile on clang error: in-class initializer for static data member of type 'const float' is a GNU extension [-Werror,-Wgnu] * dom/ViewportArguments.h: (ViewportArguments): 2012-07-01 Timothy Hatcher <timothy@apple.com> Make the "Inspect Element" context menu item appear in nightly builds again. rdar://problem/11702613 https://webkit.org/b/89323 Reviewed by Dan Bernstein. * platform/ContextMenuItem.h: Fix the order of the ContextMenuAction enum to be binary compatible with older versions of WebKit. 2012-07-01 Dan Bernstein <mitz@apple.com> <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs https://bugs.webkit.org/show_bug.cgi?id=90349 Reviewed by Dean Jackson. Test: platform/mac/fast/text/vertical-surrogate-pair.html * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those functions’ behavior of placing glyphs at indices corresponding to the first character of each pair. 2012-07-01 Kenichi Ishibashi <bashi@chromium.org> Arabic shaping is incorrect if ZWNJ exist https://bugs.webkit.org/show_bug.cgi?id=89843 Reviewed by Dan Bernstein. mac port treats ZWJ (zero-width-joiner) and ZWNJ (zero-width-non-joiner) as a part of combining character sequence. This could cause a problem when the font doesn't have glyph mapping of ZWJ and ZWNJ. Suppose the text to be rendered is "U+0645(MEEM) U+06CC(FARSI YEH) U+200C(ZWNJ)". In this case, U+0645 and U+06CC are rendered in isolated form if the font doesn't have a glyph for ZWNJ. They should be joined. This patch changes handling of ZWJ and ZWNJ. Treats ZWJ and ZWNJ as base characters so that a complex text run isn't separate at the point of ZWJ and ZWNJ even the font doesn't contain glyphs for them. If ComplexTextController finds ZWJ, it doesn't split the current complex text run. Test: platform/mac/fast/text/arabic-zwj-and-zwnj.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::advanceByCombiningCharacterSequence): Don't treat ZWJ and ZWNJ as a part of combining character sequence. (WebCore::ComplexTextController::collectComplexTextRuns): Set fontData to nextFontData if the baseCharacter is ZWJ. 2012-07-01 Konrad Piascik <kpiascik@rim.com> [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555 https://bugs.webkit.org/show_bug.cgi?id=90286 Reviewed by Daniel Bates. Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result was truncated. Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes. * dom/ViewportArguments.h: (ViewportArguments): 2012-06-30 Ian Vollick <vollick@chromium.org> [chromium] CanvasLayerTextureUpdater needs to convert opaque rects back to content space. https://bugs.webkit.org/show_bug.cgi?id=90092 The CanvasLayerTextureUpdater currently receives its opaque rects in layer space, but is expected to return them in content space and does not convert them. This patch adds this conversion. To avoid numerical errors, this patch also switches to using float rects to store opaque rects where appropriate. Reviewed by Adrienne Walker. Unit test: ContentLayerTest.ContentLayerPainterWithDeviceScale * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore): (ContentLayerDelegate): (ContentLayerPainter): * platform/graphics/chromium/LayerPainterChromium.h: (WebCore): (LayerPainterChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::paintContents): * platform/graphics/chromium/LinkHighlight.h: (LinkHighlight): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h: (OpaqueRectTrackingContentLayerDelegate): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: 2012-06-30 Kwang Yul Seo <skyul@company100.net> Unreviewed. Remove unused declaration. HTMLDocumentParser::begin() has no method definition. * html/parser/HTMLDocumentParser.h: 2012-06-29 No'am Rosenthal <noam.rosenthal@nokia.com> Unreviewed, rolling out r121569. http://trac.webkit.org/changeset/121569 https://bugs.webkit.org/show_bug.cgi?id=90082 It broke a couple of tests in Qt Linux Release * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2012-06-29 Simon Fraser <simon.fraser@apple.com> updateDescendantDependentFlags() is inside #if USE(ACCELERATED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=90245 Reviewed by Dan Bernstein. updateDescendantDependentFlags() and updateTransform() should be outside the USE(ACCELERATED_COMPOSITING) #ifdef. They do work that is needed even if accelerated compositing is disabled. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): 2012-06-29 Erik Arvidsson <arv@chromium.org> [V8] HTMLCollection wrappers are not retained https://bugs.webkit.org/show_bug.cgi?id=90208 Reviewed by Adam Barth. Generate visitDOMWrapper for HTMLCollection and HTMLAllCollection so that we add an implicit reference from the owner to the collection. Tests: fast/dom/htmlallcollection-reachable.html fast/dom/htmlcollection-reachable.html * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Instead of hard coding to use base() for HTMLAllCollection and HTMLCollection we now annotate the IDL file to use GenerateIsReachable=ImplBaseRoot. * bindings/scripts/CodeGeneratorV8.pm: (GenerateVisitDOMWrapper): Generate visitDOMWrapper if GenerateIsReachable is ImplBaseRoot. * bindings/scripts/IDLAttributes.txt: Added ImplBaseRoot. * html/HTMLAllCollection.idl: Added annotations. * html/HTMLCollection.idl: Ditto. 2012-06-29 Tony Chang <tony@chromium.org> All child elements of a flex container should be turned into a flex item https://bugs.webkit.org/show_bug.cgi?id=90323 Reviewed by Ojan Vafai. We used to only convert some elements to blocks, but now we convert everything except text nodes. This was recently changed here: http://wiki.csswg.org/topics/css3-flexbox-flexbox-replaced-children Tests: css3/flexbox/anonymous-block.html : Add new test case. css3/flexbox/flexitem.html: Update results. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-29 Joshua Bell <jsbell@chromium.org> IndexedDB: Keep direction on IDBCursor to avoid calls to back end https://bugs.webkit.org/show_bug.cgi?id=90114 Reviewed by Tony Chang. Let IDBCursor handle direction() accessor locally, without a call to the IDBCursorBackendImpl which (in some ports) may reside in a different process. Not a heavily called function, but further reduces the surface area exposed by the XXXInterface classes. No new tests - no functional changes. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::create): Accept direction, known at creation time. (WebCore::IDBCursor::IDBCursor): Stash in member. (WebCore::IDBCursor::direction): Use local copy (WebCore::IDBCursor::stringToDirection): Return enum value, not int. * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursorBackendImpl.cpp: Remove accessor. * Modules/indexeddb/IDBCursorBackendImpl.h: (IDBCursorBackendImpl): * Modules/indexeddb/IDBCursorBackendInterface.h: Remove accessor. * Modules/indexeddb/IDBCursorWithValue.cpp: (WebCore::IDBCursorWithValue::create): (WebCore::IDBCursorWithValue::IDBCursorWithValue): * Modules/indexeddb/IDBCursorWithValue.h: (IDBCursorWithValue): * Modules/indexeddb/IDBIndex.cpp: Prep IDBRequest with cursor direction too. (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBObjectStore.cpp: Ditto. (WebCore::IDBObjectStore::openCursor): * Modules/indexeddb/IDBRequest.cpp: Stash direction for pending cursor too. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::setCursorDetails): (WebCore::IDBRequest::onSuccess): Apply stashed direction to new cursor. * Modules/indexeddb/IDBRequest.h: (IDBRequest): 2012-06-29 Tony Chang <tony@chromium.org> Allow align-self: stretch to cause the item size to shrink below its intrinsic size https://bugs.webkit.org/show_bug.cgi?id=90304 Reviewed by Ojan Vafai. The spec used to say that stretch could only make items grow, but now it allows items to shrink. http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch Tests: css3/flexbox/flex-align-stretch.html Updated expectations. css3/flexbox/child-overflow.html Updated expectations. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 2012-06-29 James Weatherall <wez@chromium.org> NPObjectWrapper may not address all window script object lifetime issues https://bugs.webkit.org/show_bug.cgi?id=85679 The ScriptController implementations force-deallocate the window script object to ensure that DOM objects are not leaked if an NPAPI plugin fails to release a reference to it before being destroyed. The NPObjectWrapper was added to ensure that NPAPI scripting could not touch the real window script object after it had been deallocated, by providing the plugin with a small wrapper which will leak if the plugin fails to dereference it. This patch removes NPObjectWrapper and instead drops the window script NPObject's reference to the underlying V8Object in ScriptController::clearScriptObjects(). If a plugin fails to dereference the object then the NPV8Object wrapper will be leaked but the DOM objects it references will not. Reviewed by Nate Chapin. Test: plugins/npruntime/leak-window-scriptable-object.html * WebCore.gypi: * bindings/v8/NPObjectWrapper.cpp: Removed. * bindings/v8/NPObjectWrapper.h: Removed. * bindings/v8/NPV8Object.cpp: (WebCore::disposeUnderlyingV8Object): (WebCore): (WebCore::freeV8NPObject): (_NPN_Invoke): (_NPN_InvokeDefault): (_NPN_EvaluateHelper): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bindings/v8/NPV8Object.h: (WebCore): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::clearScriptObjects): (WebCore::ScriptController::windowScriptNPObject): * bindings/v8/ScriptController.h: (ScriptController): 2012-06-29 Adam Barth <abarth@webkit.org> Update complex fonts on Android to use fonts from a newer SDK https://bugs.webkit.org/show_bug.cgi?id=90296 Reviewed by Nate Chapin. These fonts are available in the Jelly Bean SDK. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::ComplexTextController::ComplexTextController): (WebCore::ComplexTextController::getComplexFontPlatformData): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> HTMLCollection's caches should be owned by either ElementRareData or Document https://bugs.webkit.org/show_bug.cgi?id=90322 Reviewed by Anders Carlsson. Removed all instances of OwnPtr<HTMLCollection> except ones on ElementRareData and Document. ElementRareData::ensureCachedHTMLCollection then polymorphically creates HTMLCollection or its subclass as deemed necessary. This refactoring allows us to move HTMLCollection to use the same invalidation model as DynamicNodeList (invalidated during DOM mutations) in a follow up. * dom/Document.cpp: (WebCore::Document::all): * dom/Document.h: (Document): * dom/Element.cpp: (WebCore::ElementRareData::ensureCachedHTMLCollection): (WebCore): (WebCore::Element::cachedHTMLCollection): * dom/Element.h: (Element): * dom/ElementRareData.h: (WebCore): (ElementRareData): (WebCore::ElementRareData::cachedHTMLCollection): * dom/Node.cpp: (WebCore): * dom/Node.h: (Node): * dom/NodeRareData.h: (WebCore::NodeRareData::setItemType): (NodeRareData): * html/CollectionType.h: * html/HTMLCollection.cpp: (WebCore::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): * html/HTMLElement.cpp: (WebCore): (WebCore::HTMLElement::properties): * html/HTMLElement.h: (HTMLElement): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::elements): * html/HTMLFieldSetElement.h: (HTMLFieldSetElement): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::create): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): * html/HTMLFormElement.h: * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): (WebCore::HTMLOptionsCollection::create): * html/HTMLOptionsCollection.h: (HTMLOptionsCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectedOptions): (WebCore::HTMLSelectElement::options): (WebCore::HTMLSelectElement::invalidateSelectedItems): (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLSelectElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): * html/HTMLTableElement.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::create): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): 2012-06-29 Ojan Vafai <ojan@chromium.org> Add FIXMEs for vertical writing mode and override sizes. * rendering/RenderBox.cpp: (WebCore::RenderBox::overrideLogicalContentWidth): (WebCore::RenderBox::overrideLogicalContentHeight): 2012-06-29 James Robinson <jamesr@chromium.org> [chromium] Use CCThread::Task in compositor's RateLimiter instead of Timer https://bugs.webkit.org/show_bug.cgi?id=90300 Reviewed by Adrienne Walker. * platform/graphics/chromium/RateLimiter.cpp: (RateLimiter::Task): (WebCore::RateLimiter::Task::create): (WebCore::RateLimiter::Task::~Task): (WebCore::RateLimiter::Task::Task): (WebCore): (WebCore::RateLimiter::RateLimiter): (WebCore::RateLimiter::start): (WebCore::RateLimiter::stop): (WebCore::RateLimiter::rateLimitContext): * platform/graphics/chromium/RateLimiter.h: (WebCore): (RateLimiter): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): 2012-06-29 Tony Payne <tpayne@chromium.org> Remove type from screenColorProfile API https://bugs.webkit.org/show_bug.cgi?id=90299 Reviewed by Adam Barth. Covered by existing tests. * platform/PlatformScreen.h: (WebCore): Removed type from screenColorProfile(). * platform/blackberry/PlatformScreenBlackBerry.cpp: (WebCore::screenColorProfile): * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenColorProfile): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenColorProfile): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorProfile): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Updated call to screenColorProfile() to not pass type param. * platform/mac/PlatformScreenMac.mm: (WebCore::screenColorProfile): * platform/qt/PlatformScreenQt.cpp: (WebCore::screenColorProfile): * platform/win/PlatformScreenWin.cpp: (WebCore::screenColorProfile): 2012-06-29 Emil A Eklund <eae@chromium.org> Allow non-borders to be adjusted to less than 1 when zoomed out https://bugs.webkit.org/show_bug.cgi?id=90104 Reviewed by Eric Seidel. Change CSSPrimitiveValue::computeLengthDouble to allow values to be adjusted to less than 1.0 when zoomed out. This avoids an off by one error for floats with margins when zoomed out that can cause floats to wrap and break pages. The logic that prevents the value from being adjusted to less than 1 was added to ensure that borders are still painted even when zoomed out. By moving the logic to ApplyPropertyComputeLength::applyValue, which is used for borders and outlines, that functionality is preserved. Test: fast/sub-pixel/float-with-margin-in-container.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyComputeLength::applyValue): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Let Xcode have its own way after r121513. * WebCore.xcodeproj/project.pbxproj: 2012-06-29 Mihai Balan <mibalan@adobe.com> [CSS Regions] Adding feature defines for CSS Regions for Windows https://bugs.webkit.org/show_bug.cgi?id=88645 Reviewed by Tony Chang. Re-trying to enable CSS regions on Windows. This time only enabling regions (not exclusions) because of some strange compilation/linking issues. * css/CSSPropertyNames.in: Touched file to make sure property names get properly rebuilt. 2012-06-29 Hanna Ma <Hanma@rim.com> Web Inspector: Add data length to resource events on timeline to keep track of the amount of data loaded and the total data length https://bugs.webkit.org/show_bug.cgi?id=89244 Reviewed by Pavel Feldman. Added data length to inspector timeline popup content for resources to keep track of the amount of data loaded. Tests: inspector/timeline/timeline-network-received-data.html * English.lproj/localizedStrings.js: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willReceiveResourceData): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willReceiveResourceData): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createReceiveResourceData): * inspector/TimelineRecordFactory.h: (TimelineRecordFactory): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._showPopover): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.prototype.reset): (WebInspector.TimelinePresentationModel.Record): (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveData): * inspector/timeline/timeline-network-received-data.html: Added. * inspector/timeline/timeline-network-received-data-expected.txt: Added. * inspector/timeline/timeline-test.js: 2012-06-29 Shawn Singh <shawnsingh@chromium.org> Unreviewed build fix after 121580. WebKit Linux debug bots was complaining about signed vs unsigned integer comparison. * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Remove mapRect and mapQuad from WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=90230 Reviewed by Adrienne Walker. Replaces calls to WebTransformationMatrix::mapRect/mapQuad with clipping-aware calls to CCMathUtils. In most cases, we do not expect clipping to happen. For others (such as area calculations in CCOverdrawMetrics) we can handle a clipped quad easily. * platform/chromium/support/WebTransformationMatrix.cpp: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::drawableContentRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::getDrawRect): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::addOcclusionBehindLayer): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore): (WebCore::polygonArea): (WebCore::areaOfMappedQuad): (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::didDraw): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r121575. It rolls out r121547 but didn't roll out the follow up build fix r121553. * platform/graphics/mac/FontCustomPlatformData.h: (FontCustomPlatformData): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Share the same cache in HTMLCollection and DynamicNodeLists https://bugs.webkit.org/show_bug.cgi?id=90118 Reviewed by Anders Carlsson. This patch introduces two new base classes DynamicNodeListCacheBase and HTMLCollectionCacheBase to share the cache object between DynamicNodeList and HTMLCollection. HTMLCollectionCacheBase inherits from DynamicNodeListCacheBase and contains extra caches and bit flags for HTMLCollection. DynamicNodeList::Cache and HTMLCollection::Cache had been removed and flattened into these two classes for the easy inheritance. In DynamicNodeList, we have a very straight forward one-to-one mapping from old Caches member variables: m_caches.lastItem -> cachedItem() m_caches.lastItemOffset -> cachedItemOffset() m_caches.cachedLength -> cachedLength() m_caches.isItemCacheValid -> isItemCacheValid() m_caches.isLengthCacheValid -> isLengthCacheValid() m_caches.type -> removed because it was never used. m_caches.rootedAtDocument -> isRootedAtDocument() m_caches.shouldInvalidateOnAttributeChange -> shouldInvalidateOnAttributeChange() In HTMLCollection, there is one semantic change in the way item cache is managed. Previously, we only had m_cache.current which was used as both cachedItem() and isItemCacheValid() (not valid when current is null). There are some asymmetric code changes due to one-to-many relationship. Also, all method names have been updated to use that of DynamicNodeList terminology. Thus we have the following correspondence: m_cache.current -> cachedItem() / isItemCacheValid() m_cache.position -> cachedItemOffset() m_cache.length -> cachedLength() m_cache.elementsArrayPosition -> cachedElementsArrayOffset() m_cache.hasLength -> isLengthCacheValid() m_cache.hasNameCache -> hasNameCache() / setHasNameCache() m_cache.idCache -> idCache() / addIdCache() m_cache.nameCache -> idCache() / addNameCache() In addition, we had to rename HTMLCollection::clearCache to invalidateCache to avoid the name collision with HTMLCollectionCacheBase::clearCache. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::length): (WebCore::ChildNodeList::item): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::length): (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::item): * dom/DynamicNodeList.h: (DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): (WebCore::DynamicNodeListCacheBase::isRootedAtDocument): (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange): (WebCore::DynamicNodeListCacheBase::isItemCacheValid): (WebCore::DynamicNodeListCacheBase::cachedItem): (WebCore::DynamicNodeListCacheBase::cachedItemOffset): (WebCore::DynamicNodeListCacheBase::isLengthCacheValid): (WebCore::DynamicNodeListCacheBase::cachedLength): (WebCore::DynamicNodeListCacheBase::setLengthCache): (WebCore::DynamicNodeListCacheBase::setItemCache): (WebCore::DynamicNodeListCacheBase::clearCache): (WebCore): (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::invalidateCache): (WebCore::DynamicNodeList::rootNode): (DynamicNodeList): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::invalidateCache): (WebCore::HTMLCollection::isAcceptableElement): (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollectionCacheBase::append): * html/HTMLCollection.h: (HTMLCollectionCacheBase): (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): (WebCore::HTMLCollectionCacheBase::type): (WebCore::HTMLCollectionCacheBase::clearCache): (WebCore::HTMLCollectionCacheBase::setItemCache): (WebCore::HTMLCollectionCacheBase::cachedElementsArrayOffset): (WebCore::HTMLCollectionCacheBase::includeChildren): (WebCore::HTMLCollectionCacheBase::cacheTreeVersion): (WebCore::HTMLCollectionCacheBase::idCache): (WebCore::HTMLCollectionCacheBase::nameCache): (WebCore::HTMLCollectionCacheBase::appendIdCache): (WebCore::HTMLCollectionCacheBase::appendNameCache): (WebCore::HTMLCollectionCacheBase::hasNameCache): (WebCore::HTMLCollectionCacheBase::setHasNameCache): (WebCore): (WebCore::HTMLCollection::isEmpty): (WebCore::HTMLCollection::hasExactlyOneItem): (WebCore::HTMLCollection::base): (HTMLCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLNameCollection.h: (HTMLNameCollection): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::invalidateSelectedItems): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): * html/HTMLTableRowsCollection.h: (HTMLTableRowsCollection): 2012-06-29 Tony Chang <tony@chromium.org> Unreviewed, rolling out r121572. http://trac.webkit.org/changeset/121572 https://bugs.webkit.org/show_bug.cgi?id=90249 Breaks Mac build since it depends on r121547, which was rolled out * WebCore.exp.in: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible): * platform/mac/WebCoreSystemInterface.h: * platform/network/Credential.h: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore): (WebCore::initializeMaximumHTTPConnectionCountPerHost): * platform/text/TextChecking.h: (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): 2012-06-29 Tony Chang <tony@chromium.org> Unreviewed, rolling out r121547. http://trac.webkit.org/changeset/121547 https://bugs.webkit.org/show_bug.cgi?id=90256 Breaks Chromium Mac build * platform/LocalizedStrings.cpp: (WebCore::imageTitle): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setAllowsFontSmoothing): * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore): (WebCore::canSetCascadeListForCustomFont): (WebCore::FontPlatformData::ctFont): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/FontCacheMac.mm: (WebCore): (WebCore::fontCacheATSNotificationCallback): (WebCore::FontCache::platformInit): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/WebLayer.h: * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/DisplaySleepDisabler.cpp: (WebCore::DisplaySleepDisabler::DisplaySleepDisabler): (WebCore): (WebCore::DisplaySleepDisabler::systemActivityTimerFired): * platform/mac/DisplaySleepDisabler.h: (DisplaySleepDisabler): * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): * platform/mac/ScrollElasticityController.mm: 2012-06-29 Eric Penner <epenner@google.com> [chromium] Adding PrioritizedTexture and replacing ContentsTextureManager https://bugs.webkit.org/show_bug.cgi?id=84308 Reviewed by Adrienne Walker. PrioritizedTextures have a priority such that all texture requests can be prioritized. There are three steps involved: - Call setRequestPriority() - Check if the request succeeded with canAcquireBackingTexture() - Call acquireBackingTexture() when uploading a new texture. Internally both the texture requests and the backing textures get sorted. Requests are sorted so they can be prioritized. Backing textures are sorted so that they can be recycled/evicted in the right order (lowest priority first). Prioritizing textures doesn't assign backing textures to texture requests but rather just marks which textures can have a backing texture "when needed". This allows us to keep the old textures in use as long as possible. The unit tests support all the use cases from the original texture manager but also adds assumptions about priority order throughout all the tests. The function assertInvariants() is added to test the validity of the manager and all textures/allocations within it. The TiledLayerChromium tests are updated to request textures first with prioritizeTextures(), and update them with the updater (such that allocate gets called) before pushPropertiesTo is called (when they need to be valid). * WebCore.gypi: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture): (WebCore::BitmapCanvasLayerTextureUpdater::createTexture): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (Texture): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::setTexturePriorities): (WebCore): (WebCore::ContentLayerChromium::update): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (Texture): (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::Texture::Texture): (WebCore::ImageLayerTextureUpdater::createTexture): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerChromium::setTexturePriorities): (WebCore): * platform/graphics/chromium/ImageLayerChromium.h: (ImageLayerChromium): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::setTexturePriorities): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::Texture::texture): (WebCore::LayerTextureUpdater::Texture::swapTextureWith): (WebCore::LayerTextureUpdater::Texture::Texture): (Texture): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ScrollbarLayerChromium::updatePart): (WebCore): (WebCore::ScrollbarLayerChromium::setTexturePriorities): * platform/graphics/chromium/ScrollbarLayerChromium.h: (ScrollbarLayerChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::managedTexture): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::textureManager): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate): (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::setTexturePriorities): (WebCore): (WebCore::TiledLayerChromium::setTexturePrioritiesInRect): (WebCore::TiledLayerChromium::resetUpdateState): (WebCore::TiledLayerChromium::updateLayerRect): (WebCore::TiledLayerChromium::idleUpdateLayerRect): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::evictAllContentTextures): (WebCore::CCLayerTreeHost::contentsTextureManager): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::prioritizeTextures): (WebCore::CCLayerTreeHost::deleteTextureAfterCommit): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Added. (WebCore): (WebCore::CCPrioritizedTexture::CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::~CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::setTextureManager): (WebCore::CCPrioritizedTexture::setDimensions): (WebCore::CCPrioritizedTexture::requestLate): (WebCore::CCPrioritizedTexture::acquireBackingTexture): (WebCore::CCPrioritizedTexture::textureId): (WebCore::CCPrioritizedTexture::bindTexture): (WebCore::CCPrioritizedTexture::framebufferTexture2D): (WebCore::CCPrioritizedTexture::setCurrentBacking): * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Added. (WebCore): (CCPrioritizedTexture): (WebCore::CCPrioritizedTexture::create): (WebCore::CCPrioritizedTexture::textureManager): (WebCore::CCPrioritizedTexture::format): (WebCore::CCPrioritizedTexture::size): (WebCore::CCPrioritizedTexture::memorySizeBytes): (WebCore::CCPrioritizedTexture::setRequestPriority): (WebCore::CCPrioritizedTexture::requestPriority): (WebCore::CCPrioritizedTexture::canAcquireBackingTexture): (WebCore::CCPrioritizedTexture::haveBackingTexture): (Backing): (WebCore::CCPrioritizedTexture::Backing::size): (WebCore::CCPrioritizedTexture::Backing::format): (WebCore::CCPrioritizedTexture::Backing::memorySizeBytes): (WebCore::CCPrioritizedTexture::Backing::textureId): (WebCore::CCPrioritizedTexture::Backing::currentTexture): (WebCore::CCPrioritizedTexture::Backing::setCurrentTexture): (WebCore::CCPrioritizedTexture::Backing::Backing): (WebCore::CCPrioritizedTexture::Backing::~Backing): (WebCore::CCPrioritizedTexture::isAbovePriorityCutoff): (WebCore::CCPrioritizedTexture::setAbovePriorityCutoff): (WebCore::CCPrioritizedTexture::setManagerInternal): (WebCore::CCPrioritizedTexture::currentBacking): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Added. (WebCore): (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::setMemoryAllocationLimitBytes): (WebCore::CCPrioritizedTextureManager::prioritizeTextures): (WebCore::CCPrioritizedTextureManager::clearPriorities): (WebCore::CCPrioritizedTextureManager::requestLate): (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded): (WebCore::CCPrioritizedTextureManager::reduceMemory): (WebCore::CCPrioritizedTextureManager::clearAllMemory): (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted): (WebCore::CCPrioritizedTextureManager::unlink): (WebCore::CCPrioritizedTextureManager::link): (WebCore::CCPrioritizedTextureManager::registerTexture): (WebCore::CCPrioritizedTextureManager::unregisterTexture): (WebCore::CCPrioritizedTextureManager::returnBackingTexture): (WebCore::CCPrioritizedTextureManager::createBacking): (WebCore::CCPrioritizedTextureManager::destroyBacking): (WebCore::CCPrioritizedTextureManager::assertInvariants): * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Added. (WebCore): (CCPrioritizedTextureManager): (WebCore::CCPrioritizedTextureManager::create): (WebCore::CCPrioritizedTextureManager::createTexture): (WebCore::CCPrioritizedTextureManager::memoryUseBytes): (WebCore::CCPrioritizedTextureManager::memoryAboveCutoffBytes): (WebCore::CCPrioritizedTextureManager::setMaxMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::maxMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::setPreferredMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::preferredMemoryLimitBytes): (WebCore::CCPrioritizedTextureManager::setMaxMemoryPriorityCutoff): (WebCore::CCPrioritizedTextureManager::maxMemoryPriorityCutoff): (WebCore::CCPrioritizedTextureManager::compareTextures): (WebCore::CCPrioritizedTextureManager::compareBackings): * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Added. (WebCore): (WebCore::CCPriorityCalculator::uiPriority): (WebCore::CCPriorityCalculator::visiblePriority): (WebCore::CCPriorityCalculator::lingeringPriority): (WebCore::CCPriorityCalculator::priorityFromDistance): (WebCore::CCPriorityCalculator::priorityFromVisibility): * platform/graphics/chromium/cc/CCPriorityCalculator.h: Added. (WebCore): (CCPriorityCalculator): (WebCore::CCPriorityCalculator::highestPriority): (WebCore::CCPriorityCalculator::lowestPriority): (WebCore::CCPriorityCalculator::priorityIsLower): (WebCore::CCPriorityCalculator::priorityIsHigher): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: 2012-06-29 Eric Seidel <eric@webkit.org> Remove BUILDING_ON_LEOPARD now that no ports build on Leopard https://bugs.webkit.org/show_bug.cgi?id=90249 Reviewed by Ryosuke Niwa. I don't think I quite got it all yet, but this is another step towards removing Leopard support in WebCore. * WebCore.exp.in: * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible): * platform/mac/WebCoreSystemInterface.h: * platform/network/Credential.h: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore): (WebCore::initializeMaximumHTTPConnectionCountPerHost): * platform/text/TextChecking.h: (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): 2012-06-29 Andreas Kling <kling@webkit.org> Unreviewed, rolling out r121562. http://trac.webkit.org/changeset/121562 https://bugs.webkit.org/show_bug.cgi?id=89945 Broke a couple of editing/pasteboard tests. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::parentStyleSheet): * css/PropertySetCSSStyleDeclaration.h: (WebCore::PropertySetCSSStyleDeclaration::clearParentElement): (PropertySetCSSStyleDeclaration): (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration): (WebCore::StylePropertySet::clearParentElement): (WebCore): * css/StylePropertySet.h: (StylePropertySet): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore): * dom/ElementAttributeData.h: (ElementAttributeData): * dom/StyledElement.cpp: (WebCore::StyledElement::~StyledElement): (WebCore): (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (StyledElement): (WebCore::StyledElement::destroyInlineStyle): 2012-06-29 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> [Qt] Add missing support for tiled shadow blur on fillRect https://bugs.webkit.org/show_bug.cgi?id=90082 Reviewed by Noam Rosenthal. This overloaded fillRect implementation also supports this optimization in certain situations. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2012-06-29 Brady Eidson <beidson@apple.com> Build fix - These should not be executable! Rubberstamped by Jessie Berlin. * loader/cache/CachedSVGDocument.cpp: Removed property svn:executable. * loader/cache/CachedSVGDocument.h: Removed property svn:executable. 2012-06-29 Kwang Yul Seo <skyul@company100.net> Update FIXME comment in XMLDocumentParser::wellFormed https://bugs.webkit.org/show_bug.cgi?id=90223 Reviewed by Adam Barth. XMLDocumentParser::wellFormed is still used by the XMLHttpRequest to check if the responseXML was well formed. So it can't be removed. * xml/parser/XMLDocumentParser.h: (XMLDocumentParser): 2012-06-29 Andreas Kling <kling@webkit.org> Separate mutating CSSStyleDeclaration operations. <http://webkit.org/b/89945> Reviewed by Antti Koivisto. Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration. PropertySetCSSStyleDeclaration now has: - propertySet() const - ensureMutablePropertySet() This is prep work for supporting immutable ElementAttributeData objects, the idea being that calling ensureMutablePropertySet() may cause the element to convert its internal attribute storage (which also holds the inline StylePropertySet.) To that end, also removed the weird logic that allowed you to kill the inline style object by removing the 'style' attribute. We now simply clear out all the properties in that case which saves us a bunch of hassle (no need for a ~StyledElement anymore.) Note that InlineCSSStyleDeclaration now refs the element rather than the inline style. There should be no web-facing behavior change from any of this. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::length): (WebCore::PropertySetCSSStyleDeclaration::item): (WebCore::PropertySetCSSStyleDeclaration::cssText): (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand): (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::copy): (WebCore::PropertySetCSSStyleDeclaration::makeMutable): (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches): (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration): (WebCore::InlineCSSStyleDeclaration::ref): (WebCore::InlineCSSStyleDeclaration::deref): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::InlineCSSStyleDeclaration::parentStyleSheet): (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet): * css/PropertySetCSSStyleDeclaration.h: (PropertySetCSSStyleDeclaration): (WebCore::PropertySetCSSStyleDeclaration::propertySet): (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet): (InlineCSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration): * css/StylePropertySet.h: (StylePropertySet): * dom/ElementAttributeData.cpp: * dom/ElementAttributeData.h: (ElementAttributeData): * dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (WebCore::StyledElement::~StyledElement): (StyledElement): 2012-06-29 Kwang Yul Seo <skyul@company100.net> Don't call SegmentedString::toString() twice in XMLDocumentParser::append(const SegmentedString&) https://bugs.webkit.org/show_bug.cgi?id=90254 Reviewed by Adam Barth. We can reuse the local variable parseString instead of calling s.toString() again. No behavior change, so no new tests. * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::append): 2012-06-29 Mihnea Ovidenie <mihnea@adobe.com> Crash when flowing a fixed positioned element into a region. https://bugs.webkit.org/show_bug.cgi?id=88133 Reviewed by Julien Chaffraix and Abhishek Arya. When a fixed positioned element is collected into a named flow, we have to make sure that such element has the RenderFlowThread as containing block instead of RenderView, so that the fixed positioned element is laid out properly. Making the RenderFlowThread the top most containing block for named flow elements required the modification of RenderLayer::convertToLayerCoords so that the fixed positioned elements inside the named flow take the same code path as the absolute positioned elements inside the named flow. I also added a method, checkBlockPositionedObjectsNeedLayout, in order to verify that a block that is ending its layout, setNeedsLayout(false), has all the positioned children laid out. This way, we will hit an assertion if an out-of-flow positioned child inside a RenderFlowThread is not laid out after the RenderFlowThread is laid out. Tests: fast/regions/absolute-pos-elem-in-named-flow.html fast/regions/absolute-pos-elem-in-region.html fast/regions/fixed-pos-elem-in-named-flow.html fast/regions/fixed-pos-elem-in-named-flow2.html fast/regions/fixed-pos-elem-in-region.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::checkPositionedObjectsNeedLayout): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::convertToLayerCoords): * rendering/RenderObject.cpp: (WebCore): (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout): (WebCore::RenderObject::containingBlock): (WebCore::RenderObject::container): * rendering/RenderObject.h: (RenderObject): (WebCore::RenderObject::setNeedsLayout): 2012-06-29 Konrad Piascik <kpiascik@rim.com> Don't hardcode target dpi of 160 (it should be 96 on desktop) https://bugs.webkit.org/show_bug.cgi?id=88114 Reviewed by Adam Barth. No behavioural change, current tests in fast/viewport cover all functionality. * WebCore.exp.in: Updated symbol for computeViewportAttributes. * dom/ViewportArguments.cpp: Use new parameter for devicePixelRatio and don't calculate it anymore. (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: Change the deviceDPI parameter to devicePixelRatio and put the onus on the embedder to supply the correct value. Add temporary constant. (WebCore): 2012-06-29 Vineet Chaudhary <rgf748@motorola.com> JS binding code generator doesn't handle "attribute unsigned long[]" well. https://bugs.webkit.org/show_bug.cgi?id=84540 Reviewed by Kentaro Hara. In JS/V8 Bindings using traits instead of specialised functions. Also added support for "unsigned long" in JSDOMBinding and V8Binding. No new tests, as no behavioural changes. * bindings/js/JSDOMBinding.h: (WebCore::Traits::arrayJSValue): (WebCore::jsArray): * bindings/v8/V8Binding.h: (WebCore::Traits::arrayV8Value): (WebCore::v8Array): 2012-06-29 Andreas Kling <kling@webkit.org> Unreviewed mac build fix after r121547. Remove the now-unused FontCustomPlatformData::m_atsContainer. * platform/graphics/mac/FontCustomPlatformData.h: (FontCustomPlatformData): 2012-06-29 Kent Tamura <tkent@chromium.org> <textarea> unnecessarily saves the value in some cases https://bugs.webkit.org/show_bug.cgi?id=90259 Reviewed by Hajime Morita. Test: fast/forms/textarea/textarea-state-restore.html * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::saveFormControlState): We apply EOL normalization to value(), but don't apply it to defaultValue(). Also value() can return a null string, which never equals to any strings. To check m_isDirty is what we need.. 2012-06-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Provide source data for all known rule types in CSSParser, except "keyframe" and "region" https://bugs.webkit.org/show_bug.cgi?id=88420 Reviewed by Antti Koivisto. This change transitions the CSS source code model from a flat list of style rules to a tree of all types of CSS rules (some of them lack actual source code data), which is crucial to model-based CSS stylesheet source editing (add/remove CSS rule) and navigation. As a side effect, the CSS parsing performance on PerformanceTests/Parser/css-parser-yui.html is improved roughly by 2%: - originally: median= 282.051282051 runs/s, stdev= 1.51236798322 runs/s, min= 278.481012658 runs/s, max= 283.870967742 runs/s - with patch applied: median= 287.206266319 runs/s, stdev= 1.31518320219 runs/s, min= 282.051282051 runs/s, max= 288.713910761 runs/s No new tests, as there is no client-visible behavior change. Existing Inspector tests will be modified to test the new data provided, along with the necessary Inspector plumbing. * css/CSSGrammar.y: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::reattach): Check for mediaQueries() validity before reattaching. * css/CSSParser.cpp: Unless explicitly specified below, the method changes are related to the extension of the source-based CSS model provided by the parser. (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::setupParser): (WebCore::CSSParser::parseDeclaration): Accept a CSSRuleSourceData for filling, since it now contains the related style source range. (WebCore::CSSParser::createImportRule): (WebCore::CSSParser::createMediaRule): Create CSSMediaRule even if media and rules are empty, which is consistent with Mozilla. (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded): (WebCore): (WebCore::CSSParser::addNewRuleToSourceTree): (WebCore::CSSParser::createKeyframesRule): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createRegionRule): (WebCore::CSSParser::fixUnparsedPropertyRanges): (WebCore::CSSParser::markRuleHeaderStart): (WebCore::CSSParser::markRuleHeaderEnd): (WebCore::CSSParser::markRuleBodyStart): (WebCore::CSSParser::markRuleBodyEnd): (WebCore::CSSParser::markPropertyStart): (WebCore::CSSParser::markPropertyEnd): * css/CSSParser.h: (CSSParser): * css/CSSPropertySourceData.h: Extend the model to handle more types of rules and their containments. (WebCore): (WebCore::CSSRuleSourceData::create): (WebCore::CSSRuleSourceData::createUnknown): (CSSRuleSourceData): (WebCore::CSSRuleSourceData::CSSRuleSourceData): * inspector/InspectorStyleSheet.cpp: Follow the CSSParser API changes but retain the flat stored CSS rules structure. (ParsedStyleSheet): (flattenSourceData): Flatten the rule tree to retain the existing rule-handling code intact. (ParsedStyleSheet::setSourceData): (ParsedStyleSheet::ruleSourceDataAt): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyle::styleText): (WebCore::InspectorStyleSheet::setRuleSelector): (WebCore::InspectorStyleSheet::deleteRule): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::buildObjectForStyle): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheet::styleSheetTextWithChangedStyle): (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): * inspector/InspectorStyleSheet.h: 2012-06-29 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Annotate TextViewer.js https://bugs.webkit.org/show_bug.cgi?id=90266 Reviewed by Yury Semikhatsky. Annotated TextViewer.js and fixed found errors. Drive-by: Fixed NativeMemorySnapshotView.js compilation. Drive-by: Fixed protocol-externs.js compilation. Drive-by: Removed unused platform parameter from TextViewer constructor. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::runScript): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart.prototype._updateView): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange): 2012-06-29 Eric Seidel <eric@webkit.org> Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard https://bugs.webkit.org/show_bug.cgi?id=90256 Reviewed by Ryosuke Niwa. * platform/LocalizedStrings.cpp: (WebCore::imageTitle): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setAllowsFontSmoothing): * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/FontCacheMac.mm: (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): (WebCore::FontCache::platformInit): * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/WebLayer.h: * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/DisplaySleepDisabler.cpp: (WebCore::DisplaySleepDisabler::DisplaySleepDisabler): (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler): * platform/mac/DisplaySleepDisabler.h: (DisplaySleepDisabler): * platform/mac/HTMLConverter.h: * platform/mac/HTMLConverter.mm: * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenuMac::populate): * platform/mac/ScrollElasticityController.mm: 2012-06-29 Zan Dobersek <zandobersek@gmail.com> Unreviewed attempt at a build fix for 64-bit debug build, touch InsertionPoint.cpp to try to get it rebuilt. * html/shadow/InsertionPoint.cpp: (WebCore): 2012-06-29 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> [Qt] Don't add Qt module dependencies in features.prf The required dependencies are already added in WebCore.pri. Reviewed by Tor Arne Vestbø. * WebCore.pri: 2012-06-29 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add FileSystemView https://bugs.webkit.org/show_bug.cgi?id=73301 This patch introduce a split view as FileSystemView. Including directory tree as sidebar tree. Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/directory-tree.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.Entry.compare): * inspector/front-end/FileSystemView.js: Added. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showFileSystem): (WebInspector.FileSystemTreeElement.prototype.get itemURL): (WebInspector.FileSystemTreeElement.prototype.onattach): (WebInspector.FileSystemTreeElement.prototype._handleContextMenuEvent): (WebInspector.FileSystemTreeElement.prototype._refreshFileSystem): (WebInspector.FileSystemTreeElement.prototype.onselect): (WebInspector.FileSystemTreeElement.prototype.clear): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-06-29 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Integer::New() with v8Integer() in custom bindings https://bugs.webkit.org/show_bug.cgi?id=90242 Reviewed by Yury Semikhatsky. v8Integer() is a fast wrapper of v8::Integer::New(). This patch replaces v8::Integer::New() with v8Integer() in custom bindings, and pass isolates. No tests. No change in behavior. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyQuery): (WebCore::V8DOMStringMap::namedPropertyEnumerator): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionStartAccessorGetter): (WebCore::V8HTMLInputElement::selectionEndAccessorGetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::lengthAccessorGetter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::functionDetailsCallback): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::portsAccessorGetter): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::namedPropertyGetter): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyEnumerator): (WebCore::V8Storage::indexedPropertyGetter): (WebCore::V8Storage::namedPropertyQuery): (WebCore::V8Storage::indexedPropertySetter): (WebCore::V8Storage::indexedPropertyDeleter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): 2012-06-29 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r121520. http://trac.webkit.org/changeset/121520 https://bugs.webkit.org/show_bug.cgi?id=90246 the performance optimization needs more investigation * dom/DatasetDOMStringMap.cpp: (WebCore::convertPropertyNameToAttributeName): * dom/Element.cpp: (WebCore::Element::getAttributeNS): (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (ElementAttributeData): 2012-06-29 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp} https://bugs.webkit.org/show_bug.cgi?id=90238 Reviewed by Yury Semikhatsky. v8Integer() is a fast wrapper of v8::Integer::New(). We can replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp}. In addition, we pass isolate to v8Integer() where possible. No tests. No change in behavior. * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): * bindings/v8/NPV8Object.cpp: (_NPN_Enumerate): Changed v8::None to 0, for consistency with other code. * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::compileScript): * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.cpp: (WebCore::v8Array): (WebCore::v8ValueToWebCoreDOMStringList): * bindings/v8/V8Binding.h: (WebCore::v8Array): (WebCore::v8NumberArrayToVector): * bindings/v8/V8Collection.h: (WebCore::nodeCollectionIndexedPropertyEnumerator): (WebCore::collectionIndexedPropertyEnumerator): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: (WebCore::npObjectQueryProperty): (WebCore::npObjectPropertyEnumerator): * bindings/v8/V8NPUtils.cpp: (WebCore::convertNPVariantToV8Object): * bindings/v8/V8Proxy.cpp: (WebCore::batchConfigureConstants): (WebCore::V8Proxy::compileScript): * bindings/v8/V8Utilities.cpp: (WebCore::createHiddenDependency): (WebCore::removeHiddenDependency): * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): * bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::addListener): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Resource content is not loaded if Resource.requestContent method is called before network request is finished. https://bugs.webkit.org/show_bug.cgi?id=90153 Reviewed by Yury Semikhatsky. Test: http/tests/inspector/resource-tree/resource-request-content-while-loading.html * inspector/front-end/NetworkRequest.js: * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype._requestFinished): 2012-06-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121529. http://trac.webkit.org/changeset/121529 https://bugs.webkit.org/show_bug.cgi?id=90260 Failed to compile on Chromium WebKitMacBuilder (Requested by keishi on #webkit). * platform/LocalizedStrings.cpp: (WebCore): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::setFont): * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): * platform/graphics/mac/FontMac.mm: (WebCore::showGlyphsWithAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore): * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore): * platform/mac/PlatformEventFactoryMac.mm: (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): * platform/text/cf/HyphenationCF.cpp: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Add toggle breakpoint shortcut. https://bugs.webkit.org/show_bug.cgi?id=90188 Reviewed by Yury Semikhatsky. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): (WebInspector.JavaScriptSourceFrame.prototype._toggleBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleBreakpoint): (WebInspector.ScriptsPanel.prototype._showOutlineDialog): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.selection): 2012-06-28 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Cursor should follow execution line when debugging. https://bugs.webkit.org/show_bug.cgi?id=90184 Reviewed by Yury Semikhatsky. Added TextViewer.setSelection public method to set cursor selection in the editor. Added TextRange.createFromLocation method to create TextRanges with the same start and end points. Drive-by: removed unused _setCaretLocation() method in TextViewer.js * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._revealExecutionLine): (WebInspector.ScriptsPanel.prototype._editorSelected): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.setSelection): (WebInspector.SourceFrame.prototype.setContent): * inspector/front-end/TextEditorModel.js: (WebInspector.TextRange.createFromLocation): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.setSelection): (WebInspector.TextEditorMainPanel.prototype.highlightLine): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: IDBObjectStore.autoIncrement flag not exposed https://bugs.webkit.org/show_bug.cgi?id=89701 Reviewed by Yury Semikhatsky. Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel.prototype._loadDatabase.callback): (WebInspector.IndexedDBModel.prototype._loadDatabase): (WebInspector.IndexedDBModel.ObjectStore): * inspector/front-end/ResourcesPanel.js: (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip): 2012-06-28 Alexander Pavlov <apavlov@chromium.org> Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination https://bugs.webkit.org/show_bug.cgi?id=90073 Reviewed by Antti Koivisto. - The grammar is changed to allow abruptly terminated stylesheet in the @-webkit-keyframes (use closing_brace, not '}'). - A floating StyleKeyframe vector is introduced to separate the creation and filling of StyleRuleKeyframes, as other rules do. Test: fast/css/css-keyframe-unexpected-end.html * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::createFloatingKeyframeVector): (WebCore): (WebCore::CSSParser::sinkFloatingKeyframeVector): (WebCore::CSSParser::createKeyframesRule): * css/CSSParser.h: 2012-06-26 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add character data to the DOM section of native memory view https://bugs.webkit.org/show_bug.cgi?id=89968 Reviewed by Vsevolod Vlasov. Count strings referenced from CharacterData node and its descendants as part of the DOM tree structures in the native memory view. * dom/CharacterData.cpp: (WebCore::CharacterData::reportMemoryUsage): (WebCore): * dom/CharacterData.h: (CharacterData): * dom/MemoryInstrumentation.h: (MemoryInstrumentation): (WebCore::MemoryObjectInfo::reportString): (MemoryObjectInfo): * inspector/InspectorMemoryAgent.cpp: (WebCore): (WebCore::domTreeInfo): (WebCore::jsExternalResourcesInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-06-29 Eric Seidel <eric@webkit.org> Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard https://bugs.webkit.org/show_bug.cgi?id=90252 Reviewed by Ryosuke Niwa. * platform/LocalizedStrings.cpp: (WebCore): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::setFont): * platform/graphics/mac/ComplexTextControllerCoreText.mm: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): * platform/graphics/mac/FontMac.mm: (WebCore::showGlyphsWithAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore): * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore): * platform/mac/PlatformEventFactoryMac.mm: (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): * platform/text/cf/HyphenationCF.cpp: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused): 2012-06-27 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: showConsole() should close previous view in drawer. https://bugs.webkit.org/show_bug.cgi?id=90070 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: (WebInspector.showConsole): (WebInspector.showPanel): 2012-06-29 Ryosuke Niwa <rniwa@webkit.org> Remove a #include erroneously added in r120896. * editing/VisibleSelection.h: 2012-06-29 Yoshifumi Inoue <yosin@chromium.org> [Platform] Implement Date Time format parser https://bugs.webkit.org/show_bug.cgi?id=89963 Reviewed by Kent Tamura. This patch introduces Unicode TR35 LDML date time format parser for input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true. Test: WebKit/chromium/tests/DateTimeFormatTest.cpp * CMakeLists.txt: Added DateTimeFormat.cpp * GNUmakefile.list.am: Added DateTimeFormat.{cpp,h} * Target.pri: ditto * WebCore.gypi: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/product.pbxproj: ditto * platform/text/DateTimeFormat.cpp: Added. (WebCore::mapCharacterToFieldTypeInternal): (WebCore::DateTimeFormat::DateTimeFormat): (WebCore::DateTimeFormat::mapCharacterToFieldType): (WebCore::DateTimeFormat::parse): * platform/text/DateTimeFormat.h: Added. (DateTimeFormat): (TokenHandler): (WebCore::DateTimeFormat::TokenHandler::~TokenHandler): 2012-06-29 Eric Seidel <eric@webkit.org> Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code https://bugs.webkit.org/show_bug.cgi?id=85846 Reviewed by Adam Barth. PLATFORM(MAC) has not supported Leopard for several months now. This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still supports BUILDING_ON_LEOPARD for now. * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::updateRangesAfterChildrenChanged): (WebCore::Document::nodeChildrenWillBeRemoved): (WebCore::Document::nodeWillBeRemoved): (WebCore::Document::textInserted): (WebCore::Document::textRemoved): (WebCore::Document::textNodesMerged): (WebCore::Document::textNodeSplit): * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): (WebCore::TypingCommand::typingAddedToOpenCommand): * editing/mac/EditorMac.mm: (WebCore::Editor::pasteWithPasteboard): * loader/EmptyClients.h: (EmptyEditorClient): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): (WebCore): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded): * page/EditorClient.h: (EditorClient): * platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagSearchWeb): * platform/MemoryPressureHandler.cpp: (WebCore): * platform/SuddenTermination.h: (WebCore): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateContentsImage): (WebCore::GraphicsLayerCA::constrainedSize): * platform/graphics/ca/PlatformCALayer.h: (PlatformCALayer): * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (fromCAValueFunctionType): (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (toCAFilterType): (PlatformCALayer::anchorPoint): (PlatformCALayer::setAnchorPoint): (PlatformCALayer::contentsTransform): (PlatformCALayer::setContentsTransform): (PlatformCALayer::isGeometryFlipped): (PlatformCALayer::setGeometryFlipped): (PlatformCALayer::acceleratesDrawing): (PlatformCALayer::setAcceleratesDrawing): (PlatformCALayer::setMinificationFilter): (PlatformCALayer::setMagnificationFilter): (PlatformCALayer::contentsScale): (PlatformCALayer::setContentsScale): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setScale): (WebCore::TileCache::setAcceleratesDrawing): (WebCore::TileCache::createTileLayer): 2012-06-29 Kwang Yul Seo <skyul@company100.net> Use StringBuilder in SegmentedString::toString() https://bugs.webkit.org/show_bug.cgi?id=90247 Reviewed by Adam Barth. Use a StringBuilder instead of String concatenation because StringBuilder is generally faster. No new tests. Covered by existing tests. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::toString): * platform/text/SegmentedString.h: (WebCore::SegmentedSubstring::appendTo): 2012-06-28 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r121518. * WebCore.exp.in: 2012-06-28 Ryosuke Niwa <rniwa@webkit.org> DOMHTMLCollection::item may return a wrong element after namedItem is called https://bugs.webkit.org/show_bug.cgi?id=90240 Reviewed by Antti Koivisto. The bug was caused by namedItem updating m_cache.current without updating m_cache.position. Fixed the bug by updating both. This is similar to the bug I fixed in r121478. WebKit API Test: WebKit1.HTMLCollectionNamedItemTest * html/HTMLCollection.cpp: (WebCore::HTMLCollection::namedItem): 2012-06-28 Kentaro Hara <haraken@chromium.org> Change argument types of Element::getAttribute*() from String to AtomicString https://bugs.webkit.org/show_bug.cgi?id=90246 Reviewed by Ryosuke Niwa. This is a follow-up patch for r121439. r121439 changed an argument type of Element::getAttribute() from String to AtomicString, which optimized performance of Dromaeo/dom-attr.html. This patch changes other argument types of Element::getAttribute*() from String to AtomicString. See the ChangeLog in http://trac.webkit.org/changeset/121439 for more details about why this change optimizes performance. No tests. No change in behavior. * dom/DatasetDOMStringMap.cpp: (WebCore::convertPropertyNameToAttributeName): * dom/Element.cpp: (WebCore::Element::getAttributeNS): (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): * dom/Element.h: (Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (ElementAttributeData): 2012-06-28 Kent Tamura <tkent@chromium.org> REGRESSION(r106388): Form hidden element values being restored incorrectly for dynamically generated content https://bugs.webkit.org/show_bug.cgi?id=88685 Reviewed by Hajime Morita. We should not save value attribute updated during parsing. Test: fast/forms/state-restore-to-non-edited-controls.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): Initialize m_valueAttributeWasUpdatedAfterParsing. (WebCore::HTMLInputElement::parseAttribute): Set true to m_valueAttributeWasUpdatedAfterParsing if value attribute is updated and it's not in parsing. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::valueAttributeWasUpdatedAfterParsing): Added for HiddenInputType. * html/HiddenInputType.cpp: (WebCore::HiddenInputType::saveFormControlState): Save the value only if valueAttributeWasUpdatedAfterParsing() is true. 2012-06-28 MORITA Hajime <morrita@google.com> [Refactoring] NodeRenderingContext ctor could be built on top of the ComposedShadowTreeWalker https://bugs.webkit.org/show_bug.cgi?id=89732 Reviewed by Dimitri Glazkov. The constructor of NodeRenderingContext implements almost same logic as ComposedShadowTreeWalker::parent(). This change eliminates the duplication by employing ComposedShadowTreeWalker in the constructor. ComposedShadowTreeWalker has same difference from NodeRenderingContext though. So this change also extends ComposedShadowTreeWalker to support these missing pieces, which are encapsulated in newly introduced ParentTranversalDetails class where: - not only the parent, but also the insertion point of the child is returned, - resetStyleInheritance from the child-parent traversal is computed and - if the starting point is out of the composition, it returns null as a parent. This change also inlines some ComposedShadowTreeWalker methods for speed. No new tests. Covered by existing tests. * WebCore.exp.in: * dom/ComposedShadowTreeWalker.cpp: (WebCore::shadowOfParent): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseInsertionPoint): (WebCore): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseShadowRoot): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didFindNode): (WebCore::ComposedShadowTreeWalker::findParent): (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement): (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): (WebCore::ComposedShadowTreeWalker::traverseParent): (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree): (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): * dom/ComposedShadowTreeWalker.h: (ParentTranversalDetails): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::ParentTranversalDetails): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::node): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::insertionPoint): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::resetStyleInheritance): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::outOfComposition): (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::childWasOutOfComposition): (ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker): (WebCore): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::parentRenderer): (WebCore::NodeRenderingContext::shouldCreateRenderer): (WebCore::NodeRenderingContext::isOnEncapsulationBoundary): * dom/NodeRenderingContext.h: (NodeRenderingContext): (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): (WebCore::NodeRenderingContext::resetStyleInheritance): (WebCore::NodeRenderingContext::insertionPoint): 2012-06-28 Stephen White <senorblanco@chromium.org> Implement filter url() function. https://bugs.webkit.org/show_bug.cgi?id=72443 url() references can be internal, in which case the DOM nodes are retrieved directly from the current document, or external, in which case a CachedSVGDocument request is made, and the filter node build is deferred until the document is loaded. WebKitSVGDocumentValue holds the CachedSVGDocument (if any) and the URL as a CSSValue, and is stored in the CSSValue chain as the argument to the reference filter. One notable difference between internal and external references is that internal references will automatically update on an SVG filter node attribute change, while external references will not, since they live in a separate document. This is consistent with the Mozilla implementation. In order to make this work, the RenderLayer is made a client of the RenderSVGResourceContainer, and calls filterNeedsRepaint() when the SVG nodes are invalidated. Some plumbing: The CSS StyleResolver was refactored to load all all external resources (images, shaders and (now) SVG filters) in a single function, loadPendingResources(). The PlatformLayer typedef was moved out into its own file, in order to break a cyclic dependency. SVGFilterBuilder was modified to accept the SourceGraphic and SourceAlpha FilterEffects in its constructor and factory function, rather than extracting them from the parent Filter. (This is necessary so that the url() filter can correctly hook up its inputs from previous CSS filters.) Reviewed by Dean Jackson. Tests: css3/filters/effect-reference-external.html css3/filters/effect-reference-hw.html css3/filters/effect-reference-ordering.html css3/filters/effect-reference.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add WebKitCSSSVGDocumentValue to the various build files. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::valueForFilter): Use the reference filter's url when getting the computed style for a reference filter. * css/CSSParser.cpp: (WebCore::CSSParser::parseFilter): Create the referenceFilterValue's argument as a WebKitCSSSVGDocumentValue instead of a CSS string. * css/CSSValue.cpp: (WebCore::CSSValue::cssText): Add support for WebKitCSSSVGDocumentValue. (WebCore::CSSValue::destroy): Add support for WebKitCSSSVGDocumentValue. * css/CSSValue.h: (WebCore::CSSValue::isWebKitCSSSVGDocumentValue): Add support for WebKitCSSSVGDocumentValue. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Keep track of pending SVG document references, and load them when necessary. * css/StyleResolver.h: * css/WebKitCSSSVGDocumentValue.cpp: Added. New CSSValue subclass for holding SVG document references. (WebCore::WebKitCSSSVGDocumentValue::WebKitCSSSVGDocumentValue): (WebCore::WebKitCSSSVGDocumentValue::~WebKitCSSSVGDocumentValue): (WebCore::WebKitCSSSVGDocumentValue::load): (WebCore::WebKitCSSSVGDocumentValue::customCssText): * css/WebKitCSSSVGDocumentValue.h: Added. (WebCore::WebKitCSSSVGDocumentValue::create): (WebCore::WebKitCSSSVGDocumentValue::cachedSVGDocument): (WebCore::WebKitCSSSVGDocumentValue::url): (WebCore::WebKitCSSSVGDocumentValue::loadRequested): * platform/graphics/GraphicsLayer.h: Refactor PlatformLayer out into its own file, to avoid circular includes. * platform/graphics/ImageBuffer.h: Include PlatformLayer.h instead of GraphicsLayer.h. * platform/graphics/PlatformLayer.h: Added. Refactor PlatformLayer out into its own file, to avoid circular includes. * platform/graphics/filters/FilterOperation.h: (WebCore::ReferenceFilterOperation::create): (WebCore::ReferenceFilterOperation::clone): (WebCore::ReferenceFilterOperation::url): (WebCore::ReferenceFilterOperation::fragment): (ReferenceFilterOperation): (WebCore::ReferenceFilterOperation::data): (WebCore::ReferenceFilterOperation::setData): (WebCore::ReferenceFilterOperation::operator==): (WebCore::ReferenceFilterOperation::ReferenceFilterOperation): Augment ReferenceFilterOperation to maintain a data pointer, in order to preserve context while loading external SVG documents. Replace "reference" with "url" and "fragment" members, in order to ease retrieval of the appropriate DOM objects. * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::hasReferenceFilter): Convenience function for finding reference filters. * platform/graphics/filters/FilterOperations.h: (FilterOperations): * platform/mac/ScrollbarThemeMac.mm: Include GraphicsLayer.h explicitly, since ImageBuffer.h no longer includes it (and only includes PlatformLayer.h). * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::buildReferenceFilter): Utility function to build a FilterEffect node graph for a ReferenceFilterOperation. (WebCore::FilterEffectRenderer::build): Call the above builder function for ReferenceFilterOperations. * rendering/FilterEffectRenderer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): If we have reference filters, update them along with other filters. (WebCore::RenderLayer::filterNeedsRepaint): * rendering/RenderLayerFilterInfo.cpp: (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo): (WebCore::RenderLayerFilterInfo::notifyFinished): Implement callback function when external SVGDocuments are loaded. (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients): Add the FilterInfo as a client to be called when SVGDocuments are loaded. (WebCore::RenderLayerFilterInfo::removeReferenceFilterClients): Remove this from the list of notified clients. * rendering/RenderLayerFilterInfo.h: Add new member vars for tracking internal and external SVG references, so we can remove ourselves as a client when done. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): When marking client DOM nodes for repaint, also mark any RenderLayers referring to this DOM tree via filters as needing repaint. (WebCore::RenderSVGResourceContainer::addClientRenderLayer): (WebCore::RenderSVGResourceContainer::removeClientRenderLayer): * rendering/svg/RenderSVGResourceContainer.h: Maintain a list of RenderLayer clients on each SVG resource container, and turn SVG DOM repaint notifications into filter repaint (CSS) notifications. * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives): Construct a SourceGraphic and SourceAlpha node explicitly for the SVG builder case. * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::create): Add the SourceGraphic and SourceAlpha as parameters to the constructor and create() methods, so they can be supplied by the caller. 2012-06-28 Kenichi Ishibashi <bashi@chromium.org> [Chromium] CTFontCopyTable of MacOSX10.5 SDK doesn't work for layout tables https://bugs.webkit.org/show_bug.cgi?id=90235 Reviewed by Kent Tamura. Use CGFontCopyTableForTag instead. No new tests. css3/font-feature-settings-rendering.html should pass. I'll rebase expectations once bots get the result. * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: (WebCore::harfbuzzCoreTextGetTable): 2012-06-28 Philip Rogers <pdr@google.com> Add preventative assert in SVGTRefElement https://bugs.webkit.org/show_bug.cgi?id=90203 Reviewed by Abhishek Arya. SVGTRefElement::detachTarget() adds a pending resource via addPendingResource. Due to some recent bugs in this area, an assert is being added to prevent users from calling detachTarget when not in a document. Doing so would create a bug such as in WK90042. This assert will not fire currently because detachTarget is only called after a DOMNodeRemovedFromDocumentEvent event fires, which only comes from dispatchChildRemovalEvents when the node is in a document. * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::detachTarget): 2012-06-28 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> [Qt] Remove unnecessary AffineTransform calls https://bugs.webkit.org/show_bug.cgi?id=90178 Reviewed by Noam Rosenthal. Qt currently ignores the const AffineTransform& parameter on Pattern::createPlatformPattern, so removing it from all its Qt calls and changing the function signature if platform is Qt. * platform/graphics/Pattern.h: (Pattern): * platform/graphics/qt/FontQt.cpp: (WebCore::fillPenForContext): (WebCore::strokePenForContext): * platform/graphics/qt/FontQt4.cpp: (WebCore::fillPenForContext): (WebCore::strokePenForContext): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::drawRepeatPattern): * platform/graphics/qt/PatternQt.cpp: (WebCore::Pattern::createPlatformPattern): 2012-06-28 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place https://bugs.webkit.org/show_bug.cgi?id=90229 Reviewed by Luiz Agostini. For opaque web content in WebKit2, we use the RGB32 image format. When we special-case it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy. Covered existing API tests, as this code path is always used when rendering. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Compile chromium compositor implementation files into separate .lib https://bugs.webkit.org/show_bug.cgi?id=90233 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2012-06-28 Erik Arvidsson <arv@chromium.org> [V8] NodeList wrappers are not kept alive as needed https://bugs.webkit.org/show_bug.cgi?id=90194 Reviewed by Ojan Vafai. We need to add custom reachability code for DynamicNodeLists. If the owner of a DynamicNodeList is reachable then the DynamicNodeList must also be reachable. Test: fast/dom/NodeList/nodelist-reachable.html * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::visitDOMWrapper): AddImplicitReferences from the owner wrapper. (WebCore): * dom/NodeList.idl: 2012-06-28 Elliott Sprehn <esprehn@gmail.com> frameborder="no" on frameset is ignored if border attribute set https://bugs.webkit.org/show_bug.cgi?id=17767 Reviewed by Tony Chang. Fixes <frameset> frameborder and border handling. Previously we'd override the frameborder=no setting if border was set. We also treated frameborder="anything" the same as frameborder=0 since we we just converted it to a number so frameborder=yes was incorrectly treated the same as frameborder=no. Tests: fast/frames/frameset-frameborder-boolean-values.html fast/frames/frameset-frameborder-inheritance.html fast/frames/frameset-frameborder-overrides-border.html * html/HTMLFrameSetElement.cpp: Proper parsing of yes,no,1,0 values. (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: (WebCore::HTMLFrameSetElement::border): Border should be 0 if frameborder=no. 2012-06-28 Joshua Bell <jsbell@chromium.org> IndexedDB: Implement IDBTransaction internal active flag https://bugs.webkit.org/show_bug.cgi?id=89379 Reviewed by Tony Chang. IDB transactions should only be "active" during IDB success/error callbacks; attempts to make new requests otherwise (e.g. in a setTimeout callback) should fail even if the transaction has not yet finished. Implement this logic, and the closely related requirement that transactions are deactivated when the context they were created in returns to the event loop, and finally that when so deactivated they should commit rather than abort (as previously implemented) if no requests have been filed. Tests: storage/indexeddb/transaction-active-flag.html storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html storage/indexeddb/transaction-complete-with-js-recursion.html storage/indexeddb/transaction-complete-workers.html * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: Simplify API. (WebCore::transactions): (WebCore::IDBPendingTransactionMonitor::addNewTransaction): (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions): * Modules/indexeddb/IDBPendingTransactionMonitor.h: (WebCore): (IDBPendingTransactionMonitor): * Modules/indexeddb/IDBRequest.cpp: Unregisters from transaction when done, not on destruction. No longer responsible for working with the pending monitor. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::~IDBRequest): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::dispatchEvent): Set active flag on transaction during callback. * Modules/indexeddb/IDBTransaction.cpp: Use state enum to better track lifecycle, and take ownership of relationship with pending monitor. (WebCore::IDBTransaction::IDBTransaction): Special cases for version change transactions. (WebCore::IDBTransaction::~IDBTransaction): (WebCore::IDBTransaction::error): (WebCore::IDBTransaction::setError): (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::objectStoreCreated): (WebCore::IDBTransaction::objectStoreDeleted): (WebCore::IDBTransaction::setActive): Let IDBRequest and IDBPendingTransactionMonitor toggle the active state. Needs some smarts because (1) state may move to Finishing during the request's dispatch phase due to an implicit/explicit abort, and (2) a monitor call will only trigger a commit if the transaction hasn't had any requests filed. (WebCore): (WebCore::IDBTransaction::abort): (WebCore::IDBTransaction::registerRequest): (WebCore::IDBTransaction::unregisterRequest): (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::onComplete): (WebCore::IDBTransaction::hasPendingActivity): (WebCore::IDBTransaction::dispatchEvent): (WebCore::IDBTransaction::canSuspend): (WebCore::IDBTransaction::enqueueEvent): * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::isFinished): (IDBTransaction): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::commit): Allow explicit commit() calls from the front end if no requests have been filed. * Modules/indexeddb/IDBTransactionBackendInterface.h: (IDBTransactionBackendInterface): Expose commit() method. * bindings/js/JSMainThreadExecState.cpp: (WebCore::JSMainThreadExecState::didLeaveScriptContext): Change target function name. * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): Change target function name. 2012-06-28 Philip Rogers <pdr@google.com> Prevent crash in animate resource handling https://bugs.webkit.org/show_bug.cgi?id=90042 Reviewed by Abhishek Arya. This patch adds a check that we are in a document before registering animation resources and creating a target element in SVGSMILElement. This prevents a crash where we would register resources and create the target when we were not in a document but fail to deregister / reset the target when we were removed from a document. In failing to reset the target, we can crash when trying to deregister resources that were not created after being inserted into a document and then removed. The existence of m_targetResources and registered animation resources is now tied to being in a document. Test: svg/custom/animate-reference-crash.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::targetElement): 2012-06-28 Joshua Bell <jsbell@chromium.org> IndexedDB: IDBDatabase should have a close pending field. https://bugs.webkit.org/show_bug.cgi?id=71129 Reviewed by Tony Chang. Handle the IDB spec case that "versionchange" events should not be fired against connections that have the internal "closePending" flag set but are not yet closed due to running transactions. Test: storage/indexeddb/database-closepending-flag.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::onVersionChange): 2012-06-28 Adrienne Walker <enne@google.com> [chromium] Split WebScrollbar into WebPluginScrollbar and WebScrollbar https://bugs.webkit.org/show_bug.cgi?id=90117 Reviewed by James Robinson. Make WebCore also depend on Platform. * WebCore.gyp/WebCore.gyp: 2012-06-28 Hayato Ito <hayato@chromium.org> CompositeShadowTreeWalker should use InsertionPoint::hasDistribution() instead of InsertionPoint::isActive(). https://bugs.webkit.org/show_bug.cgi?id=89177 Reviewed by Dimitri Glazkov. Prevents ComposedShadowTreeWalker from escaping out of an insertion point (which has distributed nodes) from a non-used fallback element in the insertion point. Such a fallback element should be treated as in an orphaned subtree. ComposedShadowTreeParentWalker will be also fixed in a follow-up patch. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> Cleanup HTMLFormCollection https://bugs.webkit.org/show_bug.cgi?id=90111 Reviewed by Andreas Kling. Got rid of getNamedItem and renamed getNamedFormItem to firstNamedItem and got rid of duplicateNumber argument since it's always 0. Also made it a static local function. In addition, removed nextItem() since it's not used anywhere. WebKit API Test: WebKit1.HTMLFormCollectionNamedItemTest * html/HTMLFormCollection.cpp: (WebCore::firstNamedItem): (WebCore): (WebCore::HTMLFormCollection::namedItem): * html/HTMLFormCollection.h: (HTMLFormCollection): 2012-06-28 Alec Flett <alecflett@chromium.org> IndexedDB: Hook up render-side key ASSERTing for get() https://bugs.webkit.org/show_bug.cgi?id=90001 Reviewed by Tony Chang. Hook up the new onSuccess and add it to the interface. For now, simply assert that the right value is set. Add the same assertion logic in the value-construction logic when the cursor advances. No new tests, existing tests verify this refactor is correct. * Modules/indexeddb/IDBCallbacks.h: (IDBCallbacks): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): * Modules/indexeddb/IDBRequest.cpp: (WebCore): (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBRequest.h: * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromSerializedValueAndKeyPath): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-06-28 Gregg Tavares <gman@google.com> Add support for DEPTH_STENCIL to WEBGL_depth_texture https://bugs.webkit.org/show_bug.cgi?id=90109 Reviewed by Kenneth Russell. * html/canvas/WebGLDepthTexture.idl: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Move chromium compositor implementation files into separate section in WebCore.gypi https://bugs.webkit.org/show_bug.cgi?id=90201 Reviewed by Adam Barth. This moves the chromium compositor implementation files to a separate gyp variable to make future changes easier. The files still all link into webcore_platform.lib, as before. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-06-28 Christophe Dumez <christophe.dumez@intel.com> [EFL] Use Eina_Module API instead of dlopen in PluginPackageEfl https://bugs.webkit.org/show_bug.cgi?id=89972 Reviewed by Antonio Gomes. Use convenience helpers in Eina_Module to load plugins instead of POSIX dlopen(). No new tests, behavior has not changed. * platform/FileSystem.h: (WebCore): * platform/efl/FileSystemEfl.cpp: (WebCore::unloadModule): * plugins/efl/PluginPackageEfl.cpp: (WebCore::PluginPackage::load): 2012-06-28 Jocelyn Turcotte <turcotte.j@gmail.com> [Qt] Fix TextureMapper rendering of GraphicsSurface on Mac https://bugs.webkit.org/show_bug.cgi?id=90154 Reviewed by Noam Rosenthal. Fix a regression introduced in r120608. texture2DRect takes texel coordinates, unlike texture2D which needs normalized coordinates. Pass an additional textureSize uniform and multiply it by the normalized coordinates. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTextureRectangleARB): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram): (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple): * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore::TextureMapperShaderProgram::textureSizeLocation): (TextureMapperShaderProgram): 2012-06-28 Simon Fraser <simon.fraser@apple.com> Improve compositing logging output https://bugs.webkit.org/show_bug.cgi?id=90199 Reviewed by Tim Horton (w00t!). Improve the compositing logging channel output in a few useful ways: 1. Report memory use, rather than megapixels 2. Show element class names * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::backingStoreMemoryEstimate): * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::backingStoreMemoryEstimate): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::nameForLayer): (WebCore::RenderLayerBacking::backingStoreMemoryEstimate): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::logLayerInfo): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Fix up more includes in compositor code https://bugs.webkit.org/show_bug.cgi?id=90200 Reviewed by Adrienne Walker. Adds includes we are using and removes ones that we aren't using. * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ProgramBinding.cpp: * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/cc/CCGraphicsContext.h: * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: 2012-06-28 Andrei Onea <onea@adobe.com> [CSSRegions]Rename NamedFlow::contentNodes to NamedFlow::getContent() https://bugs.webkit.org/show_bug.cgi?id=90163 Reviewed by Andreas Kling. Latest CSS Regions spec defines the NamedFlow interface as having a function named getContent, rather than an attribute named contentNodes. http://www.w3.org/TR/css3-regions/#the-namedflow-interface Test: fast/regions/webkit-named-flow-get-content.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::getContent): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-06-28 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r121232): named properties on document and window may return wrong object https://bugs.webkit.org/show_bug.cgi?id=90133 Reviewed by Andreas Kling. Fixed the bug. Also replaced hasAnyItem by isEmpty (hasAnyItem() is equivalent to !isEmpty()). Test: fast/dom/HTMLDocument/named-item-multiple-match.html * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::GetNamedProperty): * html/HTMLCollection.h: (WebCore::HTMLCollection::isEmpty): (WebCore::HTMLCollection::hasExactlyOneItem): 2012-06-28 Zeev Lieber <zlieber@chromium.org> [Skia] Computing the resampling mode ignores scale applied to the canvas https://bugs.webkit.org/show_bug.cgi?id=72073 Reviewed by Stephen White. Re-basing earlier patch by Daniel Sievers; updated tests. Take into account canvas scale when computing image resampling mode. When drawing a bitmap and computing the best resampling mode based on the requested scale, take into account CSS scale and page scale that are applied to the canvas. This allows for single-pass scaling in potentially better quality (RESAMPLE_AWESOME) and also takes better advantage of the scaled image cache in that codepath. Existing tests updated to expect different resampling method (and therefore a different image) whenever canvas scaling changes. * platform/graphics/skia/ImageSkia.cpp: (WebCore::paintSkBitmap): 2012-06-28 James Robinson <jamesr@chromium.org> [chromium] Should schedule a commit when dropping contents textures https://bugs.webkit.org/show_bug.cgi?id=90031 Reviewed by Adrienne Walker. If we're dropping contents textures on the impl thread, we need to schedule a commit to pick up new contents at the next commit opportunity. Also adds some traces to make debugging issues like this easier. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::processScheduledActions): 2012-06-28 Antti Koivisto <antti@apple.com> Don't malloc RenderGeometryMap steps individually https://bugs.webkit.org/show_bug.cgi?id=90074 Reviewed by Simon Fraser. Mallocs and frees for steps under RenderGeometryMap::pus/popMappingsToAncestor can total ~2% of the profile when animating transforms. * rendering/RenderGeometryMap.cpp: (WebCore): (WebCore::RenderGeometryMap::absolutePoint): (WebCore::RenderGeometryMap::absoluteRect): (WebCore::RenderGeometryMap::mapToAbsolute): (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): (WebCore::RenderGeometryMap::popMappingsToAncestor): * rendering/RenderGeometryMap.h: (WebCore): (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): Move to header. (RenderGeometryMapStep): (RenderGeometryMap): Make the step vector hold RenderGeometryMapSteps instead of RenderGeometryMapStep*'s. (WTF): Give RenderGeometryMapSteps SimpleClassVectorTraits. This is needed for dealing with OwnPtr in the struct (and makes it faster too). The type is simple enought to move by memcpy. 2012-06-28 Kalev Lember <kalevlember@gmail.com> [GTK] Remove Windows support from plugins/gtk/ https://bugs.webkit.org/show_bug.cgi?id=89501 Reviewed by Martin Robinson. The GTK+ port now uses plugins/gtk/ on Windows, which leaves PluginPackageGtk.cpp and PluginViewGtk.cpp solely for XP_UNIX platforms. * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::fetchInfo): (WebCore::webkitgtkXError): (WebCore::PluginPackage::load): * plugins/gtk/PluginViewGtk.cpp: (WebCore::getRootWindow): (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paint): (WebCore::PluginView::handleKeyboardEvent): (WebCore::setXCrossingEventSpecificFields): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::handleFocusOutEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): (WebCore::getPluginDisplay): (WebCore::getVisualAndColormap): (WebCore::PluginView::platformStart): (WebCore::PluginView::platformDestroy): 2012-06-28 Simon Fraser <simon.fraser@apple.com> Change FrameView::scrollContentsFastPath to use m_fixedObjects https://bugs.webkit.org/show_bug.cgi?id=90045 Reviewed by James Robinson. FrameView now has a hash set of fixed-position objects, so use that instead of RenderBlock::positionedObjects(); we'll avoid traversing through absolutely positioned objects, and this will work better for sticky positioning in future. No behavior change, so no new tests. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): 2012-06-28 Tony Chang <tony@chromium.org> Split flex into flex-grow/flex-shrink/flex-basis https://bugs.webkit.org/show_bug.cgi?id=86525 Reviewed by Ojan Vafai. Split flex into 3 separate properties per the spec: http://dev.w3.org/csswg/css3-flexbox/#flex-components Tests: css3/flexbox/flex-longhand-parsing.html css3/flexbox/flex-property-parsing.html: Updated test results. * css/CSSComputedStyleDeclaration.cpp: (WebCore): -webkit-flex is no longer enumerable. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Fix indent. (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none. (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink, preferred size -> basis) and assign to longhand properties. * css/CSSParser.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Add new properties. * css/CSSPropertyNames.in: Add new properties. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): Add new shorthand. (WebCore::StylePropertySet::asText): * css/StylePropertyShorthand.cpp: (WebCore::webkitFlexShorthand): Add new shorthand. (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder. Handle initial and inherit for flex. 2012-06-28 Kalev Lember <kalevlember@gmail.com> [GTK][Win]: Fix plugin drawing to an offscreen buffer https://bugs.webkit.org/show_bug.cgi?id=89499 Reviewed by Brent Fulgham. Take into account that the GTK+ port draws to a backing store and adjust the target rectangle calculation accordingly. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::paint): (WebCore::PluginView::setNPWindowRect): 2012-06-28 Kentaro Hara <haraken@chromium.org> Optimize Dromaeo/dom-attr.html by speeding up Element::getAttribute() https://bugs.webkit.org/show_bug.cgi?id=90174 Reviewed by Adam Barth. This patch improves performance of Dromaeo/dom-attr.html by 4.0%. The patch improves performance of getAttribute() and JavaScript property setter for DOM objects (e.g. 'div.foo = 123'). The performance improvement becomes larger, as the number of attributes defined on the DOM object increases. Without the patch in Chromium/Linux (runs/s) 7679.4, 7739.7, 7634.0, 7726.4, 7663.9 With the patch in Chromium/Linux (runs/s) 7977.7, 8032.2, 8112.8, 7948.1, 7924.5 This patch just changes a type of 'name' of Element::getAttribute(String& name) from String& to AtomicString&. The key observation is that AtomicString(String& x) is faster than operator==(String& x, AtomicString& y). AtomicString(String& x) calculates a hash of a given String and adds it to a hash table. The calculation complexity is O(the length of x). On the other hand, operator==(String& x, AtomicString& y) compares a String and an AtomicString by StringImpl::equal(StringImpl*, StringImpl*), the calculation complexity of which is O(2 * min(the length of x, the length of y)). In addition, the comparison logic is more complicated than the logic of calculating the hash. Consequently, AtomicString(String& x) is faster than operator==(String& x, AtomicString& y). Keeping that in mind, let's estimate the performance of Element::getAttribute("class") for <div id="A" lang="B" title="C" class="D" dir="E">. Here "id", "lang", "title", "class" and "dir" are stored as AtomicStrings in QualifiedName::localName(). Initially, "class" in Element::getAttribute("class") is a String. If we use Element::getAttribute(String& name) (i.e. without the patch), ElementAttributeData::getAttributeItemIndex() executes four operator==(String&, AtomicString&) by the time it finds the "class" attribute: (1) if ("class" == "id") // operator==(String&, AtomicString&) (2) if ("class" == "lang") // operator==(String&, AtomicString&) (3) if ("class" == "title") // operator==(String&, AtomicString&) (4) if ("class" == "class") // operator==(String&, AtomicString&) On the other hand, if we use Element::getAttribute(AtomicString& name) (i.e. with the patch), ElementAttributeData::getAttributeItemIndex() executes one AtomicString(String&) and four operator==(AtomicString&, AtomicString&) by the time it finds the "class" attribute: (1) AtomicString("class") // AtomicString(String&) (2) if ("class" == "id") // operator==(AtomicString&, AtomicString&) (3) if ("class" == "lang") // operator==(AtomicString&, AtomicString&) (4) if ("class" == "title") // operator==(AtomicString&, AtomicString&) (5) if ("class" == "class") // operator==(AtomicString&, AtomicString&) Considering that the overhead of operator==(AtomicString&, AtomicString&) is close to 0 since it is just a pointer comparison, the latter approach is faster than the former approach. Performance improvement will be large for elements that have multiple attributes, but it is faster even for elements that have only one attribute. For exmaple, Dromaeo/dom-attr.html tests getAttribute() for an element that has only one attribute, the result shows 4.0% improvement. Another example optimized by this patch is 'div.foo = 123', where foo is not an attribute of div. In this case, before 123 is set, JavaScript calls back Element::getAttribute() to check whether 'foo' is defined on div by scanning all the attributes of div. No tests. No change in behavior. * dom/Element.cpp: (WebCore::Element::getAttribute): * dom/Element.h: (Element): (WebCore::Element::getAttributeItemIndex): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): * dom/ElementAttributeData.h: (ElementAttributeData): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): 2012-06-28 Hans Wennborg <hans@chromium.org> Speech JavaScript API: Don't dispatch end event after ActiveDOMObject::stop() https://bugs.webkit.org/show_bug.cgi?id=90176 Reviewed by Adam Barth. It is probably not safe to dispatch an event on an object that has been ActiveDOMObject::stop()'ed. This used to happen in the navigate-away.html test, which I believe then caused speechgrammar-basics.html (which was typically run afterwards, by the same worker), to crash flakily. See Bug 89717. Test: speechgrammar-basics.html should no longer be flaky. * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::didEnd): (WebCore::SpeechRecognition::stop): (WebCore::SpeechRecognition::SpeechRecognition): * Modules/speech/SpeechRecognition.h: 2012-06-28 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [GTK] [WK2] Memory leak in ResourceHandleSoup.cpp https://bugs.webkit.org/show_bug.cgi?id=90168 Reviewed by Martin Robinson. Fixed a memory leak in WebCoreSynchronousLoader by using adoptGRef instead of just getting new reference of GMainLoop. No new tests. No change in behavior. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): 2012-06-27 Dana Jansens <danakj@chromium.org> [chromium] Do not multiply bounds by contentsScale in TiledLayerChromium and CanvasLayerTextureUpdater https://bugs.webkit.org/show_bug.cgi?id=90103 Reviewed by Adrienne Walker. Non-integer scale factors can scale the bounds of a layer such that different rounding is applied to the width and height in the content bounds. We should never multiply bounds by contentsScale in order to work correctly with non-integer scale factors. Instead, always use the contentBounds/bounds ratio for width and height independently. Tests: TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringPaint TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringInvalidation * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: (CanvasLayerTextureUpdater): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::updatePart): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: (SkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setNeedsDisplayRect): (WebCore::TiledLayerChromium::updateTiles): 2012-06-28 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> [Qt] Make GC's fill{Rounded}Rect use optimized shadow blur code https://bugs.webkit.org/show_bug.cgi?id=90082 Reviewed by Noam Rosenthal. ShadowBlur::drawRectShadow makes use of optimized tiles-based drawPattern, which is not present when using {begin/end}shadowLayer. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::pushTransparencyLayerInternal): 2012-06-28 Rahul Tiwari <rahultiwari.cse.iitr@gmail.com> Web Inspector: Provide context menu 'Delete all watch expressions.' https://bugs.webkit.org/show_bug.cgi?id=89735 Reviewed by Yury Semikhatsky. Added context menu delete and delete all watch expressions. No new tests required as its a minor UI related change. * English.lproj/localizedStrings.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.updateExpression): (WebInspector.WatchExpressionsSection.prototype._deleteAllExpressions): (WebInspector.WatchExpressionsSection.prototype.findAddedTreeElement): (WebInspector.WatchExpressionTreeElement.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype._contextMenu): (WebInspector.WatchExpressionTreeElement.prototype._deleteAllButtonClicked): 2012-06-28 Christophe Dumez <christophe.dumez@intel.com> m_cssVariablesEnabled member is not initialized in Page Settings https://bugs.webkit.org/show_bug.cgi?id=90147 Reviewed by Simon Hausmann. Properly initialize the m_cssVariablesEnabled member in Page Settings. No new tests, no behavior change. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-06-28 Balazs Kelemen <kbalazs@webkit.org> [Qt] plugin is loaded to the web process via MainResourceLoader::substituteMIMETypeFromPluginDatabase https://bugs.webkit.org/show_bug.cgi?id=86489 Reviewed by Simon Hausmann. Removed the substituteMIMETypeFromPluginDatabase quirk from MainResourceLoader. It would be possible to fix it in a way that is compatible with WebKit2, but given that it was a Qt only fix, and that it's not clear that we still need it, and it's not even work currently, I decided to remove it. At least it is -1 platform ifdef in common code. Just removed a non-tested quirk, no test needed. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didReceiveResponse): 2012-06-28 Kentaro Hara <haraken@chromium.org> [V8] Optimize Integer::New() by caching persistent handles for small integers https://bugs.webkit.org/show_bug.cgi?id=90043 Reviewed by Adam Barth. The patch improves performance of Dromaeo/dom-query.html by 3.6%, and Bindings/scroll-top.html by 17.3%. The performance results in my Chromium/Linux: [Dromaeo/dom-query.html] 796310.4 runs/s => 824745.4 runs/s (+3.6%) [Bindings/scroll-top.html] 204.68 runs/s => 240.15 runs/s (+17.3%) This patch introduces V8BindingPerIsolateData::IntegerCache (just like V8BindingPerIsolateData::StringCache) to cache persistent handles for small integers. No new tests. No change in behavior. * bindings/v8/V8Binding.h: Implemented v8Integer() and v8UnsignedInteger(), which returns cached persistent handles for integers smaller than 64. (WebCore): (IntegerCache): (WebCore::IntegerCache::IntegerCache): (WebCore::IntegerCache::v8Integer): (WebCore::IntegerCache::v8UnsignedInteger): (WebCore::V8BindingPerIsolateData::integerCache): (V8BindingPerIsolateData): (WebCore::v8Integer): (WebCore::v8UnsignedInteger): * bindings/v8/V8Binding.cpp: (WebCore): (WebCore::IntegerCache::createSmallIntegers): * bindings/v8/WorkerScriptController.cpp: (~WorkerScriptController): ~V8BindingPerIsolateData() should be called before isolate->Exit(), since ~V8BindingPerIsolateData() calls V8 APIs that requires the current isolate. * bindings/scripts/CodeGeneratorV8.pm: Replaced Integer::New() and Integer::NewFromUnsigned() with v8Integer() and v8UnsignedInteger(). (GenerateNormalAttrGetter): (NativeToJSValue): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results. (WebCore::TestActiveDOMObjectV8Internal::excitingAttrAttrGetter): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjV8Internal::readOnlyIntAttrAttrGetter): (WebCore::TestObjV8Internal::shortAttrAttrGetter): (WebCore::TestObjV8Internal::unsignedShortAttrAttrGetter): (WebCore::TestObjV8Internal::intAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter): (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter): (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrGetter): (WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetter): (WebCore::TestObjV8Internal::conditionalAttr1AttrGetter): (WebCore::TestObjV8Internal::conditionalAttr2AttrGetter): (WebCore::TestObjV8Internal::conditionalAttr3AttrGetter): (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter): (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter): (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrGetter): (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrGetter): (WebCore::TestObjV8Internal::strawberryAttrGetter): (WebCore::TestObjV8Internal::descriptionAttrGetter): (WebCore::TestObjV8Internal::idAttrGetter): (WebCore::TestObjV8Internal::intMethodCallback): (WebCore::TestObjV8Internal::intMethodWithArgsCallback): (WebCore::TestObjV8Internal::classMethodWithOptionalCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: Ditto. (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter): 2012-06-28 Kent Tamura <tkent@chromium.org> Classify form control states by their owner forms https://bugs.webkit.org/show_bug.cgi?id=89950 Reviewed by Hajime Morita. To improve robustness of the form state restore feature, we classify form control states by their owner forms. Owner forms are identified by their action URLs and index numbers in forms with the same action URLs. Implementation approach: Extend FormElementKey class to have "formKey" string, which is a combination of the action URL and an index number, or a fixed string for no form owner. FormKeyGenerator class is responsible to generate the "formKey" strings Test: fast/forms/state-restore-per-form.html * html/FormController.cpp: (FormKeyGenerator): (WebCore::FormKeyGenerator::create): A factory function. (WebCore::FormKeyGenerator::FormKeyGenerator): A private constructor. (WebCore::createKey): A helper for formKey(). This makes strings like "<action URL> #<index>". (WebCore::FormKeyGenerator::formKey): Returns a formKey for the specified HTMLFormElement*. (WebCore::FormKeyGenerator::willDeleteForm): Unregister HTMLFormElement*. This function is necessary because form restore feature works during parsing and a script might delete form elements. (WebCore::formStateSignature): Bump the version. (WebCore::FormController::formElementsState): Records a formKey string for each of control state. (WebCore::FormController::setStateForNewFormElements): Loads formKeys from stateVector, and uses them for FormElementKey. (WebCore::FormController::takeStateForFormElement): - Construct and destruct FormKeyGenerator if needed. - Passing a formKey for the specified form control to FormElementKey. (WebCore::FormController::willDeleteForm): Delegate to FormKeyGenerator::willDeleteForm. (WebCore::FormElementKey::FormElementKey): Add formKey argument and member. (WebCore::FormElementKey::operator=): ditto. (WebCore::FormElementKey::ref): ditto. (WebCore::FormElementKey::deref): ditto. * html/FormController.h: (FormElementKey): Add formKey argument and member. (FormController): Add a FormKeyGenerator member which is used during restoring. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement): Notify the death to FormController. 2012-06-28 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121395. http://trac.webkit.org/changeset/121395 https://bugs.webkit.org/show_bug.cgi?id=90143 Patch causes crashes in fast/workers/worker-context-gc.html (Requested by zdobersek on #webkit). * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: (DedicatedWorkerThread): * workers/DefaultSharedWorkerRepository.cpp: (SharedWorkerProxy): (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded): * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: (SharedWorkerThread): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WorkerThreadStartupData): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): * workers/WorkerThread.h: (WorkerThread): 2012-06-28 Yoshifumi Inoue <yosin@chromium.org> [Platform] Implement functions for localized time format information https://bugs.webkit.org/show_bug.cgi?id=89965 Reviewed by Kent Tamura. This patch introduces three functions for time format: 1. localizedTimeFormatText() 2. localizedShortTimeFormatText() 2. timeAMPMLabels() for input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true. Having both localizedTimeFormat and localizedShortTimeFormat is for displaying only two fields hour and minute when step >= 60. There is no way to remove second field from "h:m:s" pattern string. We don't know whether ":" after "m" belongs minute or second field. Test: WebKit/chromium/tests/LocalizedDateICUTest.cpp * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::LocaleICU): (WebCore::createFallbackAMPMLabels): Added. (WebCore::LocaleICU::initializeDateTimeFormat): Added. (WebCore::LocaleICU::localizedTimeFormatText): Added. (WebCore::LocaleICU::localizedShortTimeFormatText): Added. (WebCore::LocaleICU::timeAMPMLabels): Added. * platform/text/LocaleICU.h: (LocaleICU): * platform/text/LocalizedDate.h: * platform/text/LocalizedDateICU.cpp: (WebCore::localizedTimeFormatText): Added. (WebCore::localizedShortTimeFormatText): Added. (WebCore::timeAMPMLabels): Added. 2012-06-27 Kentaro Hara <haraken@chromium.org> Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document https://bugs.webkit.org/show_bug.cgi?id=90059 Reviewed by Ryosuke Niwa. This patch improves performance of document.getElementsBy*(). e.g. the patch makes Dromaeo/dom-query.html 5.4% faster. Dromaeo/dom-query.html without the patch (Chromium/Linux): 784714 runs/s, 765947 runs/s, 803109 runs/s, 804450 runs/s Dromaeo/dom-query.html with the patch (Chromium/Linux): 839245 runs/s, 829867 runs/s, 811032 runs/s, 847486 runs/s Based on the assumption that document.getElementsByClassName(), document.getElementsByTagName() and document.getElementsByName() would be used frequently in the real world, this patch implements a fast path for Document methods that require to access NodeRareData. Specifically, this patch caches a pointer to NodeRareData on Document, by which Document can access NodeRareData without looking up a HashMap. The only performance concern is the overhead of the isDocumentNode() check that this patch added to Node::ensureRareData. However, I could not observe any performance regression caused by the overhead. No tests. No change in behavior. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setCachedRareData): I didn't inline this method, since the inlining slightly regressed performance for some reason. (WebCore): * dom/Document.h: (WebCore): (WebCore::Document::cachedRareData): (Document): (~Document): Moved 'm_document = 0' to the tail of the destructor, since isDocumentNode() has to return true in clearRareData() that is called in ~Document(). * dom/Node.cpp: (WebCore::Node::ensureRareData): (~Node): Moved the assertion into clearRareData(). 2012-06-27 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] 0-length response with no content-type shouldn't download https://bugs.webkit.org/show_bug.cgi?id=89860 Reviewed by Rob Buis. RIM PR# 168419 For 0-length response, if we can't get its mimetype from the filename, we set the mimetype to "text/plain" instead of "application/octet-stream", so it won't go to download. Reviewed internally by Charles Wei. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendResponseIfNeeded): 2012-06-27 Yoshifumi Inoue <yosin@chromium.org> [Platform] Implement localizedDecimalSeparator function https://bugs.webkit.org/show_bug.cgi?id=90036 Reviewed by Kent Tamura. This patch introduces new function localizedDecimalSeparator() when ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS). It will be used for displaying millisecond for time fields UI. Test: WebKit/chromium/tests/LocalizedNumberICUTest.cpp * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::localizedDecimalSeparator): Added * platform/text/LocaleICU.h: (LocaleICU): Added localizedDecimalSeparator. * platform/text/LocalizedNumber.h: * platform/text/LocalizedNumberICU.cpp: (WebCore::localizedDecimalSeparator): Added. * platform/text/LocalizedNumberNone.cpp: (WebCore::localizedDecimalSeparator): Added. * platform/text/mac/LocalizedNumberMac.mm: (WebCore::localizedDecimalSeparator): Added. 2012-06-27 Lu Guanqun <guanqun.lu@intel.com> Add OVERRIDE to functions in UnthrottledTextureUploader class https://bugs.webkit.org/show_bug.cgi?id=90130 Reviewed by James Robinson. No new tests required. * platform/graphics/chromium/LayerRendererChromium.cpp: 2012-06-27 Pablo Flouret <pablof@motorola.com> pattern="" should only accept the empty string https://bugs.webkit.org/show_bug.cgi?id=89569 Reviewed by Kent Tamura. An empty pattern attribute was being treated essentially as if the pattern wasn't present. No new tests. Covered by existing tests (plus a modified one). * html/BaseTextInputType.cpp: (WebCore::BaseTextInputType::patternMismatch): Check if the pattern attribute is present. If it is then use the pattern as is (in the particular case of this bug, an empty pattern will only match an empty value). 2012-06-27 James Robinson <jamesr@chromium.org> [chromium] Use SkColor in compositor internals https://bugs.webkit.org/show_bug.cgi?id=90108 Reviewed by Adrienne Walker. As the title says, cutting dependencies. If we support color spaces in the compositor we will probably need to use a more sophisticated type, but for our current use SkColor is sufficient and matches our API better. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setBackgroundColor): (WebCore::LayerChromium::setDebugBorderColor): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::backgroundColor): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: (WebCore::CCDebugBorderDrawQuad::create): (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: (CCDebugBorderDrawQuad): (WebCore::CCDebugBorderDrawQuad::color): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::setBackgroundColor): (WebCore::CCLayerImpl::setDebugBorderColor): (WebCore::CCLayerImpl::hasDebugBorders): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::backgroundColor): (WebCore::CCLayerImpl::debugBorderColor): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setBackgroundColor): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::backgroundColor): (WebCore::CCLayerTreeHostImpl::setBackgroundColor): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::appendQuadInternal): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): (CCRenderPass): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: (WebCore::CCSolidColorDrawQuad::create): (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: (CCSolidColorDrawQuad): (WebCore::CCSolidColorDrawQuad::color): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2012-06-27 Charles Wei <charles.wei@torchmobile.com.cn> IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath https://bugs.webkit.org/show_bug.cgi?id=88338 Reviewed by David Levin. If the indexedDB runs in main thread it can access the GroupSettings via the document; otherwise, we need to pass the page GroupSettings to the worker thread so that accessible to the indexedDB running in WorkerContext. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): * workers/DedicatedWorkerThread.cpp: (WebCore::DedicatedWorkerThread::create): (WebCore::DedicatedWorkerThread::DedicatedWorkerThread): * workers/DedicatedWorkerThread.h: (DedicatedWorkerThread): * workers/DefaultSharedWorkerRepository.cpp: (SharedWorkerProxy): (WebCore::SharedWorkerProxy::groupSettings): (WebCore): (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded): * workers/SharedWorkerThread.cpp: (WebCore::SharedWorkerThread::create): (WebCore::SharedWorkerThread::SharedWorkerThread): * workers/SharedWorkerThread.h: (SharedWorkerThread): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): (WorkerThreadStartupData): (WebCore::WorkerThreadStartupData::WorkerThreadStartupData): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::groupSettings): (WebCore): * workers/WorkerThread.h: (WorkerThread): 2012-06-27 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121359. http://trac.webkit.org/changeset/121359 https://bugs.webkit.org/show_bug.cgi?id=90115 Broke many inspector tests (Requested by jpfau on #webkit). * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-06-27 Alexis Menard <alexis.menard@openbossa.org> Implement selectedOptions attribute of HTMLSelectElement. https://bugs.webkit.org/show_bug.cgi?id=80631 Reviewed by Ryosuke Niwa. Add a new collection as a member of HTMLSelectElement which is used to store the selected elements. Extend HTMLCollection to support the new collection type needed by this feature. Make sure that we invalidate the collection when the select state of an option changes as the select state change does not trigger a dom tree version change. Reference : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-select-selectedoptions Test: fast/dom/HTMLSelectElement/select-selectedOptions.html * html/CollectionType.h: * html/HTMLCollection.cpp: (WebCore::shouldIncludeChildren): (WebCore::HTMLCollection::clearCache): (WebCore): (WebCore::HTMLCollection::isAcceptableElement): * html/HTMLCollection.h: (HTMLCollection): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setSelectedState): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectedOptions): (WebCore): (WebCore::HTMLSelectElement::invalidateSelectedItems): (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLSelectElement.h: (WebCore): (HTMLSelectElement): * html/HTMLSelectElement.idl: 2012-06-27 Daniel Cheng <dcheng@chromium.org> Fix crash in Frame::nodeImage. https://bugs.webkit.org/show_bug.cgi?id=89911 Reviewed by Abhishek Arya. We were caching a pointer to a RenderObject and then calling updateLayout(). Instead, we need to get a pointer to the RenderObject again after updateLayout(). Test: fast/events/drag-display-none-element.html * page/Frame.cpp: (WebCore::Frame::nodeImage): * page/mac/FrameMac.mm: (WebCore::Frame::snapshotDragImage): (WebCore::Frame::nodeImage): 2012-06-27 Tony Chang <tony@chromium.org> Unreviewed, rolling out r121380. http://trac.webkit.org/changeset/121380 https://bugs.webkit.org/show_bug.cgi?id=86525 Hits an ASSERT in debug. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFlex): * css/CSSParser.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (ApplyPropertyFlex): (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): (WebCore::ApplyPropertyFlex::createHandler): (WebCore::ApplyPropertyFlex::getFlexValue): (WebCore): (WebCore::StyleBuilder::StyleBuilder): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::asText): * css/StylePropertyShorthand.cpp: (WebCore::webkitFlexFlowShorthand): (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: (WebCore): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-27 Rakesh KN <rakesh.kn@motorola.com> HTMLFieldSetElement::m_documentVersion is not initialized https://bugs.webkit.org/show_bug.cgi?id=90038 Reviewed by Kent Tamura. Initialised m_documentVersion member as HTMLFieldSetElement::elements can return an wrong collection. Covered by existing tests. * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::HTMLFieldSetElement): Initialised m_documentVersion. 2012-06-25 Mark Hahnenberg <mhahnenberg@apple.com> JSLock should be per-JSGlobalData https://bugs.webkit.org/show_bug.cgi?id=89123 Reviewed by Geoffrey Garen. No new tests. Current regression tests are sufficient. Changed all sites that used JSLock to instead use the new JSLockHolder and pass in the correct JS context that the code is about to interact with that needs protection. Also added a couple JSLocks to places that didn't already have it that needed it. * bindings/js/GCController.cpp: (WebCore::collect): (WebCore::GCController::garbageCollectSoon): (WebCore::GCController::garbageCollectNow): (WebCore::GCController::discardAllCompiledCode): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::nodeAsScriptValue): (WebCore::JSInjectedScriptHost::inspectedObject): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::canAccessInspectedWindow): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: (WebCore::JSRequestAnimationFrameCallback::handleEvent): * bindings/js/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::evaluate): * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::recompileAllJSFunctions): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): (WebCore::ScriptCachedFrameData::restore): (WebCore::ScriptCachedFrameData::clear): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): (WebCore::ScriptController::clearWindowShell): (WebCore::ScriptController::initScript): (WebCore::ScriptController::updateDocument): (WebCore::ScriptController::cacheableBindingRootObject): (WebCore::ScriptController::bindingRootObject): (WebCore::ScriptController::windowScriptNPObject): (WebCore::ScriptController::jsObjectForPluginElement): (WebCore::ScriptController::clearScriptObjects): * bindings/js/ScriptControllerMac.mm: (WebCore::ScriptController::windowScriptObject): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): (WebCore::eventListenerHandlerLocation): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptCallArgumentHandler::appendArgument): (WebCore::ScriptFunctionCall::call): (WebCore::ScriptFunctionCall::construct): (WebCore::ScriptCallback::call): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): (WebCore::ScriptGlobalObject::get): (WebCore::ScriptGlobalObject::remove): * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::getString): (WebCore::ScriptValue::toInspectorValue): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): (WebCore::WorkerScriptController::initScript): (WebCore::WorkerScriptController::evaluate): (WebCore::WorkerScriptController::disableEval): * bindings/objc/WebScriptObject.mm: (_didExecute): (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): (-[WebScriptObject hasWebScriptKey:]): (-[WebScriptObject stringRepresentation]): (-[WebScriptObject webScriptValueAtIndex:]): (-[WebScriptObject setWebScriptValueAtIndex:value:]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithNoParam): (WebCore::JSTestCallback::callbackWithClass1Param): (WebCore::JSTestCallback::callbackWithClass2Param): (WebCore::JSTestCallback::callbackWithStringList): (WebCore::JSTestCallback::callbackWithBoolean): (WebCore::JSTestCallback::callbackRequiresThisToPass): * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::~CClass): (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::getPropertyNames): * bridge/c/c_runtime.cpp: (JSC::Bindings::CField::valueFromInstance): (JSC::Bindings::CField::setValueToInstance): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): (JSC::Bindings::convertNPVariantToValue): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::getSlot): (JavaJSObject::setSlot): (JavaJSObject::toString): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): (JavaClass::~JavaClass): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::stringValue): * bridge/jni/jsc/JavaMethodJSC.cpp: (appendClassName): (JavaMethod::signature): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaString::JavaString): (JSC::Bindings::JavaString::~JavaString): (JSC::Bindings::JavaString::utf8): (JSC::Bindings::JavaString::init): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::createRuntimeObject): (JSC::Bindings::Instance::newRuntimeObject): * bridge/objc/objc_instance.mm: (ObjcInstance::moveGlobalExceptionToExecState): (ObjcInstance::invokeObjcMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::ObjcField::setValueToInstance): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): (JSC::Bindings::convertNSStringToString): (JSC::Bindings::convertObjcValueToValue): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getQtInstance): (JSC::Bindings::QtInstance::newRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::gcProtect): (JSC::Bindings::RootObject::gcUnprotect): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): * plugins/PluginView.cpp: (WebCore::PluginView::start): (WebCore::PluginView::stop): (WebCore::PluginView::performRequest): (WebCore::PluginView::npObject): (WebCore::PluginView::privateBrowsingStateChanged): * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): (WebCore::PluginView::getWindowInfo): * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::dispatchNPEvent): * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/mac/PluginViewMac.mm: (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::dispatchNPEvent): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowRect): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): 2012-06-27 Tony Chang <tony@chromium.org> Split flex into flex-grow/flex-shrink/flex-basis https://bugs.webkit.org/show_bug.cgi?id=86525 Reviewed by Ojan Vafai. Split flex into 3 separate properties per the spec: http://dev.w3.org/csswg/css3-flexbox/#flex-components Tests: css3/flexbox/flex-longhand-parsing.html css3/flexbox/flex-property-parsing.html: Updated test results. * css/CSSComputedStyleDeclaration.cpp: (WebCore): -webkit-flex is no longer enumerable. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Fix indent. (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none. (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink, preferred size -> basis) and assign to longhand properties. * css/CSSParser.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Add new properties. * css/CSSPropertyNames.in: Add new properties. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): Add new shorthand. (WebCore::StylePropertySet::asText): * css/StylePropertyShorthand.cpp: (WebCore::webkitFlexShorthand): Add new shorthand. (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder. 2012-06-27 Kentaro Hara <haraken@chromium.org> Make Element::elementRareData() and Element::ensureElementRareData() private https://bugs.webkit.org/show_bug.cgi?id=90060 Reviewed by Andreas Kling. This is a simple refactoring. Element::elementRareData() and Element::ensureElementRareData() can be private methods. No tests. No change in behavior. * dom/Element.h: (Element): 2012-06-27 James Robinson <jamesr@chromium.org> [chromium] Delete unused includes and forward declarations from compositor code https://bugs.webkit.org/show_bug.cgi?id=90102 Reviewed by Adrienne Walker. * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/ShaderChromium.h: * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: 2012-06-27 Alec Flett <alecflett@chromium.org> IndexedDB: make IDBKey immutable https://bugs.webkit.org/show_bug.cgi?id=90016 Reviewed by Tony Chang. Make all members of IDBKey const, so that this can be considered an immutable, and thus safe to copy and/or stop ref-counting. No new tests, existing tests show this works. * Modules/indexeddb/IDBKey.cpp: (WebCore::IDBKey::compare): * Modules/indexeddb/IDBKey.h: (WebCore::IDBKey::createInvalid): (WebCore::IDBKey::createNumber): (WebCore::IDBKey::createString): (WebCore::IDBKey::createDate): (WebCore::IDBKey::createMultiEntryArray): (WebCore::IDBKey::createArray): (WebCore::IDBKey::date): (WebCore::IDBKey::IDBKey): (IDBKey): 2012-06-27 Erik Arvidsson <arv@chromium.org> [V8] Improve variable resolution order on window https://bugs.webkit.org/show_bug.cgi?id=84247 Reviewed by Ojan Vafai. This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior. This is the second (third?) try. Last time there was a bug in the V8 code related to the split window. I added a test that tests the failure that caused this to be rolled back last time. Tests: fast/dom/Window/es52-globals.html fast/dom/Window/window-property-shadowing-onclick.html * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): 2012-06-27 James Robinson <jamesr@chromium.org> [chromium] Use categorized TRACE_EVENTN() macros in compositor code https://bugs.webkit.org/show_bug.cgi?id=90100 Reviewed by Adrienne Walker. Specify the category in all traces in the compositor. Patch generated mostly by the sed command 's/TRACE_EVENT(\(.*\), this, 0)/TRACE_EVENT0("cc", \1)/'. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::finish): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tileCheckerboardProgram): (WebCore::LayerRendererChromium::solidColorProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderPassProgram): (WebCore::LayerRendererChromium::renderPassProgramAA): (WebCore::LayerRendererChromium::renderPassMaskProgram): (WebCore::LayerRendererChromium::renderPassMaskProgramAA): (WebCore::LayerRendererChromium::tileProgram): (WebCore::LayerRendererChromium::tileProgramOpaque): (WebCore::LayerRendererChromium::tileProgramAA): (WebCore::LayerRendererChromium::tileProgramSwizzle): (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque): (WebCore::LayerRendererChromium::tileProgramSwizzleAA): (WebCore::LayerRendererChromium::textureProgram): (WebCore::LayerRendererChromium::textureProgramFlip): (WebCore::LayerRendererChromium::textureIOSurfaceProgram): (WebCore::LayerRendererChromium::videoYUVProgram): (WebCore::LayerRendererChromium::videoStreamTextureProgram): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::drawPicture): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::evictTexture): * platform/graphics/chromium/cc/CCFrameRateController.cpp: (WebCore::CCFrameRateController::setActive): (WebCore::CCFrameRateController::onTimerTick): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::didLoseContext): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::~CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::initializeContext): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::setNeedsAnimate): (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::onSwapBuffersCompleteOnImplThread): (WebCore::CCThreadProxy::setNeedsCommitOnImplThread): (WebCore::CCThreadProxy::setNeedsForcedCommitOnImplThread): (WebCore::CCThreadProxy::postAnimationEventsToMainThreadOnImplThread): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::setNeedsRedrawOnImplThread): (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::finishAllRenderingOnImplThread): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread): (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): (WebCore::CCThreadProxy::scheduledActionCommit): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore::CCThreadProxy::acquireLayerTextures): (WebCore::CCThreadProxy::initializeImplOnImplThread): (WebCore::CCThreadProxy::initializeContextOnImplThread): (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): 2012-06-27 W. James MacLean <wjmaclean@chromium.org> [chromium] ScrollbarLayerChromium should support painting forward-track and back-track in different styles. https://bugs.webkit.org/show_bug.cgi?id=89908 Reviewed by Adrienne Walker. Test: platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html Adds support for accelerated drawing (impl thread) of scrollbars with different styles for the forward-track and back-track parts. * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (WebCore::ScrollbarBackgroundPainter::create): (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter): (ScrollbarBackgroundPainter): (WebCore::ScrollbarLayerChromium::setLayerTreeHost): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ScrollbarLayerChromium::update): * platform/graphics/chromium/ScrollbarLayerChromium.h: (ScrollbarLayerChromium): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl): (WebCore): (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (WebCore::CCScrollbarLayerImpl::setBackTrackTextureId): (WebCore::CCScrollbarLayerImpl::setForeTrackTextureId): (CCScrollbarLayerImpl): 2012-06-27 Ian Vollick <vollick@chromium.org> [chromium] Allow screen space rects and occluding rects to be visualized for debugging. https://bugs.webkit.org/show_bug.cgi?id=90012 Reviewed by Adrienne Walker. No new tests. No new functionality. * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): (WebCore::CCDebugRectHistory::saveScreenSpaceRects): (WebCore): (WebCore::CCDebugRectHistory::saveOccludingRects): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::CCOcclusionTrackerBase): (WebCore::addOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): (WebCore::CCOcclusionTrackerBase::setOccludingScreenSpaceRectsContainer): 2012-06-27 Anthony Scian <ascian@rim.com> Web Inspector [JSC]: Implement ScriptCallStack::stackTrace https://bugs.webkit.org/show_bug.cgi?id=40118 Reviewed by Yong Li. Implemented stub for createScriptCallStack to call into Interpreter and extract the current stack frames, iterate through the frames and create the return result required. No new tests, manually tested thrown exception and inspector tracebacks. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> Let Xcode have its own way. * WebCore.xcodeproj/project.pbxproj: 2012-06-27 Ryosuke Niwa <rniwa@webkit.org> REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines https://bugs.webkit.org/show_bug.cgi?id=49288 Reviewed by Tony Chang. The bug was caused by positionAvoidingPrecedingNodes getting out of a block when the insertion point is at a line break. It caused the subsequent code to be misinformed of the insertion position and ended up not pruning the extra line break. Fixed the bug by checking this special case and bailing out so that we don't crawl out of the enclosing block. It's similar to checks several lines below it. Test: editing/pasteboard/copy-paste-pre-line-content.html * editing/ReplaceSelectionCommand.cpp: (WebCore::positionAvoidingPrecedingNodes): 2012-06-27 Andrei Onea <onea@adobe.com> [CSSRegions]Change display values that allow regions https://bugs.webkit.org/show_bug.cgi?id=89759 Reviewed by Tony Chang. Allow only elements with display values of block, inline-block, table-cell, table-caption and list-item to become regions, as per CSSRegions spec: http://dev.w3.org/csswg/css3-regions . Also added test for checking whether regions are destroyed and/or created when changing display value. Test: fast/regions/region-element-display-change.html * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/style/RenderStyle.h: 2012-06-27 Mike Lawther <mikelawther@chromium.org> CSS3 calc: blending involving expressions https://bugs.webkit.org/show_bug.cgi?id=86160 Reviewed by Tony Chang. If either endpoint of a blend involves a calc expression, we create a new expression to perform the blend calculation. Test: css3/calc/transitions.html css3/calc/transitions-dependent.html * platform/Length.cpp: (WebCore): (WebCore::Length::blendCalculation): * platform/Length.h: (WebCore::Length::blend): (Length): 2012-06-27 Hans Muller <hmuller@adobe.com> Move CSSWrapShape style resolution from StyleResolver to StyleBuilder https://bugs.webkit.org/show_bug.cgi?id=89668 Reviewed by Andreas Kling. Moved the resolution of the shapeInside and shapeOutside CSS properties from the StyleResolver class to StyleBuilder. This is just refactoring in preparation for fixing https://bugs.webkit.org/show_bug.cgi?id=89670. No new tests were required. * css/StyleBuilder.cpp: (WebCore): (ApplyPropertyWrapShape): (WebCore::ApplyPropertyWrapShape::setValue): (WebCore::ApplyPropertyWrapShape::applyValue): (WebCore::ApplyPropertyWrapShape::createHandler): (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-27 Alexandru Chiculita <achicu@adobe.com> Blur filter causes issues when scrolling https://bugs.webkit.org/show_bug.cgi?id=89475 Reviewed by Simon Fraser. This patch disables the fast scrolling when there is a fixed postioned element that has a filter applied on its parent layer. Otherwise the scroll blitting will just copy the outsets of the blur effect. Test: css3/filters/blur-filter-page-scroll.html * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): 2012-06-27 Andreas Kling <kling@webkit.org> REGRESSION(r121296): New zero-size background tests asserting on Mac. <http://webkit.org/b/90071> Reviewed by Dan Bernstein. Remove ASSERT(patternTransform.isInvertible()) as this is now a valid scenario. * platform/graphics/cg/ImageCG.cpp: (WebCore::Image::drawPattern): 2012-06-27 Shinya Kawanaka <shinyak@chromium.org> HTMLStyleElement::removedFrom seems incorrect. https://bugs.webkit.org/show_bug.cgi?id=89986 Reviewed by Hajime Morita. This is a follow-up patch for Bug 88495. The Same bug as Bug 88495 seems to exist on HTMLStyleElement::removedFrom(). No new tests, hard to write a test case. * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::removedFrom): 2012-06-27 Mike Reed <reed@google.com> Cleanup scaling code in text-decorations for SVG InlineText. Use scale() instead of getCTM/normalizeTransform/setCTM to use more standard pattern for scaling, and to allow for these operations to be recorded and played back later (potentially with a different starting matrix). This effectively reverts change# 78704. https://bugs.webkit.org/show_bug.cgi?id=89888 Reviewed by Nikolas Zimmermann. No new tests. Current layouttests exercise this code path. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintDecorationWithStyle): (WebCore::SVGInlineTextBox::paintTextWithShadows): 2012-06-27 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> [Qt] Remove redundant NDEBUG definition Already handled in default_post.prf. Reviewed by Tor Arne Vestbø. * WebCore.pri: 2012-06-27 Alexander Pavlov <apavlov@chromium.org> Unexpected end of style sheet in @font-face rule discards it rather than closes all open constructs https://bugs.webkit.org/show_bug.cgi?id=89980 Reviewed by Antti Koivisto. Use the "closing_brace" at the end of font_face rather than the explicit "'}' maybe_space". Test: fast/css/font-face-unexpected-end.html * css/CSSGrammar.y: 2012-06-26 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Add missing heades to HEADERS For JavaScriptCore there aren't any Qt specific files, so we include all headers for easy editing in Qt Creator. Reviewed by Simon Hausmann. * Target.pri: 2012-06-27 Kentaro Hara <haraken@chromium.org> Rename Element::rareData() to Element::elementRareData(), and Element::ensureRareData() to Element::ensureElementRareData() https://bugs.webkit.org/show_bug.cgi?id=90050 Reviewed by Ryosuke Niwa. Element::rareData()/Element::ensureRareData() and Node::rareData()/Node::ensureRareData() are confusing. They are not virtual methods. For clarification, we can rename Element::rareData() to Element::elementRareData(), and Element::ensureRareData() to Element::ensureElementRareData(). c.f. SVGRareData uses SVGElement::rareSVGData() and SVGElement::ensureRareSVGData(). (We might want to rename them to SVGElement::svgRareData() and SVGElement::ensureSVGRareData() in a follow-up patch.) No tests. No change in behavior. * dom/Element.cpp: (WebCore::Element::~Element): (WebCore::Element::elementRareData): (WebCore::Element::ensureElementRareData): (WebCore::Element::attributes): (WebCore::Element::attach): (WebCore::Element::detach): (WebCore::Element::recalcStyle): (WebCore::Element::shadow): (WebCore::Element::ensureShadow): (WebCore::Element::shadowPseudoId): (WebCore::Element::setShadowPseudoId): (WebCore::Element::focus): (WebCore::Element::minimumSizeForResizing): (WebCore::Element::setMinimumSizeForResizing): (WebCore::Element::computedStyle): (WebCore::Element::setStyleAffectedByEmpty): (WebCore::Element::styleAffectedByEmpty): (WebCore::Element::cancelFocusAppearanceUpdate): (WebCore::Element::classList): (WebCore::Element::optionalClassList): (WebCore::Element::dataset): (WebCore::Element::containsFullScreenElement): (WebCore::Element::setContainsFullScreenElement): (WebCore::Element::hasNamedNodeMap): (WebCore::Element::ensureCachedHTMLCollection): (WebCore::Element::savedLayerScrollOffset): (WebCore::Element::setSavedLayerScrollOffset): * dom/Element.h: (Element): * html/LabelableElement.cpp: (WebCore::LabelableElement::labels): 2012-06-26 Dominic Cooney <dominicc@chromium.org> [Chromium] Remove unused build scripts and empty folders for JavaScriptCore w/ gyp https://bugs.webkit.org/show_bug.cgi?id=90029 * gyp: Removed empty dir. 2012-06-27 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121271. http://trac.webkit.org/changeset/121271 https://bugs.webkit.org/show_bug.cgi?id=90056 Broke a whole bunch of tests and also caused crashes in some tests (Requested by rniwa on #webkit). * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): 2012-06-27 Zan Dobersek <zandobersek@gmail.com> [Gtk] Add support for the Gamepad API https://bugs.webkit.org/show_bug.cgi?id=87503 Reviewed by Carlos Garcia Campos. Add support for the Gamepad feature on the GTK port. The support is available only on Linux, with each gamepad device being presented through a GamepadDeviceLinux object. The implementation of this class relies on the Linux kernel joystick API. Gamepad devices are recognized through the GamepadsGtk class, of which implementation is based on GUdev. This way devices are properly registered on connection as objects of the GamepadDeviceGtk class which inherits GamepadDeviceLinux. GamepadDeviceGtk reads the joystick data through GIO pollable streams and updates the device state accordingly. The GamepadsGtk object is then polled for gamepads data through the sampleGamepads method. No new tests - tests already exist but require additional testing infrastructure. * GNUmakefile.am: * GNUmakefile.list.am: * bindings/gobject/GNUmakefile.am: * bindings/js/JSDOMBinding.h: Add the jsArray method that operates on a Vector of floats. (WebCore): (WebCore::jsArray): * platform/gtk/GamepadsGtk.cpp: Added. (WebCore): (GamepadDeviceGtk): (WebCore::GamepadDeviceGtk::create): (WebCore::GamepadDeviceGtk::GamepadDeviceGtk): (WebCore::GamepadDeviceGtk::~GamepadDeviceGtk): (WebCore::GamepadDeviceGtk::readCallback): (GamepadsGtk): (WebCore::GamepadsGtk::GamepadsGtk): (WebCore::GamepadsGtk::~GamepadsGtk): (WebCore::GamepadsGtk::registerDevice): (WebCore::GamepadsGtk::unregisterDevice): (WebCore::GamepadsGtk::updateGamepadList): (WebCore::GamepadsGtk::onUEventCallback): (WebCore::GamepadsGtk::isGamepadDevice): (WebCore::sampleGamepads): * platform/linux/GamepadDeviceLinux.cpp: Added. (WebCore): (WebCore::GamepadDeviceLinux::GamepadDeviceLinux): (WebCore::GamepadDeviceLinux::~GamepadDeviceLinux): (WebCore::GamepadDeviceLinux::updateForEvent): (WebCore::GamepadDeviceLinux::normalizeAxisValue): (WebCore::GamepadDeviceLinux::normalizeButtonValue): * platform/linux/GamepadDeviceLinux.h: Added. (WebCore): (GamepadDeviceLinux): (WebCore::GamepadDeviceLinux::connected): (WebCore::GamepadDeviceLinux::id): (WebCore::GamepadDeviceLinux::timestamp): (WebCore::GamepadDeviceLinux::axesCount): (WebCore::GamepadDeviceLinux::axesData): (WebCore::GamepadDeviceLinux::buttonsCount): (WebCore::GamepadDeviceLinux::buttonsData): 2012-06-27 Kentaro Hara <haraken@chromium.org> Rename rareSVGData() to svgRareData() https://bugs.webkit.org/show_bug.cgi?id=90051 Reviewed by Nikolas Zimmermann. Since rareSVGData() returns SVGRareData, it would make sense to rename rareSVGData() to svgRareData(). Similarly, we can rename ensureRareSVGData() to ensureSVGRareData(), and hasRareSVGData() to hasSVGRareData(). c.f. bug 90050 is trying to introduce elementRareData() and ensureElementRareData(). No tests. No change in behavior. * WebCore.order: * dom/Node.h: (WebCore::Node::hasSVGRareData): (WebCore::Node::setHasSVGRareData): (WebCore::Node::clearHasSVGRareData): * svg/SVGElement.cpp: (WebCore::SVGElement::~SVGElement): (WebCore::SVGElement::willRecalcStyle): (WebCore::SVGElement::svgRareData): (WebCore::SVGElement::ensureSVGRareData): (WebCore::SVGElement::mapInstanceToElement): (WebCore::SVGElement::removeInstanceMapping): (WebCore::SVGElement::instancesForElement): (WebCore::SVGElement::setCursorElement): (WebCore::SVGElement::cursorElementRemoved): (WebCore::SVGElement::setCursorImageValue): (WebCore::SVGElement::cursorImageValueRemoved): (WebCore::SVGElement::correspondingElement): (WebCore::SVGElement::setCorrespondingElement): (WebCore::SVGElement::animatedSMILStyleProperties): (WebCore::SVGElement::ensureAnimatedSMILStyleProperties): (WebCore::SVGElement::setUseOverrideComputedStyle): (WebCore::SVGElement::computedStyle): * svg/SVGElement.h: (SVGElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::instanceUpdatesBlocked): (WebCore::SVGStyledElement::setInstanceUpdatesBlocked): (WebCore::SVGStyledElement::hasPendingResources): (WebCore::SVGStyledElement::setHasPendingResources): (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible): 2012-06-27 Kentaro Hara <haraken@chromium.org> LabelableElement.cpp should include not ElementRareData.h but NodeRareData.h https://bugs.webkit.org/show_bug.cgi?id=90047 Reviewed by Kent Tamura. This is a simple refactoring. What LabelableElement uses is not ElementRareData but NodeRareData. No tests. No change in behavior. * html/LabelableElement.cpp: 2012-06-27 Kentaro Hara <haraken@chromium.org> [V8] Refactor V8BindingPerIsolateData::current() and V8BindingPerIsolateData::get() https://bugs.webkit.org/show_bug.cgi?id=90044 Reviewed by Adam Barth. 'static_cast<V8BindingPerIsolateData*>(isolate->GetData())' is duplicated in V8BindingPerIsolateData::current() and V8BindingPerIsolateData::get(). This patch removes the duplication. No tests. No change in behavior. * bindings/v8/V8Binding.h: (WebCore::V8BindingPerIsolateData::current): 2012-06-26 Yoshifumi Inoue <yosin@chromium.org> [Platform] Change implementation of LocaleICU class to support more UDateFormat. https://bugs.webkit.org/show_bug.cgi?id=89967 Reviewed by Kent Tamura. This patch changes internal functions of LocaleICU class to process multiple ICU date time format handles in addition to short date time format handle. This patch is a part of implementing input type time. I'll add time format related ICU date time format handles. No new tests. This patch doesn't change behavior. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::initializeShortDateFormat): Changed to use openDateFormat(). (WebCore::LocaleICU::openDateFormat): Added for common usage of udt_open(). (WebCore::getDateFormatPattern): Added for common usage of udt_toPattern(). (WebCore::localizeFormat): Changed to take String parameter. (WebCore::LocaleICU::initializeLocalizedDateFormatText): Changed to use getDateFormatPattern. (WebCore::LocaleICU::createLabelVector): Changed to take UDateFormat parameter. (WebCore::LocaleICU::initializeCalendar): Changed for helper functions. * platform/text/LocaleICU.h: (LocaleICU): 2012-06-26 Luke Macpherson <macpherson@chromium.org> Return correct value for css variables enabled runtime flag. https://bugs.webkit.org/show_bug.cgi?id=90040 Reviewed by Dimitri Glazkov. Was always returning true for the runtime flag when the compile time flag was on. That was good for testing, but not so much for production. * page/Settings.h: (WebCore::Settings::cssVariablesEnabled): 2012-06-26 Xueqing Huang <huangxueqing@baidu.com> DragData::asFilenames should not push same file names to result in Windows. https://bugs.webkit.org/show_bug.cgi?id=79861 Reviewed by Alexey Proskuryakov. Test: platform/win/fast/forms/file/drag-and-drop-files.html * platform/win/DragDataWin.cpp: (WebCore::DragData::asFilenames): 2012-06-26 Geoffrey Garen <ggaren@apple.com> Reduced (but did not eliminate) use of "berzerker GC" https://bugs.webkit.org/show_bug.cgi?id=89237 Reviewed by Gavin Barraclough. (PART 2) Don't ASSERT that RootObject's destructor runs and invalidates all RuntimeObjects before their destructors run. We don't guarantee this behavior because some RuntimeObjects may already be garbage by the time RootObject's destructor runs, in which case RootObject's weak pointers will be NULL, and RootObject will not call invalidate() on them. It's been theoretically possible for this ASSERT to fire for a while now. This patch makes it fire all the time. Luckily, we only needed the behavior guarded by this ASSERT for WebKit1 in Safari on Windows (cf. https://bugs.webkit.org/show_bug.cgi?id=61317), to handle the way WebKit1 would unload plugin DLLs. If this ever becomes an issue again, we can fix it by (a) not unloading plugin DLLs, (b) migrating WebKit1 to the WebKit2 JS-plugin binding model, (c) making the Instance pointer in a RuntimeObject an indirect pointer through RootObject, or (c) giving RuntimeObject some sort of special way to access a zombie weak pointer. * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::destroy): ASSERT removed. Anders said so. 2012-06-26 Douglas Stockwell <dstockwell@chromium.org> REGRESSION(r107836): box shadow not drawn for opaque images with an opaque background https://bugs.webkit.org/show_bug.cgi?id=89958 Reviewed by Simon Fraser. Don't attempt to draw the box shadow as part of the background if the background is obscured. Test: fast/box-shadow/image-box-shadow.html * rendering/RenderImage.cpp: (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground): (WebCore): * rendering/RenderImage.h: (RenderImage): 2012-06-26 Nico Weber <thakis@chromium.org> Fix new Wunused-private-field violations that crept in https://bugs.webkit.org/show_bug.cgi?id=90032 Reviewed by Adam Barth. * page/Performance.h: (Performance): 2012-06-26 Gyuyoung Kim <gyuyoung.kim@samsung.com> Change return type in bandwidth attribute of network information API https://bugs.webkit.org/show_bug.cgi?id=89959 Reviewed by Adam Barth. According to network information API spec, bandwidth attribute should return double type. But, existing implementation has used *long* and *unsigned int* types. No new tests. Covered by existing tests. * Modules/networkinfo/NetworkInfo.cpp: (WebCore::NetworkInfo::NetworkInfo): * Modules/networkinfo/NetworkInfo.h: (WebCore::NetworkInfo::create): (WebCore::NetworkInfo::bandwidth): (NetworkInfo): * Modules/networkinfo/NetworkInfoClient.h: (NetworkInfoClient): * Modules/networkinfo/NetworkInfoConnection.cpp: (WebCore::NetworkInfoConnection::bandwidth): * Modules/networkinfo/NetworkInfoConnection.h: (NetworkInfoConnection): * testing/Internals.cpp: (WebCore::Internals::setNetworkInformation): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-06-26 Luke Macpherson <macpherson@chromium.org> Be careful not to read past the end of input in CSSParser::lex() when looking for variable definitions. https://bugs.webkit.org/show_bug.cgi?id=89949 Reviewed by Abhishek Arya. Added repro case as fast/css/short-inline-style.html. * css/CSSParser.cpp: (WebCore::CSSParser::lex): 2012-06-26 James Robinson <jamesr@chromium.org> [chromium] Remove WebView::graphicsContext3D getter https://bugs.webkit.org/show_bug.cgi?id=89916 Reviewed by Adrienne Walker. Deletes code supporting compositor context getter. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-06-26 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> Unexpected element sizes when mixing inline-table with box-sizing https://bugs.webkit.org/show_bug.cgi?id=89819 Reviewed by Julien Chaffraix. This change handles box-sizing: border-box property for CSS tables properly. Test: fast/box-sizing/css-table-with-box-sizing.html * rendering/RenderTable.cpp: (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): (WebCore::RenderTable::layout): 2012-06-26 Simon Fraser <simon.fraser@apple.com> Optimize mappings of simple transforms in RenderGeometryMap https://bugs.webkit.org/show_bug.cgi?id=90034 Reviewed by Dean Jackson. For transforms that are identity or simple translations, don't fall off the fast path in RenderGeometryMap; we can just treat them as offsets. Improves performance on pages with lots of translateZ(0) elements. Remove RenderGeometryMapStep::mapPoint() and mapQuad(), which were unused. No new tests; optimization only, and tested by assertions. * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::push): 2012-06-26 Kevin Ellis <kevers@chromium.org> Touch adjustment does not target shadow DOM elements https://bugs.webkit.org/show_bug.cgi?id=89556 The position of internal shadow-DOM nodes were not being considered when determining the snap position when TOUCH_ADJUSTMENT is enabled for fine tuning the position of synthetic mouse events. This restriction results in not being able to select the calendar picker when input type=date, or to clear the search field for input type=search. Reviewed by Antonio Gomes. Test: touchadjustment/nested-shadow-node.html * page/EventHandler.cpp: (WebCore::EventHandler::bestClickableNodeForTouchPoint): 2012-06-26 Ryosuke Niwa <rniwa@webkit.org> Stop calling node() and deprecatedEditingOffset() in comparePositions https://bugs.webkit.org/show_bug.cgi?id=54535 Reviewed by Enrica Casucci. Replaced deprecatedNode() and deprecatedEditingOffset() by containerNode() and computeOffsetInContainerNode() in comparePositions(). In addition, fixed a bunch of bugs in DeleteSelectionCommand::handleSpecialCaseBRDelete revealed by this change: - Use node after position instead of deprecated node in determinig whether start and end positions at a br. - Don't set m_startsAtEmptyLine true when BR is wrapped in a block element. The only reason this code had worked was positions like (div, offset, 0) and (br, before) in <div><br> were treated differently, which we no longer do. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): * editing/htmlediting.cpp: (WebCore::comparePositions): 2012-06-26 Christophe Dumez <christophe.dumez@intel.com> [EFL] Use eina_file_ls() in EFL implementation of FileSystem listDirectory() https://bugs.webkit.org/show_bug.cgi?id=89976 Reviewed by Antonio Gomes. Rewrite EFL implementation of Filesystem listDirectory() in order to use eina_file_ls() instead of POSIX C functions. This results in shorter code. No new tests, behavior has not changed. * platform/efl/FileSystemEfl.cpp: (WebCore::listDirectory): 2012-06-26 Alice Cheng <alice_cheng@apple.com> Crash at WebCore::TextIterator::handleTextBox https://bugs.webkit.org/show_bug.cgi?id=89526 <rdar://problem/10305315> Reviewed by Darin Adler. The range used for marking becomes invalid after SpellingCorrectionCommand, due to changes in the DOM made by ReplaceSelectionCommand. This invalid range caused marking to be incorrect, and Mail.app to crash when iterating through the invalid range. To fix this, recalculate the range for marking after SpellingCorrectionCommand. Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::applyAlternativeTextToRange): * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): * testing/Internals.cpp: (WebCore): (WebCore::Internals::hasAutocorrectedMarker): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-06-26 Tom Sepez <tsepez@chromium.org> [chromium] HTML5 audio/video tags - loading http content from https page doesn't trigger warning. https://bugs.webkit.org/show_bug.cgi?id=89906 Reviewed by Nate Chapin. This patch treats mixed CachedRawResources as affecting the display of insecure content. Tests: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html http/tests/security/mixedContent/insecure-xhr-in-main-frame.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::checkInsecureContent): 2012-06-26 Joe Thomas <joethomas@motorola.com> background-size:0 shows as 1px instead of invisible https://bugs.webkit.org/show_bug.cgi?id=86942 Reviewed by Eric Seidel. As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero, this causes the image not to be displayed. The effect should be the same as if it had been a transparent image. This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size. Test: fast/backgrounds/zero-background-size.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateFillTileSize): 2012-06-26 Adam Klein <adamk@chromium.org> [v8] Clean up generated Dictionary-handling code https://bugs.webkit.org/show_bug.cgi?id=89994 Reviewed by Adam Barth. No change in behavior, so no new tests. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::optionsObjectCallback): 2012-06-26 Raymond Toy <rtoy@google.com> Include stdio.h when DEBUG_AUDIONODE_REFERENCES is set https://bugs.webkit.org/show_bug.cgi?id=89997 Reviewed by Eric Seidel. No new tests needed for a compile issue * Modules/webaudio/AudioNode.cpp: Include stdio.h 2012-06-26 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Use premultiplied alpha when extracting image data in WebGL https://bugs.webkit.org/show_bug.cgi?id=89937 Reviewed by Jocelyn Turcotte. Perform conversion in QImage only if the image format is not ARGB32 or ARGB32_Premultiplied. Otherwise, allow packPixels to perform the conversion if the formats don't match, as packPixels already performs pixel-specific operations. Covered by tests in LayoutTests/fast/canvas/webgl, e.g. webgl-composite-modes.html. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-06-26 Joshua Bell <jsbell@chromium.org> IndexedDB: Move method precondition checks to front end objects https://bugs.webkit.org/show_bug.cgi?id=89377 Reviewed by Tony Chang. Now that metadata exists on the front end, most of the pre-condition validation checks done on IDB method calls from script can be moved to the front end which simplifies the code significantly in the case of complex methods like IDBObjectStore::put(). Adds an internal "active" flag for transactions, although the behavior is not accurate to the spec (it should only be true during event callbacks - http://webkit.org/b/89379). The back-end methods can then be simplifed to just adding async tasks to the transaction, and the front end methods can take care of all exception cases except for asynchronous transaction abort which still requires plumbing back to the front end. No functional changes - no new tests. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): Migrate from IDBObjectStoreBackendImpl::put. (WebCore::IDBCursor::advance): Add more explicit transaction-is-active check. (WebCore::IDBCursor::continueFunction): Ditto. (WebCore::IDBCursor::deleteFunction): Ditto. (WebCore::IDBCursor::effectiveObjectStore): Convenience function (source may be store or index). (WebCore): * Modules/indexeddb/IDBCursor.h: (WebCore::IDBCursor::isKeyCursor): Distinguish from IDBCursorWithValue. (IDBCursor): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::update): Remove migrated check. * Modules/indexeddb/IDBCursorWithValue.h: (IDBCursorWithValue): * Modules/indexeddb/IDBDatabase.cpp: Migrate checks. (WebCore::IDBDatabase::createObjectStore): (WebCore::IDBDatabase::deleteObjectStore): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Replace checks with assertions. (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): * Modules/indexeddb/IDBIndex.cpp: Add transaction-is-active checks. (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::count): (WebCore::IDBIndex::openKeyCursor): (WebCore::IDBIndex::get): (WebCore::IDBIndex::getKey): * Modules/indexeddb/IDBObjectStore.cpp: Migrate cehcks. (WebCore::IDBObjectStore::get): (WebCore::IDBObjectStore::add): Delegates to put(PutMode) (WebCore::IDBObjectStore::put): Delegates to put(PutMode) (WebCore): Adds put(PutMode) which has the unified checks migrated from IDBObjectStoreBackendImpl::put. (WebCore::IDBObjectStore::deleteFunction): (WebCore::IDBObjectStore::clear): (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::deleteIndex): (WebCore::IDBObjectStore::openCursor): (WebCore::IDBObjectStore::count): * Modules/indexeddb/IDBObjectStore.h: Adds put(PutMode). (IDBObjectStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): Fix trace symbol. (WebCore::IDBObjectStoreBackendImpl::put): Remove migrated checks. (WebCore::IDBObjectStoreBackendImpl::createIndex): Remove migrated checks. (WebCore::IDBObjectStoreBackendImpl::deleteIndex): Remove migrated checks. * Modules/indexeddb/IDBTransaction.cpp: Add active flag tracking. (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::abort): (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::onComplete): * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::isActive): (WebCore::IDBTransaction::isReadOnly): Group IDL/non-IDL methods. (IDBTransaction): 2012-06-26 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121285. http://trac.webkit.org/changeset/121285 https://bugs.webkit.org/show_bug.cgi?id=90014 "We misinterpreted 'size of the initial containing block'" (Requested by tomz on #webkit). * css/CSSCalculationValue.cpp: (WebCore::CSSCalcValue::computeLengthPx): (WebCore::CSSCalcPrimitiveValue::toCalcValue): (WebCore::CSSCalcPrimitiveValue::computeLengthPx): (WebCore::CSSCalcBinaryOperation::toCalcValue): (WebCore::CSSCalcBinaryOperation::computeLengthPx): * css/CSSCalculationValue.h: (CSSCalcExpressionNode): (WebCore::CSSCalcValue::toCalcValue): (CSSCalcValue): * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): (WebCore::positionFromValue): (WebCore::CSSGradientValue::computeEndPoint): (WebCore::CSSLinearGradientValue::createGradient): (WebCore::CSSRadialGradientValue::resolveRadius): (WebCore::CSSRadialGradientValue::createGradient): * css/CSSGradientValue.h: (CSSGradientValue): (CSSRadialGradientValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): (WebCore::CSSPrimitiveValue::computeLengthDouble): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapFillSize): (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): (WebCore::CSSToStyleMap::mapNinePieceImageQuad): * css/CSSToStyleMap.h: (CSSToStyleMap): * css/MediaQueryEvaluator.cpp: (WebCore::computeLength): (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::mmLength): (WebCore::ApplyPropertyPageSize::inchLength): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): 2012-06-26 Dave Tu <dtu@chromium.org> [chromium] Expose rendering statistics to WebWidget. https://bugs.webkit.org/show_bug.cgi?id=88268 Reviewed by James Robinson. The WebKit side of a basic framework for exposing rendering statistics to Chromium's --enable-benchmarking extension. * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::implFrameNumber): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::implFrameNumber): (WebCore): (WebCore::CCThreadProxy::implFrameNumberOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-06-26 Dave Tharp <dtharp@codeaurora.org> ietestcenter/css3/valuesandunits/units-000.htm asserts https://bugs.webkit.org/show_bug.cgi?id=86176 Reviewed by Beth Dakin. Modified computeLengthDouble() to handle vh, vw, and vmin units. Per the spec (http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths) viewport -percentage lengths are "relative to the size of the initial containing block", which I read to be the size of the parent element. Since parentStyle was not available in computeLengthDouble, most of the changes for this patch involved "pushing down" the parentStyle pointer through the network of computeLength methods and dependencies. Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html * css/CSSCalculationValue.cpp: (WebCore::CSSCalcValue::computeLengthPx): (WebCore::CSSCalcPrimitiveValue::toCalcValue): (WebCore::CSSCalcPrimitiveValue::computeLengthPx): (WebCore::CSSCalcBinaryOperation::toCalcValue): (WebCore::CSSCalcBinaryOperation::computeLengthPx): * css/CSSCalculationValue.h: (CSSCalcExpressionNode): (WebCore::CSSCalcValue::toCalcValue): (CSSCalcValue): * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): (WebCore::positionFromValue): (WebCore::CSSGradientValue::computeEndPoint): (WebCore::CSSLinearGradientValue::createGradient): (WebCore::CSSRadialGradientValue::resolveRadius): (WebCore::CSSRadialGradientValue::createGradient): * css/CSSGradientValue.h: (CSSGradientValue): (CSSRadialGradientValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): (WebCore::CSSPrimitiveValue::computeLengthDouble): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::parentStyle): (WebCore): (WebCore::CSSToStyleMap::mapFillSize): (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): (WebCore::CSSToStyleMap::mapNinePieceImageQuad): * css/CSSToStyleMap.h: (CSSToStyleMap): * css/MediaQueryEvaluator.cpp: (WebCore::computeLength): (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): * css/SVGCSSStyleSelector.cpp: (WebCore::StyleResolver::applySVGProperty): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyAuto::applyValue): (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyComputeLength::applyValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyPageSize::mmLength): (WebCore::ApplyPropertyPageSize::inchLength): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (WebCore::StyleResolver::parentNode): (StyleResolver): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): 2012-06-25 James Robinson <jamesr@chromium.org> [chromium] Add WebLayer API for scrolling https://bugs.webkit.org/show_bug.cgi?id=89913 Reviewed by Adrienne Walker. Use new WebScrollableLayer type in ScrollingCoordinatorChromium. This file peeks "under the hood" a fair amount since we don't have WebLayer API for scrollbar layers yet. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinatorPrivate::setScrollLayer): (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer): (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer): (WebCore::ScrollingCoordinatorPrivate::hasScrollLayer): (WebCore::ScrollingCoordinatorPrivate::scrollLayer): (ScrollingCoordinatorPrivate): (WebCore::createScrollbarLayer): (WebCore::ScrollingCoordinator::setScrollLayer): (WebCore::ScrollingCoordinator::setNonFastScrollableRegion): (WebCore::ScrollingCoordinator::setWheelEventHandlerCount): (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread): 2012-06-26 James Robinson <jamesr@chromium.org> Unreviewed, rolling out r120501. http://trac.webkit.org/changeset/120501 https://bugs.webkit.org/show_bug.cgi?id=89126 [skia] Fix is too heavy-handed * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::drawNeedsCopy): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::PlatformContextSkia): * platform/graphics/skia/PlatformContextSkia.h: (PlatformContextSkia): (WebCore::PlatformContextSkia::isDeferred): (WebCore::PlatformContextSkia::setDeferred): 2012-06-26 Julien Chaffraix <jchaffraix@webkit.org> Crash in FixedTableLayout::layout https://bugs.webkit.org/show_bug.cgi?id=88676 Unreviewed typo fix, pointed out by Darin Adler. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::layout): * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::layout): 2012-06-26 Adam Klein <adamk@chromium.org> MutationObserver.observe should treat a null or undefined options argument as empty https://bugs.webkit.org/show_bug.cgi?id=89992 Reviewed by Ojan Vafai. The WebIDL spec was recently updated to treat null or undefined Dictionary arguments the same as the empty dictionary. This patch updates MutationObserver.observe to follow that spec. Note that we still throw a SYNTAX_ERR in this case, since it's an error not to pass one of "attributes", "childList", or "characterData" as a key in the dictionary. * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::observe): 2012-06-26 Ian Vollick <vollick@chromium.org> [chromium] The single thread proxy should not automatically tick new animations. https://bugs.webkit.org/show_bug.cgi?id=89996 Reviewed by James Robinson. No new tests. No change to existing functionality. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::didAddAnimation): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore): 2012-06-26 Julien Chaffraix <jchaffraix@webkit.org> Crash in FixedTableLayout::layout https://bugs.webkit.org/show_bug.cgi?id=88676 Reviewed by Abhishek Arya. Tests: fast/table/auto-table-layout-colgroup-removal-crash.html fast/table/fixed-table-layout/colgroup-removal-crash.html fast/table/fixed-table-layout/prepend-in-fixed-table.html The issue comes from RenderTable not properly dirtying its preferred logical widths. As the table layout codes (both fixed and auto), recomputes their internal structures at computePreferredLogicalWidth, the internal structure doesn't match the table sizing and we crash. This fix adds a work-around in FixedTableLayout::layout (which matches AutoTableLayout). The long-term fix would be to properly fix the logic but this is a lot safer, especially since our logic is really not bullet-proof at the moment. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::layout): Added an internal structure recomputation, if we have drifted from our table's structure. Also we need to update nEffCols if we call calcWidthArray. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::layout): Added a comment matching FixedTableLayout. The nEffCols is unneeded but kept for consistency with FixedTableLayout. 2012-06-26 Ian Vollick <vollick@chromium.org> [chromium] Layer chromium should need a redraw after getting its first non-empty bounds. https://bugs.webkit.org/show_bug.cgi?id=89784 Reviewed by James Robinson. Previously, we'd only set needs redraw if the old bounds were zero, and the new bounds were non-zero, but we should actually have checked that the old bounds were non-empty. Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBounds): 2012-06-26 Jia Pu <jpu@apple.com> On Mac, autocorrection sometimes fails to take place in Safari. https://bugs.webkit.org/show_bug.cgi?id=89982 Reviewed by Darin Adler. Existing test was turned off due to intermittent failure, which is caused by autocorrection result depending on user data that may be altered by previous test runs. Hopefully we can turn the test back on once we have a way to make autocorrection behave consistently. Basically we should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should early return in markAndReplaceFor(). * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): 2012-06-26 Joe Thomas <joethomas@motorola.com> Do early-return when author and user styles are disabled. https://bugs.webkit.org/show_bug.cgi?id=89947 Reviewed by Andreas Kling. * dom/Document.cpp: (WebCore::Document::collectActiveStylesheets): 2012-06-26 James Robinson <jamesr@chromium.org> [chromium] Remove dead compositor-related API from GraphicsContext3DPrivate / Extensions3DChromium https://bugs.webkit.org/show_bug.cgi?id=89933 Reviewed by Kenneth Russell. GraphicsContext3DPrivate and Extensions3DChromium had a fair amount of plumbing and boilerplate to support the compositor's use of GraphicsContext3D. A number of extensions, etc, only make sense for a compositor context. Since the compositor doesn't use GC3D any more, these are no longer needed. * platform/chromium/support/Extensions3DChromium.cpp: * platform/chromium/support/GraphicsContext3DChromium.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::create): * platform/chromium/support/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext): (WebCore::GrMemoryAllocationChangedCallbackAdapter::GrMemoryAllocationChangedCallbackAdapter): (WebCore::GraphicsContext3DPrivate::grContext): * platform/chromium/support/GraphicsContext3DPrivate.h: (WebCore): (GraphicsContext3DPrivate): * platform/graphics/chromium/Extensions3DChromium.h: 2012-06-26 Yasuhiro Matsuda <mazda@chromium.org> [chromium] Add the workaround of IOSurface-related corruption during readback on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=89797 Reviewed by James Robinson. No new tests. This patch doesn't change behavior. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::getFramebufferPixels): 2012-06-26 Alexei Filippov <alexeif@chromium.org> Web Inspector: Native memory snapshots crash in debug mode. https://bugs.webkit.org/show_bug.cgi?id=89977 Reviewed by Yury Semikhatsky. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::maybeDOMWrapper): 2012-06-26 Huang Dongsung <luxtella@company100.net> [Texmap] Bug fix typo about computing bytesPerLine in BitmapTextureGL. https://bugs.webkit.org/show_bug.cgi?id=89924 "bytesPerLine == targetRect.width() / 4" is invalid. This patch amended it into "bytesPerLine == targetRect.width() * 4". Moreover, changed magic number 4 to bytesPerPixel. Reviewed by Noam Rosenthal. No new tests. Covered by existing tests. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::updateContents): 2012-06-26 Roland Takacs <takacs.roland@stud.u-szeged.hu> Shader compiler unprepared to make ESSL output when GLES is used https://bugs.webkit.org/show_bug.cgi?id=87718 Reviewed by Noam Rosenthal. Defined a new member that says what type of output code must be generated (SH_GLSL_OUTPUT, SH_ESSL_OUTPUT). It is set within the constructor. * platform/graphics/ANGLEWebKitBridge.cpp: (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge): (WebCore::ANGLEWebKitBridge::validateShaderSource): * platform/graphics/ANGLEWebKitBridge.h: (ANGLEWebKitBridge): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2012-06-26 Philip Rogers <pdr@google.com> Fix bug where animations failed to start https://bugs.webkit.org/show_bug.cgi?id=89943 Reviewed by Nikolas Zimmermann. The unpause code previously checked that the animations had not started before un-setting the pause state. This meant that if an animation was paused and unpaused before the animations started, it would remain in the paused state. This patch simply reorders the unpause logic to fix this bug. Test: svg/custom/animate-initial-pause-unpause.html * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::resume): 2012-06-26 Yury Semikhatsky <yurys@chromium.org> Web Inspector: popover is not shown for detached DOM nodes, not referenced directly from JS https://bugs.webkit.org/show_bug.cgi?id=89955 Reviewed by Vsevolod Vlasov. Show object popover for all heap snapshot nodes event for those whose canBeQueried flag is false. We didn't show popover for such objects before as it could lead to the backend crash. In the meantime the backend shouldn't fail on such DOM wrappers and report an error if it cannot resolve inspected object. * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._getHoverAnchor): 2012-06-26 Christophe Dumez <christophe.dumez@intel.com> [EFL] Simplify SharedBuffer::createWithContentsOfFile() implementation https://bugs.webkit.org/show_bug.cgi?id=89655 Reviewed by Csaba Osztrogonác. Simplify the implementation of SharedBuffer::createWithContentsOfFile() in EFL port. No new test, no behavior change. * platform/efl/SharedBufferEfl.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2012-06-26 Thiago Marcos P. Santos <thiago.santos@intel.com> [EFL] REGRESSION (r121163): fast/frames/iframe-access-screen-of-deleted.html crashes https://bugs.webkit.org/show_bug.cgi?id=89964 Reviewed by Andreas Kling. Added missing null pointer check. * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenDepth): (WebCore::screenDepthPerComponent): 2012-06-26 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add requestMetadata command and metadataReceived event to FileSystem https://bugs.webkit.org/show_bug.cgi?id=87856 Reviewed by Yury Semikhatsky. Test: http/tests/inspector/filesystem/get-metadata.html * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): (WebCore::InspectorFileSystemAgent::requestDirectoryContent): (WebCore::InspectorFileSystemAgent::requestMetadata): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype._directoryContentReceived): (WebInspector.FileSystemModel.prototype.requestMetadata): (WebInspector.FileSystemModel.Entry.prototype.get isDirectory): (WebInspector.FileSystemModel.Entry.prototype.requestMetadata): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototype._directoryContentReceived): (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestMetadata): (WebInspector.FileSystemRequestManager.prototype._metadataReceived): (WebInspector.FileSystemDispatcher.prototype.directoryContentReceived): (WebInspector.FileSystemDispatcher.prototype.metadataReceived): 2012-06-25 Jocelyn Turcotte <turcotte.j@gmail.com> [Qt] GraphicsSurface: Fix tile update artifacts on Mac https://bugs.webkit.org/show_bug.cgi?id=89887 Reviewed by Noam Rosenthal. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformCopyToGLTexture): 2012-06-25 Jocelyn Turcotte <turcotte.j@gmail.com> GraphicsSurface: Fix IOSurfaceLock failures on Intel video cards. https://bugs.webkit.org/show_bug.cgi?id=89883 Reviewed by Noam Rosenthal. Follow the documentation which says: "If locking the buffer requires a readback, the lock will fail with an error return of kIOReturnCannotLock." Also make sure that we use the same set of flags when locking and unlocking for simplicity and to follow this requirement on the kIOSurfaceLockReadOnly flag. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformLock): (WebCore::GraphicsSurface::platformUnlock): 2012-06-26 Philip Rogers <pdr@google.com> Fix setCurrentTime for paused animations https://bugs.webkit.org/show_bug.cgi?id=81350 Reviewed by Nikolas Zimmermann. SMILTimeContainer::setElapsed was not resetting the pause time, breaking setCurrentTime if the animation was paused. Test: svg/custom/animate-pause-resume.html * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::setElapsed): 2012-06-26 Csaba Osztrogonác <ossy@webkit.org> [Qt] Unreviewed typo fix after r121144. * Target.pri: 2012-06-26 Yury Semikhatsky <yurys@chromium.org> Web Inspector: columns in heap snapshot summary view are not resizable https://bugs.webkit.org/show_bug.cgi?id=89952 Reviewed by Vsevolod Vlasov. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotViewportDataGrid.prototype.onResize): overriden method should call overriden one to make sure column resizers are added to the DataGrid. 2012-06-26 Kent Tamura <tkent@chromium.org> Refactoring: Simplify FormController interface https://bugs.webkit.org/show_bug.cgi?id=89951 Reviewed by Kentaro Hara. - Remove FormController::hasStateForNewFormElements() takeStateForFormElement() can check the emptiness, and return an empty FormControlState. - Change the argument of takeStateForFormElement() Passing just one HTMLFormControlElementWithState object instead of two AtomicStringImpl. This is a preparation to use HTMLFormControlElementWithState::form() in FormController. No new tests. Just a refactoring. * html/FormController.cpp: (WebCore::FormController::takeStateForFormElement): * html/FormController.h: (FormController): * html/HTMLFormControlElementWithState.cpp: (WebCore::HTMLFormControlElementWithState::finishParsingChildren): 2012-06-26 Dominic Cooney <dominicc@chromium.org> WheelEvent should inherit from MouseEvent https://bugs.webkit.org/show_bug.cgi?id=76104 Reviewed by Kentaro Hara. The spec for WheelEvent is <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-WheelEvent> Tests: fast/events/event-creation.html http://samples.msdn.microsoft.com/ietestcenter/dominheritance/showdominheritancetest.htm?Prototype_WheelEvent * bindings/objc/PublicDOMInterfaces.h: Remove redundant MouseEvent API from WheelEvent * bindings/scripts/CodeGeneratorObjC.pm: MouseEvents are Events * dom/MouseEvent.h: Expose no-arg constructor to WheelEvent * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Call MouseEvent superconstructor (WebCore::WheelEvent::isMouseEvent): Existing callers use this just for moves and clicks, ie the type is exactly MouseEvent. * dom/WheelEvent.h: Extend MouseEvent * dom/WheelEvent.idl: " 2012-06-25 Ryosuke Niwa <rniwa@webkit.org> Get rid of firstItem and nextItem from HTMLCollection https://bugs.webkit.org/show_bug.cgi?id=89923 Reviewed by Andreas Kling. Removed HTMLCollection::firstItem and HTMLCollection::nextItem. Also added hasAnyItem() and hasExactlyOneItem() to HTMLCollection so that named getter on Document doesn't need to compute the full length before returning a HTMLCollection. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::getDocumentLinks): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedPropertyGetter): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::GetNamedProperty): * dom/Document.cpp: (WebCore::Document::openSearchDescriptionURL): * html/HTMLCollection.cpp: (WebCore::shouldIncludeChildren): (WebCore::HTMLCollection::HTMLCollection): (WebCore): (WebCore::HTMLCollection::item): * html/HTMLCollection.h: (HTMLCollection): (WebCore::HTMLCollection::hasAnyItem): (WebCore::HTMLCollection::hasExactlyOneItem): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): 2012-06-25 Pratik Solanki <psolanki@apple.com> JavaScript resources have low priority when SVG is enabled https://bugs.webkit.org/show_bug.cgi?id=89932 <rdar://problem/11741325> Reviewed by Adele Peterson. r108785 inadvertently lowered the priority of JavaScript resources. Fix the code so we set the correct priority for scripts. Also, move the code so that all ifdefs are together at the bottom to make it a bit easier to read.. * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): 2012-06-25 Luke Macpherson <macpherson@chromium.org> Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag). https://bugs.webkit.org/show_bug.cgi?id=89542 Reviewed by Dimitri Glazkov. Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment. Updated all other css variables tests to enable the runtime flag from JS. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::CSSParser::cssVariablesEnabled): (WebCore): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserMode.h: (CSSParserContext): * page/Settings.h: (Settings): (WebCore::Settings::setCSSVariablesEnabled): (WebCore::Settings::cssVariablesEnabled): 2012-06-25 Simon Hausmann <simon.hausmann@nokia.com> Unreviewed build fix after r121223. Fix the --minimal Qt build, TextureMapperGL now requires WebGL to be enabled. * Target.pri: * WebCore.pri: 2012-06-25 Dana Jansens <danakj@chromium.org> [chromium] CCOverdrawMetrics should use the deviceViewportSize to count actual pixels https://bugs.webkit.org/show_bug.cgi?id=89922 Reviewed by Adrienne Walker. * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::recordMetricsInternal): 2012-06-25 Huang Dongsung <luxtella@company100.net> [Texmap] Remove platform specific code in BitmapImageGL::updateContents by using GraphicsContext3D::extractImageData. https://bugs.webkit.org/show_bug.cgi?id=89867 Reviewed by Noam Rosenthal. No new tests. Covered by existing tests. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore): (WebCore::BitmapTextureGL::didReset): (WebCore::BitmapTextureGL::updateContents): 2012-06-25 James Robinson <jamesr@chromium.org> [chromium] Remove uncalled ManagedTexture::framebufferTexture2D https://bugs.webkit.org/show_bug.cgi?id=89930 Reviewed by Adrienne Walker. Removing dead code. * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ManagedTexture.h: (ManagedTexture): 2012-06-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121206. http://trac.webkit.org/changeset/121206 https://bugs.webkit.org/show_bug.cgi?id=89935 [chromium] webkit_unit_tests WebViewTest.MHTMLWithMissingResourceFinishesLoading crash (Requested by ukai on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::scheduleArchiveLoad): 2012-06-25 Anantanarayanan G Iyengar <ananta@chromium.org> [chromium] Ensure that the compositor code which is aware of flipped status of video-textures per platform executes on Windows. https://bugs.webkit.org/show_bug.cgi?id=89914 Reviewed by James Robinson. No new tests. (HW video decode is still only being tested manually for orientation) * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121176. http://trac.webkit.org/changeset/121176 https://bugs.webkit.org/show_bug.cgi?id=89934 [chromium] browser_tests assert failed: FATAL:native_theme_win.cc(1541)] Check failed: false. Invalid part: 16 (Requested by ukai on #webkit). * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::buttonSize): 2012-06-25 Shinya Kawanaka <shinyak@chromium.org> [Shadow] Deleting list distributed to Shadow DOM does not work correctly. https://bugs.webkit.org/show_bug.cgi?id=89170 Reviewed by Ryosuke Niwa. When deleting several elements distributed to Shadow DOM, some renderers might be gone in processing deletion. To fix them, we should call isContentEditable() instead of rendererIsEditable(). Test: editing/shadow/delete-list-in-shadow.html * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): 2012-06-25 Min Qin <qinmin@chromium.org> [Chromium] Fix the css stylesheet for android media controls after recent changes https://bugs.webkit.org/show_bug.cgi?id=89910 Reviewed by Adam Barth. After the recent changes on upstream chrome video controls, we need to change the css style sheet for chrome on android. No tests needed, just css changes. * css/mediaControlsChromiumAndroid.css: (audio): (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (::-webkit-media-controls): (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure): (video::-webkit-media-controls-enclosure): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline): (video::-webkit-media-controls-fullscreen-button): (input[type="range"]::-webkit-media-slider-container): (input[type="range"]::-webkit-media-slider-thumb): (audio::-webkit-media-controls-fullscreen-button): 2012-06-25 Huang Dongsung <luxtella@company100.net> [Qt] Avoid a deep copy of QImage in GraphicsContext3D::getImageData. https://bugs.webkit.org/show_bug.cgi?id=89865 Reviewed by Noam Rosenthal. No new tests. Covered by existing tests. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-06-25 Nick Carter <nick@chromium.org> Reduce memory footprint of BitmapImage Vectors. https://bugs.webkit.org/show_bug.cgi?id=86563 Reviewed by Simon Fraser. No new tests, affects template params only. * platform/graphics/BitmapImage.h: (BitmapImage): use an inline capacity of 1 for the image frame Vector * platform/image-decoders/ImageDecoder.h: (ImageDecoder): use an inline capacity of 1 for the image frame Vector 2012-06-25 Kent Tamura <tkent@chromium.org> Unreviewed, rolling out r121145. http://trac.webkit.org/changeset/121145 https://bugs.webkit.org/show_bug.cgi?id=89847 Had an objection for the change. * html/FormController.cpp: (WebCore): (WebCore::FormControlState::serializeTo): (WebCore::FormControlState::deserialize): (WebCore::formStateSignature): (WebCore::FormController::formElementsState): (WebCore::FormController::setStateForNewFormElements): * html/FormController.h: (FormControlState): * html/shadow/CalendarPickerElement.cpp: (WebCore::addJavaScriptString): 2012-06-25 Jay Civelli <jcivelli@chromium.org> Fix progress load reporting for MHTML documents. MHTML documents containing references to resources they don't include never finish loading. https://bugs.webkit.org/show_bug.cgi?id=71859 Reviewed by Nate Chapin. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::scheduleArchiveLoad): 2012-06-25 James Robinson <jamesr@chromium.org> [chromium] Use WebGraphicsContext3D in compositor implementation https://bugs.webkit.org/show_bug.cgi?id=89700 Reviewed by Adrienne Walker. This converts the compositor implementation from using WebCore::GraphicsContext3D to using the Platform-provided WebGraphicsContext3D. This removes several unnecessary layers of indirection/wrapping and cuts down the compositor's implementation dependencies. GraphicsContext3D.h is still widely used to provide GL enum values. Most of the changes are purely mechanical - changing type names and the like. Ownership is changed a bit. Instead of multiple components holding references to the compositor's context, the context is now owned by the CCGraphicsContext, which is now owned directly by CCLayerTreeHostImpl. CCLayerTreeHostImpl also has ownership of its CCRenderer (LayerRendererChromium in 3D mode) and passes a non-owning pointer down to the CCRenderer. Extension checking is a bit different. The compositor does not (and never has) used extensions provided by WebGL's request/ensure mechanism. It simply checks for the existence of extensions it needs in the GL_EXTENSIONS string. FrameBufferSkPictureCanvasLayerTextureUpdater had to be patched as well, since it was grabbing a GrContext off of the compositor's GraphicsContext3D. This caused many problems. It was inefficient, since it required a full state flush when switching between ganesh and compositor calls. The gpu memory management was completely broken since the compositor clobbered ganesh's onMemoryAllocationChanged callback. This moves FBSkPCLTU over to using the appropriate SharedGraphicsContext3D, like filters. * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/GeometryBinding.cpp: (WebCore::GeometryBinding::GeometryBinding): * platform/graphics/chromium/GeometryBinding.h: (WebKit): (GeometryBinding): (WebCore::GeometryBinding::context): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::context): (WebCore::LayerRendererChromium::debugGLCall): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::onMemoryAllocationChanged): (WebCore): (WebCore::LayerRendererChromium::onMemoryAllocationChangedOnImplThread): (WebCore::LayerRendererChromium::discardFramebuffer): (WebCore::LayerRendererChromium::ensureFramebuffer): (WebCore::LayerRendererChromium::onContextLost): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tileCheckerboardProgram): (WebCore::LayerRendererChromium::solidColorProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderPassProgram): (WebCore::LayerRendererChromium::renderPassProgramAA): (WebCore::LayerRendererChromium::renderPassMaskProgram): (WebCore::LayerRendererChromium::renderPassMaskProgramAA): (WebCore::LayerRendererChromium::tileProgram): (WebCore::LayerRendererChromium::tileProgramOpaque): (WebCore::LayerRendererChromium::tileProgramAA): (WebCore::LayerRendererChromium::tileProgramSwizzle): (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque): (WebCore::LayerRendererChromium::tileProgramSwizzleAA): (WebCore::LayerRendererChromium::textureProgram): (WebCore::LayerRendererChromium::textureProgramFlip): (WebCore::LayerRendererChromium::textureIOSurfaceProgram): (WebCore::LayerRendererChromium::videoYUVProgram): (WebCore::LayerRendererChromium::videoStreamTextureProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::isContextLost): * platform/graphics/chromium/LayerRendererChromium.h: (WebKit): (WebCore): (LayerRendererChromium): (WebCore::LayerRendererChromium::isFramebufferDiscarded): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/PlatformColor.h: (WebCore::PlatformColor::bestTextureFormat): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::contextLost): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::cleanup): (WebCore::ProgramBindingBase::loadShader): (WebCore::ProgramBindingBase::createShaderProgram): * platform/graphics/chromium/ProgramBinding.h: (WebKit): (ProgramBindingBase): (WebCore::ProgramBinding::ProgramBinding): (WebCore::ProgramBinding::initialize): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTex::init): (WebCore::VertexShaderPosTexYUVStretch::init): (WebCore::VertexShaderPos::init): (WebCore::VertexShaderPosTexTransform::init): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderTile::init): (WebCore::VertexShaderVideoTransform::init): (WebCore::FragmentTexAlphaBinding::init): (WebCore::FragmentTexOpaqueBinding::init): (WebCore::FragmentShaderOESImageExternal::init): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderYUVVideo::init): (WebCore::FragmentShaderColor::init): (WebCore::FragmentShaderCheckerboard::init): * platform/graphics/chromium/ShaderChromium.h: (WebKit): (VertexShaderPosTex): (VertexShaderPosTexYUVStretch): (VertexShaderPos): (WebCore::VertexShaderPosTexIdentity::init): (VertexShaderPosTexTransform): (VertexShaderQuad): (VertexShaderTile): (VertexShaderVideoTransform): (FragmentTexAlphaBinding): (FragmentTexOpaqueBinding): (FragmentShaderOESImageExternal): (FragmentShaderRGBATexAlphaAA): (FragmentTexClampAlphaAABinding): (FragmentShaderRGBATexAlphaMask): (FragmentShaderRGBATexAlphaMaskAA): (FragmentShaderYUVVideo): (FragmentShaderColor): (FragmentShaderCheckerboard): * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureCopier.h: (WebKit): (WebCore): (WebCore::AcceleratedTextureCopier::create): (AcceleratedTextureCopier): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/ThrottledTextureUploader.cpp: (WebCore::ThrottledTextureUploader::Query::Query): (WebCore::ThrottledTextureUploader::Query::~Query): (WebCore::ThrottledTextureUploader::Query::begin): (WebCore::ThrottledTextureUploader::Query::end): (WebCore::ThrottledTextureUploader::Query::isPending): (WebCore::ThrottledTextureUploader::Query::wait): (WebCore::ThrottledTextureUploader::ThrottledTextureUploader): * platform/graphics/chromium/ThrottledTextureUploader.h: (WebKit): (WebCore::ThrottledTextureUploader::create): (WebCore::ThrottledTextureUploader::Query::create): (Query): (ThrottledTextureUploader): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::TrackingTextureAllocator): (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): (WebCore::TrackingTextureAllocator::deleteAllTextures): * platform/graphics/chromium/TrackingTextureAllocator.h: (WebKit): (WebCore::TrackingTextureAllocator::create): (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCGraphicsContext.h: (CCGraphicsContext): (WebCore::CCGraphicsContext::create2D): (WebCore::CCGraphicsContext::create3D): (WebCore::CCGraphicsContext::context3D): (WebCore::CCGraphicsContext::CCGraphicsContext): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::willDraw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::createContext): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHostClient): (WebCore::LayerRendererCapabilities::LayerRendererCapabilities): (LayerRendererCapabilities): (WebCore::CCLayerTreeHost::needsSharedContext): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeContext): (WebCore::CCSingleThreadProxy::recreateContext): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeContext): (WebCore::CCThreadProxy::recreateContext): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::initializeContextOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::copyPlaneData): 2012-06-25 Adrienne Walker <enne@google.com> [chromium] Make CCThreadProxy not draw a frame mid-commit https://bugs.webkit.org/show_bug.cgi?id=89905 Reviewed by James Robinson. If commitComplete is not called before the next frame goes up, then then the max scroll position on the root scroll layer is not updated. This causes the compositor-side scrollbar to have an incorrect visibleSize, causing the thumbRect to become stretched, relative to when it was originally painted. CCScheduler::setVisible has the side effect of kicking off a frame, so move it last. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionCommit): 2012-06-25 Pablo Flouret <pablof@motorola.com> EventSource: Events should not be dispatched after close() https://bugs.webkit.org/show_bug.cgi?id=85346 Reviewed by Adam Barth. Spec changed to make sure that no events are dispatched after close() is called, even if more data was received before the call to close(). See, https://www.w3.org/Bugs/Public/show_bug.cgi?id=14331#c5 http://html5.org/tools/web-apps-tracker?from=6771&to=6772 Firefox behaves like this already. Test: http/tests/eventsource/eventsource-events-after-close.html * page/EventSource.cpp: (WebCore::EventSource::parseEventStream): 2012-06-25 Mike West <mkwst@chromium.com> Fixing compilation failure in StyleResolver.cpp/CSSParser.cpp https://bugs.webkit.org/show_bug.cgi?id=89892 Reviewed by Alexis Menard. Adding CSSPropertyVariable to switch statements in CSSParser and StyleResolver to fix compilation errors under ninja/clang. I've added both as new cases to the switches, with FIXME comments for implementation. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-25 Jay Civelli <jcivelli@chromium.org> Fix for a memory leak with MHTMLArchives. MHTML files present a flat list of frames and resources but the WebKit Archive has a tree strcture. So the MHTMLArchive class make sures that every frame knows about any other frames and resources. Because these objects are ref counted, that would introduce circular references preventing the entire Archive from being deleted. This fixes this by: - making sure the top-frame (which appears as the first entry in the MHTML) is not referenced by the other frames. - when the main frame is deleted it traverse the entire subarchive (sub-frames) graph and makes sure they clear all their references to other subarchives. https://bugs.webkit.org/show_bug.cgi?id=88470 Reviewed by Adam Barth. * loader/archive/Archive.cpp: (WebCore::Archive::clearAllSubframeArchives): (WebCore): (WebCore::Archive::clearAllSubframeArchivesImpl): * loader/archive/Archive.h: (Archive): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::~MHTMLArchive): (WebCore): (WebCore::MHTMLArchive::create): * loader/archive/mhtml/MHTMLArchive.h: (MHTMLArchive): 2012-06-25 Alpha Lam <hclam@chromium.org> Unreviewed, rolling out r121178. http://trac.webkit.org/changeset/121178 https://bugs.webkit.org/show_bug.cgi?id=89784 New unit test added is failing on WebKit Linux (dbg) * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBounds): 2012-06-25 Alpha Lam <hclam@chromium.org> Unreviewed, rolling out r121137. http://trac.webkit.org/changeset/121137 Chromium build fix, (un)touch files to build on Chromium Win Release * css/CSSParserMode.h: * css/CSSValue.h: (WebCore): * css/CSSVariableValue.h: * page/Settings.h: * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleVariableData.h: 2012-06-25 Alpha Lam <hclam@chromium.org> Unreviewed, rolling out r121129. http://trac.webkit.org/changeset/121129 https://bugs.webkit.org/show_bug.cgi?id=89542 Chromium ASan failure: crbug.com/134402 * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserMode.h: (CSSParserContext): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-06-25 Adam Barth <abarth@webkit.org> Use InterpolationLow on chromium-android https://bugs.webkit.org/show_bug.cgi?id=89849 Reviewed by Daniel Bates. Min Qin writes: Using InterpolationHigh is very very expensive when resampling images. For example, it took 1400ms to decode an image on http://www.crossfitsunnyvale.com/blog/, but it took 2800 ms to do the resampling Switch to InterpolationLow will result in linear resampling. It is much faster as the time it tooks is almost non-noticable [sic] on the trace. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::State::State): 2012-06-25 Joshua Bell <jsbell@chromium.org> IndexedDB: Remove unused backend property accessors https://bugs.webkit.org/show_bug.cgi?id=89893 Reviewed by Darin Fisher. Following the "metadata" API addition in trac.webkit.org/changeset/121059 the IDBXXXBackendInterface types no longer need per-property accessors. No new tests - no functional changes. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Remove method implementation. * Modules/indexeddb/IDBDatabaseBackendImpl.h: Remove methods. (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove methods. (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBIndexBackendImpl.h: Make methods simple accessors. (IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::name): (WebCore::IDBIndexBackendImpl::keyPath): (WebCore::IDBIndexBackendImpl::unique): (WebCore::IDBIndexBackendImpl::multiEntry): * Modules/indexeddb/IDBIndexBackendInterface.h: Remove methods. * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove method implementation. * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Make methods simple accessors. (IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::name): (WebCore::IDBObjectStoreBackendImpl::keyPath): (WebCore::IDBObjectStoreBackendImpl::autoIncrement): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove methods. 2012-06-25 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] Add support for building with ENABLE_MEDIA_STREAM https://bugs.webkit.org/show_bug.cgi?id=88413 Reviewed by Dirk Pranke. Add files which are needed for supporting the Media Stream feature. No change in functionality so no new tests. * PlatformEfl.cmake: 2012-06-25 Huang Dongsung <luxtella@company100.net> [Texmap] TextureMapperPaintOptions should keep current surface. https://bugs.webkit.org/show_bug.cgi?id=89266 Before this patch, if a replica layer has a descendant replica child, the child layer does not render the result in the parent layer's surface because TextureMapperPaintOptions does not keep current surface. This patch amends that TextureMapperPaintOptions keeps current surface before calling paintSelfAndChildrenWithReplica recursively, so previous surface could be restored after paintSelfAndChildrenWithReplica. Reviewed by Noam Rosenthal. Test: compositing/reflections/animation-inside-reflection.html * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintRecursive): 2012-06-25 Ian Vollick <vollick@chromium.org> [chromium] Layer chromium should need a redraw after getting its first non-empty bounds. https://bugs.webkit.org/show_bug.cgi?id=89784 Reviewed by James Robinson. Previously, we'd only set needs redraw if the old bounds were zero, and the new bounds were non-zero, but we should actually have checked that the old bounds were non-empty. Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBounds): 2012-06-25 Scott Graham <scottmg@chromium.org> Plumb Scrollbar button dimensions down to WebThemeEngine https://bugs.webkit.org/show_bug.cgi?id=89264 Reviewed by James Robinson. Rather than making the height of the scrollbar buttons the same as the width of the scrollbar, delegate to the WebThemeEngine. This allows matching the Aura theme rather than the standard Windows theme. No new tests, as bounds are overridden for DRT. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::buttonSize): 2012-06-25 Antti Koivisto <antti@apple.com> Fast path for simple transform parsing https://bugs.webkit.org/show_bug.cgi?id=89898 Reviewed by Anders Carlsson. When manipulating transforms using script, the transform value parsing can show up in profiles pretty heavily (up 4% in some cases). We can optimize it easily by implementing a fast path that does not spin up the full CSS parser, like we already do for several other common value types. The patch implements a fast path for transform(), transformX/Y/Z() and transform3D(). It speeds up parsing by >5x. * css/CSSParser.cpp: (WebCore): (WebCore::parseTransformArguments): (WebCore::parseTransformValue): (WebCore::CSSParser::parseValue): 2012-06-25 Kwang Yul Seo <skyul@company100.net> Remove unused static function shadowFor https://bugs.webkit.org/show_bug.cgi?id=89824 Reviewed by Daniel Bates. shadowFor is not used anymore after r117796. No behaviour changes. * dom/TreeScopeAdopter.cpp: 2012-06-25 Kwang Yul Seo <skyul@company100.net> Remove unused constant timeWithoutMouseMovementBeforeHidingControls https://bugs.webkit.org/show_bug.cgi?id=89823 Reviewed by Daniel Bates. After r87692, timeWithoutMouseMovementBeforeHidingControls is not used anymore. * html/HTMLMediaElement.cpp: (WebCore): 2012-06-25 Zeev Lieber <zlieber@chromium.org> [Chromium] RenderPass textures are evicted at the end of every frame https://bugs.webkit.org/show_bug.cgi?id=89786 Reviewed by Adrienne Walker. Removed calls to TextureManager::reduceMemoryToLimit inside finishDrawingFrame() method. Added unit tests to verify new behavior. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::finishDrawingFrame): 2012-06-25 Allan Xavier <allan.xavier@undefinedltd.co.uk> [GTK] Add graphviz debug output for the gstreamer video pipeline. https://bugs.webkit.org/show_bug.cgi?id=89660 Reviewed by Martin Robinson. Dump the current video pipeline as a graphviz DOT file when the pipeline state changes or when an error occours. No new tests as the change is only useful for debugging. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 2012-06-25 Adam Barth <abarth@webkit.org> ASSERT(m_wheelEventHandlerCount > 0) can fire https://bugs.webkit.org/show_bug.cgi?id=89856 Reviewed by Eric Seidel. When a node with a wheel or a touch event is moved from one document to another, the didAddMumble/didRemoveMumble calls do not balance because they're called on different documents. This patch twiddles the counts appropriately in that case. Test: fast/events/move-element-with-wheel-and-touch-event-listeners.html * dom/EventNames.h: (WebCore::EventNames::isTouchEventType): (EventNames): (WebCore::EventNames::touchEventNames): * dom/Node.cpp: (WebCore::Node::didMoveToNewDocument): 2012-06-25 Eric Seidel <eric@webkit.org> Split map* functions out of StyleResolver into a helper object https://bugs.webkit.org/show_bug.cgi?id=89881 Reviewed by Daniel Bates. These map* functions are completely independent of the rest of StyleResolver and only exist to serve StyleBuilder. CSSToStyleMap doesn't even want to have a StyleResolver pointer, but currently needs one to access the resolve-lifetime caches for the current resolve. Once we split out that per-resolve state into some sort of ResolveState/ResolveInfo object (akin to PaintInfo/LayoutState) then this object will be even simpler. No behavioral change, thus no tests. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSToStyleMap.cpp: Added. (WebCore): (WebCore::CSSToStyleMap::style): (WebCore::CSSToStyleMap::rootElementStyle): (WebCore::CSSToStyleMap::useSVGZoomRules): (WebCore::CSSToStyleMap::styleImage): (WebCore::CSSToStyleMap::mapFillAttachment): (WebCore::CSSToStyleMap::mapFillClip): (WebCore::CSSToStyleMap::mapFillComposite): (WebCore::CSSToStyleMap::mapFillOrigin): (WebCore::CSSToStyleMap::mapFillImage): (WebCore::CSSToStyleMap::mapFillRepeatX): (WebCore::CSSToStyleMap::mapFillRepeatY): (WebCore::CSSToStyleMap::mapFillSize): (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): (WebCore::CSSToStyleMap::mapAnimationDelay): (WebCore::CSSToStyleMap::mapAnimationDirection): (WebCore::CSSToStyleMap::mapAnimationDuration): (WebCore::CSSToStyleMap::mapAnimationFillMode): (WebCore::CSSToStyleMap::mapAnimationIterationCount): (WebCore::CSSToStyleMap::mapAnimationName): (WebCore::CSSToStyleMap::mapAnimationPlayState): (WebCore::CSSToStyleMap::mapAnimationProperty): (WebCore::CSSToStyleMap::mapAnimationTimingFunction): (WebCore::CSSToStyleMap::mapNinePieceImage): (WebCore::CSSToStyleMap::mapNinePieceImageSlice): (WebCore::CSSToStyleMap::mapNinePieceImageQuad): (WebCore::CSSToStyleMap::mapNinePieceImageRepeat): * css/CSSToStyleMap.h: Added. (WebCore): (CSSToStyleMap): (WebCore::CSSToStyleMap::CSSToStyleMap): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFillLayer::applyValue): (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore): (WebCore::ApplyPropertyAnimation::map): (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (WebCore::StyleResolver::styleMap): (StyleResolver): 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> [EFL] Support screenDepth() functionality. https://bugs.webkit.org/show_bug.cgi?id=89423 Reviewed by Kenneth Rohde Christiansen. Support screenDepth() based on ecore_x_window_depth_get(). This functionality may be used by both WebKit1 and WebKit2. So, concrete function is placed into EflScreenUtilities.cpp. This patch can't support existing test cases. Because, EFL DumpRenderTree works without X11 window by default. * platform/efl/EflScreenUtilities.cpp: (WebCore::getPixelDepth): (WebCore): * platform/efl/EflScreenUtilities.h: (WebCore): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenDepth): (WebCore::screenDepthPerComponent): 2012-06-25 Shinya Kawanaka <shinyak@chromium.org> [Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash https://bugs.webkit.org/show_bug.cgi?id=88495 Reviewed by Ryosuke Niwa. InsertionPoint::removedFrom(insertionPoint) tries to find its owner ElementShadow from parentNode or insertionPoint. If the parent node exsits but we cannot reach ElementShadow from the parent node, InsertionPoint::removedFrom does not try to find ElementShadow anymore. It's OK if the ElementShadow is being destructed, but there is a case ElementShadow is not being destructed in editing. In this case, we should try to find ElementShadow from insertionPoint. Otherwise it will bring inconsistency to Shadow DOM, and causes a crash. Actually checking the existence of parentNode() does not make any sense. We should get shadowRoot() directly. Test: editing/shadow/insertorderedlist-crash.html * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::removedFrom): 2012-06-25 Kinuko Yasuda <kinuko@chromium.org> Remove responseBlob field from XMLHttpResponse.idl https://bugs.webkit.org/show_bug.cgi?id=89859 Reviewed by Eric Seidel. Remove XMLHttpResponse.responseBlob from XMLHttpResponse.idl, which has only been exposed for a very limited time (since r120574) but probably should not have been done so since XHR2 spec no longer has the field. A quick search also showed that no one seems to be using the field. (More context: the field was added long time ago with a runtime guard which had never been enabled until the guard was removed in r120574 to remove XHR_RESPONSE_BLOB on all platforms.) No new tests as no tests use this field. * xml/XMLHttpRequest.idl: Removed responseBlob field. 2012-06-25 Huang Dongsung <luxtella@company100.net> Add static qualifier to GraphicsContext3D::extractImageData. https://bugs.webkit.org/show_bug.cgi?id=89866 GraphicsContext3D::extractImageData does not use member variables. Each platform Accelerated-compositing implementation can use this method in order to get pixel data of an Image or ImageBuffer object. Reviewed by Noam Rosenthal. No new tests since there's no change on code behavior. * platform/graphics/GraphicsContext3D.h: (GraphicsContext3D): 2012-06-25 Pavel Feldman <pfeldman@chromium.org> Web Inspector: toggling style should not start property edit first. https://bugs.webkit.org/show_bug.cgi?id=89834 Reviewed by Yury Semikhatsky. Otherwise property flickers upon toggling. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype): 2012-06-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection. https://bugs.webkit.org/show_bug.cgi?id=89861 Reviewed by Vsevolod Vlasov. Upon a mousepress, Inspector should be queried for the "Inspect element" mode up-front, before dispatching a synthetic "touchstart" event. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): 2012-06-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [Styles] Cannot visually set caret before the first CSS property name character https://bugs.webkit.org/show_bug.cgi?id=89869 Reviewed by Vsevolod Vlasov. The issue was due to the "editbox" SPAN having a negative margin, thus the leftmost caret position was getting clipped by a synthetic SPAN container added by the TextPrompt. * inspector/front-end/elementsPanel.css: (.styles-section .properties > li.child-editing .webkit-css-property): (.styles-section .properties li.child-editing): 2012-06-25 Arko Saha <arko@motorola.com> Microdata: document.getItems(typeNames) is not returning Microdata items when typeNames argument is not specified. https://bugs.webkit.org/show_bug.cgi?id=89757 Reviewed by Ryosuke Niwa. With r120979 change, it creates MicroDataItemList with m_typeNames = "http://webkit.org/microdata/undefinedItemType", when typeNames argument is not specified. Modified the check in nodeMatches() accordingly. This fixes the following failing tests : fast/dom/MicroData/002.html fast/dom/MicroData/003.html fast/dom/MicroData/007.html fast/dom/MicroData/009.html fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref.html * dom/Document.cpp: (WebCore::Document::getItems): Use undefinedItemType to avoid String conversion. * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::undefinedItemType): It defines "http://webkit.org/microdata/undefinedItemType" string using DEFINE_STATIC_LOCAL to avoid String conversion. (WebCore::MicroDataItemList::MicroDataItemList): Use document() method of DynamicNodeList to obtain document of owner element. (WebCore::MicroDataItemList::~MicroDataItemList): Removed originalTypeNames null check. (WebCore::MicroDataItemList::nodeMatches): Return true if originalTypeNames is equal to undefinedItemType. * dom/MicroDataItemList.h: 2012-06-25 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing header file. 2012-06-25 Simon Hausmann <simon.hausmann@nokia.com> [Qt] Fix Win32 debug build Reviewed by Tor Arne Vestbø. Consistently use use_all_in_one_files when requested in the configuration. The previous Linux condition has been moved to Tools/qmake/mkspecs/features/unix/default_pre.prf * Target.pri: 2012-06-25 Philip Rogers <pdr@google.com> Fix rewinding of SVG animations https://bugs.webkit.org/show_bug.cgi?id=89846 Reviewed by Nikolas Zimmermann. r116451 introduced an optimization to only clear non-freeze animations when calling setCurrentTime (via reset()). This causes fill=freeze animations to not clear which breaks rewinding of an animation. In the presence of multiple animations, we reset the first animation to the base value and accumulate all results into that; this masked the problem because 2 animations were required to hit the bug (our tests primarily cover just 1). Test: svg/animations/animate-reset-freeze.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::reset): 2012-06-25 Kent Tamura <tkent@chromium.org> Change the serialization format of form control state to make the code simple https://bugs.webkit.org/show_bug.cgi?id=89847 Reviewed by Hajime Morita. We used multiple strings to represent state of single form control. It made the code complex. We change the serialization format so that one CSV string represents state. Examples in the old format: "0" "1", "value" "3", "value1", "value2,value2", "value3" Examples in the new format: "" ",value" ",value1,value2\,value2,value3" Test: fast/forms/state-restore-various-values.html * html/FormController.cpp: (WebCore::FormControlState::serialize): Generate comma-separated string. ',' in a value is serialized as "\,". We changed the signature because we don't need the out-argument. (WebCore::FormControlState::deserialize): Parses the input comma-separated string. We changed the signature because we don't need multiple input strings. (formStateSignature): Bump up the version because of the representation change. (WebCore::FormController::formElementsState): The new serialized format occupies just one string for one control. - Expected size is now 3n+1. - Use FormControlState::serialize(). (WebCore::FormController::setStateForNewFormElements): The new serialized format occupies just one string for one control. So we can check the vector size before the iteration. * html/FormController.h: (FormControlState): Change the function signatures. * html/shadow/CalendarPickerElement.cpp: (WebCore::addJavaScriptString): Use StringBuilder::appendEscaped(). 2012-06-22 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add external resources size to the native memory diagram https://bugs.webkit.org/show_bug.cgi?id=89754 Reviewed by Vsevolod Vlasov. Size of external strings and arrays is now reported through the inspector protocol and displayed on the native memory chart. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptProfiler.h: (WebCore): (WebCore::ScriptProfiler::visitJSDOMWrappers): (WebCore::ScriptProfiler::visitExternalJSStrings): (WebCore::ScriptProfiler::visitExternalJSArrays): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::visitJSDOMWrappers): (WebCore::ScriptProfiler::visitExternalJSStrings): (WebCore::ScriptProfiler::visitExternalJSArrays): (WebCore): * bindings/v8/ScriptProfiler.h: (WebCore): (ScriptProfiler): * bindings/v8/V8Binding.cpp: (WebCore::WebCoreStringResource::visitStrings): (WebCore::V8BindingPerIsolateData::visitJSExternalStrings): * bindings/v8/V8Binding.h: (WebCore): (V8BindingPerIsolateData): * inspector/BindingVisitors.h: Renamed from Source/WebCore/inspector/DOMWrapperVisitor.h. (WTF): (WebCore): (NodeWrapperVisitor): (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor): (ExternalStringVisitor): (WebCore::ExternalStringVisitor::~ExternalStringVisitor): (ExternalArrayVisitor): (WebCore::ExternalArrayVisitor::~ExternalArrayVisitor): * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::jsExternalResourcesInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-06-24 Fumitoshi Ukai <ukai@chromium.org> Unreviewed compile error fix of Chromium Win Release. Touch header files for ENABLE(CSS_VARIABLES) so that it forces to rebuild files by changing ENABLE(CSS_VARIABLES) in Sources/WebKit/chromium/features.gypi at r121129 * css/CSSParserMode.h: * css/CSSValue.h: (WebCore): * css/CSSVariableValue.h: * page/Settings.h: * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleVariableData.h: 2012-06-24 Simon Hausmann <simon.hausmann@nokia.com> [Texmap] Minor cleanup for TextureMapper::accelerationMode() https://bugs.webkit.org/show_bug.cgi?id=89825 Reviewed by Kenneth Rohde Christiansen. Replace the virtual method with a simple member variable. * platform/graphics/texmap/TextureMapper.h: (WebCore::TextureMapper::accelerationMode): (WebCore::TextureMapper::TextureMapper): (TextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperImageBuffer.h: (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer): 2012-06-24 Mike Lawther <mikelawther@chromium.org> CSS3 calc: transitions starting and ending with a calc expression move to end state https://bugs.webkit.org/show_bug.cgi?id=89738 Reviewed by Tony Chang. The equality operator for CalculationValue was not working as expected. The equality operator for OwnPtr is private, as OwnPtrs should always be different. The OwnPtrs ended up getting cast to bool before being compared, and the comparison was always returning true. The comparison between OwnPtrs has been removed. It doesn't add value to compare the raw pointers either, since OwnPtrs should always be unique. We cannot ASSERT the uniqueness though, as it is legitimate to compare a CalculationValue to itself. Test: css3/calc/transition-start-end-with-calc.html * platform/CalculationValue.h: (WebCore::CalculationValue::operator==): 2012-06-24 MORITA Hajime <morrita@google.com> NodeRenderingContext::AttachingPhase is redundant. https://bugs.webkit.org/show_bug.cgi?id=79220 Reviewed by Dimitri Glazkov. This change removes NodeRenderingContext::AttachingPhase and NodeRenderingContext::m_phase respectively. The state originally represented as m_phase is naturally encoded into other member variables. NodeRenderingContext::m_visualParentShadow is also replaced, with a local variable parentScope. Basically, what NodeRenderingContext wants to know is the parent of the composed shadow tree and an optional insertion point where the node is distributed. Once these becomes clear, m_phase is no longer required. It was rather a historical artifact. No new tests. No behavioral change. * dom/NodeRenderingContext.cpp: Replaced m_phase with implicit states. (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::parentRenderer): (WebCore::NodeRenderingContext::shouldCreateRenderer): (WebCore::NodeRenderingContext::isOnEncapsulationBoundary): (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary): * dom/NodeRenderingContext.h: (NodeRenderingContext): (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): Removed an assert which checks m_phase. (WebCore::NodeRenderingContext::resetStyleInheritance): Removed an assert which checks m_phase. * html/shadow/InsertionPoint.h: (WebCore::isInsertionPoint): Fix null case check. (WebCore::isLowerEncapsulationBoundary): Renamed from isShadowBoundary() 2012-06-24 Antti Koivisto <antti@apple.com> REGRESSION(r121124): LayoutTests/fast/block/inline-children-root-linebox-crash.html asserts https://bugs.webkit.org/show_bug.cgi?id=89844 Reviewed by Dan Bernstein. We need to check for the flipped writing mode and take the slow path if it is used. * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::pushMappingsToAncestor): 2012-06-24 Luke Macpherson <macpherson@chromium.org> Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag). https://bugs.webkit.org/show_bug.cgi?id=89542 Reviewed by Dimitri Glazkov. Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment. Updated all other css variables tests to enable the runtime flag from JS. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::CSSParser::cssVariablesEnabled): (WebCore): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserMode.h: (CSSParserContext): * page/Settings.h: (Settings): (WebCore::Settings::setCSSVariablesEnabled): (WebCore::Settings::cssVariablesEnabled): 2012-06-22 Kent Tamura <tkent@chromium.org> Selected option is not restored correctly https://bugs.webkit.org/show_bug.cgi?id=89623 Reviewed by Hajime Morita. Details of the bug: We saved a state of a <select> element as a string of which length was the size of <select>'s children. e.g. If a <select> had five children and the second and the fifth items were selected, the state string was: ".X..X" This didn't work well if the structure of the children was updated after parsing. For example, 1. A page has the following <select> initially: <select multiple> <option>Banana <option>Lemon <option>Orange <option>Strawberry <select> 2. For some reasons, <option>Apple</option> is prepended to the children. 3. Some items are selected. 4. The page is unloaded. Selection state is saved. 5. A user go back to the page again. A browser parses the page again. 6. Try to restore the <select> state with the saved data at 4. But "Apple" is missing. The <select> has wrong selections. Solution: We save the state as a set of selected values. If "Banana" and "Strawberry" are selected in the above <select>, we save two strings; "Banana" and "Strawberry", not ".X..X". Test: fast/forms/select/select-state-restore.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::saveFormControlState): Store selected value strings to a FormControlState object. (WebCore::HTMLSelectElement::searchOptionsForValue): A helper function to find an <option> with the specified value. (WebCore::HTMLSelectElement::restoreFormControlState): Clear all of selections, then select options with saved values. In order to avoid O(M x N) loop, we start searching at position we found the previous value. * html/HTMLSelectElement.h: Declare searchOptionsForValue. * html/FormController.cpp: (formStateSignature): Bump up the version because this is a incompatible change. 2012-06-24 David Barr <davidbarr@chromium.org> Add snap to css3-images image-resolution https://bugs.webkit.org/show_bug.cgi?id=89745 Reviewed by Tony Chang. Due to floating point imprecision, it is difficult to be precise in dpcm. So use PrimitiveValue::roundForImpreciseConversion rather than just floor. No new tests; extended fast/css/image-resolution/image-resolution.html * css/CSSParser.cpp: Accept snap identifier in image-resolution property. (WebCore::CSSParser::parseImageResolution): Map CSSValueSnap to identifier value from cssValuePool. * css/CSSValueKeywords.in: Add snap. * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSnap. (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSnap. (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSnap. (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueSnap to ImageResolutionSnapPixels. * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size. (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSnap() has changed. (WebCore::RenderImage::imageDimensionsChanged): Floor scale factor to int, round up if less than 0.01 away from ceiling. * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSnap in style diff. (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSnap to StyleDifferenceLayout. * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSnap, RenderStyle::setImageResolutionSnap, RenderStyle::initialImageResolutionSnap. * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSnap. * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSnap. (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSnap to default and copy constructor. (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSnap in comparison. * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSnap. (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSnap. 2012-06-24 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121106. http://trac.webkit.org/changeset/121106 https://bugs.webkit.org/show_bug.cgi?id=89841 Caused 85% performance regressions on Dromaeo/jslib-modify- jquery.html (Requested by rniwa on #webkit). * dom/Document.cpp: (WebCore::Document::clearNodeListCaches): * dom/Document.h: (Document): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): * dom/DynamicNodeList.h: (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): * dom/Node.cpp: (WebCore::Node::clearRareData): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::radioNodeList): (WebCore::NodeListsNodeData::invalidateCaches): (WebCore): (WebCore::NodeRareData::createNodeLists): * dom/NodeRareData.h: (NodeListsNodeData): (WebCore::NodeListsNodeData::adoptTreeScope): (WebCore::NodeRareData::ensureNodeLists): (NodeRareData): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): * dom/TreeScope.h: (WebCore::TreeScope::addNodeListCache): (WebCore::TreeScope::removeNodeListCache): (WebCore::TreeScope::hasNodeListCaches): (TreeScope): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): * html/LabelableElement.cpp: (WebCore::LabelableElement::labels): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): (WebCore::LabelsNodeList::~LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): (WebCore::RadioNodeList::~RadioNodeList): 2012-06-24 Adam Barth <abarth@webkit.org> Change the type of the second argument of FrameSelection::revealSelection to use RevealExtentOption https://bugs.webkit.org/show_bug.cgi?id=89833 Reviewed by Ryosuke Niwa. As requested by Ryosuke Niwa. Rare boolean parameters are hard to read. * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::revealSelectionAfterEditingOperation): * editing/Editor.h: (Editor): * editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelection): (WebCore::FrameSelection::revealSelection): * editing/FrameSelection.h: 2012-06-24 Antti Koivisto <antti@apple.com> Optimize RenderGeometryMap mappings gathering https://bugs.webkit.org/show_bug.cgi?id=89828 Reviewed by Simon Fraser. RenderGeometryMap currently gathers mappings by climbing the rendering tree. This is slow and can produce large number of mapping steps. In the common case we already have the child layer coordinates available in the layer tree and we can just use that. The combination of faster mappings gathering and fewer number of applying steps reduces time spent under RenderLayerCompositor::computeCompositingRequirements to less than half when scrolling the mobile version of twitter.com. * rendering/RenderGeometryMap.cpp: (WebCore): (WebCore::RenderGeometryMap::pushMappingsToAncestor): Use pre-computed mapping from the layer tree when possible. (WebCore::RenderGeometryMap::popMappingsToAncestor): * rendering/RenderGeometryMap.h: Add some inline capacity. (WebCore): (RenderGeometryMap): * rendering/RenderLayer.h: (WebCore::RenderLayer::canUseConvertToLayerCoords): (RenderLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): 2012-06-24 Simon Fraser <simon.fraser@apple.com> Rename isPositioned to isOutOfFlowPositioned for clarity https://bugs.webkit.org/show_bug.cgi?id=89836 Reviewed by Antti Koivisto. RenderObject and RenderStyle had an isPositioned() method that was confusing, because it excluded relative positioning. Rename to isOutOfFlowPositioned(), which makes it clearer that it only applies to absolute and fixed positioning. Simple rename; no behavior change. * css/CSSComputedStyleDeclaration.cpp: (WebCore::getPositionOffsetValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * dom/Text.cpp: (WebCore::Text::rendererIsNeeded): * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): * editing/TextIterator.cpp: (WebCore::shouldEmitNewlinesBeforeAndAfterNode): * rendering/AutoTableLayout.cpp: (WebCore::shouldScaleColumns): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::placeBoxesInInlineDirection): (WebCore::InlineFlowBox::requiresIdeographicBaseline): (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::flipLinesInBlockDirection): (WebCore::InlineFlowBox::computeOverflow): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): * rendering/InlineIterator.h: (WebCore::isIteratorTarget): * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::addChildToContinuation): (WebCore::RenderBlock::addChildToAnonymousColumnBlocks): (WebCore::RenderBlock::containingColumnsBlock): (WebCore::RenderBlock::columnsBlockForSpanningElement): (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): (WebCore::getInlineRun): (WebCore::RenderBlock::isSelfCollapsingBlock): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::addOverflowFromBlockChildren): (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): (WebCore::RenderBlock::handlePositionedChild): (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::clearFloatsIfNeeded): (WebCore::RenderBlock::simplifiedNormalFlowLayout): (WebCore::RenderBlock::isSelectionRoot): (WebCore::RenderBlock::blockSelectionGaps): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): (WebCore::RenderBlock::markSiblingsWithFloatsForLayout): (WebCore::isChildHitTestCandidate): (WebCore::InlineMinMaxIterator::next): (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): (WebCore::RenderBlock::firstLineBoxBaseline): (WebCore::RenderBlock::lastLineBoxBaseline): (WebCore::RenderBlock::updateFirstLetter): (WebCore::shouldCheckLines): (WebCore::getHeightForLineCount): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::inNormalFlow): (WebCore::RenderBlock::adjustLinePositionForPagination): (WebCore::RenderBlock::adjustBlockChildForPagination): (WebCore::RenderBlock::renderName): * rendering/RenderBlock.h: (WebCore::RenderBlock::shouldSkipCreatingRunsForObject): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::setMarginsForRubyRun): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): (WebCore::RenderBlock::computeBlockDirectionPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::requiresLineBox): (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::nextLineBreak): * rendering/RenderBox.cpp: (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): (WebCore::RenderBox::styleWillChange): (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::updateBoxModelInfoFromStyle): (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::positionLineBox): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::renderBoxRegionInfo): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::availableLogicalHeightUsing): (WebCore::percentageLogicalHeightIsResolvable): * rendering/RenderBox.h: (WebCore::RenderBox::stretchesToViewport): (WebCore::RenderBox::isDeprecatedFlexItem): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent): (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): * rendering/RenderBoxModelObject.h: (WebCore::RenderBoxModelObject::requiresLayer): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::childDoesNotAffectWidthOrFlexing): (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::renderName): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::findLegend): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis): (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::computeNextFlexLine): (WebCore::RenderFlexibleBox::resolveFlexibleLengths): (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::layoutColumnReverse): (WebCore::RenderFlexibleBox::adjustAlignmentForChild): (WebCore::RenderFlexibleBox::flipForRightToLeftColumn): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::renderName): * rendering/RenderImage.cpp: (WebCore::RenderImage::computeIntrinsicRatioInformation): * rendering/RenderInline.cpp: (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::addChildToContinuation): (WebCore::RenderInline::generateCulledLineBoxRects): (WebCore): (WebCore::RenderInline::culledInlineFirstLineBox): (WebCore::RenderInline::culledInlineLastLineBox): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): (WebCore::RenderInline::computeRectForRepaint): (WebCore::RenderInline::dirtyLineBoxes): * rendering/RenderLayer.cpp: (WebCore::checkContainingBlockChainForPagination): (WebCore::RenderLayer::updateLayerPosition): (WebCore::isPositionedContainer): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::shouldBeNormalFlowOnly): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderListItem.cpp: (WebCore::getParentOfFirstLineBox): * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::renderName): * rendering/RenderObject.cpp: (WebCore::RenderObject::markContainingBlocksForLayout): (WebCore::RenderObject::setPreferredLogicalWidthsDirty): (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths): (WebCore::RenderObject::styleWillChange): (WebCore::RenderObject::offsetParent): * rendering/RenderObject.h: (WebCore::RenderObject::isOutOfFlowPositioned): (WebCore::RenderObject::isInFlowPositioned): (WebCore::RenderObject::hasClip): (WebCore::RenderObject::isFloatingOrOutOfFlowPositioned): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/RenderReplaced.cpp: (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::rubyText): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): (WebCore::RenderTable::computeLogicalWidth): (WebCore::RenderTable::layout): * rendering/style/RenderStyle.h: 2012-06-24 Oli Lan <olilan@chromium.org> After Editor::setComposition is called, input should scroll to the end of the composition. https://bugs.webkit.org/show_bug.cgi?id=88999 Reviewed by Ryosuke Niwa. This fixes an issue where after a call to setComposition, the start of the composition is revealed (scrolled to) instead of the end (where the caret/editing point should be). The change is to allow revealSelectionAfterEditingOperation to take a revealExtent parameter, and to pass that parameter as true when calling from setIgnoreCompositionSelectionChange, which is called at the end of setComposition. Test: fast/forms/input-set-composition-scroll.html * editing/Editor.cpp: (WebCore::Editor::revealSelectionAfterEditingOperation): (WebCore::Editor::setIgnoreCompositionSelectionChange): * editing/Editor.h: (Editor): 2012-06-24 Joshua Bell <jsbell@chromium.org> Web Inspector: Simplify InspectorIndexedDBAgent to use IDB metadata API https://bugs.webkit.org/show_bug.cgi?id=89495 Reviewed by Vsevolod Vlasov. No new tests - no functional changes. * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-06-24 Pavel Feldman <pfeldman@chromium.org> Web Inspector: speed up Timeline and Elements panel rendering https://bugs.webkit.org/show_bug.cgi?id=89771 Reviewed by Yury Semikhatsky. I used timeline panel to find unnecessary style operations. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.updateTitle): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._updateEventDividers): (WebInspector.TimelinePanel.prototype._updateFrames): (WebInspector.TimelinePanel.prototype.sidebarResized): (WebInspector.TimelinePanel.prototype.onResize): (WebInspector.TimelinePanel.prototype._onScroll): (WebInspector.TimelinePanel.prototype._refresh): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelinePanel.prototype._adjustScrollPosition): 2012-06-23 Ryosuke Niwa <rniwa@webkit.org> Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+) https://bugs.webkit.org/show_bug.cgi?id=73853 Reviewed by Anders Carlsson and Ojan Vafai. Invalidate all node lists at document level to avoid having to walk up the DOM tree in the invalidation. In particular, this makes appending node O(1) with respect to the depth of the tree in common cases when we have node lists somewhere in the tree scope. We now invalidate more node lists than we used to but it shouldn't matter much in practice because most websites don't add or remove nodes or modify relevant attributes while iterating through node lists. The change would also register each node list to document thereby consuming one extra pointer, however, this should not have a significant memory impact given we used to do it unintentionally until I fixed it in r110797 three months ago. Also, RadioNodeList and LabelsNodeList had always been invalidated at document level so this refactoring also allows us to move calls to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList in those node lists to DynamicSubtreeNodeList, and even delete NodeListsNodeData::invalidateCaches(). In addition, removed m_numNodeListCaches from TreeScope since it was only used to avoid walking up the ancestors in invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged but we don't walk up the ancestors any more. Also note that m_listsInvalidatedAtDocument tells us exactly how many node lists are present for each document. * dom/Document.cpp: (WebCore::Document::clearNodeListCaches): Optionally takes a qualified attribute name so that we don't have to invalidate tag node lists when only attributes are modified. * dom/Document.h: (Document): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Calls unregisterDynamicSubtreeNodeList. * dom/DynamicNodeList.h: (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Calls registerDynamicSubtreeNodeList. * dom/Node.cpp: (WebCore::Node::clearRareData): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): No longer walks up the tree to invalidate node list caches. All invalidations are done in Document::clearNodeListCaches. (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto. (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::radioNodeList): (WebCore): (WebCore::NodeRareData::createNodeLists): * dom/NodeRareData.h: (NodeListsNodeData): (WebCore::NodeListsNodeData::adoptTreeScope): Invalidate node list caches while registering and unregistering node lists from old and new documents respectively now that invalidateCaches() has been (WebCore::NodeRareData::ensureNodeLists): (NodeRareData): * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): * dom/TreeScope.h: (TreeScope): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): * html/LabelableElement.cpp: (WebCore::LabelableElement::labels): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): (WebCore::LabelsNodeList::~LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): (WebCore::RadioNodeList::~RadioNodeList): 2012-06-23 Ryosuke Niwa <rniwa@webkit.org> Clang and cl.exe build fix after r121103. Don't inherit from WTF::PairHash<unsigned char, StringType>. * dom/NodeRareData.h: 2012-06-23 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r120979): getElementsByTagName is 12% slower https://bugs.webkit.org/show_bug.cgi?id=89783 Reviewed by Darin Adler. The problem is that hashing std::pair<unsigned short, AtomicString> is very slow compared to just hashing AtomicString, which internally holds a hash already. Fixed the regression by replacing the default hash function by the one that computes AtomicString's hash + list type. This is okay because we only have 7 node list types at the moment. * dom/NodeRareData.h: (NodeListsNodeData): (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash): (NodeListCacheMapEntryHash): (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal): (WebCore::NodeListsNodeData::namedNodeListKey): 2012-06-23 Dan Bernstein <mitz@apple.com> RenderText’s minimum preferred width is incorrect automatic hyphenation is used https://bugs.webkit.org/show_bug.cgi?id=89814 Reviewed by Sam Weinig. Test: fast/text/hyphen-min-preferred-width.html * rendering/RenderText.cpp: (WebCore::maxWordFragmentWidth): Added this helper function. It returns the width of the widest hyphenated fragment of the word (except for the suffix after the last hyphen) and the offset of the last hyphenation opportunity. (WebCore::RenderText::computePreferredLogicalWidths): Changed this function to consider the widths of hyphenated word fragments rather than entire words when computing the minimum width. Because hyphenating and measuring all fragments is expensive, hyphenation is only attempted if the unhyphenated word is wider than the current minimum width. 2012-06-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r121058. http://trac.webkit.org/changeset/121058 https://bugs.webkit.org/show_bug.cgi?id=89809 Patch causes plugins tests to crash in GTK debug builds (Requested by zdobersek on #webkit). * bindings/js/GCController.cpp: (WebCore::collect): (WebCore::GCController::garbageCollectSoon): (WebCore::GCController::garbageCollectNow): (WebCore::GCController::discardAllCompiledCode): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::nodeAsScriptValue): (WebCore::JSInjectedScriptHost::inspectedObject): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::canAccessInspectedWindow): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: (WebCore::JSRequestAnimationFrameCallback::handleEvent): * bindings/js/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::evaluate): * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::recompileAllJSFunctions): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): (WebCore::ScriptCachedFrameData::restore): (WebCore::ScriptCachedFrameData::clear): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): (WebCore::ScriptController::clearWindowShell): (WebCore::ScriptController::initScript): (WebCore::ScriptController::updateDocument): (WebCore::ScriptController::cacheableBindingRootObject): (WebCore::ScriptController::bindingRootObject): (WebCore::ScriptController::windowScriptNPObject): (WebCore::ScriptController::jsObjectForPluginElement): (WebCore::ScriptController::clearScriptObjects): * bindings/js/ScriptControllerMac.mm: (WebCore::ScriptController::windowScriptObject): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): (WebCore::eventListenerHandlerLocation): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptCallArgumentHandler::appendArgument): (WebCore::ScriptFunctionCall::call): (WebCore::ScriptFunctionCall::construct): (WebCore::ScriptCallback::call): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): (WebCore::ScriptGlobalObject::get): (WebCore::ScriptGlobalObject::remove): * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::getString): (WebCore::ScriptValue::toInspectorValue): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): (WebCore::WorkerScriptController::initScript): (WebCore::WorkerScriptController::evaluate): (WebCore::WorkerScriptController::disableEval): * bindings/objc/WebScriptObject.mm: (_didExecute): (-[WebScriptObject _setImp:originRootObject:rootObject:]): (-[WebScriptObject _setOriginRootObject:andRootObject:]): (-[WebScriptObject dealloc]): (-[WebScriptObject finalize]): (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): (-[WebScriptObject hasWebScriptKey:]): (-[WebScriptObject stringRepresentation]): (-[WebScriptObject webScriptValueAtIndex:]): (-[WebScriptObject setWebScriptValueAtIndex:value:]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithNoParam): (WebCore::JSTestCallback::callbackWithClass1Param): (WebCore::JSTestCallback::callbackWithClass2Param): (WebCore::JSTestCallback::callbackWithStringList): (WebCore::JSTestCallback::callbackWithBoolean): (WebCore::JSTestCallback::callbackRequiresThisToPass): * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::~CClass): (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::getPropertyNames): * bridge/c/c_runtime.cpp: (JSC::Bindings::CField::valueFromInstance): (JSC::Bindings::CField::setValueToInstance): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): (JSC::Bindings::convertNPVariantToValue): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::getSlot): (JavaJSObject::setSlot): (JavaJSObject::toString): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): (JavaClass::~JavaClass): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::stringValue): * bridge/jni/jsc/JavaMethodJSC.cpp: (appendClassName): (JavaMethod::signature): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaString::JavaString): (JSC::Bindings::JavaString::~JavaString): (JSC::Bindings::JavaString::utf8): (JSC::Bindings::JavaString::init): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::createRuntimeObject): (JSC::Bindings::Instance::newRuntimeObject): * bridge/objc/objc_instance.mm: (ObjcInstance::moveGlobalExceptionToExecState): (ObjcInstance::invokeObjcMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::ObjcField::setValueToInstance): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): (JSC::Bindings::convertNSStringToString): (JSC::Bindings::convertObjcValueToValue): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getQtInstance): (JSC::Bindings::QtInstance::newRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): * plugins/PluginView.cpp: (WebCore::PluginView::start): (WebCore::PluginView::stop): (WebCore::PluginView::performRequest): (WebCore::PluginView::npObject): (WebCore::PluginView::privateBrowsingStateChanged): * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): (WebCore::PluginView::getWindowInfo): * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::dispatchNPEvent): * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/mac/PluginViewMac.mm: (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::dispatchNPEvent): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowRect): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): 2012-06-23 Allan Sandfeld Jensen <allan.jensen@nokia.com> Store hit-test rect in HitTestPoint as Rect. https://bugs.webkit.org/show_bug.cgi?id=89454 Reviewed by Darin Adler. Calculate the rectangle early and store that instead of padding to avoid recalculating the rectangle for every single element hit tested. No change in functionality. No new tests. * page/EventHandler.cpp: (WebCore::EventHandler::bestClickableNodeForTouchPoint): (WebCore::EventHandler::bestZoomableAreaForTouchPoint): * rendering/HitTestResult.cpp: (WebCore::HitTestPoint::HitTestPoint): (WebCore::HitTestPoint::operator=): (WebCore::HitTestPoint::setPoint): (WebCore::hitTestPointIntersects): (WebCore::HitTestPoint::intersects): (WebCore::HitTestResult::addNodeToRectBasedTestResult): * rendering/HitTestResult.h: (HitTestPoint): (WebCore::HitTestPoint::boundingBox): (WebCore::HitTestPoint::topPadding): (WebCore::HitTestPoint::rightPadding): (WebCore::HitTestPoint::bottomPadding): (WebCore::HitTestPoint::leftPadding): (HitTestResult): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hitTestColumns): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): 2012-06-22 Benjamin Poulain <bpoulain@apple.com> Text with text-overflow:ellipsis and text-align:right is left aligned https://bugs.webkit.org/show_bug.cgi?id=88705 Reviewed by Dan Bernstein. When building the line of a text with overflow, we do not know if we can place an ellipsis and where it should be. Because of that, text is laid out as if it does not have text-overflow: ellipsis. This causes problems with text-alignement right in LTR and left in RTL. The shortened text did not follow the allignment. This patch changes the position of lines with ellipsis after layout to follow the allignment. In RenderBlock::checkLinesForTextOverflow(), the call to RootInlineBox::placeEllipsis() now also gives the width of the truncated text. We use this width to re-compute the alignement and shift the box if necessary. In RenderBlock::deleteEllipsisLineBoxes() we revert the text to the position computed with the total width. This way all layout computation is done as usual. Tests: fast/css/text-overflow-ellipsis-text-align-left.html fast/css/text-overflow-ellipsis-text-align-right.html * rendering/InlineBox.cpp: (WebCore::InlineBox::canAccommodateEllipsis): Make the method const for readability, truncating is done later in placeEllipsisBox(). (WebCore::InlineBox::placeEllipsisBox): Add an output argument, truncatedWidth, giving the width of the text + ellipsis after truncation (if any truncation can be done). * rendering/InlineBox.h: (InlineBox): * rendering/InlineFlowBox.cpp: (WebCore::InlineBox::adjustLogicalPosition): adjustPosition() logical coordinates. (WebCore::InlineFlowBox::canAccommodateEllipsis): (WebCore::InlineFlowBox::placeEllipsisBox): * rendering/InlineFlowBox.h: (InlineFlowBox): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::placeEllipsisBox): * rendering/InlineTextBox.h: (InlineTextBox): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::deleteEllipsisLineBoxes): In addition to removing the truncation, we need to revert the shift introduced by checkLinesForTextOverflow(). This restore the lines to its original, untruncated position in order to layout the block correctly in RenderBlock::layoutInlineChildren(). (WebCore::RenderBlock::checkLinesForTextOverflow): After we truncate the text, we now recompute the shift we need for alignment, and move the line accordingly. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): Return the width of the truncated text + the width of the ellipsis. (WebCore::RootInlineBox::placeEllipsisBox): (WebCore::RootInlineBox::adjustPosition): * rendering/RootInlineBox.h: (RootInlineBox): 2012-06-22 Eugene Klyuchnikov <eustas.big@gmail.com> Web Inspector: Fix negative time interval on zoom-in https://bugs.webkit.org/show_bug.cgi?id=89798 Reviewed by Pavel Feldman. Steps to reproduce: 1) Record timeline 2) Select small range with left tick close to zero 3) Move pointer to the right end of the ruler 4) Zoom-in with mouse-wheel Result: right tick goes below the zero. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._zoom): 2012-06-22 Alexandru Chiculita <achicu@adobe.com> [CSS Shaders] Re-enable the CSS Shaders compile time flag on Safari Mac https://bugs.webkit.org/show_bug.cgi?id=89781 Reviewed by Dean Jackson. Added ENABLE_CSS_SHADERS flag as enabled by default on Safari for Mac. No new tests, just re-enabled existing tests. * css/CSSValueKeywords.in: Added empty line to force a rebuild of the file on the EWS. * Configurations/FeatureDefines.xcconfig: 2012-06-22 David Grogan <dgrogan@chromium.org> IndexedDB: Avoid infinite loop if we try to encode -1 for leveldb https://bugs.webkit.org/show_bug.cgi?id=89625 It gets worse, memory is allocated inside the loop so the process is eventually killed by the OS. Reviewed by Tony Chang. Added tests to Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::encodeInt): (WebCore::IDBLevelDBCoding::encodeVarInt): 2012-06-22 Hayato Ito <hayato@chromium.org> [Shadow] ShadowRoot.activeElement should use the result of re-targeting algorithm. https://bugs.webkit.org/show_bug.cgi?id=89763 Reviewed by Dimitri Glazkov. Use the result of the re-targeting algorithm in calculating shadow root's activeElement so that ShadowRoot.activeElement returns a focused distributed node correctly as the algorithm says. The spec is: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#active-element Tests: fast/dom/shadow/shadow-root-activeElement.html * dom/EventDispatcher.cpp: (WebCore): (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): * dom/TreeScope.cpp: (WebCore::TreeScope::focusedNode): * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::contains): 2012-06-22 James Robinson <jamesr@chromium.org> [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode. https://bugs.webkit.org/show_bug.cgi?id=89045 Reviewed by Adrienne Walker. Based on patch by Michal Mocny <mmocny@google.com>. Invariants: 1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for compositeAndReadback, regardless of threaded vs non-threaded mode 2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to make a frame and is always set to a non-zero value 3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread. Non-zero allocations are met in the next frame, whenever we would produce that frame according to our usual frame scheduling logic. 4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all whenever it likes without needing the main thread to be responsive. Details: There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame scheduling for the !visible case. The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really important. Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when not visible. This already happens in the single threaded path thanks to render_widget so the only change is to the threaded path. The difficulty here is we might post a beginFrame task from the impl thread and then get a setVisible(false) call on the main thread before the beginFrame task runs. Since I'm making the setVisible() call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main thread we can know that the impl thread's notion of visibility is in sync with the main threads. Thus I'm planning to simply abort the frame before doing any processing on the main thread. The scheduler will know if it gets a beginFrameAborted and COMMIT_STATE_IDLE. compositeAndReadback is special - this call currently does come in when we aren't visible (in single and threaded mode) and we need to service it. In particular, we need to send a beginFrame over and have it not be ignored on the main thread. For this I'm thinking of having the proxy keep track of whether it's servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame normally. On the impl side, we need a few changes. First, we have to allocate a default framebuffer (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the readPixels(). Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and again remember to delete the textures after the readPixels(). Third, we have to know that the beginFrame is a forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame. For this, I think I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to drop resources after the readback. It's probably a good time to stop swapping on readbacks too.... The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on the updateLayers(). Since we only make frames when we are visible and we never have a zero allocation when visible (thanks to the frame scheduling changes above), this value is always non-zero. The other thing the texture manager needs to know about is if we've killed all of the underlying textures from the impl thread - this bit is passed in by the proxy before the updateLayers() call. This means if we're running while visible and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new budget. When the commit completes we'll get notified on the impl thread of which textures the contents texture manager decided to evict and issue the deleteTexture() calls on them. The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet. On compositor initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first frame. I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we can get to it when we get to making the next frame. If we wanted to satisfy reduced texture budgets directly from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete based on that. Let's worry about that later. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::setGpuMemoryAllocation): (WebCore): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::getFramebufferPixels): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::evictAndRemoveAllDeletedTextures): (WebCore): * platform/graphics/chromium/TextureManager.h: (TextureAllocator): (TextureManager): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): (WebCore): (WebCore::TrackingTextureAllocator::deleteAllTextures): * platform/graphics/chromium/TrackingTextureAllocator.h: (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::evictAllContentTextures): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore): (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit): (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::beginFrameComplete): (WebCore::CCScheduler::beginFrameAborted): (WebCore): (WebCore::CCScheduler::didSwapBuffersComplete): (WebCore::CCScheduler::didLoseContext): (WebCore::CCScheduler::didRecreateContext): (WebCore::CCScheduler::vsyncTick): * platform/graphics/chromium/cc/CCScheduler.h: (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::beginFrameAborted): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setVisible): (WebCore): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::setVisible): (WebCore): (WebCore::CCThreadProxy::setVisibleOnImplThread): (WebCore::CCThreadProxy::scheduledActionBeginFrame): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): (BeginFrameAndCommitState): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (FramePlane): 2012-06-22 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION(r116446): Crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent https://bugs.webkit.org/show_bug.cgi?id=89785 Reviewed by Abhishek Arya. Test: fullscreen/full-screen-crash-offsetLeft.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent): Added a NULL-check for parent() as it can be NULL in fullscreen mode. Also updated a stale comment while touching the code. 2012-06-22 Kenneth Russell <kbr@google.com> Unreviewed, rolling out r121064. http://trac.webkit.org/changeset/121064 https://bugs.webkit.org/show_bug.cgi?id=88268 Broke Chromium Mac build. * WebCore.gypi: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::updateAnimations): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (WebCore::CCLayerTreeHost::frameNumber): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::frameNumber): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (WebCore): (CCProxy): * platform/graphics/chromium/cc/CCRenderingStats.h: Removed. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-06-22 Ryuan Choi <ryuan.choi@samsung.com> [EFL][WK2] Support keyboard event https://bugs.webkit.org/show_bug.cgi?id=89268 Reviewed by Chang Shu. Extract keyDownCommandsMap and keyPressCommandsMap to share WebKit1/Efl and WebKit2/Efl. * platform/efl/EflKeyboardUtilities.cpp: (WebCore): (WebCore::keyDownCommandsMap): (WebCore::keyPressCommandsMap): (KeyDownEntry): (KeyPressEntry): (WebCore::createKeyDownCommandMap): (WebCore::createKeyPressCommandMap): (WebCore::getKeyDownCommandName): (WebCore::getKeyPressCommandName): * platform/efl/EflKeyboardUtilities.h: (WebCore): 2012-06-22 Alec Flett <alecflett@chromium.org> IndexedDB: refactor index-writing to be more self-contained https://bugs.webkit.org/show_bug.cgi?id=89607 Reviewed by Tony Chang. Refactor index-writing into the IndexWriter class. Does not change existing behavior but begins migrating index-writing logic into a self-contained class that can eventually be used in the frontend (renderer) side of IndexedDB. No new tests, behavior is unchanged. * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::populateIndex): 2012-06-22 Dave Tu <dtu@chromium.org> [chromium] Expose rendering statistics to WebWidget. https://bugs.webkit.org/show_bug.cgi?id=88268 Reviewed by James Robinson. The WebKit side of a basic framework for exposing rendering statistics to Chromium's --enable-benchmarking extension. * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::implFrameNumber): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::implFrameNumber): (WebCore): (WebCore::CCThreadProxy::implFrameNumberOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-06-22 Shawn Singh <shawnsingh@chromium.org> [chromium] Do not accumulate occlusion from 3d layers on the main thread https://bugs.webkit.org/show_bug.cgi?id=89704 Reviewed by James Robinson. Layer iterators on the main thread may not iterate over 3d layers in correct front-to-back or back-to-front order, because layer sorting is not performed on the main thread. As a result, occlusion tracking can accidentally think something is occluded if a 3d layer is processed out of order. This patch choses to solve this by avoiding accumulating occlusion for 3d layers. It may be appropriate later to consider adding layer sorting on the main thread, but for now that seemed like an unnecessary heavy-handed approach. In addition to a new unit test that covers this, other unit tests were changed to work on the impl thread, so that the 3d layers still accumulate occlusion as required. Unit test added to CCOcclusionTrackerTest: CCOcclusionTrackerTestUnsorted3dLayers * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::layerIsInUnsorted3dRenderingContext): (WebCore): (WebCore::::markOccludedBehindLayer): 2012-06-22 Joshua Bell <jsbell@chromium.org> IndexedDB: Snapshot metadata in front end to avoid IPC round-trips https://bugs.webkit.org/show_bug.cgi?id=88467 Reviewed by Tony Chang. Define a new type (IDBDatabaseMetadata) that captures the "schema" of an IDB database (name, version, properties of stores, properties of indexes). Add a method for the front end to request this from the back end once up front to avoid later calls (which may be slow IPC calls in ports). Implement IDB spec logic that the metadata should be frozen for a particular IDBDatabase connection, and only change within a version change transaction, and the spec's funky requirement for aborted version change transactions. Test: storage/indexeddb/metadata.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): Fetch metadata from back end when connection is created. (WebCore::IDBDatabase::transactionCreated): (WebCore::IDBDatabase::transactionFinished): Update metadata at the end of a transaction in case it was rolled back. (WebCore::IDBDatabase::objectStoreNames): Move implementation to front-end. (WebCore): (WebCore::IDBDatabase::createObjectStore): Update local copy of metadata. (WebCore::IDBDatabase::deleteObjectStore): Update local copy of metadata. * Modules/indexeddb/IDBDatabase.h: (WebCore::IDBDatabase::name): Move implementation to front-end. (WebCore::IDBDatabase::version): Move implementation to front-end. (IDBDatabase): (WebCore::IDBDatabase::metadata): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::metadata): Construct a metadata snapshot. (WebCore): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (WebCore): (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBIndex.cpp: Store a copy of the metadata, which will never change during the lifetime of the index. (WebCore::IDBIndex::IDBIndex): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::create): (WebCore::IDBIndex::name): Move implementation to front-end. (WebCore::IDBIndex::objectStore): Return RefPtr (unrelated tidying). (WebCore::IDBIndex::keyPath): Move implementation to front-end. (WebCore::IDBIndex::unique): Move implementation to front-end. (WebCore::IDBIndex::multiEntry): Move implementation to front-end. (IDBIndex): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::metadata): Construct a metadata snapshot. (WebCore): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBMetadata.h: Added new structs. (WebCore): (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata): (IDBDatabaseMetadata): (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata): (IDBObjectStoreMetadata): (WebCore::IDBIndexMetadata::IDBIndexMetadata): (IDBIndexMetadata): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::IDBObjectStore): Store a "live" copy of the metadata, and and copy in case of an aborted version change transaction. (WebCore::IDBObjectStore::indexNames): Move implementation to front-end. (WebCore::IDBObjectStore::createIndex): Update metadata to include new index. (WebCore::IDBObjectStore::index): Pass along metadata to instance constructor. (WebCore::IDBObjectStore::deleteIndex): Delete index from metadata. * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::create): (WebCore::IDBObjectStore::name): Move implementation to front-end. (WebCore::IDBObjectStore::keyPath): Move implementation to front-end. (WebCore::IDBObjectStore::transaction): Return RefPtr (unrelated tidying). (WebCore::IDBObjectStore::autoIncrement): Move implementation to front-end. (WebCore::IDBObjectStore::metadata): Allow copying the metadata, in case of abort. (WebCore::IDBObjectStore::resetMetadata): Allow setting the metadata, in case of abort. (IDBObjectStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::metadata): Construct a metadata snapshot. (WebCore): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore): (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): Pass along metadata to instance constructor. (WebCore::IDBTransaction::objectStoreCreated): Track stores changed during transaction. (WebCore::IDBTransaction::objectStoreDeleted):Track stores changed during transaction. (WebCore::IDBTransaction::onAbort): Revert stores metadata potentially changed during transaction. * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * WebCore.gypi: 2012-06-20 Mark Hahnenberg <mhahnenberg@apple.com> JSLock should be per-JSGlobalData https://bugs.webkit.org/show_bug.cgi?id=89123 Reviewed by Gavin Barraclough. No new tests. Current regression tests are sufficient. Changed all sites that used JSLock to instead use the new JSLockHolder and pass in the correct JS context that the code is about to interact with that needs protection. Also added a couple JSLocks to places that didn't already have it that needed it. * bindings/js/GCController.cpp: (WebCore::collect): (WebCore::GCController::garbageCollectSoon): (WebCore::GCController::garbageCollectNow): (WebCore::GCController::discardAllCompiledCode): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::nodeAsScriptValue): (WebCore::JSInjectedScriptHost::inspectedObject): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::canAccessInspectedWindow): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: (WebCore::JSRequestAnimationFrameCallback::handleEvent): * bindings/js/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::evaluate): * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::recompileAllJSFunctions): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): (WebCore::ScriptCachedFrameData::restore): (WebCore::ScriptCachedFrameData::clear): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): (WebCore::ScriptController::clearWindowShell): (WebCore::ScriptController::initScript): (WebCore::ScriptController::updateDocument): (WebCore::ScriptController::cacheableBindingRootObject): (WebCore::ScriptController::bindingRootObject): (WebCore::ScriptController::windowScriptNPObject): (WebCore::ScriptController::jsObjectForPluginElement): (WebCore::ScriptController::clearScriptObjects): * bindings/js/ScriptControllerMac.mm: (WebCore::ScriptController::windowScriptObject): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): (WebCore::eventListenerHandlerLocation): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptCallArgumentHandler::appendArgument): (WebCore::ScriptFunctionCall::call): (WebCore::ScriptFunctionCall::construct): (WebCore::ScriptCallback::call): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): (WebCore::ScriptGlobalObject::get): (WebCore::ScriptGlobalObject::remove): * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::getString): (WebCore::ScriptValue::toInspectorValue): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): (WebCore::WorkerScriptController::initScript): (WebCore::WorkerScriptController::evaluate): (WebCore::WorkerScriptController::disableEval): * bindings/objc/WebScriptObject.mm: (_didExecute): (-[WebScriptObject _setImp:originRootObject:rootObject:]): (-[WebScriptObject _setOriginRootObject:andRootObject:]): (-[WebScriptObject dealloc]): (-[WebScriptObject finalize]): (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): (-[WebScriptObject hasWebScriptKey:]): (-[WebScriptObject stringRepresentation]): (-[WebScriptObject webScriptValueAtIndex:]): (-[WebScriptObject setWebScriptValueAtIndex:value:]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithNoParam): (WebCore::JSTestCallback::callbackWithClass1Param): (WebCore::JSTestCallback::callbackWithClass2Param): (WebCore::JSTestCallback::callbackWithStringList): (WebCore::JSTestCallback::callbackWithBoolean): (WebCore::JSTestCallback::callbackRequiresThisToPass): * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): (_NPN_Enumerate): (_NPN_Construct): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::~CClass): (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::moveGlobalExceptionToExecState): (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::getPropertyNames): * bridge/c/c_runtime.cpp: (JSC::Bindings::CField::valueFromInstance): (JSC::Bindings::CField::setValueToInstance): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): (JSC::Bindings::convertNPVariantToValue): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::getSlot): (JavaJSObject::setSlot): (JavaJSObject::toString): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): (JavaClass::~JavaClass): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::stringValue): * bridge/jni/jsc/JavaMethodJSC.cpp: (appendClassName): (JavaMethod::signature): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaString::JavaString): (JSC::Bindings::JavaString::~JavaString): (JSC::Bindings::JavaString::utf8): (JSC::Bindings::JavaString::init): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::createRuntimeObject): (JSC::Bindings::Instance::newRuntimeObject): * bridge/objc/objc_instance.mm: (ObjcInstance::moveGlobalExceptionToExecState): (ObjcInstance::invokeObjcMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::ObjcField::setValueToInstance): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): (JSC::Bindings::convertNSStringToString): (JSC::Bindings::convertObjcValueToValue): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getQtInstance): (JSC::Bindings::QtInstance::newRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::call): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): * plugins/PluginView.cpp: (WebCore::PluginView::start): (WebCore::PluginView::stop): (WebCore::PluginView::performRequest): (WebCore::PluginView::npObject): (WebCore::PluginView::privateBrowsingStateChanged): * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): (WebCore::PluginView::getWindowInfo): * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::dispatchNPEvent): * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/mac/PluginViewMac.mm: (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::dispatchNPEvent): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformStart): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowRect): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dropProtection): 2012-06-22 Jeff Timanus <twiz@chromium.org> [Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D instances to WebGL textures. https://bugs.webkit.org/show_bug.cgi?id=86275 This change adds the necessary plumbing to the various rendering contexts to copy the backing store texture of a Canvas2D instance to be copied to a WebGL texture. The GL_CHROMIUM_copy_texture extension is necessary because the backing-store for a GPU-accelerated skia Canvas2D is normally in BGRA format, which is not supported by glCopyTexImage. Reviewed by Kenneth Russell. Test: fast/canvas/webgl/* * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::texImage2D): * platform/chromium/support/Extensions3DChromium.cpp: (WebCore::Extensions3DChromium::copyTextureCHROMIUM): (WebCore): * platform/graphics/Extensions3D.h: (Extensions3D): * platform/graphics/ImageBuffer.cpp: (WebCore): (WebCore::ImageBuffer::copyToPlatformTexture): * platform/graphics/ImageBuffer.h: (WebCore): (ImageBuffer): * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::Canvas2DLayerBridge::backBufferTexture): (WebCore): * platform/graphics/chromium/Canvas2DLayerBridge.h: (Canvas2DLayerBridge): * platform/graphics/chromium/Extensions3DChromium.h: (Extensions3DChromium): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM): (WebCore): * platform/graphics/opengl/Extensions3DOpenGL.h: (Extensions3DOpenGL): * platform/graphics/qt/Extensions3DQt.cpp: (WebCore::Extensions3DQt::copyTextureCHROMIUM): (WebCore): * platform/graphics/qt/Extensions3DQt.h: (Extensions3DQt): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::copyToPlatformTexture): (WebCore): 2012-06-22 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> Add url to supportsType https://bugs.webkit.org/show_bug.cgi?id=89514 Reviewed by Eric Carlson. No new tests since there's no change on code behavior. When a blob is created as the address for a Media Stream, the MediaEngine will ask it's players if they support that media. However, a player built for MediaStream needs to know to URL to decide if it's supported or not. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): (WebCore::HTMLMediaElement::selectNextSourceChild): * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (MediaPlayerFactory): (WebCore::MediaPlayerFactory::MediaPlayerFactory): (WebCore): (WebCore::textPlain): (WebCore::bestMediaEngineForTypeAndCodecs): (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::loadWithNextMediaEngine): (WebCore::MediaPlayer::paint): (WebCore::MediaPlayer::supportsType): * platform/graphics/MediaPlayer.h: (WebCore): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: (MediaPlayerPrivateAVFoundationCF): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: (MediaPlayerPrivateAVFoundationObjC): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::supportsType): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::supportsType): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::supportsType): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-06-22 Joshua Netterfield <jnetterfield@rim.com> [BlackBerry] Sanitize GLSL code using ANGLE. BlackBerry port does not sanitize GLSL code with ANGLE https://bugs.webkit.org/show_bug.cgi?id=89583 Reviewed by Rob Buis. No new tests are required. * CMakeLists.txt: Added ANGLE requirment for CMake builds with WEBGL * platform/graphics/ANGLEWebKitBridge.h: Added include for ANGLE/ShaderLang.h in BlackBerry platform. * platform/graphics/GraphicsContext3D.h: Added include for ANGLEWebKitBridge.h in BlackBerry platform. 2012-06-22 Dan Bernstein <mitz@apple.com> RenderText’s minimum preferred width is incorrect when soft hyphens are used https://bugs.webkit.org/show_bug.cgi?id=89775 Reviewed by Simon Fraser. Test: fast/text/soft-hyphen-min-preferred-width.html * rendering/RenderText.cpp: (WebCore::hyphenWidth): Added this helper function. (WebCore::RenderText::computePreferredLogicalWidths): In places where this function tests for the soft hyphen character, added a check that the 'hyphens' style property is not set to 'none', because in that case soft hyphens are not break opportunities. Also added an explicit check to suppress break opportunities from isBreakable() if the occur after a soft hyphen and 'hyphens' is set to 'none'. Finally, when measuring text up to a potential line break, added the width of the hyphen string when needed. 2012-06-22 Dean Jackson <dino@apple.com> BitmapImage duplicates code to calculate size https://bugs.webkit.org/show_bug.cgi?id=89728 <rdar://problem/11724321> Reviewed by Darin Adler. Add a new updateSize method to BitmapImage that avoids duplication in the size and sizeRespectingOrientation methods. No new tests needed. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::updateSize): new method that will set m_size and m_sizeRespectingOrientation if necessary. (WebCore): (WebCore::BitmapImage::size): (WebCore::BitmapImage::sizeRespectingOrientation): these each now call updateSize rather than duplicate the update code. * platform/graphics/BitmapImage.h: (BitmapImage): 2012-06-22 Erik Arvidsson <arv@chromium.org> [V8] Clean up visitDOMWrapper code https://bugs.webkit.org/show_bug.cgi?id=89774 Reviewed by Tony Chang. This moves the check if domWrapperVisitorFunction is null into a function of the WrapperTypeInfo struct. This is so that users of WrapperTypeInfo does not need to know about the inner details of the struct. It also makes things more consistent since the other fields in the struct have these kind of functions. This is a follow up change to http://trac.webkit.org/changeset/120854. No new tests. Covered by existing tests. * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): Call WrapperTypeInfo::visitDOMWrapper instead. * bindings/v8/WrapperTypeInfo.h: (WrapperTypeInfo): (WebCore::WrapperTypeInfo::visitDOMWrapper): If domWrapperVisitorFunction is non null call it. 2012-06-22 Jan Keromnes <janx@linux.com> Web Inspector: ExtensionPanel.onSearch listener doesn't work https://bugs.webkit.org/show_bug.cgi?id=89517 Reviewed by Yury Semikhatsky. Added a test to see if listener fires on search: LayoutTests/inspector/extensions/extensions-panel.html * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.searchCanceled): (WebInspector.ExtensionPanel.prototype.performSearch): (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult): (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult): 2012-06-22 Brian Salomon <bsalomon@google.com> Increase the GrContext texture cache count cap to 2K https://bugs.webkit.org/show_bug.cgi?id=89761 Reviewed by Stephen White. Tests: The change is for performance. The code is exercised by all the canvas 2d layout tests. * platform/chromium/support/GraphicsContext3DPrivate.cpp: 2012-06-22 Silvia Pfeiffer <silviapf@chromium.org> [Chromium] Adjust the displayed elements of the new Chrome media controls. https://bugs.webkit.org/show_bug.cgi?id=89416 Reviewed by Eric Carlson. No new tests - existing media tests cover these cases. Remove the volume slider for videos without audio or media resource. Display the transport bar for videos without a media resource. Don't show the fullscreen button for * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::reset): Don't display volume slider if media controller has no audio. Don't display fullscreen button if media controller supportsFullscreen(). (WebCore::MediaControlRootElementChromium::reportedError): Don't hide the timeline for failed videos, e.g. where the resource doesn't load. 2012-06-22 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [Elements] Right-clicking on whitespace should show the same context menu as right-clicking on the tag text https://bugs.webkit.org/show_bug.cgi?id=89766 Reviewed by Vsevolod Vlasov. Explicitly check for the TreeElement.representedObject's nodeType() rather than for the event target's enclosing element class. Drive-by: do not consider the "collapsed node has children" ellipsis as a text node. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.populateContextMenu): 2012-06-22 Florin Malita <fmalita@chromium.org> REGRESSION (Safari 5.1.5 - ToT): Crash in RenderSVGRoot::computeReplacedLogicalWidth https://bugs.webkit.org/show_bug.cgi?id=85797 Reviewed by Darin Adler. Test: svg/custom/svg-width-intrinsic-crash.html RenderSVGRoot::computeReplacedLogicalWidth assumes that if SVGSVGElement::widthAttributeEstablishesViewport returns false, the SVG must be embedded via <object>. This is not always the case, though: widthAttributeEstablishesViewport can also return false for inline SVG if it doesn't have a replaced logical width. Updated computeReplacedLogical{Width,Height} to handle the !widthAttributeEstablishesViewport && !isEmbeddedThroughFrameContainingSVGDocument case gracefully. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): 2012-06-22 Hayato Ito <hayato@chromium.org> Modify event re-targeting algorithm so that we can tell which distributed node is clicked. https://bugs.webkit.org/show_bug.cgi?id=89073 Reviewed by Dimitri Glazkov. Re-landing r120945 since bug 89172 was resolved. Adopt a new event re-targeting algorithm in the latest Shadow DOM spec. The corresponding bug in the shadow DOM spec is: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17090 This change is introduced to handle the following use case: 1. There is an insertion point, with zero or more nodes distributed into it. 2. User clicks on one of the items. 3. The event handler in shadow DOM subtree wants to know which item was clicked on. The new re-targeting algorithm sets an event's target to a distributed node where an event was originally fired, instead of an insertion point to where the node is distributed. The similar re-targeting algorithm also applies to an event's relatedTarget. Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/EventDispatcher.cpp: (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): 2012-06-22 Andrey Kosyakov <caseq@chromium.org> Unreviewed follow-up to r121030, fix display of "Duration" in timeline event details popup. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): 2012-06-22 Kenneth Russell <kbr@google.com> Unreviewed, rolling out r121025. http://trac.webkit.org/changeset/121025 https://bugs.webkit.org/show_bug.cgi?id=89580 Caused crash in EventHandler.shouldTurnVerticalTicksIntoHorizontal webkit unit test on 10.7 * page/EventHandler.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: (EventHandler): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 2012-06-21 Andrey Kosyakov <caseq@chromium.org> Web Inspector: only increase length for timeline bars below minimal width https://bugs.webkit.org/show_bug.cgi?id=89727 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition): (WebInspector.TimelineCalculator.prototype.setDisplayWindow): (WebInspector.TimelineRecordGraphRow.prototype.update): 2012-06-22 David Kilzer <ddkilzer@apple.com> BUILD FIX: FormController.cpp fails to build on 32-bit architectures This fixes the following build failure introduced in r121004 for Bug 89628: FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32] state.m_values.reserveCapacity(valueSize); ~~~~~ ^~~~~~~~~ * html/FormController.cpp: (WebCore::FormControlState::deserialize): Change type of valueSize from uint64_t to size_t. 2012-06-22 Abhishek Arya <inferno@chromium.org> Crash in DragController::concludeEditDrag. https://bugs.webkit.org/show_bug.cgi?id=89762 Reviewed by Ryosuke Niwa. RefPtr the innerFrame since it can get destroyed due to mutation event fired in DragController::dispatchTextInputEventFor(). Test: editing/pasteboard/drop-text-events-sideeffect-crash.html * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): 2012-06-22 Andrey Kosyakov <caseq@chromium.org> Web Inspector: timeline event details popup misses CPU time https://bugs.webkit.org/show_bug.cgi?id=89765 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): 2012-06-22 Peter Beverloo <peter@chromium.org> [Chromium] Disable c++0x compatibility warnings in JavaScriptCore.gyp when building for Android https://bugs.webkit.org/show_bug.cgi?id=88853 Reviewed by Steve Block. The Android exclusions were necessary to fix a gyp generation error, as the gcc_version variable wasn't being defined for Android. Remove these exceptions when Chromium is able to define the gcc_version variable. * WebCore.gyp/WebCore.gyp: 2012-06-22 Takashi Sakamoto <tasak@google.com> [Shadow] parentTreeScope() of nested shadow DOM subtree returns document(). https://bugs.webkit.org/show_bug.cgi?id=89172 Reviewed by Hajime Morita. Added setParentTreeScope to set parent treescope of shadow root to be host's treescope in ElementShadow::addShadowRoot. Test: fast/dom/shadow/parent-tree-scope-in-shadow.html * dom/ElementShadow.cpp: (WebCore::ElementShadow::addShadowRoot): Added setParentTreeScope. * testing/Internals.cpp: (WebCore::Internals::parentTreeScope): Newly added. This method returns a parent tree scope's root node of a given node, because a tree scope's root node is either document node or shadow root node and both nodes derive from TreeScope. So root nodes are treated as TreeScope. * testing/Internals.h: (Internals): * testing/Internals.idl: Added parentTreeScope. 2012-06-22 Tony Chang <tony@chromium.org> -webkit-flex-flow shouldn't be an enumerable property of the computed style https://bugs.webkit.org/show_bug.cgi?id=89698 Reviewed by Ojan Vafai. flex-flow is a shorthand for flex-direction and flex-wrap: http://dev.w3.org/csswg/css3-flexbox/#flex-flow-property Shorthand properties should not be enumerable in the computed style, although you can still get the value from the computed style. Tests: css3/flexbox/css-properties.html: New test case added. * css/CSSComputedStyleDeclaration.cpp: (WebCore): 2012-06-22 Robert Kroeger <rjkroege@chromium.org> Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true https://bugs.webkit.org/show_bug.cgi?id=89580 WebKit GTK and Chromium Linux force vertical wheel events to scroll horizontally when over horizontal scroll bars. This is undesirable for touchpad scrolling with hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas. Reviewed by Adam Barth. Unit tests in EventHandlerTest.cpp * page/EventHandler.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: (EventHandler): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 2012-06-22 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: partially instrument DOM Tree native memory. https://bugs.webkit.org/show_bug.cgi?id=89568 This patch adds MemoryInstrumentation class that counts all visited objects and calls reportMemoryUsage for the instrumented classes. Reviewed by Yury Semikhatsky. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): (ScriptWrappable): * bindings/v8/ScriptWrappable.h: (WebCore::ScriptWrappable::reportMemoryUsage): (ScriptWrappable): * css/StylePropertySet.h: (WebCore::StylePropertySet::reportMemoryUsage): (StylePropertySet): * dom/ContainerNode.h: (WebCore::ContainerNode::reportMemoryUsage): (ContainerNode): * dom/Element.h: (WebCore::Element::reportMemoryUsage): (Element): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::reportMemoryUsage): (ElementAttributeData): * dom/MemoryInstrumentation.h: Added. (WebCore): (MemoryInstrumentation): (WebCore::MemoryInstrumentation::~MemoryInstrumentation): (WebCore::MemoryInstrumentation::reportObject): (WebCore::MemoryInstrumentation::reportPointer): (MemoryObjectInfo): (WebCore::MemoryObjectInfo::MemoryObjectInfo): (WebCore::MemoryObjectInfo::reportInstrumentedPointer): (WebCore::MemoryObjectInfo::reportPointer): (WebCore::MemoryObjectInfo::reportInstrumentedObject): (WebCore::MemoryObjectInfo::reportObject): (WebCore::MemoryObjectInfo::reportObjectInfo): (WebCore::MemoryObjectInfo::objectType): (WebCore::MemoryObjectInfo::objectSize): (WebCore::MemoryInstrumentation::reportInstrumentedPointer): (WebCore::MemoryInstrumentation::reportInstrumentedObject): * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): (WebCore): * dom/Node.h: (Node): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage): (WebCore::QualifiedName::reportMemoryUsage): * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::addMemoryBlockFor): (WebCore::domTreeInfo): (WebCore::memoryCacheInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/TreeShared.h: (WebCore::TreeShared::reportMemoryUsage): (TreeShared): 2012-06-22 Peter Rybin <peter.rybin@gmail.com> Web Inspector: Support 'Restart frame' in inspector frontend https://bugs.webkit.org/show_bug.cgi?id=89678 Reviewed by Pavel Feldman. Action is added to call frame placard's context menu. Context menu is now built on a call frame level rather than on callback sidebar level. * English.lproj/localizedStrings.js: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane): (WebInspector.CallStackSidebarPane.prototype.update): (WebInspector.CallStackSidebarPane.Placard): (WebInspector.CallStackSidebarPane.Placard.prototype._update): (WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu): (_restartFrame): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.rawLocationToUILocation): (WebInspector.DebuggerModel.prototype.callStackModified): (WebInspector.DebuggerModel.CallFrame.prototype.restart): * inspector/front-end/Script.js: (WebInspector.Script.prototype.editSource): 2012-06-22 Jocelyn Turcotte <turcotte.j@gmail.com> [Qt] Fix the remote inspector loading problems on Mac https://bugs.webkit.org/show_bug.cgi?id=89747 Reviewed by Simon Hausmann. Make sure that the state of a SocketStreamHandle is set properly when created from an existing QTcpSocket. This fixes the inspectorserver Qt api auto test on Mac. * platform/network/qt/SocketStreamHandleQt.cpp: (WebCore::SocketStreamHandle::SocketStreamHandle): 2012-06-22 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r117738):[Forms] validationMessage IDL attribute should not have range overflow message if value isn't range overflow https://bugs.webkit.org/show_bug.cgi?id=89736 Reviewed by Kent Tamura. Tests: fast/forms/date/input-date-validation-message.html fast/forms/number/input-number-validation-message.html fast/forms/range/input-range-validation-message.html This patch changes comparison operator for range overflow message in InputType::validationMessage(). * html/InputType.cpp: (WebCore::InputType::validationMessage): 2012-06-22 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add frontend-side Entry object to FileSystemModel https://bugs.webkit.org/show_bug.cgi?id=89739 Reviewed by Vsevolod Vlasov. * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype._fileSystemRootReceived): (WebInspector.FileSystemModel.prototype.requestDirectoryContent): (WebInspector.FileSystemModel.prototype._directoryContentReceived): (WebInspector.FileSystemModel.FileSystem): (WebInspector.FileSystemModel.Entry): (WebInspector.FileSystemModel.Entry.prototype.get fileSystemModel): (WebInspector.FileSystemModel.Entry.prototype.get fileSystem): (WebInspector.FileSystemModel.Entry.prototype.get url): (WebInspector.FileSystemModel.Entry.prototype.get name): (WebInspector.FileSystemModel.Entry.prototype.get isDirectory): (WebInspector.FileSystemModel.Directory): (WebInspector.FileSystemModel.Directory.prototype.requestDirectoryContent): (WebInspector.FileSystemModel.File): (WebInspector.FileSystemModel.File.prototype.get mimeType): (WebInspector.FileSystemModel.File.prototype.get resourceType): 2012-06-22 Amy Ousterhout <aousterh@chromium.org> Renamed DeviceOrientation to DeviceOrientationData https://bugs.webkit.org/show_bug.cgi?id=88663 Reviewed by Steve Block. No new tests because this is simply a name change. Renamed DeviceOrientation to DeviceOrientationData in order to be consistent with DeviceMotionData. Updated all files that use DeviceOrientation. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDeviceOrientationEventCustom.cpp: (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback): * dom/DOMAllInOne.cpp: * dom/DeviceOrientationClient.h: (WebCore): (DeviceOrientationClient): * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::timerFired): (WebCore::DeviceOrientationController::didChangeDeviceOrientation): * dom/DeviceOrientationController.h: (WebCore): (DeviceOrientationController): * dom/DeviceOrientationData.cpp: Renamed from Source/WebCore/dom/DeviceOrientation.cpp. (WebCore): (WebCore::DeviceOrientationData::create): (WebCore::DeviceOrientationData::DeviceOrientationData): (WebCore::DeviceOrientationData::alpha): (WebCore::DeviceOrientationData::beta): (WebCore::DeviceOrientationData::gamma): (WebCore::DeviceOrientationData::absolute): (WebCore::DeviceOrientationData::canProvideAlpha): (WebCore::DeviceOrientationData::canProvideBeta): (WebCore::DeviceOrientationData::canProvideGamma): (WebCore::DeviceOrientationData::canProvideAbsolute): * dom/DeviceOrientationData.h: Renamed from Source/WebCore/dom/DeviceOrientation.h. (WebCore): (DeviceOrientationData): * dom/DeviceOrientationEvent.cpp: (WebCore::DeviceOrientationEvent::DeviceOrientationEvent): (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent): * dom/DeviceOrientationEvent.h: (WebCore): (WebCore::DeviceOrientationEvent::create): (DeviceOrientationEvent): (WebCore::DeviceOrientationEvent::orientation): * loader/EmptyClients.h: (WebCore::EmptyDeviceOrientationClient::lastOrientation): * platform/mock/DeviceOrientationClientMock.cpp: (WebCore::DeviceOrientationClientMock::setOrientation): * platform/mock/DeviceOrientationClientMock.h: (WebCore::DeviceOrientationClientMock::lastOrientation): (DeviceOrientationClientMock): * platform/qt/DeviceOrientationClientQt.cpp: (DeviceOrientationClientQt): * platform/qt/DeviceOrientationClientQt.h: (DeviceOrientationClientQt): * platform/qt/DeviceOrientationProviderQt.h: (DeviceOrientationProviderQt): 2012-06-21 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Support separate script compilation and execution. https://bugs.webkit.org/show_bug.cgi?id=89646 Reviewed by Pavel Feldman. Separate script compilation and run commands added to protocol and DebuggerAgent. Separate script compilation and run implemented in v8 ScriptDebugServer, stubs added for js implementation. Test: inspector/debugger/debugger-compile-and-run.html * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::compileScript): (WebCore): (WebCore::ScriptDebugServer::clearCompiledScripts): (WebCore::ScriptDebugServer::runScript): * bindings/js/ScriptDebugServer.h: (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution): (ScriptDebugServer): * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::compileScript): (WebCore): (WebCore::PageScriptDebugServer::clearCompiledScripts): (WebCore::PageScriptDebugServer::runScript): * bindings/v8/PageScriptDebugServer.h: (PageScriptDebugServer): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::compileScript): (WebCore): (WebCore::ScriptDebugServer::clearCompiledScripts): (WebCore::ScriptDebugServer::runScript): * bindings/v8/ScriptDebugServer.h: (WebCore): (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution): (ScriptDebugServer): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::supportsSeparateScriptCompilationAndExecution): (WebCore): (WebCore::InspectorDebuggerAgent::compileScript): (WebCore::InspectorDebuggerAgent::runScript): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::injectedScriptManager): * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::injectedScriptForEval): (WebCore): * inspector/PageDebuggerAgent.h: (PageDebuggerAgent): * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::injectedScriptForEval): (WebCore): * inspector/WorkerDebuggerAgent.h: (WorkerDebuggerAgent): * inspector/front-end/Settings.js: * inspector/front-end/inspector.js: (WebInspector.doLoadedDone): 2012-06-22 Joseph Pecoraro <pecoraro@apple.com> Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported https://bugs.webkit.org/show_bug.cgi?id=89743 Since all InspectorClient's are InspectorStateClient's provide a virtual accessor that determines whether or not InspectorClient updates are supported or not. Reviewed by Yury Semikhatsky. * inspector/InspectorState.cpp: (WebCore::InspectorState::updateCookie): Don't serialize and message the client if the client doesn't do anything with it. * inspector/InspectorStateClient.h: * inspector/WorkerInspectorController.cpp: (WebCore::InspectorStateClient::supportsInspectorStateUpdates): Let the client say whether or not supports updates or not. 2012-06-21 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120982. http://trac.webkit.org/changeset/120982 https://bugs.webkit.org/show_bug.cgi?id=89740 [chromium] ASSERTION FAILED: m_allocatedTextureIds.contains(textureId) (Requested by ukai on #webkit). * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::getFramebufferPixels): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TextureManager.cpp: * platform/graphics/chromium/TextureManager.h: (TextureAllocator): (TextureManager): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): * platform/graphics/chromium/TrackingTextureAllocator.h: (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setNeedsForcedCommit): (WebCore): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::sourceFrameCanBeDrawn): (WebCore::CCLayerTreeHostImpl::setSourceFrameCanBeDrawn): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::beginFrameComplete): (WebCore::CCScheduler::didSwapBuffersComplete): (WebCore::CCScheduler::didLoseContext): (WebCore::CCScheduler::didRecreateContext): (WebCore::CCScheduler::vsyncTick): * platform/graphics/chromium/cc/CCScheduler.h: (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsForcedCommit): (WebCore): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread): (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::setNeedsForcedCommit): (WebCore): (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread): (WebCore::CCThreadProxy::scheduledActionBeginFrame): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): (BeginFrameAndCommitState): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (FramePlane): 2012-06-21 Kent Tamura <tkent@chromium.org> Make FormControlState capable to store multiple values https://bugs.webkit.org/show_bug.cgi?id=89628 Reviewed by Hajime Morita. Make FormControlState capable to store multiple values in order to clean FileInputType.cpp up and prepare to fix Bug 89623. No new tests. This doesn't change web-exposed behavior, and fast/forms/file/recover-file-input-in-unposted-form.html covers major part of this change. * html/FormController.cpp: (WebCore::FormControlState::serializeTo): Support for two or more values. (WebCore::FormControlState::deserialize): ditto. (WebCore::formStateSignature): Bump up the version because the state format for <input type=file> is changed. * html/FormController.h: - String m_value -> Vector<String> m_values - Add some functions. - Remove hasValue() and value(). (WebCore::FormControlState::FormControlState): m_value -> m_values. (WebCore::FormControlState::valueSize): Added. (WebCore::FormControlState::operator[]): Added. (FormControlState): Add append() declaration, etc. (WebCore::FormControlState::operator=): m_value -> m_values (WebCore::FormControlState::append): Added. * html/HTMLFormControlElementWithState.cpp: (WebCore::HTMLFormControlElementWithState::finishParsingChildren): Use valueSize() instead of hasValue(). * html/HTMLFormControlElementWithState.h: (HTMLFormControlElementWithState): Update the comment. * html/FileInputType.cpp: (WebCore::FileInputType::saveFormControlState): Use multiple value capability of FormControlState (WebCore::FileInputType::restoreFormControlState): ditto. * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::restoreFormControlState): Use [0] instead of value(). * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::restoreFormControlState): ditto. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::restoreFormControlState): ditto. * html/HiddenInputType.cpp: (WebCore::HiddenInputType::restoreFormControlState): ditto. * html/InputType.cpp: (WebCore::InputType::restoreFormControlState): ditto. 2012-06-21 Ryosuke Niwa <rniwa@webkit.org> LabelsNodeList isn't updated properly after its owner node is adopted into a new document https://bugs.webkit.org/show_bug.cgi?id=89730 Reviewed by Darin Adler. When a node is adopted, node lists that are invalidated at document level need to be unregistered from old document and registered to new document so that DOM mutations in new document will invalidate caches in the node lists. Done that in NodeListsNodeData::adoptTreeScope, which was extracted from TreeScopeAdopter::moveTreeToNewScope. Also renamed DynamicNodeList::node() and m_node to rootNode() and m_ownerNode to better express their semantics and added ownerNode() to make m_ownerNode private to DynamicNodeList. Test: fast/forms/label/labels-owner-node-adopted.html * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::~ChildNodeList): (WebCore::ChildNodeList::length): (WebCore::ChildNodeList::item): (WebCore::ChildNodeList::nodeMatches): * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): (WebCore::ClassNodeList::~ClassNodeList): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::length): (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::item): (WebCore::DynamicNodeList::itemWithName): * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::ownerNode): (WebCore::DynamicNodeList::rootedAtDocument): (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange): (WebCore::DynamicNodeList::rootNode): (WebCore::DynamicNodeList::document): (DynamicNodeList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::~NameNodeList): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::adoptTreeScope): (NodeListsNodeData): * dom/TagNodeList.cpp: (WebCore::TagNodeList::~TagNodeList): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::~LabelsNodeList): (WebCore::LabelsNodeList::nodeMatches): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::~RadioNodeList): (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter): 2012-06-21 Alexei Filippov <alexeif@chromium.org> Web Inspector: Properly display native memory sizes bigger than 2GB https://bugs.webkit.org/show_bug.cgi?id=89661 Reviewed by Pavel Feldman. * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: (WebCore::jsHeapInfo): (WebCore::inspectorData): (WebCore::renderTreeInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): 2012-06-21 Abhishek Arya <inferno@chromium.org> Crash in RenderBlock::layoutPositionedObjects. https://bugs.webkit.org/show_bug.cgi?id=89599 Reviewed by Julien Chaffraix. Test: fast/table/table-split-positioned-object-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitBlocks): no longer need to explicitly call removePositionedObjects, since it is part of moveChildrenTo. * rendering/RenderBlock.h: (WebCore::RenderBlock::hasPositionedObjects): helper to tell if we have positioned objects in our list. * rendering/RenderBox.cpp: (WebCore::RenderBox::splitAnonymousBoxesAroundChild): Like r102263, this condition was wrong and while moving children across completely different trees, we need fullRemoveInsert as true. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::moveChildTo): see code comment. (WebCore::RenderBoxModelObject::moveChildrenTo): see code comment. 2012-06-21 Kwang Yul Seo <skyul@company100.net> Make HTMLDocumentParser::create(DocumentFragment*,Element*, FragmentScriptingPermission) private. https://bugs.webkit.org/show_bug.cgi?id=89724 Reviewed by Darin Adler. It is used only by HTMLDocumentParser::parseDocumentFragment. No behavioral changes. * html/parser/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::create): (HTMLDocumentParser): 2012-06-21 Kalev Lember <kalevlember@gmail.com> [GTK] Use the empty plugin support on non-X11 and non-Windows platforms https://bugs.webkit.org/show_bug.cgi?id=89501 Reviewed by Martin Robinson. The GTK+ port doesn't currently support NPAPI plugins on platforms other than X11 or Windows. Using PluginPackageNone and PluginViewNone makes it easier to build it on other platforms and also allows us to drop some ifdefs from PluginPackageGtk and PluginViewGtk. * GNUmakefile.list.am: 2012-06-21 Shinya Kawanaka <shinyak@chromium.org> [Shadow][Editing] Assertion in VisibleSelection::adjuseSelectionToAvoidCrossingBoundaries() is triggered. https://bugs.webkit.org/show_bug.cgi?id=89081 Reviewed by Ryosuke Niwa. firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot did not consider a case that an argument hiehestRoot can be in Shadow DOM. So when adjusting selection to avoid crossing editing boundaries, VisiblePosition can break shadow boundaries, and it causes an assertion trigger. By this patch, firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot will adjust position to the tree scope of highestRoot instead of its parent tree scope. Test: editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html * editing/htmlediting.cpp: (WebCore::firstEditablePositionAfterPositionInRoot): (WebCore::lastEditablePositionBeforePositionInRoot): 2012-06-21 Andrey Kosyakov <caseq@chromium.org> Web Inspector: exception in TimelinePresentationModel when recording timeline https://bugs.webkit.org/show_bug.cgi?id=89716 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.processRecord): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.prototype.filteredRecords): (WebInspector.TimelinePresentationModel.prototype.isVisible): 2012-06-21 Oli Lan <olilan@chromium.org> Add methods to select between offsets in an editable field. https://bugs.webkit.org/show_bug.cgi?id=89098 Reviewed by Ryosuke Niwa. Reviewed by Ryosuke Niwa. Adds a new method setSelectionOffsets to Editor. This selects between the two integer offsets provided in the node currently being edited, assuming the offsets are given relative to the rootEditableElement. If no node or field is currently being edited, the method returns false. Test: a new test has been added to the chromium port's WebViewTest that calls this via WebViewImpl::setSelectionEditableOffsets. * editing/Editor.cpp: (WebCore::Editor::setSelectionOffsets): (WebCore): * editing/Editor.h: (Editor): 2012-06-21 Julien Chaffraix <jchaffraix@webkit.org> Add support for the grid and inline-grid display types. https://bugs.webkit.org/show_bug.cgi?id=60732 Reviewed by Tony Chang. Tests: fast/css-grid-layout/containing-block-grids-expected.html fast/css-grid-layout/containing-block-grids.html fast/css-grid-layout/floating-empty-grids-expected.html fast/css-grid-layout/floating-empty-grids.html Based on an earlier patch by David Hyatt <hyatt@apple.com>. Added the first renderer for grid elements. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added RenderGrid files to the build systems. * rendering/RenderGrid.cpp: Added. (WebCore::RenderGrid::RenderGrid): (WebCore::RenderGrid::~RenderGrid): (WebCore::RenderGrid::layoutBlock): (WebCore::RenderGrid::renderName): * rendering/RenderGrid.h: Added. (RenderGrid): Skeleton renderer for now. * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): Return our new RenderGrid for our 2 new |display| values. * rendering/style/RenderStyle.h: Added INLINE_GRID to the inline and replaced types. 2012-06-21 Ryosuke Niwa <rniwa@webkit.org> Clang build fix. * dom/NodeRareData.h: 2012-06-19 James Robinson <jamesr@chromium.org> [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode. https://bugs.webkit.org/show_bug.cgi?id=89045 Reviewed by Adrienne Walker. Based on patch by Michal Mocny <mmocny@google.com>. Invariants: 1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for compositeAndReadback, regardless of threaded vs non-threaded mode 2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to make a frame and is always set to a non-zero value 3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread. Non-zero allocations are met in the next frame, whenever we would produce that frame according to our usual frame scheduling logic. 4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all whenever it likes without needing the main thread to be responsive. Details: There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame scheduling for the !visible case. The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really important. Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when not visible. This already happens in the single threaded path thanks to render_widget so the only change is to the threaded path. The difficulty here is we might post a beginFrame task from the impl thread and then get a setVisible(false) call on the main thread before the beginFrame task runs. Since I'm making the setVisible() call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main thread we can know that the impl thread's notion of visibility is in sync with the main threads. Thus I'm planning to simply abort the frame before doing any processing on the main thread. The scheduler will know if it gets a beginFrameAborted and COMMIT_STATE_IDLE. compositeAndReadback is special - this call currently does come in when we aren't visible (in single and threaded mode) and we need to service it. In particular, we need to send a beginFrame over and have it not be ignored on the main thread. For this I'm thinking of having the proxy keep track of whether it's servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame normally. On the impl side, we need a few changes. First, we have to allocate a default framebuffer (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the readPixels(). Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and again remember to delete the textures after the readPixels(). Third, we have to know that the beginFrame is a forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame. For this, I think I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to drop resources after the readback. It's probably a good time to stop swapping on readbacks too.... The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on the updateLayers(). Since we only make frames when we are visible and we never have a zero allocation when visible (thanks to the frame scheduling changes above), this value is always non-zero. The other thing the texture manager needs to know about is if we've killed all of the underlying textures from the impl thread - this bit is passed in by the proxy before the updateLayers() call. This means if we're running while visible and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new budget. When the commit completes we'll get notified on the impl thread of which textures the contents texture manager decided to evict and issue the deleteTexture() calls on them. The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet. On compositor initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first frame. I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we can get to it when we get to making the next frame. If we wanted to satisfy reduced texture budgets directly from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete based on that. Let's worry about that later. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::setGpuMemoryAllocation): (WebCore): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::getFramebufferPixels): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::evictAndRemoveAllDeletedTextures): (WebCore): * platform/graphics/chromium/TextureManager.h: (TextureAllocator): (TextureManager): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): (WebCore): (WebCore::TrackingTextureAllocator::deleteAllTextures): * platform/graphics/chromium/TrackingTextureAllocator.h: (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::evictAllContentTextures): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore): (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit): (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::beginFrameComplete): (WebCore::CCScheduler::beginFrameAborted): (WebCore): (WebCore::CCScheduler::didSwapBuffersComplete): (WebCore::CCScheduler::didLoseContext): (WebCore::CCScheduler::didRecreateContext): (WebCore::CCScheduler::vsyncTick): * platform/graphics/chromium/cc/CCScheduler.h: (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::beginFrameAborted): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setVisible): (WebCore): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::setVisible): (WebCore): (WebCore::CCThreadProxy::setVisibleOnImplThread): (WebCore::CCThreadProxy::scheduledActionBeginFrame): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): (BeginFrameAndCommitState): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (FramePlane): 2012-06-20 Ryosuke Niwa <rniwa@webkit.org> Shrink NodeListsNodeData https://bugs.webkit.org/show_bug.cgi?id=89036 Reviewed by Andreas Kling. Replaced 6 hash maps of AtomicString, String, and RefPtr<QualifiedName::QualifiedNameImpl> and a raw pointer by 3 hash maps of std::pair<unsigned short, AtomicString>, std::pair<unsigned short, String>, and QualifiedName, to halve the NodeListsNodeData's size (Reduced from 7 pointers to 3 pointers). Made those hash maps private and added addCacheWith* and removeCacheWith* member functions to reduce the code duplication. Also got rid of removeCached*NodeList member functions from Node and Document now that DynamicSubtreeNodeList can simply call nodeLists()->removeCacheWith* on m_node. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::~ClassNodeList): * dom/Document.cpp: (WebCore::Document::getItems): Use addCacheWithName. * dom/Document.h: Got rid of removeCachedMicroDataItemList. (Document): * dom/DynamicNodeList.cpp: (WebCore): Moved the constructor to the header file. * dom/DynamicNodeList.h: Added NodeListType and InvalidationType to be used in NodeListsNodeData. (WebCore::DynamicNodeList::DynamicNodeList): Takes the invalidation type. (WebCore::DynamicNodeList::document): Added. (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange): Added. (WebCore::DynamicNodeList::Caches::Caches): Added shouldInvalidateOnAttributeChange to retain the invalidation type. (Caches): (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::~MicroDataItemList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): (WebCore::NameNodeList::~NameNodeList): (WebCore::NameNodeList::nodeMatches): * dom/NameNodeList.h: (WebCore): (NameNodeList): (WebCore::NameNodeList::create): * dom/Node.cpp: (WebCore::Node::nodeLists): Added so that node lists can directly call removeCacheWith*. (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::radioNodeList): (WebCore::NodeListsNodeData::invalidateCaches): Merged invalidateCachesThatDependOnAttributes. The function takes the attribute name to avoid invalidating tag node lists when only attributes are modified. Also, now we have exactly three hash maps to invalidate: m_atomicNameCaches, m_nameCaches, and m_tagNodeListCacheNS. (WebCore): NodeListsNodeData::isEmpty is moved to NodeRareData.h. * dom/Node.h: (WebCore): (Node): * dom/NodeRareData.h: (NodeListsNodeData): (WebCore::NodeListsNodeData::addCacheWithAtomicName): (WebCore::NodeListsNodeData::addCacheWithName): (WebCore::NodeListsNodeData::addCacheWithQualifiedName): (WebCore::NodeListsNodeData::removeCacheWithAtomicName): (WebCore::NodeListsNodeData::removeCacheWithName): (WebCore::NodeListsNodeData::removeCacheWithQualifiedName): (WebCore::NodeListsNodeData::isEmpty): Moved from Node.cpp now that this function is much shorter. (WebCore::NodeListsNodeData::NodeListsNodeData): (WebCore::NodeListsNodeData::namedNodeListKey): Helper member functions to obtain the key for AtomicString and String hash maps. * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): (WebCore::TagNodeList::~TagNodeList): (WebCore::HTMLTagNodeList::HTMLTagNodeList): Hard code namespaceURI = starAtom since other values are never used. (WebCore::HTMLTagNodeList::nodeMatches): Given that, assert m_namespace == starAtom. * dom/TagNodeList.h: (WebCore::TagNodeList::create): Add a new version of create that doesn't take namespace (assume starAtom) so that addCacheWithAtomicName works with this class. (WebCore::HTMLTagNodeList::create): Removed namespaceURI from the argument list since it's always starAtom. (HTMLTagNodeList): * html/LabelableElement.cpp: (WebCore::LabelableElement::labels): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): Removed redundant m_forNode (identical to m_node in DynamicNodeList). (WebCore::LabelsNodeList::~LabelsNodeList): (WebCore::LabelsNodeList::nodeMatches): * html/LabelsNodeList.h: (WebCore::LabelsNodeList::create): (LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): Removed redundant m_baseElement (identical to m_node in DynamicNodeList). Also changed the first argument's type from Element* to Node* so that it works better with new template member functions of NodeListsNodeData. (WebCore::RadioNodeList::~RadioNodeList): (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter): * html/RadioNodeList.h: (WebCore::RadioNodeList::create): (RadioNodeList): 2012-06-21 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120945. http://trac.webkit.org/changeset/120945 https://bugs.webkit.org/show_bug.cgi?id=89703 editing/shadow/breaking-editing-boundaries.html started to crash (Requested by hayato on #webkit). * dom/EventDispatcher.cpp: (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): 2012-06-21 Philippe Normand <pnormand@igalia.com> [GStreamer] Use setGstElementClassMetadata. Rubber/stamped by Martin Robinson. This function was introduced in r120790 but I forgot to actually use it in that patch. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkit_video_sink_class_init): * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 2012-06-21 Erik Arvidsson <arv@chromium.org> [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue https://bugs.webkit.org/show_bug.cgi?id=80880 Reviewed by Adam Barth. We used to add a hidden property in the getter to the returned wrapper. With this patch we instead handle the liveness of the wrapper in the GC phase by calling v8::V8::AddHiddenReference. To reduce the amount of custom code we need, the V8 code generator now supports GenerateIsReachable (as well as CustomIsReachable) which, even though different from the JSC attribute, is used in the same cases and takes the same values (even though at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable also have a dependent life time (just like if V8DependentLifetime was present). No new tests. Covered by existing tests. * Target.pri: * UseV8.cmake: * WebCore.gypi: * bindings/scripts/CodeGeneratorJS.pm: (GetGenerateIsReachable): Abstracted GenerateIsReachable and JSGenerateIsReachable. (GetCustomIsReachable): Ditto. (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (NeedsToVisitDOMWrapper): (GetGenerateIsReachable): (GetCustomIsReachable): (GenerateVisitDOMWrapper): (GenerateHeader): (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WrapperTypeInfo): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed. * bindings/v8/custom/V8DOMStringMapCustom.cpp: * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8TextTrackListCustom.cpp: Removed. * css/CSSStyleSheet.idl: * css/StyleSheet.idl: * dom/DOMStringMap.idl: * dom/NamedNodeMap.idl: * html/DOMTokenList.idl: * html/track/TextTrackList.idl: 2012-06-21 Alec Flett <alecflett@chromium.org> IndexedDB: Implement spec behavior for multiEntry indexes with invalid/duplicate subkeys https://bugs.webkit.org/show_bug.cgi?id=86123 Reviewed by Darin Fisher. Distinguish between an actual invalid IDBKey, and an array of possibly-invalid subkeys by making IDBKey::isValid() check subkeys if the type is an array. Introduce a new way to transform an IDBKey into a multiEntry-specific IDBKey, (IDBKey::createMultiEntryArray) throwing out duplicates and invalid keys. Use it when storing index entries for multiEntry indexes. No new tests: existing tests have been altered to include new behavior. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::continueFunction): * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::cmp): * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::get): (WebCore::IDBIndex::getKey): * Modules/indexeddb/IDBKey.cpp: (WebCore::IDBKey::isValid): (WebCore): * Modules/indexeddb/IDBKey.h: (WebCore::IDBKey::createMultiEntryArray): (IDBKey): * Modules/indexeddb/IDBKeyRange.cpp: (WebCore::IDBKeyRange::only): (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): (WebCore::IDBKeyRange::bound): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord): (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord): * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::encodeIDBKey): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::get): (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): 2012-06-21 Ian Vollick <vollick@chromium.org> [chromium] Overlays when using the web inspector are blurry with device scale factor > 1 https://bugs.webkit.org/show_bug.cgi?id=89676 Reviewed by James Robinson. Whenever we construct a GraphicsLayerChromium, make initialize the device and page scale factors, if possible. Unit test: GraphicsLayerChromiumTest.shouldStartWithCorrectContentsScale * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): 2012-06-21 Philippe Normand <pnormand@igalia.com> [Qt] REGRESSION(r120790): broke video rendering https://bugs.webkit.org/show_bug.cgi?id=89619 Reviewed by Alexis Menard. Invert the pixel components of the Image on little endian architectures. * platform/graphics/gstreamer/ImageGStreamerQt.cpp: (ImageGStreamer::ImageGStreamer): 2012-06-21 James Simonsen <simonjam@chromium.org> [Resource Timing] Implement Resource Timing interface https://bugs.webkit.org/show_bug.cgi?id=61152 This patch implements the Resource Timing interface. It doesn't do anything useful, because nothing populates the timeline yet. There are also some gaps in the implementation, which have been filed as bugs. http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html Reviewed by Tony Gentilcore. No new tests. Feature is disabled on all platforms. * CMakeLists.txt: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/v8/custom/V8PerformanceEntryCustom.cpp: (WebCore): (WebCore::toV8): Support PerformanceEntry polymorphism. * dom/EventNames.h: (WebCore): * dom/EventTargetFactory.in: * page/Performance.cpp: (WebCore::Performance::~Performance): (WebCore): (WebCore::Performance::interfaceName): Reqired for EventTarget. (WebCore::Performance::scriptExecutionContext): Ditto. (WebCore::Performance::webkitGetEntries): Return "resource" entries. (WebCore::Performance::webkitGetEntriesByType): Ditto. (WebCore::Performance::webkitGetEntriesByName): Ditto. (WebCore::Performance::webkitClearResourceTimings): New. (WebCore::Performance::webkitSetResourceTimingBufferSize): New. Unimplemented. (WebCore::Performance::addResourceTiming): This is how resources in WebCore will report to the timeline. (WebCore::Performance::eventTargetData): Required for EventTarget. (WebCore::Performance::ensureEventTargetData): Ditto. * page/Performance.h: (Performance): (WebCore::Performance::refEventTarget): (WebCore::Performance::derefEventTarget): * page/Performance.idl: * page/PerformanceEntry.cpp: (WebCore::PerformanceEntry::~PerformanceEntry): (WebCore): * page/PerformanceEntry.h: (PerformanceEntry): (WebCore::PerformanceEntry::isResource): * page/PerformanceEntry.idl: * page/PerformanceResourceTiming.cpp: Added. (WebCore): (WebCore::PerformanceResourceTiming::PerformanceResourceTiming): (WebCore::PerformanceResourceTiming::initiatorType): (WebCore::PerformanceResourceTiming::redirectStart): (WebCore::PerformanceResourceTiming::redirectEnd): (WebCore::PerformanceResourceTiming::fetchStart): (WebCore::PerformanceResourceTiming::domainLookupStart): (WebCore::PerformanceResourceTiming::domainLookupEnd): (WebCore::PerformanceResourceTiming::connectStart): (WebCore::PerformanceResourceTiming::connectEnd): (WebCore::PerformanceResourceTiming::secureConnectionStart): (WebCore::PerformanceResourceTiming::requestStart): (WebCore::PerformanceResourceTiming::responseStart): (WebCore::PerformanceResourceTiming::responseEnd): (WebCore::PerformanceResourceTiming::monotonicTimeToDocumentMilliseconds): (WebCore::PerformanceResourceTiming::resourceTimeToMilliseconds): * page/PerformanceResourceTiming.h: Added. (WebCore): (PerformanceResourceTiming): (WebCore::PerformanceResourceTiming::create): (WebCore::PerformanceResourceTiming::isResource): * page/PerformanceResourceTiming.idl: Added. 2012-06-21 Hans Wennborg <hans@chromium.org> Speech JavaScript API: Remove FIXMEs about whether events bubble and are cancelable https://bugs.webkit.org/show_bug.cgi?id=89657 Reviewed by Adam Barth. The spec has been updated to clarify that the events do not bubble and are not cancelable. No new tests, just removing comments. * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::didStartAudio): * Modules/speech/SpeechRecognitionError.cpp: (WebCore::SpeechRecognitionError::SpeechRecognitionError): 2012-06-21 Andrey Adaikin <aandrey@chromium.org> Web Inspector: [WebGL] Rename InjectedWebGLScriptSource.js -> InjectedScriptWebGLModuleSource.js https://bugs.webkit.org/show_bug.cgi?id=89675 Reviewed by Pavel Feldman. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InjectedScriptWebGLModule.cpp: (WebCore::InjectedScriptWebGLModule::source): * inspector/InjectedScriptWebGLModuleSource.js: Renamed from Source/WebCore/inspector/InjectedWebGLScriptSource.js. (.): 2012-06-21 Kalev Lember <kalevlember@gmail.com> [GTK] Fix NPAPI plugins on Windows https://bugs.webkit.org/show_bug.cgi?id=54531 Reviewed by Martin Robinson. Switch to using PluginPackageWin.cpp and PluginViewWin.cpp on Windows platform, and leave plugins/gtk/ only for XP_UNIX platforms. With this we can share a lot of code with other ports and don't have to reimplement all the Windows-specific code in plugins/gtk/. * GNUmakefile.am: * GNUmakefile.list.am: * platform/FileSystem.h: (WebCore): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (GraphicsContextPlatformPrivate): * platform/graphics/transforms/TransformationMatrix.h: (TransformationMatrix): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore): * platform/gtk/FileSystemGtk.cpp: (WebCore::unloadModule): * plugins/PluginView.h: (PluginView): * plugins/win/PluginViewWin.cpp: (windowHandleForPageClient): (WebCore::registerPluginView): (WebCore::PluginView::paint): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::platformStart): (WebCore::PluginView::snapshot): 2012-06-21 Brady Eidson <beidson@apple.com> <rdar://problem/11718988> and https://bugs.webkit.org/show_bug.cgi?id=89673 showModalDialog fix creates risk of never returning from RunLoop::performWork, potentially blocking other event sources In case handling a function on the queue places additional functions on the queue, we should limit the number of functions each invocation of performWork() performs so it can return and other event sources have a chance to spin. The showModalDialog fix in question is http://trac.webkit.org/changeset/120879 Reviewed by Darin Adler and Anders Carlson. * platform/RunLoop.cpp: (WebCore::RunLoop::performWork): If there are only N functions in the queue when performWork is called, only handle up to N functions before returning. Any additional functions will be handled the next time the runloop spins. 2012-06-21 Tim Horton <timothy_horton@apple.com> SVGImageCache isn't invalidated for <img> on dynamic page scale changes https://bugs.webkit.org/show_bug.cgi?id=89621 <rdar://problem/11714677> Reviewed by Simon Fraser. Previously, device and page scale factors were being cached as a part of the SVGImageCache's size request. However, an <img> never has a reason to update its size request when the page scale is changed via gesture zooming, as no layout occurs. Instead, look up the relevant scales when the image is requested (which will occur during every repaint), allowing page scale changes to take effect without requiring an updated size request. Test: svg/as-image/image-respects-pageScaleFactor-change.html * loader/cache/CachedImage.cpp: (WebCore::CachedImage::lookupOrCreateImageForRenderer): (WebCore::CachedImage::setContainerSizeForRenderer): * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer): * svg/graphics/SVGImageCache.h: (WebCore::SVGImageCache::SizeAndScales::SizeAndScales): (SizeAndScales): 2012-06-21 Philip Rogers <pdr@google.com> Add pending resource even if others are pending https://bugs.webkit.org/show_bug.cgi?id=89633 Reviewed by Dirk Schulze. An element can have multiple simultaneous pending resources but some of this code was legacy, before the hasPendingResource()->hasPendingResources() change (r105573). This patch continues adding a pending resource even if there are other pending resources. In some cases, this can lead to marking a resource as pending twice but the performance impact of that is negligible. Other than SVGUseElement, SVGTrefElement and SVGFEImageElement are also changed. These elements are unaffected because they can only have a single resource at the moment (href), with other Style url() references being handled by their parent containers. Tests: svg/custom/use-multiple-pending-resources-expected.svg svg/custom/use-multiple-pending-resources.svg * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::buildPendingResource): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::detachTarget): (WebCore::SVGTRefElement::buildPendingResource): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): 2012-06-21 Kalev Lember <kalevlember@gmail.com> [GTK] Replace the use of "struct stat" with GStatBuf https://bugs.webkit.org/show_bug.cgi?id=89488 Reviewed by Martin Robinson. Make sure we pass GStatBuf to g_stat(); depending on the platform, it isn't always the same as "struct stat", e.g. on Windows. * platform/gtk/FileSystemGtk.cpp: (WebCore::getFileSize): (WebCore::getFileModificationTime): 2012-06-21 Min Qin <qinmin@chromium.org> remove ENABLE_FULLSCREEN_MEDIA_CONTROL flag https://bugs.webkit.org/show_bug.cgi?id=89614 Reviewed by Eric Carlson. Desktop chromium also starts to use fullscreen button after https://bugs.webkit.org/show_bug.cgi?id=88818 we don't need this flag any more No test needed as this change just removes a flag. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): (WebCore::MediaControlRootElementChromium::create): (WebCore::MediaControlRootElementChromium::setMediaController): (WebCore::MediaControlRootElementChromium::reset): (WebCore::MediaControlRootElementChromium::reportedError): * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): 2012-06-21 Hayato Ito <hayato@chromium.org> Modify event re-targeting algorithm so that we can tell which distributed node is clicked. https://bugs.webkit.org/show_bug.cgi?id=89073 Reviewed by Dimitri Glazkov. Adopt a new event re-targeting algorithm in the latest Shadow DOM spec. The corresponding bug in the shadow DOM spec is: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17090 This change is introduced to handle the following use case: 1. There is an insertion point, with zero or more nodes distributed into it. 2. User clicks on one of the items. 3. The event handler in shadow DOM subtree wants to know which item was clicked on. The new re-targeting algorithm sets an event's target to a distributed node where an event was originally fired, instead of an insertion point to where the node is distributed. The similar re-targeting algorithm also applies to an event's relatedTarget. Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/EventDispatcher.cpp: (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): 2012-06-21 Andrei Onea <onea@adobe.com> [CSSRegions]Change WEBKIT_REGION_RULE value to 16 https://bugs.webkit.org/show_bug.cgi?id=89421 Reviewed by Tony Chang. Modified WEBKIT_REGION_RULE where applicable to match CSS Regions spec. The new value for WEBKIT_REGION_RULE is 16 (was 10). * css/CSSRule.cpp: (WebCore): Added COMPILE_ASSERT to ensure StyleRule::Region and CSSRule::WEBKIT_REGION_RULE will * css/CSSRule.h: (CSSRule): Modified m_type bitfield length to 5 * css/CSSRule.idl: * css/StyleRule.cpp: (SameSizeAsStyleRuleBase): (WebCore): Added COMPILE_ASSERT to ensure that StyleRuleBase will always have exactly 32bits. * css/StyleRule.h: (StyleRuleBase): Modified m_type bitfield to 5 to accommodate the new value, and modified m_sourceLine bitfield to 27 bits in order to keep StyleRule 32 bits long. Consequently, any css rule longer than 67,108,863 lines will cause overflow - however, the value is large enough not to cause problems. 2012-06-21 Silvia Pfeiffer <silviapf@chromium.org> Paint played and buffered ranges differently in Chrome video controls. https://bugs.webkit.org/show_bug.cgi?id=89284 Reviewed by Eric Carlson. No new tests; existing video control tests cover this case. The Chrome video controls are receiving a visual update. This patch changes the format in which the playback position slider displays the buffered range. It is painted in a lighter color left of the position thumb and darker right of the position thumb * css/mediaControlsChromium.css: (input[type="range"]::-webkit-media-slider-container): Adjust the border color of the playback position slider. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintRoundedSliderBackground): Adjust the background color of the position slider. (WebCore::paintSliderRangeHighlight): Make the color of the range region a function parameter, provide start and end position as pixel width instead of percentage, and make sure the rounded corners at beginning and end don't turn into rectangles. (WebCore): Move the mediaSliderThumbWidth variable up to be used in paintMediaSlider(). (WebCore::paintMediaSlider): Calculate start, current and end position instead of fractions, adjust the current position by half the thumb's width for improved rendering, and draw two highlight areas: one bright one before current position and one grey one after current position. (WebCore::paintMediaVolumeSlider): Adjust the paintSliderRangeHighlight function call and add the colors. 2012-06-21 Kwang Yul Seo <skyul@company100.net> Remove unused static variable uninitializedLineNumberValue. https://bugs.webkit.org/show_bug.cgi?id=89643 Reviewed by Alexey Proskuryakov. No behavioral changes. * html/parser/HTMLTreeBuilder.cpp: (WebCore): 2012-06-21 Kwang Yul Seo <skyul@company100.net> Remove unused static function skipComment. https://bugs.webkit.org/show_bug.cgi?id=89641 Reviewed by Alexey Proskuryakov. No behavioral changes. * loader/TextResourceDecoder.cpp: 2012-06-21 Nico Weber <thakis@chromium.org> Remove two more member variables found by clang's Wunused-private-field https://bugs.webkit.org/show_bug.cgi?id=89672 Reviewed by Anders Carlsson. * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): * platform/graphics/filters/FECustomFilter.h: (FECustomFilter): 2012-06-21 Julien Chaffraix <jchaffraix@webkit.org> Non-fixed length margins don't work with align=center https://bugs.webkit.org/show_bug.cgi?id=89626 Reviewed by Levi Weintraub. Tests: fast/block/negative-start-margin-align-center-percent.html fast/block/positive-margin-block-child-align-center-calc.html Calling Length::value() is a bad idea as it returns the *raw* value of the length. For percent and calculated length this is a bad idea as they bear not relation to the actual computed length. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): Fixed the code to use minimumValueForLength as this nicely takes care of the 'auto' case. 2012-06-21 Robert Kroeger <rjkroege@chromium.org> [chromium] style improvement for setDeviceScaleFactor code https://bugs.webkit.org/show_bug.cgi?id=89665 Correct a coding style error committed in https://bugs.webkit.org/show_bug.cgi?id=88916 Reviewed by Adrienne Walker. Purely code hygiene: existing tests suffice. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setDeviceScaleFactor): 2012-06-21 Shinya Kawanaka <shinyak@chromium.org> [Crash][Editing] Pressing enter on LI element triggers assertion in Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=89171 Reviewed by Ryosuke Niwa. Since modidying Shadow DOM removes renderer of elements in Shadow DOM and shadow host, assertion to check the existence of renderer was triggered. We should update layout here to create renderer again. Test: editing/shadow/pressing-enter-on-list.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::appendBlockPlaceholder): 2012-06-21 Andrey Adaikin <aandrey@chromium.org> Web Inspector: [WebGL] Add injected WebGL module class https://bugs.webkit.org/show_bug.cgi?id=89592 Reviewed by Pavel Feldman. Adding a new InjectedScriptWebGLModule class and moving WebGL-related stuff out of InjectedScriptManager class. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InjectedScriptManager.cpp: * inspector/InjectedScriptManager.h: (InjectedScriptManager): * inspector/InjectedScriptModule.cpp: (WebCore::InjectedScriptModule::ensureInjected): * inspector/InjectedScriptModule.h: (InjectedScriptModule): * inspector/InjectedScriptWebGLModule.cpp: Copied from Source/WebCore/inspector/InjectedScriptModule.cpp. (WebCore): (WebCore::InjectedScriptWebGLModule::InjectedScriptWebGLModule): (WebCore::InjectedScriptWebGLModule::moduleForState): (WebCore::InjectedScriptWebGLModule::source): (WebCore::InjectedScriptWebGLModule::wrapWebGLContext): (WebCore::InjectedScriptWebGLModule::captureFrame): * inspector/InjectedScriptWebGLModule.h: Copied from Source/WebCore/inspector/InjectedScriptModule.h. (WebCore): (InjectedScriptWebGLModule): * inspector/InspectorWebGLAgent.cpp: (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation): 2012-06-21 Pavel Feldman <pfeldman@chromium.org> Web Inspector: do not add separator to the end of the context menu. https://bugs.webkit.org/show_bug.cgi?id=89634 Reviewed by Vsevolod Vlasov. Attaching separators only before menu items now. * inspector/front-end/ContextMenu.js: (WebInspector.ContextSubMenuItem.prototype.appendItem): (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem): (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem): (WebInspector.ContextSubMenuItem.prototype.appendSeparator): (WebInspector.ContextSubMenuItem.prototype._pushItem): 2012-06-21 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Unify FileSystem callbacks https://bugs.webkit.org/show_bug.cgi?id=89420 Reviewed by Vsevolod Vlasov. * inspector/InspectorFileSystemAgent.cpp: (WebCore): 2012-06-20 Hans Wennborg <hans@chromium.org> Speech JavaScript API: SpeechRecognition should hook up with ActiveDOMObject more https://bugs.webkit.org/show_bug.cgi?id=89217 Reviewed by Adam Barth. Previously, the SpeechRecognition was kept alive while waiting for pending events by making the embedder hold a reference to the object. We should do this by using ActiveDOMObject's setPendingActivity() instead. Also, override ActiveDOMObject::stop() to get notified when the user leaves the page. Test: fast/speech/scripted/navigate-away.html * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::start): (WebCore::SpeechRecognition::didEnd): (WebCore::SpeechRecognition::stop): (WebCore): * Modules/speech/SpeechRecognition.h: (SpeechRecognition): 2012-06-21 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Move requestId allocation from FileSystem frontend to backend https://bugs.webkit.org/show_bug.cgi?id=89555 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/get-filesystem-root.html: http/tests/inspector/filesystem/read-directory.html: * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): (WebCore::InspectorFileSystemAgent::requestDirectoryContent): (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype._originAdded): (WebInspector.FileSystemModel.prototype._fileSystemRootReceived): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot): (WebInspector.FileSystemRequestManager.prototype._fileSystemRootReceived): (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted): (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent): (WebInspector.FileSystemRequestManager.prototype._directoryContentReceived): (WebInspector.FileSystemDispatcher.prototype.fileSystemRootReceived): (WebInspector.FileSystemDispatcher.prototype.directoryContentReceived): 2012-06-20 Arnaud Renevier <arno@renevier.net> [cairo] improve putByteArray speed by avoiding max/min checks at Color construction. https://bugs.webkit.org/show_bug.cgi?id=89138 Reviewed by Adam Barth. Color constructor accepts integer arguments and checks if they are between 0 and 255. In some cases, we already known those numbers to be within those boundaries. For example when using unsigned chars. So this patch introduces Color::createUnChecked which return a Color object without checking for boundaries. No new tests: no behaviour change * platform/graphics/Color.cpp: (WebCore::colorFromPremultipliedARGB): * platform/graphics/Color.h: (WebCore::Color::createUnCheked): (Color): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::putByteArray): 2012-06-20 Zeev Lieber <zlieber@chromium.org> [Chromium] Damage tracker is not used without partial swap, causing valid render passes to be removed https://bugs.webkit.org/show_bug.cgi?id=89589 Reviewed by Adrienne Walker. When not using partial swap, the CCDamageTracker was not used, and its m_currentDamageRect was always empty. As a result, CCLayerTreeHostImpl was thinking no content was changed and was removing more textures than needed. Fixed this by turning on CCDamageTracker usage even if not using partial swap, but overwriting the rootScissorRect with viewport rect if required. Added unit tests to exercise this scenario. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): 2012-06-20 Yoshifumi Inoue <yosin@chromium.org> [Forms] Make step action of SpinButtonElement replaceable https://bugs.webkit.org/show_bug.cgi?id=89439 Reviewed by Kent Tamura. This patch introduces SpinButtonElement::Callback to specify step action by control clients for using SpinButtonElement by TextFieldInputType and future version of TimeInputField. In addition to this improving flexibility of SpinButtonElement, we free HTMLInputElement from SpinButtonElement dependency on stepUpFromRenderer. No new tests. This patch doesn't change behavior. * html/HTMLInputElement.cpp: Removed stepUpFromRenderer(). * html/HTMLInputElement.h: Removed stepUpFromRenderer(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::~TextFieldInputType): Added to call SpinButtonElement::removeStepActionHandler. (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Changed to call spinButtonStep{Down,Up} (WebCore::TextFieldInputType::handleWheelEventForSpinButton): Changed to call spinButtonStep{Down,Up} (WebCore::TextFieldInputType::createShadowSubtree): Added SpinButtonElement::StepActionHandler parameter. (WebCore::TextFieldInputType::destroyShadowSubtree): Added to call SpinButtonElement::removeStepActionHandler. (WebCore::TextFieldInputType::spinButtonStepDown): Added for implementation of SpinButtonElement::StepActionHandler. (WebCore::TextFieldInputType::spinButtonStepUp): Added for implementation of SpinButtonElement::StepActionHandler. * html/TextFieldInputType.h: (TextFieldInputType): * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::SpinButtonElement): Added StepActionHandler parameter. (WebCore::SpinButtonElement::defaultEventHandler): Changed to call doStepAction. (WebCore::SpinButtonElement::doStepAction): Added to call StepActionHandler if possible. (WebCore::SpinButtonElement::step): Changed to call doStepAction. * html/shadow/TextControlInnerElements.h: (StepActionHandler): Added. 2012-06-20 Adrienne Walker <enne@google.com> [chromium] Modify CCDamageTracker hash to allow for layer id 0 https://bugs.webkit.org/show_bug.cgi?id=89631 Reviewed by James Robinson. HashMap has the bizarre property that 0 is the empty value for integer keys. Modify the damage tracking HashMap to use negative values for both the empty and the deleted key traits. Additionally, make sure we never generate negative layer IDs in practice. Test: passes webkit_unit_tests with the patch in bug 89589 applied. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/cc/CCDamageTracker.h: (RectMapKeyTraits): (WebCore::CCDamageTracker::RectMapKeyTraits::emptyValue): (WebCore::CCDamageTracker::RectMapKeyTraits::constructDeletedValue): (WebCore::CCDamageTracker::RectMapKeyTraits::isDeletedValue): (CCDamageTracker): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): 2012-06-20 Adam Klein <adamk@chromium.org> Use Dictionary in MutationObserver.observe to kill custom code https://bugs.webkit.org/show_bug.cgi?id=89629 Reviewed by Ryosuke Niwa. Move code for dictionary parsing in MutationObserver.observe that used to be duplicated (with different implementations) in JSC and V8 bindings into WebKitMutationObserver.cpp, using the new Dictionary interface. No new tests, no change in behavior. * bindings/js/JSWebKitMutationObserverCustom.cpp: * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::observe): * dom/WebKitMutationObserver.h: (WebCore): * dom/WebKitMutationObserver.idl: 2012-06-20 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120889. http://trac.webkit.org/changeset/120889 https://bugs.webkit.org/show_bug.cgi?id=89630 [Chromium] webkit_unit_tests didDrawNotCalledOnHiddenLayer start failing (Requested by ukai on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): 2012-06-20 Hayato Ito <hayato@chromium.org> [Shadow][Editing] Deleting character in distributed element caused a crash. https://bugs.webkit.org/show_bug.cgi?id=88484 Reviewed by Ryosuke Niwa. If we mutate nodes which are children of a shadow host, it causes ElementShadow::invalidateDistribution(). As a result, shadow host is detached (and lazyAttached()) and its renderer is gone. That causes assertion error since isEditablePosition() assumes anchorNode's style was correctly calculated. This patch makes isEditablePosition() call document->updateLayoutIgnorePendingStylesheets() so that it does not return a bogus result. There is an exceptional caller of isEditablePosition, RenderBlock::paintCaret(), from where we can not call updateLayout() in isEditablePosition because it hits assertion, ASSERT(!isPainting). So I've added the third parameter to isEditablePosition to control updating the style. Test: edition/shadow/delete-characters-in-distributed-node.html * editing/FrameSelection.h: (WebCore::FrameSelection::rendererIsEditable): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::rendererIsEditable): (WebCore): * editing/VisibleSelection.h: (VisibleSelection): * editing/htmlediting.cpp: (WebCore::isEditablePosition): * editing/htmlediting.h: (WebCore): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintCaret): 2012-06-20 Kent Tamura <tkent@chromium.org> Unmodified form control value are overwritten by another form control value with the same name after navigating and going back https://bugs.webkit.org/show_bug.cgi?id=89409 Reviewed by Hajime Morita. Detail of the bug: If a page had multiple form controls of which names and types were identical like the following: <input type=text name=name1 id=input1> <input type=text name=name1 id=input2> and a user updated the value of the second control, then went to another page and went back to the page again, we restored the updated value to the first element, and didn't update the second element. We didn't save unmodified control state, and the form state data had no ways to represent "this control should be skipped". How to resovle the bug: We need to represent "this control should be skipped" in the seriazlied form state vector. - A serialized control state had three items: name, type, value. Now we change it to: name, type, flag, optional value - It is definitely incompatible with serizlized state produced by older WebCore. So, we need to add the signature string to represent the version of serialized state format. - Because the state for a form control is variable-length and we can't deserialize it in reverse-order, we change the on-memory representation from Vector<> to Deque<>. Test: fast/forms/state-restore-to-non-edited-controls.html * html/FormController.cpp: (WebCore::FormControlState::serializeTo): Added. Serialize a state for a form control to a string vector. (WebCore::FormControlState::deserialize): Added. Produce a FormControlState object from the specified string vector. It can produce a FromControlState of the failure type. (WebCore::formStateSignature): The signature string of the serialized state. (WebCore::FormController::formElementsState): - Capacity: The size of seirlized data for one form control is typically 4. +1 for the signature. - We need to store a FormControlState with no values. (WebCore::FormController::setStateForNewFormElements): - We can't iterate over the stateVector in reverse order any more because serialized control state is variable-length. - We put FormControlState objects to HashMap instead of String objects. (WebCore::FormController::takeStateForFormElement): Updated for Deque<>. * html/FormController.h: (FormControlState): Declare deserialize() and serializeTo(). (WebCore::FormControlState::isFailure): Added. (WebCore::FormControlState::FormControlState): Added to create a FormControlState with failure type. (FormController): Change the value type of m_stateForNewFormElements from Vector<String> to Deque<FormControlState>. 2012-06-20 Alexandru Chiculita <achicu@adobe.com> [CSS Shaders] Rename CustomFilterShader class name to CustomFilterCompiledProgram https://bugs.webkit.org/show_bug.cgi?id=89578 Reviewed by Dean Jackson. I've renamed CustomFilterShader to CustomFilterCompiledProgram to make it obvious that it is the result of calling CustomFilterProgram::compileProgramWithContext. No new tests, just renamed an existing class. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/CustomFilterCompiledProgram.cpp: Renamed from Source/WebCore/platform/graphics/filters/CustomFilterShader.cpp. (WebCore): (WebCore::CustomFilterCompiledProgram::defaultVertexShaderString): (WebCore::CustomFilterCompiledProgram::defaultFragmentShaderString): (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram): (WebCore::CustomFilterCompiledProgram::compileShader): (WebCore::CustomFilterCompiledProgram::linkProgram): (WebCore::CustomFilterCompiledProgram::initializeParameterLocations): (WebCore::CustomFilterCompiledProgram::uniformLocationByName): (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): * platform/graphics/filters/CustomFilterCompiledProgram.h: Renamed from Source/WebCore/platform/graphics/filters/CustomFilterShader.h. (WebCore): * platform/graphics/filters/CustomFilterProgram.cpp: (WebCore::CustomFilterProgram::compileProgramWithContext): Renamed method from createShaderWithContext to compileProgramWithContext. * platform/graphics/filters/CustomFilterProgram.h: (WebCore): * platform/graphics/filters/FECustomFilter.cpp: Renamed m_shader to m_compiledProgram. (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::bindProgramParameters): (WebCore::FECustomFilter::bindProgramAndBuffers): * platform/graphics/filters/FECustomFilter.h: (WebCore): (FECustomFilter): 2012-06-19 Andrey Kosyakov <caseq@chromium.org> Web Inspector: reduce timeline refresh rate https://bugs.webkit.org/show_bug.cgi?id=89548 Reviewed by Pavel Feldman. Minimize resource contention with the inspected page during refresh: - reduce refresh for both overview and main panes to 300ms - automatically limit window size to approximately one pageful of events in the lower pane - do not refresh lower pane for events that are outside of the window * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._update): (WebInspector.TimelineOverviewPane.prototype._onWindowChanged): (WebInspector.TimelineOverviewPane.prototype.setWindowTimes): Set overview window by times. (WebInspector.TimelineOverviewPane.prototype._updateWindow): (WebInspector.TimelineOverviewPane.prototype._scheduleRefresh): Refresh once in 300ms (insted of once in 100ms). (WebInspector.TimelineOverviewWindow.prototype._setWindow): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): Do not refresh if the new record is outside of window. (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._resetPanel): (WebInspector.TimelinePanel.prototype._scheduleRefresh): Refresh rate: 100ms -> 300ms. (WebInspector.TimelinePanel.prototype._refreshRecords): Automatically set overview window. * inspector/front-end/TimelinePresentationModel.js: Expose filterRecords (WebInspector.TimelinePresentationModel.prototype.filteredRecords): (WebInspector.TimelinePresentationModel.prototype.filterRecords): (WebInspector.TimelinePresentationModel.prototype._innerFilterRecords): 2012-06-20 Zeev Lieber <zlieber@chromium.org> [Chromium] Damage tracker is not used without partial swap, causing valid render passes to be removed https://bugs.webkit.org/show_bug.cgi?id=89589 Reviewed by Adrienne Walker. When not using partial swap, the CCDamageTracker was not used, and its m_currentDamageRect was always empty. As a result, CCLayerTreeHostImpl was thinking no content was changed and was removing more textures than needed. Fixed this by turning on CCDamageTracker usage even if not using partial swap, but overwriting the rootScissorRect with viewport rect if required. Added unit tests to exercise this scenario. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): 2012-06-20 Joshua Bell <jsbell@chromium.org> IndexedDB: Remove redundant IDBObjectStore.delete() overloads https://bugs.webkit.org/show_bug.cgi?id=89587 Reviewed by Darin Fisher. The IDBObjectStore.delete(IDBKey) overload can delegate to the delete(IDBKeyRange) overload. Also cleaned up redundant checks in related overloads. Test: storage/indexeddb/deleted-objects.html * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::deleteFunction): Call keyRange variant instead. * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::get): Remove redundant deleted/invalid IDBKey checks. (WebCore::IDBIndex::getKey): Remove redundant deleted/invalid IDBKey checks. * Modules/indexeddb/IDBKeyRange.cpp: Null IDBKeys are not acceptable; currently not passed in by any callers. (WebCore::IDBKeyRange::only): (WebCore::IDBKeyRange::lowerBound): (WebCore::IDBKeyRange::upperBound): (WebCore::IDBKeyRange::bound): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::get): Was missing deleted check in IDBKeyRange overload. Removed redundant checks in IDBKey overload. (WebCore::IDBObjectStore::deleteFunction): Delegate to IDBKeyRange overload. * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove IDBKey overload. * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Remove IDBKey overload. (IDBObjectStoreBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove IDBKey overload. 2012-06-20 Shinya Kawanaka <shinyak@chromium.org> [Shadow][Editing] Selection will break editing boundaries in Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=89075 Reviewed by Antti Koivisto. At the shadow boundary, some styles (e.g. user-modify, text-decoration) cannot be inherited from the shadow host. However, when style property cache is used, such styles are wrongly inherited from the cache. So this patch makes not to use cache for inehrited styles at the shadow boundary. Tests: editing/shadow/breaking-editing-boundary-with-table.html editing/shadow/contenteditable-propagation-at-shadow-boundary.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-20 Garret Kelly <gdk@chromium.org> Moving cookieEnabled/setCookieEnabled from Page to Settings. https://bugs.webkit.org/show_bug.cgi?id=89545 Reviewed by Adam Barth. * dom/Document.cpp: (WebCore::Document::cookie): (WebCore::Document::setCookie): * page/Navigator.cpp: (WebCore::Navigator::cookieEnabled): * page/Page.h: (Page): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setCookieEnabled): (WebCore::Settings::cookieEnabled): (Settings): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime): 2012-06-20 Adam Barth <abarth@webkit.org> internals.settings.setDeviceScaleFactor doesn't work for WebKit2 and must be removed https://bugs.webkit.org/show_bug.cgi?id=89274 Reviewed by James Robinson. Using this window.internals API causes the apple-mac port to ASSERT in WebKit2 because WebKit2 keeps a copy of this state in the UI process. When a test uses this internals API, the WebCore state gets out of sync with the state in the UI process. Tests should use setBackingScaleFactor instead. * testing/InternalSettings.cpp: (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-06-20 Andrey Kosyakov <caseq@chromium.org> Web Inspector: persist timeline panel overview mode https://bugs.webkit.org/show_bug.cgi?id=88711 Reviewed by Pavel Feldman. - replace all internal methods of switching to a new mode of TimelineOverviewPane with setMode(); - make current mode a persistent setting; * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype.setMode): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2012-06-20 Brady Eidson <beidson@apple.com> <rdar://problem/11653784> and https://bugs.webkit.org/show_bug.cgi?id=89590 showModalDialog message handling is flaky in WebKit2 Because RunLoop::performWork() swaps the function queue to a temporary Vector before calling the functions an inner run-loop - such as we see with running a modal dialog - does not have a change to handle any of the functions that were queued after the WebPageProxy::RunModal message. By servicing the functions in the queue one at a time we can give the RunLoop a chance to pick up where it left off if RunLoop::performWork is re-entered. To guarantee RunLoop::performWork is re-entered to handle those functions we also need to signal its source before entering the modal run loop so our RunLoop is woken up. Reviewed by Darin Adler. * WebCore.exp.in: * platform/RunLoop.cpp: (WebCore::RunLoop::performWork): Take the first function off the queue one at a time so subsequent functions remain in the queue and can be handled by an inner modal run loop. * platform/RunLoop.h: (RunLoop): Change the function queue to be a Deque to efficiently support "takeFirst" 2012-06-20 Varun Jain <varunjain@chromium.org> Account for device scale factor when creating image for dragging. https://bugs.webkit.org/show_bug.cgi?id=89489 Reviewed by Adam Barth. Manual Test: ManualTests/chromium/drag-image-accounts-for-device-scale.html * page/Frame.cpp: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): 2012-06-20 Jacky Jiang <zhajiang@rim.com> Add a != operator to ViewportArguments https://bugs.webkit.org/show_bug.cgi?id=87505 Reviewed by Antonio Gomes. Patch by Jacky Jiang <zhajiang@rim.com> Add a != operator to ViewportArguments for convenience. * dom/ViewportArguments.h: (ViewportArguments): (WebCore::ViewportArguments::operator!=): 2012-06-20 Ryosuke Niwa <rniwa@webkit.org> Let Xcode have its own way. * WebCore.xcodeproj/project.pbxproj: 2012-06-20 Ryosuke Niwa <rniwa@webkit.org> Move m_listsInvalidatedAtDocument from NodeListsNodeData to Document https://bugs.webkit.org/show_bug.cgi?id=89603 Reviewed by Andreas Kling. Moved the variable. m_listsInvalidatedAtDocument is never used in non-Document nodes so it was just wasting memory space. * dom/Document.cpp: (WebCore::Document::registerDynamicSubtreeNodeList): (WebCore::Document::unregisterDynamicSubtreeNodeList): (WebCore): (WebCore::Document::clearNodeListCaches): * dom/Document.h: (Document): * dom/DynamicNodeList.h: (DynamicSubtreeNodeList): * dom/Node.cpp: (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): (WebCore): (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): RadioNodeList is invalidated at document level. No need to invalidate it again here. (WebCore::NodeListsNodeData::isEmpty): * dom/NodeRareData.h: (NodeListsNodeData): 2012-06-20 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120854. http://trac.webkit.org/changeset/120854 https://bugs.webkit.org/show_bug.cgi?id=89604 Broke Chromium WebKit Linux (dbg) (Requested by arv on #webkit). * Target.pri: * UseV8.cmake: * WebCore.gypi: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WrapperTypeInfo): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp. (WebCore): (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): (WebCore): * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp. (WebCore): (WebCore::toV8): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): (WebCore): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8TextTrackListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp. (WebCore): (WebCore::toV8): * css/CSSStyleSheet.idl: * css/StyleSheet.idl: * dom/DOMStringMap.idl: * dom/NamedNodeMap.idl: * html/DOMTokenList.idl: * html/track/TextTrackList.idl: 2012-06-20 Abhishek Arya <inferno@chromium.org> Crash on accessing a removed renderer from percent height descendant map. https://bugs.webkit.org/show_bug.cgi?id=88017 Reviewed by Eric Seidel. Test: fast/block/percent-height-descendant-not-removed-crash2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hasPercentHeightContainerMap): helper to tell if we have a height container map. (WebCore): (WebCore::RenderBlock::hasPercentHeightDescendant): change from a debug only function to a regular function for use. no need to null check for a percent height container map in this function. (WebCore::RenderBlock::clearPercentHeightDescendantsFrom): helper to clear all percent height descendants under us. (WebCore::RenderBlock::removePercentHeightDescendantIfNeeded): helper to clear the box if it exists in the percent height descendant map. * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): remove the assert and change the percent height detection check to use removePercentHeightDescendantIfNeeded. We shouldn't rely on logicalHeight().isPercent() as it can change when our writing mode changes. Instead, just query the map directly to see if we exist. (WebCore::RenderBox::styleDidChange): when our writing mode changes from horizontal to vertical or vice versa, we clear all our descendants from the percent height descendant map. Cache the value of isHorizontalWritingMode() before it changes in styleDidChange and compare it with the new value (can't use oldStyle->isHorizontalWritingMode() since it can be inherited and already updated). 2012-06-20 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION(r113885): Margin not properly applied to elements with align=center https://bugs.webkit.org/show_bug.cgi?id=89515 Reviewed by Levi Weintraub. Reviewed by Levi Weintraub. Tests: fast/block/negative-margin-start-positive-margin-end.html fast/block/negative-start-margin-align-center.html fast/block/positive-margin-block-child-align-center-rtl.html fast/block/positive-margin-block-child-align-center.html fast/block/positive-margin-start-align-center.html fast/block/positive-margin-start-negative-margin-end-align-center.html fast/table/table-cell-negative-start-margin-align-center.html r113885 changed the code-path for elements with auto width to call computeInlineDirectionMargins. However this uncovered an existing bug in the function when dealing with align="center" (text-align: -webkit-center) where we would ignore the margin. This goes against what other browsers are doing and our previous behavior. Note that align="left" and "right" are likely impacted too and will be investigated / fixed in follow-up changes. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeInlineDirectionMargins): To match other browsers' behavior, changed the function to include margin in our computations. 2012-06-19 James Robinson <jamesr@chromium.org> [chromium] Separate LayerRenderer initialization from updateLayers https://bugs.webkit.org/show_bug.cgi?id=89525 Reviewed by Adrienne Walker. This adds an explicit call to initialize the layer renderer of a given CCLayerTreeHost instead of having it be implicit in updateLayers(). This way the proxies can control the initialization sequence more closely and do useful work between the two calls. Refactor, no change in behavior. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::initializeLayerRendererIfNeeded): (WebCore): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::beginFrame): 2012-06-20 Yong Li <yoli@rim.com> SecurityOrigin::canDisplay() should return true when m_universalAccess is true https://bugs.webkit.org/show_bug.cgi?id=84865 Reviewed by Adam Barth. Add an early return (true) in canDisplay() for if (m_universalAccess), as we did for canAccess() and canRequest(). No new tests. We should be good as long as this change doesn't break existing tests, which means the contents supposed to be blocked are still blocked when m_universalAccess is false. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canDisplay): 2012-06-20 Erik Arvidsson <arv@chromium.org> [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue https://bugs.webkit.org/show_bug.cgi?id=80880 Reviewed by Adam Barth. We used to add a hidden property in the getter to the returned wrapper. With this patch we instead handle the liveness of the wrapper in the GC phase by calling v8::V8::AddHiddenReference. To reduce the amount of custom code we need, the V8 code generator now supports GenerateIsReachable (as well as CustomIsReachable) which, even though different from the JSC attribute, is used in the same cases and takes the same values (even though at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable also have a dependent life time (just like if V8DependentLifetime was present). Retry. Last time we got ASAN issues on some Cromium Linux bots. No new tests. Covered by existing tests. * Target.pri: * UseV8.cmake: * WebCore.gypi: * bindings/scripts/CodeGeneratorJS.pm: (GetGenerateIsReachable): Abstracted GenerateIsReachable and JSGenerateIsReachable. (GetCustomIsReachable): Ditto. (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (NeedsToVisitDOMWrapper): (GetGenerateIsReachable): (GetCustomIsReachable): (GenerateVisitDOMWrapper): (GenerateHeader): (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WrapperTypeInfo): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed. * bindings/v8/custom/V8DOMStringMapCustom.cpp: * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8TextTrackListCustom.cpp: Removed. * css/CSSStyleSheet.idl: * css/StyleSheet.idl: * dom/DOMStringMap.idl: * dom/NamedNodeMap.idl: * html/DOMTokenList.idl: * html/track/TextTrackList.idl: 2012-06-20 Tony Chang <tony@chromium.org> Regression(r116408): Ctrl-A (select all) on large text file hangs the tab with high CPU usage https://bugs.webkit.org/show_bug.cgi?id=89562 Reviewed by Ryosuke Niwa. Rather than replace the newlines in-place (in O(n^2)), build a new string using StringBuilder, which takes O(n). No new tests, this is a perf improvement. * platform/chromium/ClipboardUtilitiesChromium.cpp: (WebCore::replaceNewlinesWithWindowsStyleNewlines): * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::replaceNewlinesWithWindowsStyleNewlines): 2012-06-20 Elliott Sprehn <esprehn@gmail.com> Add support for fit-content etc https://bugs.webkit.org/show_bug.cgi?id=38919 Reviewed by Tony Chang. Implement the CSS3 intrinsic dimension keywords for width properties and add most of the plumbing for height properties but don't expose them yet since this patch doesn't enforce them (matching current Gecko). http://dev.w3.org/csswg/css3-writing-modes/#intrinsic-sizing This patch implements -webkit-min-content, -webkit-max-content, -webkit-fill-available and -webkit-fit-content for all width properties. Tests: fast/css-intrinsic-dimensions/height-dynamic-property-value.html fast/css-intrinsic-dimensions/height-property-value.html fast/css-intrinsic-dimensions/max-width-constrained.html fast/css-intrinsic-dimensions/max-width-unconstrained.html fast/css-intrinsic-dimensions/min-width.html fast/css-intrinsic-dimensions/width-avoid-floats.html fast/css-intrinsic-dimensions/width-dynamic-property-value.html fast/css-intrinsic-dimensions/width-property-value.html fast/css-intrinsic-dimensions/width.html * css/CSSParser.cpp: Add parser support for the new keywords. (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValue.cpp: (WebCore): (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSValueKeywords.in: * css/LengthFunctions.cpp: Implement conversion functions. (WebCore::minimumValueForLength): (WebCore::valueForLength): (WebCore::floatValueForLength): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyLength::applyValue): (WebCore::StyleBuilder::StyleBuilder): Clean up the template for old intrinsic values and add new values. Rename old intrinsic to LegacyIntrinsic and add support for the new dimension keywords as Intrinsic. * platform/Length.h: (WebCore::Length::isIntrinsicOrAuto): (WebCore::Length::isLegacyIntrinsic): New method to check for old min-intrinsic and intrinsic keywords. (WebCore::Length::isIntrinsic): New method to check for CSS3 intrinsic dimension keywords like min-content. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegionUsing): Expose the max and min logical preferred widths as the new keywords. (WebCore::RenderBox::sizesLogicalWidthToFitContent): Renamed method to be more consistent with the new MinContent naming in the spec. * rendering/RenderBox.h: (RenderBox): 2012-06-20 Christopher Cameron <ccameron@chromium.org> [chromium] webkit-backface-visibility doesn't work with video https://bugs.webkit.org/show_bug.cgi?id=88908 When determining a contents layer's backface culling, use the parent layer's transform and backface-visibility properties. Track which layers need this special treatment with useParentBackfaceVisibility and setUseParentBackfaceVisibility functions in WebCore::LayerChromium, WebKit::WebLayer, and WebCore::CCLayerImpl. Reviewed by Adrienne Walker. Tests: compositing/backface-visibility/backface-visibility-image.html compositing/backface-visibility/backface-visibility-webgl.html * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setupContentsLayer): When a contents layer is added, tag it as inheriting its backface culling from its parent. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): Initialize new m_useParentBackfaceVisibility member variable. (WebCore::LayerChromium::pushPropertiesTo): Propagate m_useParentBackfaceVisibility to CCLayerImpl. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setUseParentBackfaceVisibility): (WebCore::LayerChromium::useParentBackfaceVisibility): (LayerChromium): Add m_useParentBackfaceVisibility member variable and modify and query accessors. * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): Initialize new m_useParentBackfaceVisibility member variable. * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setUseParentBackfaceVisibility): (WebCore::CCLayerImpl::useParentBackfaceVisibility): (CCLayerImpl): Add m_useParentBackfaceVisibility member variable and modify and query accessors. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::layerShouldBeSkipped): When examining a layer, if the layer has useParentBackfaceVisibility set then use the layer's parent layer to determine backface culling. 2012-06-20 Nate Chapin <japhet@chromium.org> Don't re-enter CachedResource::removeClient() if an XHR is canceled and restarted multiple times. https://bugs.webkit.org/show_bug.cgi?id=89378 Reviewed by Eric Seidel. Test: http/tests/xmlhttprequest/reentrant-cancel.html * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::cancel): (WebCore::DocumentThreadableLoader::clearResource): Save off a copy of m_resource then clear it, so we don't call clearResource() multiple times for the same resource. 2012-06-20 Robert Hogan <robert@webkit.org> Negative margin block doesn't properly clear a float enclosed by a previous sibling https://bugs.webkit.org/show_bug.cgi?id=10900 Reviewed by Eric Seidel. Tests: fast/block/float/previous-sibling-abspos-001.html fast/block/float/previous-sibling-abspos-002.html fast/block/float/previous-sibling-float-001.html fast/block/float/previous-sibling-float-002.html fast/css/clear-float-sibling.html Parent blocks keep a list of child floats that extend out of the parent block and by implication overhang into the parent's siblings. But this doesn't work if the sibling has collapsing margins - it will not find the float in the previous block's list so will ignore the float and fail to clear it. RenderBlock:collapseMargins() needs to check if a child's collapsing margin has reduced the height of the parent up past the bottom of its previous sibling's lowest float and add the now overhanging float to the parent's float list if appropriate. No need to do this if the previous sibling is a float or is positioned - the child will clear/avoid it anyway and attempting to avoid floated children of floats causes incorrect layout. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): 2012-06-20 Andrey Adaikin <aandrey@chromium.org> Web Inspector: Allow module injections into the InjectedScript https://bugs.webkit.org/show_bug.cgi?id=89530 Add a new InjectedScriptModule abstract class that inherits InjectedScriptBase to reuse implementation, and which javascript code is injected via InjectedScript. Reviewed by Pavel Feldman. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptObject.cpp: (WebCore::ScriptObject::ScriptObject): (WebCore): * bindings/js/ScriptObject.h: (ScriptObject): (WebCore::ScriptObject::ScriptObject): * bindings/v8/ScriptObject.cpp: (WebCore::ScriptObject::ScriptObject): (WebCore): * bindings/v8/ScriptObject.h: (ScriptObject): (WebCore::ScriptObject::~ScriptObject): * inspector/InjectedScript.cpp: * inspector/InjectedScript.h: (WebCore): (WebCore::InjectedScript::name): (InjectedScript): * inspector/InjectedScriptBase.cpp: (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled): * inspector/InjectedScriptBase.h: (WebCore): (InjectedScriptBase): * inspector/InjectedScriptManager.h: (InjectedScriptManager): (WebCore::InjectedScriptManager::inspectedStateAccessCheck): * inspector/InjectedScriptModule.cpp: Copied from Source/WebCore/inspector/InjectedScriptBase.h. (WebCore): (WebCore::InjectedScriptModule::InjectedScriptModule): (WebCore::InjectedScriptModule::ensureInjected): * inspector/InjectedScriptModule.h: Copied from Source/WebCore/bindings/js/ScriptObject.h. (WebCore): (InjectedScriptModule): * inspector/InjectedScriptSource.js: (.): 2012-06-20 Pavel Feldman <pfeldman@chromium.org> Web Inspector: Timeline label bar jiggles when scrolling https://bugs.webkit.org/show_bug.cgi?id=89579 Reviewed by Vsevolod Vlasov. Adding timeline header into the timeline panel and settings its position to absolute. Drive-by fix that updates rulers on sidebar resize. * inspector/front-end/TimelineGrid.js: (WebInspector.TimelineGrid): (WebInspector.TimelineGrid.prototype.get gridHeaderElement): (WebInspector.TimelineGrid.prototype.addEventDividers): (WebInspector.TimelineGrid.prototype.setScrollAndDividerTop): * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.sidebarResized): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.sidebarResized): (WebInspector.TimelinePanel.prototype.onResize): * inspector/front-end/timelinePanel.css: (#timeline-grid-header): 2012-06-20 Ian Vollick <vollick@chromium.org> [chromium] Make sure that render surfaces are not pixel doubled with a device scale factor of 2 https://bugs.webkit.org/show_bug.cgi?id=86882 Reviewed by Adrienne Walker. To ensure that render surfaces are not pixel doubled when device scale factor is two, the render surface's owning layer's draw transform is scaled by the contents scale (in the same way that the parent matrix is scaled by the device scale factor). The transformedLayerRect's dimensions also need to be in pixel space. The surface origin transform should not scale, but needs to offset the correct number of pixels, and the replica transforms need to be modified to account for the scaling. To accomplish this, CCLayerImpl's needed to be made aware of contentsScale. Thanks to Adrienne Walker for the computation of the replica draw transform. Unit test: CCLayerTreeHostCommonTest.verifyRenderSurfaceTranformsInHighDPI * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setContentsScale): (WebCore::CCLayerImpl::contentsScale): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize): 2012-06-20 Alexis Menard <alexis.menard@openbossa.org> [CSS3 Backgrounds and Borders] Implement box-decoration-break rendering. https://bugs.webkit.org/show_bug.cgi?id=88228 Reviewed by Eric Seidel. Implement the new CSS property box-decoration-break. It modifies where we decide whether the borders needs to be sliced or not by checking if the box-decoration-break is set to clone. If it's the case then we need to explicitely redraw all edges. Test: fast/box-decoration-break/box-decoration-break-rendering.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): (WebCore::InlineFlowBox::paintFillLayer): 2012-06-20 Julien Chaffraix <jchaffraix@webkit.org> Use IntSize in RenderLayer to represent scroll offsets https://bugs.webkit.org/show_bug.cgi?id=89154 Reviewed by Eric Seidel. Refactoring, covered by existing tests. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::scrollTo): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::forwardEvent): * page/SpatialNavigation.cpp: (WebCore::scrollInDirection): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::start): Updated those call-sites to use the IntSize variant of the scrolling function. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::panScrollFromPoint): Updated the signature to use IntPoint to avoid an extra round-trip to LayoutPoint (furthermore touch points should be in device pixels). (WebCore::RenderLayer::clampScrollOffset): Added this function that clamps a scroll offset to the box's size. This enables more code sharing between the different functions. Also removed a NULL-check that shouldn't be needed: scrolling is a RenderBox concept so any callers should ensure that we have a RenderBox or it makes no sense to try to scroll. (WebCore::RenderLayer::updateLayerPosition): (WebCore::adjustedScrollDelta): (WebCore::RenderLayer::scrollByRecursively): (WebCore::RenderLayer::scrollToOffset): (WebCore::RenderLayer::scrollRectToVisible): (WebCore::RenderLayer::updateScrollInfoAfterLayout): Updated to do IntSize arithmetic. Reuse clampScrollOffset when applicable. * rendering/RenderLayer.h: (WebCore::RenderLayer::scrollToXOffset): (WebCore::RenderLayer::scrollToYOffset): Updated the functions to take IntSize as much as possible. 2012-06-20 Alexei Filippov <alexeif@chromium.org> Web Inspector: mark used/allocated JS heap on the native memory bar chart. https://bugs.webkit.org/show_bug.cgi?id=89476 Reviewed by Yury Semikhatsky. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart): (WebInspector.NativeMemoryBarChart.prototype._updateView): * inspector/front-end/nativeMemoryProfiler.css: (.memory-bar-chart-bar): (.memory-bar-chart-unused): (.memory-bar-chart-percent): 2012-06-20 Joshua Bell <jsbell@chromium.org> [Chromium] IndexedDB: Don't close database if pending connections are in flight https://bugs.webkit.org/show_bug.cgi?id=89512 Add a counter tracking connections between the two phases, which is used along with the completed connection count to determine the total number of connections. Reviewed by Tony Chang. Test: webkit_unit_tests --gtest_filter='IDBDatabaseBackendTest.ConnectionLifecycle' * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::connectionCount): (WebCore): (WebCore::IDBDatabaseBackendImpl::processPendingCalls): (WebCore::IDBDatabaseBackendImpl::transaction): (WebCore::IDBDatabaseBackendImpl::registerFrontendCallbacks): (WebCore::IDBDatabaseBackendImpl::openConnection): (WebCore::IDBDatabaseBackendImpl::close): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::openInternal): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): 2012-06-20 Sergey Rogulenko <rogulenko@google.com> Web Inspector: duplicating selected text when Enter key is pressed https://bugs.webkit.org/show_bug.cgi?id=89559 Reviewed by Pavel Feldman. * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype.handleEnterKey): The returned result of method normalize() should be used. 2012-06-20 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [Cairo] Fix memory leak in GraphicsContext3DCairo.cpp https://bugs.webkit.org/show_bug.cgi?id=89561 Reviewed by Martin Robinson. Fix a memory leak in GraphicsContext3D::getImageData(). * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::getImageData): asNewNativeImage() returns a caller-owned pointer to the native image data. So, using OwnPtr to manage memory automatically. 2012-06-20 Allan Sandfeld Jensen <allan.jensen@nokia.com> Use HitTestPoint instead of LayoutPoint for nodeAtPoint. https://bugs.webkit.org/show_bug.cgi?id=89448 Reviewed by Eric Seidel. This patch updates the API of nodeAtPoint without changing any functionality. This is largest change necessary to support transforms in area-based hit-testing, but is only boilerplate. No change in functionality. No new tests. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: (EllipsisBox): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::addNodeToRectBasedTestResult): * rendering/HitTestResult.h: (WebCore::HitTestPoint::intersects): (HitTestPoint): (HitTestResult): * rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint): * rendering/InlineBox.h: (InlineBox): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineFlowBox.h: (InlineFlowBox): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/InlineTextBox.h: (InlineTextBox): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestColumns): (WebCore::RenderBlock::hitTestContents): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderBox.h: (RenderBox): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::nodeAtPoint): * rendering/RenderEmbeddedObject.h: (RenderEmbeddedObject): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::hitTestRegion): * rendering/RenderFlowThread.h: * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): * rendering/RenderFrameSet.h: (RenderFrameSet): * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): * rendering/RenderImage.h: (RenderImage): * rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint): * rendering/RenderInline.h: (RenderInline): * rendering/RenderLayer.cpp: (WebCore::ClipRect::intersects): (WebCore::RenderLayer::hitTest): (WebCore::RenderLayer::createLocalTransformState): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::hitTestContents): (WebCore::RenderLayer::hitTestList): (WebCore::RenderLayer::hitTestPaginatedChildLayer): (WebCore::RenderLayer::hitTestChildLayerColumns): * rendering/RenderLayer.h: (ClipRect): (RenderLayer): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest): * rendering/RenderLineBoxList.h: (RenderLineBoxList): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::nodeAtPoint): * rendering/RenderListBox.h: (RenderListBox): * rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): (WebCore::RenderObject::nodeAtPoint): * rendering/RenderObject.h: (RenderObject): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::nodeAtPoint): * rendering/RenderRegion.h: (RenderRegion): * rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: (RenderTable): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableRow.h: (RenderTableRow): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: (RenderTableSection): * rendering/RenderText.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint): * rendering/RenderTextControlMultiLine.h: (RenderTextControlMultiLine): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint): * rendering/RenderTextControlSingleLine.h: (RenderTextControlSingleLine): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint): * rendering/RenderWidget.h: (RenderWidget): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): * rendering/RootInlineBox.h: (RootInlineBox): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): (WebCore::RenderSVGForeignObject::nodeAtPoint): * rendering/svg/RenderSVGForeignObject.h: (RenderSVGForeignObject): * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::nodeAtPoint): * rendering/svg/RenderSVGModelObject.h: (RenderSVGModelObject): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): (WebCore::RenderSVGText::nodeAtPoint): * rendering/svg/RenderSVGText.h: (RenderSVGText): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::nodeAtPoint): * rendering/svg/SVGInlineTextBox.h: (SVGInlineTextBox): 2012-06-20 Yury Semikhatsky <yurys@chromium.org> Web Inspector: don't report context ids before DidCommitLoad https://bugs.webkit.org/show_bug.cgi?id=89567 Reviewed by Pavel Feldman. When inspector state is restored only report existing context ids if "did commit load" even has already been dispatched. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): (WebCore::PageRuntimeAgent::restore): * inspector/PageRuntimeAgent.h: (WebCore): (WebCore::PageRuntimeAgent::create): (PageRuntimeAgent): 2012-06-20 Zeev Lieber <zlieber@chromium.org> [Chromium] Remove redundant #includes in compositor https://bugs.webkit.org/show_bug.cgi?id=89503 Reviewed by Adrienne Walker. Removed some redundant #includes to clarify dependency picture. Some 90 #includes removed, some 50 less disruptive #includes added. This brings the number of class dependencies to 902 from 1383. No new tests are required, as this is only affects compile-time behavior. * platform/graphics/chromium/AnimationTranslationUtil.h: (WebCore): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: * platform/graphics/chromium/Canvas2DLayerBridge.cpp: * platform/graphics/chromium/Canvas2DLayerBridge.h: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ProgramBinding.h: * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureCopier.cpp: * platform/graphics/chromium/TextureLayerChromium.cpp: * platform/graphics/chromium/TextureManager.cpp: * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCActiveAnimation.h: (WebCore): * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: * platform/graphics/chromium/cc/CCDrawQuad.cpp: * platform/graphics/chromium/cc/CCFontAtlas.cpp: * platform/graphics/chromium/cc/CCFrameRateController.cpp: * platform/graphics/chromium/cc/CCFrameRateController.h: (WebCore): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerAnimationController.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: * platform/graphics/chromium/cc/CCOcclusionTracker.h: (WebCore): * platform/graphics/chromium/cc/CCProxy.cpp: * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): * platform/graphics/chromium/cc/CCRenderSurface.cpp: * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCRenderer.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCTimer.cpp: * platform/graphics/chromium/cc/CCTimer.h: (WebCore): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 2012-06-20 Alexei Filippov <alexeif@chromium.org> Web Inspector: Implement native memory bar diagram https://bugs.webkit.org/show_bug.cgi?id=89106 Reviewed by Yury Semikhatsky. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart): (WebInspector.NativeMemoryBarChart.prototype._updateStats): (WebInspector.NativeMemoryBarChart.prototype.willHide): (WebInspector.NativeMemoryBarChart.prototype.wasShown): (WebInspector.NativeMemoryBarChart.prototype._updateView): * inspector/front-end/ProfileLauncherView.js: (WebInspector.ProfileLauncherView): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/nativeMemoryProfiler.css: (.memory-bar-chart-name): (.memory-bar-chart-bar): (.memory-bar-chart-size): (.memory-bar-chart-total): 2012-06-20 Hans Wennborg <hans@chromium.org> Speech JavaScript API: add SpeechRecognition.maxAlternatives attribute https://bugs.webkit.org/show_bug.cgi?id=89459 Reviewed by Eric Seidel. Add the SpeechRecognition.maxAlternatives attribute. Test: fast/speech/scripted/basics.html: * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::start): (WebCore::SpeechRecognition::SpeechRecognition): * Modules/speech/SpeechRecognition.h: (WebCore::SpeechRecognition::maxAlternatives): (WebCore::SpeechRecognition::setMaxAlternatives): (SpeechRecognition): * Modules/speech/SpeechRecognition.idl: * Modules/speech/SpeechRecognitionClient.h: (SpeechRecognitionClient): * Modules/speech/SpeechRecognitionController.h: (WebCore::SpeechRecognitionController::start): (SpeechRecognitionController): 2012-06-20 Takashi Sakamoto <tasak@google.com> applyAuthorStyles makes rules declared in all enclosing shadow dom subtrees applicable. https://bugs.webkit.org/show_bug.cgi?id=89061 Reviewed by Dimitri Glazkov. Fixing apply-author-styles bug. If there exists some shadow subtree A and A has apply-author-styles flag set, whether some rules declared in a tree B is applicable in A or not depends on: - the tree B encloses the tree A, and - all trees which enclose A and are enclosed by B has apply-author-styles set. c.f. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles However the second rule was not implemented. Test: fast/css/style-scoped/style-scoped-apply-author-styles.html * css/StyleResolver.cpp: (WebCore::StyleResolver::setupScopeStack): Modified to add a new member variable, authorStyleBoundsIndex to ScopeStackFrame used by m_scopeStack. The index means: if shadow dom subtree A and B has the same value and A encloses B, all shadow dom subtrees which enclose B and are enclosed by B have apply-author-styles set. And B also has apply-author-styles set. This means, if some element X has authorStyleBoundsIndex N, all rulesets whose scopes have authorStyleBoundsIndex N are applicable in B's tree scope. If all shadow dom subtrees have apply-author-styles unset, the index looks almost the same as treeScope(). In this case, Rules in different tree scopes have different author style bounds index. (WebCore::StyleResolver::pushScope): (WebCore::StyleResolver::popScope): Added the code for updating m_scopeStackParentBoundsIndex. The member variable keeps m_scopeStackParent's author style bounds index. (WebCore::StyleResolver::matchScopedAuthorRules): Modified to consider author style's bounds index. Firstly applying scoped styles declared in document if apply-author-styles is set. Next, applying scoped styles declared in shadow dom subtree with considering author style bounds index, i.e. considering apply-author-styles flag. * css/StyleResolver.h: (WebCore::StyleResolver::ScopeStackFrame::ScopeStackFrame): (ScopeStackFrame): Added m_authorStyleBoundsIndex to keep apply-author-styles flag information. m_authorStyleBoundsIndex increments by 1 if shadow root is given and it has apply-author-styles unset. Now rules in the same authorStyleBoundsIndex should be applied. (StyleResolver): Added m_scopeStackParentBoundsIndex. As m_scopeStackParentAuthorStyleBoundsIndex is a little long, used m_scopeStackParentBoundsIndex. 2012-06-20 Amy Ousterhout <aousterh@chromium.org> Adds DeviceMotionClientMock https://bugs.webkit.org/show_bug.cgi?id=89220 Reviewed by Steve Block. No new tests because DeviceMotionClientMock is designed to enable future testing and cannot be tested in itself. Adds DeviceMotionClientMock in WebCore to enable testing of DeviceMotion once it is fully implemented in WebKit. This addition was originally included in https://bugs.webkit.org/show_bug.cgi?id=89197 but was split into a separate patch for easier review. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/mock/DeviceMotionClientMock.cpp: Added. (WebCore): (WebCore::DeviceMotionClientMock::DeviceMotionClientMock): (WebCore::DeviceMotionClientMock::setController): (WebCore::DeviceMotionClientMock::startUpdating): (WebCore::DeviceMotionClientMock::stopUpdating): (WebCore::DeviceMotionClientMock::setMotion): (WebCore::DeviceMotionClientMock::timerFired): * platform/mock/DeviceMotionClientMock.h: Added. (WebCore): (DeviceMotionClientMock): 2012-06-19 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: Clicking "Clear all profiles" while ongoing recording should reset the ProfileLauncherView https://bugs.webkit.org/show_bug.cgi?id=89464 Reviewed by Yury Semikhatsky. Resetting the ProfileLauncherView in order to reflect the correct states of buttons No new tests as UI related minor fix. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._reset): 2012-06-19 Hayato Ito <hayato@chromium.org> Assertion for event's target is wrong. https://bugs.webkit.org/show_bug.cgi?id=89479 Reviewed by Hajime Morita. Fix an assertion to ensure that event's target is reachable from a current target. No new tests. Fix an assert condition. * dom/EventContext.cpp: (WebCore::EventContext::EventContext): * dom/EventContext.h: (EventContext): (WebCore::EventContext::setRelatedTarget): (WebCore::EventContext::isUnreachableNode): (WebCore): (WebCore::EventContext::isReachable): 2012-06-19 Benjamin Poulain <bpoulain@apple.com> Refactoring: Geolocation::startRequest() should not create the GeoNotifiers https://bugs.webkit.org/show_bug.cgi?id=89533 Reviewed by David Kilzer. It was odd to create the GeoNotifiers in Geolocation::startRequest() and having assertions from the call site. This patch move GeoNotifiers initialization to the exposed methods and pass them to startRequest() as needed. This will also help when adding support for dynamic permission reset and suspend/resume. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::getCurrentPosition): (WebCore::Geolocation::watchPosition): (WebCore::Geolocation::startRequest): * Modules/geolocation/Geolocation.h: (Geolocation): 2012-06-19 Cris Neckar <cdn@chromium.org> Fixes condition where inserting a CounterNode subtree which could result in incorrect placement. https://bugs.webkit.org/show_bug.cgi?id=88142 Reviewed by Adam Barth. Test: fast/css/counters/counter-reset-subtree-insert-crash.html * rendering/CounterNode.cpp: (WebCore::CounterNode::insertAfter): 2012-06-19 Csaba Osztrogonác <ossy@webkit.org> [Qt] Unreviewed buildfix after r120790. Typo fix. * platform/graphics/gstreamer/ImageGStreamerQt.cpp: (ImageGStreamer::ImageGStreamer): 2012-06-19 Takashi Sakamoto <tasak@google.com> [Shadow DOM] ShadowRoot.host should be gone https://bugs.webkit.org/show_bug.cgi?id=88387 According to the w3c spec change, i.e. https://www.w3.org/Bugs/Public/show_bug.cgi?id=16764 Removed host attribute from ShadowRoot.idl. Reviewed by Dimitri Glazkov. No new tests, because this change modified only idl. * dom/ShadowRoot.idl: Just removed host attribute. 2012-06-19 Adam Klein <adamk@chromium.org> Pass ScriptValue by const ref where possible https://bugs.webkit.org/show_bug.cgi?id=89531 Reviewed by Kentaro Hara. Previously ScriptValue was sometimes passed by value, sometimes by const ref. For consistency and optimality, pass by const ref everywhere (except where ScriptValue is returned from non-accessor methods). No new tests, no change in behavior. * bindings/js/ScriptFunctionCall.h: (ScriptCallback): * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::getHeapObjectId): * bindings/js/ScriptProfiler.h: (ScriptProfiler): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::setException): * bindings/js/WorkerScriptController.h: (WorkerScriptController): * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptCallback::ScriptCallback): * bindings/v8/ScriptFunctionCall.h: (ScriptCallback): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::getHeapObjectId): (WebCore): * bindings/v8/ScriptProfiler.h: (ScriptProfiler): * bindings/v8/ScriptValue.h: (WebCore::ScriptValue::operator==): (WebCore::ScriptValue::operator!=): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::setException): * bindings/v8/WorkerScriptController.h: (WorkerScriptController): * css/MediaQueryListListener.h: (WebCore::MediaQueryListListener::create): (WebCore::MediaQueryListListener::MediaQueryListListener): * dom/CustomEvent.cpp: (WebCore::CustomEvent::initCustomEvent): * dom/CustomEvent.h: (CustomEvent): (WebCore::CustomEvent::detail): * dom/MessageEvent.h: (WebCore::MessageEvent::dataAsScriptValue): * dom/PopStateEvent.h: (WebCore::PopStateEvent::state): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::wrapObject): * inspector/InjectedScript.h: (InjectedScript): 2012-06-18 Philippe Normand <pnormand@igalia.com> [GStreamer] 0.11 video-sink https://bugs.webkit.org/show_bug.cgi?id=77087 Reviewed by Martin Robinson. Port the video sink to GStreamer 0.11 APIs. There is no change in functionality compared to 0.10, for now. * platform/graphics/gstreamer/GStreamerVersioning.cpp: (webkitGetVideoSizeAndFormatFromCaps): (webkitGstCreateBuffer): * platform/graphics/gstreamer/GStreamerVersioning.h: (WebCore): * platform/graphics/gstreamer/ImageGStreamer.h: (WebCore::ImageGStreamer::createImage): (WebCore::ImageGStreamer::setCropRect): (WebCore::ImageGStreamer::rect): (ImageGStreamer): * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: (ImageGStreamer::ImageGStreamer): * platform/graphics/gstreamer/ImageGStreamerQt.cpp: (ImageGStreamer::ImageGStreamer): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::naturalSize): * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (_WebKitVideoSinkPrivate): (webkitVideoSinkRender): (webkitVideoSinkProposeAllocation): (webkit_video_sink_class_init): * platform/graphics/gstreamer/VideoSinkGStreamer.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 2012-06-19 Tony Payne <tpayne@chromium.org> Add monitor profile support for Win https://bugs.webkit.org/show_bug.cgi?id=88565 Reviewed by Eric Seidel. Tests: fast/images/jpeg-with-color-profile.html fast/images/png-with-color-profile.html. Also covered by numerous layout tests. * WebCore.gyp/WebCore.gyp: * platform/PlatformScreen.h: (WebCore): * platform/blackberry/PlatformScreenBlackBerry.cpp: (WebCore::screenColorProfile): (WebCore): * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenColorProfile): (WebCore): * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenColorProfile): (WebCore): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenColorProfile): (WebCore): * platform/image-decoders/ImageDecoder.h: (ImageFrame): (ImageDecoder): (WebCore::ImageDecoder::qcmsOutputDeviceProfile): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): (colorSpaceHasAlpha): 2012-06-19 Erik Arvidsson <arv@chromium.org> [V8] Fix issue where a callback got a null calling context https://bugs.webkit.org/show_bug.cgi?id=89532 Reviewed by Kentaro Hara. Test: fast/dom/Window/post-message-crash.html * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): Check the calling context and throw a type error (like JSC) if it is null. 2012-06-19 Tony Chang <tony@chromium.org> Refactor RenderFlexibleBox terminology to use grow/shrink instead of positive/negative https://bugs.webkit.org/show_bug.cgi?id=89493 Reviewed by Eric Seidel. The spec stopped referring to positive and negative flex and now talks about flex grow and flex shrink. Also, the preferred size is now known as the flex basis. Make the code match the terms used in the spec. http://dev.w3.org/csswg/css3-flexbox/ This will also make it easier to split flex into long hand notation (flex-grow, flex-shrink and flex-basis). No new tests, covered by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFlex::applyInheritValue): (WebCore::ApplyPropertyFlex::applyInitialValue): (WebCore::ApplyPropertyFlex::applyValue): * page/animation/CSSPropertyAnimation.cpp: (WebCore::PropertyWrapperFlex::equals): (WebCore::PropertyWrapperFlex::blend): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::flexBasisForChild): (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::computeNextFlexLine): (WebCore::RenderFlexibleBox::freezeViolations): (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderFlexibleBox.h: * rendering/style/RenderStyle.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: (StyleFlexibleBoxData): 2012-06-19 Steve VanDeBogart <vandebo@chromium.org> Make DOMFileSystem selectively structure clonable so it can be the body of a web intent. https://bugs.webkit.org/show_bug.cgi?id=88267 Reviewed by David Levin. This functionality will allow FileSystem API objects to be dispatched to web content in order to enable, for instance, an intent notifying web content that a particular filesystem has been mounted by the local system. The goal at this point is not to enable across-the-board clonability, but just for handling the particular use case. * bindings/v8/SerializedScriptValue.cpp: (WebCore::V8ObjectMap::Writer::writeDOMFileSystem): (WebCore::V8ObjectMap::Serializer::writeDOMFileSystem): (WebCore::V8ObjectMap::Serializer::doSerialize): (WebCore::V8ObjectMap::Reader::read): (WebCore::V8ObjectMap::Reader::readDOMFileSystem): 2012-06-19 Kenneth Russell <kbr@google.com> Unreviewed, rolling out r120772. http://trac.webkit.org/changeset/120772 https://bugs.webkit.org/show_bug.cgi?id=89503 Broke build on Chromium Mac * platform/graphics/chromium/AnimationTranslationUtil.h: (WebCore): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: * platform/graphics/chromium/Canvas2DLayerBridge.cpp: * platform/graphics/chromium/Canvas2DLayerBridge.h: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: (WebCore): * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ProgramBinding.h: * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureCopier.cpp: * platform/graphics/chromium/TextureLayerChromium.cpp: * platform/graphics/chromium/TextureManager.cpp: * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TiledLayerChromium.h: (WebCore): * platform/graphics/chromium/cc/CCActiveAnimation.h: * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: * platform/graphics/chromium/cc/CCDrawQuad.cpp: * platform/graphics/chromium/cc/CCFontAtlas.cpp: * platform/graphics/chromium/cc/CCFrameRateController.cpp: * platform/graphics/chromium/cc/CCFrameRateController.h: * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerAnimationController.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: * platform/graphics/chromium/cc/CCOcclusionTracker.h: * platform/graphics/chromium/cc/CCProxy.cpp: * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCRenderer.h: (WebCore): * platform/graphics/chromium/cc/CCScopedThreadProxy.h: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCTimer.cpp: * platform/graphics/chromium/cc/CCTimer.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 2012-06-19 Zeev Lieber <zlieber@chromium.org> [Chromium] Remove redundant #includes in compositor https://bugs.webkit.org/show_bug.cgi?id=89503 Reviewed by Adrienne Walker. Removed some redundant #includes to clarify dependency picture. Some 90 #includes removed, some 50 less disruptive #includes added. This brings the number of class dependencies to 902 from 1383. No new tests are required, as this is only affects compile-time behavior. * platform/graphics/chromium/AnimationTranslationUtil.h: (WebCore): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: * platform/graphics/chromium/Canvas2DLayerBridge.cpp: * platform/graphics/chromium/Canvas2DLayerBridge.h: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ProgramBinding.h: * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureCopier.cpp: * platform/graphics/chromium/TextureLayerChromium.cpp: * platform/graphics/chromium/TextureManager.cpp: * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCActiveAnimation.h: (WebCore): * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: * platform/graphics/chromium/cc/CCDrawQuad.cpp: * platform/graphics/chromium/cc/CCFontAtlas.cpp: * platform/graphics/chromium/cc/CCFrameRateController.cpp: * platform/graphics/chromium/cc/CCFrameRateController.h: (WebCore): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerAnimationController.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: * platform/graphics/chromium/cc/CCOcclusionTracker.h: (WebCore): * platform/graphics/chromium/cc/CCProxy.cpp: * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): * platform/graphics/chromium/cc/CCRenderSurface.cpp: * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCRenderer.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: * platform/graphics/chromium/cc/CCThreadProxy.cpp: * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore): * platform/graphics/chromium/cc/CCTimer.cpp: * platform/graphics/chromium/cc/CCTimer.h: (WebCore): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: 2012-06-19 Julien Chaffraix <jchaffraix@webkit.org> Align RenderLayer's descendant dependent flags semantics https://bugs.webkit.org/show_bug.cgi?id=89241 Reviewed by Simon Fraser. Refactoring only, covered by existing tests. This change aligns the naming and implementation of the different descendant dependent flags. While aligning, I found some bugs (inefficiencies) with how the visible descendant flags was computed. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setHasVisibleContent): Changed this method to not take a boolean as every callers was passing 'true'. Reworked the logic under this assumption. (WebCore::RenderLayer::dirtyVisibleContentStatus): Updated after the following renaming. (WebCore::RenderLayer::dirtyAncestorChainVisibleDescendantStatus): Renamed this function from dirtyVisibleDescendantStatus to match the hasSelfPaintingLayer naming and implementation. (WebCore::RenderLayer::setAncestorChainHasVisibleDescendant): Added this function to factor the visible descendant setting out of defunct childVisibilityChanged. Also improved the efficiency of the function by clearing the dirty flag as it goes up (an unnoticed bug). (WebCore::RenderLayer::addChild): (WebCore::RenderLayer::removeChild): Updated to use the new functions lieu of childVisibilityChanged. * rendering/RenderLayer.h: (RenderLayer::childVisibilityChanged): Removed this function as it wasn't adding much and it's a lot more clear to call dirtyAncestorChainVisibleDescendantStatus / setAncestorChainHasVisibleDescendant. * rendering/RenderObject.cpp: (WebCore::RenderObject::styleWillChange): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): Updated those callers after removing the boolean parameter from setHasVisibleContent. 2012-06-19 Andrey Adaikin <aandrey@chromium.org> Web Inspector: Extract InjectedScriptBase class from the InjectedScript https://bugs.webkit.org/show_bug.cgi?id=89107 Extract methods from the InjectedScript that do not depend on the concrete InjectedScriptSource.js implementation. Reviewed by Pavel Feldman. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::InjectedScript): (WebCore::InjectedScript::evaluate): (WebCore::InjectedScript::callFunctionOn): (WebCore::InjectedScript::evaluateOnCallFrame): (WebCore::InjectedScript::getFunctionDetails): (WebCore::InjectedScript::getProperties): (WebCore::InjectedScript::nodeForObjectId): (WebCore::InjectedScript::releaseObject): (WebCore::InjectedScript::wrapCallFrames): (WebCore::InjectedScript::wrapObject): (WebCore::InjectedScript::wrapSerializedObject): (WebCore::InjectedScript::findObjectById): (WebCore::InjectedScript::inspectNode): (WebCore::InjectedScript::releaseObjectGroup): (WebCore::InjectedScript::nodeAsScriptValue): * inspector/InjectedScript.h: (WebCore): (InjectedScript): * inspector/InjectedScriptBase.cpp: Added. (WebCore): (WebCore::InjectedScriptBase::InjectedScriptBase): (WebCore::InjectedScriptBase::canAccessInspectedWindow): (WebCore::InjectedScriptBase::injectedScriptObject): (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled): (WebCore::InjectedScriptBase::makeCall): (WebCore::InjectedScriptBase::makeEvalCall): * inspector/InjectedScriptBase.h: Copied from Source/WebCore/bindings/js/ScriptObject.h. (WebCore): (InjectedScriptBase): (WebCore::InjectedScriptBase::~InjectedScriptBase): (WebCore::InjectedScriptBase::hasNoValue): (WebCore::InjectedScriptBase::scriptState): * inspector/InspectorAllInOne.cpp: 2012-06-19 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120621. http://trac.webkit.org/changeset/120621 https://bugs.webkit.org/show_bug.cgi?id=89518 Memory graph should have been behind the experimental flag. (Requested by pfeldman on #webkit). * inspector/front-end/NativeMemorySnapshotView.js: * inspector/front-end/ProfileLauncherView.js: (WebInspector.ProfileLauncherView): * inspector/front-end/nativeMemoryProfiler.css: (.memory-blocks-list .item): 2012-06-19 Hans Muller <hmuller@adobe.com> The CSS_WRAP_SHAPE CSSWrapShape::Type is no longer needed https://bugs.webkit.org/show_bug.cgi?id=89403 Reviewed by Eric Seidel. Removed CSS_WRAP_SHAPE_PATH definition from CSSWrapShapes.h. It's no longer required. This definition was never used or tested, no new tests are required. * css/CSSWrapShapes.h: 2012-06-19 Ken Buchanan <kenrb@chromium.org> Absolute positioned objects should not be added to anonymous block lists https://bugs.webkit.org/show_bug.cgi?id=87768 Reviewed by Abhishek Arya. containingBlock() was returning an anonymous block for absolute positioned objects under a relative positioned inline in the case that the inline is split and the object is underneath the block continuation. Anonymous blocks should never have anything in their positioned object lists because they can be destroyed at any time for a different reasons such as anonymous block merging, which is a problem for layout if they have m_posChildNeedsLayout set. This patch adds a generic check for anonymous blocks in containingBlock() to correct this problem. * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): 2012-06-19 Jan Keromnes <janx@linux.com> Web Inspector: extensionPanel.onSearch `action` strings should be enumerated. https://bugs.webkit.org/show_bug.cgi?id=89509 Reviewed by Pavel Feldman. Fixed LayoutTests/inspector/extensions/extensions-api-expected.txt accordingly. * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler): (injectedExtensionAPI.Panels.prototype.get SearchAction): * inspector/front-end/ExtensionPanel.js: (WebInspector.ExtensionPanel.prototype.searchCanceled): (WebInspector.ExtensionPanel.prototype.performSearch): (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult): (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult): 2012-06-19 Dana Jansens <danakj@chromium.org> [chromium] Add an allocation step for CCRenderer before drawing a frame https://bugs.webkit.org/show_bug.cgi?id=88924 Reviewed by Adrienne Walker. This step will be used to decide which RenderPass textures can be kept alive and do not need to be drawn again. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore): (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame): (WebCore::LayerRendererChromium::beginDrawingFrame): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): 2012-06-19 Alexandru Chiculita <achicu@adobe.com> [CSS Shaders] Create a shared object between FECustomFilter objects to store the shared resources https://bugs.webkit.org/show_bug.cgi?id=87878 Reviewed by Dean Jackson. An object called CustomFilterGlobalContext is created the first time a new FECustomFilter is needed in a document. It is used to store the GraphicsContext3D needed to render the CSS Shaders. The context is shared by all the elements in a document (no cross-domain). More resources will be shared in following patches, including precompiled shaders and vertices/indices data. https://bugs.webkit.org/show_bug.cgi?id=88427 https://bugs.webkit.org/show_bug.cgi?id=88429 The plan is to make CustomFilterGlobalContext and FECustomFilter (or a base class extracted out of it) usable from platform code in the hardware accelerated compositing layer. The only dependency of the code is on the GraphicsContext3D. No new tests. No functionality is changed yet, just added the new objects. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/CustomFilterGlobalContext.cpp: Added. (WebCore): (WebCore::CustomFilterGlobalContext::CustomFilterGlobalContext): (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext): (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): * platform/graphics/filters/CustomFilterGlobalContext.h: Added. (WebCore): (CustomFilterGlobalContext): (WebCore::CustomFilterGlobalContext::context): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): Changed to use the global context instead of the host window. (WebCore::FECustomFilter::create): (WebCore::FECustomFilter::initializeContext): * platform/graphics/filters/FECustomFilter.h: (WebCore): (FECustomFilter): * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): Changed to initialize the global context if needed and pass it to the FECustomFilter. * rendering/RenderView.cpp: (WebCore): (WebCore::RenderView::customFilterGlobalContext): * rendering/RenderView.h: (WebCore): (RenderView): 2012-06-19 Dominik Röttsches <dominik.rottsches@intel.com> [cairo] Fix LayoutTests/fast/canvas/patternfill-repeat.html https://bugs.webkit.org/show_bug.cgi?id=53085 Reviewed by Martin Robinson. Clipping previously unlimited vertical and horizontal pattern repeats with a clip rectangle similar to the Qt Graphics Context. No new tests, this patch fixes canvas/philip/tests/2d.pattern.paint.repeat* tests. * platform/graphics/Pattern.h: (WebCore::Pattern::getPatternSpaceTransform): Adding constant getter method to be able to map to pattern space externally, needed by PlatformContextCairo::clipForPatternFilling. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::prepareForFilling): (WebCore::PlatformContextCairo::clipForPatternFilling): Clip pattern repeats if needed. * platform/graphics/cairo/PlatformContextCairo.h: 2012-06-19 Hayato Ito <hayato@chromium.org> [Shadow DOM] An upper boundary breaks if a child node of an insertion point is clicked. https://bugs.webkit.org/show_bug.cgi?id=89407 Reviewed by Dimitri Glazkov. Update an event re-targeting algorithm so that it can set event's target correctly when a fallback element in an insertion point is clicked. To distinguish between distributed nodes and fallback elements in an ancestor chain of composite shadow tree, an event dispatcher checks explicitly whether a node is actually distributed or assigned to the given insertion point. Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/EventDispatcher.cpp: (WebCore::isAssignedTo): (WebCore): (WebCore::EventDispatcher::ensureEventAncestors): * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::contains): 2012-06-19 Adrienne Walker <enne@google.com> Fix scrollbar layers being misplaced with a clipped owner layer https://bugs.webkit.org/show_bug.cgi?id=89486 Reviewed by Simon Fraser. Scrollbar layers are positioned relative to their parent layer. If that parent gets clipped, then that positioning becomes incorrect and scrollbars get positioned relative to the clipped bounds instead of the full bounds. Fix by not clipping in this case. Test: compositing/overflow/scrollbars-with-clipped-owner.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldClipCompositedBounds): 2012-06-19 Shinya Kawanaka <shinyak@chromium.org> [Shadow][Editing] applying document.execCommand('bold') twice to elements having shadow insertion points causes a crash. https://bugs.webkit.org/show_bug.cgi?id=88502 Reviewed by Ryosuke Niwa. When inserting or removing insertion points (<shadow> or <content>) into or from Shdaow DOM, ElementShadow::invalidateDistribution() will be called immediately. It will remove all the renderers of elements in the Shadow DOM. Since Node::rendererIsEditable() returns false when an renderer does not exist, all the elements in the Shadow DOM will be considered as non-content-editable until recalculating layout, though some of them may actually be content-editable. Actually the current code does not recalculate layout inside editing command, so a disaster happens. For example, performing an editing command quits before completing all the commands, because the command thinks it is adding some elements to a non-content-editable element (but actually it's content-editable). So we have to recalculate layout if necessary when checking an element is content-editable or not. This can be achieved by using Node::isContentEditable() instead of Node::rendererIsEditable(). Test: editing/shadow/bold-twice-in-shadow.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/RemoveNodeCommand.cpp: (WebCore::RemoveNodeCommand::doApply): 2012-06-19 Kenneth Russell <kbr@google.com> Unreviewed, rolling out r120744. http://trac.webkit.org/changeset/120744 https://bugs.webkit.org/show_bug.cgi?id=89220 Broke build on Chromium Windows canary bots * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/mock/DeviceMotionClientMock.cpp: Removed. * platform/mock/DeviceMotionClientMock.h: Removed. 2012-06-18 Filip Pizlo <fpizlo@apple.com> It should be possible to look at disassembly https://bugs.webkit.org/show_bug.cgi?id=89319 Reviewed by Sam Weinig. Just fixing EFL's build system now that JSC has a new directory. * CMakeLists.txt: 2012-06-19 Amy Ousterhout <aousterh@chromium.org> Adds DeviceMotionClientMock https://bugs.webkit.org/show_bug.cgi?id=89220 Reviewed by Steve Block. Adds DeviceMotionClientMock in WebCore to enable testing of DeviceMotion once it is fully implemented in WebKit. This addition was originally included in https://bugs.webkit.org/show_bug.cgi?id=89197 but was split into a separate patch for easier review. No new tests because DeviceMotionClientMock is designed to enable future testing and cannot be tested in itself. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/mock/DeviceMotionClientMock.cpp: Added. (WebCore): (WebCore::DeviceMotionClientMock::DeviceMotionClientMock): (WebCore::DeviceMotionClientMock::setController): (WebCore::DeviceMotionClientMock::startUpdating): (WebCore::DeviceMotionClientMock::stopUpdating): (WebCore::DeviceMotionClientMock::setMotion): (WebCore::DeviceMotionClientMock::timerFired): * platform/mock/DeviceMotionClientMock.h: Added. (WebCore): (DeviceMotionClientMock): 2012-06-19 Alexandre Elias <aelias@google.com> Fix link error with fillWithEmptyClients https://bugs.webkit.org/show_bug.cgi?id=89484 Reviewed by Ryosuke Niwa. fillWithEmptyClients() was within #if ENABLE() guard in the .cpp file but not in the header. There is now a caller unrelated to these ENABLEs in WebHelperPluginImpl, so linking fails if both SVG and PAGE_POPUP are disabled. This function looks generic, so just remove the ENABLE guards. No new tests. (Build fix.) * loader/EmptyClients.cpp: (WebCore::fillWithEmptyClients): 2012-06-19 Abhishek Arya <inferno@chromium.org> Crash in RenderInline::willBeDestroyed. https://bugs.webkit.org/show_bug.cgi?id=89386 Reviewed by Julien Chaffraix. We were unable to find the previous continuation during the process of cleaning up empty anonymous block continuation. The reason being that we were just looking till our immediate parent and ignoring the fact that it can be enclosed in anonymous blocks. The change skips over anonymous blocks in the parent chain. Test: fullscreen/empty-anonymous-block-continuation-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): 2012-06-19 Andreas Kling <kling@webkit.org> Remove the -webkit-match-nearest-mail-blockquote-color property. <http://webkit.org/b/89480> Reviewed by Antti Koivisto. This property does nothing except taking up a bit on StyleRareNonInheritedData. It's apparently famous for being the longest property name we support. This passes the torch to -webkit-border-bottom-right-radius. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-06-19 Andrew Lo <anlo@rim.com> [BlackBerry] Animations continue to request frames after they have finished https://bugs.webkit.org/show_bug.cgi?id=89483 Reviewed by Rob Buis. Don't report that we have running animations if all the animations are finished. This prevents unnecessary requesting of animation frames. Internal PR165119 Internally Reviewed by Arvid Nilsson. * platform/graphics/blackberry/LayerAnimation.cpp: (WebCore::progress): (WebCore::fetchIntervalEndpoints): (WebCore::LayerAnimation::apply): * platform/graphics/blackberry/LayerAnimation.h: (WebCore::LayerAnimation::finished): (WebCore::LayerAnimation::LayerAnimation): (LayerAnimation): * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::updateAnimations): 2012-06-19 Abhishek Arya <inferno@chromium.org> Wrong repaintContainerSkipped in RenderObject::container() when positioned objects are enclosed in a <foreignObject>. https://bugs.webkit.org/show_bug.cgi?id=89384 Reviewed by Simon Fraser. No new tests. The bug was found in a code audit. * rendering/RenderObject.cpp: (WebCore::RenderObject::container): 2012-06-19 Abhishek Arya <inferno@chromium.org> Crash in WebCore::RenderSVGModelObject::checkIntersection https://bugs.webkit.org/show_bug.cgi?id=89059 Reviewed by Rob Buis. getElementCTM updates layout causing the renderer to be destroyed. We get the new renderer by storing the element pointer and later accessing it using the element pointer. Test: svg/custom/intersection-list-crash.svg * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::checkIntersection): (WebCore::RenderSVGModelObject::checkEnclosure): 2012-06-13 Eric Uhrhane <ericu@chromium.org> FileWriter progress events should be throttled to 50ms https://bugs.webkit.org/show_bug.cgi?id=89022 Reviewed by Kent Tamura. No new tests; existing tests validate our event sequences, and testing timing is likely to be flaky. * Modules/filesystem/FileWriter.cpp: (WebCore): (WebCore::FileWriter::FileWriter): (WebCore::FileWriter::didWrite): Throttle sending progress events. * Modules/filesystem/FileWriter.h: (FileWriter): Add a variable that remembers when the last event was sent. 2012-06-19 Dan Bernstein <mitz@apple.com> WebCore part of: Paginated display API doesn’t allow setting the page progression direction https://bugs.webkit.org/show_bug.cgi?id=89394 Reviewed by Darin Adler. Updated fast/multicol/pagination-*.html. * css/StyleResolver.cpp: (WebCore::StyleResolver::styleForDocument): Changed to handle the new Pagination::Mode enum values and set the column progression in addition to the column axis. * page/Page.h: Changed the Pagination::Mode enum values to ones that specify an axis and a direction along that axis. * testing/Internals.cpp: (WebCore::Internals::setPagination): Changed to support the new Pagination::Mode enum values. 2012-06-19 Allan Sandfeld Jensen <allan.jensen@nokia.com> Make RenderTableSection - nodeAtPoint and paintObject reuse spanning logic. https://bugs.webkit.org/show_bug.cgi?id=88066 Reviewed by Julien Chaffraix. Makes dirtiedRows and dirtiedColumns reuse spannedRows and spannedColumns internally. This also changes their API to accept a damage-rect flipped by logicalRectForWritingModeAndDirection. The generic code in spannedRows and spannedColumns solves a few FIXMEs surrounding RTL tables, which should improve performance. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::dirtiedRows): (WebCore::RenderTableSection::dirtiedColumns): (WebCore::RenderTableSection::paintObject): * rendering/RenderTableSection.h: (WebCore::CellSpan::start): (WebCore::CellSpan::end): (CellSpan): (RenderTableSection): 2012-06-19 Christophe Dumez <christophe.dumez@intel.com> [JSC] Implement support for JSDictionary::convertValue(Vector<String>& result) https://bugs.webkit.org/show_bug.cgi?id=89447 Reviewed by Adam Barth. Add implementation for JSDictionary::convertValue(Vector<String>& result) so that IDBDatabase::createObjectStore() compiles with JSC. Tests: storage/indexeddb * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): (WebCore): * bindings/js/JSDictionary.h: 2012-06-19 Andy Estes <aestes@apple.com> [Mac] AudioFileReader::createBus() leaks an AudioBufferList if ExtAudioFileRead() returns an error https://bugs.webkit.org/show_bug.cgi?id=89429 Reviewed by Darin Adler. * platform/audio/mac/AudioFileReaderMac.cpp: (WebCore::AudioFileReader::createBus): Call destroyAudioBufferList() before returning if ExtAudioFileRead() returns an error. 2012-06-19 Martin Robinson <mrobinson@igalia.com> 2012-06-19 Martin Robinson <mrobinson@igalia.com> Fix the GTK+ build by adding some missing source files to the source list. * GNUmakefile.list.am: WebGLDepthTexture.cpp/h to the source list. 2012-06-19 Peter Wang <peter.wang@torchmobile.com.cn> Remove the function ScriptDebugServer::supportsNativeBreakpoints() https://bugs.webkit.org/show_bug.cgi?id=88759 Reviewed by Pavel Feldman. Since both JSC and V8 support DOM breakpoint now, remove the conditional interface and related code. So there is no new tests. * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.wasShown): (WebInspector.ElementsPanel.prototype._populateContextMenu): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createTable): (WebInspector.NetworkLogView.prototype.switchToDetailedView): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkDataGridNode.prototype.createCells): (WebInspector.NetworkDataGridNode.prototype.refreshRequest): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.wasShown): (WebInspector.ScriptsPanel.prototype._clearInterface): * inspector/front-end/Settings.js: * inspector/front-end/inspector.js: (WebInspector.doLoadedDone): 2012-06-19 Nikita Vasilyev <me@elv1s.ru> Web Inspector: Make text in WebSocket Frames tab selectable https://bugs.webkit.org/show_bug.cgi?id=89307 Reviewed by Yury Semikhatsky. * inspector/front-end/ResourceWebSocketFrameView.js: (WebInspector.ResourceWebSocketFrameView): * inspector/front-end/networkPanel.css: (.resource-websocket-frame-view): 2012-06-19 Peter Rybin <peter.rybin@gmail.com> Web Inspector: Support 'Restart frame' in protocol and backend https://bugs.webkit.org/show_bug.cgi?id=89147 Reviewed by Yury Semikhatsky. Inspector.json got new command in Debugger domain. A call path from InspectorDebuggerAgent to V8 Debug.LiveEdit.RestartFrame API is built. JSC implementation is a stub with fix me (40300). * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::restart): (WebCore): * bindings/js/ScriptDebugServer.cpp: (WebCore): (WebCore::ScriptDebugServer::updateCallStack): * bindings/js/ScriptDebugServer.h: (ScriptDebugServer): * bindings/v8/DebuggerScript.js: (.): * bindings/v8/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::restart): (WebCore): * bindings/v8/JavaScriptCallFrame.h: (JavaScriptCallFrame): * bindings/v8/ScriptDebugServer.cpp: (WebCore): (WebCore::ScriptDebugServer::updateCallStack): * bindings/v8/ScriptDebugServer.h: * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::restartCallback): (WebCore): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::restartFrame): (WebCore): * inspector/InjectedScript.h: (InjectedScript): * inspector/InjectedScriptExterns.js: (JavaScriptCallFrame.prototype.restart): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::restartFrame): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/JavaScriptCallFrame.idl: 2012-06-19 Andrei Poenaru <poenaru@adobe.com> Replaced printf with fprintf in DEBUG_AUDIONODE_REFERENCES Change printf to fprintf in DEBUG_AUDIONODE_REFERENCES https://bugs.webkit.org/show_bug.cgi?id=86564 Reviewed by Csaba Osztrogonác. There is no need for new tests: writing data to stderr, instead of stdout. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::~AudioContext): * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::~AudioNode): (WebCore::AudioNode::ref): (WebCore::AudioNode::finishDeref): (WebCore::AudioNode::printNodeCounts): 2012-06-19 Dominik Röttsches <dominik.rottsches@intel.com> [GTK] Assert failure in svg/batik/text/textDecoration.svg,textEffect3.svg for 64bit Debug bot https://bugs.webkit.org/show_bug.cgi?id=89104 Reviewed by Nikolas Zimmermann. Adding SVGInline to assertion to fix assertion failure. Same assertion was hit on Chromium. Covered by existing tests svg/batik/text/textDecoration.svg svg/batik/text/textEffect3.svg where the assertion failure was hit. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting): 2012-06-19 Csaba Osztrogonác <ossy@webkit.org> [Qt] Buildfix for newer Qt5, use QPointer instead of the deprecated QWeakPointer. https://bugs.webkit.org/show_bug.cgi?id=89449 Reviewed by Simon Hausmann. * bridge/qt/qt_instance.h: (QtInstance): * bridge/qt/qt_runtime.h: (QtField): * platform/Widget.h: (Widget): 2012-06-19 Taiju Tsuiki <tzik@chromium.org> Web Inspector: FileSystem tree should hide uninitialized FileSystem https://bugs.webkit.org/show_bug.cgi?id=88602 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/get-filesystem-root.html * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore): (WebCore::InspectorFileSystemAgent::getFileSystemRoot): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype._originAdded): (WebInspector.FileSystemModel.prototype.refreshFileSystemList): (WebInspector.FileSystemModel.prototype._gotFileSystem): (WebInspector.FileSystemModel.FileSystem): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototype.getFileSystemRoot): (WebInspector.FileSystemRequestManager.prototype._gotFileSystemRoot): (WebInspector.FileSystemDispatcher.prototype.gotFileSystemRoot): * inspector/front-end/ResourcesPanel.js: (WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved): 2012-06-19 Mike West <mkwst@chromium.org> Introduce ENABLE_CSP_NEXT configuration flag. https://bugs.webkit.org/show_bug.cgi?id=89300 Reviewed by Adam Barth. The 1.0 draft of the Content Security Policy spec is just about to move to Last Call. We'll hide work on the upcoming 1.1 spec behind this ENABLE flag, disabled by default. Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html * Configurations/FeatureDefines.xcconfig: 2012-06-19 Thiago Marcos P. Santos <thiago.santos@intel.com> Make StylePropertySet::merge() always override on conflict https://bugs.webkit.org/show_bug.cgi?id=89348 Reviewed by Ryosuke Niwa. merge() was only used with argOverridesOnConflict = true, which makes the extra parameter useless. It will also save a boolean check. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::mergeAndOverrideOnConflict): * css/StylePropertySet.h: (StylePropertySet): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): * editing/EditingStyle.cpp: (WebCore::EditingStyle::overrideWithStyle): (WebCore::styleFromMatchedRulesForElement): (WebCore::EditingStyle::mergeStyleFromRules): (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): 2012-06-19 Yoshifumi Inoue <yosin@chromium.org> [Forms] Move isKeyboardFocusable and isMouseFocusable to InputType from HTMLInputElement https://bugs.webkit.org/show_bug.cgi?id=89425 Reviewed by Kent Tamura. This patch moves implementation of HTMLInpueElement::isKeyboardFocusable and isMouseFocusable to InputType class to allow each implementation of InputType can decide focus-ability. No new tests. This patch doesn't change behavior. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isKeyboardFocusable): Changed to call InputType::isKeyboardFocusable. (WebCore::HTMLInputElement::isMouseFocusable): Changed to call InputType::isMouseFocusable. (WebCore::HTMLInputElement::isTextFormControlFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement. (WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement. (WebCore::HTMLInputElement::isTextFormControlMouseFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement. * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::isKeyboardFocusable): Changed to call isTextFormControlKeyboardFocusable. (WebCore::InputType::isMouseFocusable): Added for default method of derived InputType classes. * html/InputType.h: (InputType): Chagned signature of isKeyboardFocusable. * html/RadioInputType.cpp: (WebCore::RadioInputType::isKeyboardFocusable): Changed to call isTextFormControlKeyboardFocusable which was done in HTMLInputElement. * html/RadioInputType.h: (RadioInputType): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::isKeyboardFocusable): Moved implementation from HTMLInputElement. (WebCore::TextFieldInputType::isMouseFocusable): Moved implementation from HTMLInputElement. * html/TextFieldInputType.h: (TextFieldInputType): 2012-06-19 Sergio Villar Senin <svillar@igalia.com> Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse() https://bugs.webkit.org/show_bug.cgi?id=67582 Reviewed by David Levin. Added a new synchronous method to the IconDatabase that returns a native image for the platform instead of a WebCore::Image*. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::synchronousNativeIconForPageURL): (WebCore): * loader/icon/IconDatabase.h: (IconDatabase): * loader/icon/IconDatabaseBase.h: (WebCore::IconDatabaseBase::synchronousNativeIconForPageURL): (IconDatabaseBase): 2012-06-19 Andy Estes <aestes@apple.com> [Mac] Use AutodrainedPool instead of NSAutoreleasePool in AudioBus::loadPlatformResource() https://bugs.webkit.org/show_bug.cgi?id=89427 Reviewed by Dan Bernstein. loadPlatformResource() called -[NSAutoreleasePool release] at each of its exit points, which is not only an error-prone pattern but is incorrect in garbage-collected environments. AutodrainedPool solves both these problems by automatically calling -[NSAutoreleasePool drain] when going out of scope. * platform/audio/mac/AudioBusMac.mm: (WebCore::AudioBus::loadPlatformResource): 2012-06-19 Mike West <mkwst@chromium.org> Compilation failure in StyleResolver.cpp https://bugs.webkit.org/show_bug.cgi?id=89446 Reviewed by Ryosuke Niwa. Adding 'CSSPropertyWebkitColumnProgression' to a switch statement from which it was missing. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-19 Csaba Osztrogonác <ossy@webkit.org> [Qt] Unreviewed build system fix after r120051. * Target.pri: 2012-06-19 Mike West <mkwst@chromium.org> Add a scheme registry for bypassing Content Security Policy. https://bugs.webkit.org/show_bug.cgi?id=89373 Reviewed by Adam Barth. The Content Security Policy specification notes that "Enforcing a CSP policy should not interfere with the operation of user-supplied scripts such as third-party user-agent add-ons and JavaScript bookmarklets." (https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#processing-model) This use case can be at least partially addressed by adding a scheme registry for certain types of URLs whose resources should be loaded regardless of a page's defined policy directives. See http://crbug.com/133223 for additional context. Test: http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html * WebCore.exp.in: Exporting new symbols for use by Internals. * page/ContentSecurityPolicy.cpp: (WebCore::isAllowedByAllWithURL): Adding a check against the new SchemeRegistry method to determine whether or not we should proceed with checking the URL against the policy. * platform/SchemeRegistry.cpp: (WebCore::CSPBypassingSchemes): (WebCore): (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): * platform/SchemeRegistry.h: (SchemeRegistry): Adding the scheme registry for CSP-bypassing URL schemes. * testing/Internals.cpp: (WebCore): (WebCore::Internals::registerURLSchemeAsBypassingContentSecurityPolicy): (WebCore::Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): * testing/Internals.h: (Internals): * testing/Internals.idl: Adding a method to Internals so that we can write a layout test. 2012-06-18 Andy Estes <aestes@apple.com> [Mac] Editor::fontAttributesForSelectionStart() leaks a NSShadow https://bugs.webkit.org/show_bug.cgi?id=89424 Reviewed by Dan Bernstein. * editing/mac/EditorMac.mm: (WebCore::Editor::fontAttributesForSelectionStart): Store the NSShadow in a RetainPtr so that it's released before going out of scope. 2012-06-18 Kent Tamura <tkent@chromium.org> Refactoring: Introduce a class to represent restoring state of a form control https://bugs.webkit.org/show_bug.cgi?id=89412 Reviewed by Hajime Morita. HTMLFormControlElementWithState::saveFormControlState had two return values; One is a boolean to represent whether we should save the state or not, and another is form control value. This patch introduces FormControlState class representing these values. We're going to extend FormControlState class so that it can contain multiple strings to fix a FileInputType issue and it have another type to fix Bug 89409. No new tests. Just a refactoring. * html/FormController.cpp: (WebCore::FormController::formElementsState): Gets a state string from a FormControlState instance. (WebCore::FormController::takeStateForFormElement): Creates a FormControlState instance with a state string. * html/FormController.h: (WebCore::FormControlState): Added. * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::saveFormControlState): Use FormControlState class. (WebCore::BaseCheckableInputType::restoreFormControlState): ditto. * html/BaseCheckableInputType.h: (BaseCheckableInputType): ditto. * html/FileInputType.cpp: (WebCore::FileInputType::saveFormControlState): ditto. (WebCore::FileInputType::restoreFormControlState): ditto. * html/FileInputType.h: (FileInputType): ditto. * html/HTMLFormControlElementWithState.cpp: (WebCore::HTMLFormControlElementWithState::saveFormControlState): ditto. (WebCore::HTMLFormControlElementWithState::finishParsingChildren): ditto. * html/HTMLFormControlElementWithState.h: (HTMLFormControlElementWithState): ditto. (WebCore::HTMLFormControlElementWithState::restoreFormControlState): ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::saveFormControlState): ditto. (WebCore::HTMLInputElement::restoreFormControlState): ditto. * html/HTMLInputElement.h: (HTMLInputElement): ditto. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::saveFormControlState): ditto. (WebCore::HTMLSelectElement::restoreFormControlState): ditto. * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::saveFormControlState): ditto. (WebCore::HTMLTextAreaElement::restoreFormControlState): ditto. * html/HTMLTextAreaElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::saveFormControlState): ditto. (WebCore::HiddenInputType::restoreFormControlState): ditto. * html/HiddenInputType.h: (HiddenInputType): ditto. * html/InputType.cpp: (WebCore::InputType::saveFormControlState): ditto. (WebCore::InputType::restoreFormControlState): ditto. * html/InputType.h: (InputType): ditto. * html/PasswordInputType.cpp: (WebCore::PasswordInputType::saveFormControlState): ditto. (WebCore::PasswordInputType::restoreFormControlState): ditto. * html/PasswordInputType.h: (PasswordInputType): ditto. 2012-06-18 Joone Hur <joone.hur@intel.com> [EFL] Fontconfig can't be linked properly https://bugs.webkit.org/show_bug.cgi?id=89418 Unreviewed build fix. Make Fontconfig be linked correctly. No new tests. This is only a build fix. * PlatformEfl.cmake: add FONTCONFIG_LIBRARIES to WebCore_LIBRARIES. 2012-06-18 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [Cairo] Fix memory leaks in GLContextGLX.cpp https://bugs.webkit.org/show_bug.cgi?id=89346 Reviewed by Martin Robinson. Fix memory leaks found in GLContextGLX.cpp. * platform/graphics/glx/GLContextGLX.cpp: (WebCore::GLContextGLX::cleanupActiveContextsAtExit): Removing element reduces size of the vector, so the loop termination condition was failing in the last iteration, when the vector contains more than one element. This patch fixes the issue by iterating the vector backwards, so the termination condition doesn't fail until the size() reaches 0. (WebCore::GLContextGLX::createPbufferContext): Delete GLXPbuffer returned by glXCreatePbuffer(). (WebCore::GLContextGLX::createPixmapContext): Delete XVisualInfo returned by glXChooseVisual(). 2012-06-18 Gregg Tavares <gman@google.com> Expose WEBGL_depth_texture extension to WebGL https://bugs.webkit.org/show_bug.cgi?id=87029 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/webgl-depth-texture.html * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLDepthTexture.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h. (WebCore): (WebCore::WebGLDepthTexture::WebGLDepthTexture): (WebCore::WebGLDepthTexture::~WebGLDepthTexture): (WebCore::WebGLDepthTexture::getName): (WebCore::WebGLDepthTexture::create): (WebCore::WebGLDepthTexture::supported): * html/canvas/WebGLDepthTexture.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h. (WebCore): (WebGLDepthTexture): * html/canvas/WebGLDepthTexture.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h. * html/canvas/WebGLExtension.h: * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::initializeAttachments): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::validateSettableTexFormat): (WebCore::WebGLRenderingContext::copyTexImage2D): (WebCore::WebGLRenderingContext::copyTexSubImage2D): (WebCore::WebGLRenderingContext::generateMipmap): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): (WebCore::WebGLRenderingContext::texImage2DBase): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::texSubImage2DBase): (WebCore::WebGLRenderingContext::texSubImage2D): (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): (WebCore::WebGLRenderingContext::validateTexFuncParameters): (WebCore::WebGLRenderingContext::validateTexFuncData): * html/canvas/WebGLRenderingContext.h: (WebCore): (WebGLRenderingContext): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::getClearBitsByAttachmentType): (WebCore): (WebCore::GraphicsContext3D::getClearBitsByFormat): * platform/graphics/GraphicsContext3D.h: 2012-06-12 Kinuko Yasuda <kinuko@chromium.org> Support File/DirectoryEntry access for <input type=file> if FileSystem API is enabled https://bugs.webkit.org/show_bug.cgi?id=88293 Reviewed by Tony Chang. Proposal email on whatwg: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html Proposal draft: http://wiki.whatwg.org/wiki/DragAndDropEntries Test: fast/forms/file/input-file-entries.html * Modules/filesystem/HTMLInputElementFileSystem.cpp: Added. * Modules/filesystem/HTMLInputElementFileSystem.h: Added. * Modules/filesystem/HTMLInputElementFileSystem.idl: Added. * WebCore.gypi: * html/FileInputType.cpp: (WebCore::FileInputType::receiveDroppedFiles): Retrieves dropped file system Id if the given DragData has it. (WebCore::FileInputType::droppedFileSystemId): Added. This returns dropped file system Id retrieved in receiveDroppedFiles, or an empty string if the platform does not support isolated file system for dropped files. * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::droppedFileSystemId): Added. * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::droppedFileSystemId): Added. * html/InputType.h: * platform/DragData.cpp: * platform/DragData.h: * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::droppedFileSystemId): Added. 2012-06-18 Shinya Kawanaka <shinyak@chromium.org> [Crash][Editing] VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries() crashes in some Shadow DOM case. https://bugs.webkit.org/show_bug.cgi?id=88500 Reviewed by Ryosuke Niwa. When selecting from a child of shadow host to an element in Shadow DOM, the start position of Selection comes after the end position of Selection in some cases. This caused a crash. For example, let's think '<div id="host">A</div>D' and host has a Shadow DOM whose innerHTML is 'B<content></content>C'. When selecting from just after A (p1 = (PositionIsOffsetInAnchor, #text, 1)) to just before B (p2 = (PositionIsOffsetInAnchor, shadowRoot, 0)), since comparePosition always judge as p2 is before p1, m_start and m_end in VisibleSelection will be p2 and p1 respectively. However, the anchorNodes of p1 and p2 have the different tree scope, we have to adjust p2 to the same tree scope as p1. Since p2 is m_start, m_start was adjusted to positionAfterNode(div). This breaks the assumption that m_start is always before (or equal to) m_end. This patch keeps the assumption. When we cannot move m_start to positionAfterNode(div), we move m_start to positionBeforeNode(div). Note that we cannot always move m_start to positionBeforeNode(div), because when selecting just after D (p3 = (PositionIsOffsetInAnchor, D's parent, 2), we don't want to select A. In this case, m_start should be adjusted to positionAfterNode(div). Test: editing/shadow/breaking-editing-boundaries.html * editing/VisibleSelection.cpp: (WebCore::adjustPositionForEnd): (WebCore): (WebCore::adjustPositionForStart): (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): * editing/VisibleSelection.h: (VisibleSelection): 2012-06-18 Mike Lawther <mikelawther@chromium.org> Crash when setting title dynamically https://bugs.webkit.org/show_bug.cgi?id=88083 Reviewed by Dan Bernstein. Test: fast/text/title-crash.html The crashing code takes a rare branch in StyleResolver::styleForElement() where m_parentStyle is set to point to m_style. Consequently, while applying properties to m_style we end up mutating m_parentStyle. In this situation, we clone style() and point m_parentStyle at the clone. The clone is destroyed at the end of StyleResolver::styleForElement(). * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-18 Adrienne Walker <enne@google.com> RenderLayerBacking sometimes doesn't attach scrollbars to graphics layer tree https://bugs.webkit.org/show_bug.cgi?id=89402 Reviewed by James Robinson. RenderLayerBacking only attaches scrollbar layers to the graphics layer tree if there's a clip layer. This is wrong, because these scrollbars become orphans and other code expects them to handle repainting the scrollbars (which now become invisible). Fix by always attaching scrollbar layers. Test: compositing/overflow/image-load-overflow-scrollbars.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateInternalHierarchy): 2012-06-18 Amy Ousterhout <aousterh@chromium.org> [Chromium] DeviceOrientation Cleanup https://bugs.webkit.org/show_bug.cgi?id=89354 Reviewed by Kent Tamura. No new tests because there is no intended change in behavior. * platform/mock/DeviceOrientationClientMock.h: added OVERRIDE specifier for virtual functions (DeviceOrientationClientMock): 2012-06-18 Christophe Dumez <christophe.dumez@intel.com> [EFL] media/video-seek-past-end-playing.html is flaky https://bugs.webkit.org/show_bug.cgi?id=89301 Reviewed by Philippe Normand. Switch to double for media duration and playback position calculations to avoid precision problems. This patch also removes the workaround for the precision problem in didEnd() which is no longer needed. Test: media/video-seek-past-end-playing.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): (WebCore::MediaPlayerPrivateGStreamer::duration): 2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120593. http://trac.webkit.org/changeset/120593 https://bugs.webkit.org/show_bug.cgi?id=89404 Caused failures in fast/forms/file/input-file-entries.html (Requested by atwilson on #webkit). * Modules/filesystem/DOMFileSystem.cpp: (WebCore::DOMFileSystem::createIsolatedFileSystem): * Modules/filesystem/HTMLInputElementFileSystem.cpp: Removed. * Modules/filesystem/HTMLInputElementFileSystem.h: Removed. * Modules/filesystem/HTMLInputElementFileSystem.idl: Removed. * WebCore.gypi: * html/FileInputType.cpp: (WebCore::FileInputType::receiveDroppedFiles): * html/FileInputType.h: (FileInputType): * html/HTMLInputElement.cpp: * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: * html/InputType.h: (InputType): * platform/DragData.cpp: (WebCore::DragData::modifierKeyState): (WebCore): * platform/DragData.h: (DragData): * platform/chromium/DragDataChromium.cpp: 2012-06-14 James Robinson <jamesr@chromium.org> [chromium] Use WebImageLayer in GraphicsLayerChromium for image layers https://bugs.webkit.org/show_bug.cgi?id=89150 Reviewed by Adrienne Walker. Uses WebImageLayer instead of ImageLayerChromium for GraphicsLayerChromium::setContentsToImage. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setContentsToImage): 2012-06-14 James Robinson <jamesr@chromium.org> [chromium] GraphicsLayerChromium should use WebContentLayer directly https://bugs.webkit.org/show_bug.cgi?id=89145 Reviewed by Adrienne Walker. Ports GraphicsLayerChromium (or more specifically OpaqueRectTrackingContentLayerDelegate) to implement WebContentLayerClient instead of ContentLayerDelegate. In addition to the mechanical changes, this requires eagerly setting drawsContent on GraphicsLayerChromium::m_layer since WebContentLayerImpl's default value is different from LayerChromium's. Covered by all of compositing/ * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h: (OpaqueRectTrackingContentLayerDelegate): 2012-06-18 David Barr <davidbarr@chromium.org> Add from-image to css3-images image-resolution https://bugs.webkit.org/show_bug.cgi?id=85451 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-resolution No new tests; extended fast/css/image-resolution/image-resolution.html * css/CSSParser.cpp: Accept from-image identifier in image-resolution property. (WebCore::CSSParser::parseImageResolution): Map CSSValueFromImage to identifier value from cssValuePool. * css/CSSValueKeywords.in: Add from-image. * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSource. (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSource. (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSource. (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueFromImage to ImageResolutionFromImage. * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size. (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSource() has changed. * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSource in style diff. (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSource to StyleDifferenceLayout. * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSource, RenderStyle::setImageResolutionSource, RenderStyle::initialImageResolutionSource. * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSource. * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSource. (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSource to default and copy constructor. (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSource in comparison. * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSource. (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSource. 2012-06-18 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(r120346) ContentLayerPainter should clear rect to be painted https://bugs.webkit.org/show_bug.cgi?id=89376 Reviewed by Adrienne Walker. In r120346, a refactor moved a clearRect()/clip() call from ContentLayerPainter - which all ContentLayerChromiums use - out to OpaqueRectTrackingContentLayerDelegate - which all GraphicsLayerChromium backed layers use, but which callers using WebContentLayer directly do not use. This meant that the canvas wasn't cleared/clipped as WebContentLayerClient.h claimed it would be. This moves the clear and the clip into CanvasLayerTextureUpdater which all paths use, including layers that don't use the ContentLayerPainter. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): 2012-06-18 Igor Oliveira <igor.o@sisa.samsung.com> Unreviewed, rolling out r120119. http://trac.webkit.org/changeset/120119 Multiple regressions on ClusterFuzz * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimations): (WebCore::AnimationControllerPrivate::pauseAnimationAtTime): (WebCore::AnimationControllerPrivate::pauseTransitionAtTime): (WebCore::AnimationController::cancelAnimations): (WebCore::AnimationController::updateAnimations): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::pauseAnimation): (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): (WebCore::KeyframeAnimation::pauseAnimation): (WebCore::KeyframeAnimation::endAnimation): (WebCore::KeyframeAnimation::sendAnimationEvent): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetterStyle): (WebCore::RenderBlock::createFirstLetterRenderer): * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): * rendering/RenderObject.cpp: * rendering/RenderObject.h: (RenderObject): 2012-06-18 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r118414): some pages on concursolutions.com doesn't show up https://bugs.webkit.org/show_bug.cgi?id=89399 Reviewed by Adam Barth. The bug was caused by insertAdjacentHTML's not passing context element to createFragmentForInnerOuterHTML. Test: fast/html/adjacent-html-context-element.html * html/HTMLElement.cpp: (WebCore::HTMLElement::insertAdjacentHTML): 2012-06-18 Zhenyao Mo <zmo@google.com> Fix framebuffer-object-attachment.html failures https://bugs.webkit.org/show_bug.cgi?id=89387 Reviewed by Kenneth Russell. * html/canvas/WebGLFramebuffer.cpp: fix detachment behavior with depth/stencil/depth_stencil conflicts (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): * html/canvas/WebGLFramebuffer.h: (WebGLFramebuffer): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::framebufferRenderbuffer): move logic to WebGLFramebuffer (WebCore::WebGLRenderingContext::framebufferTexture2D): Ditto. (WebCore::WebGLRenderingContext::getParameter): Correct the wrong assumption that it's always checking the drawingbuffer's DEPTH_BITS/STENCIL_BITS * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-06-18 Ian Vollick <vollick@chromium.org> [chromium] Ensure that skipping frames during an accelerated animation doesn't cause starvation https://bugs.webkit.org/show_bug.cgi?id=87766 Reviewed by James Robinson. Unit tests: CCLayerTreeHostTestCheckerboardDoesNotStarveDraws.runMultiThread CCSchedulerStateMachineTest.TestFailedDrawsWillEventuallyForceADrawAfterTheNextCommit * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::updateState): (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted): (WebCore::CCSchedulerStateMachine::setMaximumNumberOfFailedDrawsBeforeDrawIsForced): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (CCSchedulerStateMachine): 2012-06-18 Nico Weber <thakis@chromium.org> [chromium/mac] Unbreak smooth scrolling. https://bugs.webkit.org/show_bug.cgi?id=89327 Reviewed by Dimitri Glazkov. Broken by Sam in r115589 / r115591. * platform/mac/ScrollAnimatorMac.mm: (WebCore::scrollAnimationEnabledForSystem): 2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120541, r120547, and r120548. http://trac.webkit.org/changeset/120541 http://trac.webkit.org/changeset/120547 http://trac.webkit.org/changeset/120548 https://bugs.webkit.org/show_bug.cgi?id=89383 This approach doesn't work for WebKit2 (Requested by abarth on #webkit). * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): 2012-06-18 Yong Li <yoli@rim.com> [BlackBerry] NetworkJob::startNewJobWithRequest() should check the frame pointer https://bugs.webkit.org/show_bug.cgi?id=89369 Reviewed by Antonio Gomes. NetworkJob::startNewJobWithRequest() should stop proceeding if the frame is null, which means it is a PingLoader job and should just finish now. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::startNewJobWithRequest): 2012-06-18 Dan Bernstein <mitz@apple.com> Ideographic comma and full-stops are mishandled in linebreak https://bugs.webkit.org/show_bug.cgi?id=87041 Reviewed by Alexey Proskuryakov. Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop-2.html Specifically, line breaks were always allowed after an ideographic comma or full stop, even before a closing bracket. * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Removed code that unconditionally allowed line breaks after ideographic commas and full stops, which was added for <http://webkit.org/b/17411> to work around an issue in Unicode 5.0. Current line break iterator implementations are based on newer versions of Unicode, which do not have that issue, so we can use them instead of the hardcoded approximate rule. 2012-06-18 Martin Robinson <mrobinson@igalia.com> [TextureMapper] Rename shader variables to match the naming scheme of the newer filter shaders https://bugs.webkit.org/show_bug.cgi?id=89324 Reviewed by Noam Rosenthal. Rename shader variables to align them with those in the new filter shaders. No new tests. This is just a simple refactor. * platform/graphics/texmap/TextureMapperShaderManager.cpp: Rename shader variables so that uniforms are prefixed by "u_", attributes by "a_", and texture samplers by "s_". 2012-06-18 Alexei Filippov <alexeif@chromium.org> Web Inspector: Implement native memory bar diagram https://bugs.webkit.org/show_bug.cgi?id=89106 Reviewed by Pavel Feldman. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryBarChart): (WebInspector.NativeMemoryBarChart.prototype._updateStats): (WebInspector.NativeMemoryBarChart.prototype.willHide): (WebInspector.NativeMemoryBarChart.prototype.wasShown): (WebInspector.NativeMemoryBarChart.prototype._updateView): * inspector/front-end/ProfileLauncherView.js: (WebInspector.ProfileLauncherView): * inspector/front-end/nativeMemoryProfiler.css: (.memory-bar-chart-name): (.memory-bar-chart-bar): (.memory-bar-chart-size): (.memory-bar-chart-total): 2012-06-18 Mike West <mkwst@chromium.org> Crash in CSPSource::parseSource https://bugs.webkit.org/show_bug.cgi?id=89353 Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPSourceList::parseSource): Checking that we're not past the end of the string before deref. 2012-06-18 Robert Hogan <robert@webkit.org> CSS 2.1 failure: table-height-algorithm-012 fails https://bugs.webkit.org/show_bug.cgi?id=85652 Reviewed by Julien Chaffraix. Test: css2.1/20110323/table-height-algorithm-012.htm fast/css/vertical-align-baseline-rowspan-001.htm fast/css/vertical-align-baseline-rowspan-002.htm fast/css/vertical-align-baseline-rowspan-003.htm fast/css/vertical-align-baseline-rowspan-004.htm fast/css/vertical-align-baseline-rowspan-005.htm fast/css/vertical-align-baseline-rowspan-006.htm fast/css/vertical-align-baseline-rowspan-007.htm fast/css/vertical-align-baseline-rowspan-008.htm fast/css/vertical-align-baseline-rowspan-009.htm A spanning cell with Vertical-align set to 'baseline' should align the cell's content baseline (which is the bottom of the first line of text or in-flow content) with the baseline of the first of the rows it spans. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): Only calculate the baseline for the first row in a rowspan. This ensures that any height added to the rowspan from the baseline is only added to the first row in the span rather than to each of them. (WebCore::RenderTableSection::layoutRows): Rather than get the baseline for each row in a rowspan (with the result that only the baseline for the last row actually sticks), calculate it for the first row in the rowspan only. This function is inefficient when handling rowspans so this doesn't fix the fact that redundant calculations are performed on each subsequent row in the span - that should be done separately. 2012-06-18 Hayato Ito <hayato@chromium.org> Event dispatcher should use InsertionPoint::hasDistribution instead of InsertinPoint::isActive in re-targeting. https://bugs.webkit.org/show_bug.cgi?id=89180 Reviewed by Dimitri Glazkov. If an event is fired on a fallback element within a insertion point which does not select any nodes, the result of event's re-targeting will be wrong since it uses InsertionPoint::isActive() to judge an existence of a lower boundary. That must use InsertionPoint::hasDistribution(). Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::ensureEventAncestors): 2012-06-18 Tony Payne <tpayne@chromium.org> [chromium] Add iccjpeg and qcms to chromium port https://bugs.webkit.org/show_bug.cgi?id=81974 Reviewed by Adam Barth. Covered by existing layout tests which will be rebaselined. * WebCore.gyp/WebCore.gyp: Add qcms to the build. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Return an sRGB profile. On OSX, return the default RGB profile. Add FIXME to use the user's monitor profile and verify that profile for other platforms. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): For libjpeg-turbo, JCS_EXT_BGRA and JCS_EXT_RGBA are the two known output color spaces for which the decoder uses a data swizzle. (colorSpaceHasAlpha): JPEG's have no alpha in the output color space. For libjpeg-turbo, alpha may be present in the swizzled output color space. (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): For QCMSLIB, create the color transform to use during decoding, and ensure we switch to inputing RGBA data to qcms even if the desired output data is BGRA: outputScanlines() sends BGRA data to the frame buffer following color correction if needed. (JPEGImageReader): (WebCore::JPEGImageReader::colorTransform): qcms color transform getter. (WebCore::JPEGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::JPEGImageDecoder::outputScanlines): Minor style fix. Apply color transform to each decoded image row. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): Move this adjacent to other setters and getters. (WebCore::PNGImageReader::decodingSizeOnly): Ditto. (WebCore::PNGImageReader::setHasAlpha): Ditto. (WebCore::PNGImageReader::hasAlpha): Ditto. (WebCore::PNGImageReader::interlaceBuffer): Ditto. (WebCore::PNGImageReader::createRowBuffer): Creates a temporary row buffer, used when a color transform is applied to the decoded image pixels. (WebCore::PNGImageReader::rowBuffer): Return the temporary row buffer. (WebCore::PNGImageReader::colorTransform): qcms color transform getter. (WebCore::PNGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::PNGImageDecoder::headerAvailable): For QCMSLIB, create the color transform to use for decoding. Clear m_colorProfile (not used anymore). (WebCore::PNGImageDecoder::rowAvailable): Create temporary row buffer if a color transform is needed for decoding. Apply color transform to each decoded image row. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::setColorProfile): Old method of colorProfiles is no longer used. Add a FIXME to remove the old implementation. (WebCore::ImageFrame::setStatus): Remove old color correction code. 2012-06-18 Dan Bernstein <mitz@apple.com> Column progression direction cannot be set independently of writing direction https://bugs.webkit.org/show_bug.cgi?id=89315 Added a column-progression property, which can have the values 'normal' and 'reverse'. When set to 'reverse', the first column is positioned at the end side of the block, and subsequent columns go from the in the start direction (in the inline column axis case; in the block column axis case, the first column coincides with the block and subsequent columns go before the block). Reviewed by Darin Adler. Test: fast/multicol/progression-reverse.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added handling of the new property. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Added validity check for the new property. The valid values are the identifiers 'normal' and 'reverse'. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added this mapping from ColumnProgression enum values to the identifiers 'normal and 'reverse'. (WebCore::CSSPrimitiveValue::operator ColumnProgression): Added this mapping from the identifiers 'normal' and 'reverse' to ColumnProgression enum values. * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Added the new property to the set of non-inherited properties. * css/CSSPropertyNames.in: Added -webkit-column-progression. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Added a handler for the new property. * rendering/ColumnInfo.h: (WebCore::ColumnInfo::ColumnInfo): Added an initializer for the m_progressionIsReversed member variable. (WebCore::ColumnInfo::progressionIsReversed): Added this accessor. (WebCore::ColumnInfo::setProgressionIsReversed): Ditto. (ColumnInfo): Added a m_progressionIsReversed member variable. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): Changed to advance in the reverse direction if needed. (WebCore::RenderBlock::setDesiredColumnCountAndWidth): Added call to ColumnInfo::setProgressionIsReversed(), based on the new property. (WebCore::RenderBlock::columnRectAt): Changed to take the progression direction into account. * rendering/style/RenderStyle.h: Added accessors and initial value for column progression. * rendering/style/RenderStyleConstants.h: Added ColumnProgression enum. * rendering/style/StyleMultiColData.cpp: (WebCore::StyleMultiColData::StyleMultiColData): Added initializer for the m_progression member variable. (WebCore::StyleMultiColData::operator==): Added equality check for m_progression. * rendering/style/StyleMultiColData.h: (StyleMultiColData): Added m_progression member variable. 2012-06-18 Martin Robinson <mrobinson@igalia.com> [TextureMapper] Replace the source transform with a flip uniform https://bugs.webkit.org/show_bug.cgi?id=89317 Reviewed by Noam Rosenthal. No new tests. This should not change any observable behavior. * platform/graphics/texmap/TextureMapperGL.cpp: Instead of building and passing the m4src matrix to the shader, just pass a single uniform that says whether or not the texture should be flipped. * platform/graphics/texmap/TextureMapperShaderManager.cpp: Change the shader programs to deal with a flip variable rather than a source matrix. (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram): Instead of getting the location of the source matrix, get the location of the flip uniform. (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple): Ditto. (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple): Ditto. (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask): Ditto. (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask): Ditto. * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore::TextureMapperShaderProgram::flipLocation): Added this getter. (TextureMapperShaderProgram): Rename the source matrix location member to reflect above changes. 2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120598. http://trac.webkit.org/changeset/120598 https://bugs.webkit.org/show_bug.cgi?id=89359 Patch causes crashes on EFL and GTK release builds (Requested by zdobersek on #webkit). * platform/graphics/Pattern.h: (Pattern): * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::prepareForFilling): * platform/graphics/cairo/PlatformContextCairo.h: 2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120592. http://trac.webkit.org/changeset/120592 https://bugs.webkit.org/show_bug.cgi?id=89357 Broke v8 bindings on windows. (Requested by atwilson__ on #webkit). * bindings/js/JSJavaScriptCallFrameCustom.cpp: * bindings/js/ScriptDebugServer.cpp: * bindings/js/ScriptDebugServer.h: (ScriptDebugServer): * bindings/v8/DebuggerScript.js: (.): * bindings/v8/JavaScriptCallFrame.cpp: * bindings/v8/JavaScriptCallFrame.h: (JavaScriptCallFrame): * bindings/v8/ScriptDebugServer.cpp: * bindings/v8/ScriptDebugServer.h: * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: * inspector/InjectedScript.cpp: * inspector/InjectedScript.h: (InjectedScript): * inspector/InjectedScriptSource.js: * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setScriptSource): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/JavaScriptCallFrame.idl: 2012-06-18 Julien Chaffraix <jchaffraix@webkit.org> RenderTableSection wastes vector capacity https://bugs.webkit.org/show_bug.cgi?id=86561 Reviewed by Antti Koivisto. Memory optimization, covered by existing tests. The issue is that addChild calls Vector::grow() which can over-allocate our row grid (especially for small tables as we allocate at least 16 entries). As we don't know if addChild is called in a loop (e.g. during parsing), we postpone the shrinkToFit call at layout time. (WebCore::RenderTableSection::layout): Added a shrinkToFit call with some explanation as to why it's good trade-off to do it now. 2012-06-18 Takashi Sakamoto <tasak@google.com> webkit fails IETC border-radius-clip-002 https://bugs.webkit.org/show_bug.cgi?id=83205 Added addRoundedRectClip instead of just clip when clipToBorderRadius is true and bgLayer->clip() == ContentFillBox. Reviewed by Simon Fraser. This change is covered by the existing test: ietestcenter/css3/bordersbackgrounds/border-radius-clip-002. However expected images should be updated. I updated chromium-linux and chromium-mac's expected images and removed chromium-win, chromium-mac-leopard and chromium-mac-snowleopard's expected images. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): As the code for "clipping to content boxes as necessary" doesn't consider border-radius or not, added the code for checking clipToBorderRadius or not, and if so, modified to use getBackgroundRoundedRect for obtaining rounded rect and to use addRoundedRectClip by using the obtained rounded rect. 2012-06-18 Iain Merrick <husky@google.com> Allow updateFixedElementsAfterScrolling() to run during layout. https://bugs.webkit.org/show_bug.cgi?id=84965 This is needed because HistoryController restores the previous scroll position during layout (because we don't want an ugly flash of wrongly- scrolled content). Reviewed by Simon Fraser. Test: compositing/fixed-position-scroll-offset-history-restore.html * page/FrameView.cpp: (WebCore::FrameView::updateFixedElementsAfterScrolling): 2012-06-18 Alexander Pavlov <apavlov@chromium.org> CSSOM wrappers are not built for rules in the per-document and page group user stylesheets https://bugs.webkit.org/show_bug.cgi?id=89221 Reviewed by Antti Koivisto. The issue manifested itself by not displaying injected page group stylesheet data in the Styles pane. Test: inspector/styles/inject-stylesheet.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-18 Dominik Röttsches <dominik.rottsches@intel.com> [cairo] Fix LayoutTests/fast/canvas/patternfill-repeat.html https://bugs.webkit.org/show_bug.cgi?id=53085 Reviewed by Martin Robinson. Clipping previously unlimited vertical and horizontal pattern repeats with a clip rectangle similar to the Qt Graphics Context. No new tests, this patch fixes canvas/philip/tests/2d.pattern.paint.repeat* tests. * platform/graphics/Pattern.h: (WebCore::Pattern::getPatternSpaceTransform): Adding constant getter method to be able to map to pattern space externally, needed by PlatformContextCairo::clipForPatternFilling. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::prepareForFilling): (WebCore::PlatformContextCairo::clipForPatternFilling): Clip pattern repeats if needed. * platform/graphics/cairo/PlatformContextCairo.h: 2012-06-18 Robert Kroeger <rjkroege@chromium.org> Touch events with default actions should be handled. https://bugs.webkit.org/show_bug.cgi?id=89304. Reviewed by Kent Tamura. Covered by existing tests and tests in blocked bug https://bugs.webkit.org/show_bug.cgi?id=88807 * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): Return true that the touch event was handled for either preventDefault or defaultHandled. 2012-06-18 Silvia Pfeiffer <silviapf@chromium.org> REGRESSION introduced in bug 88623: new shadowPseudoId elements need to get default styling. https://bugs.webkit.org/show_bug.cgi?id=89280 Reviewed by Eric Carlson. No new tests; existing tests found this bug. * css/html.css: (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): Add -webkit-media-slider-container to the default styling. (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): Add -webkit-media-slider-thumb to the default styling. 2012-06-12 Kinuko Yasuda <kinuko@chromium.org> Support File/DirectoryEntry access for <input type=file> if FileSystem API is enabled https://bugs.webkit.org/show_bug.cgi?id=88293 Reviewed by Tony Chang. Proposal email on whatwg: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html Proposal draft: http://wiki.whatwg.org/wiki/DragAndDropEntries Test: fast/forms/file/input-file-entries.html * Modules/filesystem/HTMLInputElementFileSystem.cpp: Added. * Modules/filesystem/HTMLInputElementFileSystem.h: Added. * Modules/filesystem/HTMLInputElementFileSystem.idl: Added. * WebCore.gypi: * html/FileInputType.cpp: (WebCore::FileInputType::receiveDroppedFiles): Retrieves dropped file system Id if the given DragData has it. (WebCore::FileInputType::droppedFileSystemId): Added. This returns dropped file system Id retrieved in receiveDroppedFiles, or an empty string if the platform does not support isolated file system for dropped files. * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::droppedFileSystemId): Added. * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::droppedFileSystemId): Added. * html/InputType.h: * platform/DragData.cpp: * platform/DragData.h: * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::droppedFileSystemId): Added. 2012-06-18 Peter Rybin <peter.rybin@gmail.com> Web Inspector: Support 'Restart frame' in protocol and backend https://bugs.webkit.org/show_bug.cgi?id=89147 Reviewed by Yury Semikhatsky. Inspector.json got new command in Debugger domain. A call path from InspectorDebuggerAgent to V8 Debug.LiveEdit.RestartFrame API is built. JSC implementation is a stub with fix me (40300). * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::restart): (WebCore): * bindings/js/JavaScriptCallFrame.h: (JavaScriptCallFrame): * bindings/js/ScriptDebugServer.cpp: (WebCore): (WebCore::ScriptDebugServer::updateCallStack): * bindings/js/ScriptDebugServer.h: (ScriptDebugServer): * bindings/v8/DebuggerScript.js: (.): * bindings/v8/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::restart): (WebCore): * bindings/v8/JavaScriptCallFrame.h: (JavaScriptCallFrame): * bindings/v8/ScriptDebugServer.cpp: (WebCore): (WebCore::ScriptDebugServer::updateCallStack): * bindings/v8/ScriptDebugServer.h: * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::restartCallback): (WebCore): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::restartFrame): (WebCore): * inspector/InjectedScript.h: (InjectedScript): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::restartFrame): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/JavaScriptCallFrame.idl: 2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120485 and r120582. http://trac.webkit.org/changeset/120485 http://trac.webkit.org/changeset/120582 https://bugs.webkit.org/show_bug.cgi?id=89345 chromeos tree breakage (Requested by morrita on #webkit). * WebCore.gyp/WebCore.gyp: * platform/image-decoders/ImageDecoder.h: (ImageFrame): (ImageDecoder): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): (JPEGImageReader): (WebCore::JPEGImageDecoder::outputScanlines): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): (PNGImageReader): (WebCore::PNGImageReader::decodingSizeOnly): (WebCore::PNGImageReader::interlaceBuffer): (WebCore::PNGImageReader::hasAlpha): (WebCore::PNGImageReader::setHasAlpha): (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore): (WebCore::resolveColorSpace): (WebCore::createColorSpace): (WebCore::ImageFrame::setColorProfile): (WebCore::ImageFrame::setStatus): 2012-06-18 Alexei Filippov <alexeif@chromium.org> Web Inspector: Add heap profiler owned memory to the pie chart https://bugs.webkit.org/show_bug.cgi?id=89203 Heap profiler may consume considerable amount of memory which is currently falls into Unknown category. Give it a separate sector on the pie chart. Reviewed by Yury Semikhatsky. * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::profilerSnapshotsSize): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::profilerSnapshotsSize): (WebCore): * bindings/v8/ScriptProfiler.h: (ScriptProfiler): * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::inspectorData): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-06-18 Mario Sanchez Prada <msanchez@igalia.com> [GTK] Get rid of DumpRenderTreeSupportGtk::{in|de}crementAccessibilityValue https://bugs.webkit.org/show_bug.cgi?id=89226 Reviewed by Martin Robinson. Implement webkitAccessibleValueGetMinimumIncrement() properly, doing something similar to what is done in AccessibilityObject's increment() and decrement() functions. Also, added missing bits to webkitAccessibleValueSetCurrentValue to make sure we check the new value against range limits. * accessibility/gtk/WebKitAccessibleInterfaceValue.cpp: (webkitAccessibleValueGetCurrentValue): (webkitAccessibleValueGetMaximumValue): (webkitAccessibleValueGetMinimumValue): (webkitAccessibleValueSetCurrentValue): (webkitAccessibleValueGetMinimumIncrement): 2012-06-14 Kinuko Yasuda <kinuko@chromium.org> [chromium] Cleanup: remove PlatformSupport::createAsyncFileSystem as it's no longer used https://bugs.webkit.org/show_bug.cgi?id=89083 Reviewed by Kentaro Hara. No new tests as this has no functional changes. * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-06-18 Taiju Tsuiki <tzik@chromium.org> Fix syntax of FileReader::readAsDataURL result https://bugs.webkit.org/show_bug.cgi?id=89330 When readAsDataURL generates data URL without media type, it used to omit semicolon before "base64" keyword. But this semicolor is required in this case, according to RFC2397. Reviewed by Kent Tamura. Test: fast/files/read-blob-async.html fast/files/workers/worker-read-blob-async.html: fast/files/workers/worker-read-blob-sync.html: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL): 2012-06-18 MORITA Hajime <morrita@google.com> Unreviewed chormium crash fix. This should be revisited. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): 2012-06-18 Christophe Dumez <christophe.dumez@intel.com> [EFL] fast/files/xhr-response-blob.html is crashing https://bugs.webkit.org/show_bug.cgi?id=89334 Reviewed by Kentaro Hara. Call wrap() instead of createWrapper() in JSBlob's toJS() to avoid hitting the !getCachedWrapper ASSERT in createWrapper() because we fail to use the cached wrapper. Test: fast/files/xhr-response-blob.html * bindings/js/JSBlobCustom.cpp: (WebCore::toJS): 2012-06-18 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: rename Unknown to Other in Native heap snapshot. https://bugs.webkit.org/show_bug.cgi?id=89306 Cosmetic change. Reviewed by Yury Semikhatsky. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot): (WebInspector.NativeMemoryProfileType.prototype.buttonClicked): (WebInspector.MemoryBlockViewProperties._initialize): 2012-06-18 Sergio Villar Senin <svillar@igalia.com> TextureMapperLayer: invisible layers do not let their children to be painted https://bugs.webkit.org/show_bug.cgi?id=88786 Reviewed by Noam Rosenthal. Do not early discard recursively painting children layers if the current layer is not visible. Changes already covered by compositing tests. This fixes both compositing/backface-visibility/backface-visibility-3d.html and compositing/backface-visibility/backface-visibility-non3d.html. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::computeTransformsRecursive): (WebCore::TextureMapperLayer::paintSelf): (WebCore::TextureMapperLayer::isVisible): 2012-06-15 Kinuko Yasuda <kinuko@chromium.org> XHR_RESPONSE_BLOB is not enabled on some platforms https://bugs.webkit.org/show_bug.cgi?id=88859 Reviewed by Adam Barth. Removing XHR_RESPONSE_BLOB since the current implementation has no platform-specific part. Test: http/tests/xmlhttprequest/blob-response-size.html * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::visitChildren): (WebCore::JSXMLHttpRequest::response): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): * platform/chromium/PlatformSupport.h: (PlatformSupport): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): (WebCore::XMLHttpRequest::setResponseType): (WebCore::XMLHttpRequest::clearResponseBuffers): (WebCore::XMLHttpRequest::didReceiveData): * xml/XMLHttpRequest.h: (XMLHttpRequest): * xml/XMLHttpRequest.idl: 2012-06-17 Martin Robinson <mrobinson@igalia.com> [TextureMapper] Reduce boilerplate code in the TextureMapperShaderManager https://bugs.webkit.org/show_bug.cgi?id=89293 Reviewed by Noam Rosenthal. Refactor TextureMapperShaderManager to reduce boilerplate code, by: 1. Making fragment and shader source arguments to the superclass constructor. 2. Removing virtual methods (which should not be called in constructors) with constructor implementations. This exchanges a small amount of code duplication for a lot less boilerplate. 3. Standardizing on the fooLocation name instead of fooVariable. 4. Removing the ::prepare() series of methods for non-filter shaders. It's betters to have all the uniform and attribute binding in the same place. No new tests. This is just a refactor and shouldn't change any functionality. * platform/graphics/texmap/TextureMapperGL.cpp: Handle binding the mask texture and opacity at both of the previous ::prepare callsites. Also rename "shaderInfo" to "program". * platform/graphics/texmap/TextureMapperShaderManager.cpp: Perform the refactoring described above. * platform/graphics/texmap/TextureMapperShaderManager.h: Ditto. 2012-06-17 Gregg Tavares <gman@google.com> Fix Framebuffer restrictions https://bugs.webkit.org/show_bug.cgi?id=89320 Reviewed by Kenneth Russell. No new tests, just fixing old ones * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::checkStatus): 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> [Forms] Move search field related code to RenderSearchField from RenderTextControlSingleLine https://bugs.webkit.org/show_bug.cgi?id=88980 Reviewed by Kent Tamura. This patch moves search field related methods in RenderTextControlSingleLine to new class RenderSearchField and changes related classes to use RenderSearchField. No new tests. This patch doesn't change behavior. * CMakeLists.txt: Added new file RenderSearchField.cpp * GNUmakefile.list.am: Added new file RenderSearchField.cpp and RenderSearchField.h * Target.pri: ditto * WebCore.gypi: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): Call RenderSearchField::updateCancelButtonVisibility (WebCore::HTMLInputElement::addSearchResult): Changed to call InputType::addSearchResult. * html/InputType.cpp: (WebCore::InputType::addSearchResult): Added. * html/InputType.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::addSearchResult): Moved from HTMLInputElement. (WebCore::SearchInputType::createRenderer): Added to create RenderSearchField. (WebCore::SearchInputType::searchEventsShouldBeDispatched): Moved from HTMLInputElement. (WebCore::SearchInputType::subtreeHasChanged) Moved search related code from HTMLInputElement. * html/SearchInputType.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Use RenderSearchField instead of RenderTextControlSingleLine. * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): Got rid isSearchField() guard for addSearchResult(). * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::RenderSearchField): Renamed to RenderSearchField. (WebCore::RenderSearchField::~RenderSearchField): ditto (WebCore::RenderSearchField::resultsButtonElement): ditto (WebCore::RenderSearchField::cancelButtonElement): ditto (WebCore::RenderSearchField::addSearchResult): ditto (WebCore::RenderSearchField::showPopup): ditto (WebCore::RenderSearchField::hidePopup): ditto (WebCore::RenderSearchField::computeControlHeight): Added. (WebCore::RenderSearchField::updateFromElement): Moved search field related code from RenderTextControlSingleLine. (WebCore::RenderSearchField::updateCancelButtonVisibility): Renamed to RenderSearchField. (WebCore::RenderSearchField::visibilityForCancelButton): ditto (WebCore::RenderSearchField::autosaveName): ditto (WebCore::RenderSearchField::valueChanged): ditto (WebCore::RenderSearchField::itemText): ditto (WebCore::RenderSearchField::itemLabel): ditto (WebCore::RenderSearchField::itemIcon): ditto (WebCore::RenderSearchField::itemIsEnabled): ditto (WebCore::RenderSearchField::itemStyle): ditto (WebCore::RenderSearchField::menuStyle): ditto (WebCore::RenderSearchField::clientInsetLeft): ditto (WebCore::RenderSearchField::clientInsetRight): ditto (WebCore::RenderSearchField::clientPaddingLeft): ditto (WebCore::RenderSearchField::clientPaddingRight): ditto (WebCore::RenderSearchField::listSize): ditto (WebCore::RenderSearchField::selectedIndex): ditto (WebCore::RenderSearchField::popupDidHide): ditto (WebCore::RenderSearchField::itemIsSeparator): ditto (WebCore::RenderSearchField::itemIsLabel): ditto (WebCore::RenderSearchField::itemIsSelected): ditto (WebCore::RenderSearchField::setTextFromItem): ditto (WebCore::RenderSearchField::fontSelector): ditto (WebCore::RenderSearchField::hostWindow): ditto (WebCore::RenderSearchField::createScrollbar): ditto (WebCore::RenderSearchField::computeHeightLimit): Added. (WebCore::RenderSearchField::centerContainerIfNeeded): Added. * rendering/RenderSearchField.h: (WebCore::toRenderSearchField): Added. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Remove search field related code. (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): ditto. (WebCore::RenderTextControlSingleLine::computeHeightLimit): Added. (WebCore::RenderTextControlSingleLine::layout): Use new methods for removing isSearchField. (WebCore::RenderTextControlSingleLine::computeControlHeight): Added. (WebCore::RenderTextControlSingleLine::updateFromElement): Remove search field related code. * rendering/RenderTextControlSingleLine.h: (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::centerContainerIfNeeded): Added. (WebCore::RenderTextControlSingleLine::containerElement): Exposed for RenderSearchField. (WebCore::RenderTextControlSingleLine::innerBlockElement): Exposed for RenderSearchField. * rendering/RenderingAllInOne.cpp: Added RenderSearchField.cpp 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> [Forms] Copy RenderTextControlSingleLine.{cpp,h} to RenderSearchFiled.{cpp,h} https://bugs.webkit.org/show_bug.cgi?id=89155 This patch copies RenderTextControlSingleLine.cpp and .h into RenderSearchField.cpp and .h with just "cp" code. New files aren't compiled until bug 88980. No new tests. This patch doesn't change behavior. * rendering/RenderSearchField.cpp: Added. (WebCore): (WebCore::RenderTextControlInnerBlock::positionForPoint): (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::textBaseStyle): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::paint): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::getAvgCharWidth): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::autoscroll): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): (WebCore::RenderTextControlSingleLine::scroll): (WebCore::RenderTextControlSingleLine::logicalScroll): (WebCore::RenderTextControlSingleLine::createScrollbar): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderSearchField.h: Added. (WebCore): (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::popupIsVisible): (WebCore::RenderTextControlSingleLine::isTextField): (WebCore::toRenderTextControlSingleLine): (RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> Unreviewed, rolling out r120565. http://trac.webkit.org/changeset/120565 https://bugs.webkit.org/show_bug.cgi?id=89155 Bad commit message * rendering/RenderSearchField.cpp: Removed. * rendering/RenderSearchField.h: Removed. 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> [Forms] Copy RenderTextControlSingleLine.{cpp,h} to RenderSearchFiled.{cpp,h} https://bugs.webkit.org/show_bug.cgi?id=89155 This patch copies RenderTextControlSingleLine.cpp and .h into RenderSearchField.cpp and .h with just "cp" code. New files aren't compiled until bug 88980. No new tests. This patch doesn't change behavior. * rendering/RenderSearchField.cpp: Added. (WebCore): (WebCore::RenderTextControlInnerBlock::positionForPoint): (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::textBaseStyle): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::paint): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::getAvgCharWidth): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::autoscroll): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): (WebCore::RenderTextControlSingleLine::scroll): (WebCore::RenderTextControlSingleLine::logicalScroll): (WebCore::RenderTextControlSingleLine::createScrollbar): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderSearchField.h: Added. (WebCore): (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::popupIsVisible): (WebCore::RenderTextControlSingleLine::isTextField): (WebCore::toRenderTextControlSingleLine): (RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): 2012-06-17 MORITA Hajime <morrita@google.com> Unreviewed build fix. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures): 2012-06-17 Philippe Normand <pnormand@igalia.com> [GStreamer] optimize ::naturalSize() https://bugs.webkit.org/show_bug.cgi?id=89314 Reviewed by Martin Robinson. Keep track of the video-sink sinkpad in the MediaPlayerPrivate and adapt the webkitGstGetPadCaps API accordingly. The benefit of this change is to reduce the number of calls to gst_element_get_static_pad() and the corresponding gst_pad_unref(). * platform/graphics/gstreamer/GStreamerVersioning.cpp: (webkitGstGetPadCaps): * platform/graphics/gstreamer/GStreamerVersioning.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::naturalSize): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): 2012-06-17 Arvid Nilsson <anilsson@rim.com> Don't mark main frame layer opaque if the frame view is transparent https://bugs.webkit.org/show_bug.cgi?id=88234 Reviewed by Simon Fraser. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): 2012-06-17 Philip Rogers <pdr@google.com> Prevent crash in SVGDocumentExtensions::removeAllElementReferencesForTarget. https://bugs.webkit.org/show_bug.cgi?id=88144 Reviewed by Abhishek Arya. When iterating over referencing elements to rebuild after a reference change in SVGDocumentExtensions::removeAllElementReferencesForTarget, we can modify the underlying toBeNotified vector, invalidating it. This change checks that a vector element is valid before rebuilding, preventing a crash. Some definitions from SVGDocumentExtensions that may put this patch in context: An example of a "referenced elements" is a <path>. An example of a "referencing element" is a <textPath href='some_path_id'>. m_elementDependencies is a map from referenced elements (e.g., paths) to a set of referencing elements (e.g., textPaths). The check that the vector element is valid relies on checking if the referencing element is in m_elementDependencies. This check is allowed because in the destructor of SVGTextPathElement (and SVGFeImageElement), removeAllTargetReferencesForElement() is called, removing the referencing element from m_elementDependencies. Simply checking if the referencing element is anywhere in m_elementDependencies is enough to show it is valid, but that requires iterating over all referenced elements to see if the given referencing element is present. This change only checks if the textPath is still in the elements referencing the path being removed, and only removes the referenced element from m_elementDependencies after forcing the referencing elements to be rebuilt. Test: svg/text/textpath-reference-crash.html * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> Unreviewed, rolling out r120390. http://trac.webkit.org/changeset/120390 https://bugs.webkit.org/show_bug.cgi?id=89155 Failed to copy merge history to RenderSerachField.{cpp,h} * rendering/RenderSearchField.cpp: Removed. * rendering/RenderSearchField.h: Removed. 2012-06-17 Yoshifumi Inoue <yosin@chromium.org> Unreviewed, rolling out r120432. http://trac.webkit.org/changeset/120432 https://bugs.webkit.org/show_bug.cgi?id=88980 Failed to copy merge history to RenderSerachField.{cpp,h} * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): (WebCore::HTMLInputElement::searchEventsShouldBeDispatched): (WebCore): (WebCore::HTMLInputElement::addSearchResult): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: * html/InputType.h: (InputType): * html/SearchInputType.cpp: * html/SearchInputType.h: (SearchInputType): * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * rendering/RenderSearchField.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): (WebCore): (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::textBaseStyle): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::paint): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::getAvgCharWidth): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::autoscroll): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): (WebCore::RenderTextControlSingleLine::scroll): (WebCore::RenderTextControlSingleLine::logicalScroll): (WebCore::RenderTextControlSingleLine::createScrollbar): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderSearchField.h: (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::isTextField): (WebCore::toRenderTextControlSingleLine): (WebCore): (RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::createScrollbar): * rendering/RenderTextControlSingleLine.h: (WebCore): (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::popupIsVisible): * rendering/RenderingAllInOne.cpp: 2012-06-15 Darin Adler <darin@apple.com> REGRESSION (r111041): Missing element type check in RenderThemeMac::paintMediaFullscreenButton https://bugs.webkit.org/show_bug.cgi?id=89270 Reviewed by Oliver Hunt. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMediaFullscreenButton): Use the proper idiom for getting a media control element's type. 2012-06-17 Zeev Lieber <zlieber@chromium.org> [Chromium] Compositor should avoid drawing quads when cached textures are available and contents unchanged https://bugs.webkit.org/show_bug.cgi?id=88482 Reviewed by Adrienne Walker. Post-processing CCRenderPassList after it's been generated and removing all render surface quads for which there are cached textures, and whose content didn't change. Added a new flag to CCLayerImpl to differentiate surface property change and layer property change. The changes are covered by new unit tests that check that the removal algorithm functions propertly. No rendering behaviour change, so no new layout tests. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::layerNeedsToRedrawOntoItsTargetSurface): (WebCore): (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::layerSurfacePropertyChanged): (WebCore): (WebCore::CCLayerImpl::resetAllChangeTrackingForSubtree): (WebCore::CCLayerImpl::setOpacity): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::removeRenderPassesRecursive): (WebCore): (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::hasCachedContentsTexture): (WebCore): (WebCore::CCRenderSurface::contentsChanged): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-06-17 Adam Barth <abarth@webkit.org> Attempt to fix a large number of tests I broke with http://trac.webkit.org/changeset/120547 We need to reset the device scale facter after each test. * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): 2012-06-16 Huang Dongsung <luxtella@company100.net> [Texmap] Share gaussian formula between shaders in TextureMapperShaderManager. https://bugs.webkit.org/show_bug.cgi?id=89277 This patch makes blur and drop shadow shader share gaussian formula. On the other hand, blur and drop shadow filter computed a gaussian weight in pixel shader. However, a gaussian kernal has always same values, so this patch computes the gaussian kernel only one time using CPU. It is more accurate and faster. Reviewed by Noam Rosenthal. Covered by existing tests, particularly css3/filters/. * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore): (WebCore::StandardFilterProgram::StandardFilterProgram): (WebCore::gauss): (WebCore::gaussianKernel): (WebCore::StandardFilterProgram::prepare): * platform/graphics/texmap/TextureMapperShaderManager.h: 2012-06-16 Robert Kroeger <rjkroege@chromium.org> [chromium] Make the deviceScaleFactor dynamically adjustable. https://bugs.webkit.org/show_bug.cgi?id=88916 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed use of static deviceScaleFactor from settings with dyanmic m_deviceScaleFactor (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setViewportSize): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::setDeviceScaleFactor): Added function to set deviceScaleFactor. (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): Removed static deviceScaleFactor (CCSettings): (CCLayerTreeHost): Added dynamic m_deviceScaleFactor in its place. (WebCore::CCLayerTreeHost::deviceScaleFactor): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Same as above. (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::setViewportSize): (WebCore::CCLayerTreeHostImpl::setDeviceScaleFactor): Added function to set deviceScaleFactor. (WebCore): (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::computePinchZoomDeltas): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Added dynamic m_deviceScaleFactor instance variable. (WebCore::CCLayerTreeHostImpl::deviceScaleFactor): (CCLayerTreeHostImpl): 2012-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120536. http://trac.webkit.org/changeset/120536 https://bugs.webkit.org/show_bug.cgi?id=89296 Does not compile on chromium-linux (Requested by abarth on #webkit). * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore): (WebCore::FontPlatformData::setHinting): (WebCore::FontPlatformData::setAutoHint): (WebCore::FontPlatformData::setUseBitmaps): (WebCore::FontPlatformData::setAntiAlias): (WebCore::FontPlatformData::setSubpixelRendering): (WebCore::FontPlatformData::setSubpixelPositioning): (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-16 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120539. http://trac.webkit.org/changeset/120539 https://bugs.webkit.org/show_bug.cgi?id=89295 Does not compile on chromium-mac (Requested by abarth on #webkit). * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::resetAllChangeTrackingForSubtree): (WebCore::CCLayerImpl::setOpacity): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::prepareContentsTexture): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-06-16 Mike West <mkwst@chromium.org> Ignore paths in Content Security Policy sources rather than failing to parse them. https://bugs.webkit.org/show_bug.cgi?id=89281 Reviewed by Adam Barth. In short: `script-src http://example.com/` should allow scripts from http://example.com. Currently, it allows no scripts at all, as the terminal `/` isn't accepted as part of a hostname. This patch adjusts CSPSourceList::parseSource to accept paths (and discard them). Once this lands, the next step will be to keep the path, and use it when comparing source origins in the various allowXXXFromSource methods. Tests: http/tests/security/contentSecurityPolicy/source-list-parsing-05.html http/tests/security/contentSecurityPolicy/source-list-parsing-06.html * page/ContentSecurityPolicy.cpp: (CSPSourceList): (WebCore): (WebCore::CSPSourceList::parseSource): Reworked this method entirely to support paths. (WebCore::CSPSourceList::parsePath): More or less a no-op at the moment. (WebCore::CSPSourceList::parsePort): Moved the `:` assertion here from parseSource. 2012-06-16 Zeev Lieber <zlieber@chromium.org> [Chromium] Compositor should avoid drawing quads when cached textures are available and contents unchanged https://bugs.webkit.org/show_bug.cgi?id=88482 Reviewed by Adrienne Walker. Post-processing CCRenderPassList after it's been generated and removing all render surface quads for which there are cached textures, and whose content didn't change. Added a new flag to CCLayerImpl to differentiate surface property change and layer property change. The changes are covered by new unit tests that check that the removal algorithm functions propertly. No rendering behaviour change, so no new layout tests. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::layerNeedsToRedrawOntoItsTargetSurface): (WebCore): (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::layerSurfacePropertyChanged): (WebCore): (WebCore::CCLayerImpl::resetAllChangeTrackingForSubtree): (WebCore::CCLayerImpl::setOpacity): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::removeRenderPassesRecursive): (WebCore): (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::hasCachedContentsTexture): (WebCore): (WebCore::CCRenderSurface::contentsChanged): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-06-16 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory https://bugs.webkit.org/show_bug.cgi?id=89228 Reverse the dependency originally from WebKit::WebFontRendering to WebCore::FontPlatformDataHarfBuzz so that WebKit::WebFontRendering can be platform-independent. Reviewed by Tony Chang. Refactory only. No new tests. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-16 Adam Barth <abarth@webkit.org> Settings::devicePixelRatio doesn't do anything and is confusing https://bugs.webkit.org/show_bug.cgi?id=89272 Reviewed by James Robinson. Settings::devicePixelRatio is yet another piece of state trying to represent the device scale factor. The canonical place to store this state is Page::m_deviceScaleFactor. Nothing in WebCore references Settings::devicePixelRatio anymore, so we can remove it. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): 2012-06-16 Huang Dongsung <luxtella@company100.net> [Texmap] SIGSEV in WebCore::TextureMapperGL::drawTexture. https://bugs.webkit.org/show_bug.cgi?id=89113 TextureMapperTile::m_texture is created lazilly, so we need null check before using it. Reviewed by Noam Rosenthal. No new tests. This patch doesn't change behavior. * platform/graphics/texmap/TextureMapperBackingStore.cpp: (WebCore::TextureMapperTile::paint): 2012-06-16 Huang Dongsung <luxtella@company100.net> [Texmap] Remove unused code in Texmap. https://bugs.webkit.org/show_bug.cgi?id=89265 Reviewed by Noam Rosenthal. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::didSynchronize): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::syncCompositingState): * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): 2012-06-16 Igor Oliveira <igor.o@sisa.samsung.com> [TexmapGL] Reduce the number of glTexSubImage2D calls https://bugs.webkit.org/show_bug.cgi?id=83665 Instead of copy the pixels row by row, put the pixels in a buffer and call glTexSubImage2D just once. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::updateContents): 2012-06-15 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120280. http://trac.webkit.org/changeset/120280 https://bugs.webkit.org/show_bug.cgi?id=89273 Enabling CSS regions broke all Windows tests (Requested by jhomeycutt on #webkit). * css/CSSPropertyNames.in: 2012-06-15 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120511. http://trac.webkit.org/changeset/120511 https://bugs.webkit.org/show_bug.cgi?id=89255 Breaks at least Android builder (Requested by wangxianzhu on #webkit). * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore): (WebCore::FontPlatformData::setHinting): (WebCore::FontPlatformData::setAutoHint): (WebCore::FontPlatformData::setUseBitmaps): (WebCore::FontPlatformData::setAntiAlias): (WebCore::FontPlatformData::setSubpixelRendering): (WebCore::FontPlatformData::setSubpixelPositioning): (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-15 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory https://bugs.webkit.org/show_bug.cgi?id=89228 Reverse the dependency originally from WebKit::WebFontRendering to WebCore::FontPlatformDataHarfBuzz so that WebKit::WebFontRendering can be platform-independent. Reviewed by Tony Chang. Refactory only. No new tests. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-15 Adrienne Walker <enne@google.com> [chromium] Fix composited scrollbars with transparent thumbs https://bugs.webkit.org/show_bug.cgi?id=89247 Reviewed by James Robinson. On some platforms, the thumb of a scrollbar can be transparent. Fix by always drawing the thumb quad with blending. * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: (WebCore::CCTextureDrawQuad::setNeedsBlending): (WebCore): * platform/graphics/chromium/cc/CCTextureDrawQuad.h: (CCTextureDrawQuad): 2012-06-14 James Robinson <jamesr@chromium.org> [chromium] Use SkBitmap in ImageLayerChromium https://bugs.webkit.org/show_bug.cgi?id=89134 Reviewed by Adrienne Walker. GraphicsLayer::setContentsToImage(Image*) is called whenever an image layer's image is or might have changed. In Chromium, this used to hang on to a RefPtr<WebCore::Image> until the compositor was ready to upload texture contents. This is potentially a bit fishy since the Image itself might not be in exactly the same state when we get around to uploading textures and it also creates a bad dependency from ImageLayerChromium on WebCore::Image. This patch grabs the underlying SkBitmap in the setContentsTo call and passes that into ImageLayerChromium instead. I've also removed the venerable but redundant PlatformImage concept since all of chromium's images are skia bitmaps these days. Covered by existing tests, particularly compositing/images/ and compositing/color-matching/. * WebCore.gypi: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setContentsToImage): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerTextureUpdater::setBitmap): (ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::ImageLayerChromium): (WebCore::ImageLayerChromium::setBitmap): (WebCore::ImageLayerChromium::update): (WebCore::ImageLayerChromium::contentBounds): (WebCore::ImageLayerChromium::drawsContent): * platform/graphics/chromium/ImageLayerChromium.h: (ImageLayerChromium): * platform/graphics/chromium/PlatformImage.cpp: Removed. * platform/graphics/chromium/PlatformImage.h: Removed. 2012-06-15 Eli Fidler <efidler@rim.com> [BlackBerry] Use platform font settings for the standard settings. https://bugs.webkit.org/show_bug.cgi?id=89232 Reviewed by Rob Buis. RIM PR 159708 * page/blackberry/SettingsBlackBerry.cpp: (WebCore): (WebCore::Settings::initializeDefaultFontFamilies): 2012-06-15 Joshua Bell <jsbell@chromium.org> IndexedDB: Raise exceptions when methods are called on deleted objects https://bugs.webkit.org/show_bug.cgi?id=89243 Reviewed by Tony Chang. Implement the IDB spec requirement that InvalidStateError exceptions are thrown when methods are called on objects (i.e. object stores and indexes) that have been deleted within a version change transaction. Test: storage/indexeddb/deleted-objects.html * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::deleteObjectStore): Don't relay to transaction if back-end failed. * Modules/indexeddb/IDBIndex.cpp: Check deleted state in methods, raise if set. (WebCore::IDBIndex::IDBIndex): (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::count): (WebCore::IDBIndex::openKeyCursor): (WebCore::IDBIndex::get): (WebCore::IDBIndex::getKey): * Modules/indexeddb/IDBIndex.h: Add flag to track deleted state, method to mark it. (WebCore::IDBIndex::markDeleted): (IDBIndex): * Modules/indexeddb/IDBObjectStore.cpp: Check deleted state in methods, raise if set. (WebCore::IDBObjectStore::IDBObjectStore): (WebCore::IDBObjectStore::get): (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): (WebCore::IDBObjectStore::deleteFunction): (WebCore::IDBObjectStore::clear): (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::index): (WebCore::IDBObjectStore::deleteIndex): If the index being deleted has been instantiated, mark it as deleted. (WebCore::IDBObjectStore::openCursor): (WebCore::IDBObjectStore::count): * Modules/indexeddb/IDBObjectStore.h: Add flag to track deleted state, method to mark it. (WebCore::IDBObjectStore::markDeleted): (IDBObjectStore): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::objectStoreDeleted): If the store being deleted has been instantiated, mark it as deleted. 2012-06-15 James Robinson <jamesr@chromium.org> [chromium] Fix LayoutTests/platform/chromium/compositing/accelerated-drawing/svg-filters.html https://bugs.webkit.org/show_bug.cgi?id=89126 Reviewed by Stephen White. When drawing an image buffer into a deferred device context, we have to make a deep copy of the source (Skia can't for some reason). Stephen White fixed this in r101325 by adding a bit on PlatformContextSkia indicating if a given context is deferred, but I broke this again in r120346 by refactoring the SkCanvas creation to happen in a different location from the PlatformContextSkia construction. This moves the check into ImageBufferSkia and directly queries the state of the destination SkDevice to be more robust and work without needing special PlatformContextSkia setup. Covered by LayoutTests/platform/chromium/compositing/accelerated-drawing/svg-filters.html * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::drawNeedsCopy): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::PlatformContextSkia): * platform/graphics/skia/PlatformContextSkia.h: (PlatformContextSkia): 2012-06-15 Ami Fischman <fischman@chromium.org> [chromium] Compositor should be aware of |flipped| status of video textures per-platform https://bugs.webkit.org/show_bug.cgi?id=89189 Reviewed by James Robinson. No new tests (sadly HW video decode is still only being tested manually for orientation). * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-14 Ryosuke Niwa <rniwa@webkit.org> The initial value of text-align should be start instead of -webkit-auto https://bugs.webkit.org/show_bug.cgi?id=79914 Reviewed by Tony Chang. Change the initial value of text-align CSS property from -webkit-auto to start as specified in http://www.w3.org/TR/css3-text/#text-align In editing, we have to coerce start and end to left and right for now because match-parent, which is the text-align value of li in UA stylesheet is going to result in the computed values of left as supposed to start by default, and this causes editing code not being able to remove text-align: left when computing typing styles and preserving styles. In the long term, we should detect this specific case and ignore match-parent but that seemed like too much work to be done in a single patch also because the test result improved because of this change. This behavior change is covered by existing regression tests. * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: (WebCore::getAttributeSetForAccessibilityObject): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): No longer supports TAAUTO since it's identical to TASTART. (WebCore::CSSPrimitiveValue::operator ETextAlign): Ditto. Parse -webkit-auto as start. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Replace TAAUTO by TASTART. * editing/EditingStyle.cpp: (WebCore): (WebCore::textAlignResolvingStartAndEnd): Coerce start and end into left and right based on the directionality for editing. Otherwise, we end up adding lots of text-align: left due to li's UA style rule having match-parent as the text alignment and its descendent inherits this style. We need to handle it better in the future since start and left or end and right are semantically different. (WebCore::EditingStyle::prepareToApplyAt): (WebCore::getPropertiesNotIn): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::textAlignmentForLine): Justified text is aligned at start by default. (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::startAlignedOffsetForLine): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement): * rendering/RenderListBox.cpp: (WebCore::itemOffsetForAlignment): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::updateMarqueeStyle): * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::textAlignmentForLine): (WebCore::RenderRubyText::adjustInlineDirectionLineBounds): * rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2012-06-15 Jian Li <jianli@chromium.org> [File API] FileReader should work in sandbox iframe https://bugs.webkit.org/show_bug.cgi?id=89242 Reviewed by Adam Barth. Test: fast/files/file-reader-sandbox-iframe.html * fileapi/ThreadableBlobRegistry.cpp: Should remove from map for all threads. (WebCore::ThreadableBlobRegistry::unregisterBlobURL): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canRequest): Check and use cached origin for blob URL first. 2012-06-15 David Barton <dbarton@mathscribe.com> Inherit style changes in MathML anonymous renderers https://bugs.webkit.org/show_bug.cgi?id=88476 Reviewed by Julien Chaffraix. A RenderObject that is not the main renderer() for a DOM node is called "anonymous". Standard WebCore practice is to mark such a renderer as isAnonymous(). For example, RenderBlock::styleDidChange calls propagateStyleToAnonymousChildren to flow style changes to such children, by re-initializing their styles and then inheriting from this->style(). A derived class' styleDidChange() can then set non-default style properties as needed. This patch implements this standard practice for RenderMathMLBlock classes, except RenderMathMLOperator which currently uses a RenderLayer, which reportedly means it should not be isAnonymous(). We also follow common practice and change isAnonymousBlock() to return false for RenderMathMLBlock classes, since isAnonymousBlock() is really used by RenderBlock to detect its own anonymous blocks for wrapping inline children, which RenderBlock then combines or deletes assuming this. Test: mathml/presentation/style-changed.html, also added to mathml/presentation/over.xhtml * rendering/RenderObject.h: (WebCore::RenderObject::isAnonymousBlock): * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock): (WebCore::RenderMathMLBlock::renderName): * rendering/mathml/RenderMathMLBlock.h: * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::createMathMLOperator): (WebCore::RenderMathMLFenced::makeFences): (WebCore::RenderMathMLFenced::addChild): (WebCore::RenderMathMLFenced::styleDidChange): * rendering/mathml/RenderMathMLFenced.h: * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::RenderMathMLFraction): (WebCore::RenderMathMLFraction::fixChildStyle): (WebCore::RenderMathMLFraction::addChild): (WebCore::RenderMathMLFraction::styleDidChange): * rendering/mathml/RenderMathMLFraction.h: * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::styleDidChange): * rendering/mathml/RenderMathMLOperator.h: * rendering/mathml/RenderMathMLSquareRoot.h: * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::fixScriptsStyle): (WebCore::RenderMathMLSubSup::addChild): (WebCore::RenderMathMLSubSup::styleDidChange): * rendering/mathml/RenderMathMLSubSup.h: * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::addChild): (WebCore::RenderMathMLUnderOver::styleDidChange): * rendering/mathml/RenderMathMLUnderOver.h: 2012-06-13 Vincent Scheib <scheib@chromium.org> Add new Pointer Lock spec webkitRequestPointerLock and webkitExitPointerLock methods. https://bugs.webkit.org/show_bug.cgi?id=88891 Reviewed by Dimitri Glazkov. Part of a series of refactoring changes to update pointer lock API to the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402 Entering and exiting mouse lock is provided in the new webkitRequestPointerLock and webkitExitPointerLock methods. Existing pointer-lock tests updated to use the new methods. * dom/Document.cpp: (WebCore::Document::webkitExitPointerLock): (WebCore): * dom/Document.h: (Document): * dom/Document.idl: * dom/Element.cpp: (WebCore): (WebCore::Element::webkitRequestPointerLock): * dom/Element.h: * dom/Element.idl: 2012-06-15 Tony Payne <tpayne@chromium.org> [chromium] Add iccjpeg and qcms to chromium port https://bugs.webkit.org/show_bug.cgi?id=81974 Reviewed by Adam Barth. Covered by existing layout tests which will be rebaselined. * WebCore.gyp/WebCore.gyp: Add qcms to the build. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Return an sRGB profile. On OSX, return the default RGB profile. Add FIXME to use the user's monitor profile and verify that profile for other platforms. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): For libjpeg-turbo, JCS_EXT_BGRA and JCS_EXT_RGBA are the two known output color spaces for which the decoder uses a data swizzle. (colorSpaceHasAlpha): JPEG's have no alpha in the output color space. For libjpeg-turbo, alpha may be present in the swizzled output color space. (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): For QCMSLIB, create the color transform to use during decoding, and ensure we switch to inputing RGBA data to qcms even if the desired output data is BGRA: outputScanlines() sends BGRA data to the frame buffer following color correction if needed. (JPEGImageReader): (WebCore::JPEGImageReader::colorTransform): qcms color transform getter. (WebCore::JPEGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::JPEGImageDecoder::outputScanlines): Minor style fix. Apply color transform to each decoded image row. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): Move this adjacent to other setters and getters. (WebCore::PNGImageReader::decodingSizeOnly): Ditto. (WebCore::PNGImageReader::setHasAlpha): Ditto. (WebCore::PNGImageReader::hasAlpha): Ditto. (WebCore::PNGImageReader::interlaceBuffer): Ditto. (WebCore::PNGImageReader::createRowBuffer): Creates a temporary row buffer, used when a color transform is applied to the decoded image pixels. (WebCore::PNGImageReader::rowBuffer): Return the temporary row buffer. (WebCore::PNGImageReader::colorTransform): qcms color transform getter. (WebCore::PNGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::PNGImageDecoder::headerAvailable): For QCMSLIB, create the color transform to use for decoding. Clear m_colorProfile (not used anymore). (WebCore::PNGImageDecoder::rowAvailable): Create temporary row buffer if a color transform is needed for decoding. Apply color transform to each decoded image row. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::setColorProfile): Old method of colorProfiles is no longer used. Add a FIXME to remove the old implementation. (WebCore::ImageFrame::setStatus): Remove old color correction code. 2012-06-15 Silvia Pfeiffer <silviapf@chromium.org> Remove volume thumb for videos without audio track. https://bugs.webkit.org/show_bug.cgi?id=89093 Reviewed by Eric Carlson. No new tests, since this was already tested in media/video-no-audio.html. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaMuteButton): Change mute button when there is no audio or no source file. (WebCore::paintMediaVolumeSlider): Set volume slider to 0 when there is no audio or no source file. (WebCore::paintMediaVolumeSliderThumb): Don't paint the volume slider thumb when there is no audio or no source file. 2012-06-15 Abhishek Arya <inferno@chromium.org> Cleanup empty anonymous block continuation. https://bugs.webkit.org/show_bug.cgi?id=74976 Reviewed by Julien Chaffraix. Fix rendering on http://docs.google.com/demo. Test: fast/inline/inline-empty-block-continuation-remove.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): If we are removing our last child, and are an anonymous block which is part of a continuation chain, then we need to first fix our continuation chain by setting our previous continuation renderer to point to the next continuation renderer. Then, we reset our continuation pointer and destroy ourselves. Since we no longer are part of continuation chain, we will be removed and previous and next anonymous block will be merged automatically. * rendering/RenderObject.cpp: (WebCore::RenderObject::previousInPreOrder): add an argument to previousInOrder - stayWithin. (WebCore): * rendering/RenderObject.h: (RenderObject): 2012-06-15 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Move FileSystem frame management from frontend to backend https://bugs.webkit.org/show_bug.cgi?id=89190 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/read-directory.html * inspector/Inspector.json: * inspector/InspectorFileSystemAgent.cpp: (WebCore::InspectorFileSystemAgent::readDirectory): (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent): (WebCore::InspectorFileSystemAgent::scriptExecutionContextForOrigin): (WebCore): * inspector/InspectorFileSystemAgent.h: (WebCore): (InspectorFileSystemAgent): 2012-06-15 Alexander Pavlov <apavlov@chromium.org> Unreviewed, build fix after r120469. * css/CSSPropertySourceData.h: (WebCore): 2012-06-15 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Add FileSystemRequestManager and FileSystemDispatcher https://bugs.webkit.org/show_bug.cgi?id=89191 Reviewed by Vsevolod Vlasov. * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel): (WebInspector.FileSystemRequestManager): (WebInspector.FileSystemRequestManager.prototoype._requestId): (WebInspector.FileSystemRequestManager.prototoype.readDirectory): (WebInspector.FileSystemRequestManager.prototoype._didReadDirectory): (WebInspector.FileSystemDispatcher): (WebInspector.FileSystemDispatcher.prototype.gotFileSystemRoot): (WebInspector.FileSystemDispatcher.prototype.didReadDirectory): 2012-06-15 Pavel Feldman <pfeldman@chromium.org> Web Inspector: extension's Resource.getContent always returns original revision. https://bugs.webkit.org/show_bug.cgi?id=89219 Reviewed by Vsevolod Vlasov. Fetching proper content from the UISourceCode now. * inspector/front-end/DebuggerResourceBinding.js: (WebInspector.DebuggerResourceBinding.prototype.canSetContent): (WebInspector.DebuggerResourceBinding.prototype.setContent): * inspector/front-end/DebuggerScriptMapping.js: (WebInspector.DebuggerScriptMapping.prototype._debuggerReset): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onGetResourceContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.isHidden): (WebInspector.Resource.prototype.uiSourceCode): (WebInspector.Resource.prototype.setUISourceCode): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): 2012-06-15 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: CRASH when DebuggerAgent.setBreakpoint was called twice for the same location. https://bugs.webkit.org/show_bug.cgi?id=89225 Reviewed by Pavel Feldman. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpoint): 2012-06-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: CSSParser::parseSheet() should provide ready-to-use source data https://bugs.webkit.org/show_bug.cgi?id=88646 Reviewed by Antti Koivisto. This change moves the post-processing step from InspectorStyleSheet into CSSParser, so that CSSParser::parseSheet() will return a ready-to-use list with style rule source code data. Also, universal data structures are introduced, which allow for the full rule source data tree building. No new tests, as this is a refactoring. * css/CSSParser.cpp: Use universal data structures, which can be used for building the full rule tree. (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::setupParser): (WebCore::CSSParser::parseSheet): Return ready-to-use source code data entries rather than an intermediate structure. (WebCore::CSSParser::parseDeclaration): (WebCore::CSSParser::addNewRuleToSourceTree): (WebCore): (WebCore::CSSParser::popRuleData): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::fixUnparsedPropertyRanges): Moved in from InspectorStyleSheet. (WebCore::CSSParser::markSelectorListStart): (WebCore::CSSParser::markSelectorListEnd): (WebCore::CSSParser::markRuleBodyStart): (WebCore::CSSParser::markRuleBodyEnd): (WebCore::CSSParser::markPropertyEnd): * css/CSSParser.h: (CSSParser): (WebCore::CSSParser::resetPropertyRange): Renamed. (WebCore::CSSParser::isExtractingSourceData): A convenience check. * css/CSSPropertySourceData.h: Introduce the RuleSourceDataList typedef. (WebCore): * inspector/InspectorStyleSheet.cpp: Make use of RuleSourceDataList and follow the CSSParser::parse*() API changes. (ParsedStyleSheet::sourceData): (ParsedStyleSheet): (ParsedStyleSheet::setSourceData): (WebCore::InspectorStyleSheet::ensureSourceData): Remove source data postprocessing, follow the new parseSheet() API. * inspector/InspectorStyleSheet.h: (WebCore::InspectorCSSId::InspectorCSSId): Drive-by: uninitialized field fix. (WebCore::InspectorStyleProperty::InspectorStyleProperty): Ditto. (InspectorStyleSheet): 2012-06-15 Pavel Feldman <pfeldman@chromium.org> Web Inspector: Long frame urls make all/errors/warnings/logs buttons inaccessible. https://bugs.webkit.org/show_bug.cgi?id=88907 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.css: (#console-context): 2012-06-15 Florin Malita <fmalita@chromium.org> Specular light filters produce dark results https://bugs.webkit.org/show_bug.cgi?id=89116 Reviewed by Dirk Schulze. Tests: svg/filters/feSpecularLight-premultiplied-expected.svg svg/filters/feSpecularLight-premultiplied.svg Per spec (http://www.w3.org/TR/SVG/filters.html#feSpecularLightingElement), light filters should operate on pre-multiplied RGBA. Currently, the results are stored in the unmultiplied buffer but the alpha channel is calculated for premultiplied values (which causes a darkening of the result upon the subsequent unmultiplied->premultiplied conversion). This patch updates FELighting to generate premultiplied results. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplySoftware): 2012-06-15 Andrey Kosyakov <caseq@chromium.org> Web Inspector: incorrect filtering of async timeline events https://bugs.webkit.org/show_bug.cgi?id=89214 Reviewed by Vsevolod Vlasov. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.accept): 2012-06-15 Stephen Chenney <schenney@chromium.org> SVG Composite of Offset filters incorrectly clips https://bugs.webkit.org/show_bug.cgi?id=77660 Reviewed by Dirk Schulze. Prior to this patch, when a group of filtered objects was used as input to another filter, the filter only operated on the stroke boundary of the group, and hence excluded the results of filtering elements within the group, or extraneously included regions clipped from the elements in the group. This patch modifies the strokeBoundingBox of SVG container elements to be the union of the repaint rects for the children. This modifes the results returned for sizing filters and for absoluteRects, which will cause inline layout around the group to factor in the resources applied to the group's children. The relevant spec entry is this, in Section 3.7 of the SVG 1.1 spec: "...the result must be as though the paint operations had been applied to an intermediate canvas initialized to transparent black, of a size determined by the rules given in Filter Effects then filtered by the processes defined in Filter Effects." In this case the "paint operations" is implied to include the result of applying "paint" but no resources to the group, which in turn would have resources applied to the children of the group. This makes the most sense, as the current, incorrect behavior makes it extremely diffucult to understand the actions of filters on groups of filtered content. Tests: svg/filters/container-with-filters-expected.svg svg/filters/container-with-filters.svg * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::updateCachedBoundaries): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::updateCachedBoundaries): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::computeContainerBoundingBoxes): 2012-06-15 David Kilzer <ddkilzer@apple.com> Sort ENABLE(INSPECTOR) section of WebCore.exp.in * WebCore.exp.in: Sort ENABLE(INSPECTOR) symbols. 2012-06-15 David Kilzer <ddkilzer@apple.com> Remove duplicate symbol from WebCore.exp.in * WebCore.exp.in: Remove duplicate symbol for: WebCore::Range::textQuads(WTF::Vector<WebCore::FloatQuad, 0ul>&, bool, WebCore::Range::RangeInFixedPosition*) const 2012-06-15 Florin Malita <fmalita@chromium.org> [Chromium] Unreviewed debug build fix for r120457 * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toYUVVideoDrawQuad): 2012-06-15 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: remove redundant Mac-specific style rule from inspector front-end. * inspector/front-end/helpScreen.css: 2012-06-15 Pavel Feldman <pfeldman@chromium.org> Web Inspector: fix help close button appearance on Mac https://bugs.webkit.org/show_bug.cgi?id=89208 Reviewed by Vsevolod Vlasov. * inspector/front-end/helpScreen.css: (.help-close-button): (body.platform-mac .help-close-button): (body.platform-mac .help-window-main .tabbed-pane-header-contents): 2012-06-11 Dana Jansens <danakj@chromium.org> [chromium] Create a CCYUVVideoDrawQuad and remove the now-unused generic CCVideoDrawQuad https://bugs.webkit.org/show_bug.cgi?id=88828 Reviewed by Adrienne Walker. The CCVideoDrawQuad is now only used for YUV video, so we remove the class and replace it with CCYUVVideoDrawQuad. This class holds what is needed to draw a YUV video frame. No new tests, no change in behaviour. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawYUVVideoQuad): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toYUVVideoDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): (CCDrawQuad): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.cpp. (WebCore): (WebCore::CCYUVVideoDrawQuad::create): (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad): * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCVideoDrawQuad.h. (WebCore): (CCYUVVideoDrawQuad): (WebCore::CCYUVVideoDrawQuad::yPlane): (WebCore::CCYUVVideoDrawQuad::uPlane): (WebCore::CCYUVVideoDrawQuad::vPlane): 2012-06-15 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: CRASH: getProfile is crashing for unknown profiles. https://bugs.webkit.org/show_bug.cgi?id=89202 agents' functions have to set a value to errorString if it can't assign values to the mandatory out arguments. Reviewed by Pavel Feldman. Test: inspector/profiler/heap-snapshot-get-profile-crash.html * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfile): 2012-06-15 Max Feil <mfeil@rim.com> [BlackBerry] media volume slider in wrong position (master_38 regression) https://bugs.webkit.org/show_bug.cgi?id=89165 Reviewed by Antonio Gomes. Due to upstream simplification of the volume slider (webkit.org bug 82150) it now appears in the wrong location below the media controls. The programmatic controls sizing we do in RenderThemeBlackBerry.cpp relies on absolute positioning of the volume slider container, so the best way to fix this is to set the bottom offset. No new tests since this is a regression fix. BlackBerry media controls are manually tested. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle): 2012-06-15 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: remove garbage line from inspector view in docked-to-right mode. * inspector/front-end/inspectorCommon.css: (body.docked.dock-to-right.docked): (body.docked.dock-to-right.inactive): 2012-06-15 Zoltan Arvai <zarvai@inf.u-szeged.hu> Buildfix for !ENABLE(BLOB) platforms after r120433. https://bugs.webkit.org/show_bug.cgi?id=78648 Reviewed by Csaba Osztrogonác. * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerBlobURL): 2012-06-15 Sami Kyostila <skyostil@chromium.org> [chromium] Allow scrolling non-root layers in the compositor thread https://bugs.webkit.org/show_bug.cgi?id=73350 Reviewed by James Robinson. This patch enables scrolling child layers in the compositor thread. Scroll deltas are accumulated for each scrolled CCLayerImpl and synchronized to the main thread. If a layer has no room to scroll in a given direction, one of its ancestor layers is scrolled instead if possible. Layer hit testing code by Shawn Singh. Added new unit tests to verify layer scrolling behavior: CCLayerTreeHostCommonTest.verifySubtreeSearch CCLayerTreeHostImplTest.clearRootRenderSurfaceAndScroll CCLayerTreeHostImplTest.inhibitScrollAndPageScaleUpdatesWhileAnimatingPageScale CCLayerTreeHostImplTest.inhibitScrollAndPageScaleUpdatesWhilePinchZooming CCLayerTreeHostImplTest.replaceTreeWhileScrolling CCLayerTreeHostImplTest.scrollBeforeRedraw CCLayerTreeHostImplTest.scrollBlockedByContentLayer CCLayerTreeHostImplTest.scrollChildAndChangePageScaleOnMainThread CCLayerTreeHostImplTest.scrollChildBeyondLimit CCLayerTreeHostImplTest.scrollChildCallsCommitAndRedraw CCLayerTreeHostImplTest.scrollEventBubbling CCLayerTreeHostImplTest.scrollMissesBackfacingChild CCLayerTreeHostImplTest.scrollMissesChild CCLayerTreeHostImplTest.scrollNonCompositedRoot CCLayerTreeHostImplTest.scrollRootAndChangePageScaleOnImplThread CCLayerTreeHostImplTest.scrollRootAndChangePageScaleOnMainThread CCLayerTreeHostImplTest.scrollRootIgnored CCLayerTreeHostImplTest.scrollWithoutRootLayer CCLayerTreeHostTestScrollChildLayer WebCompositorInputHandlerImplTest.gestureScrollOnMainThread * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setMaxScrollPosition): (WebCore): (WebCore::LayerChromium::scrollBy): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore): (LayerChromiumScrollDelegate): (WebCore::LayerChromiumScrollDelegate::~LayerChromiumScrollDelegate): (LayerChromium): (WebCore::LayerChromium::maxScrollPosition): (WebCore::LayerChromium::scrollable): (WebCore::LayerChromium::setLayerScrollDelegate): * platform/graphics/chromium/cc/CCInputHandler.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::tryScroll): (WebCore): (WebCore::sortLayers): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::findFirstScrollableLayer): (WebCore): (WebCore::CCLayerTreeHost::applyScrollAndScale): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): (WebCore): (WebCore::CCLayerTreeHostCommon::findLayerInSubtree): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::contentSize): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::findRootScrollLayer): (WebCore): (WebCore::findScrollLayerForContentLayer): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::CCLayerTreeHostImpl::detachLayerTree): (WebCore::adjustScrollsForPageScaleChange): (WebCore::applyPageScaleDeltaToScrollLayers): (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits): (WebCore::CCLayerTreeHostImpl::setPageScaleDelta): (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition): (WebCore::CCLayerTreeHostImpl::ensureRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::clearCurrentlyScrollingLayer): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::scrollBy): (WebCore::CCLayerTreeHostImpl::scrollEnd): (WebCore::CCLayerTreeHostImpl::pinchGestureUpdate): (WebCore::CCLayerTreeHostImpl::computePinchZoomDeltas): (WebCore::CCLayerTreeHostImpl::makeScrollAndScaleSet): (WebCore::collectScrollDeltas): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): (WebCore::CCLayerTreeHostImpl::animatePageScale): (WebCore::CCLayerTreeHostImpl::animateLayers): (WebCore::CCLayerTreeHostImpl::clearRenderSurfaces): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): (CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::rootScrollLayer): 2012-06-15 Jian Li <jianli@chromium.org> FileReader is dysfunctional in documents with "null" origin string https://bugs.webkit.org/show_bug.cgi?id=78648 Reviewed by Adam Barth. The fix is to keep in-memory map from blob URL to SecurityOrigin for the unique origin case. Test: fast/files/file-reader-file-url.html * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/BlobURL.cpp: (WebCore::BlobURL::getOrigin): Return the origin string embeded in the blob URL. (WebCore): (WebCore::BlobURL::createBlobURL): Remove the check for null origin string since it is handled now. * fileapi/BlobURL.h: (BlobURL): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore): (WebCore::originMap): Thread-specific in-memory map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::registerBlobURL): Add the map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Remove the map for the unregistered blob URL. (WebCore::ThreadableBlobRegistry::getCachedOrigin): Retrieve the origin associated with the blob URL. * fileapi/ThreadableBlobRegistry.h: (WebCore): (ThreadableBlobRegistry): * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * page/SecurityOrigin.cpp: (WebCore::getCachedOrigin): Return the cached origin for the blob URL if it exists. (WebCore): (WebCore::SecurityOrigin::create): Call getCachedOrigin to get the cached origin first. 2012-06-15 Yoshifumi Inoue <yosin@chromium.org> [Forms] Move search field related code to RenderSearchField from RenderTextControlSingleLine https://bugs.webkit.org/show_bug.cgi?id=88980 Reviewed by Kent Tamura. This patch moves search field related methods in RenderTextControlSingleLine to new class RenderSearchField and changes related classes to use RenderSearchField. No new tests. This patch doesn't change behavior. * CMakeLists.txt: Added new file RenderSearchField.cpp * GNUmakefile.list.am: Added new file RenderSearchField.cpp and RenderSearchField.h * Target.pri: ditto * WebCore.gypi: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): Call RenderSearchField::updateCancelButtonVisibility (WebCore::HTMLInputElement::addSearchResult): Changed to call InputType::addSearchResult. * html/InputType.cpp: (WebCore::InputType::addSearchResult): Added. * html/InputType.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::addSearchResult): Moved from HTMLInputElement. (WebCore::SearchInputType::createRenderer): Added to create RenderSearchField. * html/SearchInputType.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Use RenderSearchField instead of RenderTextControlSingleLine. * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): Got rid isSearchField() guard for addSearchResult(). * rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::RenderSearchField): Renamed to RenderSearchField. (WebCore::RenderSearchField::~RenderSearchField): ditto (WebCore::RenderSearchField::resultsButtonElement): ditto (WebCore::RenderSearchField::cancelButtonElement): ditto (WebCore::RenderSearchField::addSearchResult): ditto (WebCore::RenderSearchField::showPopup): ditto (WebCore::RenderSearchField::hidePopup): ditto (WebCore::RenderSearchField::computeControlHeight): Added. (WebCore::RenderSearchField::updateFromElement): Moved search field related code from RenderTextControlSingleLine. (WebCore::RenderSearchField::updateCancelButtonVisibility): Renamed to RenderSearchField. (WebCore::RenderSearchField::visibilityForCancelButton): ditto (WebCore::RenderSearchField::autosaveName): ditto (WebCore::RenderSearchField::valueChanged): ditto (WebCore::RenderSearchField::itemText): ditto (WebCore::RenderSearchField::itemLabel): ditto (WebCore::RenderSearchField::itemIcon): ditto (WebCore::RenderSearchField::itemIsEnabled): ditto (WebCore::RenderSearchField::itemStyle): ditto (WebCore::RenderSearchField::menuStyle): ditto (WebCore::RenderSearchField::clientInsetLeft): ditto (WebCore::RenderSearchField::clientInsetRight): ditto (WebCore::RenderSearchField::clientPaddingLeft): ditto (WebCore::RenderSearchField::clientPaddingRight): ditto (WebCore::RenderSearchField::listSize): ditto (WebCore::RenderSearchField::selectedIndex): ditto (WebCore::RenderSearchField::popupDidHide): ditto (WebCore::RenderSearchField::itemIsSeparator): ditto (WebCore::RenderSearchField::itemIsLabel): ditto (WebCore::RenderSearchField::itemIsSelected): ditto (WebCore::RenderSearchField::setTextFromItem): ditto (WebCore::RenderSearchField::fontSelector): ditto (WebCore::RenderSearchField::hostWindow): ditto (WebCore::RenderSearchField::createScrollbar): ditto (WebCore::RenderSearchField::computeHeightLimit): Added. (WebCore::RenderSearchField::centerContainerIfNeeded): Added. * rendering/RenderSearchField.h: (WebCore::toRenderSearchField): Added. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Remove search field related code. (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): ditto. (WebCore::RenderTextControlSingleLine::computeHeightLimit): Added. (WebCore::RenderTextControlSingleLine::layout): Use new methods for removing isSearchField. (WebCore::RenderTextControlSingleLine::computeControlHeight): Added. (WebCore::RenderTextControlSingleLine::updateFromElement): Remove search field related code. * rendering/RenderTextControlSingleLine.h: (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::centerContainerIfNeeded): Added. (WebCore::RenderTextControlSingleLine::containerElement): Exposed for RenderSearchField. (WebCore::RenderTextControlSingleLine::innerBlockElement): Exposed for RenderSearchField. * rendering/RenderingAllInOne.cpp: Added RenderSearchField.cpp 2012-06-15 Hironori Bono <hbono@chromium.org> Allow platforms to choose whether to remove markers on editing https://bugs.webkit.org/show_bug.cgi?id=88838 Reviewed by Hajime Morita. This change allows platforms to choose whether to remove markers on a word being edited. WebKit does not remove markers when we move a selection to a markered word on platforms that shouldEraseMarkersAfterChangeSelection returns false. On such platforms, WebKit expects to set WTF_USE_MARKER_REMOVAL_UPON_EDITING to 1 so Editor::updateMarkersForWordsAffectedByEditing can remove markers. This change also checks the return value of shouldEraseMarkersAfterChangeSelection so platform can choose it. This change also adds grammar markers so it can also remove grammar markers. Test: editing/spelling/grammar-edit-word.html * editing/Editor.cpp: (WebCore::Editor::updateMarkersForWordsAffectedByEditing): 2012-06-15 Andrey Adaikin <aandrey@chromium.org> Web Inspector: [WebGL] Simple implementation of the InjectedWebGLScriptSource to support capturing WebGL calls for a frame https://bugs.webkit.org/show_bug.cgi?id=89088 Simple experimental implementation of the InjectedWebGLScriptSource.js that allows to wrap a WebGL context and capture names (for now) of the WebGL function calls for a frame being captured. Reviewed by Vsevolod Vlasov. * inspector/InjectedWebGLScriptSource.js: (.): 2012-06-15 Silvia Pfeiffer <silviapf@chromium.org> Add fullscreen button to Chrome video controls for video. https://bugs.webkit.org/show_bug.cgi?id=88818 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch includes a fullscreen button for video elements and the rendering of the controls in fullscreen including hiding them after 2 seconds when the mouse is out of the controls and not moved. * css/fullscreen.css: (video:-webkit-full-screen, audio:-webkit-full-screen): Add audio to the default fullscreen styling rules. * css/mediaControlsChromium.css: (video:-webkit-full-page-media::-webkit-media-controls-panel): Align controls to the bottom of the fullscreen page. (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): Include styling for the fullscreen button. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore): Add a constant for when to hide the controls in fullscreen. (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Add member fields for fullscreen button, hiding timer and tracking of whether we are in fullscreen. (WebCore::MediaControlRootElementChromium::create): Add fullscreen button element to the visual layout. (WebCore::MediaControlRootElementChromium::setMediaController): Add fullscreen button element to the media controller. (WebCore::MediaControlRootElementChromium::reset): Show the fullscreen button if the controller supports fullscreen. (WebCore::MediaControlRootElementChromium::playbackStarted): Start the timer to hide the controls in fullscreen. (WebCore::MediaControlRootElementChromium::playbackStopped): Don't hide the controls when the video is paused in fullscreen. (WebCore::MediaControlRootElementChromium::reportedError): Hide the fullscreen button when we hit an error. (WebCore::MediaControlRootElementChromium::defaultEventHandler): Add logic for mouse events in fullscreen to start/stop the hiding timer. (WebCore::MediaControlRootElementChromium::startHideFullscreenControlsTimer): Start the fullscreen hiding timer. (WebCore::MediaControlRootElementChromium::hideFullscreenControlsTimerFired): Timer fired: hide the video controls in fullscreen. (WebCore::MediaControlRootElementChromium::stopHideFullscreenControlsTimer): Reset the fullscreen hiding timer. (WebCore::MediaControlRootElementChromium::enteredFullscreen): Add logic to enter fullscreen. (WebCore::MediaControlRootElementChromium::exitedFullscreen): Add logic to exit fullscreen. * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): Add declaration of member functions and fields for fullscreen. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaFullscreenButton): Use the new image for the fullscreen button. * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): Declare the fullscreen painting function for Chrome Mac. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton): Hook up the fullscreen paining function for Chrome Mac. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintMediaFullscreenButton): Hook up the fullscreen paining function for Chrome Skia. * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): Declare the fullscreen painting function for Chrome Skia. 2012-06-14 Kent Tamura <tkent@chromium.org> Unreviewed, rolling out r110340. http://trac.webkit.org/changeset/110340 https://bugs.webkit.org/show_bug.cgi?id=88749 r110340 added a broken implementation of HTMLSelectElement::selectedOptions. This roll out removes HTMLSelectElement::selectedOptions. * html/CollectionType.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): * html/HTMLSelectElement.cpp: * html/HTMLSelectElement.h: (HTMLSelectElement): * html/HTMLSelectElement.idl: 2012-06-14 Keishi Hattori <keishi@webkit.org> Add color property to input type=range https://bugs.webkit.org/show_bug.cgi?id=89067 Reviewed by Kent Tamura. Adding color property to input type=range in preparation for supporting tick marks for datalist for input type=range. * css/html.css: (input[type="range"]): Setting color property for input type=range. This will set the color of tick mark when we implement <datalist>. * css/themeChromiumLinux.css: (input[type=range]): * css/themeWin.css: (input[type="range"]): 2012-06-14 Kent Tamura <tkent@chromium.org> Support file extensions in HTMLInputElement::accept https://bugs.webkit.org/show_bug.cgi?id=88298 Reviewed by Hajime Morita. The WHATWG specification added file extensions supoprt for HTMLInputElement::accept recently. In the WebCore FileChooser interface, we rejected invalid MIME type strings in HTMLInputElement::acceptMIMETypes(), and platform file choosers don't expect that it containts file extensions. So, this patch introduces additional member "acceptFileExtensions" to FileChooserSettings, and it contains only file extensions specified by an accept attribute. * html/FileInputType.cpp: Sets HTMLInputElement::acceptFileExtensions() to FileChooserSettings::acceptFileExtensions. (WebCore::FileInputType::handleDOMActivateEvent): (WebCore::FileInputType::receiveDropForDirectoryUpload): * html/HTMLInputElement.cpp: (WebCore::isValidFileExtension): Added. (WebCore::parseAcceptAttribute): Common part for acceptMIMETyps() and acceptFileExtensions(). (WebCore::HTMLInputElement::acceptMIMETypes): Uses parseAcceptAttribute() with isValidMIMEType(). (WebCore::HTMLInputElement::acceptFileExtensions): Added. Uses parseAcceptAttribute() with isValidFileExtension(). * html/HTMLInputElement.h: (HTMLInputElement): Add acceptFileExtensions(). * platform/FileChooser.h: (FileChooserSettings): Add acceptFileExtensions and acceptTypes(). * platform/FileChooser.cpp: (WebCore::FileChooserSettings::acceptTypes): Added. 2012-06-14 James Robinson <jamesr@chromium.org> [chromium] Remove unused CanvasLayerChromium.h/cpp from the tree https://bugs.webkit.org/show_bug.cgi?id=89152 Reviewed by Adrienne Walker. These files have been unused and not in the build system since r119769 * platform/graphics/chromium/CanvasLayerChromium.cpp: Removed. * platform/graphics/chromium/CanvasLayerChromium.h: Removed. 2012-06-14 Emil A Eklund <eae@chromium.org> Cast paddings to int in RenderTableCell https://bugs.webkit.org/show_bug.cgi?id=88918 Reviewed by Levi Weintraub. Table layout uses integers throughout yet the TableCell paddingLeft/ Right/Top/Bottom methods returns LayoutUnits. This causes inconsistent rounding as some call sites cast the numbers to ints before doing computation and others do computation before casting. By changing the methods to always cast the padding values to int we ensure consistent padding calculations. Ideally we'd change the type of the return value for the methods but as they are overriden that would likely cause more confusion. Test: fast/sub-pixel/table-cells-with-padding-do-not-wrap.html * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paddingTop): (WebCore::RenderTableCell::paddingBottom): (WebCore::RenderTableCell::paddingLeft): (WebCore::RenderTableCell::paddingRight): (WebCore::RenderTableCell::paddingBefore): (WebCore::RenderTableCell::paddingAfter): 2012-06-14 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Check the result of FontCache::getCachedFontPlatformData() https://bugs.webkit.org/show_bug.cgi?id=89141 Reviewed by Kent Tamura. The value of FontCache::getCachedFontPlatformData() could be invalid, so we should check the value before use it. No new tests. No new functionality. * platform/graphics/skia/FontCacheSkia.cpp: (WebCore::FontCache::getFontDataForCharacters): 2012-06-14 Gregg Tavares <gman@google.com> Fix framebuffer completeness test https://bugs.webkit.org/show_bug.cgi?id=89127 Reviewed by Kenneth Russell. No new tests just fixing failing tests. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::initializeAttachments): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::isTexInternalFormatColorBufferCombinationValid): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::getClearBitsByAttachmentType): (WebCore): (WebCore::GraphicsContext3D::getClearBitsByFormat): (WebCore::GraphicsContext3D::getChannelBitsByFormat): * platform/graphics/GraphicsContext3D.h: 2012-06-14 Adrienne Walker <enne@google.com> [chromium] Make TiledLayerChromium robust to unexpected null tiles https://bugs.webkit.org/show_bug.cgi?id=89143 Reviewed by James Robinson. Although there shouldn't ever be null tiles in the map, it appears to be occurring frequently enough to show up in crash reports. In the short term, be robust to this so the tiler doesn't crash. This should eventually be reverted. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::updateTiles): (WebCore::TiledLayerChromium::resetUpdateState): 2012-06-14 Kent Tamura <tkent@chromium.org> Validate form state strings in FormController::setStateForNewFormElements() https://bugs.webkit.org/show_bug.cgi?id=88768 Reviewed by Hajime Morita. Reject invalid form state vectors. This state vectors are generated by WebKit itself. However it can be invalid because - Serialized state vectors can be corrupted - A future version of WebKit might change the format So we had better reject unexpected state vectors as possible. Test: fast/forms/state-restore-broken-state.html * WebCore.exp.in: Expose some symbols used by Internals.cpp. * html/FormController.cpp: (WebCore::isNotFormControlTypeCharacter): A helper for state validation. (WebCore::FormController::setStateForNewFormElements): Reject state vectors of which size is not a multiple of 3, or a type name is invalid. * testing/Internals.cpp: (WebCore::Internals::formControlStateOfPreviousHistoryItem): Returns a form state vector of the previous document. (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Sets a form state vector for the previous document. * testing/Internals.h: Declare new functions. * testing/Internals.idl: ditto. 2012-06-14 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120393. http://trac.webkit.org/changeset/120393 https://bugs.webkit.org/show_bug.cgi?id=89163 breaks cr-mac build (Requested by morrita on #webkit). * WebCore.gyp/WebCore.gyp: * platform/image-decoders/ImageDecoder.h: (ImageFrame): (ImageDecoder): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): (JPEGImageReader): (WebCore::JPEGImageDecoder::outputScanlines): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): (PNGImageReader): (WebCore::PNGImageReader::decodingSizeOnly): (WebCore::PNGImageReader::interlaceBuffer): (WebCore::PNGImageReader::hasAlpha): (WebCore::PNGImageReader::setHasAlpha): (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore): (WebCore::resolveColorSpace): (WebCore::createColorSpace): (WebCore::ImageFrame::setColorProfile): (WebCore::ImageFrame::setStatus): 2012-06-14 Julien Chaffraix <jchaffraix@webkit.org> RenderLayer subtrees without any self-painting layer shouldn't be walked during painting https://bugs.webkit.org/show_bug.cgi?id=88888 Reviewed by Simon Fraser. Performance optimization, covered by existing tests. The gist of this change is to add a has-self-painting-layer-descendant flag (including an invalidation logic) that is used to avoid walking subtrees without any self-painting layer. On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows by 100 columns table, it brings the paint time during scrolling from ~45ms to ~6ms on my machine. The test case is a pathologic example here but the optimization should apply in other cases. The new update logic piggy-backs on top of the existing updateVisibilityStatus() one that got repurposed and renamed as part of this change. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::addChild): (WebCore::RenderLayer::removeChild): (WebCore::RenderLayer::styleChanged): These functions were updated to dirty / set the new flag. (WebCore::RenderLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus): (WebCore::RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant): Added those functions to handle setting / invalidating the new flag. (WebCore::RenderLayer::updateSelfPaintingLayerAfterStyleChange): Added this function to handle style update. (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintLayerContentsAndReflection): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::paintList): Changed this logic to bail out if we have no self-painting descendants. This is what is giving the performance improvement. Also added some performance ASSERTs to ensure the methods are not called when they shouldn't. (WebCore::RenderLayer::updateDescendantDependentFlags): Renamed from updateVisibilityStatus to account for the new usage. (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::updateLayerPositionsAfterScroll): (WebCore::RenderLayer::collectLayers): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Updated after updateVisibilityStatus rename. * rendering/RenderLayer.h: (WebCore::RenderLayer::hasSelfPaintingLayerDescendant): Added the declaration of the new functions as well as the new flag and dirty bit. 2012-06-14 Tony Payne <tpayne@chromium.org> [chromium] Add iccjpeg and qcms to chromium port https://bugs.webkit.org/show_bug.cgi?id=81974 Reviewed by Adam Barth. Covered by existing layout tests which will be rebaselined. * WebCore.gyp/WebCore.gyp: Add qcms to the build. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Return an sRGB profile. On OSX, return the default RGB profile. Add FIXME to use the user's monitor profile and verify that profile for other platforms. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): For libjpeg-turbo, JCS_EXT_BGRA and JCS_EXT_RGBA are the two known output color spaces for which the decoder uses a data swizzle. (colorSpaceHasAlpha): JPEG's have no alpha in the output color space. For libjpeg-turbo, alpha may be present in the swizzled output color space. (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): For QCMSLIB, create the color transform to use during decoding, and ensure we switch to inputing RGBA data to qcms even if the desired output data is BGRA: outputScanlines() sends BGRA data to the frame buffer following color correction if needed. (JPEGImageReader): (WebCore::JPEGImageReader::colorTransform): qcms color transform getter. (WebCore::JPEGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::JPEGImageDecoder::outputScanlines): Minor style fix. Apply color transform to each decoded image row. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): Move this adjacent to other setters and getters. (WebCore::PNGImageReader::decodingSizeOnly): Ditto. (WebCore::PNGImageReader::setHasAlpha): Ditto. (WebCore::PNGImageReader::hasAlpha): Ditto. (WebCore::PNGImageReader::interlaceBuffer): Ditto. (WebCore::PNGImageReader::createRowBuffer): Creates a temporary row buffer, used when a color transform is applied to the decoded image pixels. (WebCore::PNGImageReader::rowBuffer): Return the temporary row buffer. (WebCore::PNGImageReader::colorTransform): qcms color transform getter. (WebCore::PNGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::PNGImageDecoder::headerAvailable): For QCMSLIB, create the color transform to use for decoding. Clear m_colorProfile (not used anymore). (WebCore::PNGImageDecoder::rowAvailable): Create temporary row buffer if a color transform is needed for decoding. Apply color transform to each decoded image row. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::setColorProfile): Old method of colorProfiles is no longer used. Add a FIXME to remove the old implementation. (WebCore::ImageFrame::setStatus): Remove old color correction code. 2012-06-14 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120384. http://trac.webkit.org/changeset/120384 https://bugs.webkit.org/show_bug.cgi?id=89157 breaks create-blob-url-from-data-url.html (Requested by morrita on #webkit). * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/BlobURL.cpp: (WebCore::BlobURL::createBlobURL): * fileapi/BlobURL.h: (BlobURL): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore): (WebCore::ThreadableBlobRegistry::registerBlobURL): (WebCore::ThreadableBlobRegistry::unregisterBlobURL): * fileapi/ThreadableBlobRegistry.h: (WebCore): (ThreadableBlobRegistry): * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::create): 2012-06-14 Yoshifumi Inoue <yosin@chromium.org> [Forms] Copy RenderTextControlSingleLine.{cpp,h} to RenderSearchFiled.{cpp,h} https://bugs.webkit.org/show_bug.cgi?id=89155 Reviewed by Kent Tamura. This patch copies RenderTextControlSingleLine.cpp and .h into RenderSearchField.cpp and .h with just "cp" code. New files aren't compiled until bug 88980. No new tests. This patch doesn't change behavior. * rendering/RenderSearchField.cpp: Added. (WebCore::RenderTextControlInnerBlock::positionForPoint): (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::textBaseStyle): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::paint): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::getAvgCharWidth): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::autoscroll): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): (WebCore::RenderTextControlSingleLine::scroll): (WebCore::RenderTextControlSingleLine::logicalScroll): (WebCore::RenderTextControlSingleLine::createScrollbar): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderSearchField.h: Added. (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::popupIsVisible): (WebCore::RenderTextControlSingleLine::isTextField): (WebCore::toRenderTextControlSingleLine): (RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): 2012-06-14 Kent Tamura <tkent@chromium.org> [JSC/V8] "DOMString[]" for function return values should not be null https://bugs.webkit.org/show_bug.cgi?id=89151 Reviewed by Kentaro Hara. jsArray and v8Array are used for "DOMString[]", not "DOMString[]?". So we should not return JavaScript null object. No new tests. We have no plan to use this code in production code for now. It will be used for window.internals functions. * bindings/js/JSDOMBinding.cpp: (WebCore::jsArray): For null input, returns an empty array, not null. * bindings/v8/V8Binding.cpp: (WebCore::v8Array): Implement DOMStringList -> JavaScript array conversion. Like jsArray(), we don't return null object. * bindings/v8/V8Binding.h: (WebCore): Declare v8Array(). 2012-06-14 Dale Curtis <dalecurtis@chromium.org> Disable click/dbl-click on MediaDocument for Chromium. Fix layout test for all platforms. https://bugs.webkit.org/show_bug.cgi?id=89129 As titled, click-to-pause and double-click-to-play behavior are unwanted on Chromium. A long standing issue (~3 years) has been to disable this feature. Reviewed by Eric Carlson. Uses existing click/double-click test. * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2012-06-14 Jian Li <jianli@chromium.org> FileReader is dysfunctional in documents with "null" origin string https://bugs.webkit.org/show_bug.cgi?id=78648 Reviewed by Adam Barth. The fix is to keep in-memory map from blob URL to SecurityOrigin for the unique origin case. Test: fast/files/file-reader-file-url.html * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/BlobURL.cpp: (WebCore::BlobURL::getOrigin): Return the origin string embeded in the blob URL. (WebCore): (WebCore::BlobURL::createBlobURL): Remove the check for null origin string since it is handled now. * fileapi/BlobURL.h: (BlobURL): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore): (WebCore::originMap): Thread-specific in-memory map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::registerBlobURL): Add the map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Remove the map for the unregistered blob URL. (WebCore::ThreadableBlobRegistry::cachedOrigin): Retrieve the origin associated with the blob URL. * fileapi/ThreadableBlobRegistry.h: (WebCore): (ThreadableBlobRegistry): * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * page/SecurityOrigin.cpp: (WebCore::cachedOrigin): Return the cached origin for the blob URL if it exists. (WebCore): (WebCore::SecurityOrigin::create): Call cachedOrigin to get the cached origin first. 2012-06-14 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [CMAKE] Move JSDeprecatedPeerConnectionCustom.cpp from CMakeLists.txt to UseJSC.cmake https://bugs.webkit.org/show_bug.cgi?id=89015 Reviewed by Antonio Gomes. Include JSDeprecatedPeerConnectionCustom.cpp in UseJSC.cmake instead of CMakeLists.txt. No change in functionality so no new tests. * CMakeLists.txt: * UseJSC.cmake: 2012-06-14 Xianzhu Wang <wangxianzhu@chromium.org> [Chromium] Add setAutoHint() and setUseBitmaps() in WebFontRendering https://bugs.webkit.org/show_bug.cgi?id=89014 Reviewed by James Robinson. No new tests because of no change of functionality. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore): (WebCore::FontPlatformData::setAutoHint): (WebCore::FontPlatformData::setUseBitmaps): (WebCore::FontPlatformData::setAntiAlias): (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-14 Ryuan Choi <ryuan.choi@samsung.com> [EFL] Move cursor related code from WidgetEfl to ewk_view and EflScreenUtilities. https://bugs.webkit.org/show_bug.cgi?id=88803 Reviewed by Chang Shu. Because WebProcess can not control cursor, setCursor should be passed to ChromeClient like other ports. * platform/Widget.h: (Widget): * platform/efl/EflScreenUtilities.cpp: (WebCore::applyFallbackCursor): Moved from WidgetEfl.cpp. (WebCore): (WebCore::isUsingEcoreX): Moved from WidgetEfl.cpp. * platform/efl/EflScreenUtilities.h: (WebCore): * platform/efl/WidgetEfl.cpp: Removes cursor related codes. (WebCore::WidgetPrivate::WidgetPrivate): (WebCore::Widget::~Widget): (WebCore::Widget::setCursor): Redirect to HostWindow. (WebCore::Widget::setEvasObject): 2012-06-14 Ryosuke Niwa <rniwa@webkit.org> Radio node lists do not get updated when inserted back into a document https://bugs.webkit.org/show_bug.cgi?id=88825 Reviewed by Darin Adler. The bug was caused by RadioNodeList's m_node not being adjusted back to a document after it was removed from the document and inserted back. While we could be doing this adjustment again when the HTMLFormElement is inserted back into the document, this whole approach is fragile because adds a maintenance burden on root elements of RadioNodeList. Change the approach to the problem instead and detect when m_node is detached from the document. Now RadioNodeList and LabelsNodeList will always use its root element as m_node and DynamicSubtreeNodeList's node() will then determine whether it should use its document or not based on the flag (rootedAtDocument) passed by the constructor of the node list and m_node->inDocument(). Also invalidate node lists rooted at the document level regardless where the DOM mutation took place. * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::~ClassNodeList): * dom/Document.cpp: (WebCore::Document::registerDynamicSubtreeNodeList): Moved from Node. (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto. * dom/Document.h: (Document): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Takes DynamicNodeListRootType which tell us whether node() should return m_node's document by default or not. (WebCore::DynamicSubtreeNodeList::length): Refactor code to avoid node() multiple times. (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): Ditto. (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): Ditto. (WebCore::DynamicNodeList::itemWithName): Ditto. * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::node): Returns m_node->document() if m_node is still in the document and the node list was rooted at document. (WebCore::DynamicNodeList::Caches::Caches): (Caches): (DynamicNodeList): (DynamicSubtreeNodeList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::~NameNodeList): * dom/Node.cpp: (WebCore): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Invalidate m_listsInvalidatedAtDocument at document instead of trying to invalidate it on every ancestor we traverse. (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto. (WebCore::NodeListsNodeData::invalidateCachesForDocument): Extracted from invalidateCachesThatDependOnAttributes. (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): (WebCore::Node::radioNodeList): * dom/Node.h: (Node): * dom/NodeRareData.h: (NodeListsNodeData): * dom/TagNodeList.cpp: (WebCore::TagNodeList::~TagNodeList): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::removedFrom): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): Takes Element* first since that's the order we use elsewhere. * html/RadioNodeList.h: (WebCore::RadioNodeList::create): (RadioNodeList): 2012-06-14 Tony Chang <tony@chromium.org> Fix bit packing of StyleRareInheritedData on Windows https://bugs.webkit.org/show_bug.cgi?id=89112 Reviewed by Ryosuke Niwa. On my machine (64 bit Chromium Linux), StyleRareInheritedData is 168 bytes. No new tests, added a compile assert to ensure correctness going forward. * rendering/style/StyleRareInheritedData.cpp: (SameSizeAsStyleRareInheritedData): (WebCore): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-06-14 Andreas Kling <kling@webkit.org> Crashes below IconDatabase::performPendingRetainAndReleaseOperations(). <http://webkit.org/b/88846> <rdar://problem/11629106> Reviewed by Brady Eidson. Put isolatedCopy() strings in the retain/release operation queues to make sure it's safe for secondary threads to ref/deref them in performPendingRetainAndReleaseOperations(). Also added assertions as appropriate. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::retainIconForPageURL): (WebCore::IconDatabase::releaseIconForPageURL): (WebCore::IconDatabase::performPendingRetainAndReleaseOperations): 2012-06-14 Shawn Singh <shawnsingh@chromium.org> [chromium] For hit testing in CCLayerTreeHostCommon, need to check that the transform is invertible before inverting it. https://bugs.webkit.org/show_bug.cgi?id=89049 Reviewed by Adrienne Walker. Unit test added to CCLayerTreeHostCommonTest.cpp: CCLayerTreeHostCommonTest.verifyHitTestingForUninvertibleTransform * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointHitsRect): 2012-06-14 Maciej Stachowiak <mjs@apple.com> The whole world rebuilds when you touch any IDL file https://bugs.webkit.org/show_bug.cgi?id=89125 Reviewed by Sam Weinig. No new tests; this only changes the build system and its dependencies. * bindings/scripts/preprocess-idls.pl: Optionally generate the dependencies for supplemental IDLs in Makefile format. * DerivedSources.make: Use the new feature of preprocess-idls.pl to generate the correct IDL dependencies created by Supplemental, then include it. This way, we avoid the situation where every bindings file implicitly depends on every single IDL file in the project. 2012-06-14 Ian Vollick <vollick@chromium.org> [chromium] Certain settings in CCSettings could be global https://bugs.webkit.org/show_bug.cgi?id=88384 Reviewed by James Robinson. No new tests. No new functionality. * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Added. (WebCore): (WebCore::CCSettings::perTilePaintingEnabled): (WebCore::CCSettings::setPerTilePaintingEnabled): (WebCore::CCSettings::partialSwapEnabled): (WebCore::CCSettings::setPartialSwapEnabled): (WebCore::CCSettings::acceleratedAnimationEnabled): (WebCore::CCSettings::setAcceleratedAnimationEnabled): (WebCore::CCSettings::reset): * platform/graphics/chromium/cc/CCSettings.h: Added. (WebCore): (CCSettings): * testing/InternalSettings.cpp: * testing/InternalSettings.h: (InternalSettings): 2012-06-14 Alejandro G. Castro <alex@igalia.com> [GTK] Add TextureMapper ImageBuffer support as a fallback from the hardware accelerated path https://bugs.webkit.org/show_bug.cgi?id=73634 Remove the TextureMapperCairo classes, now we use TextureMapperImageBuffer to implement the software fallback. Add implementation for the 3D transformations in the 2D cairo graphics context. Reviewed by Martin Robinson. This patch adds a new implementation of already tested cases. * GNUmakefile.list.am: * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: (WebCore): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Required for compilation when WebGL is enabled. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::get3DTransform): (WebCore::GraphicsContext::concat3DTransform): (WebCore::GraphicsContext::set3DTransform): * platform/graphics/cairo/TextureMapperCairo.cpp: Removed. * platform/graphics/cairo/TextureMapperCairo.h: Removed. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): 2012-06-14 Jia Pu <jpu@apple.com> Mark text with text alternative with blue underline. https://bugs.webkit.org/show_bug.cgi?id=83047 Reviewed by Enrica Casucci. Tests: platform/mac/editing/input/edit-dictated-text-with-alternative.html platform/mac/editing/input/insert-dictated-text.html This patch implements visual indication on dictated text with alternatives, and provides UI to show alternative text on OS X. Majority of the changes is for generalizing existing AlternativeTextController class to handle dictation alternatives. The two new classes, AlternativeTextUIController and TextAlternativeWithRange, are used by both WebKit and WK2. So WebCore seems to be the natural place for them. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/AlternativeTextController.cpp: Expanded exising class interface to support dictation alternatives. (DictationAlternativeDetails): Marker detail class for dictation alternative mark. (WebCore::DictationAlternativeDetails::create): (WebCore::DictationAlternativeDetails::dictationContext): (WebCore::DictationAlternativeDetails::DictationAlternativeDetails): (WebCore::markerTypesForAppliedDictationAlternative): (WebCore::AlternativeTextController::applyAlternativeTextToRange): Generalized existing applyAlternativeTextToRange() to handle dictation alternatives. (WebCore::AlternativeTextController::timerFired): Expanded existing code to handle dictation alternatives. (WebCore::AlternativeTextController::handleAlternativeTextUIResult): Expanded existing code to handle dictation alternatives. (WebCore::AlternativeTextController::respondToChangedSelection): Moved part of the function into respondToMarkerAtEndOfWord() to improve readability. (WebCore::AlternativeTextController::shouldStartTimerFor): (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText): (WebCore::AlternativeTextController::removeDictationAlternativesForMarker): (WebCore::AlternativeTextController::dictationAlternativesForMarker): (WebCore::AlternativeTextController::applyDictationAlternative): * editing/AlternativeTextController.h: * editing/Editor.cpp: (WebCore::Editor::notifyComponentsOnChangedSelection): Renamed existing respondToChangedSelection() function to avoid naming collision. (WebCore::Editor::appliedEditing): (WebCore::Editor::unappliedEditing): (WebCore::Editor::reappliedEditing): (WebCore::Editor::updateMarkersForWordsAffectedByEditing): (WebCore::Editor::changeSelectionAfterCommand): (WebCore::Editor::respondToChangedSelection): (WebCore::Editor::dictationAlternativesForMarker): (WebCore::Editor::applyDictationAlternativelternative): * editing/Editor.h: * editing/FrameSelection.h: * editing/mac/AlternativeTextUIController.h: Added. WK1 and WK2 use this class to keep track of text alternatives objects. (AlternativeTextUIController): (WebCore::AlternativeTextUIController::AlternativeTextUIController): (AlernativeTextContextController): (WebCore::AlternativeTextUIController::AlernativeTextContextController::AlernativeTextContextController): * editing/mac/AlternativeTextUIController.mm: Added. (WebCore::AlternativeTextUIController::AlernativeTextContextController::addAlternatives): (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext): (WebCore::AlternativeTextUIController::AlernativeTextContextController::removeAlternativesForContext): (WebCore::AlternativeTextUIController::AlernativeTextContextController::clear): (WebCore::AlternativeTextUIController::addAlternatives): (WebCore::AlternativeTextUIController::alternativesForContext): (WebCore::AlternativeTextUIController::clear): (WebCore::AlternativeTextUIController::showAlternatives): (WebCore::AlternativeTextUIController::handleAcceptedAlternative): (WebCore::AlternativeTextUIController::dismissAlternatives): (WebCore::AlternativeTextUIController::removeAlternatives): * editing/mac/TextAlternativeWithRange.h: Added. A simple struct to make it easier to pass around a pair of text alternatives object and range. * editing/mac/TextAlternativeWithRange.mm: Added. (WebCore::TextAlternativeWithRange::TextAlternativeWithRange): (WebCore::collectDictationTextAlternatives): * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: Added code to show alternative dictated text in context menu. (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded): * platform/ContextMenuItem.h: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::dictationAlternatives): * rendering/HitTestResult.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDocumentMarker): 2012-06-14 Emil A Eklund <eae@chromium.org> Change RenderTableSection::calcRowLogicalHeight to round rather than floor height https://bugs.webkit.org/show_bug.cgi?id=88813 Reviewed by Julien Chaffraix. Change RenderTableSection::calcRowLogicalHeight to round the logicalHeight instead of flooring it. This matches our rounding logic elsewhere and results in table rows better matching the expected height. Test: fast/sub-pixel/table-rows-have-stable-height.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): 2012-06-14 Andrey Adaikin <aandrey@chromium.org> Web Inspector: Remove devtoolsInjectedScript hidden property https://bugs.webkit.org/show_bug.cgi?id=89087 We use the devtoolsInjectedScript hidden property to reference a InjectedScript object for a given ScriptState, but we also have the same reference in the InjectedScriptManager's hash maps. Just use the hash maps and remove the hidden property from the global object. Reviewed by Pavel Feldman. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::visitChildren): * bindings/js/JSDOMGlobalObject.h: (JSDOMGlobalObject): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/custom/V8InjectedScriptManager.cpp: * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::discardInjectedScripts): (WebCore::InjectedScriptManager::discardInjectedScriptsFor): (WebCore::InjectedScriptManager::injectedScriptFor): (WebCore): (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation): * inspector/InjectedScriptManager.h: (InjectedScriptManager): 2012-06-14 James Robinson <jamesr@chromium.org> [chromium] Move opaque rectangle tracking logic out of compositor core https://bugs.webkit.org/show_bug.cgi?id=89031 Reviewed by Adrienne Walker. This moves the opaque paint tracking logic from the compositor (specifically CanvasLayerTextureUpdater) out to a dedicated class used by GraphicsLayerChromium for GraphicsContext-painted content. This changes the interface exposed by the compositor to pass a SkCanvas and let the user fill in an opaque rect if needed. Callers that are using GraphicsContext to paint can instantiate a PlatformContextSkia / GraphicsContext around this SkCanvas if they choose to, or use some other strategy, or not fill it in at all. This avoids creating extra wrapper classes if the eventual caller is going to use the underlying SkCanvas anyway (such as WebContentLayer) and breaks the dependency from the compositor code on GraphicsContext / PlatformContextSkia. OpaqueRectTrackingContentLayerDelegate is a helper class that wraps a ContentLayerDelegate implementation with PlatformContextSkia's opaque region tracking logic. * WebCore.gypi: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::BitmapCanvasLayerTextureUpdater): (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): (WebCore::BitmapCanvasLayerTextureUpdater::setOpaque): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: (WebCore): (CanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerDelegate): (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): (WebCore::GraphicsLayerChromium::paint): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/chromium/LayerPainterChromium.h: (LayerPainterChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::paintContents): * platform/graphics/chromium/LinkHighlight.h: (LinkHighlight): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: Added. (WebCore): (WebCore::OpaqueRectTrackingContentLayerDelegate::OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::~OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h: Added. (WebCore): (GraphicsContextPainter): (WebCore::GraphicsContextPainter::~GraphicsContextPainter): (OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::setOpaque): * platform/graphics/chromium/PlatformCanvas.cpp: (WebCore::PlatformCanvas::Painter::Painter): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): 2012-06-14 Justin Novosad <junov@chromium.org> [Chromium] webkitImageSmoothingEnabled canvas property does not work on redraw https://bugs.webkit.org/show_bug.cgi?id=89018 Reviewed by Stephen White. Test: fast/canvas/canvas-imageSmoothingEnabled-repaint.html When an accelerated canvas layer prepares its texture for the compositor, it must send a notification to skia to invalidate texture proprties that are cached by skia, since the compositor may modify them. The use case this fixes is when a canvas to canvas copy is performed with webkitImageSmoothingEnabled=false on the destination canvas. The backing texture of the source canvas will be set to "nearest" filtering by skia in order to perform the copy. Then, the compositor sets filtering back to "linear" when the source canvas is drawn. Skia is designed to only update GL attributes when required, so errors occur when the skia-side GL state cache is out of sync. * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::Canvas2DLayerBridge::prepareTexture): 2012-06-14 Jon Honeycutt <jhoneycutt@apple.com> Fix some failing tests on Windows by resetting the page scale factor between tests. https://bugs.webkit.org/show_bug.cgi?id=89078 Reviewed by Dirk Pranke. * testing/Internals.cpp: (WebCore::Internals::reset): Set the scale factor to 1.0. 2012-06-14 Sami Kyostila <skyostil@chromium.org> Register fixed position layers with ScrollingCoordinator https://bugs.webkit.org/show_bug.cgi?id=78864 Reviewed by James Robinson. This patch makes ScrollingCoordinator aware of page elements that are either fixed positioned directly or through their ancestors and that also have their own composited backing layers. This allows the ScrollingCoordinator implementation to potentially enable fast scrolling even if there are fixed elements on the page, because the compositor can automatically reposition the fixed element layers after scrolling. Since fixed position layers need to be explicitly supported by the ScrollingCoordinator implementation, we add a new supportsFixedPositionLayers() query for checking this. * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::useSlowRepaints): (WebCore::FrameView::addFixedObject): (WebCore::FrameView::removeFixedObject): * page/FrameView.h: (FrameView): (WebCore::FrameView::fixedObjects): (WebCore::FrameView::hasFixedObjects): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange): (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects): (WebCore): (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPosition): (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPosition): (WebCore): (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer): * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): (WebCore::RenderBox::styleWillChange): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): (WebCore): (WebCore::RenderLayerCompositor::fixedPositionedByAncestor): (WebCore::RenderLayerCompositor::ensureRootLayer): * rendering/RenderLayerCompositor.h: 2012-06-14 Alexey Proskuryakov <ap@apple.com> [CFNetwork] XMLHttpRequest incorrectly returns cached responses even when there is a Vary header field https://bugs.webkit.org/show_bug.cgi?id=88925 Reviewed by David Kilzer. Test: http/tests/cache/xhr-vary-header.html * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse): Don't cache the response at all if there is a Vary header field. CFNetwork won't look at it if we allowed the response cached. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::createNSURLConnection): [NSURLResponse copy] is mutable in practice, but we should be nice, and use -mutableCopy. (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Same fix as in CFNet code. 2012-06-13 Andrey Kosyakov <caseq@chromium.org> Web Inspector: use CSS gradients instead of images for timeline bars, checkboxes & bullets https://bugs.webkit.org/show_bug.cgi?id=89024 Reviewed by Pavel Feldman. This brings a bunch of UI changes to the way Timeline bars and related controls are rendered: - introduce new color palette for categories; - replace images used to render timeline bars, list bullets and categories checkboxes with CSS gradients; - "flatten" timeline bars - make square list bullets, sharpen corners for lower pane bars; - make links on the list sidebar grey - add more space between categories checkboxes, make labels lighter. * WebCore.gypi: Remove old images, add tickMark.png. * inspector/front-end/Images/timelineBarBlue.png: Removed. * inspector/front-end/Images/timelineBarDarkGreen.png: Removed. * inspector/front-end/Images/timelineBarGray.png: Removed. * inspector/front-end/Images/timelineBarGreen.png: Removed. * inspector/front-end/Images/timelineBarLightPurple.png: Removed. * inspector/front-end/Images/timelineBarOrange.png: Removed. * inspector/front-end/Images/timelineBarPurple.png: Removed. * inspector/front-end/Images/timelineBarRed.png: Removed. * inspector/front-end/Images/timelineBarYellow.png: Removed. * inspector/front-end/Images/timelineCheckmarks.png: Removed. * inspector/front-end/Images/timelineDots.png: Removed. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.wasShown): (WebInspector.TimelinePanel.prototype._closeRecordDetails): Fixed trailing spaces; (WebInspector.TimelinePanel.prototype._injectCategoryStyles): Inject generated styles for categories, if necessary. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.createFillStyle): (WebInspector.TimelinePresentationModel.createStyleRuleForCategory): * inspector/front-end/WebKit.qrc: Remove old images, add tickMark.png * inspector/front-end/inspector.css: (.sidebar-tree-section): * inspector/front-end/timelinePanel.css: (#timeline-container .webkit-html-resource-link): (.timeline-category-statusbar-item): (.timeline-category-statusbar-item .timeline-category-checkbox): (.timeline-category-statusbar-item .timeline-category-checkbox:checked::before): (.timeline-tree-item): (.timeline-tree-item .timeline-tree-icon): (.timeline-graph-bar): (.timeline-graph-bar.with-children): (.timeline-graph-bar.cpu): (.timeline-aggregated-category): * inspector/front-end/utilities.js: (Object.values): Return an array of object field's values. 2012-06-14 Silvia Pfeiffer <silviapf@chromium.org> Change mute button and volume slider behaviour for new Chromium video controls. https://bugs.webkit.org/show_bug.cgi?id=88743 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch makes the mute button and the volume slider interact with each other. When the user mutes the video through clicking the mute button, the volume slider animates to 0% volume. Upon unmute, the previous volume level is restored. Further, when the user drags the volume slider thumb or clicks on the slider and the video is muted, the video unmutes and sets the volume to the user's chosen level. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Add a member field to the volume slider to allow user interaction to unmute the video. (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Add the logic to unmute the video if the m_clearMutedOnUserInteraction member field is true. (WebCore::MediaControlVolumeSliderElement::setClearMutedOnUserInteraction): Add a member function to change the value of the m_clearMutedOnUserInteraction member field. * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderElement): Add the setClearMutedOnUserInteraction member function and the m_clearMutedOnUserInteraction member field. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::create): Activate unmute on user interaction on the Chromium video volume slider. (WebCore::MediaControlRootElementChromium::changedMute): Add logic to set volume slider to 0 when muted and reset to volume when unmuted. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaVolumeSlider): Add logic to paint the volume slider active area as 0 when muted. 2012-06-14 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Breakpoints should not be set when UISourceCode content is diverged from VM version of the script. https://bugs.webkit.org/show_bug.cgi?id=89109 Reviewed by Pavel Feldman. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.isDivergedFromVM): (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): 2012-06-14 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: DebuggerModel should support setting breakpoints without script by sourceURL only. https://bugs.webkit.org/show_bug.cgi?id=88988 Reviewed by Pavel Feldman. This change allows setting all saved breakpoints in debugger model by url before the site with corresponding scripts was loaded (allows breaking in onload handler on first load). This change also simplifies implementation of snippets debugging. * inspector/front-end/BreakpointManager.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): 2012-06-14 Pavel Feldman <pfeldman@chromium.org> Web Inspector: refactor settings screen to move user agent and experiments out of general tab. https://bugs.webkit.org/show_bug.cgi?id=89101 Reviewed by Vsevolod Vlasov. See image attached to the bug. * English.lproj/localizedStrings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype.selectTab): (WebInspector.SettingsScreen.prototype._tabSelected): (WebInspector.SettingsScreen.prototype.set wasShown): (WebInspector.SettingsScreen.prototype.willHide): (WebInspector.SettingsTab): (WebInspector.SettingsTab.prototype._appendSection): (WebInspector.SettingsTab.prototype._createCustomSetting): (WebInspector.GenericSettingsTab): (WebInspector.GenericSettingsTab.prototype._showPaintRectsChanged): (WebInspector.GenericSettingsTab.prototype.get _updateScriptDisabledCheckbox): (WebInspector.GenericSettingsTab.prototype._javaScriptDisabledChanged): (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.get const): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.textDoubleClicked): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.textChanged): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.set checkboxClicked): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): (WebInspector.ExperimentsSettingsTab): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentsWarningSubsection): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentCheckbox.listener): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentCheckbox): * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.get headerContentsElement): * inspector/front-end/helpScreen.css: (.settings-tab.help-container): (.settings-tab .help-block): (.help-content fieldset): (#settings-screen .tabbed-pane-header-tabs): (#settings-screen .tabbed-pane-header-tab): 2012-06-13 Mark Hahnenberg <mhahnenberg@apple.com> Worker tear-down can re-enter JSC during GC finalization pt. 2 https://bugs.webkit.org/show_bug.cgi?id=88601 Reviewed by David Levin. No new tests. Current regression tests are sufficient. * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We clear the m_workerObject here because we don't want anybody else trying to send messages to the Worker now that it has been destroyed. We also queue the asynchronous task for the various other cleanup that still needs to be done. This allows us to avoid the problem of re-entrant JS code execution during GC. (WebCore): (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Here we set m_mayBeDestroyed to true. This is the point after which deleting the WorkerMessagingProxy in workerContextDestroyedInternal() is okay. It could happen during this function call if the worker thread has been shutdown already, or it could be called later after we shut down the worker thread. (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): We check m_mayBeDestroyed here instead of checking m_workerObject. This change effectively orthogonalizes the roles that m_workerObject was filling. Since we were eagerly clearing m_workerObject, but we wanted to asynchronously call workerObjectDestroyed(), we needed to make sure we didn't accidentally try to delete the WorkerMessagingProxy twice (once from destroying the Worker and once from destroying the WorkerContext). This boolean field should fix that issue--we set it lazily like we wanted to do without being in danger of causing use-after-free issues with m_workerObject. * workers/WorkerMessagingProxy.h: Added the new field and function. (WorkerMessagingProxy): 2012-06-14 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Selector list start position is not extracted for style rules inside @media rules https://bugs.webkit.org/show_bug.cgi?id=89094 Reviewed by Pavel Feldman. Selector list start is now marked inside the "ruleset" rule rather than separately, before its invocation(s). * css/CSSGrammar.y: 2012-06-14 Eric Penner <epenner@google.com> [chromium] Fix race condition where animations start, finish and are deleted on the composite thread, all before the start even arrives on the main thread. https://bugs.webkit.org/show_bug.cgi?id=88439 Reviewed by James Robinson. Scheduling behavior covered by existing tests. * platform/graphics/chromium/cc/CCActiveAnimation.cpp: (WebCore::CCActiveAnimation::isFinishedAt): * platform/graphics/chromium/cc/CCActiveAnimation.h: (WebCore::CCActiveAnimation::isFinished): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::suspendAnimations): (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo): (WebCore::CCLayerAnimationController::animate): (WebCore::CCLayerAnimationController::hasActiveAnimation): (WebCore): (WebCore::CCLayerAnimationController::markAnimationsForDeletion): (WebCore::CCLayerAnimationController::purgeAnimationsMarkedForDeletion): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationController): 2012-06-14 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: ConsoleView.evaluateUsingTextPrompt should evaluate without command line API. https://bugs.webkit.org/show_bug.cgi?id=89096 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: 2012-06-14 Silvia Pfeiffer <silviapf@chromium.org> Update the time display of the new Chromium media controls. https://bugs.webkit.org/show_bug.cgi?id=88724 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch changes the format of the time digits that are displayed. They are different for media files of different duration. For non-autoplaying videos, the duration is shown before playback is started. * css/mediaControlsChromium.css: (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): Format the new duration display the same as the current time display. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Add a member field for the duration display. (WebCore::MediaControlRootElementChromium::create): Add an element for the duration display and initially hide the current time display. (WebCore::MediaControlRootElementChromium::setMediaController): Add the duration display to the controller. (WebCore::MediaControlRootElementChromium::reset): Add reset functionality for the duration display. (WebCore::MediaControlRootElementChromium::playbackStarted): Show the current time display and hide the duration display upon playback start. (WebCore::MediaControlRootElementChromium::updateTimeDisplay): Show the current time display and hide the duration display when current time is non-zero. * html/shadow/MediaControlRootElementChromium.h: (WebCore): Add the MediaControlTimeRemainingDisplayElement which provides use with the duration display. (MediaControlRootElementChromium): Add a duration member field, reusing the existing MediaControlTimeRemainingDisplayElement. * rendering/RenderMediaControlsChromium.cpp: (WebCore::formatChromiumMediaControlsTime): Formats a given time under the condition of a given duration. (WebCore::RenderMediaControlsChromium::formatMediaControlsTime): When formatting a single time, assume it to also provide the duration conditions. (WebCore::RenderMediaControlsChromium::formatMediaControlsCurrentTime): Format the current time given the duration. (WebCore::RenderMediaControlsChromium::formatMediaControlsRemainingTime): Format the remaining time from the current time given the duration. * rendering/RenderMediaControlsChromium.h: (RenderMediaControlsChromium): Declare the time formatting member functions. * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): Declare the time formatting member functions for Chromium on the Mac. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::formatMediaControlsTime): (WebCore::RenderThemeChromiumMac::formatMediaControlsCurrentTime): (WebCore::RenderThemeChromiumMac::formatMediaControlsRemainingTime): Call the time formatting member functions of RenderMediaControlsChromium on the Mac. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::formatMediaControlsTime): (WebCore::formatMediaControlsCurrentTime): (WebCore::formatMediaControlsRemainingTime): Call the time formatting member functions of RenderMediaControlsChromium on Skia. * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): Declare the time formatting member functions for Chromium Skia. 2012-06-14 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Refactor message loop instrumentation. https://bugs.webkit.org/show_bug.cgi?id=88978 Reviewed by Pavel Feldman. 1) Remove "messageLoop" term 2) Reuse WebThread::TaskObserver interface 3) Move implementation (from embedder) to platform code. * inspector/InspectorClient.h: (WebCore::InspectorClient::startMainThreadMonitoring): Renamed method. (WebCore::InspectorClient::stopMainThreadMonitoring): Ditto. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::stop): 2012-06-14 Dominik Röttsches <dominik.rottsches@intel.com> [svg] SVGResources applied to Text with Incorrect Transformations in non-CG Implementations https://bugs.webkit.org/show_bug.cgi?id=64966 Reviewed by Nikolas Zimmermann. SVGInlineTextBox::paintTextWithShadows for non-CG implementations resets the scale aspect of the currently applied CTM. This leads to patterns and gradients being incorrectly downscaled. This way of resetting the CTM and drawing fonts "natively" scaled was introduced in r77485 to fix a number of issues with SVG font scaling. Unfortunately, this breaks scaling of patterns and gradients. To fix it, we need to push the transformation back into the pattern/gradient space transformation. Tests: svg/transforms/transformed-text-fill-gradient.html svg/transforms/transformed-text-fill-pattern.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): Moving the scaling factor calculation out into SVGRenderingContext. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting): Reusing the scaling factor calculation from SVGRenderingContext. (WebCore): * rendering/svg/RenderSVGResourceContainer.h: (RenderSVGResourceContainer): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): If needed, push down transformation into gradient space. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): If needed, push transformation into pattern space. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor): Common scaling factor calculation for RenderSVGInlineText and RenderSVGResourceContainer. * rendering/svg/SVGRenderingContext.h: (SVGRenderingContext): 2012-06-14 Yoshifumi Inoue <yosin@chromium.org> [Form] Replace InputNumber type to Decimal type and drop InputNumber https://bugs.webkit.org/show_bug.cgi?id=88746 Reviewed by Kent Tamura. This patch removes InputNumber introduced by r119540 by replacing InputNumber type to Decimal type and changing convertDoubleToDecimal and convertDecimalToDouble to Decimal::fromDouble and Decimal::toDouble, respectively. No new tests. This patch doesn't change behavior. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): (WebCore::BaseDateAndTimeInputType::parseToNumber): (WebCore::BaseDateAndTimeInputType::serialize): (WebCore::BaseDateAndTimeInputType::serializeWithComponents): (WebCore::BaseDateAndTimeInputType::serializeWithMilliseconds): * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::defaultValueForStepUp): (WebCore::DateTimeInputType::createStepRange): * html/DateTimeInputType.h: (DateTimeInputType): * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::getAllowedValueStep): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::setValueAsDouble): (WebCore::InputType::setValueAsDecimal): (WebCore::InputType::rangeUnderflow): (WebCore::InputType::rangeOverflow): (WebCore::InputType::defaultValueForStepUp): (WebCore::InputType::minimum): (WebCore::InputType::maximum): (WebCore::InputType::isInRange): (WebCore::InputType::isOutOfRange): (WebCore::InputType::stepMismatch): (WebCore::InputType::validationMessage): (WebCore::InputType::parseToNumber): (WebCore::InputType::parseToNumberOrNaN): (WebCore::InputType::serialize): (WebCore::InputType::applyStep): (WebCore::InputType::getAllowedValueStep): (WebCore::InputType::stepUpFromRenderer): * html/InputType.h: (InputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::defaultValueForStepUp): (WebCore::MonthInputType::createStepRange): (WebCore::MonthInputType::parseToNumber): * html/MonthInputType.h: (MonthInputType): * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsDecimal): (WebCore::NumberInputType::createStepRange): (WebCore::NumberInputType::parseToNumber): (WebCore::NumberInputType::serialize): * html/NumberInputType.h: (NumberInputType): * html/RangeInputType.cpp: (WebCore::ensureMaximum): (WebCore::RangeInputType::setValueAsDecimal): (WebCore::RangeInputType::createStepRange): (WebCore::RangeInputType::handleKeydownEvent): (WebCore::RangeInputType::parseToNumber): (WebCore::RangeInputType::serialize): (WebCore::RangeInputType::sanitizeValue): * html/RangeInputType.h: (RangeInputType): * html/StepRange.cpp: (WebCore::StepRange::StepRange): (WebCore::StepRange::acceptableError): (WebCore::StepRange::alignValueForStep): (WebCore::StepRange::clampValue): (WebCore::StepRange::parseStep): (WebCore::StepRange::roundByStep): (WebCore::StepRange::stepMismatch): * html/StepRange.h: (WebCore::StepRange::StepDescription::defaultValue): (StepRange): (WebCore::StepRange::maximum): (WebCore::StepRange::minimum): (WebCore::StepRange::step): (WebCore::StepRange::stepBase): (WebCore::StepRange::defaultValue): (WebCore::StepRange::proportionFromValue): (WebCore::StepRange::valueFromProportion): * html/TimeInputType.cpp: (WebCore::TimeInputType::defaultValueForStepUp): (WebCore::TimeInputType::createStepRange): * html/TimeInputType.h: (TimeInputType): * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::writeDocument): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): (WebCore::RenderSliderThumb::layout): (WebCore::SliderThumbElement::setPositionFromPoint): 2012-06-14 Jan Keromnes <janx@linux.com> Web Inspector: Implement ExtensionPanel.show() method https://bugs.webkit.org/show_bug.cgi?id=88473 Implemented ExtensionPanel.show() API method to allow extension developers to show their panel when needed. Reviewed by Pavel Feldman. Tests for this method are in: LayoutTests/inspector/extensions/extensions-panel.html * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (injectedExtensionAPI.ExtensionPanelImpl.prototype.createStatusBarButton): (injectedExtensionAPI.ExtensionPanelImpl.prototype.show): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onShowPanel): 2012-06-14 Kent Tamura <tkent@chromium.org> Fix a typo in r120304. https://bugs.webkit.org/show_bug.cgi?id=89070 * bindings/scripts/CodeGeneratorV8.pm: (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: 2012-06-14 David Barr <davidbarr@chromium.org> Add dpcm to css3-images image-resolution https://bugs.webkit.org/show_bug.cgi?id=85442 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-resolution No new tests; extended fast/css/image-resolution/image-resolution.html * css/CSSGrammar.y: Add DPCM token and unary term. * css/CSSParser.cpp: Extend range of units accepted for resolution and tokenize "dpcm". (WebCore::CSSParser::validUnit): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::createPrimitiveNumericValue): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::unitFromString): Map "dpcm" to CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::parseValidPrimitive): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::detectNumberToken): Map "dpcm" to CSSPrimitiveValue::CSS_DPCM. * css/CSSPrimitiveValue.cpp: Add CSSPrimitiveValue::CSS_DPCM as a numeric unit. (WebCore::isValidCSSUnitTypeForDoubleConversion): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::unitCategory): Map CSSPrimitiveValue::CSS_DPCM to CSSPrimitiveValue::UResolution. (WebCore::conversionToCanonicalUnitsScaleFactor): Scale CSSPrimitiveValue::CSS_DPCM to CSSPrimitiveValue::CSS_DPPX. (WebCore::CSSPrimitiveValue::customCssText): Format CSSPrimitiveValue::CSS_DPCM as "<num>dpcm". (WebCore::CSSPrimitiveValue::cloneForCSSOM): Accept CSSPrimitiveValue::CSS_DPCM as numeric unit. * css/CSSPrimitiveValue.h: Add CSSPrimitiveValue::CSS_DPCM. 2012-06-14 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: REGRESSION HeapProfiler can't remove heap snapshot from the list if Dominators view has been opened. https://bugs.webkit.org/show_bug.cgi?id=89080 There was no dispose method on artificial ShowMoreDataGrid node. Reviewed by Pavel Feldman. * inspector/front-end/ShowMoreDataGridNode.js: (WebInspector.ShowMoreDataGridNode.prototype.nodeHeight): (WebInspector.ShowMoreDataGridNode.prototype.dispose): 2012-06-14 Kent Tamura <tkent@chromium.org> [JSC/V8] Improve DOMString[] support https://bugs.webkit.org/show_bug.cgi?id=89070 Reviewed by Kentaro Hara. Tests: new test case in TestObj.idl * bindings/js/JSDOMBinding.cpp: (WebCore::jsArray): Implement jsArray() for DOMStringList. * bindings/js/JSDOMBinding.h: Declare jsArray() for DOMStringList. * bindings/scripts/CodeGeneratorJS.pm: (NativeToJSValue): Avoid to include JSDOMString.h and DOMString.h. * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): Move a check for DOMString[] because it's a RefPtr type and we'd like to avoid to generate RefPtr<DOMString[]> (%non_wrapper_types): DOMString[] is not a wrapper type. This is needed to avoid to generate unnecessary custom function template. (NativeToJSValue): Avoid to include V8DOMString.h and DOMString.h. * bindings/scripts/test/TestObj.idl: Add non-overload function using DOMString[]. * bindings/scripts/test/JS/JSTestObj.cpp: Update expectation. * bindings/scripts/test/JS/JSTestObj.h: ditto. * bindings/scripts/test/V8/V8TestObj.cpp: ditto. 2012-06-14 Matt Falkenhagen <falken@chromium.org> LocaleToScriptMappingDefault.cpp should also do what scriptCodeForFontSelection does in LocaleToScriptMappingICU.cpp https://bugs.webkit.org/show_bug.cgi?id=88845 Reviewed by Kent Tamura. Test: fast/text/international/jpan-script-equivalence.html * platform/text/LocaleToScriptMappingDefault.cpp: (WebCore::scriptNameToCode): 2012-06-14 Pavel Feldman <pfeldman@chromium.org> Web Inspector: render dock-to-right icon in status bar. https://bugs.webkit.org/show_bug.cgi?id=89040 Reviewed by Vsevolod Vlasov. Today we render dock to bottom icon for both actions (dock to bottom and dock to right). * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/inspector.css: (button.dock-status-bar-item.status-bar-item.toggled-undock .glyph): (button.dock-status-bar-item.status-bar-item.toggled-bottom .glyph): (button.dock-status-bar-item.status-bar-item.toggled-right .glyph): * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._installDockToRight.listener): (windowLoaded): (WebInspector.setDockingUnavailable): 2012-06-14 Pavel Feldman <pfeldman@chromium.org> Web Inspector: clear execution live before the text edit. https://bugs.webkit.org/show_bug.cgi?id=89016 Reviewed by Vsevolod Vlasov. Otherwise we can't remove them after committing the edit. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine): 2012-06-14 Min Qin <qinmin@google.com> Remove the const keyword from MediaPlayerPrivate::enterFullscreen() https://bugs.webkit.org/show_bug.cgi?id=89044 Reviewed by Adam Barth. enterFullscreen() and exitFullscreen() could both modify the player state. This change reverts the change we made in r120213. Just function declaration change, no test needed. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::enterFullscreen): 2012-06-14 Edaena Salinas Jasso <edaena@apple.com> el.getAttribute('type') returns 'null' when setting el.type to null https://bugs.webkit.org/show_bug.cgi?id=89030 Reviewed by Alexey Proskuryakov. Test: fast/dom/HTMLButtonElement/change-type.html * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::setType): Changed parameter to be AtomicString to address an unrelated review comment from bug 14439 for slightly better performance. * html/HTMLButtonElement.h: (HTMLButtonElement): Changed parameter to be AtomicString to address an unrelated review comment from bug 14439 for slightly better performance. * html/HTMLButtonElement.idl: Specified TreatNullAs NullString for the type attribute. 2012-06-14 Alec Flett <alecflett@chromium.org> IndexedDB: Creating a transaction from within a transaction callback should fail https://bugs.webkit.org/show_bug.cgi?id=80547 Reviewed by Tony Chang. Prevent creation of a transaction, via IDBDatabase.transaction() or IDBDatabase.setVersion(), from inside a setVersion() transaction, as per spec. Update many tests to deal with this. Test restructuring uncovered some inconsistencies in transaction mode handling. So also do some minor cleanup in the way the transaction mode is passed between the frontend and backend transaction objects, and add additional asserts. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::update): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::setVersion): (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::create): (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): 2012-06-14 Li Yin <li.yin@intel.com> [WebSocket] WebSocket object in Worker Context should fire error event when it fails connection. https://bugs.webkit.org/show_bug.cgi?id=88744 Reviewed by Kent Tamura. Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol The behavior of firing error event in Document has been implemented in Committed r117944. WebSocket in WorkerContext is also required to fire error event. Test: http/tests/websocket/tests/hybi/workers/close.html * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: (ThreadableWebSocketChannelClientWrapper): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidReceiveMessageError): (WebCore): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (Peer): 2012-06-13 Kinuko Yasuda <kinuko@chromium.org> Unreviewed build fix attempt for r120285 * Modules/filesystem/DOMFileSystemBase.cpp: (WebCore): 2012-06-13 MORITA Hajime <morrita@google.com> Unreviewed expectation update. * bindings/scripts/test/V8/V8Float64Array.cpp: * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: * bindings/scripts/test/V8/V8TestEventConstructor.cpp: * bindings/scripts/test/V8/V8TestEventTarget.cpp: * bindings/scripts/test/V8/V8TestException.cpp: * bindings/scripts/test/V8/V8TestInterface.cpp: * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: * bindings/scripts/test/V8/V8TestNode.cpp: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 2012-06-13 Kinuko Yasuda <kinuko@chromium.org> Move isolated file system code out of chromium-specific directory https://bugs.webkit.org/show_bug.cgi?id=88997 Reviewed by Adam Barth. The code does not need to be chromium-specific. Any platforms that have file system implementation and manage mappings from file system id to a set of files should share the code. No new tests as this has no functional/behavioral changes. * Modules/filesystem/DOMFileSystem.cpp: (WebCore::DOMFileSystem::createIsolatedFileSystem): (WebCore): * Modules/filesystem/DOMFileSystem.h: (DOMFileSystem): * Modules/filesystem/DOMFileSystemBase.h: (DOMFileSystemBase): * Modules/filesystem/FileSystemType.h: * Modules/filesystem/chromium/DOMFileSystemChromium.cpp: * Modules/filesystem/chromium/DOMFileSystemChromium.h: Removed. * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: (WebCore::DraggedIsolatedFileSystem::getDOMFileSystem): * WebCore.gypi: 2012-06-07 Kinuko Yasuda <kinuko@chromium.org> File::lastModifiedDate should use NaN or separate boolean flag for null Date value https://bugs.webkit.org/show_bug.cgi?id=87826 Reviewed by Kent Tamura. Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::captureSnapshot): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): Removed. * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/FileStream.cpp: (WebCore::FileStream::getSize): * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.h: (WebCore::BlobDataItem::doNotCheckFileChange): Removed. * platform/network/BlobData.cpp: * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::blobIsOutOfDate): 2012-06-13 Eli Fidler <efidler@rim.com> Fix CMake build with SMOOTH_SCROLLING enabled https://bugs.webkit.org/show_bug.cgi?id=89032 Reviewed by Antonio Gomes. SMOOTH_SCROLLING pulls in ScrollAnimatorNone.cpp, which has dependencies on platform/ActivePlatformGestureAnimation.cpp and platform/TouchpadFlingPlatformGestureCurve.cpp * CMakeLists.txt: 2012-06-13 Mihai Balan <mibalan@adobe.com> Touched CSSPropertyNames.in to trigger a proper rebuild [CSS Regions] Adding feature defines for CSS Regions & exclusions for Windows https://bugs.webkit.org/show_bug.cgi?id=88645 Reviewed by Sam Weinig. Previous work on #87442 added feature defines to allow proper disabling of CSS Regions and exclusions (previously even with the feature disabled, parsing still worked). However, the feature defines were enabled on Mac only - they were broken on Windows. This patch adds the feature defines to (re)enable regions and exclusions on Windows. * css/CSSPropertyNames.in: Touched to trigger a proper rebuild. Incremental builds were broken on Windows. 2012-06-13 Arnaud Renevier <arno@renevier.net> make sure headers are included only once per file https://bugs.webkit.org/show_bug.cgi?id=88931 Reviewed by Darin Adler. * Modules/indexeddb/IDBDatabase.cpp: * WebCorePrefix.h: * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/v8/V8Utilities.cpp: * bindings/v8/custom/V8LocationCustom.cpp: * bridge/NP_jsobject.cpp: * editing/Editor.cpp: * html/HTMLMediaElement.cpp: * platform/graphics/cairo/PlatformContextCairo.cpp: * rendering/InlineFlowBox.cpp: 2012-06-13 MORITA Hajime <morrita@google.com> Unreviewed typo fix. * platform/RefCountedSupplement.h: 2012-06-13 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120268. http://trac.webkit.org/changeset/120268 https://bugs.webkit.org/show_bug.cgi?id=89060 WebCompositor::setPerTilePaintingEnabled hits an assertion in DEBUG (Requested by dominicc|work on #webkit). * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPerTileDrawingEnabled): (WebCore::Settings::perTileDrawingEnabled): (Settings): (WebCore::Settings::setPartialSwapEnabled): (WebCore::Settings::partialSwapEnabled): (WebCore::Settings::setThreadedAnimationEnabled): (WebCore::Settings::threadedAnimationEnabled): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Removed. * platform/graphics/chromium/cc/CCSettings.h: Removed. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setPerTileDrawingEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): 2012-06-13 Ian Vollick <vollick@chromium.org> [chromium] Certain settings in CCSettings could be global https://bugs.webkit.org/show_bug.cgi?id=88384 Reviewed by James Robinson. No new tests. No new functionality. * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Added. (WebCore): (WebCore::CCSettings::perTilePaintingEnabled): (WebCore::CCSettings::setPerTilePaintingEnabled): (WebCore::CCSettings::partialSwapEnabled): (WebCore::CCSettings::setPartialSwapEnabled): (WebCore::CCSettings::acceleratedAnimationEnabled): (WebCore::CCSettings::setAcceleratedAnimationEnabled): (WebCore::CCSettings::reset): * platform/graphics/chromium/cc/CCSettings.h: Added. (WebCore): (CCSettings): * testing/InternalSettings.cpp: * testing/InternalSettings.h: (InternalSettings): 2012-06-13 Crystal Zhang <haizhang@rim.com> [BlackBerry] Apply New Style and JS for Select Popup https://bugs.webkit.org/show_bug.cgi?id=89020 Reviewed by Rob Buis. PR 162854 Use new python script for data generating, as the old one is too simple and problematic. * PlatformBlackBerry.cmake: 2012-06-13 Dana Jansens <danakj@chromium.org> [chromium] Assert if iterating an invalid RenderSurfaceLayerList, where a layer in the list has no RenderSurface https://bugs.webkit.org/show_bug.cgi?id=89004 Reviewed by Adrienne Walker. A RenderSurfaceLayerList expects that all layers in the list own a RenderSurface. If an invalid RSLL is iterated over, the CCLayerIterator class will now ASSERT in debug mode, as well as considering the list empty in release mode. We will be adding code to CCLayerTreeHostImpl to save a RSLL across frames, so adding a clearRenderSurfaces() method with a FIXME comment to make it clear that we should clear the RSLL when we remove RenderSurfaces from the layers in the saved RSLL. * platform/graphics/chromium/cc/CCLayerIterator.h: (WebCore::CCLayerIterator::CCLayerIterator): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::clearRenderSurfacesOnCCLayerImplRecursive): (WebCore::CCLayerTreeHostImpl::clearRenderSurfaces): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-06-13 Yael Aharon <yael.aharon@nokia.com> Remove redundant code from RenderView and RenderBlock https://bugs.webkit.org/show_bug.cgi?id=89019 Reviewed by Abhishek Arya. As pointed out in https://bugs.webkit.org/show_bug.cgi?id=83981#c7 , RenderView::insertFixedPositionedObject() is redundant and should be removed. No new tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertPositionedObject): (WebCore::RenderBlock::removePositionedObject): * rendering/RenderView.cpp: (WebCore): * rendering/RenderView.h: (RenderView): 2012-06-13 Dana Jansens <danakj@chromium.org> [chromium] Create a CCStreamVideoDrawQuad used for StreamTexture video output https://bugs.webkit.org/show_bug.cgi?id=88826 Reviewed by Adrienne Walker. Remove the matrix from the CCVideoDrawQuad, and create a new quad specifically for StreamTexture video decoder output. This quad contains only the fields needed for display - textureId and the matrix to be applied to texture coords. Removes the (0, 0, 1, 1) "transform" from the shader used for these quads, as it was a no-op. No new tests, no change in behaviour. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawVideoQuad): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderVideoTransform::VertexShaderVideoTransform): (WebCore::VertexShaderVideoTransform::init): (WebCore::VertexShaderVideoTransform::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (VertexShaderVideoTransform): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toStreamVideoDrawQuad): (WebCore): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): (CCDrawQuad): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Added. (WebCore): (WebCore::CCStreamVideoDrawQuad::create): (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: Added. (WebCore): (CCStreamVideoDrawQuad): (WebCore::CCStreamVideoDrawQuad::textureId): (WebCore::CCStreamVideoDrawQuad::matrix): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-13 Martin Robinson <mrobinson@igalia.com> [GTK] Add an accelerated compositing implementation for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=86037 Reviewed by Alejandro G. Castro. No new tests. These changes are covered by the compositing tests, which we will gradually try to turn on for the bots. Add a new GLContext method for getting to current default framebuffer size, which is quite useful for preventing composited content quivering while resizing. * platform/graphics/cairo/GLContext.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore::GLContextGLX::defaultFrameBufferSize): Added this implementation for X11 which asks the X server for the window size. * platform/graphics/glx/GLContextGLX.h: 2012-06-13 Shawn Singh <shawnsingh@chromium.org> [chromium] Implement hit-testing for impl-side input handling in accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=88972 Reviewed by Adrienne Walker. The original hit testing code by Sami Kyostila. This patch implements a simple impl-side hit-testing helper function. At this time, the main motivation for this is so that composited scrollable layers can be scrolled by the impl thread -- and a prerequisite for that is the ability to hit-test on the impl thread, to determine where the scrolling action should be applied. To implement the actual hit test, it's possible to compute the hit test in two equivalent ways: (a) inverse-project the point into local space, or (b) forward-transform the rect to screen space It's not obvious which one would perform better, or which one would be more robust to w < 0 homogeneous clipping issues. For this patch, we simply opt for the inverse-projection approach. 10 unit tests added to CCLayerTreeHostCommonTest.cpp: CCLayerTreeHostCommonTest.verifyHitTestingForEmptyLayerList CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayer CCLayerTreeHostCommonTest.verifyHitTestingForSinglePositionedLayer CCLayerTreeHostCommonTest.verifyHitTestingForSingleRotatedLayer CCLayerTreeHostCommonTest.verifyHitTestingForSinglePerspectiveLayer CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayerWithScaledContents CCLayerTreeHostCommonTest.verifyHitTestingForSimpleClippedLayer CCLayerTreeHostCommonTest.verifyHitTestingForMultiClippedRotatedLayer CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayers CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayerLists * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointHitsRect): (WebCore): (WebCore::pointIsClippedBySurfaceOrClipRect): (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::projectHomogeneousPoint): (WebCore::mapHomogeneousPoint): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapClippedQuad): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectPoint): (WebCore): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore): (CCMathUtil): 2012-06-13 Charles Wei <charles.wei@torchmobile.com.cn> Need customized toDOMStringList for IndexedDB JSC binding. https://bugs.webkit.org/show_bug.cgi?id=87965 Reviewed by Kentaro Hara. IndexedDB database interface uses DOMStringList as the input parameter. The generated toDOMStringList() can't convert an JSArray of Strings to native DOMStringList. We need a custom function to do this. Because this patch adds one new file (JSDOMStringList.cpp), all build systems are updated accordingly to pick up this file. Tests: Corresponding bindings/scripts/test/JS files have been updated accordingly. * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDOMStringListCustom.cpp: Added. (WebCore): (WebCore::toDOMStringList): * bindings/scripts/CodeGeneratorJS.pm: (IndexGetterReturnsStrings): (GenerateHeader): (GetNativeType): (GetNativeTypeForCallbacks): (JSValueToNative): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithStringList): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): * dom/DOMStringList.idl: 2012-06-13 Jeffrey Pfau <jpfau@apple.com> Padding and borders can cause integer overflow in block layouts https://bugs.webkit.org/show_bug.cgi?id=88820 <rdar://problem/11328762> Reviewed by Tony Chang. Tests: fast/block/block-size-integer-overflow.html fast/flexbox/box-size-integer-overflow.html fast/table/table-size-integer-overflow.html * rendering/AutoTableLayout.cpp: Decreased max int. (WebCore::AutoTableLayout::computePreferredLogicalWidths): * rendering/FixedTableLayout.cpp: Use shared constant. (WebCore::FixedTableLayout::computePreferredLogicalWidths): * rendering/RenderBlock.cpp: Removed unused constant. * rendering/TableLayout.h: Add shared constant. (TableLayout): 2012-06-13 Gregg Tavares <gman@google.com> Refactor WebGLFramebuffer to handle texture attachments https://bugs.webkit.org/show_bug.cgi?id=88697 Reviewed by Adrienne Walker. In order to add support for depth textures WebGLFramebuffer needed to be refactored to handle textures as attachments. No new tests as no new functionality. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::WebGLAttachment::WebGLAttachment): (WebCore): (WebCore::WebGLFramebuffer::WebGLAttachment::~WebGLAttachment): (WebCore::WebGLFramebuffer::WebGLFramebuffer): (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::attach): (WebCore::WebGLFramebuffer::getAttachmentObject): (WebCore::WebGLFramebuffer::getAttachment): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::getColorBufferWidth): (WebCore::WebGLFramebuffer::getColorBufferHeight): (WebCore::WebGLFramebuffer::getColorBufferFormat): (WebCore::WebGLFramebuffer::checkStatus): (WebCore::WebGLFramebuffer::onAccess): (WebCore::WebGLFramebuffer::hasStencilBuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::initializeAttachments): * html/canvas/WebGLFramebuffer.h: (WebGLAttachment): (WebGLFramebuffer): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::framebufferRenderbuffer): (WebCore::WebGLRenderingContext::reattachDepthStencilAttachments): (WebCore::WebGLRenderingContext::framebufferTexture2D): (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-06-13 Konrad Piascik <kpiascik@rim.com> Remove return statement in void method https://bugs.webkit.org/show_bug.cgi?id=88998 Reviewed by Andreas Kling * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::collectStyleForAttribute): 2012-06-13 Benjamin Poulain <benjamin@webkit.org> Implement the simple constructors WTFURL's KURL https://bugs.webkit.org/show_bug.cgi?id=85724 Reviewed by Adam Barth. This patch implement the correct initialization of KURL from an absolute URL. The URL correctness is also relaxed in order to have KURLWTFURL works similarily to KURL. * platform/KURLWTFURL.cpp: (WebCore::KURL::KURL): (WebCore::KURL::isValid): (WebCore::KURL::string): (WebCore::KURL::protocol): (WebCore::KURL::host): (WebCore::KURL::port): Fix a bug where invalidPortNumber was returned if no port was defined. (WebCore::KURL::hasFragmentIdentifier): (WebCore::KURL::fragmentIdentifier): (WebCore::KURL::protocolIs): (WebCore::KURL::removeFragmentIdentifier): (WebCore): (WebCore::KURL::print): * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): (WebCore::KURL::createCFURL): (WebCore): * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): (WebCore::KURL::createCFURL): (WebCore): Use the code of KURL to make the conversion from WTFURL to NSURL. 2012-06-12 Vincent Scheib <scheib@chromium.org> Remove duplicate webkitpointerlockchange events when unlocking. https://bugs.webkit.org/show_bug.cgi?id=88917 Reviewed by Dimitri Glazkov. Subsequent patches adding the new API for entering and exiting pointer lock would be burdened by handling multiple change events when the lock target is changed. This change introduces temporary code to suppress duplicate change events. Existing tests simplified by removing the duplicate change events. * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::didLosePointerLock): * page/PointerLockController.h: (PointerLockController): 2012-06-13 Silvia Pfeiffer <silviapf@chromium.org> Update range sliders rendering for volume and playback position of new Chrome video controls. https://bugs.webkit.org/show_bug.cgi?id=88623 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch contains updates to the rendering of the range sliders for the playback position and the volume. This includes the creation of a shadowPseudoId to be able to style the range sliders via CSS, the rendering of the slider background and the highlighted ranges. * css/mediaControlsChromium.css: (input[type="range"]::-webkit-media-slider-container): Adjust the styling of the slider container backgrounds. (input[type="range"]::-webkit-media-slider-thumb): Adjust the styling of the slider thumbs. * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbShadowPseudoId): Add an accessor function for the slider thumb shadowPseudoId. (WebCore::mediaSliderThumbShadowPseudoId): Add an accessor function for the media slider thumb shadowPseudoId. (WebCore::SliderThumbElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider thumbs. (WebCore::TrackLimiterElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider thumbs. (WebCore::SliderContainerElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider background container. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintRoundedSliderBackground): Add function to draw rounded background of sliders in a dark color. (WebCore::paintSliderRangeHighlight): Add function to draw a highlighted grey region on the sliders, which is rounded only at its ends. (WebCore::paintMediaSlider): Update the background and buffered range renderings on the playback position slider by making use of the new helper functions. (WebCore::paintMediaVolumeSlider): Update the background and buffered range renderings on the volume slider by making use of the new helper functions. 2012-06-13 Christopher Hutten-Czapski <chutten@rim.com> 2012-06-13 Christopher Hutten-Czapski <chutten@rim.com> [BlackBerry] Update Select Popup's styling https://bugs.webkit.org/show_bug.cgi?id=89005 Reviewed by Rob Buis. Add in some nicely-styled CSS and JS for the BlackBerry port's <select> * Resources/blackberry/popupControlBlackBerry.css: (body): (.popup-area): (.popup-area>:first-child): (.popup-buttons): (.popup-button-divider): (.popup-button): (.popup-button:active): (.popup-button:first-child:active): (.popup-button:last-child:active): (.popup-button:only-child:active): * Resources/blackberry/selectControlBlackBerry.css: Added. (.select-area): (.select-area:last-child): (.option): (.optgroup:last-child): (.selected): (.optgroup): (.optgroup .option): * Resources/blackberry/selectControlBlackBerry.js: Added. 2012-06-13 Alec Flett <alecflett@chromium.org> [V8] IndexedDB: Cursor value modifications should be preserved until cursor iterates https://bugs.webkit.org/show_bug.cgi?id=83526 Reviewed by Kentaro Hara. Cache the 'value' attribute of IDBCursorWithValue with policy determined by IDBCursor.cpp, to follow spec behavior of keeping a consistent script object until the cursor advances. See http://www.w3.org/TR/IndexedDB/#widl-IDBCursorWithValueSync-value for details. Test: storage/indexeddb/cursor-value.html * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::IDBCursor): (WebCore::IDBCursor::value): (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBCursor.h: (IDBCursor): (WebCore::IDBCursor::valueIsDirty): * Modules/indexeddb/IDBCursorWithValue.idl: * WebCore.gypi: * bindings/v8/IDBCustomBindings.cpp: Added. (WebCore): (WebCore::V8IDBCursorWithValue::valueAccessorGetter): 2012-06-13 Silvia Pfeiffer <silviapf@chromium.org> Code cleanup from bug 88881 to share the SliderVerticalPart code. https://bugs.webkit.org/show_bug.cgi?id=88930 Reviewed by Eric Carlson. No new tests - this is just code cleanup. * html/shadow/SliderThumbElement.cpp: (WebCore::hasVerticalAppearance): Avoid having two ifdef-ed returns in the code depending on ENABLE(VIDEO). 2012-06-13 Mark Mentovai <mark@chromium.org> [chromium mac] Don't include things in subframeworks of ApplicationServices.framework. A CoreText #include (with quotes instead of brackets, even) sprung up in r120506, bug 69826. https://bugs.webkit.org/show_bug.cgi?id=88569 Reviewed by Stephen White. No new tests. * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: 2012-06-13 Eriq Augustine <eaugusti@chromium.org> Removing an extra HandleScope in V8Proxy::evaluateInIsolatedWorld https://bugs.webkit.org/show_bug.cgi?id=88451 Reviewed by Adam Barth. Any values retuned by the evaluation will get destroyed with the extra HandleScope. I was unable to cause a test failure, however this feature is tested by: platform/chromium/http/tests/misc/execute-and-return-value.html * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): 2012-06-13 Zan Dobersek <zandobersek@gmail.com> [Gtk] Enable link prefetch support in the developer builds https://bugs.webkit.org/show_bug.cgi?id=89011 Reviewed by Martin Robinson. Handle the ENABLE_LINK_PREFETCH conditional in standard way. No new tests - covered by existing link prefetch tests. * GNUmakefile.am: 2012-06-13 Amy Ousterhout <aousterh@chromium.org> Rename currentDeviceMotion to lastMotion in DeviceMotionClient https://bugs.webkit.org/show_bug.cgi?id=88854 Reviewed by Adam Barth. Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient. This makes it consistent with the similar function lastOrientation in DeviceOrientationClient. Just a rename, so does not require any new tests. * dom/DeviceMotionClient.h: (DeviceMotionClient): * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::timerFired): (WebCore::DeviceMotionController::addListener): * loader/EmptyClients.h: (WebCore::EmptyDeviceMotionClient::lastMotion): * platform/qt/DeviceMotionClientQt.cpp: (WebCore::DeviceMotionClientQt::lastMotion): * platform/qt/DeviceMotionClientQt.h: (DeviceMotionClientQt): * platform/qt/DeviceMotionProviderQt.h: (WebCore::DeviceMotionProviderQt::lastMotion): 2012-06-13 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Breakpoint's _uiLocationRemoved() method is never called. https://bugs.webkit.org/show_bug.cgi?id=89003 Reviewed by Pavel Feldman. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode): (WebInspector.BreakpointManager.Breakpoint): (WebInspector.BreakpointManager.Breakpoint.prototype._locationUpdated): (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations): (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation): * inspector/front-end/FileSystemModel.js: Drive by compilation fix. (WebInspector.FileSystemModel): 2012-06-13 David Grogan <dgrogan@chromium.org> IndexedDB: Add tests, an assert, and some comments around open/close/setVersion call sequencing https://bugs.webkit.org/show_bug.cgi?id=88829 Reviewed by Tony Chang. Test: storage/indexeddb/three-setversion-calls.html * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::processPendingCalls): 2012-06-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Errors when pending console messages are attached to JavaScriptSourceFrame. https://bugs.webkit.org/show_bug.cgi?id=88712 Reviewed by Pavel Feldman. * inspector/front-end/PresentationConsoleMessageHelper.js: (WebInspector.PresentationConsoleMessageHelper): (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage): (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource): 2012-06-13 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Support user attributes in DOMNode https://bugs.webkit.org/show_bug.cgi?id=88706 Reviewed by Pavel Feldman. This change allows clients to store arbitrary properties on DOMNodes and know if there are descendants (and how many of them) having a certain property set. Test: inspector/elements/user-attributes.html * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._removeChild): (WebInspector.DOMNode.prototype._updateChildUserPropertyCountsOnRemoval): (WebInspector.DOMNode.prototype._updateDescendantUserPropertyCount): (WebInspector.DOMNode.prototype.setUserProperty): (WebInspector.DOMNode.prototype.removeUserProperty): (WebInspector.DOMNode.prototype.getUserProperty): (WebInspector.DOMNode.prototype.descendantUserPropertyCount): 2012-06-13 Vineet Chaudhary <vineet.chaudhary@motorola.com> REGRESSION:Bindings sequence<T> in Console.idl, Internals.idl and ScriptProfileNode.idl should be T[] https://bugs.webkit.org/show_bug.cgi?id=84863 Reviewed by Kentaro Hara. With reference to http://www.w3.org/TR/WebIDL/#idl-sequence "Sequences must not be used as the type of an attribute, constant or exception field." So we should use T[] instead of sequence<T>. Tests: bindings/scripts/test/TestObj.idl fast/harness/user-preferred-language.html inspector/profiler/cpu-profiler-profiling-without-inspector.html media/track/track-language-preference.html * bindings/scripts/CodeGenerator.pm: (GetSequenceType): Getter for getting sequence type. (GetArrayType): Getter for getting array type. (AssertNotSequenceType): Check sequences must not be used as the type of an attribute, constant or exception field. * bindings/scripts/CodeGeneratorCPP.pm: (SkipFunction): Exclude bindings code for type sequence. (SkipAttribute): Check for sequences must not be used as the type of an attribute, constant or exception field. (AddIncludesForType): Exclude header inclusion code for type array/sequence. * bindings/scripts/CodeGeneratorGObject.pm: (SkipAttribute): Check for sequences must not be used as the type of an attribute, constant or exception field. (SkipFunction): Exclude bindings code for type sequence. * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): Exclude header inclusion code for type array/sequence. (GenerateImplementation): Check for sequences must not be used as the type of an attribute, constant or exception field. (GetNativeType): (JSValueToNative): (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (SkipFunction): Exclude bindings code for type sequence. (SkipAttribute): Exclude bindings code for type array. (AddForwardDeclarationsForType): (AddIncludesForType): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GetNativeType): (JSValueToNative): (CreateCustomSignature): (NativeToJSValue): * bindings/scripts/test/JS/JSTestObj.cpp: Updated code from run-bindings-tests. (WebCore): (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): * bindings/scripts/test/JS/JSTestObj.h: Updated code from run-bindings-tests. (WebCore): * bindings/scripts/test/TestObj.idl: Tests. * bindings/scripts/test/V8/V8TestObj.cpp: Updated code from run-bindings-tests. (TestObjV8Internal): (WebCore::TestObjV8Internal::methodWithSequenceArgCallback): (WebCore): * inspector/ScriptProfileNode.idl: Using sequence<T> for children(). * page/Console.idl: Using Array[T] for profiles attribute. * testing/Internals.idl: Using sequence<T> for userPreferredLanguages(). 2012-06-13 Simon Hausmann <simon.hausmann@nokia.com> [Qt] Remove dependency to QtScript for the Qt 5 build https://bugs.webkit.org/show_bug.cgi?id=88993 Reviewed by Kenneth Rohde Christiansen. Replace the use of QScriptEngine::ValueOwnership with an enum local to the class where it is used (QtInstance). * Target.pri: * bindings/js/ScriptControllerQt.cpp: (WebCore::ScriptController::createScriptInstanceForWidget): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::QtInstance): (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getQtInstance): * bridge/qt/qt_instance.h: (QtInstance): (JSC::Bindings::QtInstance::create): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::convertQVariantToValue): 2012-06-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> [Qt] Save a JSGlobalContextRef instead of a JSContextRef in QtConnectionObject https://bugs.webkit.org/show_bug.cgi?id=88905 Make QtConnectionObject use JSContextGetGlobalContext and store the JSGlobalContextRef. Previous code was working but saving JSContextRef was wrong in terms of API. There's an assumption that JSGlobalContextRef will outlive the connection objects, and because of it no JSGlobalContextRetain/Release calls were added. Reviewed by Noam Rosenthal. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtConnectionObject::QtConnectionObject): * bridge/qt/qt_runtime.h: (QtConnectionObject): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtConnectionObject::QtConnectionObject): 2012-06-13 David Barr <davidbarr@chromium.org> Add dpi to css3-images image-resolution https://bugs.webkit.org/show_bug.cgi?id=85439 Reviewed by Tony Chang. No new tests; extended fast/css/image-resolution/image-resolution.html * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::unitFromString): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::detectNumberToken): * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::unitCategory): (WebCore::conversionToCanonicalUnitsScaleFactor): (WebCore::CSSPrimitiveValue::customCssText): (WebCore::CSSPrimitiveValue::cloneForCSSOM): * css/CSSPrimitiveValue.h: 2012-06-13 Li Yin <li.yin@intel.com> FileAPI: type should be converted to be lower case in Blob constructor. https://bugs.webkit.org/show_bug.cgi?id=88696 Reviewed by Kentaro Hara. Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-BlobPropertyBag Spec: http://dev.w3.org/2006/webapi/FileAPI/#attributes-blob The ASCII-encoded string in lower case representing the media type of the Blob. Test: fast/files/blob-constructor.html * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-06-13 Robin Cao <robin.cao@torchmobile.com.cn> [BlackBerry] Enable MEDIA_STREAM by default https://bugs.webkit.org/show_bug.cgi?id=88849 Reviewed by Antonio Gomes. Covered by existing test cases. * CMakeLists.txt: * PlatformBlackBerry.cmake: * platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Added. (WebCore): (WebCore::DeprecatedPeerConnectionHandler::create): (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler): (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler): (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer): (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer): (WebCore::DeprecatedPeerConnectionHandler::processSDP): (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams): (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage): (WebCore::DeprecatedPeerConnectionHandler::stop): * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Added. (WebCore): (WebCore::MediaStreamCenter::instance): (WebCore::MediaStreamCenterBlackBerry::MediaStreamCenterBlackBerry): (WebCore::MediaStreamCenterBlackBerry::~MediaStreamCenterBlackBerry): (WebCore::MediaStreamCenterBlackBerry::queryMediaStreamSources): (WebCore::MediaStreamCenterBlackBerry::didSetMediaStreamTrackEnabled): (WebCore::MediaStreamCenterBlackBerry::didStopLocalMediaStream): (WebCore::MediaStreamCenterBlackBerry::didCreateMediaStream): (WebCore::MediaStreamCenterBlackBerry::constructSDP): * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h: Added. (WebCore): (MediaStreamCenterBlackBerry): 2012-06-13 Pavel Feldman <pfeldman@chromium.org> Web Inspector: working copy should be committed even if domain binding returns error. https://bugs.webkit.org/show_bug.cgi?id=88884 Reviewed by Vsevolod Vlasov. Committing working copy is about saving file. It should always succeed. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.commitWorkingCopy): 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: show revisions of all modified files in local modifications view https://bugs.webkit.org/show_bug.cgi?id=88864 Reviewed by Vsevolod Vlasov. This change allows all local modifications to be seen in a single view. View is now singleton, listening to all revisions being added. Revert captions were reworked (see the screenshot). * English.lproj/localizedStrings.js: * inspector/front-end/Resource.js: * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.populateRevisions): (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.showHistory): (WebInspector.RevisionHistoryView.reset): (WebInspector.RevisionHistoryView.prototype._createResourceItem.clearHistory): (WebInspector.RevisionHistoryView.prototype._createResourceItem): (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryView.prototype._revealResource.get if): (WebInspector.RevisionHistoryView.prototype._revealResource): (WebInspector.RevisionHistoryView.prototype._reset): (WebInspector.RevisionHistoryTreeElement): (WebInspector.RevisionHistoryTreeElement.prototype.onattach): (WebInspector.RevisionHistoryTreeElement.prototype.oncollapse): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._editorSelected): * inspector/front-end/revisionHistory.css: (.revision-history-link-row): (.revision-history-drawer li.revision-history-revision): 2012-06-13 Pavel Feldman <pfeldman@chromium.org> Web Inspector: Make "Go to source and line" possible with "go to file" dialog https://bugs.webkit.org/show_bug.cgi?id=88740 Reviewed by Vsevolod Vlasov. Selection dialog now allows search query rewrite and uses line number suffix to go to a particular line. * inspector/front-end/FilteredItemSelectionDialog.js: (WebInspector.FilteredItemSelectionDialog.prototype.onEnter): (WebInspector.FilteredItemSelectionDialog.prototype._createSearchRegExp): (WebInspector.SelectionDialogContentProvider.prototype.selectItem): (WebInspector.SelectionDialogContentProvider.prototype.rewriteQuery): (WebInspector.JavaScriptOutlineDialog.prototype.selectItem): (WebInspector.JavaScriptOutlineDialog.prototype.rewriteQuery): (WebInspector.OpenResourceDialog.prototype.selectItem): (WebInspector.OpenResourceDialog.prototype.rewriteQuery): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.showUISourceCode): * inspector/front-end/StylesPanel.js: (WebInspector.StyleSheetOutlineDialog.prototype.selectItem): (WebInspector.StyleSheetOutlineDialog.prototype.rewriteQuery): 2012-06-12 Hans Wennborg <hans@chromium.org> Speech JavaScript API: Add test for constructing SpeechRecognitionError events https://bugs.webkit.org/show_bug.cgi?id=88868 Reviewed by Adam Barth. This adds a test for constructing SpeechRecognitionError events, and code to make it work. Test: fast/events/constructors/speech-recognition-error-constructor.html * Modules/speech/SpeechRecognitionError.cpp: (WebCore::SpeechRecognitionError::create): (WebCore): (WebCore::SpeechRecognitionError::SpeechRecognitionError): (WebCore::SpeechRecognitionErrorInit::SpeechRecognitionErrorInit): * Modules/speech/SpeechRecognitionError.h: (SpeechRecognitionErrorInit): (WebCore): (SpeechRecognitionError): (WebCore::SpeechRecognitionError::code): * Modules/speech/SpeechRecognitionError.idl: 2012-06-13 Taiju Tsuiki <tzik@chromium.org> Implement InspectorFileSystemAgent::readDirectory for FileSystem support. https://bugs.webkit.org/show_bug.cgi?id=87724 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/filesystem/read-directory.html * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorFileSystemAgent.cpp: (InspectorFileSystemAgent::FrontendProvider): (WebCore): (WebCore::InspectorFileSystemAgent::create): (WebCore::InspectorFileSystemAgent::readDirectory): (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent): * inspector/InspectorFileSystemAgent.h: (WebCore): (InspectorFileSystemAgent): 2012-06-13 Silvia Pfeiffer <silviapf@chromium.org> Change the styling of the Chromium video controls. https://bugs.webkit.org/show_bug.cgi?id=88297 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch includes CSS changes, the removal of the now no longer needed controls background div, and the introduction of new images for the buttons. * css/mediaControlsChromium.css: (audio): Adjust height of audio controls. (::-webkit-media-controls): Use flexbox on media controls shadow DOM. (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure): Adjust height, max-width, text-indent and box-sizing, and reset padding to 0. (video::-webkit-media-controls-enclosure): Use 5px padding only for video controls and adjust height accordingly. (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): Use flexbox on panel, adjust bottom alignment, height, background color and border radius. (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): Display buttons inline with fixed width and height, vertically centered, no padding and 6px space to next controls element (this will be 15px incl the space in the image). (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): Display buttons inline with fixed width and height, vertically centered, no padding and 9px space to next controls element (this will be 15px incl the space in the image). (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): Display text as block, without broder, adjusted height, font-family, font-size and 9px space to next controls element (this will be 15px incl the space in the image). (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline): Adjust height, padding, background-color, min-wdith and 15px space to next controls element. (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): Adjust height, max- and min-width, background-color and 15px space to next controls element. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Remove timeline container, which is not necessary any longer because of the use of flexbox. (WebCore::MediaControlRootElementChromium::create): Remove timeline container, which is not necessary any longer because of the use of flexbox. (WebCore::MediaControlRootElementChromium::setMediaController): Remove timeline container, which is not necessary any longer because of the use of flexbox. (WebCore::MediaControlRootElementChromium::reset): Show the timeline instead of the timeline container when resetting. (WebCore::MediaControlRootElementChromium::reportedError): Hide the timeline instead of the timeline container when running into an error. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaMuteButton): Introduce new image resources for the mute button and adjust it based on volume levels. (WebCore::paintMediaPlayButton): Introduce new image resources for the play button. (WebCore::getMediaSliderThumb): Introduce new image resources for the position slider thumb. (WebCore::paintMediaVolumeSliderThumb): Introduce new image resources for the volume slider thumb. Remove timeline container rendering. (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Add timeline container painting to the "not reached" elements. (WebCore): Provide size settings for the position and volume sliders. (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize): Calculate correct width and height settings for the new image resources of the position and volume slider thumbs. * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): Remove timeline container rendering (i.e. the media controls background). * rendering/RenderThemeChromiumMac.mm: Remove timeline container rendering (i.e. the media controls background). * rendering/RenderThemeChromiumSkia.cpp: Remove timeline container rendering (i.e. the media controls background). * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): Remove timeline container rendering (i.e. the media controls background). 2012-06-13 Kinuko Yasuda <kinuko@chromium.org> Unreviewed, fixing English nits suggested by review for r120165. * fileapi/Blob.cpp: (WebCore::Blob::webkitSlice): * fileapi/Blob.h: (Blob): 2012-06-13 MORITA Hajime <morrita@google.com> REGRESSION(r118098): <content> element does not render distributed children when cloned from another document https://bugs.webkit.org/show_bug.cgi?id=88148 Reviewed by Dimitri Glazkov. The shadow DOM availability was decided through FrameLoaderClient. But there are documents which don't have any associated frames, in which any shadow DOM related elements cannot be constructed. That resulsted the regression. This change introduces a Page-based client called ContextFeaturesClient which takes the role from FrameLoaderClient to decide the feature availability, and ContextFeatures which is a proxy of ContextFeaturesClient. ContextEnabledFeatures is is replaced with ContextFeatures. Each ContextFeatures object is owned by a Page, and is attached to each Document in the page even if the page itself has no referenct to Frames or Pages. With ContextFeatures, each Document can decide the feature availability even if it cannot reach Page or Frame. On RefCountedSupplement: Document instance can live longer than a Page where it is shwon. This means that ContextFeatures instance needs to survive after owner Page destruction because it's referenced from possibly surviving Documents. RefCountedSupplement is introduced to cover this scenario: It allows supplement classes to live after Page's destruction. RefCountedSupplement::hostDestroyed() is notified when the hosting page is gone. ContextFeatures clears its reference to the client using this notification. Test: fast/dom/shadow/elements-in-frameless-document.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): * dom/ContextFeatures.cpp: Added. (WebCore): (WebCore::ContextFeaturesClient::empty): (WebCore::ContextFeatures::supplementName): (WebCore::ContextFeatures::defaultSwitch): (WebCore::ContextFeatures::shadowDOMEnabled): (WebCore::ContextFeatures::styleScopedEnabled): (WebCore::ContextFeatures::pagePopupEnabled): (WebCore::provideContextFeaturesTo): (WebCore::provideContextFeaturesToDocumentFrom): * dom/ContextFeatures.h: Added. (WebCore): (ContextFeatures): (WebCore::ContextFeatures::ContextFeatures): (WebCore::ContextFeatures::hostDestroyed): (ContextFeaturesClient): (WebCore::ContextFeaturesClient::~ContextFeaturesClient): (WebCore::ContextFeaturesClient::isEnabled): (WebCore::ContextFeatures::create): (WebCore::ContextFeatures::isEnabled): * dom/DOMAllInOne.cpp: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): (WebCore::DOMImplementation::createHTMLDocument): * dom/Document.h: (WebCore::Document::contextFeatures): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setContextFeatures): * dom/Position.cpp: (WebCore::Position::Position): (WebCore::Position::findParent): * dom/TreeScope.cpp: (WebCore::TreeScope::getSelection): * dom/make_names.pl: (printConstructorInterior): (printFactoryCppFile): (printWrapperFunctions): (printWrapperFactoryCppFile): * editing/markup.cpp: (WebCore::createFragmentFromMarkupWithContext): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::registerWithScopingNode): (WebCore::HTMLStyleElement::unregisterWithScopingNode): * html/shadow/HTMLContentElement.cpp: (WebCore::contentTagName): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): * loader/FrameLoaderClient.h: * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h. (WebCore): (RefCountedSupplement): (WebCore::RefCountedSupplement::hostDestroyed): (Wrapper): (WebCore::RefCountedSupplement::Wrapper::Wrapper): (WebCore::RefCountedSupplement::Wrapper::~Wrapper): (WebCore::RefCountedSupplement::Wrapper::wrapped): (WebCore::RefCountedSupplement::provideTo): (WebCore::RefCountedSupplement::from): * platform/Supplementable.h: (WebCore::Supplement::isRefCountedWrapper): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): 2012-06-11 Kinuko Yasuda <kinuko@chromium.org> Unprefix Blob.webkitSlice https://bugs.webkit.org/show_bug.cgi?id=78111 Reviewed by Adam Barth. Add unprefixed Blob.slice and start showing a deprecation message when webkitSlice is called. No new tests: existing tests that call webkitSlice() are converted to slice(). They should keep running. * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_blob_slice): Removed. (webkit_dom_blob_webkit_slice): Added. * fileapi/Blob.cpp: (WebCore::Blob::slice): (WebCore): (WebCore::Blob::webkitSlice): (WebCore::Blob::sliceInternal): Added. * fileapi/Blob.h: (WebCore): (Blob): * fileapi/Blob.idl: 2012-06-12 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120036. http://trac.webkit.org/changeset/120036 https://bugs.webkit.org/show_bug.cgi?id=88965 "assert failed in debug build" (Requested by maryw on #webkit). * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyDataReceived): 2012-06-12 Wei James <james.wei@intel.com> webcore should depend on webcore_arm_neon for only arm target_arch https://bugs.webkit.org/show_bug.cgi?id=88839 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2012-06-12 Edaena Salinas Jasso <edaena@apple.com> Can't set el.type on a <button> element https://bugs.webkit.org/show_bug.cgi?id=14439 Reviewed by Darin Adler. Test: fast/dom/HTMLButtonElement/change-type.html * bindings/objc/PublicDOMInterfaces.h: * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::setType): Added implementation of setType method. (WebCore): * html/HTMLButtonElement.h: (HTMLButtonElement): Added setType method. * html/HTMLButtonElement.idl: Removed readonly restriction to the type variable. 2012-06-12 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Implement font shaping with font-feature-settings on Mac https://bugs.webkit.org/show_bug.cgi?id=69826 Reviewed by Tony Chang. Add HarfBuzz-ng text shaper. Chromium mac port uses it as secondary text shaper to support OpenType features. HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and corresponding font is not an AAT font. No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port. * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies. * WebCore.gypi: Added harfbuzz-ng files. * platform/graphics/FontPlatformData.h: (FontPlatformData): Added m_harfbuzzFace. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace. (WebCore::FontPlatformData::platformDataAssign): Ditto. (WebCore): (WebCore::isAATFont): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added. (WebCore): (WebCore::harfbuzzFaceCache): (WebCore::HarfBuzzFace::HarfBuzzFace): (WebCore::HarfBuzzFace::~HarfBuzzFace): * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added. (WebCore): (HarfBuzzFace): (WebCore::HarfBuzzFace::create): * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added. (WebCore): (WebCore::floatToHarfBuzzPosition): (WebCore::getGlyph): (WebCore::getGlyphHorizontalAdvance): (WebCore::getGlyphHorizontalOrigin): (WebCore::getGlyphExtents): (WebCore::harfbuzzCoreTextGetFontFuncs): (WebCore::releaseTableData): (WebCore::harfbuzzCoreTextGetTable): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added. (WebCore): (WebCore::harfbuzzPositionToFloat): (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun): (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions): (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): (WebCore::HarfBuzzShaper::HarfBuzzShaper): (WebCore::HarfBuzzShaper::~HarfBuzzShaper): (WebCore::HarfBuzzShaper::setFontFeatures): (WebCore::HarfBuzzShaper::shape): (WebCore::HarfBuzzShaper::setupHarfBuzzRun): (WebCore::HarfBuzzShaper::shapeHarfBuzzRun): (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): (WebCore::HarfBuzzShaper::offsetForPosition): (WebCore::HarfBuzzShaper::selectionRect): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added. (WebCore): (HarfBuzzShaper): (WebCore::HarfBuzzShaper::totalWidth): (HarfBuzzRun): (WebCore::HarfBuzzShaper::HarfBuzzRun::create): (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth): (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters): (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs): (WebCore::HarfBuzzShaper::HarfBuzzRun::width): (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl): * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore): (WebCore::preferHarfBuzz): Added. (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists. (WebCore::Font::drawComplexText): Ditto. (WebCore::Font::floatWidthForComplexText): Ditto. (WebCore::Font::offsetForPositionForComplexText): Ditto. 2012-06-12 Luke Macpherson <macpherson@chromium.org> WIP: Implement CSS Variables Standard. https://bugs.webkit.org/show_bug.cgi?id=85580 Reviewed by Ojan Vafai. Implement CSS Variables Module Level 1. (See http://www.w3.org/TR/css-variables/) A HashMap of properties is referenced by RenderStyle, and used to store variables as strings. That HashMap is copy-on-write, and unless new variables are defined is simply a pointer to the parent's definitions. At usage time the variable's value is parsed according to the CSS property where it is used. Variables can: Define lists of values (ie. entire shorthand values). Define individual values. Refer to other variables. (Cycle detection is implemented). Please see the supplied test cases for example usage. Missing features: CSS variables cannot yet be used inside some functions such as -webkit-calc. Covered by existing test suite under fast/css/variables. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore): (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::storeVariableDeclaration): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::getStringValue): (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables): (WebCore): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::isVariableName): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSValue.cpp: (WebCore::CSSValue::serializeResolvingVariables): (WebCore): (WebCore::CSSValue::destroy): * css/CSSValue.h: (CSSValue): (WebCore::CSSValue::isVariableValue): * css/CSSValueList.cpp: (WebCore): (WebCore::CSSValueList::customSerializeResolvingVariables): * css/CSSValueList.h: (CSSValueList): * css/CSSVariableValue.h: Added. (WebCore): (CSSVariableValue): (WebCore::CSSVariableValue::create): (WebCore::CSSVariableValue::name): (WebCore::CSSVariableValue::value): (WebCore::CSSVariableValue::CSSVariableValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customSerializeResolvingVariables): * css/WebKitCSSTransformValue.h: (WebKitCSSTransformValue): * css/makeprop.pl: * rendering/style/RenderStyle.h: * rendering/style/StyleVariableData.h: Added. (WebCore): (StyleVariableData): (WebCore::StyleVariableData::create): (WebCore::StyleVariableData::copy): (WebCore::StyleVariableData::operator==): (WebCore::StyleVariableData::operator!=): (WebCore::StyleVariableData::setVariable): (WebCore::StyleVariableData::StyleVariableData): 2012-06-12 MORITA Hajime <morrita@google.com> Shadow Pseudo ID should be able to nest to point nested shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=62218 Reviewed by Dimitri Glazkov. - updateSpecifiersWithElementName() didn't take nesting into account. tag history can contain selector entries which isn't marked as ShadowDescendant yet. such entry can be found by investigating isUnknownPseudoElement(). - SelectorChecker::checkSelector() was too strict. Unknown pseudo elements are essentially a kind of class or id in implementation perspective. For such, rejecting by missing elementStyle doesn't make sense: It isn't a pseudo but a real element for WebCore after all. - Added Internals::setShadowPseudoId() to create a test harness whose DOM tree contains pseudo shadow ids. Before this change, following selecdtor chain is created for "p::-shadow-child::-nested-shadow-child": [both tag name and -shadow-id are set] <-(ShadowDescendant)- [-nested-shadow-id] What we want, which is created by this change is: [tag] <-(ShadowDescendant)- [-shadow-id is set] <-(ShadowdescenDant)- [-nested-shadow-id] Test: fast/dom/shadow/shadow-nested-pseudo-id.html * WebCore.exp.in: * css/CSSParser.cpp: (WebCore::CSSParser::updateSpecifiersWithElementName): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * testing/Internals.cpp: (WebCore::Internals::setShadowPseudoId): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-06-12 Christophe Dumez <christophe.dumez@intel.com> [soup] Prevent setting or editing httpOnly cookies from JavaScript https://bugs.webkit.org/show_bug.cgi?id=88760 Reviewed by Gustavo Noronha Silva. Prevent setting or overwriting httpOnly cookies from JavaScript. Fix setCookies() so that it parses all the cookies and not just the first one. Test: http/tests/cookies/js-get-and-set-http-only-cookie.html * platform/network/soup/CookieJarSoup.cpp: (WebCore::httpOnlyCookieExists): (WebCore): (WebCore::setCookies): 2012-06-12 Christophe Dumez <christophe.dumez@intel.com> [EFL] Enable SHADOW_DOM flag https://bugs.webkit.org/show_bug.cgi?id=87732 Reviewed by Kentaro Hara. Test: fast/dom/shadow/shadow-root-innerHTML.html * dom/ShadowRoot.idl: Add JSGenerateToJSObject extended attribute so that the ShadowRoot properties are accessible on JS side. * testing/Internals.idl: Fix SHADOW_DOM ifdef check. 2012-06-12 Leo Yang <leo.yang@torchmobile.com.cn> Dynamic hash table in DOMObjectHashTableMap is wrong in multiple threads https://bugs.webkit.org/show_bug.cgi?id=87334 Reviewed by Geoffrey Garen. Adapt to JSC::HashTable::copy to avoid copy dynamic table member of a HashTable. The dynamic table may be allocated on other thread and contains thread specific identifiers. For example, a hash table of JSEntryArray was first initialized on a worker thread, and then the user reloaded the page, another worker thread is created due to reload, the dynamic allocated table in *staticTable* is specific to the first worker thread which has died. If the user reload the page again, the dynamic table will be freed and memory corruption will occur. No functionalities changed, no new tests. * bindings/js/DOMObjectHashTableMap.h: (WebCore::DOMObjectHashTableMap::get): 2012-06-12 James Robinson <jamesr@chromium.org> [chromium] Port Canvas2DLayerBridge over to WebExternalTextureLayer https://bugs.webkit.org/show_bug.cgi?id=88597 Reviewed by Adrienne Walker. This converts Canvas2DLayerBridge to using public WebLayer API types instead of LayerChromium types. * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::prepareForDraw): (AcceleratedDeviceContext): (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge): (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge): (WebCore::Canvas2DLayerBridge::skCanvas): (WebCore::Canvas2DLayerBridge::prepareTexture): (WebCore::Canvas2DLayerBridge::context): (WebCore::Canvas2DLayerBridge::layer): (WebCore::Canvas2DLayerBridge::contextAcquired): * platform/graphics/chromium/Canvas2DLayerBridge.h: (WebCore): (Canvas2DLayerBridge): 2012-06-12 Alexis Menard <alexis.menard@openbossa.org> Fix packing in StyleBoxData for Windows. https://bugs.webkit.org/show_bug.cgi?id=88858 Reviewed by Tony Chang. MSVC doesn't pack bitfields if the types are mixed. We can safely change the bool type to an unsigned so the packing will happen. I have added a compile assert for future regressions. No new tests : we should not see any regressions. * rendering/style/StyleBoxData.h: * rendering/style/StyleBoxData.cpp: (StyleBoxData): 2012-06-12 Adrienne Walker <enne@google.com> [chromium] Paint scrollbars on WebKit thread and composite those textures https://bugs.webkit.org/show_bug.cgi?id=88145 Reviewed by James Robinson. Scrollbars were previously painted and uploaded on the compositor thread. This isn't possible to do for many scrollbar themes. This patch changes ScrollbarLayerChromium to paint the scrollbar into two parts: the thumb, and everything else. These are uploaded into textures and synced over to the CCScrollbarImpl where they are composited and drawn. Mac and overlay scrollbars are still not enabled to have compositor thread-updated scrollbars. As a bonus, fix LayerRendererChromium::drawTextureQuad to draw quads that do not fill the entire layer bounds. Tested by existing layout and unit tests by removing the condition that these scrollbar layers are only created when the threaded proxy exists. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::scrollbarLayerDidChange): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::thumbRect): (WebCore): * platform/ScrollbarThemeComposite.h: (ScrollbarThemeComposite): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawTextureQuad): * platform/graphics/chromium/ScrollbarLayerChromium.cpp: (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium): (WebCore::ScrollbarLayerChromium::theme): (WebCore): (WebCore::ScrollbarLayerChromium::pushPropertiesTo): (ScrollbarBackgroundPainter): (WebCore::ScrollbarBackgroundPainter::create): (WebCore::ScrollbarBackgroundPainter::paint): (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter): (ScrollbarThumbPainter): (WebCore::ScrollbarThumbPainter::create): (WebCore::ScrollbarThumbPainter::paint): (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter): (WebCore::ScrollbarLayerChromium::setLayerTreeHost): (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded): (WebCore::ScrollbarLayerChromium::updatePart): (WebCore::ScrollbarLayerChromium::update): * platform/graphics/chromium/ScrollbarLayerChromium.h: (WebCore): (ScrollbarLayerChromium): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl): (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (WebCore::CCScrollbarLayerImpl::setBackgroundTextureId): (WebCore::CCScrollbarLayerImpl::setThumbTextureId): (CCScrollbarLayerImpl): 2012-06-12 Tony Chang <tony@chromium.org> Replaced items in a flexbox should be coerced to display:block https://bugs.webkit.org/show_bug.cgi?id=87068 Reviewed by Ojan Vafai. The flexbox spec lists HTML tags that should automatically be converted to display:block when a flex child. It also says that atomic inline-level children should become block (e.g., inline-table should be treated as table). http://dev.w3.org/csswg/css3-flexbox/#flex-items Test: css3/flexbox/flexitem.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-12 Joshua Bell <jsbell@chromium.org> IndexedDB: ObjectStore/Index shouldn't hold reference to backing store https://bugs.webkit.org/show_bug.cgi?id=83074 Reviewed by Tony Chang. We should be able to collect and close the leveldb backing store as soon as the database connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were holding RefPtrs, and those objects are kept alive by script references. Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end, IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend objects and their owners are maintained as long as there's a script reference. To ensure that all LevelDB objects are destructed in the right order, transactions indirectly track all open cursors and ensure they are closed when the transaction finishes, and database closing is explicitly prevented from occurring until transactions are complete. Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing. Tests: storage/indexeddb/database-close.html storage/indexeddb/persistence.html [Chromium] webkit_unit_tests --gtest_filter=IDBDatabaseBackendTest.BackingStoreRetention * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::close): Release LevelDB resources when closed to allow backing store to close. * Modules/indexeddb/IDBCursorBackendImpl.h: (WebCore): * Modules/indexeddb/IDBDatabase.cpp: Ensure connection close deferred until all transactions are finished. (WebCore::IDBDatabase::transactionCreated): Accounting. (WebCore::IDBDatabase::transactionFinished): Accounting. (WebCore::IDBDatabase::close): (WebCore): (WebCore::IDBDatabase::closeConnection): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Track outstanding transactions for forced-close scenarios. (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::createObjectStore): Don't pass in backing store reference. (WebCore::IDBDatabaseBackendImpl::setVersion): Use transaction() for consistent accounting. (WebCore::IDBDatabaseBackendImpl::transactionFinished): Accounting. (WebCore::IDBDatabaseBackendImpl::transaction): Accounting. (WebCore::IDBDatabaseBackendImpl::close): Unregister from factory when last connection is closed. (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Don't pass in backing store reference. (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (WebCore): (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::deleteDatabase): Don't hang on to deleted databases eternally. * Modules/indexeddb/IDBFactoryBackendImpl.h: Backend map controls IDBDatabaseBackend lifetimes. (IDBFactoryBackendImpl): * Modules/indexeddb/IDBIndexBackendImpl.cpp: Don't hold backing store references. (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): * Modules/indexeddb/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::backingStore): (WebCore::IDBIndexBackendImpl::databaseId): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Don't hold backing store references. (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::backingStore): (WebCore::IDBObjectStoreBackendImpl::databaseId): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::IDBTransaction): For IDBDatabase accounting, allow ref during ctor. (WebCore::IDBTransaction::onAbort): Accounting. (WebCore::IDBTransaction::onComplete): Accounting. * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::isVersionChange): Convenience function. (IDBTransaction): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::abort): Cleanup ordering to allow backing store to close. (WebCore::IDBTransactionBackendImpl::commit): Cleanup ordering to allow backing store to close. 2012-06-12 Adrienne Walker <enne@google.com> [chromium] Don't set visible layer rect in CCLayerTreeHost paint iteration https://bugs.webkit.org/show_bug.cgi?id=88895 Reviewed by James Robinson. We should only set visible layer rects during the recursion in CClayerTreeHostCommon and not while we're painting. This is one last straggling piece of code that never got moved. Tested by existing mask-related layout tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintMasksForRenderSurface): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleAndScissorRectsInternal): 2012-06-12 Dana Jansens <danakj@chromium.org> [chromium] Return empty visibleLayerRect for layers with empty content bounds https://bugs.webkit.org/show_bug.cgi?id=88901 Reviewed by Adrienne Walker. This change should only affect tests. Currently if you set up a CCLayerImpl with some bounds, but don't set the contentBounds, then they are empty by default. In this case the visibleLayerRect gets set inappropriately to the layer's target surface contentRect which in a completely different coordinate space. Fixed up tests that were passing bogusly and failed after this change. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleLayerRect): 2012-06-12 Adrienne Walker <enne@google.com> [chromium] ScrollingCoordinator::setScrollLayer should update scroll layer ids https://bugs.webkit.org/show_bug.cgi?id=88882 Reviewed by James Robinson. Tested manually, as scrollbar layers are currently only created when threaded compositing is enabled and none of those layout tests trigger this bug. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinatorPrivate::setScrollLayer): (ScrollingCoordinatorPrivate): (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer): (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer): (WebCore::createScrollbarLayer): (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange): (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange): * platform/graphics/chromium/ScrollbarLayerChromium.h: (WebCore::ScrollbarLayerChromium::setScrollLayerId): (ScrollbarLayerChromium): * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive): 2012-06-12 Mark Mentovai <mark@chromium.org> [chromium mac] Don't include things in subframeworks of ApplicationServices.framework. Subframeworks move around from SDK to SDK and OS release to OS release, but just using the top-level umbrella framework guarantees forward compatibility. When building for Chromium Mac, just #include <ApplicationServices/ApplicationServices.h> instead of reaching in to subframeworks. https://bugs.webkit.org/show_bug.cgi?id=88569 Reviewed by Stephen White. No new tests. * platform/graphics/GlyphBuffer.h: * platform/graphics/mac/ComplexTextControllerCoreText.mm: * platform/graphics/skia/GraphicsContextSkia.cpp: 2012-06-12 Igor Oliveira <igor.o@sisa.samsung.com> Apply animations and transitions for first-letter element https://bugs.webkit.org/show_bug.cgi?id=85253 Add animations and transitions support for the first-letter pseudo element. Instead of calling RenderOject::node() in the animations code, now we need to call RenderObject::styledGeneratingNode() because pseudo elements does not have a Node associated with the RenderObject. Initial patch by Simon Fraser Reviewed by Simon Fraser. Tests: animations/first-letter-animation.html animations/first-letter-play-state.html transitions/first-letter-color-transition.html transitions/first-letter-transition.html * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimations): (WebCore::AnimationControllerPrivate::pauseAnimationAtTime): (WebCore::AnimationControllerPrivate::pauseTransitionAtTime): (WebCore::AnimationController::cancelAnimations): (WebCore::AnimationController::updateAnimations): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::pauseAnimation): (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): (WebCore::KeyframeAnimation::pauseAnimation): (WebCore::KeyframeAnimation::endAnimation): (WebCore::KeyframeAnimation::sendAnimationEvent): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetterStyle): (WebCore::RenderBlock::createFirstLetterRenderer): * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): * rendering/RenderObject.cpp: (WebCore::RenderObject::setAnimatableStyle): (WebCore::RenderObject::styledGeneratingNode): (WebCore): * rendering/RenderObject.h: (RenderObject): 2012-06-12 Kent Tamura <tkent@chromium.org> Checking a radio button doesn't uncheck other buttons in the same group in some cases. https://bugs.webkit.org/show_bug.cgi?id=88835 Reviewed by Ryosuke Niwa. This change fixes a bug that checking a radio button in a radio button group in a form detached from a document tree doesn't uncheck another checked radio button in the radio button group. A radio button participates in a radio button group in the following conditions: - If it is owned by a form element regardless of the form is in a document tree or not, or - If it is not owned by any form elements and it is in a document tree. A radio button group for the radio button is owned by the document. For HTMLInputElement::removedFrom(): The old code always unregistered the radio button if it was removed from the document tree. It was incorrect because we don't need to unregister it if it has an owner form and the owner form is not changed by removedFrom(). If the owner form is cleared by removedFrom(), willChangeForm() unregisters the radio button. So what we should do in removedFrom() is to unregister the radio button only if the radio button group is owned by the document. For HTMLInputElement::insertedInto(): The old code always registered the radio button if it is inserted into the document tree. It was incorrect because we don't need to register it if it has an owner form and the owner form is not changed by insertedInto(). If the owner form is changed by insertedInto(), didChangeForm() registers the radio button. So We should register the radio button only if its radio button group will be owned by the document. Test: Add test cases to fast/forms/radio/radio-group.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::insertedInto): Register this to CheckedRadioButtons only if new group owner is Document. (WebCore::HTMLInputElement::removedFrom): Unregister this from CheckedRadioButtons only if old group owner was Document. 2012-06-12 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(119769): Canvas2DLayerBridge may go away before its TextureLayerChromium https://bugs.webkit.org/show_bug.cgi?id=88910 Reviewed by Adrienne Walker. Unregister the bridge as its TextureLayerChromium client when going away. Covered by new unit test in Canvas2DLayerBridgeTest.cpp. * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge): 2012-06-12 Alec Flett <alecflett@chromium.org> IndexedDB: Error codes, phase two https://bugs.webkit.org/show_bug.cgi?id=88690 Reviewed by Tony Chang. Update the next phase of IndexedDB error codes to match the spec. This update is mostly focused on DATA_ERR vs CONSTRAINT_ERR. Also moves some of the error checking for the transaction mode into the frontend and replaces the backend checks with asserts, so that we can consolidate error checking in one place. This also removes a few FIXME's that are no longer true (about I/O errors - the spec was updated and our implementation was already correct) No new tests, existing tests cover changed behavior. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::deleteFunction): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::deleteFunction): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersionInternal): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::add): (WebCore::IDBObjectStore::put): (WebCore::IDBObjectStore::deleteFunction): (WebCore::IDBObjectStore::clear): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteFunction): (WebCore::IDBObjectStoreBackendImpl::clear): * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::enumMode): * Modules/indexeddb/IDBTransactionBackendImpl.h: 2012-06-12 Min Qin <qinmin@google.com> Disable autoplay when user gesture is required for media playback https://bugs.webkit.org/show_bug.cgi?id=88897 Reviewed by Adam Barth. When user gesture is required for media playback, we should block autoplay. Otherwise, people will use autoplay instead of video.play() to bypass the gesture requirement. Test: media/no-autoplay-with-user-gesture-requirement.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): 2012-06-12 Shrey Banga <banga@chromium.org> HTML parser should yield more to improve perceived page load time https://bugs.webkit.org/show_bug.cgi?id=86165 Reviewed by Tony Gentilcore. Test: fast/events/event-yield-timing.html We want the parser to yield at least every 500ms to keep the page somewhat responsive and allow painting. Since it would be too expensive to check the time after each token, the previous heuristic was to check every 4,096 tokens. That works fine for most tokens, but a script may spend an arbitrary amount of time executing. This patch fixes the issue by causing the parser to check the elapsed time immediately after executing a script. * html/parser/HTMLParserScheduler.cpp: (WebCore::HTMLParserScheduler::checkForYieldBeforeScript): * html/parser/HTMLParserScheduler.h: (WebCore::PumpSession::PumpSession): (PumpSession): (WebCore::HTMLParserScheduler::checkForYieldBeforeToken): 2012-06-12 Sami Kyostila <skyostil@chromium.org> [chromium] Don't crash in CCLayerIterator if the root layer doesn't have a render surface https://bugs.webkit.org/show_bug.cgi?id=88886 Reviewed by James Robinson. If we are iterating over a render render surface layer list where the root layer does not have a render surface, fail gracefully instead of crashing. Tests: CCLayerIteratorTest.{emptyTree,rootLayerWithoutRenderSurface} * platform/graphics/chromium/cc/CCLayerIterator.h: (WebCore::CCLayerIterator::CCLayerIterator): 2012-06-06 Ojan Vafai <ojan@chromium.org> Change default for flex-grow back to 0 https://bugs.webkit.org/show_bug.cgi?id=88443 Reviewed by Tony Chang. * rendering/style/RenderStyle.h: 2012-06-12 Brady Eidson <beidson@apple.com> <rdar://problem/11593686> and https://bugs.webkit.org/show_bug.cgi?id=88683 Garbage collection of an <img> element can cause reentrant event dispatch. Reviewed by Darin Adler. The most straightforward solution is for ImageLoader to keep its Element alive with ref/deref any time the Image is actually loading. ImageLoader should always do this for all Elements, and if those Elements want/need different behavior for when they are detached then they need to manually stop their loads. Tests: http/tests/loading/embed-image-load-outlives-gc-without-crashing.html http/tests/loading/image-input-type-outlives-gc-without-crashing.html http/tests/loading/image-load-outlives-gc-without-crashing.html http/tests/loading/object-image-load-outlives-gc-without-crashing.html http/tests/loading/svg-image-load-outlives-gc-without-crashing.html http/tests/loading/video-poster-image-load-outlives-gc-without-crashing.html * loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::~ImageLoader): (WebCore::ImageLoader::setImage): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::updatedHasPendingLoadEvent): (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): (WebCore::ImageLoader::dispatchPendingLoadEvent): * loader/ImageLoader.h: (ImageLoader): 2012-06-12 Shawn Singh <shawnsingh@chromium.org> [chromium] Make damage tracking more robust to early exits https://bugs.webkit.org/show_bug.cgi?id=84803 Reviewed by James Robinson. All CCDamageTrackerTest unit tests updated; One new unit test added: CCDamageTrackerTest.verifyDamageAccumulatesUntilReset Damage tracking inherently needs to be aware of all changes that occur for every frame. Before this patch, anyone modifying details of CCLayerTreeHostImpl and the drawing phases of the compositor needed to be careful to avoid early exiting once draw is initiated, otherwise running the risk of damage tracking's state getting out-of-sync from actual changes. This patch makes the damage tracker API more asynchronous-like, so that damage will continue to accumulate until it is explicitly notified that damaged areas have been drawn. This will allow more freedom in designing and restructuing drawing code in the compositor, without worrying as much about damage tracking getting out-of-sync. * platform/graphics/chromium/cc/CCDamageTracker.h: (WebCore::CCDamageTracker::didDrawDamagedArea): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-06-12 Mike West <mkwst@chromium.org> Make document.documentURI readonly from JavaScript https://bugs.webkit.org/show_bug.cgi?id=65187 Reviewed by Alexey Proskuryakov. The DOM4 working draft marks the documentURI attribute as read only (http://www.w3.org/TR/dom/#document). Firefox has shipped with this behavior since https://hg.mozilla.org/mozilla-central/rev/3bc751906409 landed in October 2011, IE9 doesn't support the property, and Opera throws a NO_MODIFICATION_ALLOWED_ERR. This patch changes WebKit to silently fail (matching Firefox's behavior) by setting the property to readonly in the IDL. Document::setDocumentURI and the m_documentURI property are retained for compatibility with ObjC clients, and the readonly attribute is ifdeffed out for ObjC. This patch adds a single test to verify the behavior, and removes a variety of tests that depended on the writable behavior. In particular, potential security issues involving the document.baseURL property are avoided completely as long as this property can't be changed. Test: fast/dom/documenturi-readonly.html * dom/Document.cpp: (WebCore::Document::setDocumentURI): Adds a comment explaining that the fallback is necessary only to support ObjC, not for JS calls. * dom/Document.cpp: (WebCore::Document::updateBaseURL): Ditto. (Document): * dom/Document.idl: Add readonly to the attribute and drop null value when not in LANGUAGE_OBJECTIVE_C. 2012-06-12 Silvia Pfeiffer <silviapf@chromium.org> Support !ENABLE(VIDEO) builds with horizontally layed out video controls. https://bugs.webkit.org/show_bug.cgi?id=88881 Reviewed by Csaba Osztrogonác. No new tests as this is a regression from WK87835. * html/shadow/SliderThumbElement.cpp: (WebCore::hasVerticalAppearance): Ifdef out video related functionality, since usesVerticalVolumeSlider does not exist in that case. 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: show revisions of all modified files in local modifications view https://bugs.webkit.org/show_bug.cgi?id=88864 Reviewed by Vsevolod Vlasov. This change allows all local modifications to be seen in a single view. View is now singleton, listening to all revisions being added. Revert captions were reworked (see the screenshot). * English.lproj/localizedStrings.js: * inspector/front-end/Resource.js: * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.populateRevisions): (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.showHistory): (WebInspector.RevisionHistoryView.reset): (WebInspector.RevisionHistoryView.prototype._createResourceItem.clearHistory): (WebInspector.RevisionHistoryView.prototype._createResourceItem): (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryView.prototype._revealResource.get if): (WebInspector.RevisionHistoryView.prototype._revealResource): (WebInspector.RevisionHistoryView.prototype._reset): (WebInspector.RevisionHistoryTreeElement): (WebInspector.RevisionHistoryTreeElement.prototype.onattach): (WebInspector.RevisionHistoryTreeElement.prototype.oncollapse): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._editorSelected): * inspector/front-end/revisionHistory.css: (.revision-history-link-row): (.revision-history-drawer li.revision-history-revision): 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: allow clearing revision history. https://bugs.webkit.org/show_bug.cgi?id=88847 Reviewed by Vsevolod Vlasov. This change also renames "Revision history" to "Local modifications". I intend to list modifications to all files in that view in the subsequent change. * English.lproj/localizedStrings.js: * inspector/front-end/Resource.js: (WebInspector.Resource._clearResourceHistory): * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryView.else.clearHistory): (WebInspector.RevisionHistoryView): (WebInspector.RevisionHistoryView.prototype._revisionAdded): (WebInspector.RevisionHistoryTreeElement): (WebInspector.RevisionHistoryTreeElement.prototype._createLine): (WebInspector.RevisionHistoryTreeElement.prototype.allowRevert): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.appendApplicableItems): 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: use jsdifflib for revision diff calculation. https://bugs.webkit.org/show_bug.cgi?id=88791 Reviewed by Vsevolod Vlasov. Present diff calculation is incomplete, it does not properly handle the following case: [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b] We should not be implementing diff by ourselves. I imported jsdifflib from https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2): (WebInspector.RevisionHistoryTreeElement.prototype.onexpand): (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber): (WebInspector.RevisionHistoryTreeElement.prototype._createLine): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (difflib.stringAsLines): (difflib.SequenceMatcher): (difflib.SequenceMatcher.prototype.get_opcodes): * inspector/front-end/inspector.html: * inspector/front-end/jsdifflib.js: Added. (difflib.defaultJunkFunction): (difflib.stripLinebreaks): (difflib.stringAsLines): (difflib.__reduce): (difflib.__ntuplecomp): (difflib.__calculate_ratio): (difflib.__dictget): (difflib.SequenceMatcher.this.set_seqs): (difflib.SequenceMatcher.this.set_seq1): (difflib.SequenceMatcher.this.set_seq2): (difflib.SequenceMatcher.this.__chain_b): (difflib.SequenceMatcher.this.find_longest_match): (difflib.SequenceMatcher.this.get_matching_blocks): (difflib.SequenceMatcher.this.get_opcodes): (difflib.SequenceMatcher.this.get_grouped_opcodes): (difflib.SequenceMatcher.this.quick_ratio): (difflib.SequenceMatcher.this.real_quick_ratio): * inspector/front-end/revisionHistory.css: (.revision-history-line-separator .webkit-line-number): 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Web Inspector: use jsdifflib for revision diff calculation. https://bugs.webkit.org/show_bug.cgi?id=88791 Reviewed by Vsevolod Vlasov. Present diff calculation is incomplete, it does not properly handle the following case: [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b] We should not be implementing diff by ourselves. I imported jsdifflib from https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/RevisionHistoryView.js: (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2): (WebInspector.RevisionHistoryTreeElement.prototype.onexpand): (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber): (WebInspector.RevisionHistoryTreeElement.prototype._createLine): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (difflib.stringAsLines): (difflib.SequenceMatcher): (difflib.SequenceMatcher.prototype.get_opcodes): * inspector/front-end/inspector.html: * inspector/front-end/jsdifflib.js: Added. (difflib.defaultJunkFunction): (difflib.stripLinebreaks): (difflib.stringAsLines): (difflib.__reduce): (difflib.__ntuplecomp): (difflib.__calculate_ratio): (difflib.__dictget): (difflib.SequenceMatcher.this.set_seqs): (difflib.SequenceMatcher.this.set_seq1): (difflib.SequenceMatcher.this.set_seq2): (difflib.SequenceMatcher.this.__chain_b): (difflib.SequenceMatcher.this.find_longest_match): (difflib.SequenceMatcher.this.get_matching_blocks): (difflib.SequenceMatcher.this.get_opcodes): (difflib.SequenceMatcher.this.get_grouped_opcodes): (difflib.SequenceMatcher.this.quick_ratio): (difflib.SequenceMatcher.this.real_quick_ratio): * inspector/front-end/revisionHistory.css: (.revision-history-line-separator .webkit-line-number): 2012-06-12 Christophe Dumez <christophe.dumez@intel.com> [GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing https://bugs.webkit.org/show_bug.cgi?id=87575 Reviewed by Philippe Normand. When EOS is reached in forward playback, the position does not necessarily match the duration. This confuses HTMLMediaElement and causes the "ended" event not to be fired. To avoid this, we synchronize position and duration values in this case. Test: http/tests/media/video-buffered-range-contains-currentTime.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 2012-06-12 Kinuko Yasuda <kinuko@chromium.org> Refactor InputType::receiveDroppedFiles to take DragData https://bugs.webkit.org/show_bug.cgi?id=88860 Reviewed by Kent Tamura. So that we can centralize the file paths related code into FileInputType and makes it easier to extract more data from DragData for <input type=file> (like bug 88293 for directory drag-and-drop). No new tests as this has no behavioral changes. * html/FileInputType.cpp: (WebCore::FileInputType::receiveDroppedFiles): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::receiveDroppedFiles): * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::receiveDroppedFiles): * html/InputType.h: * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): 2012-06-12 Thiago Marcos P. Santos <thiago.santos@intel.com> Generate -webkit-box-decoration-break property only when the feature is enabled https://bugs.webkit.org/show_bug.cgi?id=88861 Reviewed by Alexis Menard. Otherwise it will hit an assertion if the property is present on the style but the feature disabled. Also fixes a compilation warning when the feature is disabled. * css/CSSPropertyNames.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-12 Darin Adler <darin@apple.com> Tweaked the Mac export file a bit more, adding more-correct iOS cases. Reviewed by David Kilzer. * WebCore.exp.in: Rearrangement. 2012-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Using extrernal ICU library on case unsensitive drives will not work https://bugs.webkit.org/show_bug.cgi?id=70913 Reviewed by Csaba Osztrogonác. * platform/graphics/surfaces/GraphicsSurface.h: 2012-06-11 Dana Jansens <danakj@chromium.org> [chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture https://bugs.webkit.org/show_bug.cgi?id=88814 Reviewed by Adrienne Walker. When a CCVideLayerImpl produces quads for a frame that is contained in a single GL texture, then use the TextureDrawQuad instead of the VideoDrawQuad. Moves the computation for the RGBA(software) and NativeTexture (hardware) cases from LayerRendererChromium into CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad. No new tests, behaviour should be the same. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawStreamTexture): (WebCore::LayerRendererChromium::drawVideoQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-12 Silvia Pfeiffer <silviapf@chromium.org> Change the volume slider to horizontal rendering for Chrome video controls. https://bugs.webkit.org/show_bug.cgi?id=87835 Reviewed by Eric Carlson. No new tests - final patch in the Chrome controls update series will contain rebaselined tests. The Chrome video controls are receiving a visual update. The volume slider is moved into the controls with horizontal rendering, the volume slider container is removed. The visual update itself is in a separate patch. * css/mediaControlsChromium.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): Removed relative positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): Removed absolute positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container): Removed absolute positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): Removed volume slider container - it's not necessary any more. (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): Remove flexbox and introduce inline display to always display this field. (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): Removed absolute positioning to render all controls elements equally in DOM order. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Removed volume slider container - it's not necessary any more. (WebCore::MediaControlRootElementChromium::create): Appended the volume slider and the mute button directly to the panel, removed volume slider container. (WebCore::MediaControlRootElementChromium::setMediaController): Removed volume slider container. (WebCore::MediaControlRootElementChromium::reportedError): Removed volume slider container. (WebCore::MediaControlRootElementChromium::showVolumeSlider): Removed volume slider container. * html/shadow/MediaControlRootElementChromium.h: (WebCore): (MediaControlRootElementChromium): Removed volume slider container. * html/shadow/SliderThumbElement.cpp: (WebCore::hasVerticalAppearance): Allow use of horizontal media volume slider. (WebCore::RenderSliderThumb::layout): Reuse hasVerticalAppearance function. * rendering/RenderMediaControlsChromium.cpp: (WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider): Change line drawing from vertical to horizontal. * rendering/RenderTheme.h: (WebCore::RenderTheme::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. * rendering/RenderThemeChromiumMac.h: (WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. Add usesVerticalVolumeSlider function to allow horizontal volume sliders. * rendering/RenderThemeChromiumSkia.h: (WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. 2012-06-12 Andrei Bucur <abucur@adobe.com> [CSSRegions]NamedFlow::overset should return true when there's no region chain attached https://bugs.webkit.org/show_bug.cgi?id=88515 The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow or if the NamedFlow is in the NULL state: http://www.w3.org/TR/css3-regions/#dom-named-flow-overset This patch updates WebKit's behavior in the last two situations to match the one in the spec. Reviewed by Andreas Kling. Test: fast/regions/webkit-named-flow-overset.html was updated * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state. 2012-06-12 Rahul Tiwari <rahultiwari.cse.iitr@gmail.com> Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel https://bugs.webkit.org/show_bug.cgi?id=88286 Added the context menu to delete the selected profile. Reviewed by Pavel Feldman. No new tests required as UI related change * English.lproj/localizedStrings.js: Removed property svn:mime-type. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent): 2012-06-12 Pavel Feldman <pfeldman@chromium.org> Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js * English.lproj/localizedStrings.js 2012-06-12 Dan Bernstein <mitz@apple.com> Tried to fix the notification-enabled build after r120044. * notifications/NotificationController.cpp: (WebCore::NotificationController::NotificationController): (WebCore::NotificationController::create): (WebCore::provideNotification): * notifications/NotificationController.h: (NotificationController): 2012-06-12 Huang Dongsung <luxtella@company100.net> [Qt][Texmap] Falling leaves demo missing clipping. https://bugs.webkit.org/show_bug.cgi?id=88704 The bug originated from begining native painting mode of QPainter after enabling scissor test, because begining native painting mode disables scissor test. Covered by existing compositing tests. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::beginPainting): 2012-06-12 Csaba Osztrogonác <ossy@webkit.org> [Qt][Win] Buildfix related to fromWinHBITMAP https://bugs.webkit.org/show_bug.cgi?id=88863 Reviewed by Jocelyn Turcotte. * platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum. (WebCore): (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/qt/ImageQt.cpp: (WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.) 2012-06-12 Takashi Sakamoto <tasak@google.com> [Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree. https://bugs.webkit.org/show_bug.cgi?id=87805 Modified HTMLStyleElement to be treated as a scoped style independent of its "scoped" attribute's value if HTMLStyleElement is in shadow subtree. HTMLStyleElement has the following four cases talking about "scoped" attribute and whether is in shadow subtree or not: 1, HTMLStyleElement is "scoped" and is in document tree, 2, HTMLStyleElement is "scoped" and is in shadow subtree, 3, HTMLStyleElement is not "scoped" and is in document tree, and 4, HTMLStyleElement is not "scoped" and is in shadow subtree. The case 1 and 2 are not changed. This patch affected the case 4. At the case 4, the HTMLStyleElement's scoping node is the shadow root. This change is the first step for fixing style scope bug, i.e. HTMLStyleElements in shadow subtree are applied to any element in document tree. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): Modified to return a shadow root if a targeted stylesheet owner node is not scoped but in some shadow DOM subtree. * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::HTMLStyleElement): (WebCore::HTMLStyleElement::parseAttribute): Modified to use the below scopedAttributeChanged when a changed attribute's name is "scoped". (WebCore::HTMLStyleElement::scopedAttributeChanged): Newly added. According to new scoped value and isInShadowTree, add or remove style rules to/from scopedAuthorRules via registerWithScopingNode or unregisterWithScopingNode. (WebCore::HTMLStyleElement::registerWithScopingNode): Added one boolean argument to determine whether HTMLStyleElement is scoped or not. The reason why not using scoped() is the comment: "We cannot rely on the scoped element already being present when this method is invoked. Therefore we cannot rely on scoped()" (WebCore::HTMLStyleElement::unregisterWithScopingNode): Changed the code for updating m_isRegisteredWithScopingNode. Now set m_scopedStyleRegistrationState to be NotRegistered. (WebCore::HTMLStyleElement::insertedInto): Modified to invoke registerWithScopingNode when an element is not scoped but in some shadow subtree. (WebCore::HTMLStyleElement::removedFrom): Modified to invoke unregisterWithScopingNode when an element is not scoped but in some shadow subtree. * html/HTMLStyleElement.h: (HTMLStyleElement): Modified the type of m_isRegisteredWithScopingNode from bool to enum and renamed to m_scopedStyleRegistrationState. Now the member variable keeps what HTMLStyleElement's scoping node is, i.e. none (this means, not in shadow subtree and not scoped), shadow root or parent node. Added one new method scopedAttributeChanged's declaration and modified the declaration of registerWithScopingNode. 2012-06-12 Amy Ousterhout <aousterh@chromium.org> Removing unused parameter Page https://bugs.webkit.org/show_bug.cgi?id=88848 Reviewed by Kentaro Hara. Removed the unused parameter Page* supplied to the create function and constructor in DeviceOrientationController. The parameter Page* was previously stored in an instance variable m_page, but this was removed (see https://bugs.webkit.org/show_bug.cgi?id=88812). No new tests because the removed parameter was unused and untested. * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::DeviceOrientationController): (WebCore::DeviceOrientationController::create): (WebCore::provideDeviceOrientationTo): * dom/DeviceOrientationController.h: (DeviceOrientationController): 2012-06-12 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r120051. http://trac.webkit.org/changeset/120051 https://bugs.webkit.org/show_bug.cgi?id=88852 some tests are crashing (Requested by morrita on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/ContextEnabledFeatures.cpp: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp. (WebCore): (WebCore::ContextEnabledFeatures::shadowDOMEnabled): (WebCore::ContextEnabledFeatures::styleScopedEnabled): (WebCore::ContextEnabledFeatures::pagePopupEnabled): * bindings/generic/ContextEnabledFeatures.h: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.h. (WebCore): (ContextEnabledFeatures): * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): * dom/ContextFeatures.cpp: Removed. * dom/ContextFeatures.h: Removed. * dom/DOMAllInOne.cpp: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): (WebCore::DOMImplementation::createHTMLDocument): * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore): (Document): * dom/Position.cpp: (WebCore::Position::Position): (WebCore::Position::findParent): * dom/TreeScope.cpp: (WebCore::TreeScope::getSelection): * dom/make_names.pl: (printConstructorInterior): (printFactoryCppFile): (printWrapperFunctions): (printWrapperFactoryCppFile): * editing/markup.cpp: (WebCore::createFragmentFromMarkupWithContext): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::registerWithScopingNode): (WebCore::HTMLStyleElement::unregisterWithScopingNode): * html/shadow/HTMLContentElement.cpp: (WebCore::contentTagName): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowShadowDOM): (WebCore::FrameLoaderClient::allowStyleScoped): (FrameLoaderClient): (WebCore::FrameLoaderClient::allowPagePopup): * platform/RefCountedSupplement.h: Removed. * platform/Supplementable.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): 2012-06-11 Kaustubh Atrawalkar <kaustubh@motorola.com> [DRT] LTC:: counterValueForElementById() could be moved to Internals. https://bugs.webkit.org/show_bug.cgi?id=84406 Reviewed by Hajime Morita. Move the counterValueForElementById from LayoutTestCotroller to Internals and remove the old platform specific implementations as it exclusively tests WebCore functionality. Covered by existing test cases. * testing/Internals.cpp: (WebCore::Internals::counterValue): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-06-11 Hans Wennborg <hans@chromium.org> Speech JavaScript API: Make SpeechRecognitionError an Event https://bugs.webkit.org/show_bug.cgi?id=88784 Reviewed by Adam Barth. Make SpeechRecognitionError an Event. The spec was updated to make it an event in its own right, rather than an attribute of SpeechRecognitionEvent. Test: fast/speech/scripted/speechrecognition-errors.html * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::didReceiveError): * Modules/speech/SpeechRecognitionError.cpp: (WebCore::SpeechRecognitionError::SpeechRecognitionError): (WebCore::SpeechRecognitionError::interfaceName): (WebCore): * Modules/speech/SpeechRecognitionError.h: (WebCore::SpeechRecognitionError::create): (SpeechRecognitionError): * Modules/speech/SpeechRecognitionError.idl: * Modules/speech/SpeechRecognitionEvent.cpp: (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent): * Modules/speech/SpeechRecognitionEvent.h: (SpeechRecognitionEventInit): (SpeechRecognitionEvent): * Modules/speech/SpeechRecognitionEvent.idl: * dom/EventNames.in: 2012-06-12 MORITA Hajime <morrita@google.com> REGRESSION(r118098): <content> element does not render distributed children when cloned from another document https://bugs.webkit.org/show_bug.cgi?id=88148 Reviewed by Dimitri Glazkov. The shadow DOM availability was decided through FrameLoaderClient. But there are documents which don't have any associated frames, in which any shadow DOM related elements cannot be constructed. That resulsted the regression. This change introduces a Page-based client called ContextFeaturesClient which takes the role from FrameLoaderClient to decide the feature availability, and ContextFeatures which is a proxy of ContextFeaturesClient. ContextEnabledFeatures is is replaced with ContextFeatures. Each ContextFeatures object is owned by a Page, and is attached to each Document in the page even if the page itself has no referenct to Frames or Pages. With ContextFeatures, each Document can decide the feature availability even if it cannot reach Page or Frame. On RefCountedSupplement: Document instance can live longer than a Page where it is shwon. This means that ContextFeatures instance needs to survive after owner Page destruction because it's referenced from possibly surviving Documents. RefCountedSupplement is introduced to cover this scenario: It allows supplement classes to live after Page's destruction. RefCountedSupplement::hostDestroyed() is notified when the hosting page is gone. ContextFeatures clears its reference to the client using this notification. Test: fast/dom/shadow/elements-in-frameless-document.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): * dom/ContextFeatures.cpp: Added. (WebCore): (WebCore::ContextFeaturesClient::empty): (WebCore::ContextFeatures::supplementName): (WebCore::ContextFeatures::defaultSwitch): (WebCore::ContextFeatures::shadowDOMEnabled): (WebCore::ContextFeatures::styleScopedEnabled): (WebCore::ContextFeatures::pagePopupEnabled): (WebCore::provideContextFeaturesTo): (WebCore::provideContextFeaturesToDocumentFrom): * dom/ContextFeatures.h: Added. (WebCore): (ContextFeatures): (WebCore::ContextFeatures::ContextFeatures): (WebCore::ContextFeatures::hostDestroyed): (ContextFeaturesClient): (WebCore::ContextFeaturesClient::~ContextFeaturesClient): (WebCore::ContextFeaturesClient::isEnabled): (WebCore::ContextFeatures::create): (WebCore::ContextFeatures::isEnabled): * dom/DOMAllInOne.cpp: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): (WebCore::DOMImplementation::createHTMLDocument): * dom/Document.h: (WebCore::Document::contextFeatures): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setContextFeatures): * dom/Position.cpp: (WebCore::Position::Position): (WebCore::Position::findParent): * dom/TreeScope.cpp: (WebCore::TreeScope::getSelection): * dom/make_names.pl: (printConstructorInterior): (printFactoryCppFile): (printWrapperFunctions): (printWrapperFactoryCppFile): * editing/markup.cpp: (WebCore::createFragmentFromMarkupWithContext): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::registerWithScopingNode): (WebCore::HTMLStyleElement::unregisterWithScopingNode): * html/shadow/HTMLContentElement.cpp: (WebCore::contentTagName): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchDocument): * loader/FrameLoaderClient.h: * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h. (WebCore): (RefCountedSupplement): (WebCore::RefCountedSupplement::hostDestroyed): (Wrapper): (WebCore::RefCountedSupplement::Wrapper::Wrapper): (WebCore::RefCountedSupplement::Wrapper::~Wrapper): (WebCore::RefCountedSupplement::Wrapper::wrapped): (WebCore::RefCountedSupplement::provideTo): (WebCore::RefCountedSupplement::from): * platform/Supplementable.h: (WebCore::Supplement::isRefCountedWrapper): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): 2012-06-12 Kent Tamura <tkent@chromium.org> Remove unnecessary functions: setName() and formControlName() https://bugs.webkit.org/show_bug.cgi?id=88392 Reviewed by Kentaro Hara. 'name' IDL attributes of form-related elements should be [Reflected], and we don't need to have setName(). We used formControlName() for name() implementation, and formControlName() is not needed because it just converts a null attribute to an empty string. Our binding code does it. We don't remove FormAssociatedElement::name() because many C++ code use it. FormAssociatedElement::name() is virtual, and HTMLInputElement overrides it so that it returns a cache of the name attribtue value because CheckedRadioButtons class needs to know an old name attribute value when the name attribtue is changed. References: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-object-name http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-name http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-fe-name Test: fast/forms/name-attribute.html * dom/Element.h: Remove formControlName(). * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::name): Copied from formControlName() implementation of HTMLFormControlElement. * html/FormAssociatedElement.h: (FormAssociatedElement): Make name() virtual, remove formControlName(). * html/FormController.cpp: (WebCore::FormController::formElementsState): Use name() instead of formControlName(). * html/HTMLFormControlElement.cpp: Remove formControlName() and setName(). * html/HTMLFormControlElement.h: ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::name): Renamed from formControlName(). * html/HTMLInputElement.h: (HTMLInputElement): Renamed formControlName() to name(), and make it public. * html/HTMLKeygenElement.idl: Make 'name' [Reflected]. * html/HTMLObjectElement.cpp: Remove formControlName(). * html/HTMLObjectElement.h: ditto. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::appendFormData): Use name() instead of formControlName(). * html/HTMLSelectElement.idl: Make 'name' [Reflected]. * html/HTMLTextAreaElement.idl: Make 'name' [Reflected]. 2012-06-11 Nico Weber <thakis@chromium.org> Remove unused member variables found by clang's -Wunused-private-field https://bugs.webkit.org/show_bug.cgi?id=88812 Reviewed by Anders Carlsson. Change a few |class|s that were used only to pin down the size of existing classes to |struct|, so that clang doesn't warn about these memvars. No intended behavior change. * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::GeolocationController): * Modules/geolocation/GeolocationController.h: (GeolocationController): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/AudioParamTimeline.h: (AudioParamTimeline): * accessibility/AccessibilityScrollbar.h: (AccessibilityScrollbar): * bindings/v8/ScriptScope.cpp: (WebCore::ScriptScope::ScriptScope): * bindings/v8/ScriptScope.h: (ScriptScope): * css/CSSValue.cpp: * css/StylePropertySet.cpp: * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::DeviceOrientationController): * dom/DeviceOrientationController.h: (DeviceOrientationController): * editing/ReplaceSelectionCommand.cpp: (ReplacementFragment): (WebCore::ReplacementFragment::ReplacementFragment): * editing/TextIterator.cpp: (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): * editing/TextIterator.h: (SimplifiedBackwardsTextIterator): (BackwardsCharacterIterator): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * html/HTMLFormCollection.h: (HTMLFormCollection): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): * html/shadow/MediaControlElements.h: (MediaControlFullscreenButtonElement): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::LoadableTextTrack): * html/track/LoadableTextTrack.h: (LoadableTextTrack): * inspector/CodeGeneratorInspector.py: (Generator.go): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent): * inspector/InspectorDOMDebuggerAgent.h: (InspectorDOMDebuggerAgent): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/InspectorMemoryAgent.h: (InspectorMemoryAgent): * notifications/NotificationController.cpp: (WebCore::NotificationController::NotificationController): * notifications/NotificationController.h: (NotificationController): * page/animation/CompositeAnimation.h: (WebCore::CompositeAnimation::CompositeAnimation): (CompositeAnimation): * platform/Length.cpp: * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::ReverbConvolver): * platform/audio/ReverbConvolver.h: (ReverbConvolver): * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): * platform/audio/ReverbConvolverStage.h: (ReverbConvolverStage): * platform/graphics/TextRun.cpp: (ExpectedTextRunSize): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): * platform/graphics/filters/FECustomFilter.h: (FECustomFilter): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (JPEGImageReader): * platform/leveldb/LevelDBTransaction.cpp: (WebCore::LevelDBTransaction::TreeIterator::next): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::TextCodecICU): * platform/text/TextCodecICU.h: (TextCodecICU): * rendering/InlineBox.cpp: * rendering/InlineFlowBox.cpp: * rendering/RenderText.cpp: * rendering/style/KeyframeList.h: (WebCore::KeyframeList::KeyframeList): (KeyframeList): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::RenderSVGTextPath): * rendering/svg/RenderSVGTextPath.h: * rendering/svg/SVGInlineTextBox.cpp: * svg/SVGPathByteStreamSource.cpp: * svg/SVGPathByteStreamSource.h: * svg/SVGPathTraversalStateBuilder.cpp: (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder): * svg/SVGPathTraversalStateBuilder.h: (SVGPathTraversalStateBuilder): * xml/XSLStyleSheet.h: 2012-06-11 Kinuko Yasuda <kinuko@chromium.org> XHR returns size==0 Blob https://bugs.webkit.org/show_bug.cgi?id=88750 Reviewed by Alexey Proskuryakov. Response Blob's .size field must have the correct response size. Test: http/tests/xmlhttprequest/response-blob-size.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): 2012-06-11 Silvia Pfeiffer <silviapf@chromium.org> Introduce an Enclosure Element for Chromium video controls. https://bugs.webkit.org/show_bug.cgi?id=87683 Reviewed by Eric Carlson. Updated tests. The Chrome video controls are receiving a visual update. A new enclosure div is required to provide for a offset space from the video's boundaries. The visual update itself is in a separate patch. * css/mediaControlsChromium.css: (video::-webkit-media-controls-enclosure): Introduce CSS for enclosure div so it doesn't show yet. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement): Definition of the new enclosure element. (WebCore::MediaControlChromiumEnclosureElement::create): Definition of a create operator for the new enclosure element. (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId): Definition of the shadowPseudoId of -webkit-media-controls-enclosure for the enclosure div. (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Initialize member element for enclosure div. (WebCore::MediaControlRootElementChromium::create): Instantiate enclosure div and add into DOM between controls and panel elements. (WebCore::MediaControlRootElementChromium::setMediaController): Set media controller for enclosure div. (WebCore::MediaControlRootElementChromium::createTextTrackDisplay): Insert text track display container to enclosure rather than panel. * html/shadow/MediaControlRootElementChromium.h: (WebCore): (MediaControlChromiumEnclosureElement): (WebCore::MediaControlChromiumEnclosureElement::setMediaController): (WebCore::MediaControlChromiumEnclosureElement::mediaController): (WebCore::MediaControlChromiumEnclosureElement::isMediaControlElement): Add declaration of the new enclosure element and its member functions. (MediaControlRootElementChromium): Add member variable to controls root element to hold the enclosure element. 2012-06-11 Elliott Sprehn <esprehn@gmail.com> WebKit doesn't allow replacing the document element with a DocumentFragment containing one element https://bugs.webkit.org/show_bug.cgi?id=88681 Reviewed by Ojan Vafai. Fix bug where replacing an immediate child of a Document with a DocumentFragment would throw a HIERARCHY_REQUEST_ERR instead of replacing the node as required by DOM4. http://www.w3.org/TR/domcore/#mutation-algorithms * dom/Document.cpp: (WebCore::Document::canReplaceChild): When the newChild was a DocumentFragment we incorrectly iterated over the document's children twice instead of the fragment when counting the total number of elements and doctypes to enfoce that there's only one of each. 2012-06-11 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data inside https://bugs.webkit.org/show_bug.cgi?id=88773 Reviewed by Rob Buis. Handling notifyDataReceived event even if there is no data inside. This event was critical because it gives downloadFilterStream a chance to follow up NetworkStream close event, and it also make pluginView in FrameLoaderBlackBerry return normal logic. RIM PR# 164563 Reviewed internally by Leo Yang. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyDataReceived): 2012-06-11 Mary Wu <mary.wu@torchmobile.com.cn> [BlackBerry] Wrong mimetype for empty file link https://bugs.webkit.org/show_bug.cgi?id=88642 Reviewed by Rob Buis. RIM PR# 164164 For empty file link, we shouldn't give "application/octet-stream" which will lead to download. Reviewed internally by Charles Wei. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendResponseIfNeeded): 2012-06-11 Jin Yang <jin.a.yang@intel.com> GeneratorGeneratedImage should cache images for the non-tiled case https://bugs.webkit.org/show_bug.cgi?id=87094 Reviewed by Simon Fraser. We cache the generated image if generator is not changed. By compared with generating image on the fly, it will lose a little pixel precision and several layout tests should be rebaselined. With this patch, the IE test drive benchmark "Bayou" can gain about 50%. No new tests. Performance optimization. * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): 2012-06-11 Vincent Scheib <scheib@chromium.org> Add new Pointer Lock spec attribute webkitPointerLockElement. https://bugs.webkit.org/show_bug.cgi?id=88799 Reviewed by Dimitri Glazkov. Part of a series of refactoring changes to update pointer lock API to the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402 New attribute webkitPointerLockElement added. Follow up patches will remove the previous isLocked attribute. Tests updated to use the new attribute. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled): * dom/Document.cpp: (WebCore): (WebCore::Document::webkitPointerLockElement): * dom/Document.h: (Document): * dom/Document.idl: * page/PointerLockController.h: (WebCore::PointerLockController::element): 2012-06-11 Vincent Scheib <scheib@chromium.org> Consolidate Pointer Lock runtime enabled flags to just one. https://bugs.webkit.org/show_bug.cgi?id=88810 Reviewed by Dimitri Glazkov. No new tests. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::pointerLockEnabled): (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): * dom/MouseEvent.idl: * page/Navigator.idl: 2012-06-11 Alexis Menard <alexis.menard@openbossa.org> [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag. https://bugs.webkit.org/show_bug.cgi?id=88804 Reviewed by Tony Chang. Protect box-decoration-break behind a feature flag enabled by default. No new tests : no behavior change here. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSValueKeywords.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * rendering/style/RenderStyle.h: * rendering/style/StyleBoxData.cpp: (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleBoxData::operator==): * rendering/style/StyleBoxData.h: (StyleBoxData): 2012-06-11 James Robinson <jamesr@chromium.org> [chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTextureLayer https://bugs.webkit.org/show_bug.cgi?id=86273 Reviewed by Adrienne Walker. This converts more WebCore code over to using public APIs instead of internal compositor layer types. Refactor only, no change in behavior thus no new tests. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBufferPrivate::DrawingBufferPrivate): (WebCore::DrawingBufferPrivate::~DrawingBufferPrivate): (WebCore::DrawingBufferPrivate::layer): (DrawingBufferPrivate): * platform/graphics/chromium/TextureLayerChromium.cpp: (WebCore::TextureLayerChromium::~TextureLayerChromium): (WebCore::TextureLayerChromium::setRateLimitContext): (WebCore::TextureLayerChromium::setNeedsDisplayRect): (WebCore::TextureLayerChromium::update): * platform/graphics/chromium/TextureLayerChromium.h: (WebKit): (TextureLayerChromiumClient): 2012-06-11 Max Feil <mfeil@rim.com> [BlackBerry] Seek calls are being unnecessarily delayed https://bugs.webkit.org/show_bug.cgi?id=88732 Reviewed by Antonio Gomes. There is a problem with the way the m_userDrivenSeekTimer is implemented. When MediaPlayerPrivate::seek() is called, there is always a 100ms delay even if the timer is not running. The timer is supposed to space out (i.e. throttle) repeated seeks that come in too soon after a previous seek, but currently it is slowing down even single seeks and seeks that come in with adequate delay after a previous seek. I fixed this in my patch by improving the way the timer fired function is called. A note on the new m_lastSeekTimePending flag: This flag is needed so that userDrivenSeekTimerFired() knows whether or not to perform the seek. The only case where this flag will not be set is if no MediaPlayerPrivate::seek() call came in while the timer was active, in which case it's important to do nothing. I could encode this flag's information into the m_lastSeekTime float, for example by initializing it and resetting it to NAN and using isnan(). But I feel that using a separate bool is a more portable approach. No new tests. I would like to propose not including a layout test with this fix. Doing timing tests for 100ms delays is tricky from Javascript, and I don't think the benefit of such a test outweighs the extra time it would take to develop one. The test would also be a problem to maintain as it may give different results over different runs and across different target hardware. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): 2012-06-11 Max Feil <mfeil@rim.com> [BlackBerry] Unexpected repeats of short media https://bugs.webkit.org/show_bug.cgi?id=88733 Reviewed by Antonio Gomes. The m_userDrivenSeekTimer is causing unwanted repeats of short media such as sound effects because it is causing the current time to not reflect that the media has finished playing. This problem only affects media whose duration is close to or less than the SeekSubmissionDelay, which is currently set to 100ms. My fix is to ignore the userDrivenSeekTimer in MediaPlayerPrivate::currentTime() if the duration of the media is within twice the SeekSubmissionDelay. Seek drag smoothness is a non-issue for such short media. Test: platform/blackberry/media/short-media-repeats-correctly.html * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore): (WebCore::MediaPlayerPrivate::currentTime): (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): 2012-06-11 Julien Chaffraix <jchaffraix@webkit.org> Account for margin after when laying out <legend> element https://bugs.webkit.org/show_bug.cgi?id=35981 Reviewed by Abhishek Arya. Tests: fast/forms/legend-after-margin-horizontal-writing-mode.html fast/forms/legend-after-margin-vertical-writing-mode.html fast/forms/legend-after-margin-with-before-border-horizontal-mode.html fast/forms/legend-small-after-margin-before-border-horizontal-mode.html The existing code would ignore margin after when layouting out the <legend>. This change only adds the code to handle the margin after, the margin before is still ignored as it's not obvious how it should be working. * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::layoutSpecialExcludedChild): Split the code in 2 code paths to reflect how we position and size. Those are covered by the tests above. 2012-06-11 James Robinson <jamesr@chromium.org> [chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor https://bugs.webkit.org/show_bug.cgi?id=86259 Reviewed by Adrienne Walker. This refactors the compositor's rate limiting implementation to use the Platform API's WebGraphicsContext3D directly instead of WebCore::GraphicsContext3D to cut down on the number of spurious WebCore dependencies in the compositor. The one change in contract is that the caller to CCLayerTreeHost::startRateLimit() now has to call CCLayerTreeHost::stopRateLimit() before allowing the referenced context to go away since CCLayerTreeHost no longer retains a reference, but this was always happening already. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect): * platform/graphics/chromium/RateLimiter.cpp: (WebCore::RateLimiter::create): (WebCore::RateLimiter::RateLimiter): (WebCore::RateLimiter::start): (WebCore::RateLimiter::rateLimitContext): * platform/graphics/chromium/RateLimiter.h: (WebKit): (RateLimiter): * platform/graphics/chromium/TextureLayerChromium.cpp: (WebCore::TextureLayerChromium::~TextureLayerChromium): (WebCore::TextureLayerChromium::setRateLimitContext): (WebCore::TextureLayerChromium::setNeedsDisplayRect): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::startRateLimiter): (WebCore::CCLayerTreeHost::stopRateLimiter): (WebCore::CCLayerTreeHost::rateLimit): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-06-11 Dana Jansens <danakj@chromium.org> [chromium] Separate CCVideoDrawQuad and from the layer tree and video provider by removing ManagedTexture and WebVideoFrame pointers from the quad https://bugs.webkit.org/show_bug.cgi?id=88363 Reviewed by Adrienne Walker. CCVideoDrawQuad should not contain any pointers to data in the layer tree so we are able to serialize it across process boundaries. This patch removes the ManagedTexture pointers from the quad class, replacing them with texture ids. It removes the WebVideoFrame* from the quad, replacing it with the frame provider's texture id included in the WebVideoFrame structure. And it uses a WebTransformationMatrix instead of a pointer to an array of floats. Texture allocation is done in CCVideoLayerImpl via the contentsTextureAllocator, so that the memory usage can be tracked. We move the copyPlaneToTextures() method back from LayerRendererChromium to CCVideoLayerImpl, as this method uses the texture data pointer in the WebVideoFrame, and we do not want to give this pointer to the quad class. Instead, this method makes use of the LayerTextureSubImage class to copy the pixel data into the texture. LayerTextureSubImage is updated to allow non-4byte texture formats. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawYUV): (WebCore::LayerRendererChromium::drawRGBA): (WebCore::LayerRendererChromium::drawNativeTexture2D): (WebCore::LayerRendererChromium::drawStreamTexture): (WebCore::LayerRendererChromium::drawVideoQuad): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/TextureCopier.cpp: * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: (WebCore::CCVideoDrawQuad::create): (WebCore::CCVideoDrawQuad::CCVideoDrawQuad): * platform/graphics/chromium/cc/CCVideoDrawQuad.h: (CCVideoDrawQuad): (WebCore::CCVideoDrawQuad::planes): (WebCore::CCVideoDrawQuad::frameProviderTextureId): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::appendQuads): (WebCore::CCVideoLayerImpl::didDraw): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::copyPlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (FramePlane): (WebCore::CCVideoLayerImpl::FramePlane::FramePlane): 2012-06-11 Joshua Bell <jsbell@chromium.org> IndexedDB: Object stores are not successfully deleted https://bugs.webkit.org/show_bug.cgi?id=88788 Reviewed by Tony Chang. Discovered while working on http://webkit.org/b/83074 - object stores are not being deleted from the backing store. Deletion would succeed in the in-memory data structures, but after closing/re-opening the backing store the object store (but not its indexes/data) would reappear. Due to 83074, this isn't detectable by DRT without a full restart. Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest' * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare): 2012-06-05 Eric Uhrhane <ericu@chromium.org> Crash in fast/files/read tests during Garbage Collection https://bugs.webkit.org/show_bug.cgi?id=87165 Reviewed by Michael Saboff Fix previous fix for hasPendingActivity, and fix a bug in a complex abort case as well--abort during the final progress event of a write would hang the writer. * Modules/filesystem/FileWriter.cpp: (WebCore::FileWriter::stop): (WebCore::FileWriter::write): (WebCore::FileWriter::truncate): (WebCore::FileWriter::didWrite): (WebCore::FileWriter::didTruncate): (WebCore::FileWriter::didFail): (WebCore::FileWriter::completeAbort): (WebCore::FileWriter::doOperation): (WebCore::FileWriter::signalCompletion): 2012-06-11 Shawn Singh <shawnsingh@chromium.org> [chromium] Implement position:fixed in compositor thread https://bugs.webkit.org/show_bug.cgi?id=70103 Reviewed by Adrienne Walker. Significant contributions to this patch by Alpha Lam and Sami Kyostila. This patch is the compositor-side change that adds support for fixed-position layers to be composited layers. Before this patch, fixed-position elements were positioned only by WebCore (i.e. main thread when painting), and the compositor did not have enough knowledge on its own to position it properly. This patch adds the necessary math and plumbs the necessary layer information so that the impl thread can properly position fixed-position elements on its own. This support is necessary for correctness of composited fixed-position elements, which can greatly help to avoid repainting container layers when scrolling with a fixed-position layer. There also needs to be WebCore-side support for this, which is addressed in https://bugs.webkit.org/show_bug.cgi?id=78864 Unit tests added to CCLayerTreeHostCommonTest: CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDirectContainer CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithTransformedDirectContainer CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainer CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainerAndTransforms CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleScrollDeltas CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithIntermediateSurfaceAndTransforms CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleIntermediateSurfaces CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithContainerLayerThatHasSurface CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatIsAlsoFixedPositionContainer CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatHasNoContainer * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setIsContainerForFixedPositionLayers): (WebCore::LayerChromium::isContainerForFixedPositionLayers): (LayerChromium): (WebCore::LayerChromium::setFixedToContainerLayerVisibleRect): (WebCore::LayerChromium::fixedToContainerLayerVisibleRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setIsContainerForFixedPositionLayers): (WebCore::CCLayerImpl::isContainerForFixedPositionLayers): (CCLayerImpl): (WebCore::CCLayerImpl::setFixedToContainerLayerVisibleRect): (WebCore::CCLayerImpl::fixedToContainerLayerVisibleRect): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::computeScrollCompensationForThisLayer): (WebCore): (WebCore::computeScrollCompensationMatrixForChildren): (WebCore::calculateDrawTransformsInternal): (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms): 2012-06-11 Sam Weinig <sam@webkit.org> Remove support for disconnected/excluded from search frames, they are not used by Safari anymore https://bugs.webkit.org/show_bug.cgi?id=88723 Reviewed by Dan Bernstein. * WebCore.exp.in: Update export. * editing/Editor.cpp: (WebCore::Editor::rangeOfString): (WebCore::Editor::countMatchesForText): * editing/Editor.h: (Editor): * loader/FrameLoader.cpp: (WebCore::FrameLoader::findFrameForNavigation): * page/DOMWindow.cpp: (WebCore::DOMWindow::parent): (WebCore::DOMWindow::top): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/Frame.cpp: (WebCore::Frame::Frame): * page/Frame.h: (Frame): * page/FrameTree.cpp: (WebCore::FrameTree::parent): (WebCore::FrameTree::top): * page/FrameTree.h: (FrameTree): * page/Location.cpp: (WebCore::Location::ancestorOrigins): * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::hasNoStyleInformation): Update for the removal of disconnected frames and text search exclusions concepts. 2012-06-11 Xianzhu Wang <wangxianzhu@chromium.org> SVGImageCache leaks image data https://bugs.webkit.org/show_bug.cgi?id=87792 There are two functions to remove a client from a CachedImage: - CachedResource::removeClient() - CachedImage::removeClientForRenderer(). It's easy to make error to call the former which will leak the cached image buffers in SVGImageCache. This change combined the two by adding the virtual CachedResource::didRemoveClient(). CachedImage will do SVGImageCache cleanup in the function. Reviewed by Nikolas Zimmermann. Test: svg/as-image/svg-image-leak-cached-data.html * loader/cache/CachedFont.h: (WebCore::CachedFontClient::resourceClientType): Added 'const'. * loader/cache/CachedImage.cpp: (WebCore): (WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache. (WebCore::CachedImage::lookupOrCreateImageForRenderer): * loader/cache/CachedImage.h: (CachedImage): (WebCore::CachedImageClient::resourceClientType): Added 'const'. * loader/cache/CachedRawResource.h: (WebCore::CachedRawResourceClient::resourceClientType): Added 'const'. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::removeClient): Added invocation of didRemoveClient(). * loader/cache/CachedResource.h: (WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works. * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::resourceClientType): Added 'const'. * loader/cache/CachedSVGDocument.h: (WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'. * loader/cache/CachedStyleSheetClient.h: (WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'. * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::removeClient): * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::removeClient): * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks. (WebCore::SVGImageCache::removeClientFromCache): (WebCore::SVGImageCache::setRequestedSizeAndScales): (WebCore::SVGImageCache::requestedSizeAndScales): (WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient): * svg/graphics/SVGImageCache.h: (WebCore): (SVGImageCache): 2012-06-11 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call shared timer functions directly https://bugs.webkit.org/show_bug.cgi?id=88781 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/SharedTimerChromium.cpp: (WebCore::setSharedTimerFiredFunction): (WebCore::setSharedTimerFireInterval): 2012-06-11 Pravin D <pravind.2k4@gmail.com> Relative pos. input fields in columns vanish when you start typing in them https://bugs.webkit.org/show_bug.cgi?id=76834 Reviewed by Julien Chaffraix. Test: fast/multicol/multicol-with-child-renderLayer-for-input.html * page/FrameView.cpp: (WebCore::updateLayerPositionFlags): Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters. If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags. Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is included in the flags. (WebCore): (WebCore::FrameView::layout): Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags. * rendering/RenderLayer.h: (WebCore::RenderLayer::isPaginated): (RenderLayer): isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags. 2012-06-11 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Remove some dead code in PasteboardChromium https://bugs.webkit.org/show_bug.cgi?id=88782 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. Leftover detritus from bug 88038. * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::documentFragment): 2012-06-11 Peter Beverloo <peter@chromium.org> [Chromium] Theme updates for Android in menu list rendering and selection backgrounds https://bugs.webkit.org/show_bug.cgi?id=88775 Reviewed by Adam Barth. For Chrome on Android, use the width of the scrollbar down arrow instead of the scrollbar's width for determining the arrow padding to apply for menu list rendering, as WebKit isn't drawing a scrollbar (thus width=0). Furthermore, change the default active selection background color to be equal to the tap highlighting color. These changes should be covered by existing layout tests. * rendering/RenderThemeChromiumAndroid.cpp: (WebCore::RenderThemeChromiumAndroid::menuListArrowPadding): (WebCore): Retrieve the scrollbar down arrow's size via PlatformSupport. * rendering/RenderThemeChromiumAndroid.h: Override the menuListArrowPadding and platformActiveSelectionBackgroundColor methods, and add a static static RGBA32 color for the default active selection bg color. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::menuListArrowPadding): Default to the scrollbar thickness, not changing behavior for non-Android. (WebCore::RenderThemeChromiumSkia::menuListInternalPadding): Instead of polling the scrollbar thickness, call menuListArrowPadding(). * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): Add the menuListArrowPadding() as a protected method. 2012-06-11 David Barr <davidbarr@chromium.org> Add css3-images image-resolution (dppx only) https://bugs.webkit.org/show_bug.cgi?id=85332 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#image-resolution Test: fast/css/image-resolution.html * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::unitFromString): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::parseValue): (WebCore): (WebCore::CSSParser::parseImageResolution): (WebCore::CSSParser::detectNumberToken): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::unitCategory): (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): (WebCore::CSSPrimitiveValue::customCssText): (WebCore::CSSPrimitiveValue::cloneForCSSOM): * css/CSSPrimitiveValue.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (WebCore): (ApplyPropertyImageResolution): (WebCore::ApplyPropertyImageResolution::applyInheritValue): (WebCore::ApplyPropertyImageResolution::applyInitialValue): (WebCore::ApplyPropertyImageResolution::applyValue): (WebCore::ApplyPropertyImageResolution::createHandler): (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderImage.cpp: (WebCore::RenderImage::styleDidChange): (WebCore::RenderImage::imageDimensionsChanged): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-06-05 Dana Jansens <danakj@chromium.org> [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed https://bugs.webkit.org/show_bug.cgi?id=88371 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.layersFreeTextures * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::willDraw): 2012-06-11 Carlos Garcia Campos <cgarcia@igalia.com> Unreviewed. Fix make distcheck issues. * GNUmakefile.am: Add idl files in editing dir to EXTRA_DIST. * GNUmakefile.list.am: Add missing header file. 2012-06-11 Dan Bernstein <mitz@apple.com> Reverted r119940 because it caused multiple media tests to fail on Lion. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): (WebCore): (WebCore::HTMLMediaElement::userCancelledLoad): * html/HTMLMediaElement.h: (HTMLMediaElement): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): 2012-06-11 Zoltan Horvath <zoltan@webkit.org> [Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)$ https://bugs.webkit.org/show_bug.cgi?id=87841 Reviewed by Simon Hausmann. No new tests were needed. * Target.pri: * WebCore.pri: * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageDecoder::create): 2012-06-11 Kenneth Rohde Christiansen <kenneth@webkit.org> Add QML api for setting device width and height https://bugs.webkit.org/show_bug.cgi?id=88777 Reviewed by Simon Hausmann. Change the default values for deviceWidth/Height to be 0 (unset). The original values were introduced by Qt and 0 makes it possible to detect if a value has never been set and therefore fall back. Only Qt depended on the former values. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-06-11 Csaba Osztrogonác <ossy@webkit.org> [Qt][Win] Fix UString related build problem in Source/WebCore/bridge/qt/qt_instance.cpp https://bugs.webkit.org/show_bug.cgi?id=88310 Reviewed by Simon Hausmann. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::getPropertyNames): 2012-06-11 Michael Brüning <michael.bruning@nokia.com> [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Unreviewed build fix. No new tests added as this is a build fix. * platform/qt/FileSystemQt.cpp: 2012-06-11 Allan Sandfeld Jensen <allan.jensen@nokia.com> Rect-based hittesting doesn't work in tables. https://bugs.webkit.org/show_bug.cgi?id=86605 Reviewed by Julien Chaffraix. The existing code only performed a single binary lookup for the central hit-test point. This meant area-based hit-testing did not work across table-cell borders. All cells spanned by a hit-test area must be hit tested. This patch introduces three auxilary functions to help calculate rows and columns spanned by an rect. These are intended to also be used by repaint logic in a later patch. For point-based hit-testing we maintain unchanged behavior and still only hit test a single column in a single row. Test: fast/dom/nodesFromRect-table.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection): (WebCore::RenderTableSection::spannedRows): (WebCore::RenderTableSection::spannedColumns): (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderTableSection.h: (RenderTableSection): 2012-06-11 Min Qin <qinmin@google.com> Adding a flag to show fullscreen media controls in chromium https://bugs.webkit.org/show_bug.cgi?id=88266 Reviewed by Adam Barth. The default chromium shadow DOM for media element does not contain fullscreen button. This change adds a flag to display the fullscreen button. It will be used by the android port. No new tests needed. We will use the same layout tests as desktop chromium. However, new test result expections will be added later. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): (WebCore::MediaControlRootElementChromium::create): (WebCore::MediaControlRootElementChromium::setMediaController): (WebCore::MediaControlRootElementChromium::reset): (WebCore::MediaControlRootElementChromium::reportedError): * html/shadow/MediaControlRootElementChromium.h: (MediaControlRootElementChromium): 2012-06-11 Michael Brüning <michael.bruning@nokia.com> [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Reviewed by Kenneth Rohde Christiansen. No new tests needed / applicable (using operating system functionality). Added method to read free file system space for a path to support cache model implementation in Qt WK 2. * platform/FileSystem.h: (WebCore): * platform/qt/FileSystemQt.cpp: (WebCore::getVolumeFreeSizeForPath): Added for Qt ports. (WebCore): 2012-06-11 Peter Wang <peter.wang@torchmobile.com.cn> [JSC] Web Inspector: implement breaking from native callback https://bugs.webkit.org/show_bug.cgi?id=43332 Reviewed by Pavel Feldman. These test cases were enabled: LayoutTests/inspector/debugger/dom-breakpoints.html LayoutTests/inspector/debugger/event-listener-breakpoints.html LayoutTests/inspector/debugger/step-through-event-listeners.html LayoutTests/inspector/debugger/xhr-breakpoints.html * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::breakProgram): * bindings/js/ScriptDebugServer.h: (WebCore::supportsNativeBreakpoints): 2012-06-11 MORITA Hajime <morrita@google.com> Spellchecker crash in async scenario. https://bugs.webkit.org/show_bug.cgi?id=88617 Reviewed by Tony Chang. SpellCheckRequest::invokeRequest() can be reached after the frame is detached. SpellCheckRequest should ignore such a request since TextCheckerClient is not available for detached Frames. No new tests. It's hard to reproduce this. * editing/SpellChecker.cpp: (WebCore::SpellChecker::invokeRequest): 2012-06-11 Ryuan Choi <ryuan.choi@samsung.com> [EFL] Extract CursorMap from WidgetEfl.cpp. https://bugs.webkit.org/show_bug.cgi?id=88633 Reviewed by Ryosuke Niwa. In order to share CursorMap in WebKit/efl and UIProcess of WebKit2/Efl, extract it and expose getEcoreCursor. No new tests, refactoring only. * platform/efl/EflScreenUtilities.cpp: (WebCore): (CursorMap): (WebCore::CursorMap::cursor): (WebCore::CursorMap::CursorMap): (WebCore::getEcoreCursor): * platform/efl/EflScreenUtilities.h: (WebCore): * platform/efl/WidgetEfl.cpp: (WebCore::Widget::applyFallbackCursor): 2012-06-10 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119955. http://trac.webkit.org/changeset/119955 https://bugs.webkit.org/show_bug.cgi?id=88758 Breaks Chromium compile - Chromium depends on removed API (Requested by dominicc on #webkit). * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::insideVisibleArea): (WebCore): (WebCore::Editor::firstVisibleRange): (WebCore::Editor::lastVisibleRange): (WebCore::Editor::nextVisibleRange): (WebCore::Editor::rangeOfString): (WebCore::Editor::countMatchesForText): * editing/Editor.h: (Editor): * loader/FrameLoader.cpp: (WebCore::FrameLoader::findFrameForNavigation): * page/DOMWindow.cpp: (WebCore::DOMWindow::parent): (WebCore::DOMWindow::top): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/Frame.cpp: (WebCore::Frame::Frame): * page/Frame.h: (Frame): (WebCore::Frame::isDisconnected): (WebCore): (WebCore::Frame::setIsDisconnected): (WebCore::Frame::excludeFromTextSearch): (WebCore::Frame::setExcludeFromTextSearch): * page/FrameTree.cpp: (WebCore::FrameTree::parent): (WebCore::FrameTree::top): * page/FrameTree.h: (FrameTree): * page/Location.cpp: (WebCore::Location::ancestorOrigins): * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::hasNoStyleInformation): 2012-06-08 Kinuko Yasuda <kinuko@chromium.org> Using BlobBuilder should show a deprecation warning message (if it is enabled) https://bugs.webkit.org/show_bug.cgi?id=88644 Reviewed by Jian Li. Mac has already disabled BlobBuilder, but Chromium still has it. We should start showing a warning to let people migrate to using Blob constructor. Tests: fast/files/blob-builder-crash.html * fileapi/WebKitBlobBuilder.cpp: (WebCore): (WebCore::WebKitBlobBuilder::create): * fileapi/WebKitBlobBuilder.h: (WebCore): (WebKitBlobBuilder): * fileapi/WebKitBlobBuilder.idl: 2012-06-10 Sam Weinig <sam@webkit.org> Remove support for disconnected/excluded from search frames, they are not used by Safari anymore https://bugs.webkit.org/show_bug.cgi?id=88723 Reviewed by Dan Bernstein. * WebCore.exp.in: Update export. * editing/Editor.cpp: (WebCore::Editor::rangeOfString): (WebCore::Editor::countMatchesForText): * editing/Editor.h: (Editor): * loader/FrameLoader.cpp: (WebCore::FrameLoader::findFrameForNavigation): * page/DOMWindow.cpp: (WebCore::DOMWindow::parent): (WebCore::DOMWindow::top): * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/Frame.cpp: (WebCore::Frame::Frame): * page/Frame.h: (Frame): * page/FrameTree.cpp: (WebCore::FrameTree::parent): (WebCore::FrameTree::top): * page/FrameTree.h: (FrameTree): * page/Location.cpp: (WebCore::Location::ancestorOrigins): * xml/XMLTreeViewer.cpp: (WebCore::XMLTreeViewer::hasNoStyleInformation): Update for the removal of disconnected frames and text search exclusions concepts. 2012-06-07 Kinuko Yasuda <kinuko@google.com> Move Quota related code out of DOMWindow and into the quota/ folder https://bugs.webkit.org/show_bug.cgi?id=88512 Reviewed by Adam Barth. No new tests: no visible changes. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * Modules/quota/DOMWindowQuota.cpp: Added. * Modules/quota/DOMWindowQuota.h: Added. * Modules/quota/DOMWindowQuota.idl: Added. * Modules/quota/StorageInfo.cpp: Renamed from Source/WebCore/storage/StorageInfo.cpp. * Modules/quota/StorageInfo.h: Renamed from Source/WebCore/storage/StorageInfo.h. * Modules/quota/StorageInfo.idl: Renamed from Source/WebCore/storage/StorageInfo.idl. * Modules/quota/StorageInfoErrorCallback.h: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.h. * Modules/quota/StorageInfoErrorCallback.idl: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.idl. * Modules/quota/StorageInfoQuotaCallback.h: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.h. * Modules/quota/StorageInfoQuotaCallback.idl: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.idl. * Modules/quota/StorageInfoUsageCallback.h: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.h. * Modules/quota/StorageInfoUsageCallback.idl: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.idl. * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * WebCore.xcodeproj/project.pbxproj: * page/DOMWindow.cpp: * page/DOMWindow.h: * page/DOMWindow.idl: 2012-06-10 Hayato Ito <hayato@chromium.org> An inheritance of '-webkit-user-modify' does not stop at shadow boundary. https://bugs.webkit.org/show_bug.cgi?id=88514 Reviewed by Ryosuke Niwa. In StyleResolver::styleForElement(), we reset '-webkit-user-modify' CSS property after inheriting a parent style, but that is not enough. We also have to reset '-webkit-user-modify' when we use a cached result in applying matched properties. Test: fast/dom/shadow/user-modify-inheritance.html * css/StyleResolver.cpp: (WebCore::StyleResolver::applyMatchedProperties): (WebCore::StyleResolver::styleForElement): * css/StyleResolver.h: (StyleResolver): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::inheritFrom): * rendering/style/RenderStyle.h: 2012-06-10 Yoshifumi Inoue <yosin@chromium.org> [Forms] Introduce Decimal behind the InputNumber type https://bugs.webkit.org/show_bug.cgi?id=88383 Reviewed by Kent Tamura. This patch introduces decimal arithmetic for steppable input types, e.g. date, datetime, number, range, and so on, to avoid rounding error caused by base 2 floating point representation, e.g. C/C++ double type. Most of decimal arithmetic calculations are implemented in StepRange class, replacing "double" with "Decimal", InputType::applyStep, and InputType::stepFromRenderer. Changes introduced by this patch are still intermediate state. Following patch will replace InputNumber type to Decimal type for completion of introducing decimal arithmetic. Test: fast/forms/range/range-value-rounding.html * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::serialize): Changed for Decimal type. (WebCore::BaseDateAndTimeInputType::serializeWithComponents): ditto. * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber. * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber. * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber. * html/InputType.cpp: (WebCore::InputType::rangeUnderflow): Changed for Decimal type. (WebCore::InputType::rangeOverflow): Changed for Decimal type. (WebCore::InputType::minimum): Changed for Decimal type. (WebCore::InputType::maximum): ditto. (WebCore::InputType::isInRange): ditto. (WebCore::InputType::isOutOfRange): ditto. (WebCore::InputType::stepMismatch): ditto. (WebCore::InputType::validationMessage): ditto. (WebCore::InputType::parseToNumberOrNaN): ditto. (WebCore::InputType::applyStep): ditto. (WebCore::InputType::stepUpFromRenderer): ditto. * html/InputType.h: (InputType): Removed parseToNumberWIthDecimaplPlaces. * html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange): Changed for Decimal type. * html/NumberInputType.cpp: (WebCore::RealNumberRenderSize): Added for calculateRenderSize. (WebCore::calculateRenderSize): Added. This function replacess lengthBeforeDecimalPoint. (WebCore::NumberInputType::createStepRange): Changed for Decimal type. (WebCore::NumberInputType::sizeShouldIncludeDecoration): Changed to use calculateRenderSize. (WebCore::NumberInputType::parseToNumber): Changed for Decimal type. (WebCore::NumberInputType::serialize): ditto. * html/NumberInputType.h: (NumberInputType): Removed parseToNumberWIthDecimaplPlaces. * html/RangeInputType.cpp: (WebCore::RangeInputType::createStepRange): Changed for Decimal type. (WebCore::RangeInputType::handleKeydownEvent): ditto. (WebCore::RangeInputType::parseToNumber): ditto. (WebCore::RangeInputType::serialize): ditto. * html/StepRange.cpp: (WebCore::StepRange::StepRange): Removed decimal places and changed for Decimal type. (WebCore::StepRange::acceptableError): Changed for Decimal type. (WebCore::StepRange::alignValueForStep): ditto. (WebCore::StepRange::clampValue): Changed for Decimal type and std::min/max. (WebCore::StepRange::parseStep): Changed for Decimal type and removed NumberWithDecimalPlaces. (WebCore::StepRange::stepMismatch): Changed for Decimal type. (WebCore::convertDoubleToInputNumber): Changed to real implementation. (WebCore::convertInputNumberToDouble): Changed to real implementation. * html/StepRange.h: (InputNumber): Replacement of NumberWithDecimalPlaces. (WebCore::StepRange::InputNumber::InputNumber): * html/TimeInputType.cpp: (WebCore::TimeInputType::createStepRange): Changed for Decimal type. * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): Changed for Decimal type. * html/parser/HTMLParserIdioms.cpp: (WebCore::serializeForNumberType): Added Decimal version. (WebCore::parseToDecimalForNumberType): Added. * html/parser/HTMLParserIdioms.h: Updated comments for parseToDoubleForNumberType. * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): Changed for Decimal type. 2012-06-10 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] Possible to clobber httponly cookie. https://bugs.webkit.org/show_bug.cgi?id=86067 Reviewed by Rob Buis. If a cookie is set by javaScript and there is already a same httpOnly cookie in cookieManager, we should reject it. If it has a httpOnly property, we reject it, too. Test: http/tests/cookies/js-get-and-set-http-only-cookie.html * platform/blackberry/CookieJarBlackBerry.cpp: (WebCore::setCookies): * platform/blackberry/CookieManager.cpp: (WebCore::CookieManager::setCookies): (WebCore::CookieManager::checkAndTreatCookie): (WebCore::CookieManager::addCookieToMap): (WebCore::CookieManager::setPrivateMode): * platform/blackberry/CookieManager.h: * platform/blackberry/CookieMap.cpp: (WebCore::CookieMap::addOrReplaceCookie): (WebCore::CookieMap::removeCookie): * platform/blackberry/CookieMap.h: (CookieMap): 2012-06-10 Pablo Flouret <pablof@motorola.com> Access control allow lists starting with a comma are parsed incorrectly (CORS) https://bugs.webkit.org/show_bug.cgi?id=88461 Reviewed by Adam Barth. The parsing algorithm would stop parsing at the first comma (being an empty entry, of sorts) and bail out, effectively ignoring the whole header. Test: http/tests/xmlhttprequest/access-control-allow-lists-starting-with-comma.html * loader/CrossOriginPreflightResultCache.cpp: (WebCore::parseAccessControlAllowList): 2012-06-10 Darin Adler <darin@apple.com> Some additional tweaks to keep TreeShared code simple/clean https://bugs.webkit.org/show_bug.cgi?id=88738 Reviewed by Adam Barth. * platform/TreeShared.h: Make constructor and destructor both protected. It's slightly dangerous to have a public non-virtual destructor, and there is no reason it needs to be public. (WebCore::TreeShared::~TreeShared): Make debug-only destructor non-virtual; we were getting no value from it being virtual. Now that it's non-virtual, there is no need to use an #if on it since it's an empty inline destructor in non-debug builds. 2012-06-06 Jer Noble <jer.noble@apple.com> REGRESSION: Setting invalid media "src" does not cause "error" event https://bugs.webkit.org/show_bug.cgi?id=88423 Reviewed by Eric Carlson. Test: http/tests/media/video-src-invalid-error.html Two problems here. When the loadTimer is scheduled, the m_pendingLoadFlags variable is set to specify what type of load is scheduled. It is cleared when the loadTimer fires. But, when prepareForLoad() stops the loadTimer, it does not clear the m_pendingLoadFlags variable, so the next time scheduleLoad() is called (when the src is changed to an invalid URL) prepareForLoad() is not called again. Second problem: Due to a bug in QTKit (<rdar://problem/11606415>), the QTMovieLoadStateChangedNotification is never fired for an invalid http URL if QTMovieOpenAsyncRequiredAttribute:YES is not passed when creating the QTMovie. Add a new utility method which both stops the m_loadTimer and clears the m_pendingLoadFlags, and use it in all the places where m_loadTimer was stopped explicitly: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::stopLoadTimer): Added (WebCore::HTMLMediaElement::userCancelledLoad): * html/HTMLMediaElement.h: And pass QTMovieOpenAsyncRequiredAttribute:YES when creating the QTMovie: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): 2012-06-06 Jer Noble <jer.noble@apple.com> Add logging functions to MediaPlayerPrivateQTKit. https://bugs.webkit.org/show_bug.cgi?id=88425 Reviewed by Eric Carlson. No new tests; adds logging functions to aide debugging. MediaPlayerPrivateQTKit should emit the same kind of logging messages as other MediaPlayerPrivate engines to aide in debugging. Distinguish between loadedRangesChanged() and loadStateChanged() for logging purposes: * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::loadedRangesChanged): (-[WebCoreMovieObserver loadedRangesChanged:]): Add LOG messages for each of the following functions: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::~MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::createQTMovie): (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer): (WebCore::MediaPlayerPrivateQTKit::destroyQTVideoRenderer): (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer): (WebCore::MediaPlayerPrivateQTKit::destroyQTMovieLayer): (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering): (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering): (WebCore::MediaPlayerPrivateQTKit::load): (WebCore::MediaPlayerPrivateQTKit::prepareToPlay): (WebCore::MediaPlayerPrivateQTKit::play): (WebCore::MediaPlayerPrivateQTKit::pause): (WebCore::MediaPlayerPrivateQTKit::seek): (WebCore::MediaPlayerPrivateQTKit::cancelSeek): (WebCore::MediaPlayerPrivateQTKit::setVolume): (WebCore::MediaPlayerPrivateQTKit::setRate): (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch): (WebCore::MediaPlayerPrivateQTKit::cancelLoad): (WebCore::MediaPlayerPrivateQTKit::prepareForRendering): (WebCore::MediaPlayerPrivateQTKit::updateStates): (WebCore::MediaPlayerPrivateQTKit::loadStateChanged): (WebCore::MediaPlayerPrivateQTKit::rateChanged): (WebCore::MediaPlayerPrivateQTKit::sizeChanged): (WebCore::MediaPlayerPrivateQTKit::timeChanged): (WebCore::MediaPlayerPrivateQTKit::didEnd): (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): 2012-06-07 Jer Noble <jer.noble@apple.com> WebCore should use a single definition of an invalid media time. https://bugs.webkit.org/show_bug.cgi?id=88572 Reviewed by Eric Carlson. No new tests; no change in functionality, so covered by existing tests. Add a new, universal definition for an invalid media time: * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayer::invalidTime): Use this new definition instead of the hodge podge of (identical) local definitions for an invalid media time: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::invalidateCachedTime): (WebCore::HTMLMediaElement::currentTime): (WebCore::HTMLMediaElement::initialTime): (WebCore::HTMLMediaElement::playbackProgressTimerFired): (WebCore::HTMLMediaElement::prepareMediaFragmentURI): (WebCore::HTMLMediaElement::applyMediaFragmentURI): * html/MediaFragmentURIParser.cpp: (WebCore::MediaFragmentURIParser::invalidTimeValue): (WebCore::MediaFragmentURIParser::MediaFragmentURIParser): (WebCore::MediaFragmentURIParser::startTime): (WebCore::MediaFragmentURIParser::endTime): (WebCore::MediaFragmentURIParser::parseTimeFragment): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::duration): (WebCore::MediaPlayerPrivateAVFoundation::seeking): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::duration): (WebCore::MediaPlayerPrivateQTKit::updateStates): (WebCore::MediaPlayerPrivateQTKit::timeChanged): 2012-06-10 Darin Adler <darin@apple.com> Remove unneeded callRemovedLastRef function from TreeShared refactoring https://bugs.webkit.org/show_bug.cgi?id=88653 Reviewed by Sam Weinig. * WebCore.exp.in: Updated to remove callRemovedLastRef and add removedLastRef. * dom/ContainerNode.cpp: Removed callRemovedLastRef, which is no longer needed and also had a bad cast in it. * dom/Document.h: Made removedLastRef private and non-virtual and made Node a friend so it can call the private function. * dom/Node.cpp: (WebCore::Node::removedLastRef): Moved here. This should not be an inline function. Added comments explaining why it should not be inlined. Also added explicit code to call to Document::removedLastRef, and added a comment why that's the right thing to do here. * dom/Node.h: Inherit from TreeShared<Node, ContainerNode>. Made the removedLastRef function non-virtual and removed it from the header file. Updated TreeShared using statements. Made the TreeShared template class a friend so it can call the private removedLastRef. * html/HTMLFormControlElement.h: Updated TreeShared using statements to specify Node instead, which accomplishes the same thing. * html/HTMLObjectElement.h: Ditto. * platform/TreeShared.h: Made TreeShared take two template arguments for the node type and the parent node type. Removed the callRemovedLastRef functions and the extra forward declarations it required. Removed the private unused removedLastRef function; not sure why it was left in here at all. (WebCore::TreeShared::deref): Call removedLastRef instead of callRemovedLastRef. (WebCore::TreeShared::setParent): Use ParentNodeType. (WebCore::TreeShared::parent): Ditto. (WebCore::adopted): Updated to have both template arguments. * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::removedLastRef): Replaced callRemovedLastRef with this. Moved the body out of the header and added a comment explaining why the function should not be inlined. * svg/SVGElementInstance.h: Made removedLastRef non-virtual, non-inline, and private. Made TreeShared a friend so it can call the private removedLastRef. Updated TreeShared using statements. 2012-06-10 Darin Adler <darin@apple.com> * WebCore.exp.in: Re-sorted and alphabetized the file. 2012-06-10 Balazs Kelemen <kbalazs@webkit.org> [Qt][Win] Fix building Source/WebCore/plugins/win/PluginViewWin.cpp https://bugs.webkit.org/show_bug.cgi?id=88308 Reviewed by Simon Hausmann. No new tests, just a build fix. Use ownerWindow() from page client. It has been introduced for x11 plugins to solve exactly the same problem. * plugins/win/PluginViewWin.cpp: (windowHandleForPageClient): 2012-06-10 Balazs Kelemen <kbalazs@webkit.org> [Qt][Win] Fix building ImageQt.cpp https://bugs.webkit.org/show_bug.cgi?id=88306 Reviewed by Simon Hausmann. No new tests, this is just a build fix. * platform/graphics/qt/ImageQt.cpp: (WebCore): (WebCore::BitmapImage::create): Adapt to the "API" changes in Qt. 2012-06-09 Gregg Tavares <gman@google.com> Make WebGL mark draws for compositing even if the draw count is zero https://bugs.webkit.org/show_bug.cgi?id=88718 Reviewed by Kenneth Russell. No new tests as no new functionality. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::drawArrays): (WebCore::WebGLRenderingContext::drawElements): 2012-06-09 Dominic Cooney <dominicc@chromium.org> [Chromium] Remove JavaScriptCore dependencies from gyp https://bugs.webkit.org/show_bug.cgi?id=88510 Reviewed by Adam Barth. Chromium doesn't support JSC any more and there doesn't seem to be a strong interest in using GYP as the common build system in other ports. No new functionality => No new tests. * gyp/WebCore.gyp: Removed. * gyp/copy-forwarding-and-icu-headers.sh: Removed. * gyp/copy-inspector-resources.sh: Removed. * gyp/generate-derived-sources.sh: Removed. * gyp/generate-webcore-export-file-generator.sh: Removed. * gyp/gtk.gyp: Removed. * gyp/run-if-exists.sh: Removed. * gyp/streamline-inspector-source.sh: Removed. * gyp/update-info-plist.sh: Removed. 2012-06-07 Darin Adler <darin@apple.com> Refactor and improve code style in TextResourceDecoder to prepare for buffering improvement https://bugs.webkit.org/show_bug.cgi?id=88566 Reviewed by Alexey Proskuryakov. * loader/TextResourceDecoder.cpp: (WebCore::bytesEqual): Added helper function to make comparing against sequences of bytes easier to read at the call site. (WebCore::KanjiCode::judge): Changed to use bytesEqual in a few places, merged multiple if statements, got rid of else after goto. (WebCore::TextResourceDecoder::checkForCSSCharset): Changed to use early return instead of nesting the whole function. Changed to use bytesEqual. (WebCore::skipComment): Changed to use early return for more cases. Changed to use bytesEqual. (WebCore::TextResourceDecoder::checkForHeadCharset): Changed to use bytesEqual. (WebCore::TextResourceDecoder::decode): Changed to use emptyString() instead of "", since the former is more efficient. 2012-06-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118618 and r119353. http://trac.webkit.org/changeset/118618 http://trac.webkit.org/changeset/119353 https://bugs.webkit.org/show_bug.cgi?id=88720 Caused at least 30 different crashes on ClusterFuzz (Requested by inferno-sec on #webkit). * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::checkForHTTPStatusCodeError): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::allClientsRemoved): * loader/cache/CachedFont.cpp: (WebCore::CachedFont::allClientsRemoved): * loader/cache/CachedFont.h: (WebCore::CachedFontClient::resourceClientType): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::removeClientForRenderer): (WebCore): (WebCore::CachedImage::allClientsRemoved): (WebCore::CachedImage::lookupOrCreateImageForRenderer): * loader/cache/CachedImage.h: (CachedImage): (WebCore::CachedImageClient::resourceClientType): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::allClientsRemoved): (WebCore): * loader/cache/CachedRawResource.h: (CachedRawResource): (WebCore::CachedRawResourceClient::resourceClientType): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::removeClient): * loader/cache/CachedResource.h: (WebCore::CachedResource::allClientsRemoved): * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::resourceClientType): * loader/cache/CachedSVGDocument.h: (WebCore::CachedSVGDocumentClient::resourceClientType): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::allClientsRemoved): * loader/cache/CachedStyleSheetClient.h: (WebCore::CachedStyleSheetClient::resourceClientType): * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::removeClient): * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::removeClient): * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::~SVGImageCache): (WebCore::SVGImageCache::removeRendererFromCache): (WebCore::SVGImageCache::setRequestedSizeAndScales): (WebCore::SVGImageCache::requestedSizeAndScales): (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer): * svg/graphics/SVGImageCache.h: (WebCore): (SVGImageCache): 2012-06-09 Florin Malita <fmalita@chromium.org> Fixed-position foreignObject descendants should be relative to the foreignObject viewport https://bugs.webkit.org/show_bug.cgi?id=88547 Reviewed by Abhishek Arya. Tests: svg/foreignObject/fO-fixed-position-crash.html svg/foreignObject/fixed-position-expected.svg svg/foreignObject/fixed-position.svg Fixed position elements are currently registered with the top level RenderView even when embedded within an SVG foreignOject. This patch changes containingBlock() & container() to return the containing foreignObject renderer instead. The new foreignObject fixed position behavior matches that of current FireFox and Opera versions and is consistent with the spec: http://www.w3.org/TR/CSS2/visuren.html#fixed-positioning http://www.w3.org/TR/SVG/coords.html#EstablishingANewViewport * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): (WebCore::RenderObject::container): 2012-06-09 Adam Barth <abarth@webkit.org> Can't use eval in iframes sanbdoxed via CSP header https://bugs.webkit.org/show_bug.cgi?id=88450 Reviewed by Mihai Parparita. The initial empty document in a frame inherits the security context of its parent (including the CSP policy). When we load the real document, in some cases we'll do a "secure transition" to the new document. That means that we leave the global object in place in case the parent document has created any properties that it expects will be visible to the new document. If the parent document has a CSP policy that blocks eval, the "no eval" bit will be set on the global object of the initial document. When we perform a "secure transition" to the new document, we'll keep the bit, which is wrong. In this patch, we reset the bit by always enabling eval when clearing the context, regardless of whether we're performing a "secure transition". Test: http/tests/security/contentSecurityPolicy/iframe-inside-csp.html * bindings/js/ScriptController.cpp: (WebCore::ScriptController::enableEval): (WebCore): * bindings/js/ScriptController.h: (ScriptController): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::enableEval): (WebCore): (WebCore::ScriptController::disableEval): * bindings/v8/ScriptController.h: (ScriptController): * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): 2012-06-09 Pablo Flouret <pablof@motorola.com> The value in Access-Control-Allow-Origin is not being matched correctly for CORS-enabled requests https://bugs.webkit.org/show_bug.cgi?id=88139 Reviewed by Adam Barth. Compare a request's origin with the value given in any Access-Control-Allow-Origin headers in an exact, case-sensitive manner, instead of using SecurityOrigin::isSameSchemeHostPort(). Per step 3 of the resource sharing check algorithm in http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#resource-sharing-check Test: http/tests/xmlhttprequest/origin-exact-matching.html * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): 2012-06-09 Huang Dongsung <luxtella@company100.net> [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL. https://bugs.webkit.org/show_bug.cgi?id=88703 The bug originated from StillImage that is not override Image::currentFrameHasAlpha(), so it always returns false. StillImage is used by ImageBuffer, and if Texmap draws contents on ImageBuffer, TextureMapperBackingStore thinks contents does not have alpha. Covered by existing compositing tests. Reviewed by Noam Rosenthal. * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::currentFrameHasAlpha): (WebCore): * platform/graphics/qt/StillImageQt.h: (StillImage): 2012-06-09 Victor Carbune <victor@rosedu.org> Basic support for timestamps within a TextTrackCue https://bugs.webkit.org/show_bug.cgi?id=88187 Implemented support for timestamps within a TextTrackCue. This enables rendering functionality for Karaoke and Paint-on captions. Reviewed by Eric Carlson. Test: media/track/track-cue-rendering-inner-timestamps.html * css/mediaControls.css: Remove the background shadow pseudo-id and added two others, which can be further used for styling past / future contents of the cue. (video::-webkit-media-text-track-past-nodes): Used to style elements within the cue that are before the current movie time. (video::-webkit-media-text-track-future-nodes): Used to style elements within the cue that are after the current movie time. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Regardless of whether the active set changed or not, the current cues need to be informed of the current movie time. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::TextTrackCue): Initiliazed past and future containers. (WebCore::TextTrackCue::getCueAsHTML): Checked whether the current cue text has inner timestamps or not, in order to render faster if no timestamps are there. (WebCore::TextTrackCue::updateDisplayTree): Added method that keeps the past and future containers up to date, given a current movie time. (WebCore): (WebCore::TextTrackCue::getDisplayTree): Replaced the cue background container with the past cues container. The *internal* display tree of the cue now has two containers, representing past and future elements. * html/track/TextTrackCue.h: Added several variables to support the new functionality. (TextTrackCue): * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): Updated representation for this patch. * html/track/WebVTTParser.h: (WebVTTParser): Made public the collectTimeStamp method, as this is required for parsing timestamps within a cue as well. 2012-06-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Open links in Sources panel by default and fallback to Resources and Network panel otherwise. https://bugs.webkit.org/show_bug.cgi?id=88710 Reviewed by Pavel Feldman. * inspector/front-end/inspector.js: (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector._showAnchorLocation): 2012-06-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Only expand root domain in Sources/Scripts panel https://bugs.webkit.org/show_bug.cgi?id=88135 Reviewed by Pavel Feldman. * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorTreeOutline._treeElementsCompare.compare.typeWeight): (WebInspector.NavigatorTreeOutline._treeElementsCompare): (WebInspector.NavigatorFolderTreeElement.prototype.onattach): 2012-06-09 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Pretty print should respect text editor indent setting. https://bugs.webkit.org/show_bug.cgi?id=88713 Reviewed by Pavel Feldman. * inspector/front-end/ScriptFormatter.js: 2012-06-09 Dan Bernstein <mitz@apple.com> Fixed the build after r119895. * WebCore.xcodeproj/project.pbxproj: 2012-06-09 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [refactoring] rename TimelineVerticalOverview into TimelineFrameOverview https://bugs.webkit.org/show_bug.cgi?id=88708 Reviewed by Vsevolod Vlasov. - rename TimelineVerticalOverview to TimelineFrameOverview; - rename associated fields, parameters, CSS classes etc; - rename overview mode designators to match the UI; - drop unused CSS rules for old-style mode selector; * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype._showEvents): (WebInspector.TimelineOverviewPane.prototype._showFrames): (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph): (WebInspector.TimelineOverviewPane.prototype._setFrameMode): (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged): (WebInspector.TimelineOverviewPane.prototype._update): (WebInspector.TimelineOverviewPane.prototype.addFrame): (WebInspector.TimelineOverviewPane.prototype.zoomToFrame): (WebInspector.TimelineOverviewPane.prototype._reset): (WebInspector.TimelineOverviewPane.prototype._onWindowChanged): (WebInspector.TimelineFrameOverview): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._shouldShowFrames): (WebInspector.TimelinePanel.prototype.revealRecordAt): * inspector/front-end/timelinePanel.css: (.timeline-frame-overview #timeline-overview-grid): (.timeline-frame-overview .timeline-overview-window): (.timeline-frame-overview .timeline-overview-dividers-background): (.timeline-frame-overview #timeline-overview-memory): (.timeline-frame-overview-status-bar-item.toggled-on .glyph): (.timeline-frame-overview-bars): (.timeline.timeline-frame-overview .resources-divider): (.sidebar-tree-item .timeline-frame-overview-status-bar-item): 2012-06-08 Vsevolod Vlasov <vsevik@chromium.org> IndexedDB: Inspector should handle null, string, and array keyPaths https://bugs.webkit.org/show_bug.cgi?id=84303 Reviewed by Pavel Feldman. Supported different key path types and updated tests to cover each case. Key path strings are now highlighted in the DataGrid column headers. * inspector/Inspector.json: * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel.idbKeyPathFromKeyPath): (WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath): (WebInspector.IndexedDBModel.prototype._loadDatabase.callback): (WebInspector.IndexedDBModel.prototype._loadDatabase): (WebInspector.IndexedDBModel.ObjectStore.prototype.get keyPathString): (WebInspector.IndexedDBModel.Index.prototype.get keyPathString): * inspector/front-end/IndexedDBViews.js: (WebInspector.IDBDataView.prototype._createDataGrid): (WebInspector.IDBDataView.prototype._keyColumnHeaderFragment): (WebInspector.IDBDataView.prototype._keyPathStringFragment): (WebInspector.IDBDataGridNode.prototype.createCell): * inspector/front-end/ResourcesPanel.js: (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip): (WebInspector.IDBIndexTreeElement.prototype._updateTooltip): 2012-06-08 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Increase size limits for resource content cached in InspectorResourceAgent. https://bugs.webkit.org/show_bug.cgi?id=88674 Reviewed by Pavel Feldman. * inspector/NetworkResourcesData.cpp: 2012-05-25 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Limit DebuggerAgent.Location use to DebuggerModel only, introduce WebInspector.RawLocation to be used elsewhere. https://bugs.webkit.org/show_bug.cgi?id=87270 Reviewed by Pavel Feldman. Introduced WebInspector.RawLocation interface, a generic raw location independent from concrete domain (Styles, Debugger). Made WebInspector.DebuggerModel.Location implement it and switched all debugger related methods to it. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._breakpointResolved): * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): (WebInspector.DebuggerModel.prototype.continueToLocation): (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint): (WebInspector.DebuggerModel.prototype.setBreakpoint): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): (WebInspector.DebuggerModel.prototype._breakpointResolved): (WebInspector.DebuggerModel.prototype.createRawLocation): (WebInspector.DebuggerModel.prototype.createRawLocationByURL): (WebInspector.DebuggerModel.prototype.setSelectedCallFrame): (WebInspector.DebuggerModel.prototype.createLiveLocation): (WebInspector.DebuggerModel.CallFrame.prototype.get location): (WebInspector.DebuggerModel.CallFrame.prototype.createLiveLocation): * inspector/front-end/DebuggerResourceBinding.js: (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource): (WebInspector.DebuggerResourceBinding.setScriptSource): (WebInspector.DebuggerResourceBinding.prototype.setContent.get if): (WebInspector.DebuggerResourceBinding.prototype.setContent): (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation): * inspector/front-end/Linkifier.js: * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): * inspector/front-end/PresentationConsoleMessageHelper.js: * inspector/front-end/RawSourceCode.js: * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation): * inspector/front-end/Script.js: (WebInspector.Script.prototype.rawLocationToUILocation): * inspector/front-end/ScriptSnippetModel.js: (WebInspector.SnippetScriptMapping.prototype.rawLocationToUILocation): * inspector/front-end/SourceMapping.js: * inspector/front-end/UISourceCode.js: (WebInspector.RawLocation): 2012-06-09 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Add message loop instrumentation to public API and timeline agent https://bugs.webkit.org/show_bug.cgi?id=88639 Reviewed by Vsevolod Vlasov. Message loop instrumentation will show when the render thread is busy. That way developer can discover if a render thread business causes low fps, or not. * inspector/InspectorClient.h: (WebCore::InspectorClient::startMessageLoopMonitoring): Starts observer. (WebCore::InspectorClient::stopMessageLoopMonitoring): Stops observer. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): Changed timeline agent constructor parameters. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willProcessTaskImpl): Forwards observer notification. (WebCore): (WebCore::InspectorInstrumentation::didProcessTaskImpl): Ditto. * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willProcessTask): Ditto. (WebCore): (WebCore::InspectorInstrumentation::didProcessTask): Ditto. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::start): Starts observer. (WebCore::InspectorTimelineAgent::stop): Stops observer. (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation): Changed result origin. (WebCore::InspectorTimelineAgent::willProcessTask): Noop implementqation. (WebCore): (WebCore::InspectorTimelineAgent::didProcessTask): Noop implementqation. (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Changed constructor parameters. * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::create): Ditto. (InspectorTimelineAgent): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): Changed timeline agent constructor parameters. 2012-06-08 Andrey Kosyakov <caseq@chromium.org> Web Inspector: optimize timeline's frame mode overview appearance for 30fps https://bugs.webkit.org/show_bug.cgi?id=88556 Reviewed by Vsevolod Vlasov. - adjust frame overview scale to 30fps == full height by default; - provide a fall-back auto-scale mode when median frame is longer than 1/30s; - add horizontal lines for 30 and 60fps; - drive-by fix: always use same order of categories in frame bars. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineVerticalOverview.prototype.update): (WebInspector.TimelineVerticalOverview.prototype._aggregateFrames): (WebInspector.TimelineVerticalOverview.prototype._renderBars): (WebInspector.TimelineVerticalOverview.prototype._drawFPSMarks): (WebInspector.TimelineVerticalOverview.prototype._renderBar): 2012-06-09 Sukolsak Sakshuwong <sukolsak@google.com> Add UNDO_MANAGER flag https://bugs.webkit.org/show_bug.cgi?id=87908 Reviewed by Tony Chang. Add undoManager property to document behind the UNDO_MANAGER flag and add placeholders for some methods of undoManager. Test: editing/undomanager/document-has-undomanager.html * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::Document): (WebCore): (WebCore::Document::undoManager): * dom/Document.h: (WebCore): (Document): * dom/Document.idl: * editing/UndoManager.cpp: Added. (WebCore): (WebCore::UndoManager::create): (WebCore::UndoManager::UndoManager): (WebCore::UndoManager::undo): (WebCore::UndoManager::redo): (WebCore::UndoManager::clearUndo): (WebCore::UndoManager::clearRedo): * editing/UndoManager.h: Added. (WebCore): (UndoManager): * editing/UndoManager.idl: Added. 2012-06-08 Levi Weintraub <leviw@chromium.org> RenderLayer::paintChildLayerIntoColumns doesn't properly pixel snap https://bugs.webkit.org/show_bug.cgi?id=88554 Reviewed by Darin Adler. Column handling code in RenderLayer and RenderBlock was improperly clipping and translating using floats derived from FractionalLayoutUnits without pixel snapping. RenderLayer also improperly stored render tree offsets in ints instead of LayoutUnits. This corrects this issue. Test: fast/sub-pixel/column-clipping.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnContents): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintChildLayerIntoColumns): 2012-06-08 Rakesh KN <rakesh.kn@motorola.com> REGRESSION(r116487?): HTMLFormElement::elements['name'] is empty if the form is detached from the document tree https://bugs.webkit.org/show_bug.cgi?id=88632 Reviewed by Ryosuke Niwa. Update root node of RadioNodeList when the form element is detached from dom tree. Test: fast/forms/radionodelist-whose-form-element-detached-from-domtree.html * dom/Node.cpp: (WebCore::Node::resetCachedRadioNodeListRootNode): New function to update the root node of RadioNodeLists to form element from document. * dom/Node.h: Ditto. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::removedFrom): On detach, we update the root node of all RadioNodeLists of this form element. * html/RadioNodeList.cpp: (WebCore::RadioNodeList::setRootElement): Setter for updating root node. * html/RadioNodeList.h: (RadioNodeList): Ditto. 2012-06-08 David Reveman <reveman@chromium.org> [Chromium] Compositor doesn't support translucent root layers. https://bugs.webkit.org/show_bug.cgi?id=87821 Reviewed by James Robinson. Forward the isTransparent WebView setting to WebLayerTreeView, CCLayerTreeHost and CCLayerTreeHostImpl as hasTransparentBackground. Use hasTransparentBackground setting to determine how to clear the root render pass and draw the background. Set opaque flag correctly on the NonCompositedContentHost's graphics layer to make sure sub-pixel rendering is not used with a transparent WebView. Unit tests: CCLayerTreeHostImplTest.hasTransparentBackground LayerRendererChromiumTest2.opaqueRenderPass LayerRendererChromiumTest2.transparentRenderPass * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearRenderPass): (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawBackgroundFilters): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setHasTransparentBackground): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::hasTransparentBackground): (WebCore::CCLayerTreeHostImpl::setHasTransparentBackground): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::CCRenderPass): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore::CCRenderPass::hasTransparentBackground): (WebCore::CCRenderPass::setHasTransparentBackground): (CCRenderPass): 2012-06-08 Ian Vollick <vollick@chromium.org> [chromium] Single thread proxy's animation timer should short circuit if the layer renderer has not been initialized https://bugs.webkit.org/show_bug.cgi?id=88668 Reviewed by James Robinson. Unit test: CCSingleThreadProxyTestDidAddAnimationBeforeInitializingLayerRenderer.runSingleThreaded * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2012-06-08 Shezan Baig <shezbaig.wk@gmail.com> Caret is not rendered in empty inline contenteditable elements https://bugs.webkit.org/show_bug.cgi?id=85793 Reviewed by Ryosuke Niwa. Override localCaretRect in RenderInline. The implementation was almost identical to localCaretRect in RenderBlock for empty block elements, so I refactored RenderBlock::localCaretRect and moved the logic to a new method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The implementation of 'localCaretRect' in RenderBlock and RenderInline both use this helper method in RenderBoxModelObject. Tests: editing/selection/caret-in-empty-inline-1.html editing/selection/caret-in-empty-inline-2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Modified to use RenderBoxModelObject::localCaretRectForEmptyElement. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement): (WebCore): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): Add localCaretRectForEmptyElement helper method. * rendering/RenderInline.cpp: (WebCore::RenderInline::localCaretRect): (WebCore): * rendering/RenderInline.h: (RenderInline): Override localCaretRect using localCaretRectForEmptyElement. 2012-06-08 Mike West <mkwst@chromium.org> Treat blob: and filesystem: URLs generated via secure origins as secure. https://bugs.webkit.org/show_bug.cgi?id=84054 Loading a blob: or filesystem: URL into an iframe or image that's contained on an HTTPS page shouldn't generate a mixed content warning. This change adds a SecurityOrigin::isSecure to check both against a URLs protocol, and the protocol of it's so-called "inner URL" if it's the type of URL that has such a thing. These sorts of URLs which are generated from secure sources will themselves be treated as secure. Reviewed by Adam Barth. Tests: http/tests/security/mixedContent/blob-url-in-iframe.html http/tests/security/mixedContent/filesystem-url-in-iframe.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::isMixedContent): * page/SecurityOrigin.cpp: (WebCore): (WebCore::SecurityOrigin::isSecure): * page/SecurityOrigin.h: (SecurityOrigin): 2012-06-08 Martin Robinson <mrobinson@igalia.com> [Cairo] [TextureMapperGL] Nvidia card does not update WebGL texture when interacting with canvas https://bugs.webkit.org/show_bug.cgi?id=87797 Reviewed by Philippe Normand. No new tests. WebGL is already covered by WebGL tests and this bug is only present on certain hardware. After resolving multisampling before drawing the texture via the TextureMapper, first rebind the multisampling framebuffer. This ensures that the texture isn't active in two framebuffers at a time. * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Rebind the multisampling framebuffer. 2012-06-08 Alexey Proskuryakov <ap@apple.com> <rdar://problem/11412294> Add appropriate iOS default font settings Reviewed by Dan Bernstein. * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies): 2012-06-08 Charles Wei <charles.wei@torchmobile.com.cn> IndexedDB: Transactions without any request scheduled should abort itself. https://bugs.webkit.org/show_bug.cgi?id=88052 Reviewed by Kentaro Hara. This is needed for indexedDB to make it work for JSC. We need to clean up all the pending transactions(transactions without any request scheduled) when leaving Javascript context. Manually tested using the existing test LayoutTests/storage/indexeddb/tutorial.html * bindings/js/JSMainThreadExecState.cpp: (WebCore): (WebCore::JSMainThreadExecState::didLeaveScriptContext): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::~JSMainThreadExecState): (JSMainThreadExecState): 2012-06-08 Ryosuke Niwa <rniwa@webkit.org> Crash in WebCore::CompositeEditCommand::breakOutOfEmptyListItem https://bugs.webkit.org/show_bug.cgi?id=88361 Reviewed by Levi Weintraub. Use RefPtr instead of raw pointers across DOM mutations. No tests are added for the lack of a reliable reduction. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 2012-06-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119514. http://trac.webkit.org/changeset/119514 https://bugs.webkit.org/show_bug.cgi?id=88664 Broke JSFiddle.net (Requested by arv on #webkit). * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): 2012-06-08 Ryosuke Niwa <rniwa@webkit.org> Crash in WebCore::InsertParagraphSeparatorCommand::doApply https://bugs.webkit.org/show_bug.cgi?id=88108 Reviewed by Levi Weintraub. Use NodeVector instead of walking through siblings as we mutate the DOM. No new tests are added since there is no reliable reduction. * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent): (WebCore): * editing/CompositeEditCommand.h: (CompositeEditCommand): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2012-06-08 David Grogan <dgrogan@chromium.org> IndexedDB: rename some instances of open to registerFrontendCallbacks https://bugs.webkit.org/show_bug.cgi?id=88611 We should still make the change in the WebKit API. Reviewed by Tony Chang. No new tests, just a method rename. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::registerFrontendCallbacks): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::registerFrontendCallbacks): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (IDBDatabaseBackendInterface): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): 2012-06-08 Dana Jansens <danakj@chromium.org> [chromium] Skip willDraw() and didDraw() on fully occluded layers https://bugs.webkit.org/show_bug.cgi?id=88435 Reviewed by Adrienne Walker. Current willDraw() is called on all layers with non-empty visibleLayerRect and non-empty scissorRect. This excludes layers outside the viewport, but does not exclude occluded layers. We add a check for occlusion to calculateRenderPasses in order to avoid willDraw() when it will be culled anyway. We prevent didDraw() from being called for occluded layers, for which we did not call didDraw() by holding a vector of layers for which we did call willDraw(). This lets us avoid storing a flag on the layers, or computing occlusion again in didDrawAllLayers. Unit test: CCLayerTreeHostImplTest.willDrawNotCalledOnOccludedLayer * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (FrameData): (CCLayerTreeHostImpl): 2012-06-08 Antonio Gomes <agomes@rim.com> EventHandler shouldn't schedule the fake mousemove event timer when scrolling on devices that don't have a mouse https://bugs.webkit.org/show_bug.cgi?id=88379 Reviewed by James Robinson. Paraphrasing Andy Estes: "In <http://trac.webkit.org/changeset/119465> we stopped dispatching fake mousemove events when scrolling on devices that don't support mice. This event is dispatched on a timer, so one better would be to not even schedule the timer (rather than scheduling the timer but making it a no-op). No new tests, as no functionality has changed. We basically do not start a timer under a given circumstance instead of fire it, it times out, and we make the callback no-op when under the given circumstance. It is still possible though that we have the following scenario: - Setting::deviceSupportsMouse set as true; - we fire the timer; - before its callback gets executed (timed out) the setting gets toggled. So for sakeness, lets keep the check in both places. * page/EventHandler.cpp: (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): 2012-06-08 James Robinson <jamesr@chromium.org> [chromium] Clean up some unnecessary LayerChromium.h includes https://bugs.webkit.org/show_bug.cgi?id=88599 Reviewed by Adam Barth. Reworks test code slightly to use WebCore interfaces. * testing/Internals.cpp: (WebCore::Internals::setBackgroundBlurOnNode): 2012-06-08 Erik Arvidsson <arv@chromium.org> [V8] Keep TextTrackList alive as long as its owner is alive https://bugs.webkit.org/show_bug.cgi?id=88541 Reviewed by Adam Barth. Add a hidden reference from the owner to the text track list. Covered by existing tests. * Target.pri: Add V8TextTrackListCustom.cpp. * UseV8.cmake: Ditto. * WebCore.gypi: Ditto. * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/custom/V8TextTrackListCustom.cpp: Copied from Source/WebCore/bindings/v8/V8HiddenPropertyName.h. (WebCore): (WebCore::toV8): When the wrapper is created add a reference to the owner of the TextTrackList to the TextTrackList. * html/track/TextTrackList.idl: 2012-06-08 Ian Vollick <vollick@chromium.org> [chromium] Accelerated animations should use WebTransformOperations https://bugs.webkit.org/show_bug.cgi?id=87686 Reviewed by James Robinson. CCTransformKeyframe new owns a WebTransformOperations rather than a TransformOperations. LayerChromium's API has been changed so that LayerChromium::addAnimation should take only a CCActiveAnimation. GraphicsLayerChromium is new responsible for translating to WebTransformOperations and creating CCActiveAnimations. Tests that use the public API (that is, they call addAnimation with KeyframeValueList and Animation arguments) have been moved to GraphicsLayerChromiumTest. Unit tests: GraphicsLayerChromiumTest.createOpacityAnimation GraphicsLayerChromiumTest.createTransformAnimation GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation GraphicsLayerChromiumTest.createTransformAnimationWithSingularMatrix GraphicsLayerChromiumTest.createReversedAnimation GraphicsLayerChromiumTest.createAlternatingAnimation GraphicsLayerChromiumTest.createReversedAlternatingAnimation * WebCore.gypi: * platform/graphics/chromium/AnimationTranslationUtil.cpp: Added. (WebCore): (WebCore::toWebTransformOperations): (WebCore::appendKeyframe): (WebCore::CCKeyframedTransformAnimationCurve): (WebCore::createActiveAnimation): * platform/graphics/chromium/AnimationTranslationUtil.h: Added. (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.h: (WebCore): (WebCore::LayerChromium::bounds): (LayerChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::LinkHighlight): * platform/graphics/chromium/cc/CCAnimationCurve.h: (CCTransformAnimationCurve): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: (WebCore::CCTransformKeyframe::create): (WebCore::CCTransformKeyframe::CCTransformKeyframe): (WebCore::CCTransformKeyframe::value): (WebCore::CCTransformKeyframe::clone): (WebCore::CCKeyframedTransformAnimationCurve::getValue): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: (CCTransformKeyframe): (CCKeyframedTransformAnimationCurve): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::removeAnimation): (WebCore): (WebCore::CCLayerAnimationController::addAnimation): (WebCore::CCLayerAnimationController::getActiveAnimation): (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): (WebCore::CCLayerAnimationController::replaceImplThreadAnimations): (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationControllerClient): (CCLayerAnimationController): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::bounds): 2012-06-08 No'am Rosenthal <noam.rosenthal@nokia.com> [Texmap] Accelerated versions of drop-shadow and blur filters https://bugs.webkit.org/show_bug.cgi?id=87695 Reviewed by Kenneth Rohde Christiansen. Added shaders for blur and drop-shadow effects. The shaders use sampling of multiple coordinates and averaging them with normal- distribution to create a fast gaussian blur effect. Covered by existing tests in css3/filters. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawFiltered): Call the prepare function explicitly, with a size argument that's used to calculate some of the uniform values. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::intermediateSurfaceRect): The outsets of the effect have to be considered when calculating the intermediate rect. Otherwise the resulting image is scaled instead of outsetted. (WebCore::applyFilters): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::StandardFilterProgram::StandardFilterProgram): Added the new shaders. (WebCore::StandardFilterProgram::prepare): (WebCore::TextureMapperShaderManager::getShaderForFilter): * platform/graphics/texmap/TextureMapperShaderManager.h: (StandardFilterProgram): 2012-06-08 Dan Bernstein <mitz@apple.com> Tried to fix the build after r119844. * bindings/js/GCController.cpp: (WebCore::GCController::discardAllCompiledCode): 2012-06-08 Mike West <mkwst@chromium.org> Add COMPILE_ASSERT to StyledElement to ensure it doesn't accidentally grow larger. https://bugs.webkit.org/show_bug.cgi?id=88627 Reviewed by Adam Barth. No change in user-facing behavior. * dom/StyledElement.cpp: (WebCore): 2012-06-08 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Fix several compiler warnings and errors. https://bugs.webkit.org/show_bug.cgi?id=88660 Reviewed by Pavel Feldman. Fixed several compiler warnings and errors. Removed isEmpty method from Object.prototype and made it static method on Object. * inspector/InjectedScriptExterns.js: * inspector/front-end/FileSystemModel.js: (WebInspector.FileSystemModel.prototype._detachFrame): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildDominatorTree): * inspector/front-end/utilities.js: (Object.isEmpty): 2012-06-08 Max Feil <mfeil@rim.com> [BlackBerry] Fix assertion failure introduced by bug 87551 https://bugs.webkit.org/show_bug.cgi?id=88659 Reviewed by Antonio Gomes. The determineRenderSlider() convenience function added in bug 87551 made an assumption that wasn't always true. This didn't cause a functional error but it caused an assertion failure, which indicates a problem with the code. PR164142. No new tests because this case is already covered by ASSERT's. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::determineRenderSlider): 2012-06-08 Ion Rosca <rosca@adobe.com> Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint https://bugs.webkit.org/show_bug.cgi?id=74111 Reviewed by Simon Fraser. Added zero-delay timer for AppKit scroll notification that can be called during layout. Manual test: ManualTests/scrollbar-crash-on-hide-scrolled-area.html This assertion does not fire when running layout tests. It can be easly reproduced using a debug build by loading the manual test page. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): (WebCore): (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): 2012-06-08 Renata Hodovan <reni@webkit.org> Adding few already supported features to the FeatureSet in DOMImplementation https://bugs.webkit.org/show_bug.cgi?id=86482 Text, Filter and View features are already implemented but they are not added to the SVG11 feature set. This is corrected in this patch. Reviewed by Nikolas Zimmermann. No new testcase is needed because we already have one what checks the svg features via DOMImplementation (svg/custom/svg-features.html). * dom/DOMImplementation.cpp: (WebCore::isSVG11Feature): 2012-06-08 Stephen Chenney <schenney@chromium.org> WebCore::ImageBuffer.cpp has broken color table code https://bugs.webkit.org/show_bug.cgi?id=80321 Reviewed by Dirk Schulze. The code in ImageBuffer::transformColorSpace had two problems that are fixed by this patch. First, it was using member variables for data that is static constant. This is incredibly wasteful, as every ImageBuffer that is created (and we make a lot of them) gets its own copy of the LUT and the table is initialized again and again. The patch replaces this with a static local, with lazy evaluation, in the method that uses the tables. Second, the code for filling the table was mapping 255 to 254, thus reducing the intensity and alpha of every image it pushed through a color transform. Test: svg/filters/color-space-conversion.svg * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::transformColorSpace): * platform/graphics/ImageBuffer.h: (ImageBuffer): 2012-06-08 Alexei Filippov <alexeif@chromium.org> Web Inspector: Better labels positioning on the memory pie chart https://bugs.webkit.org/show_bug.cgi?id=88652 Reviewed by Vsevolod Vlasov. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryPieChart.prototype._paint.paintPercentAndLabel): (WebInspector.NativeMemoryPieChart.prototype._paint): 2012-06-08 Bryan McQuade <bmcquade@google.com> Web Inspector: Annotate timeline records with a frame identifier https://bugs.webkit.org/show_bug.cgi?id=86406 Reviewed by Vsevolod Vlasov. Tests: Updated existing layout tests. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorInstrumentation.cpp: (WebCore::frameForScriptExecutionContext): (WebCore): (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl): (WebCore::InspectorInstrumentation::didInstallTimerImpl): (WebCore::InspectorInstrumentation::didRemoveTimerImpl): (WebCore::InspectorInstrumentation::willCallFunctionImpl): (WebCore::InspectorInstrumentation::willChangeXHRReadyStateImpl): (WebCore::InspectorInstrumentation::willDispatchEventImpl): (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl): (WebCore::InspectorInstrumentation::willEvaluateScriptImpl): (WebCore::InspectorInstrumentation::willFireTimerImpl): (WebCore::InspectorInstrumentation::willLayoutImpl): (WebCore::InspectorInstrumentation::willLoadXHRImpl): (WebCore::InspectorInstrumentation::willPaintImpl): (WebCore::InspectorInstrumentation::willRecalculateStyleImpl): (WebCore::InspectorInstrumentation::willSendRequestImpl): (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): (WebCore::InspectorInstrumentation::didFinishLoadingImpl): (WebCore::InspectorInstrumentation::didFailLoadingImpl): (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): (WebCore::InspectorInstrumentation::loadEventFiredImpl): (WebCore::InspectorInstrumentation::willWriteHTMLImpl): (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::didScheduleResourceRequest): (WebCore::InspectorInstrumentation::didInstallTimer): (WebCore::InspectorInstrumentation::didRemoveTimer): (WebCore::InspectorInstrumentation::willCallFunction): (WebCore::InspectorInstrumentation::willChangeXHRReadyState): (WebCore::InspectorInstrumentation::willDispatchEvent): (WebCore::InspectorInstrumentation::willEvaluateScript): (WebCore::InspectorInstrumentation::willFireTimer): (WebCore::InspectorInstrumentation::willLayout): (WebCore::InspectorInstrumentation::willLoadXHR): (WebCore::InspectorInstrumentation::willPaint): (WebCore::InspectorInstrumentation::willRecalculateStyle): (WebCore::InspectorInstrumentation::willReceiveResourceData): (WebCore::InspectorInstrumentation::willReceiveResourceResponse): (WebCore::InspectorInstrumentation::willWriteHTML): (WebCore::InspectorInstrumentation::didRequestAnimationFrame): (WebCore::InspectorInstrumentation::didCancelAnimationFrame): (WebCore::InspectorInstrumentation::willFireAnimationFrame): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::pushGCEventRecords): (WebCore::InspectorTimelineAgent::didBeginFrame): (WebCore::InspectorTimelineAgent::willCallFunction): (WebCore::InspectorTimelineAgent::willDispatchEvent): (WebCore::InspectorTimelineAgent::willLayout): (WebCore::InspectorTimelineAgent::willRecalculateStyle): (WebCore::InspectorTimelineAgent::willPaint): (WebCore::InspectorTimelineAgent::willComposite): (WebCore::InspectorTimelineAgent::willWriteHTML): (WebCore::InspectorTimelineAgent::didInstallTimer): (WebCore::InspectorTimelineAgent::didRemoveTimer): (WebCore::InspectorTimelineAgent::willFireTimer): (WebCore::InspectorTimelineAgent::willChangeXHRReadyState): (WebCore::InspectorTimelineAgent::willLoadXHR): (WebCore::InspectorTimelineAgent::willEvaluateScript): (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::willReceiveResourceData): (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): (WebCore::InspectorTimelineAgent::didTimeStamp): (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): (WebCore::InspectorTimelineAgent::didMarkLoadEvent): (WebCore::InspectorTimelineAgent::didRequestAnimationFrame): (WebCore::InspectorTimelineAgent::didCancelAnimationFrame): (WebCore::InspectorTimelineAgent::willFireAnimationFrame): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::appendRecord): (WebCore::InspectorTimelineAgent::pushCurrentRecord): (WebCore::InspectorTimelineAgent::pushCancelableRecord): (WebCore::InspectorTimelineAgent::commitCancelableRecords): * inspector/InspectorTimelineAgent.h: (WebCore): (WebCore::InspectorTimelineAgent::create): (InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry): (TimelineRecordEntry): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.isEventDivider): (WebInspector.TimelinePresentationModel.Record): 2012-06-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119821. http://trac.webkit.org/changeset/119821 https://bugs.webkit.org/show_bug.cgi?id=88648 Seems to have regression on Mac (Requested by kinuko on #webkit). * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): (WebCore): (WebCore::File::captureSnapshot): * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.cpp: (WebCore): * platform/network/BlobData.h: (BlobDataItem): (WebCore::BlobDataItem::BlobDataItem): * platform/network/FormData.cpp: (WebCore::FormData::appendFile): * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::blobIsOutOfDate): 2012-06-08 Kinuko Yasuda <kinuko@chromium.org> Unreviewed, removing duplicated entries in gyp. * WebCore.gypi: 2012-06-08 Arko Saha <arko@motorola.com> Microdata: An element with an empty itemprop='' should not get listed in the .properties list. https://bugs.webkit.org/show_bug.cgi?id=88235 Reviewed by Ryosuke Niwa. As per the specification change http://html5.org/r/6854, an element should be listed in .properties if the elelement has an attribute itemprop specified and the element has one or more property names. Test: fast/dom/MicroData/element-with-empty-itemprop.html * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::itemAfter): 2012-06-07 Kinuko Yasuda <kinuko@chromium.org> File::lastModifiedDate should use NaN or separate boolean flag for null Date value https://bugs.webkit.org/show_bug.cgi?id=87826 Reviewed by Kent Tamura. Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::captureSnapshot): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): Removed. * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.h: (WebCore::BlobDataItem::doNotCheckFileChange): Removed. * platform/network/BlobData.cpp: * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::blobIsOutOfDate): 2012-06-08 Kent Tamura <tkent@chromium.org> Move form-related functions of Document to FormController https://bugs.webkit.org/show_bug.cgi?id=88497 Reviewed by Hajime Morita. A lot of files depend on Document.h. We had to build many files when we touched form-related features in Document.h or CheckedRadioButtons.h. This patch reduces such pain. No new tests. Just a refactoring. * CMakeLists.txt: Add FormController.cpp and/or FormController.h. * GNUmakefile.list.am: ditto. * Target.pri: ditto. * WebCore.gypi: ditto. * WebCore.vcproj/WebCore.vcproj: ditto. * WebCore.xcodeproj/project.pbxproj: ditto. * dom/Document.cpp: Removed form-releated features except the followings. (WebCore::Document::formController): Accessor for a FormController. (WebCore::Document::formElementsState): Just returns FormController::formElementsState(). We don't create new FormController. (WebCore::Document::setStateForNewFormElements): Just returns FormController::setStateForNewFormElements(). We don't create new FormController if the specified vector is empty. * dom/Document.h: Moved form-related functions to FormController. * html/FormController.cpp: Added. Moved from Document.cpp. * html/FormController.h: Added. Moved from Document.h * html/FormAssociatedElement.cpp: Use Document::formController(). (WebCore::FormAssociatedElement::didMoveToNewDocument): (WebCore::FormAssociatedElement::insertedInto): (WebCore::FormAssociatedElement::removedFrom): (WebCore::FormAssociatedElement::formAttributeChanged): * html/HTMLFormControlElementWithState.cpp: Use Document::formController(). (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument): (WebCore::HTMLFormControlElementWithState::finishParsingChildren): * html/HTMLFormElement.cpp: Use Document::formController(). (WebCore::HTMLFormElement::didNotifyDescendantInsertions): (WebCore::HTMLFormElement::removedFrom): * html/HTMLInputElement.cpp: Use Document::formController(). (WebCore::HTMLInputElement::~HTMLInputElement): (WebCore::HTMLInputElement::didMoveToNewDocument): (WebCore::HTMLInputElement::checkedRadioButtons): * html/HTMLInputElement.h: Declare CheckedRadioButtons. It was provided by Document.h. * html/parser/HTMLConstructionSite.h: Declare HTMLFormElement. It was provided by Document.h 2012-06-08 Taiju Tsuiki <tzik@chromium.org> Add FileSystem item to storage tree. https://bugs.webkit.org/show_bug.cgi?id=72691 Reviewed by Vsevolod Vlasov. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/FileSystemModel.js: Added. * inspector/front-end/Images/fileSystem.png: Added. * inspector/front-end/ResourcesPanel.js: (WebInspector.FileSystemListTreeElement): (WebInspector.FileSystemListTreeElement.prototype.onexpand): (WebInspector.FileSystemListTreeElement.prototype.onattach): (WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent): (WebInspector.FileSystemListTreeElement.prototype._fileSystemAdded): (WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved): (WebInspector.FileSystemListTreeElement.prototype._fileSystemTreeElementByName): (WebInspector.FileSystemListTreeElement.prototype._refreshFileSystem): (WebInspector.FileSystemTreeElement): (WebInspector.FileSystemTreeElement.prototype.get fileSystemName): (WebInspector.FileSystemTreeElement.prototype.get itemURL): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/resourcesPanel.css: (.file-system-storage-tree-item .icon): * inspector/front-end/utilities.js: 2012-06-08 Kentaro Hara <haraken@chromium.org> REGRESSION r119802: Remove unnecessary ASSERT(!m_deletionHasBegun) from Document.h https://bugs.webkit.org/show_bug.cgi?id=88528 Reviewed by Ryosuke Niwa. m_deletionHasBegun should become true just before 'delete this'. No tests. No change in behavior. * dom/Document.h: (WebCore::Document::guardRef): (WebCore::Document::guardDeref): 2012-06-08 Adam Barth <abarth@webkit.org> HTTP 204 No Content responses shouldn't trigger MIME type warnings in the web inspector https://bugs.webkit.org/show_bug.cgi?id=88603 Reviewed by Pavel Feldman. A 204 response doesn't have an entity body, so its MIME type is kind of meaningless. We shouldn't spam the console with a warning about MIME types. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType): 2012-06-08 Yoshifumi Inoue <yosin@chromium.org> [Forms] Drop StepRange::NumberWithDecimalPlacesOrMissing https://bugs.webkit.org/show_bug.cgi?id=88621 Reviewed by Kent Tamura. This patch changes NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces. We use NaN as indication of having value or not. No new tests, because this patch doesn't change behavior. * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces. * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::createStepRange): ditto. * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): ditto. * html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange): ditto. * html/NumberInputType.cpp: (WebCore::NumberInputType::createStepRange): ditto. * html/RangeInputType.cpp: (WebCore::RangeInputType::createStepRange): ditto. * html/StepRange.cpp: (WebCore::StepRange::StepRange): Checks value is finite or not. (WebCore::StepRange::parseStep): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces. * html/StepRange.h: (StepRange): Removed NumberWithDecimalPlacesOrMissing. * html/TimeInputType.cpp: (WebCore::TimeInputType::createStepRange): NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces. * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): ditto. 2012-06-08 Kentaro Hara <haraken@chromium.org> Unreviewed. Fixed a comment, pointed out by ap@. * platform/TreeShared.h: (WebCore): 2012-06-08 Noel Gordon <noel.gordon@gmail.com> [chromium] WEBP image blue and red color channels reversed on Android https://bugs.webkit.org/show_bug.cgi?id=88613 Reviewed by Kent Tamura. No new tests. Covered by test fast/images/webp-image-decoding.html though I'm not sure where/how the Androids run their layout tests. * platform/image-decoders/webp/WEBPImageDecoder.cpp: (outputMode): Detect little-endian Skia with a blue pixel shift (aka Android) which seems to be the way for them per bug 75861. 2012-06-08 Ryosuke Niwa <rniwa@webkit.org> Remove the assertion that has been moved to TreeScope after r119802. * dom/Document.cpp: (WebCore::Document::removedLastRef): 2012-06-07 Kentaro Hara <haraken@chromium.org> Reduce Node object size from 72 byte to 64 byte https://bugs.webkit.org/show_bug.cgi?id=88528 Reviewed by Ryosuke Niwa. This patch removes all virtual methods from TreeShared.h, by which we can remove a virtual method table pointer (8 byte in a 64bit architechture) from each Node object. Consequently, this patch reduces the Node object size from 72 byte to 64 byte. e.g. The HTML spec (http://www.whatwg.org/specs/web-apps/current-work/) contains 325640 Node objects. Thus this patch saves 325640 * 8 byte = 2.6 MB. e.g. sizeof(Element) is reduced from 104 byte to 96 byte. - In multiple inheritance, a virtual method table pointer is allocated for each base class that has virtual methods. For example, for 'class A : public B, C {};' where B and C have virtual methods, two virtual method table pointers are allocated for each A object. In this patch, A = Node, B = EventTarget, and C = TreeShared. By removing the virtual methods from TreeShared, we can save the virtual method table pointer for TreeShared. 8 byte saving. - Node and SVGElementInstance are the only classes that inherit TreeShared. - This patch removes virtual TreeShared::removeLastRef() and implements virtual Node::removeLastRef() and virtual SVGElementInstance::removeLastRef(). Node::removeLastRef() calls 'delete this' for 'this' of type Node*, and SVGElementInstance::removeLastRef() calls 'delete this' for 'this' of type SVGElementInstance*. - This patch removes the virtual destructor of TreeShared. This removal is safe because (1) no one calls 'delete this' for 'this' of type TreeShared*, and (2) both Node and SVGElementInstance have virtual destructor. No change in behavior. Confirm no regression in existing tests. * dom/ContainerNode.cpp: (WebCore::callRemovedLastRef): (WebCore): * dom/Node.h: (WebCore::Node::removedLastRef): * platform/TreeShared.h: (WebCore): (TreeShared): (WebCore::TreeShared::deref): * svg/SVGElementInstance.cpp: (WebCore::callRemovedLastRef): (WebCore): * svg/SVGElementInstance.h: (WebCore::SVGElementInstance::removedLastRef): * WebCore.order: Added a symbol for callRemovedLastRef(). * WebCore.exp.in: Ditto. 2012-06-07 Takashi Sakamoto <tasak@google.com> ShadowRoot needs resetStyleInheritance https://bugs.webkit.org/show_bug.cgi?id=84048 Added resetStyleInheritance API to ShadowRoot. The spec URL is http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes To implement the API, modified StyleResolver to use empty style instead of parent style if resetStyleInheritance is true, and a node and its parent node are placed in different shadow trees. Reviewed by Hajime Morita. Test: fast/dom/shadow/shadow-root-resetStyleInheritance.html fast/dom/shadow/shadow-root-resetStyleInheritance-expected.html * css/StyleResolver.cpp: (WebCore::StyleResolver::initForStyleResolve): Set m_parentStyle to NULL when resetStyleInheritance. (WebCore::StyleResolver::documentSettings): Added a new method to obtain current document's settings. (WebCore::StyleResolver::initializeFontStyle): Initialize m_style by using document settings. Its code was move from the code initializing font style in applyProperty. (WebCore::StyleResolver::styleForElement): Initialize font style if m_parentStyle is NULL. The old code just used style() and don't touch font style. The new code uses the above initializeFontStyle. (WebCore::StyleResolver::applyProperty): Moved a code for initializing font style as "initial" to a new method: initializeFontStyle and modified to use the method. Modified to use documentSettings(). (WebCore::StyleResolver::checkForGenericFamilyChange): Modified to use documentSettings(). * css/StyleResolver.h: (WebCore::StyleResolver::documentSettings): (WebCore::StyleResolver::initializeFontStyle): Added two new methods to class StyleResolver. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): Modified to calculate m_resetStyleInheritance in its constructor. * dom/NodeRenderingContext.h: (WebCore::NodeRenderingContext::resetStyleInheritance): Implemented a new method, just returning m_resetStyleInheritance. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setResetStyleInheritance): Modified to force to recalculate children's styles if resetStyleInheritance is changed. * dom/ShadowRoot.h: (ShadowRoot): Added resetStyleInheritance getter and setter. * dom/ShadowRoot.idl: Added an attribute, resetStyleInheritance. * dom/TreeScope.cpp: (WebCore::TreeScope::resetStyleInheritance): * dom/TreeScope.h: (TreeScope): Added resetStyleInheritance's default getter. The getter will be overrided by class ShadowRoot's getter. 2012-06-07 Victor Carbune <victor@rosedu.org> addTextTrack should set track mode to HIDDEN https://bugs.webkit.org/show_bug.cgi?id=88317 Reviewed by Eric Carlson. Updated existing test. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::addTextTrack): Set the default parameters for the newly created TextTrack. * html/track/TextTrack.cpp: (WebCore::TextTrack::TextTrack): 2012-06-07 Li Yin <li.yin@intel.com> FileAPI: Blob should support ArrayBufferView instead of ArrayBuffer for Constructor Parameters https://bugs.webkit.org/show_bug.cgi?id=88294 Reviewed by Jian Li. From Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob Currently we add the support for ArrayBufferView, while still keeping ArrayBuffer for backward compatibility. We will remove it in the near future. Test: fast/files/blob-constructor.html * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::append): (WebCore): * fileapi/WebKitBlobBuilder.h: (WebCore): (WebKitBlobBuilder): * fileapi/WebKitBlobBuilder.idl: Add support for ArrayBufferView in append method 2012-06-07 MORITA Hajime <morrita@google.com> A style in an older shadow subtree causes assert when composing with <shadow> https://bugs.webkit.org/show_bug.cgi?id=88299 Reviewed by Dimitri Glazkov. InsertionPoint::attach() assumes its distributed content not being attach()-ed. But this assumption can break. This change added a guard for that. This can happen for shadow boundaries in general. But ShadowRoot already handles that case. Test: fast/dom/shadow/insertion-point-shadow-crash.html * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::attach): 2012-06-07 Max Feil <mfeil@rim.com> [BlackBerry] Show correct fullscreen button image (media controls) https://bugs.webkit.org/show_bug.cgi?id=88563 Reviewed by Antonio Gomes. PR159306: Show "exit" fullscreen button image instead of "enter" fullscreen button image when in fullscreen mode (HTML5 media controls). I am not providing a test due to the simplicity of this patch and the relative difficulty and maintainability issues associated with testing how an image is rendered. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton): 2012-06-07 Noel Gordon <noel.gordon@gmail.com> [chromium] Use WEBPImportPictureRGBX|BGRX to import picture data https://bugs.webkit.org/show_bug.cgi?id=88218 Reviewed by Kent Tamura. Stop using the RGBA and RGBA variants of the picture import routines (since these will import alpha channel data in a future libwebp). Use the RGBX and BGRX variants to import picture data for encoding to make it clear that the alpha channel is (and must be) ignored. Test: fast/canvas/canvas-toDataURL-webp.html * platform/image-encoders/skia/WEBPImageEncoder.cpp: (WebCore::rgbPictureImport): (WebCore::importPictureBGRX): Use WEBPImportPictureBGRX for picture imports that must ignore the alpha channel. Change the template parameter to be the premultiplied alpha state of the input image data. (WebCore::importPictureRGBX): Use WEBPImportPictureRGBX, ditto. (WebCore::encodePixels): Invert the sense of the template parameter to make it now indicate the premultiplied alpha state of the input image data. 2012-06-07 Takashi Sakamoto <tasak@google.com> Improve the performance of pushScope in StyleResolver https://bugs.webkit.org/show_bug.cgi?id=88222 Reviewed by Hajime Morita. As setupScopeStack always sets m_scopeStackParent to be NULL, m_scopeStack is never reused. m_scopeStackParent should be the last element of m_scopeStack. No new tests, because fast/css/style-scoped/ uses pushScope, popScope and setupScopeStack and checks whether there exists any crash bug or not. And this patch doesn't change any behavior of scoped author syltes. * css/StyleResolver.cpp: (WebCore::StyleResolver::setupScopeStack): Modified to set m_scopeSackParent to be the last element of m_scopeStack. (WebCore::StyleResolver::popScope): Modified to remove the last element if m_scopeStack is not empty and the last element of m_scopeStack has the same scope as the scoping element given by the argument. 2012-06-07 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Move didStartWorkerRunLoop to Platform.h https://bugs.webkit.org/show_bug.cgi?id=88562 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * WebCore.gyp/WebCore.gyp: * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): * platform/chromium/PlatformSupport.h: (WebCore): * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): 2012-06-07 Mike West <mkwst@chromium.org> Dropping m_startingLineNumber property from StyledElement. https://bugs.webkit.org/show_bug.cgi?id=86848 Reviewed by Adam Barth. We can have the same effect by moving the line-number calculation directly into StyledElement::styleAttributeChanged. This means that subsequent changes to the style attribute (via script) won't generate error messages with line numbers, but that's an acceptable tradeoff. Behavior is covered by existing CSP tests. * dom/StyledElement.cpp: (WebCore::StyledElement::StyledElement): (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (WebCore::StyledElement::destroyInlineStyle): 2012-06-07 Peter Beverloo <peter@chromium.org> Initialize m_document in AXObjectCache's constructor for !HAVE(ACCESSIBILITY) builds https://bugs.webkit.org/show_bug.cgi?id=88527 Reviewed by Adam Barth. Initialize the m_document member with the passed on document in the stubbed AXObjectCache constructor. No behavioral changes. * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::AXObjectCache): 2012-06-05 James Robinson <jamesr@chromium.org> [chromium] Move deferral-related logic out of Canvas2DLayerChromium https://bugs.webkit.org/show_bug.cgi?id=86050 Reviewed by Stephen White. This removes Canvas2DLayerChromium and puts the deferral and double-buffering related logic in a new class, Canvas2DLayerBridge, that uses TextureLayerChromium for compositing. The bridge is responsible for managing the front texture when double buffering is active, inserting the correct makeContextCurrent() and flush() calls on the GraphicsContext3D and SkCanvas when appropriate, and owning the lifetime of the layer. * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerBridge.cpp: Added. (WebCore): (AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext): (WebCore::AcceleratedDeviceContext::prepareForDraw): (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge): (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge): (WebCore::Canvas2DLayerBridge::skCanvas): (WebCore::Canvas2DLayerBridge::prepareTexture): (WebCore::Canvas2DLayerBridge::context): (WebCore::Canvas2DLayerBridge::layer): (WebCore::Canvas2DLayerBridge::contextAcquired): * platform/graphics/chromium/Canvas2DLayerBridge.h: Added. (WebCore): (Canvas2DLayerBridge): (WebCore::Canvas2DLayerBridge::create): * platform/graphics/chromium/Canvas2DLayerChromium.cpp: Removed. * platform/graphics/chromium/Canvas2DLayerChromium.h: Removed. * platform/graphics/chromium/GraphicsLayerChromium.cpp: * platform/graphics/chromium/ImageBufferDataSkia.h: (WebCore): (ImageBufferData): * platform/graphics/chromium/TextureLayerChromium.cpp: (WebCore::TextureLayerChromium::willModifyTexture): willModifyTexture() is called whenever the texture currently owned by the TextureLayerChromium will be modified by a system out of the compositor's control. It makes sure that the compositor does not attempt to draw with the potentially-modified texture until the next commit. For canvas, this is used when threading is enabled and a non-deferrable drawing command is invoked from JS. (WebCore): * platform/graphics/chromium/TextureLayerChromium.h: (TextureLayerChromium): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::createAcceleratedCanvas): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::context): (WebCore::ImageBuffer::platformLayer): 2012-06-07 Patrick Gansterer <paroga@webkit.org> Remove HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) https://bugs.webkit.org/show_bug.cgi?id=87931 Reviewed by Beth Dakin. r62035 added HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until all ports implement GraphicsContext::clipConvexPolygon(). All major ports define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING in the meantime and the alternative path has unnecessary maintainace costs and even don't compile at the moment. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::drawBoxSideFromPath): * rendering/RenderObject.cpp: (WebCore::RenderObject::paintFocusRing): * rendering/RenderObject.h: (RenderObject): 2012-06-06 Vincent Scheib <scheib@chromium.org> Add new Pointer Lock spec events webkitpointerlockchange and webkitpointerlockerror https://bugs.webkit.org/show_bug.cgi?id=88377 Reviewed by Dimitri Glazkov. Part of a series of refactoring changes to update pointer lock API to the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402 New change and error events added. Follow up patches will remove the previous callbacks and pointerlocklost event. Tests updated to include the new events, and a new test added specifically for the new events, pointerlockchange-pointerlockerror-events.html. Test: pointer-lock/pointerlockchange-pointerlockerror-events.html * dom/Document.h: (Document): * dom/Document.idl: * dom/EventNames.h: (WebCore): * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::didAcquirePointerLock): (WebCore::PointerLockController::didNotAcquirePointerLock): (WebCore::PointerLockController::didLosePointerLock): (WebCore::PointerLockController::enqueueEvent): (WebCore): * page/PointerLockController.h: (PointerLockController): 2012-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119744. http://trac.webkit.org/changeset/119744 https://bugs.webkit.org/show_bug.cgi?id=88584 Fails assertions in debug builds (Requested by jamesr_ on #webkit). * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::willDraw): 2012-06-07 Julien Chaffraix <jchaffraix@webkit.org> Cache RenderLayer::isRootLayer for better performance https://bugs.webkit.org/show_bug.cgi?id=88570 Reviewed by Ojan Vafai. Caching covered by existing tests. RenderLayer::isRootLayer()'s answer will be the same during the RenderLayer's lifetime as a RenderLayer is tied to a RenderBoxModelObject. This change caches isRootLayer value in the constructor. On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows by 100 columns table, it saves about 10% on the paint time during scrolling on my machine (going from 50ms to 45ms). It would expect all code paths to see some improvement as checking renderer()->isRenderView() was pretty common. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): Added code to cache the result of renderer()->isRenderView() here. (WebCore::RenderLayer::stackingContext): (WebCore::isPositionedContainer): (WebCore::isFixedPositionedContainer): (WebCore::RenderLayer::enclosingTransformedAncestor): (WebCore::RenderLayer::clippingRootForPainting): (WebCore::shouldSuppressPaintingLayer): (WebCore::RenderLayer::hitTest): (WebCore::RenderLayer::intersectsDamageRect): * rendering/RenderLayer.h: (WebCore::RenderLayer::isStackingContext): Updated all the call sites to use isRootLayer() instead of renderer()->isRenderView() as it is faster. (WebCore::RenderLayer::isRootLayer): Added our caching here. Also made m_canSkipRepaintRectsUpdateOnScroll to follow m_isRootLayer example. 2012-06-07 Takashi Sakamoto <tasak@google.com> Incorrect border rendering when border radius is above 2px. https://bugs.webkit.org/show_bug.cgi?id=88046 Fixing findInnerVertex's logic to decide which is the better line to find an inner vertex, x=center point's x of a rendering box or y=center point's y of a rendering box. Reviewed by Simon Fraser. Test: fast/borders/border-radius-valid-border-clipping.html * rendering/RenderBoxModelObject.cpp: (WebCore::findInnerVertex): 2012-06-07 Edaena Salinas Jasso <edaena@apple.com> Should fire error event for empty 404 script https://bugs.webkit.org/show_bug.cgi?id=50589 Reviewed by Brady Eidson. Tests: http/tests/loading/fire-error-event-empty-404-script.html http/tests/loading/fire-error-script-no-content-type.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse): We should check for http status codes here to stop depending on the response being non-empty. (WebCore::SubresourceLoader::didReceiveData): Moved the http status check but avoid messing with multipart responses. (WebCore::SubresourceLoader::checkForHTTPStatusCodeError): Renamed from errorLoadingResource for clarity. * loader/SubresourceLoader.h: * loader/cf/SubresourceLoaderCF.cpp: (WebCore::SubresourceLoader::didReceiveDataArray): Updated for errorLoadingResource renaming. 2012-06-07 Konrad Piascik <kpiascik@rim.com> [BlackBerry] Update PlayBook's User Agent String for Web Inspector https://bugs.webkit.org/show_bug.cgi?id=88543 Reviewed by Antonio Gomes. We expect users to upgrade their devices so developers only need the latest UA String. No tests needed. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const): 2012-06-07 Shawn Singh <shawnsingh@chromium.org> [chromium] Remove obsolete FIXME comment about a layer sorting bug. https://bugs.webkit.org/show_bug.cgi?id=88546 Reviewed by James Robinson. No tests needed, only comment changed. The comment referred to a potential bug that actually will not occur. The W3C spec on CSS 3d transforms indicates that layers that do not share the same "3d rendering context" do not sort together, and our existing code sorts this way already. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-06-07 Adam Barth <abarth@webkit.org> Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor https://bugs.webkit.org/show_bug.cgi?id=88375 Reviewed by James Robinson. This patch removes Settings::defaultDeviceScaleFactor because it is redundant with Page::deviceScaleFactor now that we no longer support target-densitydpi. Page::deviceScaleFactor is the canonical place to store the device scale factor. * WebCore.exp.in: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::setDeviceScaleFactor): 2012-06-07 Alec Flett <alecflett@chromium.org> IndexedDB: Error codes, phase one https://bugs.webkit.org/show_bug.cgi?id=88459 Reviewed by Tony Chang. This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and NON_TRANSIENT_ERR from earlier versions of the spec, and normalizes the place where TypeError should be thrown so that it's easier to update when the bindings change. No new tests: existing tests cover these changes and have been updated. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): (WebCore::IDBCursor::continueFunction): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::update): (WebCore::IDBCursorBackendImpl::deleteFunction): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): (WebCore::IDBDatabase::deleteObjectStore): (WebCore::IDBDatabase::setVersion): (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): * Modules/indexeddb/IDBDatabaseException.h: * Modules/indexeddb/IDBDatabaseException.idl: * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::open): (WebCore::IDBFactory::deleteDatabase): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::index): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::deleteIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::result): (WebCore::IDBRequest::errorCode): (WebCore::IDBRequest::webkitErrorMessage): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::objectStore): 2012-06-07 Dana Jansens <danakj@chromium.org> [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed https://bugs.webkit.org/show_bug.cgi?id=88371 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.layersFreeTextures * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl): (WebCore::CCIOSurfaceLayerImpl::willDraw): 2012-06-07 Peter Beverloo <peter@chromium.org> Buildfix for ENABLE_OVERFLOW_SCROLLING=0 (though defined) https://bugs.webkit.org/show_bug.cgi?id=88564 Reviewed by Adam Barth. Where ENABLE(X) mandates that X both has to be defined and evaluates to true as a lone preprocessor statement, there were two places in the CSS property and value input files where only was checked whether is has been defined. This also goes against other #ifdefs in those files. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: 2012-06-07 Ami Fischman <fischman@chromium.org> Plumb CORS attribute information from HTMLMediaElement to media players so it can be used https://bugs.webkit.org/show_bug.cgi?id=88349 Reviewed by Adam Barth. Test: http/tests/security/video-cross-origin-readback.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerCORSMode): (WebCore): * html/HTMLMediaElement.h: (HTMLMediaElement): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::didPassCORSAccessCheck): (WebCore): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerCORSMode): (MediaPlayer): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::didPassCORSAccessCheck): (MediaPlayerPrivateInterface): 2012-06-07 Mark Hahnenberg <mhahnenberg@apple.com> Worker tear-down can re-enter JSC during GC finalization https://bugs.webkit.org/show_bug.cgi?id=88449 Reviewed by Geoffrey Garen. No new tests. This is the first of two patches to fix this issue with Workers. * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it will be called elsewhere in contextDestroyed(). 2012-06-07 Jer Noble <jer.noble@apple.com> sometimes all slaved videos don't start playing https://bugs.webkit.org/show_bug.cgi?id=88553 Reviewed by Darin Adler. Test: media/media-controller-time-clamp.html Some PlatformClock classes will occasionally return times < 0 and will always return times slightly > duration() when playback has ended. Clamp the value of currentTime() to the specified [0..duration] range. * html/MediaController.cpp: (MediaController::currentTime): 2012-06-07 Simon Fraser <simon.fraser@apple.com> Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition() https://bugs.webkit.org/show_bug.cgi?id=88475 Reviewed by Sam Weinig. FrameView's scrollXForFixedPosition() and scrollYForFixedPosition() methods were often called together, but they do duplicate work, including calling into platform widget code which might be slow. Fix by converting scrollOffsetForFixedPosition() from being a wrapper that just calls scrollXForFixedPosition() and scrollYForFixedPosition() to the method that does all the work, calling just once into platform widget code. Changed callers to use scrollOffsetForFixedPosition() rather than make two separate method calls. Added ScrollView::layoutSize() and visibleSize() methods for convenience. Removed FrameView::scrollXForFixedPosition and FrameView::scrollYForFixedPosition to avoid inefficient callers in future. No new tests; refactoring only. * page/FrameView.cpp: (WebCore::fixedPositionScrollOffset): (WebCore::FrameView::scrollOffsetForFixedPosition): * page/FrameView.h: Removed scrollXForFixedPosition and scrollYForFixedPosition. * platform/ScrollView.cpp: (WebCore::ScrollView::layoutSize): * platform/ScrollView.h: (WebCore::ScrollView::visibleSize): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): * rendering/RenderLayer.h: (WebCore::ClipRect::move): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderView.cpp: (WebCore::RenderView::computeRectForRepaint): 2012-06-07 Raymes Khoury <raymes@chromium.org> Incorrect rect-based hit-test result for culled-inline elements https://bugs.webkit.org/show_bug.cgi?id=85849 Reviewed by Levi Weintraub. Modified code which blindly adds culled inlines to rect-based hit-test results so that it only does so if the child node does not fully cover the hit-test region. Test: fast/dom/nodesFromRect-culled-inline.html * rendering/HitTestResult.cpp: (WebCore::HitTestResult::addNodeToRectBasedTestResult): 2012-06-07 Daniel Erat <derat@chromium.org> Make Skia backend honor requests for subpixel-positioned text. https://bugs.webkit.org/show_bug.cgi?id=88263 Reviewed by Tony Chang. Add subpixel positioning field to FontRenderStyle and rename subpixel rendering field. Pass setting to SkPaint in FontPlatformDataHarfBuzz and remove round() call when computing glyph widths in SimpleFontDataSkia. Test: platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html * platform/graphics/blackberry/skia/PlatformSupport.cpp: (WebCore::setFontRenderStyleDefaults): (WebCore::PlatformSupport::getRenderStyleForStrike): * platform/graphics/chromium/FontRenderStyle.h: (WebCore::FontRenderStyle::FontRenderStyle): (WebCore::FontRenderStyle::operator==): (FontRenderStyle): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore): (WebCore::FontPlatformData::setSubpixelRendering): (WebCore::FontPlatformData::setSubpixelPositioning): (WebCore::FontPlatformData::setupPaint): (WebCore::FontPlatformData::querySystemForRenderStyle): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): * platform/graphics/skia/SimpleFontDataSkia.cpp: (WebCore::SimpleFontData::platformWidthForGlyph): 2012-06-06 Dana Jansens <danakj@chromium.org> [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called https://bugs.webkit.org/show_bug.cgi?id=88469 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::shouldDrawLayer): (WebCore): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): 2012-06-07 Alexei Filippov <alexeif@chromium.org> Web Inspector: sorting of object fields is broken in heap profiler https://bugs.webkit.org/show_bug.cgi?id=88532 A recent change to heap profiler has replaced getters with functions. Function calls were missing in couple places after that change. Reviewed by Vsevolod Vlasov. Tests: inspector/profiler/heap-snapshot-summary-sorting-fields.html inspector/profiler/heap-snapshot-summary-sorting-instances.html * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField): 2012-06-07 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Consider Ctrl+Shift+key as valid zoom change combinations https://bugs.webkit.org/show_bug.cgi?id=88520 Reviewed by Vsevolod Vlasov. * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2012-06-07 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Allow WebPageCompositor to blend a transparent web page https://bugs.webkit.org/show_bug.cgi?id=88233 Reviewed by Rob Buis. RIM PR #159998 Add a parameter to LayerRenderer::compositeBuffer() indicating whether the buffer contents are opaque, and set the GL blend mode accordingly. This is not currently testable using BlackBerry testing infrastructure. Reviewed internally by Jakob Petsovits. * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::compositeBuffer): * platform/graphics/blackberry/LayerRenderer.h: (LayerRenderer): 2012-06-07 Alexei Filippov <alexeif@chromium.org> Web Inspector: reuse edge_count field of heap snapshot to store retained size https://bugs.webkit.org/show_bug.cgi?id=88416 The edge_count field is unused after node first edge indexes have been built. Store node retained size in there instead of allocating an extra array for it. Reviewed by Vsevolod Vlasov. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.retainedSize): (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes): 2012-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119694. http://trac.webkit.org/changeset/119694 https://bugs.webkit.org/show_bug.cgi?id=88529 it broke PrerenderBrowserTest.PrerenderHTML5VideoNetwork (Requested by loislo on #webkit). * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: (HTMLMediaElement): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): * platform/graphics/MediaPlayer.cpp: * platform/graphics/MediaPlayer.h: (MediaPlayer): * platform/graphics/MediaPlayerPrivate.h: 2012-06-07 Shinya Kawanaka <shinyak@chromium.org> Delete a contenteditable element having a Shadow DOM causes a crash. https://bugs.webkit.org/show_bug.cgi?id=86345 Reviewed by Ryosuke Niwa. In VisibleSelection::validate(), m_start.downstream() or m_end.upstream() might cross editing boundaries. So we adjust selection after calling them again. Test: editing/shadow/select-contenteditable-shadowhost.html * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::validate): 2012-06-07 Vivek Galatage <vivekgalatage@gmail.com> No new line at the end for SVGCSSPropertyNames.in causes compilation warning https://bugs.webkit.org/show_bug.cgi?id=88503 Reviewed by Ryosuke Niwa. Added new line at the end of the file. No new tests required. * css/SVGCSSPropertyNames.in: 2012-06-07 Csaba Osztrogonác <ossy@webkit.org> [Qt][Win] Use OS(WINDOWS) instead of Q_WS_WIN in WebCore/platform/graphics/GraphicsContext.h https://bugs.webkit.org/show_bug.cgi?id=88305 Reviewed by Simon Hausmann. * platform/graphics/GraphicsContext.h: Buildfix. (GraphicsContext): 2012-06-07 Shinya Kawanaka <shinyak@chromium.org> Incorrect data retrieved in calls to get selection data in client->textWillBeReplaced from CharacterData::setDataAndUpdate https://bugs.webkit.org/show_bug.cgi?id=66120 Reviewed by Ryosuke Niwa. Since FrameSelection::textWillBeReplaced was called before replacing text, updated Selection became temporarily invalid. The invalid selection was set to updateSelection(), so client will have invalid selection. This patch makes calling updateSelection() after updating selection. No new tests, it's too hard to create a correct test cases in DRT. * dom/CharacterData.cpp: (WebCore::CharacterData::setDataAndUpdate): * editing/FrameSelection.cpp: (WebCore::updatePositionAfterAdoptingTextReplacement): (WebCore::FrameSelection::textWasReplaced): * editing/FrameSelection.h: (FrameSelection): 2012-06-07 Li Yin <li.yin@intel.com> FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError. https://bugs.webkit.org/show_bug.cgi?id=88411 Reviewed by Kentaro Hara. From spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob If type consists of any non-ASCII characters, throw a SyntaxError and return from this algorithm. This patch checks the String is ASCii or not, if not, throw SyntaxError. Test: fast/files/blob-constructor.html * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-06-07 Arpita Bahuguna <arpitabahuguna@gmail.com> InsertUnorderedList and InsertOrderedList (execCommand) do not remove bullets https://bugs.webkit.org/show_bug.cgi?id=84597 Reviewed by Ryosuke Niwa. Comparison between start and end VisiblePositions will fail when a position inside a paragraph is compared with one at the start of the paragraph. This fix thus converts the end VisiblePosition (which could be inside the paragraph) to the start of the paragraph thereby enabling a proper comparison of start and end positions. Test: editing/execCommand/remove-list-from-multi-list-items.html * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::selectionHasListOfType): 2012-06-07 Li Yin <li.yin@intel.com> [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING https://bugs.webkit.org/show_bug.cgi?id=88212 Reviewed by Jian Li. From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR when the readyState is LOADING. Also delete OperationNotAllowedException related code, because it is not longer needed. Tests: fast/files/read-file-async.html fast/files/workers/worker-read-file-async.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMExceptions.in: * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR. * fileapi/FileReader.idl: Changed it to raise DOMException for all read methods. * fileapi/OperationNotAllowedException.cpp: Removed. * fileapi/OperationNotAllowedException.h: Removed. * fileapi/OperationNotAllowedException.idl: Removed. 2012-06-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119689. http://trac.webkit.org/changeset/119689 https://bugs.webkit.org/show_bug.cgi?id=88516 it broke didDrawNotCalledOnScissoredLayer webkit_unit_test (Requested by loislo on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): 2012-06-07 Ami Fischman <fischman@chromium.org> Plumb CORS attribute information from HTMLMediaElement to media players so it can be used https://bugs.webkit.org/show_bug.cgi?id=88349 Reviewed by Adam Barth. Test: http/tests/security/video-cross-origin-readback.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerCORSMode): (WebCore): * html/HTMLMediaElement.h: (HTMLMediaElement): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerCORSMode): 2012-06-07 Hironori Bono <hbono@chromium.org> Use light gray for grammar markers on Windows and Linux https://bugs.webkit.org/show_bug.cgi?id=88398 Reviewed by Ryosuke Niwa. This change changes the color of grammar markers from dark gray to light gray and rebaselines a couple of pixel tests affected by this change. No new tests because it changes the marker color of an existing test 'grammar-markers.html'. * platform/graphics/skia/GraphicsContextSkia.cpp: Change dark gray to light gray. 2012-06-07 Yoshifumi Inoue <yosin@chromium.org> [Platform] Introduce conversion from/to Deciaml to/from double https://bugs.webkit.org/show_bug.cgi?id=88480 Reviewed by Kent Tamura. This patch added functions for Decimal/Double conversion and isInfinity for reducing patch size of introducing Decimal arithmetic, bug 88383. Tests: WebKit/chromium/tests/DecimalTest.cpp * platform/Decimal.cpp: (WebCore::Decimal::fromDouble): Added. (WebCore::Decimal::toDouble): Added. * platform/Decimal.h: (WebCore::Decimal::EncodedData::isInfinity): Added for isinf() (WebCore::Decimal::isInfinity): Added. 2012-06-06 Xianzhu Wang <wangxianzhu@chromium.org> Element.getBoundingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page https://bugs.webkit.org/show_bug.cgi?id=88430 Element.getBoudingClientRect() and Element.getClientRects() should not scale back the rects if the element is in a frame because page scale only apply to elements in the main frame. Reviewed by James Robinson. Tests: fast/dom/Element/scale-page-bounding-client-rect-in-frame.html fast/dom/Element/scale-page-client-rects-in-frame.html * dom/Document.cpp: (WebCore): (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and Range.cpp and fixed issue of pageScale in frames. (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and fixed issue of pageScale in frames. * dom/Document.h: (WebCore): (Document): * dom/Element.cpp: (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): * dom/Range.cpp: (WebCore): (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): Moved into Document and fixed issue of pageScale in frames. (WebCore::Range::getBorderAndTextQuads): * rendering/RenderObject.h: Removed adjustFloatQuadForPageScale and adjustFloatRectForPageScale because they seem unrelated to RenderObject. (WebCore): 2012-06-06 Dana Jansens <danakj@chromium.org> [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called https://bugs.webkit.org/show_bug.cgi?id=88469 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::shouldDrawLayer): (WebCore): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::didDrawAllLayers): 2012-06-06 Andy Estes <aestes@apple.com> Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT) https://bugs.webkit.org/show_bug.cgi?id=88504 Reviewed by Dan Bernstein. uppercaseWord, lowercaseWord, and capitalizeWord are methods declared by NSResponder that subclasses are expected to implement. WebKit should only support these implementations on platforms that use AppKit. * WebCore.exp.in: * editing/Editor.cpp: * editing/Editor.h: * loader/EmptyClients.h: * page/ContextMenuController.cpp: * page/EditorClient.h: 2012-06-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119683. http://trac.webkit.org/changeset/119683 https://bugs.webkit.org/show_bug.cgi?id=88505 it broke webkit-unit-test WebLayerTreeViewThreadedTest.InstrumentationCallbacks on mac (Requested by loislo on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::setVisible): 2012-06-06 Robert Kroeger <rjkroege@chromium.org> [Chromium] Re-enable handling of smooth scrolling on Chromium Linux/Windows https://bugs.webkit.org/show_bug.cgi?id=87535 by adding support for m_hasPreciseScrollingDelta on all Chromium platforms and adjusting ScrollAnimator and ScrollAnimatorNone accordingly to let m_hasPreciseScrollingDelta == true force exact (non-animated) scrolling. Reviewed by James Robinson. Updated WebKit unit tests to validate change. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Adjusted #ifdefs to make m_hasPreciseScrollingDelta available on all Chromium platforms. (PlatformWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::handleWheelEvent): Default scroll type is set based on m_hasPreciseScrollingDelta value. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::scroll): Scroll precisely when necessary. * platform/ScrollTypes.h: Added additional pixel scrolling subtype. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scroll): Updated for additional pixel scroll subtype. 2012-06-06 Michal Mocny <mmocny@google.com> [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation. https://bugs.webkit.org/show_bug.cgi?id=87747 Reviewed by Adrienne Walker. GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes invisible, and an appropriate allocation after a renderer is initialized. These numbers will change depending on the state of memory across devices and other renderers, so we would like to remove all explicit management by the renderers themselves. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::setVisible): 2012-06-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119680. http://trac.webkit.org/changeset/119680 https://bugs.webkit.org/show_bug.cgi?id=88498 It broke mac build (Requested by kinuko on #webkit). * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): (WebCore): (WebCore::File::captureSnapshot): * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.cpp: (WebCore): 2012-06-06 Kinuko Yasuda <kinuko@chromium.org> File::lastModifiedDate should use NaN or separate boolean flag for null Date value https://bugs.webkit.org/show_bug.cgi?id=87826 Reviewed by Kent Tamura. Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::captureSnapshot): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): Removed. * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.cpp: (WebCore): 2012-06-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119668. http://trac.webkit.org/changeset/119668 https://bugs.webkit.org/show_bug.cgi?id=88493 Hitting assertions in debug builds (Requested by rniwa on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): * rendering/RenderBoxModelObject.cpp: * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderInline.cpp: * rendering/RenderInline.h: (RenderInline): 2012-06-06 Julien Chaffraix <jchaffraix@webkit.org> Cache isSelfPaintingLayer() for better performance https://bugs.webkit.org/show_bug.cgi?id=88464 Reviewed by Simon Fraser. Covered by existing tests (repaint tests among them). isSelfPaintingLayer() has shown up several times on some scrolling benchmarks due to the function being called several time per paint phase. This change caches the boolean at style change time. On http://dglazkov.github.com/performance-tests/biggrid.html, this nearly speed-up painting by 2 (lowering the time taken to paint the newly exposed area when scrolling on a 10,000 * 100 table from 95ms to 50ms). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): Initialized m_isSelfPaintingLayer here. (WebCore::RenderLayer::paintLayer): Changed the order of the checks to get the more likely check first. (WebCore::RenderLayer::shouldBeSelfPaintingLayer): Renamed from isSelfPaintingLayer to make m_isNormalFlowOnly. (WebCore::RenderLayer::styleChanged): Added code to update our cached m_isSelfPaintingLayer. * rendering/RenderLayer.h: (WebCore::RenderLayer::isSelfPaintingLayer): Changed to return m_isSelfPaintingLayer. 2012-06-06 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r109729) [Form] Rendering of select/optgroup/option combination is too slow. https://bugs.webkit.org/show_bug.cgi?id=88059 Reviewed by Kent Tamura. This patch changes not to share RenderStyle object for option and optgroup element regardless attributes. When we tried to shared RenderStyle object, rendering performance was good but we had issue in selected option and text transform, see https://bugs.webkit.org/show_bug.cgi?id=88405 for details. No new tests. This patch doesn't change behavior but rendering performance. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Changed to always return false for option and optgroup. 2012-06-06 Alec Flett <alecflett@chromium.org> IndexedDB: Optimize single-key get() https://bugs.webkit.org/show_bug.cgi?id=85288 Reviewed by Tony Chang. No new tests, this is just an optimization. After a recent refactoring, we started creating an internal cursor with every call to get(). The most common use of get() is with a single key, so provide a fast-path to avoid creating the cursor. * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::getByRangeInternal): * Modules/indexeddb/IDBKeyRange.h: (WebCore::IDBKeyRange::isOnlyKey): (IDBKeyRange): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getByRangeInternal): 2012-06-06 Shezan Baig <shezbaig.wk@gmail.com> Caret is not rendered in empty inline contenteditable elements https://bugs.webkit.org/show_bug.cgi?id=85793 Reviewed by Ryosuke Niwa. Override localCaretRect in RenderInline. The implementation was almost identical to localCaretRect in RenderBlock for empty block elements, so I refactored RenderBlock::localCaretRect and moved the logic to a new method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The implementation of 'localCaretRect' in RenderBlock and RenderInline both use this helper method in RenderBoxModelObject. Tests: editing/selection/caret-in-empty-inline-1.html editing/selection/caret-in-empty-inline-2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Modified to use RenderBoxModelObject::localCaretRectForEmptyElement. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement): (WebCore): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): Add localCaretRectForEmptyElement helper method. * rendering/RenderInline.cpp: (WebCore::RenderInline::localCaretRect): (WebCore): * rendering/RenderInline.h: (RenderInline): Override localCaretRect using localCaretRectForEmptyElement. 2012-06-06 Alexis Menard <alexis.menard@openbossa.org> Fix border-image-slice failures on http://css3test.com. https://bugs.webkit.org/show_bug.cgi?id=88328 Reviewed by Tony Chang. The old parsing code was assuming that the fill keyword comes after the numbers or the percentage values. http://www.w3.org/TR/css3-background/#the-border-image-slice defines the property like this : [<number> | <percentage>]{1,4} && fill? where the fill keyword is not mandatory. But according to http://www.w3.org/TR/CSS2/about.html "&&" separates two or more components, all of which must occur, in any order. So the previous code was wrong the fill can come first following by the percentages or the numbers. http://css3test.com was covering this particular case. I took the opportunity to extend our coverage by adding tests on many different values the boder-image-slice property could take. I also did a small cleanup by removing unused functions in BorderImageSliceParseContext. Test: fast/css/getComputedStyle/getComputedStyle-border-image-slice.html * css/CSSParser.cpp: (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): (WebCore::BorderImageSliceParseContext::commitNumber): (WebCore::BorderImageSliceParseContext::commitFill): 2012-06-06 Levi Weintraub <leviw@chromium.org> Use enclosingIntRect instead of pixelSnappedIntRect in RenderFileUploadControl https://bugs.webkit.org/show_bug.cgi?id=88454 Reviewed by Kent Tamura. Properly clipping the file upload control to avoid clipping out the top of the file upload button when the control is positioned at a sub-pixel offset that rounds up. Test: fast/sub-pixel/file-upload-control-at-fractional-offset.html * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): 2012-06-06 Filip Pizlo <fpizlo@apple.com> Global object variable accesses should not require an extra load https://bugs.webkit.org/show_bug.cgi?id=88385 Reviewed by Gavin Barraclough and Geoffrey Garen. Updated JSDOMWindowBase.cpp to use the new symbol table API. this->symbolTableFoo(...) becomes symbolTableFoo(this, ...). No new tests because no change in behavior. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::updateDocument): 2012-06-06 James Robinson <jamesr@chromium.org> [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support https://bugs.webkit.org/show_bug.cgi?id=86257 Reviewed by Kenneth Russell. The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium on top of the Platform interface WebGraphicsContext3D. This moves the implementation support code from WebKit/chromium/src to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore interfaces and allows code in WebCore/platform to use this support code directly where appropriate. Refactor only, no new functionality or tests. * WebCore.gypi: * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp. (WebCore): (WebCore::Extensions3DChromium::Extensions3DChromium): (WebCore::Extensions3DChromium::~Extensions3DChromium): (WebCore::Extensions3DChromium::supports): (WebCore::Extensions3DChromium::ensureEnabled): (WebCore::Extensions3DChromium::isEnabled): (WebCore::Extensions3DChromium::getGraphicsResetStatusARB): (WebCore::Extensions3DChromium::blitFramebuffer): (WebCore::Extensions3DChromium::renderbufferStorageMultisample): (WebCore::Extensions3DChromium::postSubBufferCHROMIUM): (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM): (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM): (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM): (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM): (WebCore::Extensions3DChromium::setVisibilityCHROMIUM): (WebCore::Extensions3DChromium::discardFramebufferEXT): (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM): (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM): (WebCore::Extensions3DChromium::createVertexArrayOES): (WebCore::Extensions3DChromium::deleteVertexArrayOES): (WebCore::Extensions3DChromium::isVertexArrayOES): (WebCore::Extensions3DChromium::bindVertexArrayOES): (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE): (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM): (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM): (WebCore::Extensions3DChromium::paintFramebufferToCanvas): (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM): (WebCore::Extensions3DChromium::texStorage2DEXT): (WebCore::Extensions3DChromium::createQueryEXT): (WebCore::Extensions3DChromium::deleteQueryEXT): (WebCore::Extensions3DChromium::isQueryEXT): (WebCore::Extensions3DChromium::beginQueryEXT): (WebCore::Extensions3DChromium::endQueryEXT): (WebCore::Extensions3DChromium::getQueryivEXT): (WebCore::Extensions3DChromium::getQueryObjectuivEXT): * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp. (WebCore): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::setContextLostCallback): (WebCore::GraphicsContext3D::setErrorMessageCallback): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformTexture): (WebCore::GraphicsContext3D::grContext): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::isGLES2Compliant): (WebCore::GraphicsContext3D::isResourceSafe): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::markContextChanged): (WebCore::GraphicsContext3D::layerComposited): (WebCore::GraphicsContext3D::markLayerComposited): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::getInternalFramebufferSize): * platform/chromium/support/GraphicsContext3DPrivate.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.cpp. (WebCore): (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext): (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D): (GrMemoryAllocationChangedCallback): (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback): (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged): (WebCore::GraphicsContext3DPrivate::grContext): (WebCore::GraphicsContext3DPrivate::markContextChanged): (WebCore::GraphicsContext3DPrivate::layerComposited): (WebCore::GraphicsContext3DPrivate::markLayerComposited): (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas): (GraphicsContext3DContextLostCallbackAdapter): (WebCore::GraphicsContext3DContextLostCallbackAdapter::GraphicsContext3DContextLostCallbackAdapter): (WebCore::GraphicsContext3DContextLostCallbackAdapter::~GraphicsContext3DContextLostCallbackAdapter): (WebCore::GraphicsContext3DContextLostCallbackAdapter::onContextLost): (WebCore::GraphicsContext3DPrivate::setContextLostCallback): (GraphicsContext3DErrorMessageCallbackAdapter): (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::GraphicsContext3DErrorMessageCallbackAdapter): (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::~GraphicsContext3DErrorMessageCallbackAdapter): (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::onErrorMessage): (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback): (WebCore::GraphicsContext3DPrivate::getExtensions): (WebCore::GraphicsContext3DPrivate::initializeExtensions): (WebCore::GraphicsContext3DPrivate::supportsExtension): (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled): (WebCore::GraphicsContext3DPrivate::isExtensionEnabled): (WebCore::GraphicsContext3DPrivate::isResourceSafe): (GraphicsContext3DMemoryAllocationChangedCallbackAdapter): (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter): (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter): (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged): (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM): (GraphicsContext3DSwapBuffersCompleteCallbackAdapter): (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter): (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter): (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete): (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM): * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h. (WebKit): (WebCore): (GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::webContext): (WebCore::GraphicsContext3DPrivate::preserveDrawingBuffer): 2012-06-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119624. http://trac.webkit.org/changeset/119624 https://bugs.webkit.org/show_bug.cgi?id=88472 Caused worker tests to become flaky (Requested by mhahnenberg on #webkit). * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::~AbstractWorker): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerObjectDestroyed): 2012-06-06 Brady Eidson <beidson@apple.com> <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428 REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues Reviewed by Nate Chapin. Test: fast/loader/webarchive-encoding-respected.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): Properly set the main resource encoding from the webarchive. 2012-06-06 Mark Hahnenberg <mhahnenberg@apple.com> Worker tear-down can re-enter JSC during GC finalization https://bugs.webkit.org/show_bug.cgi?id=88449 Reviewed by Geoffrey Garen. No new tests. Current regression tests cover these changes. * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it will be called elsewhere in contextDestroyed(). * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We make the call to terminateWorkerContext() and workerContextDestroyed() asynchronous to avoid entering JSC during GC finalization. 2012-06-06 Tony Chang <tony@chromium.org> webkit crashes on debug builds when running IETC flexbox-ordinal-group-001.htm https://bugs.webkit.org/show_bug.cgi?id=85832 Reviewed by Ojan Vafai. We were using a HashSet<unsigned>, which can't hold the value of 0. According to the spec, 0 isn't a valid value, so at CSS parse time, reject the value 0. This lets us pass the test, although that's kind of by accident. We could allow 0 for box-ordinal-group, but there are some perf implications to having allowing a value below the initial value (1 in this case). We still allow 0 for box-flex-group, because that's what the existing code does and there are tests expecting this behavior. No new tests, covered by ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm which was crashing. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Reject 0 for -webkit-box-ordinal-group. 2012-06-06 Ojan Vafai <ojan@chromium.org> Remove some magic from the -webkit-flex shorthand parsing to match the changes in the spec https://bugs.webkit.org/show_bug.cgi?id=88444 Reviewed by Tony Chang. -Unset positive flex defaults to 0. -Unset negative flex defaults to 1. No magic of doing something different if positive flex was set. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): 2012-06-06 Ryosuke Niwa <rniwa@webkit.org> Revert r119440 now that I have a time to rebaseline them all! * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::thumbLength): 2012-06-06 Joshua Bell <jsbell@chromium.org> IndexedDB: Infinite recursion in IDBObjectStore.openCursor(key, legacy_constant) https://bugs.webkit.org/show_bug.cgi?id=88431 Reviewed by Tony Chang. Function was calling itself, rather than delegating to the correct (IDBKeyRange) overload. Test: storage/indexeddb/legacy-constants.html * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): 2012-06-06 Joshua Bell <jsbell@chromium.org> IndexedDB: Rename IDBFactory.getDatabaseNames() to webkitGetDatabaseNames() https://bugs.webkit.org/show_bug.cgi?id=86874 Reviewed by Ojan Vafai. The function is non-standard, and should be prefixed. Test: storage/indexeddb/factory-basics.html * Modules/indexeddb/IDBFactory.idl: 2012-06-06 Julien Chaffraix <jchaffraix@webkit.org> Add support for direction on table row group with collapsing borders https://bugs.webkit.org/show_bug.cgi?id=87900 Reviewed by Ojan Vafai. Tests: fast/table/border-collapsing/first-cell-left-border-hidden-table-ltr-section-rtl.html fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html fast/table/border-collapsing/left-border-table-ltr-section-rtl.html fast/table/border-collapsing/left-border-table-rtl-section-ltr.html fast/table/border-collapsing/left-border-table-rtl-section-rtl.html fast/table/border-collapsing/left-border-vertical-lr-table-ltr-section-rtl.html fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-ltr.html fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-rtl.html fast/table/border-collapsing/rtl-table-left-border-hidden.html fast/table/border-collapsing/top-border-vertical-rl-table-ltr-section-rtl.html fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-ltr.html fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-rtl.html fast/table/table-ltr-section-rtl.html fast/table/table-rtl-section-ltr.html fast/table/table-rtl-section-rtl.html This change enables proper support for direction on table row group. The current code would allow people to set direction on the row group but would still use the table's code for directionality checks (with surprising consequences). The main change involve swapping end / start borders in case of mixed directionality as those 2 are not in sync. Example: <table dir="ltr"><tbody dir="rtl"><td id="cell0"></td><td id="cell1"></td></tbody></table> Visually: Table: Start ---------------------> End Tbody: End <---------------------- Start Cell: | #cell0 | #cell1 | In this example, the end table border should be compared with the tbody's start border and the last cell's (in DOM order) start border. * rendering/RenderTable.cpp: (WebCore::RenderTable::tableStartBorderAdjoiningCell): (WebCore::RenderTable::tableEndBorderAdjoiningCell): Same as the other adjoining functions. * rendering/RenderTable.h: (WebCore::RenderTable::lastColumnIndex): Helper function to get the last column index. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): Updated to call the table's adjoining border helpers. * rendering/RenderTableCell.h: (WebCore::RenderTableCell::styleForCellFlow): Updated to use the table row group's style now that we properly support it. (WebCore::RenderTableCell::isFirstOrLastCellInRow): Debug only helper to make sure we don't call the border adjoining function on non-terminal cells. (WebCore::RenderTableCell::borderAdjoiningTableStart): (WebCore::RenderTableCell::borderAdjoiningTableEnd): * rendering/RenderTableRow.h: (WebCore::RenderTableRow::borderAdjoiningTableStart): (WebCore::RenderTableRow::borderAdjoiningTableEnd): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart): (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd): Updated the previous function to account for mixed directionality. (WebCore::RenderTableSection::layoutRows): Move some of the code to setLogicalPositionForCell to match RenderBlock. (WebCore::RenderTableSection::setLogicalPositionForCell): Switched direction checks to styleForCellFlow (this doesn't change anything as we were already properly flipping already but ensure better). * rendering/RenderTableSection.h: (WebCore::RenderTableSection::hasSameDirectionAsTable): Added this helper to know if we have a mixed direction. (WebCore::RenderTableSection::borderAdjoiningTableStart): (WebCore::RenderTableSection::borderAdjoiningTableEnd): Updated to account for mixed directionality. 2012-06-06 Keyar Hood <keyar@chromium.org> [Chromium] imageSmoothingEnabled should apply to patterns https://bugs.webkit.org/show_bug.cgi?id=88103 Reviewed by Stephen White. Test: fast/canvas/canvas-imageSmoothingEnabled-patterns.html When drawing patterns on a Canvas, the imageSmoothingEnabled flag is respected. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setupShader): 2012-06-06 Andrey Adaikin <aandrey@chromium.org> Web Inspector: [JSC] Add WebGL instrumentation support https://bugs.webkit.org/show_bug.cgi?id=87975 Reviewed by Vsevolod Vlasov. * bindings/js/JSInjectedScriptManager.cpp: (WebCore::injectAndExecuteFunction): (WebCore::InjectedScriptManager::createInjectedScript): (WebCore): (WebCore::InjectedScriptManager::injectWebGLScript): * bindings/v8/custom/V8InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::injectWebGLScript): * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation): * inspector/InjectedScriptManager.h: (InjectedScriptManager): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): * inspector/InspectorWebGLAgent.cpp: (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation): * inspector/InspectorWebGLAgent.h: (InspectorWebGLAgent): * inspector/InspectorWebGLInstrumentation.h: (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation): 2012-06-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Fix a few spelling mistakes in IconDatabase logging Makes debugging harder if the logging is confusing. Reviewed by Jocelyn Turcotte. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::notifyPendingLoadDecisions): (WebCore::IconDatabase::readFromDatabase): 2012-05-25 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: [Compiler] Remove compile-front-end.sh and fix InjectedScriptSource errors. https://bugs.webkit.org/show_bug.cgi?id=87512 Reviewed by Yury Semikhatsky. Removed compile-front-end.sh, compile-front-end.py should be used instead now. Made generate_protocol_externs a python module to call it from compile-front-end.py. Temporary copy of InjectedScriptSource.js is created and modified to avoid "This code lacks side effects" warning. * inspector/compile-front-end.py: * inspector/compile-front-end.sh: Removed. * inspector/generate-protocol-externs: Removed. * inspector/generate_protocol_externs.py: Added. (full_qualified_type_id): (param_type): (generate_protocol_externs): 2012-06-06 Zoltan Herczeg <zherczeg@webkit.org> [Qt] REGRESSION(r118616): It made all tests crash in debug mode https://bugs.webkit.org/show_bug.cgi?id=87701 Reviewed by Csaba Osztrogonác. Replace WriteBarrier<JSObject> to Weak<JSObject> by introducing a new QtWeakObjectReference sub class. Rewrite all affected type definitions. All existing test in debug mode cover this issue. * bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fallbackObject): * bridge/qt/qt_instance.cpp: (QtRuntimeObject): (JSC::Bindings::QtInstance::removeUnusedMethods): * bridge/qt/qt_instance.h: (QtInstance): (QtWeakObjectReference): (JSC::Bindings::QtInstance::QtWeakObjectReference::QtWeakObjectReference): (JSC::Bindings::QtInstance::QtWeakObjectReference::operator=): (JSC::Bindings::QtInstance::QtWeakObjectReference::get): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethodData::finalize): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::QtRuntimeMethodData::finalize): 2012-06-06 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: help/settings screen does not overlay console in split screen mode https://bugs.webkit.org/show_bug.cgi?id=88352 Reviewed by Pavel Feldman. * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen): Mark view as root. (WebInspector.HelpScreen.prototype.showModal): Change view parent. * inspector/front-end/helpScreen.css: (.help-window-outer): Add panel and status bar indent. (body.compact .help-window-outer): Ditto. 2012-06-06 Yoshifumi Inoue <yosin@chromium.org> [Form] Changes for InputNumber type https://bugs.webkit.org/show_bug.cgi?id=88394 Reviewed by Kent Tamura. This patch changes codes for consitency of InputNumber usage for reducing size of patch when we change InputNumber type alias from double to Decimal. No new tests. This patch doesn't change behavior. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Fixed parameter type for getAllowedValueStep. * html/InputType.cpp: (WebCore::InputType::minimum): Fixed return value type to InputNumber. (WebCore::InputType::maximum): ditto. * html/MonthInputType.cpp: (WebCore::MonthInputType::defaultValueForStepUp): Fix return value type to InputNumber. (WebCore::MonthInputType::parseToNumber): ditto. * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsDouble): Removed extra convertDoubleToInputNumber. * html/StepRange.cpp: (WebCore::StepRange::alignValueForStep): Use roundByStep for code sharing. (WebCore::StepRange::clampValue): ditto. (WebCore::StepRange::roundByStep): Added. * html/StepRange.h: (StepRange): Added a declaration of roundByStep. 2012-06-06 Michael Brüning <michael.bruning@nokia.com> [Qt] Fix harmattan builds broken by r119247. https://bugs.webkit.org/show_bug.cgi?id=88330 Reviewed by Jocelyn Turcotte. Fix Harmattan build break caused by undefined constant GL_TEXTURE_RECTANGLE_ARB by adding defined(GL_ARB_texture_rectangle) guards around TextureMapperGL::drawTextureRectangleARB. * platform/graphics/texmap/TextureMapperGL.cpp: Added defined(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB. (WebCore): * platform/graphics/texmap/TextureMapperGL.h: Added definded(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB. 2012-06-06 Shinya Kawanaka <shinyak@chromium.org> PositionIterator:;setOffsetInLeafNode() is not used anywhere. https://bugs.webkit.org/show_bug.cgi?id=88397 Reviewed by Ryosuke Niwa. It's not used anywhere. We can remove it safely. No new tests, no change in behavior. * WebCore.order: * dom/PositionIterator.cpp: * dom/PositionIterator.h: 2012-06-06 Andrey Adaikin <aandrey@chromium.org> Web Inspector: [WebGL] Add WebGL instrumentation support on the backend https://bugs.webkit.org/show_bug.cgi?id=87960 Adds a WebGLAgent, injects a WebGL script upon calling the getContext method of a HTMLCanvasElement that will wrap the WebGL rendering context for instrumentation purposes. Reviewed by Yury Semikhatsky. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): (WebCore::JSHTMLCanvasElement::toDataURL): * bindings/js/JSInjectedScriptManager.cpp: (WebCore): (WebCore::InjectedScriptManager::injectWebGLScript): * bindings/v8/ScriptState.cpp: (WebCore::ScriptState::forContext): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore): (WebCore::InjectedScriptManager::injectWebGLScript): (WebCore::InjectedScriptManager::discardInjectedScript): (WebCore::InjectedScriptManager::injectedScriptFor): * inspector/CodeGeneratorInspector.py: * inspector/InjectedScriptManager.cpp: (WebCore): (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation): (WebCore::InjectedScriptManager::injectedWebGLScriptSource): * inspector/InjectedScriptManager.h: (InjectedScriptManager): * inspector/InjectedWebGLScriptSource.js: Added. * inspector/Inspector.json: * inspector/InspectorAllInOne.cpp: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): (WebCore::InspectorInstrumentation::markResourceAsCached): * inspector/InspectorWebGLAgent.cpp: Added. (WebCore): (WebGLAgentState): (WebCore::InspectorWebGLAgent::InspectorWebGLAgent): (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent): (WebCore::InspectorWebGLAgent::setFrontend): (WebCore::InspectorWebGLAgent::clearFrontend): (WebCore::InspectorWebGLAgent::restore): (WebCore::InspectorWebGLAgent::enable): (WebCore::InspectorWebGLAgent::disable): (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation): * inspector/InspectorWebGLAgent.h: Added. (WebCore): (InspectorWebGLAgent): (WebCore::InspectorWebGLAgent::create): (WebCore::InspectorWebGLAgent::enabled): * inspector/InspectorWebGLInstrumentation.h: Added. (WebCore): (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation): * inspector/InstrumentingAgents.h: (WebCore): (WebCore::InstrumentingAgents::InstrumentingAgents): (InstrumentingAgents): (WebCore::InstrumentingAgents::inspectorWebGLAgent): (WebCore::InstrumentingAgents::setInspectorWebGLAgent): 2012-06-06 Joone Hur <joone.hur@intel.com> [GTK] Build fix for Accelerated Compositing with OpenGL https://bugs.webkit.org/show_bug.cgi?id=88292 Reviewed by Martin Robinson. Build fix after r119247. Do not include GraphicsSurface.h when not building with GRAPHICS_SURFACE. No new tests. This is only a build fix. * platform/graphics/texmap/TextureMapperBackingStore.cpp: * platform/graphics/texmap/TextureMapperBackingStore.h: * platform/graphics/texmap/TextureMapperGL.cpp: 2012-06-05 Joe Thomas <joethomas@motorola.com> ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox https://bugs.webkit.org/show_bug.cgi?id=88197 Reviewed by Daniel Bates. RenderSVGRoot extends RenderReplaced and it overrides the computeIntrinsicRatioInformation() method of RenderReplaced. RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize to true while it handles width and height of percentage types. So this assertion should be fired only if intrinsicRatio is non-zero. Test: svg/in-html/svg-assert-failure-percentage.html * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox): 2012-06-05 Tony Chang <tony@chromium.org> Changing flexbox justify/alignment doesn't update their positioning https://bugs.webkit.org/show_bug.cgi?id=88366 Reviewed by Ojan Vafai. Test: css3/flexbox/style-change.html * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): Since these member variables were moved out of StyleFlexibleBoxData, we have to compare them in RenderStyle::diff. 2012-06-05 Charles Wei <charles.wei@torchmobile.com.cn> JSC implementation of SerializedScriptValue for IndexedDB https://bugs.webkit.org/show_bug.cgi?id=88048 Reviewed by George Staikos. No new tests. All the current indexeddb test cases apply when indexeddb works for JSC. * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serializeNumber): (CloneSerializer): (WebCore::CloneDeserializer::toWireString): (CloneDeserializer): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::toWireString): (WebCore): (WebCore::SerializedScriptValue::createFromWire): (WebCore::SerializedScriptValue::numberValue): (WebCore::SerializedScriptValue::deserialize): 2012-06-05 Ojan Vafai <ojan@chromium.org> Nested CSS flexbox renders incorrectly https://bugs.webkit.org/show_bug.cgi?id=87679 Reviewed by Julien Chaffraix. If the containing block with a perpendicular writing mode has an overrideHeight, then its logical height should be based off that instead of its RenderStyle. Test: css3/flexbox/perpendicular-writing-modes-inside-flex-item.html * rendering/RenderBox.cpp: (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight): 2012-06-05 Charles Wei <charles.wei@torchmobile.com.cn> Need special-case toJS(IDBAny) for IDBCursorWithValue https://bugs.webkit.org/show_bug.cgi?id=87963 Reviewed by George Staikos. No new tests, this is for indexedDB, which is not working for JSC binding. When indexedDB working for JSC, all the indexdb test cases should apply. * bindings/js/JSIDBAnyCustom.cpp: (WebCore::toJS): 2012-06-05 Michal Mocny <mmocny@google.com> [chromium] Set default memory allocation limit bytes when GL_CHROMIUM_gpu_memory_manager is not supported by graphics context. https://bugs.webkit.org/show_bug.cgi?id=87996 Reviewed by James Robinson. Soon we hope to have renderers not manage there own memory allocation limits, and rely exclusively on the allocation given by GpuMemoryManager. However, when the graphics context does not support the GL_CHROMIUM_gpu_memory_manager extension, such as the one used by DumpRenderTree, we must default the memory allocation limit to some non-0 value. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (WebCore): (DebugScopedSetMainThreadFromEither): (WebCore::DebugScopedSetMainThreadFromEither::DebugScopedSetMainThreadFromEither): (WebCore::DebugScopedSetMainThreadFromEither::~DebugScopedSetMainThreadFromEither): 2012-06-05 Roland Takacs <takacs.roland@stud.u-szeged.hu> [Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES https://bugs.webkit.org/show_bug.cgi?id=78720 Reviewed by Noam Rosenthal. Functions are removed from GraphicsContext3DQt that already implemented in GraphicsContext3DCommon. Macros that not supported at GLES have been changed to their appropriate pair that found in GraphicsContext3D (e.g. GL_FRAMEBUFFER_EXT to GraphicsContext3D::FRAMEBUFFER). It was needed because OpenGLES does not support these macros. Extensions3DQt is removed beceause it has never been used. Some functions have been moved fron GraphicsContext3DCommon to *OpenGL and *OpenGLES to provide specialization. The "m_depthStencilBuffer" member is added to Qt port because it uses "m_depthStencilBuffer" like the other platforms. * Target.pri: * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::depthRange): (WebCore): (WebCore::GraphicsContext3D::clearDepth): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::prepareTexture): (WebCore::GraphicsContext3D::readRenderingResults): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::readPixels): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore::GraphicsContext3D::depthRange): (WebCore): (WebCore::GraphicsContext3D::clearDepth): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::isGLES2Compliant): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore): 2012-06-05 Vitaly Buka <vitalybuka@chromium.org> Special layout handler should be done on top frame being printed. https://bugs.webkit.org/show_bug.cgi?id=88201 Reviewed by Brady Eidson. No new tests. Root case is already covered by tests. Case described in the issue can be reproduced only by direct call to Frame::setPrinting of subframe. Probably it's not possible with layout tests. * page/Frame.cpp: (WebCore::Frame::setPrinting): Use shouldUsePrintingLayout to choose proper version of forceLayout(). (WebCore::Frame::shouldUsePrintingLayout): Checks if current frame is the top frame being printed. * rendering/RenderView.cpp: (WebCore::RenderView::shouldUsePrintingLayout): Forward to Frame. 2012-06-05 Max Feil <mfeil@rim.com> [BlackBerry] Conditionally enlarge HTML5 video controls in fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=87551 Reviewed by Antonio Gomes. Changes to make media controls larger in fullscreen mode. The BlackBerry media controls used to be sized by a combination of CSS styles specified in mediaControlsBlackBerry.css and hard coded constants in RenderThemeBlackBerry.cpp. This patch moves all the dimensional sizes to a common location, i.e. RenderThemeBlackBerry.cpp. Having all the logic in C++ code allows more complex decision making for when and how much to enlarge the media controls. Currently the controls are enlarged by a factor of 2 if the document is in fullscreen mode, the video element is the current fullscreen element, and the deviceScaleFactor of the page is less than 2.0. This avoids overly large controls on pages which are already at least doubling the size of the controls via viewport meta tag device-width settings. In other words, if the CSS pixels are already enlarged compared to device pixels by a factor of at least 2 in length and width. In order to accomplish this, I had to add a new Element* parameter to RenderTheme::adjustSliderThumbSize(). This is needed so that fullscreen mode can be checked and the deviceScaleFactor retrieved. I feel that this does not have a big impact on the code and the other ports, for which I will simply be adding the additional parameter in their platform code. Tests: video-controls-enlarged-fullscreen-meta.html video-controls-enlarged-fullscreen-nometa.html * css/mediaControlsBlackBerry.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container): (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline): (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): * html/shadow/SliderThumbElement.cpp: (WebCore::RenderSliderThumb::updateAppearance): * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore): (WebCore::determineRenderSlider): (WebCore::determineFullScreenMultiplier): (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize): (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle): (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle): (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack): (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb): * platform/blackberry/RenderThemeBlackBerry.h: (RenderThemeBlackBerry): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::adjustSliderThumbSize): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbSize): * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::adjustSliderThumbSize): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustSliderThumbSize): * platform/qt/RenderThemeQt.h: (RenderThemeQt): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::adjustSliderThumbSize): * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize): * rendering/RenderThemeChromiumLinux.h: (RenderThemeChromiumLinux): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize): * rendering/RenderThemeChromiumWin.h: (RenderThemeChromiumWin): * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustSliderThumbSize): * rendering/RenderThemeSafari.h: (RenderThemeSafari): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSliderThumbSize): * rendering/RenderThemeWin.h: (RenderThemeWin): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::adjustSliderThumbSize): * rendering/RenderThemeWinCE.h: (RenderThemeWinCE): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::adjustMediaControlStyle): (WebCore): (WebCore::RenderTheme::adjustSliderThumbStyle): (WebCore::RenderTheme::adjustSliderThumbSize): * rendering/RenderTheme.h: (RenderTheme): 2012-06-05 Stephanie Lewis <slewis@apple.com> https://bugs.webkit.org/show_bug.cgi?id=88370 Memory sampler should trigger low memory signal Reviewed by Geoff Garen. No new tests. Verify by running stress test which crashes in a few minutes without the fix. Fix assumption in block code. We could get in a state where timer_event_source had already been released before the block ran. * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::holdOff): 2012-06-05 Yoshifumi Inoue <yosin@chromium.org> [Forms] Introduce InputNumber type as an alias of double for replacing it to Decimal https://bugs.webkit.org/show_bug.cgi?id=88275 Reviewed by Kent Tamura. This patch introduced InputNumber type as alias of double to be replaced to Decimal and convertDoubleToInputNumber and convertToInputNumberToDouble for reducing size of patch when we introduce Decimal type. This patch added new vairables to use const variable to reduce copy operation when introducing Decimal type. In the implementation, we use InputNumber, will be Decimal, however some methods in IDL use double. To clarify internal usage of value and external usage, thit patch renamed following functions: - parseToDouble => parseNumber - setValueAsNumber => setValueAsDouble and setValueAsInputNumber - valueAsNumber => valueAsDouble This patch is a part of introducing Decimal, https://bugs.webkit.org/show_bug.cgi?id=80009 No new tests. This patch doesn't change behavior. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::valueAsDate): Replaced parseToNumber() to valueAsDouble() (WebCore::BaseDateAndTimeInputType::setValueAsDate): Inserted convertDoubleToInputNumber. (WebCore::BaseDateAndTimeInputType::valueAsDouble): Use new function parseToDouble(). (WebCore::BaseDateAndTimeInputType::setValueAsInputNumber): Added. (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): Changed return type to InputNumber. (WebCore::BaseDateAndTimeInputType::parseToNumber): This is replacement of parseToDouble(). (WebCore::BaseDateAndTimeInputType::parseToDouble): Added for valueAsDate and valueAsDouble. (WebCore::BaseDateAndTimeInputType::serialize): Changed parameter type to InputNumber. (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Replace double to InputNumber for getAllowdStep. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): Replaced double to InputNumber. * html/DateInputType.h: (DateInputType): * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::defaultValueForStepUp): Changed return type to InputNumber. (WebCore::DateTimeInputType::createStepRange): Replaced double to InputNumber. * html/DateTimeInputType.h: (DateTimeInputType): * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): Replaced double to InputNumber. * html/DateTimeLocalInputType.h: (DateTimeLocalInputType): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::getAllowedValueStep): Changed parameter type to InputNumber. (WebCore::HTMLInputElement::valueAsNumber): Use InputType::valueAsDouble. (WebCore::HTMLInputElement::setValueAsNumber): Use InputType::valueAsDouble. * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::valueAsDouble): Replacement of valueAsNumber. (WebCore::InputType::setValueAsDouble): Replacement of valueAsNumber. (WebCore::InputType::setValueAsInputNumber): Replacement of valueAsNumber. (WebCore::InputType::rangeUnderflow): Replaced double to InputNumber. (WebCore::InputType::rangeOverflow): Replaced double to InputNumber. (WebCore::InputType::defaultValueForStepUp): Changed return type to InputNumber. (WebCore::InputType::isInRange): Replaced double to InputNumber. (WebCore::InputType::isOutOfRange): Replaced double to InputNumber. (WebCore::InputType::stepMismatch): Replaced double to InputNumber. (WebCore::InputType::validationMessage): Replaced double to InputNumber. (WebCore::InputType::parseToNumber): Replacement of parseToDouble. (WebCore::InputType::parseToNumberOrNaN): Added for reducing number of std::numeric_limits<double>::quiet_NaN(). (WebCore::InputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber. (WebCore::InputType::serialize): Changed parameter type to InputNumber. (WebCore::InputType::applyStep): Replaced double to InputNumber. (WebCore::InputType::getAllowedValueStep): Changed parameter type to InputNumber. (WebCore::InputType::stepUpFromRenderer): Replaced double to InputNumber. * html/InputType.h: (InputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::defaultValueForStepUp): Changed return type to InputNumber. (WebCore::MonthInputType::createStepRange): Replaced double to InputNumber. (WebCore::MonthInputType::parseToNumber): Replacement of parseToDouble. * html/MonthInputType.h: (MonthInputType): * html/NumberInputType.cpp: (WebCore::NumberInputType::valueAsDouble): Replacement of valueAsNumber. Changed to use parseToDoubleForNumberType. (WebCore::NumberInputType::setValueAsDouble): Replacement of setValueAsNumber. Changed to use serializeForNumberType. (WebCore::NumberInputType::setValueAsInputNumber): Replacement of setValueAsNumber. (WebCore::NumberInputType::createStepRange): Replaced double to InputNumber. (WebCore::NumberInputType::parseToNumber): Replacement of parseToDouble. (WebCore::NumberInputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber. (WebCore::NumberInputType::serialize): * html/NumberInputType.h: (NumberInputType): * html/RangeInputType.cpp: (WebCore::ensureMaximum): Replaced double to InputNumber. (WebCore::RangeInputType::valueAsDouble): Replacement of valueAsNumber. (WebCore::RangeInputType::setValueAsInputNumber): Replacement of setValueAsNumber. (WebCore::RangeInputType::createStepRange): Replaced double to InputNumber. (WebCore::RangeInputType::handleKeydownEvent): Replaced double to InputNumber. (WebCore::RangeInputType::parseToNumber): Replacement of parseToDouble. (WebCore::RangeInputType::serialize): Changed parameter type to InputNumber. (WebCore::RangeInputType::sanitizeValue): Replaced double to InputNumber. * html/RangeInputType.h: (RangeInputType): * html/StepRange.cpp: (WebCore::StepRange::StepRange): Replaced double to InputNumber. (WebCore::StepRange::acceptableError): Replaced double to InputNumber. (WebCore::StepRange::alignValueForStep): Replaced double to InputNumber. (WebCore): (WebCore::StepRange::clampValue): Replaced double to InputNumber. (WebCore::StepRange::stepMismatch): Replaced double to InputNumber. * html/StepRange.h: (WebCore::convertDoubleToInputNumber): Added. (WebCore::convertInputNumberToDouble): Added. (WebCore::StepRange::NumberWithDecimalPlaces::NumberWithDecimalPlaces): Replaced double to InputNumber. (WebCore::StepRange::StepDescription::defaultValue): Replaced double to InputNumber. (StepRange): (WebCore::StepRange::maximum): Replaced double to InputNumber. (WebCore::StepRange::minimum): Replaced double to InputNumber. (WebCore::StepRange::step): Replaced double to InputNumber. (WebCore::StepRange::stepBase): Replaced double to InputNumber. (WebCore::StepRange::defaultValue): Replaced double to InputNumber. (WebCore::StepRange::proportionFromValue): Replaced double to InputNumber. (WebCore::StepRange::valueFromProportion): Replaced double to InputNumber. * html/TimeInputType.cpp: (WebCore::TimeInputType::defaultValueForStepUp): Replaced double to InputNumber. (WebCore::TimeInputType::createStepRange): Replaced double to InputNumber. * html/TimeInputType.h: (TimeInputType): * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): Replaced double to InputNumber. * html/WeekInputType.h: (WeekInputType): * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::writeDocument): Replaced double to InputNumber. * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): Replaced double to InputNumber. (WebCore::RenderSliderThumb::layout): Replaced double to InputNumber. (WebCore::SliderThumbElement::setPositionFromPoint): Replaced double to InputNumber. 2012-06-05 Ryosuke Niwa <rniwa@webkit.org> Build fix after r119527. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): 2012-06-05 Martin Robinson <mrobinson@igalia.com> [Cairo] [OpenGL] Enable GL_OES_standard_derivatives https://bugs.webkit.org/show_bug.cgi?id=87583 Reviewed by Alejandro G. Castro. No new tests. This is covered by oes-standard-derivatives.html in the Khronos WebGL conformance tests, which may one day be part of the WebKit test suite. Activate the GL_OES_standard_derivatives on Cairo along with Qt and Mac. * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): 2012-06-05 Simon Fraser <simon.fraser@apple.com> Avoid creating compositing layers for preserve-3d without transformed descendants https://bugs.webkit.org/show_bug.cgi?id=88115 Reviewed by Antti Koivisto. Avoid creating compositing layers, and therefore using excess backing store, for elements that have -webkit-transform-style: preserve-3d, but no 3D-transformed descendants that would be affected by that preserve-3d. Test: compositing/layer-creation/no-compositing-for-preserve-3d.html * rendering/RenderLayer.h: Replace the "mustOverlap" flag with a enum that describes the different reasons for indirect compositing, so that we can use that information to decide whether to allocate backing store. (WebCore::RenderLayer::setIndirectCompositingReason): (WebCore::RenderLayer::indirectCompositingReason): (WebCore::RenderLayer::mustCompositeForIndirectReasons): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): Initialize m_indirectCompositingReason * rendering/RenderLayerCompositor.h: New out param for computeCompositingRequirements() that is uses to indicate that a 3d-transformed descendant has been encountered. Rename requiresCompositingWhenDescendantsAreCompositing() to requiresCompositingForIndirectReason(), and return the reason as an out param. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): Pass in the saw3DTransform param to computeCompositingRequirements(). (WebCore::RenderLayerCompositor::computeCompositingRequirements): Return a flag from computeCompositingRequirements() that is set to true if we've seen descendants that have 3d transforms. This is later used to decide whether to composite for perspective or preserve-3d. Change the "mustOverlapCompositedLayers" code to use the new "indirect compositing" enum flags. After enumerating children, call requiresCompositingForIndirectReason() and record the reason in the layer. (WebCore::RenderLayerCompositor::needsToBeComposited): Use mustCompositeForIndirectReasons() now. (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Consult the indirect compositing reason rather than just looking for the overlap flag. (WebCore::RenderLayerCompositor::reasonForCompositing): Now that we have more information about indirect compositing reasons, the logging can be more detailed. (WebCore::RenderLayerCompositor::requiresCompositingForTransform): This now only looks for 3d transforms. We now treat perspective and perserve-3d as "indirect" reasons, because whether they composite depends on descendants having non-affine transforms. (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): Includes the logic previously in requiresCompositingWhenDescendantsAreCompositing(), and now determines whether to composite for preserve-3d and perspective, based on whether we have transformed descendants. 2012-06-05 Levi Weintraub <leviw@chromium.org> Block selection gaps painted not properly pixel snapped https://bugs.webkit.org/show_bug.cgi?id=88000 Reviewed by Ryosuke Niwa. Fixes for selection painting in both inline line heights and block gaps. We were unintentionally flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the logical left and right values in logical(Left|Right)SelectionGap to properly align our block selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine. We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting routine. Now we're properly rounding. Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding. * rendering/RenderBlock.cpp: (WebCore::blockDirectionOffset): Fix incorrect flooring in return value. (WebCore::inlineDirectionOffset): Ditto. (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This implementation rounded the final x value instead of properly rounding our block offset then flooring the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap the y offset and height. (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting. (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method. (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right. 2012-06-05 Adam Barth <abarth@webkit.org> Remove support for target-densitydpi in the viewport meta tag https://bugs.webkit.org/show_bug.cgi?id=88047 Reviewed by Kenneth Rohde Christiansen. The target-densitydpi parameter was originally implemented on Android, but it does not appear to be widely used and introduces significant implementation complexity because it forces us to track three scale factors (defaultDeviceScaleFactor, deviceScaleFactor, and pageScaleFactor) rather than just two (deviceScaleFactor and pageScaleFactor). There don't appear to be many web sites that use target-densitydpi because it is not supported on iOS. There are also concerns from the standards community about the design of the feature. It seems our best course of action is to remove target-densitydpi and address these use cases via other mechanisms, such as responsive images and device units in CSS because those approaches are likely to be implemented broadly. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): (WebCore): (WebCore::setViewportFeature): (WebCore::viewportErrorMessageTemplate): (WebCore::viewportErrorMessageLevel): * dom/ViewportArguments.h: (WebCore::ViewportArguments::ViewportArguments): (ViewportArguments): (WebCore::ViewportArguments::operator==): 2012-06-05 Erik Arvidsson <arv@chromium.org> [V8] Improve variable resolution order on window https://bugs.webkit.org/show_bug.cgi?id=84247 Reviewed by Ojan Vafai. This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior. Test: fast/dom/Window/window-property-shadowing-onclick.html * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): Set the flag as we initialize V8. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initIsolate): Ditto. 2012-06-05 Ojan Vafai <ojan@chromium.org> Delete dead code from RenderBox::computeLogicalWidthInRegion https://bugs.webkit.org/show_bug.cgi?id=88353 Reviewed by Tony Chang. No new tests obviously since this is dead code. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegion): 2012-06-05 Greg Billock <gbillock@google.com> New constructor for WebIntent to be used for delivery https://bugs.webkit.org/show_bug.cgi?id=87143 Reviewed by Darin Fisher. * Modules/intents/Intent.cpp: (WebCore::Intent::setExtras): (WebCore): * Modules/intents/Intent.h: (Intent): 2012-06-01 Ojan Vafai <ojan@chromium.org> Change overrideSizes to be content-box instead of border-box https://bugs.webkit.org/show_bug.cgi?id=88116 Reviewed by Tony Chang. Previously, the code used border-box everywhere except for one place where it used content-box when setting the override size. Conversely, it subtracted the borderAndPaddingSize everywhere it grabbed the override size except for one. Instead, make the override size override the content-box size. Converging on using the border-box size would be tricky given RenderTableCell's tricky management of intrinsic padding. There is no behavior change except in RenderBox::availableLogicalHeightUsing, which fixes a table test. * rendering/RenderBox.cpp: (WebCore::RenderBox::setOverrideLogicalContentHeight): (WebCore::RenderBox::setOverrideLogicalContentWidth): (WebCore::RenderBox::overrideLogicalContentWidth): (WebCore::RenderBox::overrideLogicalContentHeight): (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::availableLogicalHeightUsing): We were incorrectly subtracting the borderAndPaddingLogicalWidth instead of the borderAndPaddingLogicalHeight. * rendering/RenderBox.h: (RenderBox): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): (WebCore::RenderFlexibleBox::setLogicalOverrideSize): (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::setOverrideHeightFromRowHeight): 2012-06-05 Andy Estes <aestes@apple.com> REGRESSION (r118197): PluginStrategy should be used even if ENABLE(NETSCAPE_PLUGIN_API) is false https://bugs.webkit.org/show_bug.cgi?id=88296 Reviewed by Dan Bernstein. refresh() and initPlugins() should call into PluginStrategy even if ENABLE(NETSCAPE_PLUGIN_API) is false. Some ports support non-Netscape plug-ins, so PluginStrategy should be consulted even if Netscape plug-ins specifically are disabled. Ports that support platform strategies but not Netscape plug-ins should handle this inside their PluginStrategy rather than modifying generic plug-in code. * plugins/PluginData.cpp: (WebCore::PluginData::refresh): (WebCore::PluginData::initPlugins): 2012-06-05 Douglas Stockwell <dstockwell@chromium.org> Crash when modifying fixed-position elements in a detached frame https://bugs.webkit.org/show_bug.cgi?id=88288 Reviewed by James Robinson. Test: fast/block/positioning/fixed-position-detached-frame.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: render timeline paint category dark green https://bugs.webkit.org/show_bug.cgi?id=88333 Reviewed by Pavel Feldman. - Added a new, dark-green color for timeline events. * WebCore.gypi: Added timelineBarDarkGreen.png * inspector/front-end/Images/timelineBarDarkGreen.png: Added. * inspector/front-end/Images/timelineCheckmarks.png: Added a dark-green checkbox. * inspector/front-end/Images/timelineDots.png: Added a dark-green dot. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): * inspector/front-end/WebKit.qrc: Added timelineBarDarkGreen.png. * inspector/front-end/timelinePanel.css: (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox): (.timeline-category-painting .timeline-graph-bar): (.popover .timeline-painting): (.timeline-category-painting .timeline-tree-icon): 2012-06-05 Alexei Filippov <alexeif@chromium.org> Web Inspector: serialize edge counts instead of indexes in heap snapshot https://bugs.webkit.org/show_bug.cgi?id=88324 The serialized node structure currently holds an index of its first containment edge in the edges array. The index can be quite big (up to 7 digits for large snapshots). The patch changes the serialization format to pass node containment edge count instead. For most nodes the count is just a single digit number. This reduces serialized snapshot size and therefore its transfer time. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart): (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd): (WebInspector.HeapSnapshotNode.prototype._ordinal): (WebInspector.HeapSnapshotNodeIterator): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._bfs): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): (WebInspector.HeapSnapshot.prototype._buildDominatorTree): (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): 2012-06-05 Arpita Bahuguna <arpitabahuguna@gmail.com> CSS 2.1 failure: border-conflict-element-021a https://bugs.webkit.org/show_bug.cgi?id=86885 Reviewed by Julien Chaffraix. When two adjacent table row groups (thead, tbody, tfoot) have the same border-width and the same border-style in a 'border-collapse: collapse' table the color of the border from the top-most table row wins. Tests: fast/table/border-collapsing/adjacent-row-groups-multi.html fast/table/border-collapsing/adjacent-row-groups.html * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): Currently each row group is sent for paint from top (firstChild) to bottom thereby causing the borders of the bottom-most row group (which is painted last) to overlap over the previous row-group. This breaks the precedence for collapsed borders between adjacent cells. This fix thus reverses the order in which the row-groups/sections are passed for painting. Additional change has been done to iterate over the RenderTableSections directly. (WebCore): (WebCore::RenderTable::bottomSection): * rendering/RenderTable.h: New function has been added to obtain the last section of the table. (RenderTable): * rendering/RenderTableSection.h: (RenderTableSection): RenderTableSection's paint() method has now been made public so as to make it accessible from RenderTable. 2012-06-05 Csaba Osztrogonác <ossy@webkit.org> [Qt][Win] Fix IDL dependency generation https://bugs.webkit.org/show_bug.cgi?id=88304 Reviewed by Tor Arne Vestbø. * DerivedSources.pri: 2012-06-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119467, r119471, and r119476. http://trac.webkit.org/changeset/119467 http://trac.webkit.org/changeset/119471 http://trac.webkit.org/changeset/119476 https://bugs.webkit.org/show_bug.cgi?id=88332 it broke chromium-mac static initializers test.\ (Requested by loislo on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/FontPlatformData.h: (FontPlatformData): * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::platformDataAssign): * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Removed. * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Removed. * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Removed. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Removed. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Removed. * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore::Font::selectionRectForComplexText): (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): 2012-06-05 Alexander Pavlov <apavlov@chromium.org> Web Inspector: SHIFT key as helper to color adjustment in color picker https://bugs.webkit.org/show_bug.cgi?id=88319 Reviewed by Pavel Feldman. With Shift depressed, the dragger in the color picker will snap to the horizontal or vertical axis while dragging, depending on which axis offset is greater. * inspector/front-end/Spectrum.js: (WebInspector.Spectrum.colorDragStart): (WebInspector.Spectrum.colorDrag): (WebInspector.Spectrum.draggable.move): (WebInspector.Spectrum.draggable.start): 2012-06-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: aggregate all events before first frame into a fake frame https://bugs.webkit.org/show_bug.cgi?id=88229 - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker. * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._addRecord): (WebInspector.TimelineFrameController.prototype._flushFrame): (WebInspector.TimelineFrameController.prototype._createFrame): 2012-06-05 Charles Wei <charles.wei@torchmobile.com.cn> JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB https://bugs.webkit.org/show_bug.cgi?id=88283 Reviewed by Kentaro Hara. No new tests, idb not working for JSC yet. * bindings/js/Dictionary.cpp: (WebCore::Dictionary::getWithUndefinedOrNullCheck): * bindings/js/Dictionary.h: (Dictionary): * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::getWithUndefinedOrNullCheck): (WebCore): * bindings/js/JSDictionary.h: (JSDictionary): 2012-06-05 Dongwoo Im <dw.im@samsung.com> Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'. https://bugs.webkit.org/show_bug.cgi?id=73176 Reviewed by Adam Barth. Two more APIs are added in Custom Scheme Handler specification. http://dev.w3.org/html5/spec/Overview.html#custom-handlers One is 'isProtocolHandlerRegistered' to query whether the specific URL is registered or not. The other is 'unregisterProtocolHandler' to remove the registered URL. Test: fast/dom/unregister-protocol-handler.html * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'. * loader/EmptyClients.h: Add prototypes. (EmptyChromeClient): (WebCore::EmptyChromeClient::isProtocolHandlerRegistered): (WebCore::EmptyChromeClient::unregisterProtocolHandler): * page/ChromeClient.h: (ChromeClient): * page/NavigatorRegisterProtocolHandler.cpp: (WebCore): (WebCore::customHandlersStateString): (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered. (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler. * page/NavigatorRegisterProtocolHandler.h: (NavigatorRegisterProtocolHandler): * page/NavigatorRegisterProtocolHandler.idl: 2012-06-04 Kinuko Yasuda <kinuko@chromium.org> Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests https://bugs.webkit.org/show_bug.cgi?id=85174 Reviewed by Kentaro Hara. This fixes a crash problem which could happen when the constructor is given an array which contains String-type item(s). There're still some Text mismatches between v8 results and JSC results, most of them are v8 not throwing exception when it is given an object whose toString() method throws exception. (The issue will be addresse in a separate patch.) Test: fast/files/blob-constructor.html * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): 2012-06-05 Kentaro Hara <haraken@chromium.org> Remove unnecessary constructor of SelectorQueryCache https://bugs.webkit.org/show_bug.cgi?id=87942 Reviewed by Ryosuke Niwa. Per the comment from darin@ (https://bugs.webkit.org/show_bug.cgi?id=87942#c27), this patch removes an inline constructor that has no arguments. To have the compiler generate the constructor, this patch also removes WTF_MAKE_NONCOPYABLE(). No tests. No change in behavior. * dom/SelectorQuery.h: (SelectorQueryCache): 2012-06-05 Kentaro Hara <haraken@chromium.org> Remove unused methods from SelectorQuery.h https://bugs.webkit.org/show_bug.cgi?id=88289 Reviewed by Antti Koivisto. This patch removes SelectorDataList::size() and SelectorDataList::SelectorDataList(). SelectorDataList::size() is not used by anybody. SelectorDataList::SelectorDataList() can be auto-generated by a compiler. No tests. No change in behavior. * dom/SelectorQuery.cpp: * dom/SelectorQuery.h: (SelectorDataList): 2012-06-05 Kent Tamura <tkent@chromium.org> Build fix for r119470. * loader/EmptyClients.cpp: Add #include "IntentRequest.h". 2012-06-05 Kent Tamura <tkent@chromium.org> Remove unused function: Document::formElements https://bugs.webkit.org/show_bug.cgi?id=88272 Reviewed by Kentaro Hara. No new tests. No behavior change. * dom/Document.h: (Document): remove formElements(). It was used for radio group validation, but the current code doesn't use it any more. 2012-06-05 Kenichi Ishibashi <bashi@chromium.org> Unreviewed build fix on Chromium mac * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::isAATFont): 2012-06-05 Kent Tamura <tkent@chromium.org> Move some function definitions in EmptyClients.h to EmptyClients.cpp https://bugs.webkit.org/show_bug.cgi?id=88285 Reviewed by Ryosuke Niwa. If we have definitions of functions with RefPtr<> in EmptyClients.h like virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { } and a source file includes EmptyClient.h, the source file needs to include FileChooser.h though the source file doesn't use FileChooser class explicitly because the definition of runOpenPanel() needs to call FileChooser::deref(). To avoid this, we had better move such functions to EmptyClients.cpp. No new tests. No behavior changes. * loader/EmptyClients.cpp: Move such functions from EmptyClients.h to here, and move EmptyPopupMenu and EmptySearchPopupMenu too because they're used only by EmptyChromeClient. (WebCore): (EmptyPopupMenu): (WebCore::EmptyPopupMenu::show): (WebCore::EmptyPopupMenu::hide): (WebCore::EmptyPopupMenu::updateFromElement): (WebCore::EmptyPopupMenu::disconnectClient): (EmptySearchPopupMenu): (WebCore::EmptySearchPopupMenu::popupMenu): (WebCore::EmptySearchPopupMenu::saveRecentSearches): (WebCore::EmptySearchPopupMenu::loadRecentSearches): (WebCore::EmptySearchPopupMenu::enabled): (WebCore::EmptyChromeClient::createPopupMenu): (WebCore::EmptyChromeClient::createSearchPopupMenu): (WebCore::EmptyChromeClient::createColorChooser): (WebCore::EmptyChromeClient::runOpenPanel): (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction): (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent): (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm): (WebCore::EmptyFrameLoaderClient::createDocumentLoader): (WebCore::EmptyFrameLoaderClient::createFrame): (WebCore::EmptyFrameLoaderClient::createPlugin): (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget): (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin): (WebCore::EmptyFrameLoaderClient::createNetworkingContext): (WebCore::EmptyFrameLoaderClient::dispatchIntent): (WebCore::EmptyTextCheckerClient::requestCheckingOfString): (WebCore::EmptyEditorClient::registerUndoStep): (WebCore::EmptyEditorClient::registerRedoStep): (WebCore::EmptyContextMenuClient::customizeMenu): * loader/EmptyClients.h: Move such function definitions to EmptyClient.cpp, and append OVERRIDE. (EmptyChromeClient): (EmptyFrameLoaderClient): (EmptyTextCheckerClient): (EmptyEditorClient): (EmptyContextMenuClient): * svg/graphics/SVGImage.cpp: Remove unnecessary #includes. 2012-06-05 Alexander Pavlov <apavlov@chromium.org> Web Inspector: "-webkit"-prefixed properties are considered inherited in the Computed Style pane https://bugs.webkit.org/show_bug.cgi?id=88257 Reviewed by Pavel Feldman. Canonical names for properties should be used when checking if they are inherited (since only canonical names are put into the usedProperties set). * inspector/front-end/StylesSidebarPane.js: (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited): 2012-06-05 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Implement font shaping with font-feature-settings on Mac https://bugs.webkit.org/show_bug.cgi?id=69826 Reviewed by Tony Chang. Add HarfBuzz-ng text shaper. Chromium mac port uses it as secondary text shaper to support OpenType features. HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and corresponding font is not an AAT font. No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port. * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies. * WebCore.gypi: Added harfbuzz-ng files. * platform/graphics/FontPlatformData.h: (FontPlatformData): Added m_harfbuzzFace. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace. (WebCore::FontPlatformData::platformDataAssign): Ditto. (WebCore): (WebCore::isAATFont): (WebCore::FontPlatformData::harfbuzzFace): * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added. (WebCore): (WebCore::harfbuzzFaceCache): (WebCore::HarfBuzzFace::HarfBuzzFace): (WebCore::HarfBuzzFace::~HarfBuzzFace): * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added. (WebCore): (HarfBuzzFace): (WebCore::HarfBuzzFace::create): * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added. (WebCore): (WebCore::floatToHarfBuzzPosition): (WebCore::getGlyph): (WebCore::getGlyphHorizontalAdvance): (WebCore::getGlyphHorizontalOrigin): (WebCore::getGlyphExtents): (WebCore::harfbuzzCoreTextGetFontFuncs): (WebCore::releaseTableData): (WebCore::harfbuzzCoreTextGetTable): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): (WebCore::HarfBuzzShaper::createGlyphBufferAdvance): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added. (WebCore): (WebCore::harfbuzzPositionToFloat): (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun): (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions): (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): (WebCore::HarfBuzzShaper::HarfBuzzShaper): (WebCore::HarfBuzzShaper::~HarfBuzzShaper): (WebCore::HarfBuzzShaper::setFontFeatures): (WebCore::HarfBuzzShaper::shape): (WebCore::HarfBuzzShaper::setupHarfBuzzRun): (WebCore::HarfBuzzShaper::shapeHarfBuzzRun): (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): (WebCore::HarfBuzzShaper::offsetForPosition): (WebCore::HarfBuzzShaper::selectionRect): * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added. (WebCore): (HarfBuzzShaper): (WebCore::HarfBuzzShaper::totalWidth): (HarfBuzzRun): (WebCore::HarfBuzzShaper::HarfBuzzRun::create): (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth): (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters): (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs): (WebCore::HarfBuzzShaper::HarfBuzzRun::width): (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl): * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore): (WebCore::preferHarfBuzz): Added. (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists. (WebCore::Font::drawComplexText): Ditto. (WebCore::Font::floatWidthForComplexText): Ditto. (WebCore::Font::offsetForPositionForComplexText): Ditto. 2012-06-05 Li Yin <li.yin@intel.com> IETC: FileList.item(-1) should return null instead of raising https://bugs.webkit.org/show_bug.cgi?id=77899 Reviewed by Kentaro Hara. IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm Accroding to http://es5.github.com/#x9.6 When the index is negative, it should not raise exception. Firefox and IE returns null when there is not indexth File object. Test: fast/files/file-list-test.html * fileapi/FileList.idl: 2012-06-05 Adam Barth <abarth@webkit.org> EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse https://bugs.webkit.org/show_bug.cgi?id=88270 Reviewed by James Robinson. This patch adds a setting analogous to deviceSupportsTouch to determine whether the device supports mouse. We then don't dispatch fake mouse events on devices that don't have a mouse in the first place. Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html * page/EventHandler.cpp: (WebCore::EventHandler::fakeMouseMoveEventTimerFired): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setDeviceSupportsMouse): (WebCore::Settings::deviceSupportsMouse): (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setDeviceSupportsMouse): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-06-04 Simon Fraser <simon.fraser@apple.com> Leaking ClipRects https://bugs.webkit.org/show_bug.cgi?id=88282 Reviewed by Dan Bernstein. In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also, there was a manual ref() in RenderLayer::updateClipRects() which this patch removes. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateClipRects): * rendering/RenderLayer.h: (WebCore::ClipRects::ClipRects): 2012-06-04 Emil A Eklund <eae@chromium.org> and Levi Weintraub <leviw@chromium.org> Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats https://bugs.webkit.org/show_bug.cgi?id=88259 Reviewed by Ryosuke Niwa. Fix two rounding bugs in LineLayout and RenderBlock that caused inlines and floats to wrap incorrectly. Tests: fast/sub-pixel/float-containing-block-with-margin.html fast/sub-pixel/float-with-right-margin-zoom.html fast/sub-pixel/inline-block-with-padding.html * platform/FractionalLayoutUnit.h: (WebCore::operator+=): Add missing float version of += operator thus avoiding a silent cast to int loosing precision. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight): (WebCore::LineWidth::updateAvailableWidth): Change LineWidth left/right to floating point and instead of rounding the left and right edge separately. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Use explicit cast to avoid compiler ambiguity warning. 2012-06-04 Tony Chang <tony@chromium.org> CSS property 'order' should be a number rather than an int https://bugs.webkit.org/show_bug.cgi?id=88111 Reviewed by Ojan Vafai. This changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#order I also fixed the compile with CSS3_FLEXBOX disabled. No new tests, covered by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>. (WebCore::CSSProperty::isInheritedProperty): * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>. (RenderFlexibleBox::OrderIterator): * rendering/RenderFlexibleBox.h: * rendering/style/RenderStyle.h: * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-06-04 Hugo Parente Lima <hugo.lima@openbossa.org> Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag. https://bugs.webkit.org/show_bug.cgi?id=88243 Reviewed by Adam Barth. No new tests needed, this just rename a compiler flag. * dom/Document.cpp: (WebCore::Document::setDocType): * dom/ViewportArguments.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): 2012-06-04 Dana Jansens <danakj@chromium.org> [chromium] Remove redundant setNeedsCommit when prepareToDraw fails https://bugs.webkit.org/show_bug.cgi?id=88246 Reviewed by James Robinson. When prepareToDraw fails it explicitly calls setNeedsCommit, but the scheduler already takes care of this for it. When a frame is not successfully drawn, the scheduler state machine sets the needsCommit bit itself. This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::prepareToDraw): 2012-06-04 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] Send requires super linear time against data size https://bugs.webkit.org/show_bug.cgi?id=87383 Reviewed by Kent Tamura. WebSocket send operation requires super linear time to send data against data size. This is because removing sent data in Vector<char> always requires data copy. Introduced wtf/StreamBuffer realizes O(n) buffer operations. This patch is only for optimization. No new tests are needed. * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::sendPendingData): * platform/network/SocketStreamHandleBase.h: (SocketStreamHandleBase): 2012-06-04 Tim Horton <timothy_horton@apple.com> Mock scrollbars differ by 1px in DRT vs. WKTR https://bugs.webkit.org/show_bug.cgi?id=80879 Rubber-stamped by Ryosuke Niwa. Disable r119431 except for Apple Mac port. * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::thumbLength): 2012-06-04 Jeffrey Pfau <jpfau@apple.com> Document cleanup can get confused if parser still exists https://bugs.webkit.org/show_bug.cgi?id=88250 Reviewed by Geoffrey Garen. No new tests; no behavior changes. * dom/Document.cpp: (WebCore::Document::removedLastRef): Detach parser earlier 2012-06-04 Andrew Lo <anlo@rim.com> [BlackBerry] Split AnimationFrameRateController into its own file https://bugs.webkit.org/show_bug.cgi?id=88242 Reviewed by Antonio Gomes. Include new header file to reflect re-organization of platform animation header files. * platform/graphics/DisplayRefreshMonitor.h: 2012-06-04 Dana Jansens <danakj@chromium.org> [chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer. https://bugs.webkit.org/show_bug.cgi?id=88252 Reviewed by James Robinson. CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never set to be non-null currently. Instead of making this a special case, we move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set the pointer on every layer during commit via the TreeSynchronizer's walk through the layer tree. Unit tests: Tested by TreeSynchronizer tests. * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::synchronizeTrees): (WebCore::TreeSynchronizer::synchronizeTreeRecursive): * platform/graphics/chromium/TreeSynchronizer.h: (WebCore): (TreeSynchronizer): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): (WebCore::CCLayerImpl::layerTreeHostImpl): (WebCore::CCLayerImpl::setLayerTreeHostImpl): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::finishCommitOnImplThread): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::setNeedsRedraw): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2012-06-04 Tim Horton <timothy_horton@apple.com> Mock scrollbars differ by 1px in DRT vs. WKTR https://bugs.webkit.org/show_bug.cgi?id=80879 Reviewed by Simon Fraser. Round the length of the scrollbar thumb instead of truncating it. No new tests, fixes a mismatch between pixel results from DRT and WKTR. Change is covered by all existing tests with scrollbars run with low tolerance. * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::thumbLength): 2012-06-04 Anders Carlsson <andersca@apple.com> Fix an unused result warning when building with clang. * platform/cf/BinaryPropertyList.cpp: (WebCore::BinaryPropertyListWriter::writePropertyList): 2012-06-04 Ami Fischman <fischman@chromium.org> Don't crash when re-parenting a removed HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=88058 Reviewed by Eric Carlson. Test: media/media-reparent.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::userCancelledLoad): Clear the pending load flags because any pending load has been cancelled. 2012-06-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119421 and r119425. http://trac.webkit.org/changeset/119421 http://trac.webkit.org/changeset/119425 https://bugs.webkit.org/show_bug.cgi?id=88256 not reliable, let's have a do-over (Requested by kling on #webkit). * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttribute): (WebCore::Element::attributes): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::createAttributeData): (WebCore): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): (WebCore::Element::cloneAttributesFromElement): * dom/Element.h: (WebCore::Element::attributeData): (Element): (WebCore::Element::ensureAttributeData): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureUpdatedAttributeData): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): (WebCore::ElementAttributeData::setClass): (WebCore): (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::ensureMutableInlineStyle): (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::cloneDataFrom): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::create): (ElementAttributeData): (WebCore::ElementAttributeData::setIdForStyleResolution): (WebCore::ElementAttributeData::setAttributeStyle): (WebCore::ElementAttributeData::length): (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::attributeItem): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::ElementAttributeData): (WebCore::ElementAttributeData::attributeVector): (WebCore::ElementAttributeData::clonedAttributeVector): (WebCore::ElementAttributeData::getAttributeItemIndex): * dom/StyledElement.cpp: (WebCore::StyledElement::style): (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::removeInlineStyleProperty): (WebCore::StyledElement::addSubresourceAttributeURLs): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2012-06-04 Andreas Kling <kling@webkit.org> Unreviewed build fixes for cr-android and Qt. * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::setClass): Change ElementAttributeData::setClass() to take an AtomicString instead of a String. The only call site has an AtomicString anyway. * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): Add missing const. 2012-06-04 Sadrul Habib Chowdhury <sadrul@chromium.org> [chromium] Fix software rendering for device-scale-factor > 1 https://bugs.webkit.org/show_bug.cgi?id=88136 Reviewed by Darin Fisher. Test: fast/hidpi/device-scale-factor-paint.html * WebCore.exp.in: * testing/InternalSettings.cpp: (WebCore::InternalSettings::setDeviceScaleFactor): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-06-04 Andreas Kling <kling@webkit.org> Make ElementAttributeData a variable-sized object to reduce memory use. <http://webkit.org/b/88240> Reviewed by Antti Koivisto. Take advantage of the fact that we know at ElementAttributeData construction time how many attributes it needs to accomodate and allocate exactly as much space as needed instead of using a Vector. For elements that never have their attribute list mutated (the vast majority), this saves a lot of memory and removes the indirection to Vector<Attribute>'s heap-allocated storage. Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure that nothing tries to mutate an element with a raw attribute array. When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using a Vector as backing instead. This is triggered when calling Element::mutableAttributeData(). This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>. This is a 35% reduction in DOM attribute memory use. Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic adding of "class" attributes. For more static pages, savings are even greater. * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttribute): (WebCore::Element::attributes): (WebCore::Element::setAttributeInternal): (WebCore::Element::parserSetAttributes): (WebCore::Element::hasEquivalentAttributes): (WebCore::Element::setAttributeNode): (WebCore::Element::removeAttributeNode): (WebCore::Element::getAttributeNode): (WebCore::Element::getAttributeNodeNS): (WebCore::Element::hasAttribute): (WebCore::Element::hasAttributeNS): (WebCore::Element::normalizeAttributes): (WebCore::Element::cloneAttributesFromElement): (WebCore::Element::createMutableAttributeData): * dom/Element.h: (WebCore::Element::attributeData): (Element): (WebCore::Element::updatedAttributeData): (WebCore::Element::ensureAttributeData): (WebCore::Element::ensureUpdatedAttributeData): (WebCore::Element::mutableAttributeData): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::createImmutable): (WebCore::ElementAttributeData::ElementAttributeData): (WebCore::ElementAttributeData::~ElementAttributeData): (WebCore::ElementAttributeData::attrIfExists): (WebCore::ElementAttributeData::ensureAttr): (WebCore::ElementAttributeData::setAttr): (WebCore::ElementAttributeData::removeAttr): (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::ensureMutableInlineStyle): (WebCore::ElementAttributeData::destroyInlineStyle): (WebCore::ElementAttributeData::addAttribute): (WebCore::ElementAttributeData::removeAttribute): (WebCore::ElementAttributeData::isEquivalent): (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase): (WebCore::ElementAttributeData::cloneDataFrom): (WebCore::ElementAttributeData::clearAttributes): (WebCore::ElementAttributeData::replaceAttribute): (WebCore::ElementAttributeData::getAttributeNode): * dom/ElementAttributeData.h: (ElementAttributeData): (WebCore::ElementAttributeData::setClass): (WebCore::ElementAttributeData::setIdForStyleResolution): (WebCore::ElementAttributeData::inlineStyle): (WebCore::ElementAttributeData::setAttributeStyle): (WebCore::ElementAttributeData::isMutable): (WebCore::ElementAttributeData::makeMutable): (WebCore::ElementAttributeData::length): (WebCore::ElementAttributeData::isEmpty): (WebCore::ElementAttributeData::array): (WebCore::ElementAttributeData::attributeItem): (WebCore::ElementAttributeData::getAttributeItem): (WebCore::ElementAttributeData::getAttributeItemIndex): * dom/StyledElement.cpp: (WebCore::StyledElement::style): (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::removeInlineStyleProperty): (WebCore::StyledElement::addSubresourceAttributeURLs): * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2012-06-04 Sadrul Habib Chowdhury <sadrul@chromium.org> [chromium] Combobox options and autofill options should not be scaled for device-scale factor https://bugs.webkit.org/show_bug.cgi?id=87921 Reviewed by Darin Fisher. Chrome takes care of scaling the combobox/autofill lists in the browser side. So it is not necessary to scale here. This change reverts parts of changes in r111539. Manually tested with different scale factors. * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::paint): (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::getRowHeight): * platform/chromium/PopupListBox.h: (PopupContainerSettings): * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupMenuChromium::show): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): 2012-06-04 Dana Jansens <danakj@chromium.org> [chromium] Make LayerRendererChromium use RenderPasses instead of RenderSurfaces https://bugs.webkit.org/show_bug.cgi?id=88132 Reviewed by Adrienne Walker. This patch is partly renaming, partly moving data into CCRenderPass and CCRenderPassDrawQuad. LayerRendererChromium should accept as input a set of RenderPasses and this should be sufficient for drawing. It should have no notion of RenderSurfaces at all. First, what isn't done: RenderSurfaces still hold the textures where RenderPasses are drawn to/from, so that these textures can persist across frames. This will be addressed separately. Otherwise, this completely removes the concept of RenderSurface from LayerRenderChromium and the CCDrawQuad, replacing it with RenderPass. The "renderSurfaceTextureManager" is renamed to the "implTextureManager" and like-wise for the TextureAllocator, as these are not used exclusively for render surfaces (passes), and a texture manager for render passes that does not require a RenderSurface* will be the focus of future changes. Covered by existing tests. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::releaseRenderPassTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::clearRenderPass): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderPassQuad): (WebCore::LayerRendererChromium::copyPlaneToTexture): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::isCurrentRenderPass): (WebCore::LayerRendererChromium::useRenderPass): (WebCore::LayerRendererChromium::useManagedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::setScissorToRect): (WebCore::LayerRendererChromium::setDrawFramebufferRect): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::renderPassProgram): (WebCore::LayerRendererChromium::renderPassProgramAA): (WebCore::LayerRendererChromium::renderPassMaskProgram): (WebCore::LayerRendererChromium::renderPassMaskProgramAA): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toRenderPassDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): (CCDrawQuad): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::CCRenderPass): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): (WebCore::CCRenderPass::framebufferOutputRect): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp. (WebCore): (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h. (WebCore): (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::renderPass): (WebCore::CCRenderPassDrawQuad::isReplica): (WebCore::CCRenderPassDrawQuad::maskTextureId): (WebCore::CCRenderPassDrawQuad::filters): (WebCore::CCRenderPassDrawQuad::backgroundFilters): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::prepareBackgroundTexture): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::willDraw): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::reserveTextures): 2012-06-04 Abhishek Arya <inferno@chromium.org> Crash in multi-column layout. https://bugs.webkit.org/show_bug.cgi?id=88022 Reviewed by Ojan Vafai. The patch addresses two problems:: 1. |this| in RenderBlock::splitBlocks can get destroyed when we move its children to the clone and later call updateBeforeAfterContent on the parent. So, we stop accessing its member variables and cache it in a local. 2. Positioned objects were not getting cleared from our grand parents. This will happen if our immediate children got moved to a clone tree, however at our parent nothing was moved. So, we make sure to remove the positioned objects at every level while we are doing the cloning. Tests: fast/multicol/span/empty-anonymous-block-split-crash.html fast/multicol/span/positioned-objects-not-removed-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitBlocks): 2012-06-04 Tim Horton <timothy_horton@apple.com> Mac build fails with SVG disabled https://bugs.webkit.org/show_bug.cgi?id=88165 Reviewed by Dirk Schulze. Wrap all of SVGCSSPropertyNames in #if ENABLE(SVG), and mark an unused argument in collectMatchingRulesForList. * css/SVGCSSPropertyNames.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-04 David Kilzer <ddkilzer@apple.com> BUILD FIX: Unused variable with ENABLE(CONTEXT_MENUS) off This broke in r118374. * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::showContextMenu): Add UNUSED_PARAM(exec) when ENABLE(CONTEXT_MENUS) is off. 2012-06-04 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119393. http://trac.webkit.org/changeset/119393 https://bugs.webkit.org/show_bug.cgi?id=88236 Test is incorrect (duplicate content) and is causing Chromium failures (Requested by schenney on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): 2012-06-04 Zeev Lieber <zlieber@chromium.org> [chromium] Cleanup scissor rect computation/use with damage https://bugs.webkit.org/show_bug.cgi?id=87167 Reviewed by Adrienne Walker. Performing scissorRect computation during calculateRenderPasses. Storing scissorRect in shared quad state instead of computing it during drawQuad. Added scissorRect fields into layers and render surfaces. Covered by existing layout tests. Introduced more unit tests to test end-to-end drawing using mock graphic context, and added more test cases to CCLayerTreeHostCommon to verify scissorRect computation. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scissorRect): (WebCore::LayerChromium::setScissorRect): (LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearRenderSurface): (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::computeRootScissorRectInCurrentSurface): (WebCore): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::scissorRect): (WebCore::RenderSurfaceChromium::setScissorRect): (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::scissorRect): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::scissorRect): (WebCore::CCLayerImpl::setScissorRect): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore): (WebCore::calculateLayerScissorRect): (WebCore::calculateSurfaceScissorRect): (WebCore::calculateDrawTransformsInternal): (WebCore::calculateVisibleAndScissorRectsInternal): (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms): (WebCore::CCLayerTreeHostCommon::calculateVisibleAndScissorRects): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::swapBuffers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore::CCRenderSurface::createReplicaSharedQuadState): (WebCore): (WebCore::CCRenderSurface::computeRootScissorRectInCurrentSurface): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): (WebCore::CCRenderSurface::setScissorRect): (WebCore::CCRenderSurface::scissorRect): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: (CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderer.h: (CCRenderer): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): * platform/graphics/chromium/cc/CCSharedQuadState.h: (CCSharedQuadState): (WebCore::CCSharedQuadState::scissorRect): 2012-06-04 Kentaro Hara <haraken@chromium.org> Remove SelectorQueryCacheEntry from SelectorQuery.h https://bugs.webkit.org/show_bug.cgi?id=88204 Reviewed by Hajime Morita. As anttik@ pointed out in https://bugs.webkit.org/show_bug.cgi?id=87942#c15, we can remove SelectorQueryCacheEntry by having SelectorQuery hold CSSSelectorList. Tests: fast/dom/SelectorAPI/* No change in test results. * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): (WebCore::SelectorQueryCache::add): * dom/SelectorQuery.h: (SelectorQuery): (SelectorQueryCache): 2012-06-04 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [GTK] Memory leak in PasteboardHelper https://bugs.webkit.org/show_bug.cgi?id=88216 Reviewed by Martin Robinson. Fixed a memory leak in PasteboardHelper by using adoptRef instead of just getting a new reference of TargetList. No new tests because of no behavior changes. * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::dropAtomsForContext): 2012-06-04 Rob Buis <rbuis@rim.com> Hit ASSERT when editing attribute value in Element in SVG Document https://bugs.webkit.org/show_bug.cgi?id=88179 Reviewed by Pavel Feldman. Make sure the <span> is created as a HTML Element regardless of document in use. * inspector/InspectorDOMAgent.cpp: (WebCore): (WebCore::InspectorDOMAgent::setAttributesAsText): 2012-06-04 Yoshifumi Inoue <yosin@chromium.org> [Forms] Change function and variable names independent from "double" type https://bugs.webkit.org/show_bug.cgi?id=88220 Reviewed by Kent Tamura. This patch is a part of introducing decimal arithmetic to input type. This patch renames function and variable names which contain term "double" to "number" to separate concept and implementation. No new tests. This patch doesn't change behavior. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::valueAsDate): Replace parseToDouble to parseToNumber. (WebCore::BaseDateAndTimeInputType::valueAsNumber): ditto. (WebCore::BaseDateAndTimeInputType::parseToNumber): ditto. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): Replace parseToDouble to parseToNumber. * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::createStepRange): Replace parseToDouble to parseToNumber. * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): Replace parseToDouble to parseToNumber. * html/InputType.cpp: (WebCore::InputType::rangeUnderflow): Replace parseToDouble to parseToNumber and doubleValue to numericValue. (WebCore::InputType::rangeOverflow): ditto. (WebCore::InputType::isInRange): ditto. (WebCore::InputType::isOutOfRange): ditto. (WebCore::InputType::stepMismatch): ditto. (WebCore::InputType::validationMessage): ditto. (WebCore::InputType::parseToNumber): ditto. (WebCore::InputType::parseToDoubleWithDecimalPlaces): ditto. (WebCore::InputType::stepUpFromRenderer): dttio. * html/InputType.h: (InputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::createStepRange): Replace parseToDouble to parseToNumber. (WebCore::MonthInputType::parseToNumber): ditto. * html/MonthInputType.h: (MonthInputType): * html/NumberInputType.cpp: (WebCore::NumberInputType::valueAsNumber): Replace parseToDouble to parseToNumber. (WebCore::NumberInputType::createStepRange): ditto. (WebCore::NumberInputType::parseToNumber): ditto. * html/NumberInputType.h: * html/RangeInputType.cpp: (WebCore::ensureMaximum): Added helper function for createStepRange for avoiding cast in max() and using "const". (WebCore::RangeInputType::valueAsNumber): Replace parseToDouble to parseToNumber. (WebCore::RangeInputType::createStepRange): ditto. (WebCore::RangeInputType::handleKeydownEvent): ditto. (WebCore::RangeInputType::parseToNumber): ditto. (WebCore::RangeInputType::sanitizeValue): ditto. * html/RangeInputType.h: (RangeInputType): * html/StepRange.cpp: (WebCore::StepRange::parseStep): Replace DoubleWithDecimalPlaces to NumberWithDecimalPlaces. (WebCore::StepRange::stepMismatch): Replace parseToDouble to parseToNumber. * html/StepRange.h: (WebCore::StepRange::NumberWithDecimalPlaces): Renamed from DoubleWithDecimalPlaces. (WebCore::StepRange::NumberWithDecimalPlacesOrMissing): Renamed from DoubleWithDecimalPlacesOrMissing. * html/TimeInputType.cpp: (WebCore::TimeInputType::createStepRange): Replace parseToDouble to parseToNumber. * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): Replace parseToDouble to parseToNumber. 2012-06-04 David Kilzer <ddkilzer@apple.com> BUILD FIX: FeatureDefines.xcconfig should match across projects * Configurations/FeatureDefines.xcconfig: - Add missing ENABLE_CSS_IMAGE_RESOLUTION. 2012-06-04 Justin Novosad <junov@chromium.org> Canvas 2D - Source rectangles that overlap the source image boundary, not supported by drawImage https://bugs.webkit.org/show_bug.cgi?id=66574 Reviewed by Stephen White. Test: fast/canvas/drawImage-clipped-source.html When the source rectangle argument to drawImage is not entirely contatained by the domain of the source image, the source rectangle is clipped, and the destination rectangle is clipped proportionately Old behavior was to silently fail, which did not comply with the spec. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::normalizeAndClipRects): (WebCore): (WebCore::CanvasRenderingContext2D::drawImage): 2012-06-04 Dominik Röttsches <dominik.rottsches@intel.com> [Cairo] Implementation of GraphicsContext does not save/restore ImageInterpolation correctly https://bugs.webkit.org/show_bug.cgi?id=87985 Reviewed by Gustavo Noronha Silva. Moving image interpolation quality setting into state so that it's saved and restored. Covered by existing test fast/canvas/canvas-imageSmoothingEnabled.html which is now passing. * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (GraphicsContextPlatformPrivate): Removing stale member that was never used. * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::State::State): (PlatformContextCairo::State): (WebCore::PlatformContextCairo::PlatformContextCairo): (WebCore::PlatformContextCairo::drawSurfaceToContext): (WebCore::PlatformContextCairo::setImageInterpolationQuality): (WebCore): (WebCore::PlatformContextCairo::imageInterpolationQuality): * platform/graphics/cairo/PlatformContextCairo.h: (PlatformContextCairo): Moving implementations for image interpolation quality setter into implementation file. 2012-06-04 Philip Rogers <pdr@google.com> Fix assert in non-scaling strokes in patterns https://bugs.webkit.org/show_bug.cgi?id=88198 When calculating the CTM for a rect or path in a pattern we need to use an SVGPatternElement's local transform. Pattern did not expose the transform because it does not extend from from SVGStyledLocatable or SVGStyledTransformable. This patch exposes the pattern's transform in localCoordinateSpaceTransform. SVGGradientElement does not need this special handling because the children of a gradient element are restricted to not include shape and structural elements that would need to calculate a CTM. Before this patch the added test would assert. This patch is a prerequisite to a major refactoring of RenderSVGShape & friends, and the test will be unskipped in a followup patch. Reviewed by Dirk Schulze. Tests: svg/stroke/non-scaling-stroke-pattern-expected.svg svg/stroke/non-scaling-stroke-pattern.svg * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::localCoordinateSpaceTransform): (WebCore): * svg/SVGPatternElement.h: (SVGPatternElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::localCoordinateSpaceTransform): 2012-06-04 Alexei Filippov <alexeif@chromium.org> Web Inspector: speed up _calculateRetainedSizes function https://bugs.webkit.org/show_bug.cgi?id=87863 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes): 2012-06-04 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add unknown size to the memory pie-chart legend https://bugs.webkit.org/show_bug.cgi?id=88081 Reviewed by Pavel Feldman. Added "Unknown" part size to the memory pie-chart legend. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot): (WebInspector.NativeMemoryProfileType.prototype.buttonClicked): (WebInspector.MemoryBlockViewProperties._initialize): (WebInspector.NativeMemoryPieChart.prototype._paint): 2012-06-04 Mike West <mkwst@chromium.org> Adding explicit console error for duplicated CSP directives. https://bugs.webkit.org/show_bug.cgi?id=88193 This patch adds an explicit error message for duplicated CSP directives instead of reusing the "unrecognized directive" error. Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/duplicate-directive.html * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::logDuplicateDirective): (WebCore): (WebCore::CSPDirectiveList::parseReportURI): (WebCore::CSPDirectiveList::setCSPDirective): (WebCore::CSPDirectiveList::applySandboxPolicy): (WebCore::CSPDirectiveList::addDirective): 2012-06-04 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r117929) [Forms] input type=number thinks 0 is not a number https://bugs.webkit.org/show_bug.cgi?id=88208 Reviewed by Kent Tamura. This patch fixes invalid handling of return value of parseToDoubleForNumberType in NumberInputType::isAcceptableValue to use isfinite() function for checking whether specified string is valid number or not. Before r117929, return value of parseToDoubleForNumberType was bool, but after r117929, it is double. Test: fast/forms/number/input-number-from-renderer.html * html/NumberInputType.cpp: (WebCore::NumberInputType::isAcceptableValue): Use isfinite() 2012-06-04 Antti Koivisto <antti@apple.com> Crash in WebCore::RenderView::getRetainedWidgets https://bugs.webkit.org/show_bug.cgi?id=88217 Reviewed by Kenneth Rohde Christiansen. There is no known repro, the crash has been seen on the field. It is likely that it happens with frame flattening enabled only. Null check root renderer in performPostLayoutTasks. The root can legitimely be null for several reasons and is mostly null checked everywhere else. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): 2012-06-04 Kentaro Hara <haraken@chromium.org> Use SelectorQuery in Element::webkitMatchesSelector() https://bugs.webkit.org/show_bug.cgi?id=88209 Reviewed by Antti Koivisto. By using SelectorQuery in Element::webkitMatchesSelector(), we can not only simplify the code but also improve the performance thanks to the cache mechanism of SelectorQuery which was implemented in bug 87942. Tests: fast/dom/SelectorAPI/*. No change in test results. * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::matches): (WebCore): * dom/SelectorQuery.h: (SelectorQuery): 2012-05-31 Kinuko Yasuda <kinuko@chromium.org> [chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry https://bugs.webkit.org/show_bug.cgi?id=87969 Reviewed by Tony Chang. Per discussion on whatwg we should make webkitGetAsEntry synchronous. http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0079.html Tests: editing/pasteboard/data-transfer-items-drag-drop-entry.html fast/filesystem/cross-filesystem-op.html * Modules/filesystem/DataTransferItemFileSystem.h: (DataTransferItemFileSystem): * Modules/filesystem/DataTransferItemFileSystem.idl: * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: (WebCore::DataTransferItemFileSystem::webkitGetAsEntry): Changed it to synchronously return entry. 2012-06-03 Dominic Cooney <dominicc@chromium.org> EventTarget.idl should generate JS bindings https://bugs.webkit.org/show_bug.cgi?id=88120 This is one step in a larger change to expose a constructor for EventTarget and put EventTarget on the prototype chain of DOM objects that are event targets, in line with DOM Core. See <https://bugs.webkit.org/show_bug.cgi?id=67312> Reviewed by Adam Barth. No new tests. This change does not change any functionality. * CMakeLists.txt: Generate JSEventTarget. * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: JSEventTarget.cpp was renamed. * bindings/js/JSEventTarget.h: Removed. Generated now. * bindings/js/JSEventTargetCustom.cpp: Renamed from Source/WebCore/bindings/js/JSEventTarget.cpp. * bindings/scripts/CodeGeneratorV8.pm: (GetInternalFields): EventTarget is an EventTarget. * dom/EventTarget.idl: Defer to toJS, toEventTarget in JSEventTargetCustom.cpp. 2012-06-03 Hayato Ito <hayato@chromium.org> Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWalker. https://bugs.webkit.org/show_bug.cgi?id=87924 Reviewed by Dimitri Glazkov. Some events, such as a 'click' event, can be dispatched on nodes in an orphaned shadow subtree. When resolving a parent node of a shadow root which is not assigned to any shadow insertion point, we have to return its shadow host as a parent node. The related shadow DOM spec section is: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events Test: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot): 2012-06-03 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119359. http://trac.webkit.org/changeset/119359 https://bugs.webkit.org/show_bug.cgi?id=88189 This broke platform/mac/fast/dom/wrapper-classes-objc.html. (Requested by dominicc on #webkit). * bindings/objc/PublicDOMInterfaces.h: * bindings/scripts/CodeGeneratorObjC.pm: (GetBaseClass): * dom/MouseEvent.h: (MouseEvent): * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): * dom/WheelEvent.h: (WheelEvent): * dom/WheelEvent.idl: 2012-06-03 Dominic Cooney <dominicc@chromium.org> WheelEvent should inherit from MouseEvent https://bugs.webkit.org/show_bug.cgi?id=76104 Reviewed by Kentaro Hara. The spec for WheelEvent is <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-WheelEvent> Tests: fast/events/event-creation.html http://samples.msdn.microsoft.com/ietestcenter/dominheritance/showdominheritancetest.htm?Prototype_WheelEvent * bindings/objc/PublicDOMInterfaces.h: Remove redundant MouseEvent API from WheelEvent * bindings/scripts/CodeGeneratorObjC.pm: MouseEvents are Events * dom/MouseEvent.h: Expose no-arg constructor to WheelEvent * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Call MouseEvent superconstructor * dom/WheelEvent.h: Extend MouseEvent * dom/WheelEvent.idl: " 2012-06-03 Varun Jain <varunjain@google.com> [chromium] Add new gesture type (two finger tap) that triggers context menu. https://bugs.webkit.org/show_bug.cgi?id=88173 Reviewed by Adam Barth. Test: fast/events/touch/gesture/context-menu-on-two-finger-tap.html * platform/PlatformEvent.h: 2012-06-02 Andy Estes <aestes@apple.com> __ZNK7WebCore4Node27traverseNextAncestorSiblingEv should be exported even if ENABLE(FULLSCREEN_API) is false https://bugs.webkit.org/show_bug.cgi?id=88184 Reviewed by Dan Bernstein. Node::traverseNextAncestorSibling() is called in several inline functions defined in ContainerNode.h (a private header), so its symbol needs to be exported regardless of whether full-screen API is enabled. * WebCore.exp.in: 2012-06-02 Xianzhu Wang <wangxianzhu@chromium.org> SVGImageCache leaks image data https://bugs.webkit.org/show_bug.cgi?id=87792 There are two functions to remove a client from a CachedImage: - CachedResource::removeClient() - CachedImage::removeClientForRenderer(). It's easy to make error to call the former which will leak the cached image buffers in SVGImageCache. This change combined the two by adding the virtual CachedResource::didRemoveClient(). CachedImage will do SVGImageCache cleanup in the function. Reviewed by Nikolas Zimmermann. Test: svg/as-image/svg-image-leak-cached-data.html * loader/cache/CachedFont.h: (WebCore::CachedFontClient::resourceClientType): Added 'const'. * loader/cache/CachedImage.cpp: (WebCore): (WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache. (WebCore::CachedImage::lookupOrCreateImageForRenderer): * loader/cache/CachedImage.h: (CachedImage): (WebCore::CachedImageClient::resourceClientType): Added 'const'. * loader/cache/CachedRawResource.h: (WebCore::CachedRawResourceClient::resourceClientType): Added 'const'. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::removeClient): Added invocation of didRemoveClient(). * loader/cache/CachedResource.h: (WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works. * loader/cache/CachedResourceClient.h: (WebCore::CachedResourceClient::resourceClientType): Added 'const'. * loader/cache/CachedSVGDocument.h: (WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'. * loader/cache/CachedStyleSheetClient.h: (WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'. * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::removeClient): * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::removeClient): * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks. (WebCore::SVGImageCache::removeClientFromCache): (WebCore::SVGImageCache::setRequestedSizeAndScales): (WebCore::SVGImageCache::requestedSizeAndScales): (WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient): * svg/graphics/SVGImageCache.h: (WebCore): (SVGImageCache): 2012-06-02 Ryosuke Niwa <rniwa@webkit.org> Windows build fix after r119330. Unnest the class for now. * dom/SelectorQuery.cpp: (WebCore::SelectorQueryCacheEntry::SelectorQueryCacheEntry): (WebCore::SelectorQueryCache::add): * dom/SelectorQuery.h: (SelectorQueryCacheEntry): (WebCore::SelectorQueryCacheEntry::selectorQuery): (WebCore): (SelectorQueryCache): 2012-06-02 Geoffrey Garen <ggaren@apple.com> DOM string cache should hash pointers, not characters https://bugs.webkit.org/show_bug.cgi?id=88175 Reviewed by Phil Pizlo and Sam Weinig. Dromaeo DOM Core reports no change. http://trac.webkit.org/changeset/84934 accidentally changed from hashing pointers to hashing characters, due to template defaults. Let's change back. Hashing characters is not so good because: (1) It's not memory-safe with HashMap::set(). HashMap::set() replaces the value but not the key. Since our values own our keys, we need to ensure object identity between key and value, or the key can be freed prematurely. (This is impossible to demonstrate with our current eager sweep behavior, but it shows up as crashes in layout tests if you change to lazy sweep.) (2) It's slower. * bindings/js/DOMWrapperWorld.h: (WebCore): Override the default hash, which hashes based on characters. 2012-06-02 Eli Fidler <efidler@rim.com> Don't crash if we ask for fonts that don't exist. https://bugs.webkit.org/show_bug.cgi?id=88106 Reviewed by Dan Bernstein. RIM PR 161219 If the site doesn't ask for a reasonable font and the system doesn't provide a good fallback, FontFallBackList::primaryFontData can be 0, which can cause a crash. * platform/graphics/skia/FontCacheSkia.cpp: (WebCore::FontCache::getLastResortFallbackFont): 2012-06-02 Kentaro Hara <haraken@chromium.org> [Performance] Optimize querySelector() by caching SelectorQuery objects https://bugs.webkit.org/show_bug.cgi?id=87942 Reviewed by Antti Koivisto. This patch improves performance of Node::querySelector() by 7.1x in Safari/Mac and by 8.5x in Chromium/Linux. Performance test: Parser/query-selector-first.html, Parser/query-selector-last.html [query-selector-first.html] Safari/Mac 264.97 runs/s => 1872.78 runs/s (7.06x speed-up) Chromium/Linux 244.84 runs/s => 2071.60 runs/s (8.46x speed-up) [query-selector-last.html] Safari/Mac 393.73 runs/s => 466.05 runs/s (1.18x speed-up) Chromium/Linux 401.15 runs/s => 484.45 runs/s (1.20x speed-up) Previously Node::querySelector() and Node::querySelectorAll() had been parsing CSS queries every time. This patch optimizes the performance by caching parsed results onto a Document. The cache is invalidated when any of CSS related variables is updated. As per the current implementation of CSSParserContext::operator==(), the CSS related variables are as follows: - baseURI - charset - mode - isHTMLDocument - isCSSCustomFilterEnabled - isCSSRegionsEnabled - needsSiteSpecificQuirks - enforcesCSSMIMETypeInNoQuirksMode Actually, we do not need to watch all of these variables: - The current implementation does not watch the change of charset. charset is always set to a null String by CSSParserContext::CSSParserContext(). - isHTMLDocument never changes. - isCSSCustomFilterEnabled, isCSSRegionsEnabled, needsSiteSpecificQuirks and enforcesCSSMIMETypeInNoQuirksMode are not flipped in a user scenario. If someone changes them, it would be reasonable to expect them to take the effect only on subsequent document loads. Thus we do not need to invalidate the cache when these variables are updated. Consequently, the condition under which we have to invalidate the cache is that any of the following variables is updated: - baseURI - mode Tests: fast/dom/SelectorAPI/*. No change in test results. * dom/SelectorQuery.h: SelectorQueryCache is a cache from CSS selectors to parsed results. SelectorQueryCache::Entry is an entry of the cache. SelectorQueryCache::Entry holds a SelectorQuery object and a CSSSelectorList object. The reason why SelectorQueryCache::Entry needs to hold the CSSSelectorList object is that the CSSSelectorList object keeps the lifetime of CSSSelector objects in the SelectorQuery object. Since the SelectorQuery object just holds pointers to CSSSelector objects, the CSSSelectorList object must not be destructed before the SelectorQuery object is destructed. (WebCore): (SelectorDataList): (WebCore::SelectorQuery::SelectorQuery): (SelectorQuery): (SelectorQueryCache): (WebCore::SelectorQueryCache::SelectorQueryCache): (Entry): (WebCore::SelectorQueryCache::Entry::selectorQuery): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::initialize): (WebCore::SelectorQueryCache::Entry::Entry): (WebCore::SelectorQueryCache::add): Returns a cached SelectorQuery object if any. Otherwise, parses a given CSS selector, creates a SelectorQuery object, adds the SelectorQuery object to a new entry in the cache, returns the SelectorQuery object. (WebCore::SelectorQueryCache::invalidate): Clears the cache. * dom/Document.h: (WebCore): (Document): * dom/Document.cpp: (WebCore::Document::selectorQueryCache): (WebCore): (WebCore::Document::setCompatibilityMode): Invalidates the cache when m_compatibilityMode is updated. (WebCore::Document::updateBaseURL): Invalidates the cache when m_baseURL is updated. * dom/Node.h: Changed String to AtomicString, since the key of the cache should be AtomicString. (Node): * dom/Node.cpp: Optimized the code by using the cache. (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): 2012-06-02 Dan Bernstein <mitz@apple.com> Reverted the last change. * WebCore.xcodeproj/project.pbxproj: 2012-06-02 Dan Bernstein <mitz@apple.com> Stop treating Perl code as private headers. * WebCore.xcodeproj/project.pbxproj: Removed CodeGenerator.pm, generate-bindings.pl, IDLParser.pm, IDLStructure.pm, and preprocessor.pm from the Copy Headers build phase. 2012-06-02 Zeno Albisser <zeno@webkit.org> Fix and enable WebGL for WebKit2 on Qt. https://bugs.webkit.org/show_bug.cgi?id=86214 Make GraphicsContext3DPrivate use GraphicsSurfaces for WK2. The GraphicsContext3D then uses the existing RenderBuffer for multisample rendering. When WebGraphicsLayer::syncCompositingState is being executed, the canvas is being synced as well. This means that the RenderBuffer contents are being blit onto a GraphicsSurface, and the GraphicsSurface token is being sent to the UIProcess. The WebLayerTreeRenderer then creates a TextureMapperSurfaceBackingStore for the canvas and passes the GraphicsSurface token as an argument. The token can then be used to identify the GraphicsSurface from the UIProcess side. Reviewed by Noam Rosenthal. * platform/graphics/GraphicsContext3D.h: Added createGraphicsSurfaces function. This is currently only being used by the Qt port. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::reshape): Calling the createGraphicsSurfaces function when the GraphicsContext3D is reshaped. This is currently only relevant for the Qt port. * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): Added m_frontBufferGraphicsSurface, m_backBufferGraphicsSurface and m_surfaceFlags members. (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): In case of WK2, create a QOpenGLContext and two GraphicsSurface for sharing the WebGL content with the UIProcess. One GraphicsSurface is being used as the front, the other one as the backbuffer. Creating a QOpenGLContext currently requires showing a QWindow. For the moment we therefore create a minimal QWindow and place it offscreen. (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface): This new function is called from the WebGraphicsLayer, to blit the multisample framebuffer and copy its contents onto the GraphicsSurface. (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces): Whenever the GraphicsContext3D is being reshaped, new GraphicsSurfaces must be created with the updated dimensions. (WebCore::GraphicsContext3D::createGraphicsSurfaces): * platform/graphics/texmap/TextureMapperPlatformLayer.h: Added a new virtual function copyToGraphicsSurface. (TextureMapperPlatformLayer): (WebCore::TextureMapperPlatformLayer::copyToGraphicsSurface): 2012-06-02 Tony Chang <tony@chromium.org> Rename the flexbox CSS propery values from start to flex-start and end to flex-end https://bugs.webkit.org/show_bug.cgi?id=88152 Reviewed by Ojan Vafai. The spec changed. This is to differentiate from start/end which will depend on writing mode direction, rather than flex direction. No new tests, just updated the existing values. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EAlignItems): (WebCore::CSSPrimitiveValue::operator EJustifyContent): (WebCore::CSSPrimitiveValue::operator EAlignContent): * css/CSSValueKeywords.in: * rendering/RenderFlexibleBox.cpp: (WebCore::initialJustifyContentOffset): (WebCore::alignmentForChild): (WebCore::initialAlignContentOffset): (WebCore::RenderFlexibleBox::alignFlexLines): (WebCore::RenderFlexibleBox::alignChildren): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: 2012-06-01 Alexandre Elias <aelias@google.com> [chromium] Software compositor initialization and base classes https://bugs.webkit.org/show_bug.cgi?id=87920 Reviewed by James Robinson. This introduces new wrapper class CCGraphicsContext and base class CCRenderer which will be used for software compositing support. If no GraphicsContext3D is available, early return for now. No new tests. (No-op change in 3d mode.) * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (Texture): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: (Texture): (BitmapSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: (Texture): (FrameBufferSkPictureCanvasLayerTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::Texture::updateRect): (WebCore::ImageLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/LayerChromium.h: (WebCore): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::CCRenderer::toGLMatrix): (WebCore): (WebCore::LayerRendererChromium::create): (WebCore::CCRenderer::CCRenderer): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::copyPlaneToTexture): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): * platform/graphics/chromium/LayerRendererChromium.h: (CCRenderer): (WebCore::CCRenderer::~CCRenderer): (WebCore::CCRenderer::ccContext): (WebCore::CCRenderer::settings): (WebCore::CCRenderer::viewportSize): (WebCore::CCRenderer::viewportWidth): (WebCore::CCRenderer::viewportHeight): (WebCore::CCRenderer::projectionMatrix): (WebCore::CCRenderer::windowMatrix): (WebCore::CCRenderer::sharedGeometryQuad): (WebCore): (LayerRendererChromium): * platform/graphics/chromium/LayerTextureSubImage.cpp: (WebCore::LayerTextureSubImage::upload): (WebCore::LayerTextureSubImage::uploadWithTexSubImage): (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage): * platform/graphics/chromium/LayerTextureSubImage.h: (WebCore): (LayerTextureSubImage): * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore): (Texture): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: (WebCore): (ManagedTexture): * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/TextureCopier.cpp: (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureCopier.h: (TextureCopier): (AcceleratedTextureCopier): * platform/graphics/chromium/TextureUploader.h: (TextureUploader): * platform/graphics/chromium/ThrottledTextureUploader.cpp: (WebCore::ThrottledTextureUploader::uploadTexture): * platform/graphics/chromium/ThrottledTextureUploader.h: (ThrottledTextureUploader): * platform/graphics/chromium/cc/CCGraphicsContext.h: Copied from Source/WebCore/platform/graphics/chromium/CanvasLayerTextureUpdater.h. (WebCore): (CCGraphicsContext): (WebCore::CCGraphicsContext::create2D): (WebCore::CCGraphicsContext::create3D): (WebCore::CCGraphicsContext::context3D): (WebCore::CCGraphicsContext::CCGraphicsContext): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::willDraw): (WebCore::CCLayerImpl::bindContentsTexture): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::createContext): (WebCore::CCLayerTreeHost::context): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHostClient): (WebCore::CCSettings::CCSettings): (CCSettings): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::layerRenderer): * platform/graphics/chromium/cc/CCProxy.h: (WebCore): (CCProxy): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::willDraw): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::context): (WebCore::CCSingleThreadProxy::initializeContext): (WebCore::CCSingleThreadProxy::recreateContext): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::update): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::initializeContext): (WebCore::CCThreadProxy::recreateContext): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::initializeContextOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::reserveTextures): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119283, r119287, and r119291. http://trac.webkit.org/changeset/119283 http://trac.webkit.org/changeset/119287 http://trac.webkit.org/changeset/119291 https://bugs.webkit.org/show_bug.cgi?id=88159 Not only broke compilation in the initial commit but also broke LayerChromiumTest.basicCreateAndDestroy (Requested by rniwa on #webkit). * WebCore.gypi: * platform/graphics/chromium/AnimationTranslationUtil.cpp: Removed. * platform/graphics/chromium/AnimationTranslationUtil.h: Removed. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::LinkHighlight): * platform/graphics/chromium/cc/CCAnimationCurve.h: (CCTransformAnimationCurve): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: (WebCore::CCTransformKeyframe::create): (WebCore::CCTransformKeyframe::CCTransformKeyframe): (WebCore::CCTransformKeyframe::value): (WebCore::CCTransformKeyframe::clone): (WebCore::CCKeyframedTransformAnimationCurve::getValue): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: (CCTransformKeyframe): (CCKeyframedTransformAnimationCurve): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::addAnimation): (WebCore): (WebCore::CCLayerAnimationController::add): (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): (WebCore::CCLayerAnimationController::replaceImplThreadAnimations): (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationControllerClient): (CCLayerAnimationController): * platform/graphics/chromium/cc/CCLayerImpl.h: 2012-06-01 Levi Weintraub <leviw@chromium.org> Large number constant in TransformationMatrix::projectPoint overflows FractionalLayoutUnits with sub-pixel layout enabled https://bugs.webkit.org/show_bug.cgi?id=87896 Reviewed by James Robinson. kLargeNumber is meant to avoid overflowing when projecting a point through a transform. Unfortunately, due to FractionalLayoutUnit's diminished range compared to integers, we were overflowing anyways. This change adjusts our large number by the same value, but adjusted for our denominator. This was originally missed because transforms/3d is marked as pass/fail in Chromium's test_expectations.txt https://bugs.webkit.org/show_bug.cgi?id=66989 tracks removing this problem. No new tests. Covered by transforms/3d/hit-testing/perspective-clipped.html * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::projectPoint): 2012-06-01 Tim Horton <timothy_horton@apple.com> Cleanup GeneratorGeneratedImage/Gradient changes from r117858 https://bugs.webkit.org/show_bug.cgi?id=88063 Reviewed by Simon Fraser. No new tests, code cleanup. * platform/graphics/Generator.h: (WebCore::Generator::hash): hash() should be const. * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::drawPattern): Minor cleanup. * platform/graphics/Gradient.cpp: (WebCore::Gradient::Gradient): Rename m_hashCache to m_cachedHash. (WebCore::Gradient::addColorStop): Rename clearHashCache to invalidateHash. (WebCore::Gradient::sortStopsIfNecessary): Rename clearHashCache to invalidateHash. (WebCore::Gradient::setSpreadMethod): Rename clearHashCache to invalidateHash. (WebCore::Gradient::setGradientSpaceTransform): Rename clearHashCache to invalidateHash. (WebCore::Gradient::hash): Use intHash instead of the pair hasher. Add compile time size checks for structures being passed to StringHasher. * platform/graphics/Gradient.h: (WebCore::Gradient::setP0): Rename clearHashCache to invalidateHash. (WebCore::Gradient::setP1): Rename clearHashCache to invalidateHash. (WebCore::Gradient::setStartRadius): Rename clearHashCache to invalidateHash. (WebCore::Gradient::setEndRadius): Rename clearHashCache to invalidateHash. (WebCore::Gradient::invalidateHash): Rename clearHashCache to invalidateHash. * platform/graphics/GraphicsContext.cpp: (WebCore::scalesMatch): Added. Determine if the scale of two AffineTransforms match. (WebCore::GraphicsContext::isCompatibleWithBuffer): Make use of scalesMatch to simplify the logic. 2012-06-01 Raymond Toy <rtoy@google.com> Remove RefInfo class https://bugs.webkit.org/show_bug.cgi?id=87904 Reviewed by Chris Rogers. No new tests; covered by existing tests. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::~AudioBufferSourceNode): Clear panner node. (WebCore::AudioBufferSourceNode::totalPitchRate): (WebCore::AudioBufferSourceNode::setPannerNode): Use RefTypeConnection counting for panner node. (WebCore): (WebCore::AudioBufferSourceNode::clearPannerNode): New function to clear panner node in AudioBufferSourceNode. (WebCore::AudioBufferSourceNode::finish): Clear panner node when done. * Modules/webaudio/AudioBufferSourceNode.h: (AudioBufferSourceNode): Add virtual finish(), m_pannerNode is not a RefPtr anymore. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::addDeferredFinishDeref): Remove unneeded RefTyp. (WebCore::AudioContext::handleDeferredFinishDerefs): Remove unneeded RefType. * Modules/webaudio/AudioContext.h: (AudioContext): Update addDeferredFinishDeref signature. * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::deref): Update call to addDeferredFinishDeref. * Modules/webaudio/AudioScheduledSourceNode.h: (AudioScheduledSourceNode): Make finish() virtual. 2012-06-01 Tony Chang <tony@chromium.org> rename -webkit-flex-pack and -webkit-flex-line-pack to -webkit-justify-content and -webkit-align-content https://bugs.webkit.org/show_bug.cgi?id=88113 Reviewed by Ojan Vafai. This recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#justify-content-property http://dev.w3.org/csswg/css3-flexbox/#align-content-property No new tests, updated existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EJustifyContent): (WebCore::CSSPrimitiveValue::operator EAlignContent): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): (WebCore::initialJustifyContentOffset): (WebCore::justifyContentSpaceBetweenChildren): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::layoutColumnReverse): (WebCore::initialAlignContentOffset): (WebCore::alignContentSpaceBetweenChildren): (WebCore::RenderFlexibleBox::alignFlexLines): * rendering/RenderFlexibleBox.h: * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: (StyleFlexibleBoxData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-06-01 Adam Barth <abarth@webkit.org> Overflow scrolling doesn't need to create a stacking context is the overflow is hidden https://bugs.webkit.org/show_bug.cgi?id=88057 Reviewed by James Robinson. This patch causes us to match the iOS implementation of this feature. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-01 James Robinson <jamesr@chromium.org> [chromium] Unreviewed compile fix for r119283 For the record, Dana Jensens <danakj@chromium.org> wrote this slightly faster than I did. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::bounds): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::bounds): 2012-06-01 Ian Vollick <vollick@chromium.org> [chromium] Accelerated animations should use WebTransformOperations https://bugs.webkit.org/show_bug.cgi?id=87686 Reviewed by James Robinson. CCTransformKeyframe new owns a WebTransformOperations rather than a TransformOperations. LayerChromium's API has been changed so that LayerChromium::addAnimation should take only a CCActiveAnimation. GraphicsLayerChromium is new responsible for translating to WebTransformOperations and creating CCActiveAnimations. Tests that use the public API (that is, they call addAnimation with KeyframeValueList and Animation arguments) have been moved to GraphicsLayerChromiumTest. Unit tests: GraphicsLayerChromiumTest.createOpacityAnimation GraphicsLayerChromiumTest.createTransformAnimation GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation GraphicsLayerChromiumTest.createTransformAnimationWithSingularMatrix GraphicsLayerChromiumTest.createReversedAnimation GraphicsLayerChromiumTest.createAlternatingAnimation GraphicsLayerChromiumTest.createReversedAlternatingAnimation * WebCore.gypi: * platform/graphics/chromium/AnimationTranslationUtil.cpp: Added. (WebCore): (WebCore::toWebTransformOperations): (WebCore::appendKeyframe): (WebCore::CCKeyframedTransformAnimationCurve): (WebCore::createActiveAnimation): * platform/graphics/chromium/AnimationTranslationUtil.h: Added. (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerChromium.h: (WebCore): (LayerChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::LinkHighlight): * platform/graphics/chromium/cc/CCAnimationCurve.h: (CCTransformAnimationCurve): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: (WebCore::CCTransformKeyframe::create): (WebCore::CCTransformKeyframe::CCTransformKeyframe): (WebCore::CCTransformKeyframe::value): (WebCore::CCTransformKeyframe::clone): (WebCore::CCKeyframedTransformAnimationCurve::getValue): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: (CCTransformKeyframe): (CCKeyframedTransformAnimationCurve): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::removeAnimation): (WebCore): (WebCore::CCLayerAnimationController::addAnimation): (WebCore::CCLayerAnimationController::getActiveAnimation): (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): (WebCore::CCLayerAnimationController::replaceImplThreadAnimations): (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationControllerClient): (CCLayerAnimationController): 2012-06-01 Mihai Parparita <mihaip@chromium.org> Improve synchronous XHR disabling https://bugs.webkit.org/show_bug.cgi?id=88032 Reviewed by Alexey Proskuryakov. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled): Fix a copy-and-paste error * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Improves the disabled message, as suggested in a comment after r118599 was put in the commit queue. 2012-06-01 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87774 REGRESSION (r105515): reflection masks are truncated at zoom levels < 1 -and corresponding- <rdar://problem/11387506> Reviewed by Simon Fraser. paintNinePieceImage() expects un-zoomed results from calculateImageIntrinsicDimensions(). This was previously addressed by having paintNinePieceImage() divide the effective zoom out of the result from calculateImageIntrinsicDimensions(). However, that results in buggy behavior for generated images and images with percentage sizes. In the end it seems best to just send a parameter to calculateImageIntrinsicDimensions() indicating whether the caller wants the result to be scaled by the effective zoom when appropriate. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::paintNinePieceImage): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): 2012-06-01 Julien Chaffraix <jchaffraix@webkit.org> Prepare table collapsed border computation to support mixed directionality on row group https://bugs.webkit.org/show_bug.cgi?id=88110 Reviewed by Ojan Vafai. No expected change in behavior. One big issue with supporting mixed directionality inside a table is that the start / end borders don't align between table parts anymore: the start border of a ltr table will have to match the end border of a rtl row group for the purpose of collapsed border computation. This change adds the concept of adjoining borders in the table direction so that we can safely hide which exact borders we pick up for the collapsed border computation. * rendering/RenderTable.cpp: (WebCore::RenderTable::calcBorderStart): (WebCore::RenderTable::calcBorderEnd): Refactored those functions to use proper naming along with the new APIs. The name 'adjoining' is used extensively as we cannot make any assumptions on which borders we will get. (WebCore::RenderTable::recalcBordersInRowDirection): Added a FIXME found during testing. * rendering/RenderTableCell.h: (WebCore::RenderTableCell::borderAdjoiningTableStart): (WebCore::RenderTableCell::borderAdjoiningTableEnd): * rendering/RenderTableRow.h: (WebCore::RenderTableRow::borderAdjoiningTableStart): (WebCore::RenderTableRow::borderAdjoiningTableEnd): * rendering/RenderTableSection.h: (WebCore::RenderTableSection::borderAdjoiningTableStart): (WebCore::RenderTableSection::borderAdjoiningTableEnd): Those functions are the same at the moment to match the existing code. They will be changed to use the proper directionality in a follow up patch. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart): (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd): Those functions return the cells that is adjoining a table edge. Due to us flipping the cells at layout to match the section's direction, those functions will need to account for mixed direction in determining the right cell to consider. 2012-06-01 Shezan Baig <shezbaig.wk@gmail.com> Indenting a paragraph that begins with a link 3 times breaks the paragraph into two paragraphs https://bugs.webkit.org/show_bug.cgi?id=87428 Reviewed by Ryosuke Niwa. Fix the way lastNode (our insertion point) is updated whenever traverseNextSibling moves up to a new parent, so that the relative depth between the next sibling and the original start node is maintained in the clone. The divergence in depth broke the paragraph into two paragraphs because the next sibling was inserted outside the blockquote that was created for the indentation. Note that the topNode is not required anymore because it is no longer used anywhere. Tests: editing/execCommand/indent-nested-inlines-1.html editing/execCommand/indent-nested-inlines-2.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): 2012-06-01 Joe Thomas <joethomas@motorola.com> getComputedStyle for background shorthand property does not return background-origin and background-clip. https://bugs.webkit.org/show_bug.cgi?id=86155 Reviewed by Tony Chang. Added background-origin and background-clip CSS Property values to the background shorthand CSSValueList. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue): 2012-06-01 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call clipboard methods directly https://bugs.webkit.org/show_bug.cgi?id=88038 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * WebCore.gypi: * platform/Pasteboard.h: (Pasteboard): * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::createFromPasteboard): * platform/chromium/ChromiumDataObjectItem.cpp: (WebCore::ChromiumDataObjectItem::getAsFile): (WebCore::ChromiumDataObjectItem::internalGetAsString): * platform/chromium/ClipboardUtilitiesChromium.cpp: (WebCore::currentPasteboardBuffer): * platform/chromium/ClipboardUtilitiesChromium.h: (WebCore): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writePlainText): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::writeImage): (WebCore::Pasteboard::writeClipboard): (WebCore::Pasteboard::canSmartReplace): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment): * platform/chromium/PasteboardPrivate.h: Removed. * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): 2012-06-01 Hugo Parente Lima <hugo.lima@openbossa.org> Improve handling of legacy viewport meta tags https://bugs.webkit.org/show_bug.cgi?id=55874 Reviewed by Adam Barth. We now support MobileOptimized and HandheldFriendly as well. We set width equal to device-width for HandheldFriendly and for MobileOptimized, the content value of MobileOptimized is ignored and the initial-scale set to 1 to fit Android behavior. The prioritizing is done the same way as on Windows Phone 7: XHTML Mobile Profile found HandheldFriendly MobileOptimized (overrides HandheldFriendly) Viewport (overrides all above) Original patch by Kenneth Rohde Christiansen. Tests: fast/viewport/viewport-legacy-handheldfriendly.html fast/viewport/viewport-legacy-mobileoptimized-2.html fast/viewport/viewport-legacy-mobileoptimized-3.html fast/viewport/viewport-legacy-mobileoptimized.html fast/viewport/viewport-legacy-ordering-1.html fast/viewport/viewport-legacy-ordering-2.html fast/viewport/viewport-legacy-ordering-3.html fast/viewport/viewport-legacy-ordering-4.html fast/viewport/viewport-legacy-ordering-5.html fast/viewport/viewport-legacy-ordering-6.html fast/viewport/viewport-legacy-ordering-7.html fast/viewport/viewport-legacy-ordering-8.html fast/viewport/viewport-legacy-ordering-9.html * dom/Document.cpp: (WebCore::Document::setDocType): (WebCore::Document::processViewport): Add an origin parameter to tell what is changing the viewport. * dom/Document.h: (Document): * dom/ViewportArguments.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): 2012-06-01 Tony Chang <tony@chromium.org> rename -webkit-flex-order to -webkit-order https://bugs.webkit.org/show_bug.cgi?id=88104 Reviewed by Ojan Vafai. This recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#order-property No new tests, just updated existing results. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator): (WebCore::RenderFlexibleBox::OrderIterator::next): (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::computeNextFlexLine): (WebCore::RenderFlexibleBox::packFlexLines): (WebCore::RenderFlexibleBox::alignChildren): (WebCore::RenderFlexibleBox::flipForRightToLeftColumn): (WebCore::RenderFlexibleBox::flipForWrapReverse): * rendering/RenderFlexibleBox.h: * rendering/style/RenderStyle.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: (StyleFlexibleBoxData): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-06-01 Zeno Albisser <zeno@webkit.org> Unreviewed build fix after r119247. Do not include TextureMapperGL.h when not building with GRAPHICS_SURFACE. * platform/graphics/texmap/TextureMapperBackingStore.cpp: 2012-06-01 Mario Sanchez Prada <msanchez@igalia.com> [GTK] Add a new and reusable Geoclue-based geolocation provider in WebCore https://bugs.webkit.org/show_bug.cgi?id=87800 Reviewed by Carlos Garcia Campos. Added new and reusable Geoclue-based geolocation provider to WebCore. * GNUmakefile.am: * GNUmakefile.list.am: * platform/geoclue/GeolocationProviderGeoclue.cpp: Added. (getPositionCallback): (positionChangedCallback): (GeolocationProviderGeoclue::GeolocationProviderGeoclue): (GeolocationProviderGeoclue::~GeolocationProviderGeoclue): (GeolocationProviderGeoclue::startUpdating): (GeolocationProviderGeoclue::stopUpdating): (GeolocationProviderGeoclue::setEnableHighAccuracy): (GeolocationProviderGeoclue::setGeoclueClient): (GeolocationProviderGeoclue::setGeocluePosition): (GeolocationProviderGeoclue::updateClientRequirements): (GeolocationProviderGeoclue::positionChanged): (GeolocationProviderGeoclue::errorOccured): * platform/geoclue/GeolocationProviderGeoclue.h: Added. (WebCore): (GeolocationProviderGeoclue): * platform/geoclue/GeolocationProviderGeoclueClient.h: Added. (WebCore): (GeolocationProviderGeoclueClient): 2012-06-01 Thiago Marcos P. Santos <thiago.santos@intel.com> [Qt] Remove deprecated Q_GLOBAL_STATIC_WITH_INITIALIZER https://bugs.webkit.org/show_bug.cgi?id=88100 Reviewed by Tor Arne Vestbø. It will be deprecated on Qt5. * platform/text/qt/TextBreakIteratorInternalICUQt.cpp: (WebCore): 2012-06-01 Zeno Albisser <zeno@webkit.org> Make TextureMapper work with GraphicsSurface. https://bugs.webkit.org/show_bug.cgi?id=87738 Add TextureMapperSurfaceBackingStore, a new backing store that allows to import textures from a GraphicsSurface. On Mac the GraphicsSurface is backed by an IOSurface which must be used with a GL_TEXTURE_RECTANGLE_ARB texture. Therefore it is also necessary to add new shader programs for directly painting these textures on screen. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperBackingStore.cpp: Add a new TextureMapperBackingStore implementation that can directly reuse textures as they are being passed from the GraphicsSurface. (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface): (WebCore::TextureMapperSurfaceBackingStore::texture): (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper): * platform/graphics/texmap/TextureMapperBackingStore.h: (GraphicsSurfaceData): (WebCore::GraphicsSurfaceData::setSurface): (WebCore::GraphicsSurfaceData::GraphicsSurfaceData): (TextureMapperSurfaceBackingStore): (WebCore::TextureMapperSurfaceBackingStore::create): (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore): (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore): * platform/graphics/texmap/TextureMapperGL.cpp: Add a drawing function for textures of type GL_TEXTURE_RECTANGLE_ARB. (WebCore::TextureMapperGL::drawTextureRectangleARB): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::TextureMapperShaderManager::getShaderProgram): (WebCore::TextureMapperShaderProgramSimple::create): (WebCore::TextureMapperShaderProgramSimple::initialize): (WebCore::TextureMapperShaderProgramSolidColor::create): (WebCore::TextureMapperShaderProgramSolidColor::initialize): (WebCore::TextureMapperShaderProgramRectSimple::create): (WebCore::TextureMapperShaderProgramRectSimple::fragmentShaderSource): (WebCore::TextureMapperShaderProgramOpacityAndMask::create): (WebCore::TextureMapperShaderProgramOpacityAndMask::initialize): (WebCore::TextureMapperShaderProgramRectOpacityAndMask::create): (WebCore::TextureMapperShaderProgramRectOpacityAndMask::fragmentShaderSource): * platform/graphics/texmap/TextureMapperShaderManager.h: Add new shader programs that can be used with GL_TEXTURE_RECTANGLE_ARB textures. This is mainly necessary, because this type of texture uses non-normalized coordinates. Further move the calls to initializeProgram() from the constructor into a separate initialize() function, as initializeProgram() calls vertexShaderSource() (and friends) and we should not call virtual functions in the constructor. (WebCore::TextureMapperShaderProgram::initialize): (TextureMapperShaderProgramSimple): (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple): (TextureMapperShaderProgramRectSimple): (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple): (TextureMapperShaderProgramOpacityAndMask): (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask): (TextureMapperShaderProgramRectOpacityAndMask): (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask): (TextureMapperShaderProgramSolidColor): (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor): 2012-06-01 Christophe Dumez <christophe.dumez@intel.com> [EFL] EFL port does not enable WEB_INTENTS_TAG flag https://bugs.webkit.org/show_bug.cgi?id=86866 Reviewed by Adam Barth. Fix compilation error when WEB_INTENTS_TAG flag is enabled. HTMLElement::insertedInto() takes a ContainerNode* in argument, not a Node*. Test: webintents/intent-tag.html * CMakeLists.txt: * html/HTMLIntentElement.cpp: (WebCore::HTMLIntentElement::insertedInto): * html/HTMLIntentElement.h: (HTMLIntentElement): 2012-06-01 Dominik Röttsches <dominik.rottsches@intel.com> [cairo] Pixel artifacts can be seen on reflections https://bugs.webkit.org/show_bug.cgi?id=85483 Antialiased clipping in the simple rectangular clip method leads to edge artifacts when transformations are applied to the layer. Explicitly disabling antialiased clipping for this function solves this issue. Comparing Cairo GraphicsContext to Qt and Skia GC, it seems that these backends do not expect the platform context to clip antialiased in this case either. Reviewed by Martin Robinson. No new tests, covered by fast/css/transformed-mask.html. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clip): 2012-06-01 Florin Malita <fmalita@chromium.org> http://shinydemos.com/clock/ doesn't seem to work https://bugs.webkit.org/show_bug.cgi?id=79682 Reviewed by Nikolas Zimmermann. Test: svg/repaint/text-mask-update.svg Currently, parent resources are not invalidated when SVGInlineText nodes are added or removed. Adjusting SVGResourcesCache::clientWasAddedToTree() and SVGResourcesCache::clientWillBeRemovedFromTree() to cover this case. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientWasAddedToTree): (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree): 2012-06-01 John Mellor <johnme@chromium.org> Don't set scroll position twice in HistoryController::restoreScrollPositionAndViewState https://bugs.webkit.org/show_bug.cgi?id=88068 Reviewed by Adam Barth. In the case where pageScaleFactor changes, we were calling setScrollPosition with an incorrect scroll position (i.e. a scroll position scaled by the pageScaleFactor we hadn't yet applied), then fixing it by setting the pageScaleFactor and scroll position together, overwriting the old scroll position. It's cleaner to just set the pageScaleFactor and scroll position together. No new tests as this isn't expected to change the ultimate behavior, just clean up how it happens. * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): 2012-06-01 Thiago Marcos P. Santos <thiago.santos@intel.com> [Qt] Remove deprecated to/fromAscii() https://bugs.webkit.org/show_bug.cgi?id=88086 Reviewed by Simon Hausmann. Replacing to/fromAscii with to/fromLatin1 since it is deprecated on Qt5. * bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fallbackObject): * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2012-06-01 Dan Bernstein <mitz@apple.com> Layout not updated after setting -webkit-line-clamp to none https://bugs.webkit.org/show_bug.cgi?id=88049 Reviewed by Abhishek Arya. Test: fast/flexbox/line-clamp-removed-dynamically.html * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::styleWillChange): Added. Calls clearLineClamp if line-clamp will change to none. (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): Added. Marks possibly-clamped children for layout and clears truncation from blocks. * rendering/RenderDeprecatedFlexibleBox.h: 2012-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119213. http://trac.webkit.org/changeset/119213 https://bugs.webkit.org/show_bug.cgi?id=88084 This patch broke two tests on all platform except Chromium. The authors are unavailable. (Requested by zherczeg on #webkit). * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-01 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119219. http://trac.webkit.org/changeset/119219 https://bugs.webkit.org/show_bug.cgi?id=88088 This patch broke two tests on GTK/Qt. The authors are unavailable. (Requested by kkristof on #webkit). * loader/FrameLoader.cpp: (WebCore::FrameLoader::closeAndRemoveChild): (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::willDetachPage): * page/Frame.h: (Frame): (WebCore::Frame::detachFromPage): (WebCore): * page/Page.cpp: (WebCore::Page::~Page): 2012-06-01 Alexei Filippov <alexeif@chromium.org> Web Inspector: Add Closure compiler annotations to WorkerConsole https://bugs.webkit.org/show_bug.cgi?id=88073 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotWorker.js: (WebInspector.WorkerConsole.prototype.log): (WebInspector.WorkerConsole.prototype.error): (WebInspector.WorkerConsole.prototype.info): 2012-06-01 MORITA Hajime <morrita@google.com> Frame::willDetachPage() shouldn't be called more than once. https://bugs.webkit.org/show_bug.cgi?id=88056 Reviewed by Ryosuke Niwa. This change moved willDetachPage() to private and calls it from detachFromParent(). Also, it checks m_page and call willDetachPage() only once, if m_page is available. No new tests. Covered by existing suites. * loader/FrameLoader.cpp: (WebCore::FrameLoader::closeAndRemoveChild): (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::detachFromPage): (WebCore): (WebCore::Frame::willDetachPage): * page/Frame.h: (Frame): * page/Page.cpp: (WebCore::Page::~Page): 2012-06-01 Pierre Rossi <pierre.rossi@gmail.com> [Qt] Support drawing a pattern with a translation. https://bugs.webkit.org/show_bug.cgi?id=87025 Drawing an SVG pattern that has its x or y attribute set works by setting a transform on the Pattern. We would ignore this by only taking into account the texture and target rect. Reviewed by Kenneth Rohde Christiansen. test: svg/W3C-SVG-1.1-SE/pservers-pattern-04-f.svg * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::drawRepeatPattern): refactored to take into account the translation set on the brush. (WebCore::GraphicsContext::fillRect): 2012-06-01 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r109729) [Form] Rendering of select/optgroup/option combination is too slow. https://bugs.webkit.org/show_bug.cgi?id=88059 Reviewed by Kent Tamura. This patch changes to share RenderStyle object among the "option" elements to improve rendering performance and reducing memory usage of RenderStyle. No new tests. This patch doesn't change behavior but rendering performance. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Check attribute value mismatching for "option" element. 2012-06-01 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [REGRESSION] Bad layout of "Override device metrics" controls in the Settings dialog https://bugs.webkit.org/show_bug.cgi?id=88074 Reviewed by Yury Semikhatsky. The "Override device metrics" controls are placed in a table, which gets too narrow. Give it a "white-space: nowrap" to avoid wrapping individual cells. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createDeviceMetricsElement): * inspector/front-end/elementsPanel.css: * inspector/front-end/inspector.css: (.nowrap): 2012-06-01 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> [EFL] Implement PlatformStrategies https://bugs.webkit.org/show_bug.cgi?id=86946 Reviewed by Carlos Garcia Campos. * PlatformEfl.cmake: Add PlatformStrategies.cpp file to the build system. Also, remove PluginDataEfl.cpp because the same functionality is now implemented in PlatformStrategiesEfl.cpp. 2012-06-01 Adam Barth <abarth@webkit.org> ASSERT(m_fontSelector->document()) is bogus and should be removed https://bugs.webkit.org/show_bug.cgi?id=88053 Reviewed by Abhishek Arya. This ASSERT was introduced in http://trac.webkit.org/changeset/97402 together with a branch that handled the case of the ASSERT firing. This ASSERT fires when running tests on Android (which runs with ASSERTs enabled). The ASSERT appears to be bogus, so this patch removes it. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): 2012-06-01 Yoshifumi Inoue <yosin@chromium.org> [Platform][Decimal] UInt128::operator/= calls makeUInt128 with wrong argument order https://bugs.webkit.org/show_bug.cgi?id=88044 Reviewed by Kent Tamura. This patch fixed wrong argument of makeUInt128 in UInt128::operator/= to get right result for decimal multiplication. Test: WebKit/chromium/tests/DecimalTest.cpp: Add new a new test case. * platform/Decimal.cpp: (WebCore::DecimalPrivate::UInt128::operator/=): 2012-06-01 Adam Barth <abarth@webkit.org> sandbox directive in X-WebKit-CSP header unable to create a unique origin https://bugs.webkit.org/show_bug.cgi?id=88014 Reviewed by Ryosuke Niwa. We process the HTTP headers for a response after we create a document object for the response. Previously, the SecurityOrigin of a document was determined when the document was created, which meant that the sandbox directive in CSP couldn't create a unique origin. In this patch, we transition to a unique origin when we start enforcing the SandboxOrigin bit. This patch is more complicated than you might expect because we redundantly store the SecurityOrigin object in DOMWindow. Removing that redundant state is https://bugs.webkit.org/show_bug.cgi?id=75793. The CSP sandbox directive is defined in http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-1.0-specification.html by reference to http://www.whatwg.org/specs/web-apps/current-work/#forced-sandboxing-flag-set. The relation between sandbox and unique origin arises from http://www.whatwg.org/specs/web-apps/current-work/#origin-0. Test: http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header-control.html http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header.html http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control.html http/tests/security/contentSecurityPolicy/sandbox-in-http-header.html * dom/Document.cpp: (WebCore::Document::didUpdateSecurityOrigin): (WebCore::Document::initContentSecurityPolicy): * dom/Document.h: (Document): * dom/SecurityContext.cpp: (WebCore::SecurityContext::enforceSandboxFlags): (WebCore): (WebCore::SecurityContext::didUpdateSecurityOrigin): * dom/SecurityContext.h: (SecurityContext): 2012-05-31 Yury Semikhatsky <yurys@chromium.org> Web Inspector: expose MemoryCache statistics in the inspector protocol https://bugs.webkit.org/show_bug.cgi?id=87984 Reviewed by Pavel Feldman. Added MemoryCache statistics to Memory.getProcessMemoryDistribution command result. Corresponding sector is added to the memory pie-chart. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::addMemoryBlockFor): (WebCore::memoryCacheInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-05-31 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add RenderArena sizes to the memory pie-chart https://bugs.webkit.org/show_bug.cgi?id=87971 Reviewed by Pavel Feldman. Added allocated and used sizes of page render arenas to the memory report returned by the InspectorMemoryAgent. Total allocated size of the inspected page's render arenas will be displayed on the memory pie-chart. * inspector/InspectorMemoryAgent.cpp: (MemoryBlockName): (WebCore): (WebCore::renderTreeInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): 2012-05-30 Yury Semikhatsky <yurys@chromium.org> Web Inspector: change type of injected script id from long to int https://bugs.webkit.org/show_bug.cgi?id=87837 Reviewed by Pavel Feldman. Changed injected script id type from long to int so that we don't lose precision when sending the id over the protocol. * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::injectedScriptFor): * bindings/v8/custom/V8InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::injectedScriptFor): * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::injectedScriptForId): (WebCore::InjectedScriptManager::injectedScriptIdFor): (WebCore::InjectedScriptManager::injectScript): * inspector/InjectedScriptManager.h: (InjectedScriptManager): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::notifyContextCreated): 2012-05-29 Yury Semikhatsky <yurys@chromium.org> Web Inspector: draw pie-chart based on memory data received from backend https://bugs.webkit.org/show_bug.cgi?id=87737 Reviewed by Pavel Feldman. Added pie chart for memory data received from inspector memory agent. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemorySnapshotView): (WebInspector.NativeMemoryProfileType): (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot): (WebInspector.NativeMemoryProfileType.prototype.buttonClicked): (WebInspector.NativeMemoryProfileHeader): (WebInspector.MemoryBlockViewProperties): (WebInspector.MemoryBlockViewProperties._initialize): (WebInspector.MemoryBlockViewProperties._forMemoryBlock): (WebInspector.NativeMemoryPieChart): (WebInspector.NativeMemoryPieChart.prototype.onResize): (WebInspector.NativeMemoryPieChart.prototype._updateSize): (WebInspector.NativeMemoryPieChart.prototype._addBlockLabels): (WebInspector.NativeMemoryPieChart.prototype._paint.paintPercentAndLabel): (WebInspector.NativeMemoryPieChart.prototype._paint): (WebInspector.NativeMemoryPieChart.prototype._clear): * inspector/front-end/WebKit.qrc: * inspector/front-end/nativeMemoryProfiler.css: Added. (.memory-pie-chart-container): (.memory-pie-chart): (.memory-blocks-list .swatch): (.memory-blocks-list): (.memory-blocks-list .item): 2012-05-31 Dominic Cooney <dominicc@chromium.org> [V8] Expando properties on attribute nodes disappear https://bugs.webkit.org/show_bug.cgi?id=87925 Reviewed by Adam Barth. Test: fast/dom/gc-attribute-node.html * bindings/v8/V8GCController.cpp: (WebCore::calculateGroupId): Group attributes like other nodes. 2012-05-31 Alexander Shalamov <alexander.shalamov@intel.com> [EFL] <input type="number"> is not a spinbutton https://bugs.webkit.org/show_bug.cgi?id=86846 Reviewed by Kenneth Rohde Christiansen. Implemented adjustInnerSpinButtonStyle and paintInnerSpinButton in RenderThemeEfl. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::applyEdjeStateFromForm): (WebCore::RenderThemeEfl::edjeGroupFromFormType): (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle): (WebCore): (WebCore::RenderThemeEfl::paintInnerSpinButton): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): 2012-05-31 Hajime Morrita <morrita@chromium.org> REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac https://bugs.webkit.org/show_bug.cgi?id=86859 Reviewed by Ryosuke Niwa. The test tries to reach an invalid SpellChecker object. Such an access should be guarded beforehand. Asynchronous spellchecking can return results after originated frame is gone, which triggered an invalid access to the dead spellchecker object. This chagne prevents it by marking request objects from the spellchecker as invalid: - Originally TextCheckerClient API was passed a SpellCheker object. This change abstracted it behind TextCheckingRequest interface, didSucceed() and didCancel() method specifically. - TextCheckingRequest was turned from a plain old object into a refcounted abstract class, which is now subclassed by SpellCheckRequest. - SpellChecker now marks pending SpellCheckRequest objects as invalid on its destructor. Test: editing/spelling/spellcheck-async-remove-frame.html * WebCore.exp.in: * editing/SpellChecker.cpp: (WebCore::SpellCheckRequest::SpellCheckRequest): (WebCore::SpellCheckRequest::create): (WebCore::SpellCheckRequest::didSucceed): (WebCore): (WebCore::SpellCheckRequest::didCancel): (WebCore::SpellCheckRequest::wasRequestedBy): (WebCore::SpellCheckRequest::requesterDestroyed): (WebCore::SpellChecker::~SpellChecker): (WebCore::SpellChecker::requestCheckingFor): (WebCore::SpellChecker::invokeRequest): (WebCore::SpellChecker::didCheckSucceed): (WebCore::SpellChecker::didCheckCancel): * editing/SpellChecker.h: (WebCore): (SpellCheckRequest): (WebCore::SpellCheckRequest::isStarted): (SpellChecker): * loader/EmptyClients.h: (WebCore::EmptyTextCheckerClient::requestCheckingOfString): * platform/text/TextCheckerClient.h: (TextCheckerClient): * platform/text/TextChecking.h: (GrammarDetail): (TextCheckingResult): (TextCheckingRequest): (WebCore::TextCheckingRequest::~TextCheckingRequest): 2012-05-31 Tony Chang <tony@chromium.org> initial flex value should be 1 1 auto https://bugs.webkit.org/show_bug.cgi?id=86526 Reviewed by Ojan Vafai. Also, if -webkit-flex is used to set the positive flex to 0 and the negative flex is omitted, the negative flex is set to 0. New test cases in: flex-property-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): * css/StyleBuilder.cpp: (WebCore::ApplyPropertyFlex::applyValue): * rendering/style/RenderStyle.h: 2012-05-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119146. http://trac.webkit.org/changeset/119146 https://bugs.webkit.org/show_bug.cgi?id=88035 android breakage fixed in http://crrev.com/139945 (Requested by fischman on #webkit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::didLoadingProgress): (WebCore::MediaPlayer::didLoadingProgress): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::didLoadingProgress): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::didLoadingProgress): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Tom Sepez <tsepez@chromium.org> XSSAuditor bypass with leading /*///*/ comment https://bugs.webkit.org/show_bug.cgi?id=88002 Reviewed by Adam Barth. Fixes issue in xssauditor's parsing of /*/. Test: http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::decodedSnippetForJavaScript): 2012-05-31 Hans Muller <hmuller@adobe.com> Bug: Negative SVG rect rx,ry corner radii values aren't handled correctly https://bugs.webkit.org/show_bug.cgi?id=87859 Reviewed by Dirk Schulze. Added the rect element corner radius constraints specified in steps 2-4 of http://www.w3.org/TR/SVG/shapes.html#RectElement to Path::addRoundedRect(). Support for steps 6 and 7 was already included. Steps 2-4: 2 - If neither rx nor ry are properly specified, then set both rx and ry to 0. (This will result in square corners.) 3 - Otherwise, if a properly specified value is provided for rx, but not for ry then set both rx and ry to the value of rx. 4 - Otherwise, if a properly specified value is provided for ry, but not for rx, then set both rx and ry to the value of ry. Tests: svg/custom/rect-negative-corner-radii-expected.svg svg/custom/rect-negative-corner-radii.svg * platform/graphics/Path.cpp: (WebCore::Path::addRoundedRect): 2012-05-31 Shawn Singh <shawnsingh@chromium.org> [chromium] Migrate to WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=87788 Reviewed by James Robinson. Covered by all existing layout tests and unit tests. This patch replaces all occurrences of WebCore::TransformationMatrix with WebKit::WebTransformationMatrix in the chromium compositor code. * platform/chromium/support/WebTransformationMatrix.cpp: (WebKit::WebTransformationMatrix::WebTransformationMatrix): (WebKit): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setSublayerTransform): (WebCore::LayerChromium::setTransform): (WebCore::LayerChromium::setTransformFromAnimation): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::sublayerTransform): (WebCore::LayerChromium::drawTransform): (WebCore::LayerChromium::setDrawTransform): (WebCore::LayerChromium::screenSpaceTransform): (WebCore::LayerChromium::setScreenSpaceTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawCheckerboardQuad): (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore::LayerRendererChromium::toGLMatrix): (WebCore::LayerRendererChromium::drawTexturedQuad): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::projectionMatrix): (WebCore::LayerRendererChromium::windowMatrix): (LayerRendererChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::LinkHighlight): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::drawTransform): (WebCore::RenderSurfaceChromium::setDrawTransform): (WebCore::RenderSurfaceChromium::originTransform): (WebCore::RenderSurfaceChromium::setOriginTransform): (WebCore::RenderSurfaceChromium::screenSpaceTransform): (WebCore::RenderSurfaceChromium::setScreenSpaceTransform): (WebCore::RenderSurfaceChromium::replicaDrawTransform): (WebCore::RenderSurfaceChromium::setReplicaDrawTransform): (WebCore::RenderSurfaceChromium::replicaOriginTransform): (WebCore::RenderSurfaceChromium::setReplicaOriginTransform): (WebCore::RenderSurfaceChromium::replicaScreenSpaceTransform): (WebCore::RenderSurfaceChromium::setReplicaScreenSpaceTransform): (RenderSurfaceChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCAnimationCurve.h: (WebCore): (CCTransformAnimationCurve): * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::quadTransform): (WebCore::CCDrawQuad::layerTransform): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: (WebCore::CCTransformKeyframe::clone): (WebCore::CCKeyframedTransformAnimationCurve::getValue): * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: (CCKeyframedTransformAnimationCurve): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::tickAnimations): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (WebKit): (WebCore): (CCLayerAnimationControllerClient): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::quadTransform): (WebCore::CCLayerImpl::setTransformFromAnimation): (WebCore::CCLayerImpl::setSublayerTransform): (WebCore::CCLayerImpl::setTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::sublayerTransform): (WebCore::CCLayerImpl::drawTransform): (WebCore::CCLayerImpl::setDrawTransform): (WebCore::CCLayerImpl::screenSpaceTransform): (WebCore::CCLayerImpl::setScreenSpaceTransform): * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::createGraphNodes): * platform/graphics/chromium/cc/CCLayerSorter.h: (WebKit): (LayerShape): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isSurfaceBackFaceVisible): (WebCore::calculateVisibleLayerRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::damageInSurfaceSpace): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapClippedQuad): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: (WebKit): (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::reduceOcclusionBelowSurface): (WebCore::contentToScreenSpaceTransform): (WebCore::contentToTargetSurfaceTransform): (WebCore::addOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::testContentRectOccluded): (WebCore::computeUnoccludedContentRect): (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCOcclusionTracker.h: * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::didDraw): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (WebKit): (CCOverdrawMetrics): * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore::CCRenderSurface::setDrawTransform): (WebCore::CCRenderSurface::drawTransform): (WebCore::CCRenderSurface::setOriginTransform): (WebCore::CCRenderSurface::originTransform): (WebCore::CCRenderSurface::setScreenSpaceTransform): (WebCore::CCRenderSurface::screenSpaceTransform): (WebCore::CCRenderSurface::setReplicaDrawTransform): (WebCore::CCRenderSurface::replicaDrawTransform): (WebCore::CCRenderSurface::setReplicaOriginTransform): (WebCore::CCRenderSurface::replicaOriginTransform): (WebCore::CCRenderSurface::setReplicaScreenSpaceTransform): (WebCore::CCRenderSurface::replicaScreenSpaceTransform): (CCRenderSurface): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): * platform/graphics/chromium/cc/CCSharedQuadState.h: (CCSharedQuadState): (WebCore::CCSharedQuadState::quadTransform): (WebCore::CCSharedQuadState::layerTransform): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::quadTransform): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::quadTransform): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-05-31 Ian Vollick <vollick@chromium.org> [chromium] Single thread proxy should not tick animations unless the layer renderer has been initialized https://bugs.webkit.org/show_bug.cgi?id=87873 Reviewed by James Robinson. When the layer renderer fails to initialize, be sure to stop the animation timer. Unit test: CCLayerTreeHostTestInitializeLayerRendererFailsAfterAddAnimation.runSingleThread * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::didAddAnimation): (WebCore::CCSingleThreadProxy::animationTimerDelay): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2012-05-31 Simon Fraser <simon.fraser@apple.com> RenderLayerCompositor cleanup: make RenderGeometryMap part of the OverlapMap https://bugs.webkit.org/show_bug.cgi?id=88021 Reviewed by James Robinson. We only ever use the RenderGeometryMap when we have an OverlapMap, so make it a member of the OverlapMap. No behavior change. * rendering/RenderLayerCompositor.cpp: (RenderLayerCompositor::OverlapMap): (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (WebCore): (RenderLayerCompositor): 2012-05-31 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to v8Boolean() https://bugs.webkit.org/show_bug.cgi?id=87948 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8Boolean(). No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyDeleter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageDeleter): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): 2012-05-31 Alec Flett <alecflett@chromium.org> IndexedDB: Implement IDBTransaction.error and IDBRequest.error https://bugs.webkit.org/show_bug.cgi?id=87865 Reviewed by Tony Chang. Added "error" attribute to IDBRequest and IDBTransaction. Update IDBDatabaseError to honor the IDBDatabaseException behavior of dealing with IDB-specific throws of DOMException codes, as per the spec. Existing tests which previously tested 'errorCode' and 'webkitErrorMessage' have been updated to use the new attribute. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::idbCode): (WebCore::IDBDatabaseError::name): (WebCore::IDBDatabaseError::IDBDatabaseError): (IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::getErrorEntry): (WebCore::IDBDatabaseException::initializeDescription): (WebCore::IDBDatabaseException::getErrorName): (WebCore::IDBDatabaseException::getLegacyErrorCode): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::error): (WebCore): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::error): (WebCore): (WebCore::IDBTransaction::setError): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-31 James Robinson <jamesr@chromium.org> [chromium] Assertion failures during compositor startup in lost context situations https://bugs.webkit.org/show_bug.cgi?id=87912 Reviewed by Adrienne Walker. getShaderiv and getProgramiv may return 0 if the context is lost. We correctly recover in this case, so it's bogus to fail an ASSERT in debug in this case. Added new unit test in LayerRendererChromiumTest to cover this. * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::contextLost): (WebCore): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::createShaderProgram): 2012-05-31 Ben Murdoch <benm@google.com> Fix crash in V8Document::createTouchListCallback. https://bugs.webkit.org/show_bug.cgi?id=87085 Reviewed by Abhishek Arya. Test: fast/events/touch/document-create-touch-list-crash.html * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::createTouchListCallback): Verify the native type of the arguments passed to createTouchList are Touches before appending them to the TouchList. In the case of a non-Touch argument, insert null into the TouchList. This consolidates V8 and JSC bindings behaviour. * dom/Document.cpp: Remove dead code. * dom/Document.h: ditto. 2012-05-31 Simon Fraser <simon.fraser@apple.com> Remove some duplicate code in RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=88009 Reviewed by Anders Carlsson. RenderLayerCompositor::hasNonAffineTransform() has the same code as the existing RenderLayer::has3DTransform(), so just use the RenderLayer method and remove hasNonAffineTransform(). No behavior change. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-05-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r119125. http://trac.webkit.org/changeset/119125 https://bugs.webkit.org/show_bug.cgi?id=88007 Will break android build if rolled (Requested by rafaelw_ on #webkit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::bytesLoaded): (WebCore::MediaPlayer::bytesLoaded): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::bytesLoaded): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::bytesLoaded): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::bytesLoaded): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::bytesLoaded): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::bytesLoaded): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::bytesLoaded): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Andy Estes <aestes@apple.com> Disentangle code that relies on USE(AUTOMATIC_TEXT_REPLACEMENT) from that which merely relies on PLATFORM(MAC) https://bugs.webkit.org/show_bug.cgi?id=87933 Reviewed by Dan Bernstein. * editing/Editor.cpp: * editing/Editor.h: * loader/EmptyClients.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * page/EditorClient.h: 2012-05-31 Dana Jansens <danakj@chromium.org> [chromium] Move drawing code for RenderSurfaces into LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=87877 Reviewed by James Robinson. We add data to CCRenderSurfaceDrawQuad so that the only use of CCRenderSurface directly from LayerRendererChromium is to reserve, release, and use the surface's textures, and to set the scissor rect. Each of these changes will be done independent of this change. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::applyFilters): (WebCore): (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::copyTextureToFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::contentsTextureId): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCQuadCuller.cpp: * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore): (WebCore::CCRenderSurface::CCRenderSurface): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::releaseContentsTexture): (WebCore::CCRenderSurface::hasValidContentsTexture): (WebCore::CCRenderSurface::releaseBackgroundTexture): (WebCore::CCRenderSurface::hasValidBackgroundTexture): (WebCore::CCRenderSurface::hasMask): (WebCore::CCRenderSurface::replicaHasMask): (WebCore::CCRenderSurface::appendQuads): * platform/graphics/chromium/cc/CCRenderSurface.h: (WebCore): (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: (WebKit): (CCRenderSurfaceDrawQuad): (WebCore::CCRenderSurfaceDrawQuad::maskTextureId): (WebCore::CCRenderSurfaceDrawQuad::filters): (WebCore::CCRenderSurfaceDrawQuad::backgroundFilters): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::contentsTextureId): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-05-31 Brady Eidson <beidson@apple.com> <rdar://problem/11544454> and https://bugs.webkit.org/show_bug.cgi?id=87990 Crashes unregistering DOMWindowProperties while releasing CachedPages Reviewed by Jessie Berlin. This patch rewrites DOMWindowProperty to always keep direct track of the DOMWindow it has registered with and to only ever unregister from that very same DOMWindow. No new tests. (While the direct cause of the crash is understood, reproducing it is not) * page/DOMWindowProperty.cpp: (WebCore::DOMWindowProperty::DOMWindowProperty): (WebCore::DOMWindowProperty::~DOMWindowProperty): (WebCore::DOMWindowProperty::disconnectFrameForPageCache): (WebCore::DOMWindowProperty::reconnectFrameFromPageCache): (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame): (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame): (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame): * page/DOMWindowProperty.h: (DOMWindowProperty): 2012-05-31 Tony Chang <tony@chromium.org> rename flexbox CSS properties from flex-align and flex-item-align to align-items and align-self https://bugs.webkit.org/show_bug.cgi?id=87907 Reviewed by Ojan Vafai. This was recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#align-items-property No new tests, updated the tests to use the new naming. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EAlignItems): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::alignmentForChild): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::alignChildren): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: (StyleFlexibleBoxData): Move member variables to StyleRareNonInheritedData because these values will eventually apply to more than just flexbox. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-05-31 Ami Fischman <fischman@chromium.org> Replace WebMediaPlayer::bytesLoaded() with an explicit didLoadingProgress() https://bugs.webkit.org/show_bug.cgi?id=86113 Reviewed by Eric Carlson. No new functionality, so no new tests. Loading progress is already tested by existing layouttests. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::startProgressEventTimer): (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle): (WebCore::HTMLMediaElement::progressEventTimerFired): (WebCore::HTMLMediaElement::startPlaybackProgressTimer): * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::didLoadingProgress): (WebCore::MediaPlayer::didLoadingProgress): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (MediaPlayerPrivateAVFoundation): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::didLoadingProgress): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): * platform/graphics/mac/MediaPlayerPrivateQTKit.h: (MediaPlayerPrivateQTKit): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt): (WebCore::MediaPlayerPrivateQt::didLoadingProgress): * platform/graphics/qt/MediaPlayerPrivateQt.h: (MediaPlayerPrivateQt): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::didLoadingProgress): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: (MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/wince/MediaPlayerPrivateWinCE.h: (MediaPlayerPrivate): 2012-05-31 Erik Arvidsson <arv@chromium.org> Make DOM Exceptions Errors https://bugs.webkit.org/show_bug.cgi?id=85078 Reviewed by Oliver Hunt. WebIDL mandates that exceptions should have Error.prototype on its prototype chain. For JSC we have access to the Error.prototype from the binding code. For V8 we set a field in the WrapperTypeInfo and when the constructor function is created we set the prototype as needed. Updated test: fast/dom/DOMException/prototype-object.html * ForwardingHeaders/runtime/ErrorPrototype.h: Added. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestException::createPrototype): * bindings/scripts/test/JS/JSTestException.h: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8BindingPerContextData.cpp: (WebCore): (WebCore::V8BindingPerContextData::init): (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): * bindings/v8/V8BindingPerContextData.h: (V8BindingPerContextData): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WrapperTypeInfo): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): 2012-05-31 Ian Vollick <vollick@chromium.org> [chromium] create WebTransformOperation interface for chromium platform https://bugs.webkit.org/show_bug.cgi?id=87510 Reviewed by James Robinson. Unit tests: WebTransformOperationsTest.transformTypesAreUnique WebTransformOperationsTest.matchesTypesSameLength WebTransformOperationsTest.matchesTypesDifferentLength WebTransformOperationsTest.applyTranslate WebTransformOperationsTest.applyRotate WebTransformOperationsTest.applyScale WebTransformOperationsTest.applySkew WebTransformOperationsTest.applyPerspective WebTransformOperationsTest.applyMatrix WebTransformOperationsTest.applyOrder WebTransformOperationsTest.blendOrder WebTransformOperationsTest.blendProgress WebTransformOperationsTest.blendWhenTypesDoNotMatch * WebCore.gypi: * platform/chromium/support/WebTransformOperations.cpp: Added. (WebKit): (WebTransformOperationsPrivate): (WebKit::WebTransformOperations::apply): (WebKit::WebTransformOperations::blend): (WebKit::WebTransformOperations::matchesTypes): (WebKit::WebTransformOperations::appendTranslate): (WebKit::WebTransformOperations::appendRotate): (WebKit::WebTransformOperations::appendScale): (WebKit::WebTransformOperations::appendSkew): (WebKit::WebTransformOperations::appendPerspective): (WebKit::WebTransformOperations::appendMatrix): (WebKit::WebTransformOperations::reset): (WebKit::WebTransformOperations::initialize): 2012-05-31 Yury Semikhatsky <yurys@chromium.org> m_totalAllocated should be intialized in RenderArena constructor https://bugs.webkit.org/show_bug.cgi?id=87967 Reviewed by Ojan Vafai. * rendering/RenderArena.cpp: (WebCore::RenderArena::RenderArena): added missing initializer. 2012-05-31 Julien Chaffraix <jchaffraix@webkit.org> The difference between a column and a column group renderer is badly drawn https://bugs.webkit.org/show_bug.cgi?id=87556 Reviewed by Abhishek Arya. No expected change in behavior. This patch tries to draw a better line between those 3 concepts: - renderer is a RenderTableCol (RenderObject::isRenderTableCol). - renderer is a column (RenderTableCol::isTableColumn()). - renderer is a column group (RenderTableCol::isTableColumnGroup()). (most of the code that needs to know the difference manipulate a RenderTableCol so there was no need to move the 2 last helpers into RenderObject) * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): Factored the code to use the column / column group iteration we set up in the rest of the code. Made the code more self-describing by using more RenderTableCol functions. * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): Factored the code to use the isTableColumn() and isTableColumnGroup() to better underline what we check. * rendering/RenderObject.h: (WebCore::RenderObject::isRenderTableCol): (WebCore::RenderObject::isTablePart): Renamed isTableCol to isRenderTableCol to match the class as this doesn't imply that the renderer is actually a column. * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::parseAttribute): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::fullRecalc): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): (WebCore::RenderTable::firstColumn): Updated after the isRenderTableCol rename. * dom/Text.cpp: (WebCore::Text::rendererIsNeeded): * editing/htmlediting.cpp: (WebCore::isTableStructureNode): Ditto and renamed some variables. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::rendererIsNeeded): Ditto and added a FIXME as the logic doesn't seem very bullet proof. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): (WebCore::RenderTableCell::computeCollapsedBeforeBorder): (WebCore::RenderTableCell::computeCollapsedAfterBorder): Changed to use the enclosingColumnGroup* helpers. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::isChildAllowed): (WebCore::RenderTableCol::canHaveChildren): (WebCore::RenderTableCol::enclosingColumnGroup): (WebCore::RenderTableCol::nextColumn): Updated to use the new functions. * rendering/RenderTableCol.h: (WebCore::RenderTableCol::isTableColumn): (WebCore::RenderTableCol::isTableColumnGroup): (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore): (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter): Added the following new helpers. 2012-05-31 Jessie Berlin <jberlin@apple.com> Fix Lion build after r119073. * platform/Decimal.cpp: (WebCore::Decimal::toString): Do not attempt to assign a unsigned long long to an int. 2012-05-31 Christophe Dumez <christophe.dumez@intel.com> [EFL] Enable CSS_IMAGE_SET flag https://bugs.webkit.org/show_bug.cgi?id=87727 Reviewed by Adam Roben. Fix CMakeLists.txt so that CSSImageSetValue.cpp gets compiled if CSS_IMAGE_SET flag is enabled. * CMakeLists.txt: 2012-05-31 Keyar Hood <keyar@chromium.org> the imageSmoothingEnabled flag needs to be in the state object https://bugs.webkit.org/show_bug.cgi?id=87853 Reviewed by Darin Adler. Updated fast/canvas/canvas-imageSmoothingEnabled.html instead of adding a new test. The imageSmoothingEnabled flag is saved in the draw state now. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::State::operator=): (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): * html/canvas/CanvasRenderingContext2D.h: (State): 2012-05-31 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Fix checkbox position on Settings screen. https://bugs.webkit.org/show_bug.cgi?id=87007 Reviewed by Yury Semikhatsky. Checkbox seems to be improperly aligned. It is "shifted" up on 1px on Mac and 2px on Linux. Also, keyboard-shortcuts screen has "wrapped" key descriptions on Mac. UI changes, no new tests. * inspector/front-end/helpScreen.css: (.help-container): Fixed column width. (.help-block): Ditto. (.help-key-cell): Ditto. (body.platform-mac .help-container): Ditto. (body.platform-mac .help-block): Ditto. (body.platform-mac .help-key-cell): Ditto. (.help-content p): Ajdusted spacing between lines (.help-content input[type=checkbox]): Fixed alignment. (body.platform-mac .help-content input[type=checkbox]): Ditto. (.help-content input[type=radio]): Fixed alignment. (body.platform-mac .help-content input[type=radio]): Ditto. 2012-05-30 Andreas Kling <kling@webkit.org> Have StylePropertySet constructor take array/length instead of vector. <http://webkit.org/b/87876> Reviewed by Antti Koivisto. Remove the StylePropertyVector typedef and have StylePropertySet constructors take CSSProperty*/length since we are copying the data into a tightly packed array anyway. This frees up the call sites to use whatever storage they please rather than being restricted to a vector with inlineCapacity=4. Change said call sites to use an arbitrary high inline capacity (256) for their stack-allocated temporary vectors. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::createImmutable): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::copyPropertiesInSet): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): 2012-05-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5) https://bugs.webkit.org/show_bug.cgi?id=87955 Reviewed by Simon Hausmann. * bridge/qt/qt_class.cpp: * bridge/qt/qt_instance.cpp: * bridge/qt/qt_runtime.h: * page/qt/EventHandlerQt.cpp: * platform/graphics/GraphicsContext3D.h: * platform/graphics/OpenGLShims.cpp: * platform/graphics/OpenGLShims.h: * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/SimpleFontDataQt.cpp: * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: * platform/qt/DeviceMotionProviderQt.h: * platform/qt/DeviceOrientationProviderQt.h: * platform/qt/KURLQt.cpp: * platform/qt/PlatformScreenQt.cpp: * platform/qt/QWebPageClient.h: * plugins/qt/PluginPackageQt.cpp: * plugins/qt/PluginViewQt.cpp: 2012-05-30 Andreas Kling <kling@webkit.org> Have StylePropertySet constructor take array/length instead of vector. <http://webkit.org/b/87876> Reviewed by Antti Koivisto. Remove the StylePropertyVector typedef and have StylePropertySet constructors take CSSProperty*/length since we are copying the data into a tightly packed array anyway. This frees up the call sites to use whatever storage they please rather than being restricted to a vector with inlineCapacity=4. Change said call sites to use an arbitrary high inline capacity (256) for their stack-allocated temporary vectors. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::filterProperties): (WebCore::CSSParser::createStylePropertySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::createImmutable): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::copyPropertiesInSet): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): 2012-05-31 Mike West <mkwst@chromium.org> Fixing compilation with SVG disabled. https://bugs.webkit.org/show_bug.cgi?id=87944 This patch adds the missing enumeration value 'CSSPropertyWebkitBoxDecorationBreak' into switch statements to make clang happy. Reviewed by Alexis Menard. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-05-31 Yoshifumi Inoue <yosin@chromium.org> [Platform] Implementation of Decimal(int32_t) isn't portable. https://bugs.webkit.org/show_bug.cgi?id=87941 Reviewed by Kent Tamura. This patch changes negation of integer to make unsigned integer in portable way. No new tests. This patch doesn't change behavior. * platform/Decimal.cpp: (WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32) 2012-05-31 Gyuyoung Kim <gyuyoung.kim@samsung.com> [CMAKE][EFL] Remove unneeded include path https://bugs.webkit.org/show_bug.cgi?id=87927 Reviewed by Kenneth Rohde Christiansen. Though *wtf* directory was moved to Source/WTF, PlatformEfl.cmake is still including the previous path. In addition, files on EFL port are using "<wtf/gobject/XXX>" directly in #include line. So, EFL port doesn't need to include ${JAVASCRIPTCORE_DIR}/wtf/gobject path anymore. * PlatformEfl.cmake: Remove '${JAVASCRIPTCORE_DIR}/wtf/gobject' path from include path list. 2012-05-31 Yoshifumi Inoue <yosin@chromium.org> [Platform] Introduce Decimal class for Number/Range input type. https://bugs.webkit.org/show_bug.cgi?id=87360 Reviewed by Kent Tamura. This patch added new class Decimal for decimal arithmatic in two files: platform/Decimal.cpp and Decimal.h with unit test. Test: WebKit/chromium/tests/DecimalTest.cpp * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Added. (WebCore): (DecimalPrivate): (SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::handle): (WebCore::DecimalPrivate::SpecialValueHandler::value): (UInt128): (WebCore::DecimalPrivate::UInt128::UInt128): (WebCore::DecimalPrivate::UInt128::high): (WebCore::DecimalPrivate::UInt128::low): (WebCore::DecimalPrivate::UInt128::multiply): (WebCore::DecimalPrivate::UInt128::highUInt32): (WebCore::DecimalPrivate::UInt128::lowUInt32): (WebCore::DecimalPrivate::UInt128::isZero): (WebCore::DecimalPrivate::UInt128::makeUInt64): (WebCore::DecimalPrivate::UInt128::operator/=): (WebCore::DecimalPrivate::UInt128::multiplyHigh): (WebCore::DecimalPrivate::countDigits): (WebCore::DecimalPrivate::scaleDown): (WebCore::DecimalPrivate::scaleUp): (WebCore::Decimal::EncodedData::EncodedData): (WebCore::Decimal::EncodedData::operator==): (WebCore::Decimal::Decimal): (WebCore::Decimal::operator=): (WebCore::Decimal::operator+=): (WebCore::Decimal::operator-=): (WebCore::Decimal::operator*=): (WebCore::Decimal::operator/=): (WebCore::Decimal::operator-): (WebCore::Decimal::operator+): (WebCore::Decimal::operator*): (WebCore::Decimal::operator/): (WebCore::Decimal::operator==): (WebCore::Decimal::operator!=): (WebCore::Decimal::operator<): (WebCore::Decimal::operator<=): (WebCore::Decimal::operator>): (WebCore::Decimal::operator>=): (WebCore::Decimal::abs): (WebCore::Decimal::alignOperands): (WebCore::Decimal::ceiling): (WebCore::Decimal::compareTo): (WebCore::Decimal::floor): (WebCore::Decimal::fromString): (WebCore::Decimal::infinity): (WebCore::Decimal::nan): (WebCore::Decimal::remainder): (WebCore::Decimal::round): (WebCore::Decimal::toString): (WebCore::Decimal::zero): * platform/Decimal.h: Added. (WebCore): (DecimalPrivate): (Decimal): (EncodedData): (WebCore::Decimal::EncodedData::operator!=): (WebCore::Decimal::EncodedData::coefficient): (WebCore::Decimal::EncodedData::exponent): (WebCore::Decimal::EncodedData::isFinite): (WebCore::Decimal::EncodedData::isNaN): (WebCore::Decimal::EncodedData::isSpecial): (WebCore::Decimal::EncodedData::isZero): (WebCore::Decimal::EncodedData::sign): (WebCore::Decimal::EncodedData::setSign): (WebCore::Decimal::EncodedData::formatClass): (WebCore::Decimal::isFinite): (WebCore::Decimal::isNaN): (WebCore::Decimal::isNegative): (WebCore::Decimal::isPositive): (WebCore::Decimal::isSpecial): (WebCore::Decimal::isZero): (WebCore::Decimal::value): (AlignedOperands): (WebCore::Decimal::invertSign): (WebCore::Decimal::exponent): (WebCore::Decimal::sign): 2012-05-31 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to v8String() in custom bindings https://bugs.webkit.org/show_bug.cgi?id=87825 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8String() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore::installFastSet): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toV8Object): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyGetter): (WebCore::V8DOMStringMap::namedPropertyEnumerator): * bindings/v8/custom/V8FileReaderCustom.cpp: (WebCore::V8FileReader::resultAccessorGetter): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::toDataURLCallback): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8Object): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): (WebCore::V8InjectedScriptHost::storageIdCallback): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::platformCallback): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::typeAccessorGetter): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::toStringCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::V8Storage::namedPropertyEnumerator): (WebCore::storageGetter): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): * bindings/v8/custom/V8XSLTProcessorCustom.cpp: (WebCore::V8XSLTProcessor::getParameterCallback): 2012-05-31 Hayato Ito <hayato@chromium.org> ComposedShadowTreeWalker should support traversing nodes in an orphaned shadow subtree. https://bugs.webkit.org/show_bug.cgi?id=87493 Reviewed by Dimitri Glazkov. ComposedShadowTreeWalker assumed that a visited shadow root is always assigned to a shadow insertion point since it only traverses nodes which are rendered. But there is an exceptional use case such as an event dispatching. Some events, such as a 'click' event, may happen in an orphaned shadow subtree. In such cases, traversal might start with a node in an orphaned shadow subtree. So ComposedShadowTreeWalker can not assume that visited shadow root is always assigned to a shadow insertion point. This patch only fixes ComposedShadowTreeWalker. ComposedShadowTreeParentWalker will be fixed in another patch with an event dispatching test. Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): 2012-05-30 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes https://bugs.webkit.org/show_bug.cgi?id=87830 Reviewed by James Robinson. Added a method for getting process memory usage in bytes. It is used in the inspector memory instrumentation to get process total memory usage. * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/MemoryUsageSupport.cpp: (WebCore::MemoryUsageSupport::processMemorySizesInBytes): (WebCore): * platform/MemoryUsageSupport.h: (MemoryUsageSupport): provided embedders with a way to report WebKit process memory usage. * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::processMemorySizesInBytes): (WebCore): 2012-05-31 Kent Tamura <tkent@chromium.org> Unreviewed, rolling out r119062 and r119064. http://trac.webkit.org/changeset/119062 http://trac.webkit.org/changeset/119064 https://bugs.webkit.org/show_bug.cgi?id=87360 Broke build on Lion, SnowLoepard, Chromium Windows, and Chromium Linux 32 * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Removed. * platform/Decimal.h: Removed. 2012-05-31 Shane Stephens <shanestephens@google.com> text-decoration should not be propagated through absolutely positioned elements to <a> tags https://bugs.webkit.org/show_bug.cgi?id=86517 Reviewed by Darin Adler. Test: fast/css/text-decoration-in-second-order-descendants.html * rendering/RenderObject.cpp: (WebCore::RenderObject::getTextDecorationColors): Remove fix from 18611 as it doesn't work on second order descendants. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Add floating and positioned checks when deciding whether to avoid propagating text decoration. Move all checks into new method to improve readability. (WebCore::doesNotInheritTextDecoration): Added 2012-05-30 Yoshifumi Inoue <yosin@chromium.org> Build fix for Linon/SnowLeopard after r119062 * platform/Decimal.cpp: (WebCore::Decimal::Decimal): 2012-05-30 Yoshifumi Inoue <yosin@chromium.org> [Platform] Introduce Decimal class for Number/Range input type. https://bugs.webkit.org/show_bug.cgi?id=87360 Reviewed by Kent Tamura. This patch added new class Decimal for decimal arithmatic in two files: platform/Decimal.cpp and Decimal.h with unit test. Test: WebKit/chromium/tests/DecimalTest.cpp * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/Decimal.cpp: Added. (WebCore): (DecimalPrivate): (SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler): (WebCore::DecimalPrivate::SpecialValueHandler::handle): (WebCore::DecimalPrivate::SpecialValueHandler::value): (UInt128): (WebCore::DecimalPrivate::UInt128::UInt128): (WebCore::DecimalPrivate::UInt128::high): (WebCore::DecimalPrivate::UInt128::low): (WebCore::DecimalPrivate::UInt128::multiply): (WebCore::DecimalPrivate::UInt128::highUInt32): (WebCore::DecimalPrivate::UInt128::lowUInt32): (WebCore::DecimalPrivate::UInt128::isZero): (WebCore::DecimalPrivate::UInt128::makeUInt64): (WebCore::DecimalPrivate::UInt128::operator/=): (WebCore::DecimalPrivate::UInt128::multiplyHigh): (WebCore::DecimalPrivate::countDigits): (WebCore::DecimalPrivate::scaleDown): (WebCore::DecimalPrivate::scaleUp): (WebCore::Decimal::EncodedData::EncodedData): (WebCore::Decimal::EncodedData::operator==): (WebCore::Decimal::Decimal): (WebCore::Decimal::operator=): (WebCore::Decimal::operator+=): (WebCore::Decimal::operator-=): (WebCore::Decimal::operator*=): (WebCore::Decimal::operator/=): (WebCore::Decimal::operator-): (WebCore::Decimal::operator+): (WebCore::Decimal::operator*): (WebCore::Decimal::operator/): (WebCore::Decimal::operator==): (WebCore::Decimal::operator!=): (WebCore::Decimal::operator<): (WebCore::Decimal::operator<=): (WebCore::Decimal::operator>): (WebCore::Decimal::operator>=): (WebCore::Decimal::abs): (WebCore::Decimal::alignOperands): (WebCore::Decimal::ceiling): (WebCore::Decimal::compareTo): (WebCore::Decimal::floor): (WebCore::Decimal::fromString): (WebCore::Decimal::infinity): (WebCore::Decimal::nan): (WebCore::Decimal::remainder): (WebCore::Decimal::round): (WebCore::Decimal::toString): (WebCore::Decimal::zero): * platform/Decimal.h: Added. (WebCore): (DecimalPrivate): (Decimal): (EncodedData): (WebCore::Decimal::EncodedData::operator!=): (WebCore::Decimal::EncodedData::coefficient): (WebCore::Decimal::EncodedData::exponent): (WebCore::Decimal::EncodedData::isFinite): (WebCore::Decimal::EncodedData::isNaN): (WebCore::Decimal::EncodedData::isSpecial): (WebCore::Decimal::EncodedData::isZero): (WebCore::Decimal::EncodedData::sign): (WebCore::Decimal::EncodedData::setSign): (WebCore::Decimal::EncodedData::formatClass): (WebCore::Decimal::isFinite): (WebCore::Decimal::isNaN): (WebCore::Decimal::isNegative): (WebCore::Decimal::isPositive): (WebCore::Decimal::isSpecial): (WebCore::Decimal::isZero): (WebCore::Decimal::value): (AlignedOperands): (WebCore::Decimal::invertSign): (WebCore::Decimal::exponent): (WebCore::Decimal::sign): 2012-05-30 Patrick Gansterer <paroga@webkit.org> Build fix for WinCE after r116723. * platform/graphics/wince/FontWinCE.cpp: (WebCore::TextRunComponent::TextRunComponent): 2012-05-30 Kentaro Hara <haraken@chromium.org> Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y https://bugs.webkit.org/show_bug.cgi?id=87799 Reviewed by Darin Adler. As pointed out by darin@ in https://bugs.webkit.org/show_bug.cgi?id=87627#c12, we should avoid repeating the following code in CSSGrammar.y: if (p->m_styleSheet) $$->setTag(QualifiedName(namespacePrefix, $2, p->m_styleSheet->determineNamespace(namespacePrefix))); else $$->setTag(QualifiedName(namespacePrefix, $2, p->m_defaultNamespace)); This patch implements CSSParser::determineNameInNamespace() as a helper function and replaces the above code. Tests: fast/dom/SelectorAPI/*. No change in test results. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::determineNameInNamespace): (WebCore): * css/CSSParser.h: 2012-05-30 Patrick Gansterer <paroga@webkit.org> Build fix for WinCE after r117697. * page/wince/FrameWinCE.cpp: (WebCore::computePageRectsForFrame): 2012-05-30 Shawn Singh <shawnsingh@chromium.org> [chromium] Fix min/max bounds error in CCMathUtil.cpp https://bugs.webkit.org/show_bug.cgi?id=87915 Reviewed by James Robinson. Two unit tests added to CCMathUtilTest: CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds While computing bounds, the initial values for xmax and ymax are intended to be set to -float_max. It turns out that std::numeric_limits<float>::min() actually returns the smallest positive value close to zero, which is not what was intended. This patch fixes the code to use -float_max instead, which is the intended value. * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::computeEnclosingRectOfVertices): (WebCore::CCMathUtil::computeEnclosingClippedRect): (WebCore): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore): (CCMathUtil): 2012-05-30 Patrick Gansterer <paroga@webkit.org> Build fix for WinCE after r118568. * platform/text/wince/TextBreakIteratorWinCE.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): 2012-05-30 Abhishek Arya <inferno@chromium.org> Crash in ContainerNode::parserAddChild. https://bugs.webkit.org/show_bug.cgi?id=87903 Reviewed by Ryosuke Niwa. Call the ChildNodeInsertionNotifier.notify call at the end since it can destroy |this| and some of the local pointers like |last|. This also matches the order of calls - childrenChanged precedes ChildNodeInsertionNotifier.notify in updateTreeAfterInsertion and ContainerNode::parserInsertBefore. Also remove a FIXME since we use ChildNodeInsertionNotifier.notify instead of ChildNodeInsertionNotifier.notifyInsertedIntoDocument (as recommended in the FIXME). Test: fast/dom/child-insertion-notify-crash.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserAddChild): 2012-05-30 Rick Byers <rbyers@chromium.org> [chromium] Implement pointer and hover CSS media features https://bugs.webkit.org/show_bug.cgi?id=87403 Reviewed by Adam Barth. Add initial support for the pointer and hover media features as defined here: http://dev.w3.org/csswg/css4-mediaqueries/#pointer http://dev.w3.org/csswg/css4-mediaqueries/#hover For now this only supports the case where we know a touch screen is available (currently known only for the chromium port on certain platforms). All other cases continue to behave exactly as if the media feature isn't supported. Tests: fast/media/mq-pointer.html * css/CSSValueKeywords.in: * css/MediaFeatureNames.h: (MediaFeatureNames): * css/MediaQueryEvaluator.cpp: (WebCore::getLeastCapablePrimaryPointerDeviceType): (WebCore): (WebCore::hoverMediaFeatureEval): (WebCore::pointerMediaFeatureEval): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setDeviceSupportsTouch): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-30 Julien Chaffraix <jchaffraix@webkit.org> Add an helper function to get the style for a cell's flow computation https://bugs.webkit.org/show_bug.cgi?id=87902 Reviewed by Ojan Vafai. No expected change in behavior. This change introduces styleForCellFlow that unify which function we use to determine a cell's direction and writing mode. This unification will make it easier to support direction on table row group (section in WebKit land). * rendering/RenderTableCell.h: (WebCore::RenderTableCell::styleForCellFlow): Added the new function along with a comment as to its purpose. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::computeCollapsedStartBorder): (WebCore::RenderTableCell::computeCollapsedEndBorder): (WebCore::RenderTableCell::computeCollapsedBeforeBorder): (WebCore::RenderTableCell::computeCollapsedAfterBorder): (WebCore::RenderTableCell::borderHalfLeft): (WebCore::RenderTableCell::borderHalfRight): (WebCore::RenderTableCell::borderHalfTop): (WebCore::RenderTableCell::borderHalfBottom): (WebCore::RenderTableCell::borderHalfStart): (WebCore::RenderTableCell::borderHalfEnd): (WebCore::RenderTableCell::borderHalfBefore): (WebCore::RenderTableCell::borderHalfAfter): (WebCore::RenderTableCell::paintCollapsedBorders): Mostly mechanical replacement. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::cachedCollapsedLeftBorder): (WebCore::RenderTableCell::cachedCollapsedRightBorder): (WebCore::RenderTableCell::cachedCollapsedTopBorder): (WebCore::RenderTableCell::cachedCollapsedBottomBorder): Made the argument 'const' now. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): Added a FIXME to unify with the rest. 2012-05-30 Christophe Dumez <christophe.dumez@intel.com> [JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports https://bugs.webkit.org/show_bug.cgi?id=87118 Reviewed by Adam Barth. Make SerializedScriptValue.create() throw an exception if one of the MessagePort objects cannot be found in the transferred ports. This matches the behavior of the V8 implementation. Test: webintents/web-intents-obj-constructor.html * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): 2012-05-30 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call fileUtilities methods directly https://bugs.webkit.org/show_bug.cgi?id=87852 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): * platform/chromium/FileSystemChromium.cpp: (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::getFileMetadata): (WebCore::directoryName): (WebCore::pathByAppendingComponent): (WebCore::makeAllDirectories): (WebCore::openFile): (WebCore::closeFile): (WebCore::seekFile): (WebCore::truncateFile): (WebCore::readFromFile): (WebCore::writeToFile): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-30 Kent Tamura <tkent@chromium.org> Form controls in <fieldset disabled> should not be focusable. https://bugs.webkit.org/show_bug.cgi?id=87380 Reviewed by Darin Adler. Test: fast/forms/fieldset/focus-in-fieldset-disabled.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::supportsFocus): Refer to disabled() instead of m_disabled to take account of wrapping fieldset elements. 2012-05-30 Robin Dunn <robin@alldunn.com> [wx] Implement HTML clipboard support. https://bugs.webkit.org/show_bug.cgi?id=87883 Reviewed by Kevin Ollivier. * platform/wx/ClipboardWx.cpp: (WebCore::ClipboardWx::writeRange): * platform/wx/PasteboardWx.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::documentFragment): 2012-05-30 Garrett Casto <gcasto@chromium.org> TextFieldDecorationElement should respect style attribute https://bugs.webkit.org/show_bug.cgi?id=87762 Reviewed by Kent Tamura. * html/shadow/TextFieldDecorationElement.cpp: Use style set on the Element when creating rendering style. (WebCore::TextFieldDecorationElement::customStyleForRenderer): 2012-05-30 Ojan Vafai <ojan@chromium.org> Avoid second layout for flex-direction:row, flex-basis:auto flex items https://bugs.webkit.org/show_bug.cgi?id=87901 Reviewed by Tony Chang. No new tests. This is strictly a performance optimization and has no other web visible changes. Also, add FIXMEs for other cases where we could avoid doing layouts. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): 2012-05-30 Zhenyao Mo <zmo@google.com> WebKit incorrectly clears the alpha channel on readPixels, even for Framebuffers https://bugs.webkit.org/show_bug.cgi?id=87310 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::getParameter): set DEPTH_BITS/STENCIL_BITS to 0 if related channels are not requested. (WebCore::WebGLRenderingContext::readPixels): don't do the alpha value fix if the current bound is not the internal drawing buffer. 2012-05-30 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118986. http://trac.webkit.org/changeset/118986 https://bugs.webkit.org/show_bug.cgi?id=87914 Caused several IndexedDB browser_test failures on Chromium canary builders (Requested by rafaelw_ on #webkit). * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (IDBDatabaseError): (WebCore::IDBDatabaseError::createWithoutOffset): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::setCode): (WebCore::IDBDatabaseError::setMessage): (WebCore::IDBDatabaseError::IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::IDBDatabaseException::initializeDescription): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-30 Dominic Mazzoni <dmazzoni@chromium.org> [Chromium] AX: WebAccessibilityObject should check if an AccessibilityObject is detached https://bugs.webkit.org/show_bug.cgi?id=87778 Reviewed by Adam Barth. Chromium was never actually using AccessibilityObjectWrapper, so this change deletes it. Instead, it's replaced with a simple bool that keeps track of whether an AccessibilityObject was detached or not. WebKit/chromium/public/WebAccessibilityObject can then use this to determine if an object is still valid. Test: accessibility/accessibility-object-detached.html * WebCore.gypi: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::AccessibilityObject): (WebCore::AccessibilityObject::detach): (WebCore::AccessibilityObject::isDetached): (WebCore): * accessibility/AccessibilityObject.h: (AccessibilityObject): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore): (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): * accessibility/chromium/AccessibilityObjectWrapper.h: Removed. 2012-05-30 Shawn Singh <shawnsingh@chromium.org> Simplify TransformationMatrix rotation code to improve precision https://bugs.webkit.org/show_bug.cgi?id=86666 Reviewed by Adrienne Walker. Change covered by existing layout tests; Additional unit tests added. The original rotation code for WebCore::TransformationMatrix was using indirect trig identities to compute basic rotation matrices. As far as I can imagine, this is unnecessary, and brief informal experiments showed that we can gain a few extra bits of precision by avoiding that indirection. Indeed, precision improved such that it revealed a mistake on one of the unit tests, where the test was actually degenerate so that the layer was aligned with a viewport boundary. When it was imprecise, it didnt appear to be aligned. Putting an additional translation on that test fixes it so it is no longer a degenerate test. This patch also revealed a few chinks in the unit testing armor of this code, an error that should have been caught in unit tests was luckily caught by SVG layout tests. This chink is fixed by adding 2 extra unit tests. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::rotate3d): 2012-05-30 Alec Flett <alecflett@chromium.org> IndexedDB: Remove old get/getKey implementations https://bugs.webkit.org/show_bug.cgi?id=87879 Reviewed by Ojan Vafai. Removal of dead code, was scaffolding for a complicated Chromium landing. * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::getKeyInternal): (WebCore::IDBIndexBackendImpl::get): (WebCore::IDBIndexBackendImpl::getKey): * Modules/indexeddb/IDBIndexBackendImpl.h: (IDBIndexBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::getInternal): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-05-30 Joe Mason <jmason@rim.com> [BlackBerry] Fix assertion fail on redirect due to multiple jobs per handle https://bugs.webkit.org/show_bug.cgi?id=87579 Reviewed by George Staikos. RIM PR #158892: When we start a redirect, we now call cancelJob instead of just deleting it immediately to make sure that all cleanup is performed. However, we also reassign the ResourceHandle to the new job, and since cancelJob is asynchronous it is now assigned to two jobs simultaneously. Work around this by only returning handles that have not been cancelled from findJobForHandle. Cancelled jobs still technically exist in the jobs list, but they're invisible to callers. This is safe because there is literally nothing that can be done with a cancelled job - it is supposed to merely consume any notifications that are already in progress and then kill itself off - so no callers of findJobForHandle are expecting a cancelled job. (All existing callers call methods on the returned job which are no-ops for cancelled jobs, so there is no behaviour change.) No new tests because there is no behaviour change (fixes a regression). * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::findJobForHandle): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8][Performance] Optimize DOM attribute getters that return an empty string https://bugs.webkit.org/show_bug.cgi?id=87820 Reviewed by Adam Barth. This patch optimizes the performance of DOM attribute getters that return an empty string by 65.8% (e.g. div.id, div.className, div.title, div.lang ...etc) Performance test: Bindings/undefined-id-getter.html [Without the patch] RESULT Bindings: undefined-id-getter= 441.984669644 runs/s median= 445.544554455 runs/s, stdev= 11.8406070959 runs/s, min= 405.063291139 runs/s, max= 447.204968944 runs/s [With the patch] RESULT Bindings: undefined-id-getter= 738.840460474 runs/s median= 738.786279683 runs/s, stdev= 2.00249797161 runs/s, min= 733.944954128 runs/s, max= 741.721854305 runs/s - This patch passes Isolate to v8::String::Empty(), which removes Isolate look-up inside v8::String::Empty(). - This patch inlines V8Binding::getElementStringAttr() and V8Binding::setElementStringAttr(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): * bindings/v8/V8Binding.cpp: (WebCore::StringCache::v8ExternalStringSlow): * bindings/v8/V8Binding.h: (WebCore::StringCache::v8ExternalString): (StringCache): (WebCore::v8ExternalString): (WebCore): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8] Implement V8Binding::v8BooleanWithCheck(isolate) https://bugs.webkit.org/show_bug.cgi?id=87814 Reviewed by Adam Barth. The objective is to pass Isolate to v8::True() and v8::False(). Similarly to v8NullWithCheck() (bug 87713), this patch implements V8Binding::v8BooleanWithCheck(isolate), which calls v8::True()/v8::False() or v8::True(isolate)/v8::False(isolate) depending on whether the passed isolate is null or not. This patch also passes Isolate to v8Boolean() in CodeGeneratorV8.pm. No tests. No behavior change. * bindings/scripts/CodeGeneratorV8.pm: (NativeToJSValue): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::TestEventTargetV8Internal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::createAttrGetter): (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetter): (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter): * bindings/v8/V8Binding.h: (WebCore::v8Boolean): (WebCore): (WebCore::v8BooleanWithCheck): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::True() and v8::False() with v8Boolean() https://bugs.webkit.org/show_bug.cgi?id=87812 Reviewed by Adam Barth. To avoid implementing all of v8TrueWithCheck(isolate), v8FalseWithCheck(isolate) and v8BooleanWithCheck(isolate), we can first replace v8::True() and v8::False() with v8Boolean(). Then we can just implement v8BooleanWithCheck(isolate). No tests. No change in behavior. * bindings/v8/SerializedScriptValue.cpp: * bindings/v8/V8Binding.h: (WebCore::v8StringOrFalse): * bindings/v8/V8NPUtils.cpp: (WebCore::convertNPVariantToV8Object): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyDeleter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): * bindings/v8/custom/V8StorageCustom.cpp: (WebCore::storageDeleter): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0 https://bugs.webkit.org/show_bug.cgi?id=87807 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch replaces v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0. 'where isolate can be 0' means all the places where we cannot retrieve Isolate directly from AccessorInfo or Arguments. No tests. No behavior change. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Null() with v8::Null(isolate) or v8NullWithCheck(isolate) in non-custom bindings https://bugs.webkit.org/show_bug.cgi?id=87810 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. For non-custom bindings, we replace v8::Null() with v8::Null(isolate) where isolate cannot be 0, and replace v8::Null() with v8NullWithCheck(isolate) where isolate can be 0. This will be the final patch for passing Isolate to v8::Null(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::contentDocumentAttrGetter): (WebCore::TestObjV8Internal::getSVGDocumentCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserialize): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): 2012-05-30 Kentaro Hara <haraken@chromium.org> [V8] Replace v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0 https://bugs.webkit.org/show_bug.cgi?id=87809 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch replaces v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0. 'where isolate shouldn't be 0' is the place where isolate is retrieved directly from AccessorInfo and Arguments. This patch includes a couple of refactorings: - Makes V8DeviceMotionEvent::createAccelerationObject() and V8DeviceMotionEvent::createRotationRateObject() static - Moves V8HTMLElement::toV8Object() into the existing ENABLE(MICRODATA) flag. No tests. No change in behavior. * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAccessorGetter): (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter): (WebCore::V8Coordinates::headingAccessorGetter): (WebCore::V8Coordinates::speedAccessorGetter): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter): (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter): (WebCore::V8DeviceMotionEvent::intervalAccessorGetter): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter): (WebCore::V8DeviceOrientationEvent::betaAccessorGetter): (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter): (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8): (WebCore): (WebCore::toV8Object): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): 2012-05-30 Nico Weber <thakis@chromium.org> Make the files attribute of HTMLInputElement writable https://bugs.webkit.org/show_bug.cgi?id=87154 Reviewed by Adam Barth. whatwg thread: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/036140.html * bindings/objc/PublicDOMInterfaces.h: Remove readonly on files property. * html/FileInputType.cpp: (FileInputType): Add a NULL check to setFiles(). * html/FileInputType.h: (FileInputType): Let setFiles() overwrite the base class's method. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setFiles): Add setFiles() implementation, delegate to input type. * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLInputElement.idl: * html/InputType.cpp: (WebCore::InputType::setFiles): setFiles() does nothing by default. * html/InputType.h: (InputType): Add a virtual setFiles() method. 2012-05-30 Joe Mason <jmason@rim.com> [BlackBerry] Remove useless string->char*->string conversion in NetworkJob. https://bugs.webkit.org/show_bug.cgi?id=87861 Reviewed by Antonio Gomes. RIM PR #152383: username is a WTF::String. ResourceHandleInternal::m_user is a string. Yet they're assigned with "username = m_user.utf8().data()". Pointless: "username = m_user" will do. No new tests since there is no behaviour change. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-05-30 Dan Bernstein <mitz@apple.com> [Qt] REGRESSION(r118568): It broke fast/forms/textarea-maxlength.html on Qt 4.8 https://bugs.webkit.org/show_bug.cgi?id=87740 Reviewed by Darin Adler. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use the return value of setUpIterator. 2012-05-30 Zeno Albisser <zeno@webkit.org> GraphicsSurface: allow importing and exporting of textures directly on GPU side. https://bugs.webkit.org/show_bug.cgi?id=87725 Add copyFromFramebuffer function to copy a texture from an FBO onto the GraphicsSurface. Add getTextureID function to export the texture ID. This allows binding/blitting the texture directly on the GPU. Reviewed by Noam Rosenthal. * platform/graphics/surfaces/GraphicsSurface.cpp: (WebCore::GraphicsSurface::getTextureID): (WebCore): (WebCore::GraphicsSurface::copyFromFramebuffer): * platform/graphics/surfaces/GraphicsSurface.h: (GraphicsSurface): * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformGetTextureID): (WebCore): (WebCore::GraphicsSurface::platformCopyFromFramebuffer): 2012-05-30 Alec Flett <alecflett@chromium.org> IndexedDB: Implement IDBTransaction.error and IDBRequest.error https://bugs.webkit.org/show_bug.cgi?id=87865 Reviewed by Tony Chang. Added "error" attribute to IDBRequest and IDBTransaction. Update IDBDatabaseError to honor the IDBDatabaseException behavior of dealing with IDB-specific throws of DOMException codes, as per the spec. Existing tests which previously tested 'errorCode' and 'webkitErrorMessage' have been updated to use the new attribute. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::advance): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::setVersion): * Modules/indexeddb/IDBDatabaseError.h: (WebCore::IDBDatabaseError::create): (WebCore::IDBDatabaseError::code): (WebCore::IDBDatabaseError::idbCode): (WebCore::IDBDatabaseError::name): (WebCore::IDBDatabaseError::IDBDatabaseError): (IDBDatabaseError): * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore): (WebCore::getErrorEntry): (WebCore::IDBDatabaseException::initializeDescription): (WebCore::IDBDatabaseException::getErrorName): (WebCore::IDBDatabaseException::getLegacyErrorCode): * Modules/indexeddb/IDBDatabaseException.h: (IDBDatabaseException): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::error): (WebCore): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::onSuccessWithContinuation): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (IDBRequest): * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::error): (WebCore): (WebCore::IDBTransaction::setError): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-30 Allan Sandfeld Jensen <allan.jensen@nokia.com> [Qt] ImageDecoderQt doesn't support some decoders. https://bugs.webkit.org/show_bug.cgi?id=87851 Reviewed by Kenneth Rohde Christiansen. If forced to decode GIF and JPEG, ImageDecoderQt show several artifacts. This is caused by mismatched decoded image-formats. Convert mismatched color spaces into ARGB color space, and perform manual mem-copy when the image has been decoded into a new buffer. This patch also add support for down-scaling in the decoder. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::internalDecodeSize): (WebCore::ImageDecoderQt::internalHandleCurrentImage): 2012-05-30 Emil A Eklund <eae@chromium.org> Floats wraps incorrectly when top edge has subpixel precision https://bugs.webkit.org/show_bug.cgi?id=87688 Reviewed by Levi Weintraub. When computing the logical left and right offsets for a float we incorrectly floored the logical top when passing it to the float search adapter. This caused it to return incorrect values where the floored and pixel snapped values are not the same. Test: fast/sub-pixel/float-wrap-with-subpixel-top.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): 2012-05-30 Emil A Eklund <eae@chromium.org> Inline blocks with margin wrap incorrectly with subpixel layout turned on https://bugs.webkit.org/show_bug.cgi?id=87897 Reviewed by Levi Weintraub. Change WebCore::getBorderPaddingMargin and the helper function getBPMWidth to return a LayoutUnit rather than an int as the padding and margin values have subpixel precision. This fixes an issue where we would incorrectly wrap inline blocks with a subpixel padding or margin. Test: fast/sub-pixel/inline-block-with-margin.html * rendering/RenderBlock.cpp: (WebCore::getBPMWidth): (WebCore::getBorderPaddingMargin): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): 2012-05-30 Tony Chang <tony@chromium.org> rename flexbox css values from justify and distribute to space-between and space-around https://bugs.webkit.org/show_bug.cgi?id=87867 Reviewed by Ojan Vafai. This was recently changed in the spec: http://dev.w3.org/csswg/css3-flexbox/#justify-content No new tests, updated existing tests and expectations. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexPack): (WebCore::CSSPrimitiveValue::operator EFlexLinePack): * css/CSSValueKeywords.in: * rendering/RenderFlexibleBox.cpp: (WebCore::initialPackingOffset): (WebCore::packingSpaceBetweenChildren): (WebCore::initialLinePackingOffset): (WebCore::linePackingSpaceBetweenChildren): * rendering/style/RenderStyleConstants.h: 2012-05-30 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Make sure we get the file size with the proper native type. * platform/wx/FileSystemWx.cpp: (WebCore::getFileMetadata): 2012-05-30 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118913. http://trac.webkit.org/changeset/118913 https://bugs.webkit.org/show_bug.cgi?id=87891 patch is incorrect (see comments in https://bugs.webkit.org/show_bug.cgi?id=87889) (Requested by thorton on #webkit). * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::addSubresourceStyleURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSValue.cpp: (WebCore::CSSValue::addSubresourceStyleURLs): * css/CSSValue.h: (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::addSubresourceStyleURLs): * css/CSSValueList.h: (CSSValueList): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::addSubresourceStyleURLs): * css/StylePropertySet.h: (StylePropertySet): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::addSubresourceStyleURLs): * css/StyleSheetContents.h: (StyleSheetContents): * dom/Element.h: * dom/Node.cpp: (WebCore::Node::getSubresourceURLs): * dom/Node.h: (WebCore::Node::addSubresourceAttributeURLs): (WebCore): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::addSubresourceAttributeURLs): * dom/ProcessingInstruction.h: (ProcessingInstruction): * dom/StyledElement.cpp: (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (StyledElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::addSubresourceAttributeURLs): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::addSubresourceAttributeURLs): * html/HTMLParamElement.h: (HTMLParamElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableElement.h: (HTMLTableElement): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::addSubresourceAttributeURLs): * svg/SVGCursorElement.h: (SVGCursorElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::addSubresourceAttributeURLs): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::addSubresourceAttributeURLs): * svg/SVGScriptElement.h: (SVGScriptElement): 2012-05-30 Shezan Baig <shezbaig.wk@gmail.com> Rename offsetTopLeft in RenderBoxModelObject to something better https://bugs.webkit.org/show_bug.cgi?id=85915 Reviewed by Darin Adler. Renamed offsetTopLeft in RenderBoxModelObject to adjustedPositionRelativeToOffsetParent, because it returns the given startPoint after adjusting it to be relative to the top-left corner of the offsetParent. The definition of offsetParent itself is non-trivial and is documented within the body of RenderObject::offsetParent, therefore I decided to reuse this term, as-is, in the name of this function. No new tests; no functional or visible changes. * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetLeft): (WebCore::RenderBox::offsetTop): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent): (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetLeft): (WebCore::RenderInline::offsetTop): 2012-05-29 Adrienne Walker <enne@google.com> Transformed fixed position layers have an incorrect overlap map entry https://bugs.webkit.org/show_bug.cgi?id=64201 Reviewed by Darin Adler. Previously, layers that both had a transform and were fixed position were not considered as being fixed position in RenderGeometryMap or in RenderBox::mapLocalToContainer (although this case is not incorrect in the case of painting, so an external caller likely adjusts for this). Tests: compositing/layer-creation/fixed-position-and-transform.html compositing/layer-creation/fixed-position-under-transform.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::mapToAbsolute): 2012-05-30 Ulan Degenbaev <ulan@chromium.org> [v8] Crash after redefining setter on typed array to a number https://bugs.webkit.org/show_bug.cgi?id=87862 Reviewed by Kenneth Russell. Remove calls to typed array set() method from C++. Store the copying script as a hidden property of a typed array prototype. Test: fast/canvas/webgl/array-override-set.html * bindings/v8/custom/V8ArrayBufferViewCustom.cpp: (WebCore): (WebCore::getHiddenCopyMethod): (WebCore::installHiddenCopyMethod): (WebCore::copyElements): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore): (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8ArrayBufferViewCustomScript.js: 2012-05-30 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87882 [New Multicolumn] Rename layoutColumns to relayoutForPagination and make it virtual so that it can be implemented by RenderMultiColumnBlock. Reviewed by Anders Carlsson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::relayoutForPagination): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::relayoutForPagination): (WebCore): * rendering/RenderMultiColumnBlock.h: (RenderMultiColumnBlock): 2012-05-30 Daniel Drake <dsd@laptop.org> Check for GTK2/GTK3 symbol mismatch earlier https://bugs.webkit.org/show_bug.cgi?id=87687 Reviewed by Martin Robinson. No new tests. Regressions in core behavior are covered by existing plugin tests and the fix deals with particular aspects of the system environment that are difficult to test. Detect plugins that would mix GTK+ symbols earlier, so that the WebKit can skip them and choose a more appropriate plugin module. * plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk. (WebCore::moduleMixesGtkSymbols): (WebCore::PluginPackage::load): * plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk. (WebCore::PluginView::platformStart): 2012-05-30 Allan Sandfeld Jensen <allan.jensen@nokia.com> [Qt] Support IMAGE_DECODER_DOWN_SAMPLING flag. https://bugs.webkit.org/show_bug.cgi?id=87840 Based on patches by Qi Zhang and Jussi Lehto. Reviewed by Kenneth Rohde Christiansen. * platform/graphics/Image.cpp: (WebCore::Image::adjustSourceRectForDownSampling): * platform/graphics/Image.h: (Image): * platform/graphics/openvg/ImageOpenVG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/ImageQt.cpp: (WebCore::Image::drawPattern): (WebCore::BitmapImage::draw): 2012-05-30 Shinya Kawanaka <shinyak@chromium.org> comparePositions in htmlediting should consider nested Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87623 Reviewed by Ryosuke Niwa. comparePositions in htmlediting.cpp didn't consider nested Shadow DOM. This patch makes it possible to compare the nodes in nested Shadow DOM. The algorithm is: we calculate the common tree scope of node A and B, and adjust the nodes to the treeScope, then compare them. If the adjusted nodes are the same, we check the shadow descendent of each node. Test: editing/shadow/compare-positions-in-nested-shadow.html * dom/TreeScope.cpp: (WebCore::listTreeScopes): (WebCore): (WebCore::commonTreeScope): * dom/TreeScope.h: (WebCore): * editing/htmlediting.cpp: (WebCore::comparePositions): 2012-05-30 Erik Arvidsson <arv@chromium.org> [V8] Clean up V8LazyEventListener to use one less function call https://bugs.webkit.org/show_bug.cgi?id=87785 Reviewed by Kentaro Hara. Instead of relying on 'arguments' we rely on 'this'. 'this' cannot be intercepted by a with-statement so it is safe to use that to bind the context objects. This allows us to remove one layer of function indirection in the generated code. Covered by existing tests. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): 2012-05-30 Tim Horton <timothy_horton@apple.com> Factor DeferrableOneShotTimer out of GraphicsContextCG/GeneratorGeneratedImage https://bugs.webkit.org/show_bug.cgi?id=87824 Reviewed by Simon Fraser. DeferrableOneShotTimer is a timer which takes a class and method to call (as Timer does), and a delay. It exposes restart(), stop(), and isActive(), and none of the rest of the TimerBase interface. On restart(), the timer is started with the given delay, unless it's already running, in which case a flag is set to automatically restart the timer when it fires instead of calling the given method. This provides a low-overhead way to implement a deferrable timer. No new tests, refactoring. * platform/Timer.h: (DeferrableOneShotTimer): (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): New class. (WebCore::DeferrableOneShotTimer::restart): (WebCore::DeferrableOneShotTimer::fired): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::invalidateCacheTimerFired): * platform/graphics/GeneratorGeneratedImage.h: (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage): Make use of DeferrableOneShotTimer. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer): Make use of DeferrableOneShotTimer. (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired): 2012-05-30 Xueqing Huang <huangxueqing@baidu.com> eventSender.beginDragWithFiles should be implemented in Windows, which blocked drag and drop related tests. https://bugs.webkit.org/show_bug.cgi?id=86296 Reviewed by Tony Chang. Test: This change was requirement for eventSender.beginDragWithFiles, update win/Skipped file to remove drag and drop related tests will valiate it. * platform/win/DragDataWin.cpp: (WebCore::DragData::numberOfFiles): 2012-05-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> HashTable.h has using directives for std::pair and std::make_pair https://bugs.webkit.org/show_bug.cgi?id=29919 Reviewed by Darin Adler. Change code to use std::pair and std::make_pair. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::postNotification): * html/MediaFragmentURIParser.cpp: (WebCore::MediaFragmentURIParser::parseFragments): * html/parser/HTMLMetaCharsetParser.cpp: (WebCore::HTMLMetaCharsetParser::processMeta): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): * page/PageSerializer.cpp: (WebCore::isCharsetSpecifyingNode): 2012-05-30 Peter Rybin <peter.rybin@gmail.com> Web Inspector: disable ExactlyInt feature in InspectorTypeBuilder since it breaks release Windows 7 WK2 https://bugs.webkit.org/show_bug.cgi?id=87857 Reviewed by Yury Semikhatsky. Code generator is patched to support old style of int parameter. * inspector/CodeGeneratorInspector.py: (TypeModel.init_class): 2012-05-30 Alexei Filippov <alexeif@chromium.org> Web Inspector: Add trace() method to the WorkerConsole https://bugs.webkit.org/show_bug.cgi?id=87656 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived): * inspector/front-end/HeapSnapshotWorker.js: (WebInspector.WorkerConsole.prototype.trace): 2012-05-30 Kinuko Yasuda <kinuko@chromium.org> File.lastModifiedDate must return null if the modified time info is not available https://bugs.webkit.org/show_bug.cgi?id=87709 Reviewed by Kentaro Hara. Per File API spec, File.lastModifiedDate must return null if the modified time info is not available. http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::lastModifiedDateForBinding): Added. (WebCore): * fileapi/File.h: (File): * fileapi/File.idl: Added ImplementedAs=lastModifiedDateForBinding. 2012-05-30 Jochen Eisinger <jochen@chromium.org> Match Firefox restrictions to window.blur and window.focus https://bugs.webkit.org/show_bug.cgi?id=86969 Reviewed by Adam Barth. Disallow window.blur altogether, and only allow window.focus to be invoked from the context that created this very window. There's a new setting (windowFocusRestricted) that defaults to true. If false, the new restrictions are lifted. This can be used by ports that would prefer to stick with the old behavior. For tests, this setting is accessible in window.internals.settings To temporarily allow window.focus(), an object of type WindowFocusAllowedIndicator can be created. It is currently used to enable window.focus() during dispatch of the click event for notifications. Tests: fast/dom/Window/mozilla-focus-blur.html fast/notifications/notifications-click-event-focus.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * notifications/Notification.cpp: (WebCore::Notification::dispatchClickEvent): * page/DOMWindow.cpp: (WebCore::DOMWindow::focus): (WebCore::DOMWindow::blur): * page/DOMWindow.h: (DOMWindow): * page/DOMWindow.idl: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): (WebCore::Settings::setWindowFocusRestricted): (WebCore::Settings::windowFocusRestricted): * page/WindowFocusAllowedIndicator.cpp: Added. (WebCore): (WebCore::WindowFocusAllowedIndicator::windowFocusAllowed): (WebCore::WindowFocusAllowedIndicator::WindowFocusAllowedIndicator): (WebCore::WindowFocusAllowedIndicator::~WindowFocusAllowedIndicator): * page/WindowFocusAllowedIndicator.h: Added. (WebCore): (WindowFocusAllowedIndicator): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setWindowFocusRestricted): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-30 Mariusz Grzegorczyk <mariusz.g@samsung.com>, Ryuan Choi <ryuan.choi@samsung.com> [EFL][WK2] Fix WebKit2-EFL build https://bugs.webkit.org/show_bug.cgi?id=83693 Reviewed by Carlos Garcia Campos. * CMakeLists.txt: Add GestureTapHighlighter.cpp. 2012-05-29 Antti Koivisto <antti@apple.com> Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs https://bugs.webkit.org/show_bug.cgi?id=87739 Rubber-stamped by Andreas Kling. Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match the naming conventions. Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::collectSubresourceURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::collectSubresourceURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::collectSubresourceURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSValue.cpp: (WebCore::CSSValue::collectSubresourceURLs): * css/CSSValue.h: (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::collectSubresourceURLs): * css/CSSValueList.h: (CSSValueList): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::collectSubresourceURLs): * css/StylePropertySet.h: (StylePropertySet): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::collectSubresourceURLs): * css/StyleSheetContents.h: (StyleSheetContents): * dom/Element.h: (WebCore::Element::collectSubresourceURLsFromAttributes): (Element): * dom/Node.cpp: (WebCore::Node::getSubresourceURLs): * dom/Node.h: (WebCore): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes): * dom/ProcessingInstruction.h: (ProcessingInstruction): * dom/StyledElement.cpp: (WebCore::StyledElement::collectSubresourceURLsFromAttributes): * dom/StyledElement.h: (StyledElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes): * html/HTMLParamElement.h: (HTMLParamElement): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes): * html/HTMLTableElement.h: (HTMLTableElement): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes): * svg/SVGCursorElement.h: (SVGCursorElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::collectSubresourceURLsFromAttributes): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes): * svg/SVGScriptElement.h: (SVGScriptElement): 2012-05-30 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Fix JS compiler warning https://bugs.webkit.org/show_bug.cgi?id=87836 Reviewed by Yury Semikhatsky. * inspector/front-end/SettingsScreen.js: Fix method annotation. 2012-05-30 Zoltan Horvath <zoltan@webkit.org> [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder https://bugs.webkit.org/show_bug.cgi?id=80400 This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder. The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support the requested image type. The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed. This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages, because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config tests for these libraries were introduced in r110045. Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark (collection of popular sites, page-loading benchmark) with this patch. Reviewed by Simon Hausmann. No new tests needed. * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources. * WebCore.pri: Move WebCore ImageDecoder include paths out of guards. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types. (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types. * platform/graphics/ImageSource.cpp: Remove unnecessary includes. * platform/graphics/ImageSource.h: Remove unnecessary typedefs. (WebCore): * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed. (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon. (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap. (WebCore): (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp. * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header. (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform. * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes. (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed. (ImageFrame): * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to ImageDecoderQt.cpp. 2012-05-23 Kinuko Yasuda <kinuko@chromium.org> REGRESSION: We should allow null modificationTime when snapshot metadata is given https://bugs.webkit.org/show_bug.cgi?id=86811 Reviewed by Jian Li. r117432 has introduced a new File constructor which allows the caller to pass in a snapshot file metadata. In the change we had considered the given metadata is valid if "metadata.length >= 0 AND metadata.lastModifiedDate != 0", but we should drop the latter condition (lastModifiedDate != 0) because 1. the value 0 is used to indicate the time information is unavailable in File, and 2. it is valid per spec (http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate says the UA must return null if the information is not available). (Note: the current js/v8 binding returns Date(0) for the time value 0, which is still valid as epoch time but would fail to indicate the unavailability of the information. In this patch I added FIXME in File.idl and filed a separate issue http://webkit.org/b/87709) No new tests as this change does not affect regular files/filesystems behavior. (Tests in Chrome OS port should be able to verify this) * fileapi/File.cpp: (WebCore::File::lastModifiedDate): (WebCore::File::size): (WebCore::File::captureSnapshot): * fileapi/File.h: (File): 2012-05-30 MORITA Hajime <morrita@google.com> [Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible. https://bugs.webkit.org/show_bug.cgi?id=87818 Reviewed by Kentaro Hara. Added them as DOMWindow properties Tests: fast/dom/shadow/content-element-api.html fast/dom/shadow/shadow-element.html * page/DOMWindow.idl: 2012-05-30 Mike Lawther <mikelawther@chromium.org> CSS3 calc: Implement CSSOM support https://bugs.webkit.org/show_bug.cgi?id=84551 Reviewed by Ryosuke Niwa. Adds a pretty printer for the calc expression tree. Test: css3/calc/cssom.html * css/CSSCalculationValue.cpp: (WebCore::CSSCalcValue::customCssText): (WebCore::CSSCalcPrimitiveValue::customCssText): (WebCore::CSSCalcBinaryOperation::customCssText): (CSSCalcBinaryOperation): * css/CSSCalculationValue.h: (CSSCalcExpressionNode): 2012-05-29 Li Yin <li.yin@intel.com> [FileAPI] The result attribute of FileReader shuold use null to replace empty string https://bugs.webkit.org/show_bug.cgi?id=87578 Reviewed by Jian Li. Spec: http://www.w3.org/TR/FileAPI/#dfn-result If the readyState is EMPTY (no read method has been called) or an error in reading the File or Blob has occurred (using any read method), then the result attribute MUST return null. Currently, Firefox11, Opera and IE 10 follows the spec, but Webkit based browser doesn't. WebKit should change the returned value empty string into null to keep conformance with the spec. Tests: fast/files/read-file-async.html fast/files/workers/worker-read-file-async.html * fileapi/FileReader.cpp: (WebCore::FileReader::arrayBufferResult): (WebCore::FileReader::stringResult): 2012-05-29 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Move fileExists to Platform.h https://bugs.webkit.org/show_bug.cgi?id=87531 Reviewed by Adam Barth. Call fileExists through fileUtilities(), not directly. * platform/chromium/FileSystemChromium.cpp: (WebCore::fileExists): 2012-05-29 Kentaro Hara <haraken@chromium.org> Remove a dummy style sheet from CSSParser::parseFlowThread() https://bugs.webkit.org/show_bug.cgi?id=87715 Reviewed by Darin Adler. r118736 changed CSSGrammar.y so that it works fine with no style sheet. r118736 removed a dummy style sheet from CSSParser::parserSelector(). Now we can safely remove a dummy style sheet from parserFlowThread(). Tests: fast/regions. No change in test results. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlowThread): 2012-05-29 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled https://bugs.webkit.org/show_bug.cgi?id=87719 Reviewed by Kent Tamura. This patch added checking of "option" element for CSS pseudo class :enabled as same as :disabled to selector checker. Before r111497, it was done by using isFormControlElement. After that revision, HTMLOptionElement was no longer derived from HTMLFormControlElement. Test: fast/form/select/optgroup-rendering.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Checking element is option element as same as PseudoDisabled in PseudoEnabled case. 2012-05-29 Hayato Ito <hayato@chromium.org> Introduces ComposedShadowTreeParentWalker, extracted from ComposedShadowTreeWalker. https://bugs.webkit.org/show_bug.cgi?id=87004 Reviewed by Dimitri Glazkov. Introduces a ComposedShadowTreeParentWalker, which is only used for traversing a parent node (including shadow roots and insertion points) and get rid of an equivalent function from ComposedShadowTreeWalker. Before this patch, there is an inconsistency inside of ComposedShadowTreeWalker. The Walker uses 'Policy' to decide whether it should visit shadow roots or not, but parentIncludingInsertionPointAndShadowRoot() member function ignores the policy. We can not add an assertion in its constructor due to this inconsistency. To resolve it, we could add yet another special policy, but that makes the implementation complex and may add some overhead in runtime. So separate the functionality into another class as ComposedShadowTreeParentWalker. No new tests, no new functionality except for assertion. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeParentWalker::ComposedShadowTreeParentWalker): (WebCore): (WebCore::ComposedShadowTreeParentWalker::parentIncludingInsertionPointAndShadowRoot): (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeWalker): (WebCore::ComposedShadowTreeWalker::assertPrecondition): (WebCore): (ComposedShadowTreeParentWalker): (WebCore::ComposedShadowTreeParentWalker::get): * dom/EventDispatcher.cpp: (WebCore::EventRelatedTargetAdjuster::adjust): (WebCore::EventDispatcher::ensureEventAncestors): * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): 2012-05-29 Hayato Ito <hayato@chromium.org> Add assertions to make sure that event's target and relatedTarget are accessible. https://bugs.webkit.org/show_bug.cgi?id=87641 Reviewed by Dimitri Glazkov. No new tests. No new functionality except for assertions. * dom/EventContext.cpp: (WebCore::EventContext::EventContext): * dom/EventContext.h: (WebCore): (EventContext): (WebCore::EventContext::setRelatedTarget): (WebCore::EventContext::accessible): 2012-05-29 Kent Tamura <tkent@chromium.org> Fix inefficient usage of traverseNextNode() https://bugs.webkit.org/show_bug.cgi?id=87804 Reviewed by Ryosuke Niwa. foo->traverseNextNode(foo) is equivalent to foo->firstChild(), and firstChild() is more efficient. No new tests because of no behavior change. * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder): Replace traverseNextNode() with firstChild(), and shorten a variable name. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): Replace traverseNextNode() with firstChild(). 2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] Loading media data with http authentication https://bugs.webkit.org/show_bug.cgi?id=84214 Reviewed by George Staikos. RIM PR: 117618 Implemented http authentication feature for media by implementing two interface functions in class MediaPlayerPrivate: onAuthenticationNeeded(): this function is triggered when MMR engine requires http authentication. We search the CredentialStorage to see if we have already stored existing credential information, or challenge user to provide it. OnAuthenticationAccepted(): this function is triggered when MMR engine accepts the credential information, and we need to save it in CredentialStorage for later use. Internally reviewed by Max Feil <mfeil@qnx.com>. Manual test case: blackberry/video-load-with-authentication.html * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::generateProtectionSpaceFromMMRAuthChallenge): (WebCore): (WebCore::MediaPlayerPrivate::onAuthenticationNeeded): (WebCore::MediaPlayerPrivate::onAuthenticationAccepted): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: (MediaPlayerPrivate): 2012-05-29 MORITA Hajime <morrita@google.com> [Shadow DOM] Node distribution should be orthogonal from node attachment https://bugs.webkit.org/show_bug.cgi?id=87223 Reviewed by Dimitri Glazkov. This chagne reorganizes Shadow DOM subtree distribution implementation. Originally, it was interleaved across attach() of several classes like InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of the style recalculation and detach()-es. This change extracts these bits of code to a set of ContentDistributor methods, which are facaded by two ElementShadow API. Following two API are the primary entry points: - ElementShadow::ensureDistribution() - ElementShadow::invalidateDistribution() The actual implementations are ContentDistributor::distribute() and ContentDistributor::invalidate() respectively. When clients need to traverse composed tree, before attach() for example, they should call ensureDistribution() to make sure that the traversal data structure ("the distribution") is ready. When there is any DOM mutation which can result a composed tree mutation, then clients should call invalidateDistribution() to mark the distribution being dated. Here are such DOM mutations: - The children of any ShadowRoots are changed, - The children of any InsertionPoints are changed, - The children of any host elements are changed, - Any insertion point is inserted to or removed from the shadow tree, - @select attribute of <content> is modified and - New ShadowRoot is added to the shadow tree. Note that the validity of the distribution is tracked and unnecessary distribution requests are ignored. After the invalidation, that shadow subtrees are detached once and request their re-attachment through the style recalculation. Then, on the responding style recalculation and attach(), new distribution will be computed. No new tests. Covered by existing tests. * dom/Element.cpp: (WebCore::Element::~Element): (WebCore::Element::childrenChanged): * dom/ElementShadow.cpp: (WebCore::ElementShadow::~ElementShadow): (WebCore::ElementShadow::addShadowRoot): (WebCore::ElementShadow::removeAllShadowRoots): (WebCore::ElementShadow::attach): (WebCore::ElementShadow::recalcStyle): (WebCore::ElementShadow::ensureDistribution): (WebCore::ElementShadow::invalidateDistribution): * dom/ElementShadow.h: (ElementShadow): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRendererFactory::createRendererIfNeeded): * dom/NodeRenderingContext.h: (NodeRenderingContext): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setApplyAuthorStyles): (WebCore::ShadowRoot::attach): (WebCore::ShadowRoot::childrenChanged): (WebCore): * dom/ShadowRoot.h: (ShadowRoot): * html/HTMLFormControlElement.cpp: * html/ValidationMessage.cpp: (WebCore::ValidationMessage::buildBubbleTree): * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::ContentDistributor): (WebCore::ContentDistributor::~ContentDistributor): (WebCore::ContentDistributor::findInsertionPointFor): (WebCore::ContentDistributor::distribute): (WebCore::ContentDistributor::invalidate): (WebCore::ContentDistributor::finishInivalidation): (WebCore::ContentDistributor::distributeSelectionsTo): (WebCore::ContentDistributor::distributeShadowChildrenTo): (WebCore::ContentDistributor::invalidateDistributionIn): * html/shadow/ContentDistributor.h: (WebCore::ContentDistributor::needsInvalidation): (ContentDistributor): (WebCore::ContentDistributor::needsDistribution): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::attach): (WebCore::InsertionPoint::detach): (WebCore::InsertionPoint::nextTo): (WebCore::InsertionPoint::previousTo): (WebCore::InsertionPoint::childrenChanged): * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::setDistribution): (WebCore::InsertionPoint::clearDistribution): (InsertionPoint): 2012-05-29 Luke Macpherson <macpherson@chromium.org> Implement post-landing feedback for WebKitCSSTransformValue::customCSSText(). https://bugs.webkit.org/show_bug.cgi?id=87684 Reviewed by Darin Adler. Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed. This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation and WTF_ARRAY_LENGTH instead of hard coding the array length. Covered by existing transform tests. * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customCssText): 2012-05-29 Eric Seidel <eric@webkit.org> Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless> https://bugs.webkit.org/show_bug.cgi?id=87646 Reviewed by Adam Barth. In the process of moving the seamless feature out of github and into bugs.webkit.org multiple versions of the shouldDisplaySeamlessly function got written (and moved from HTMLIFrameElement to Document), but only one of them was wrapped in ENABLE_IFRAME_SEAMLESS. HTMLIFrameElement was checking mayDisplaySeamlessly directly (as was my original design), which got around the ENABLE_IFRAME_SEAMLESS check. I've fixed this oversight, and the feature is now off when we tell it to be off. This is covered by many existing tests. I've verified locally that all tests fail when ENABLE_IFRAME_SEAMLESS is disabled instead of only some of them. * dom/SecurityContext.h: (SecurityContext): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly): 2012-05-29 Scott Graham <scottmg@chromium.org> Fix warning in preprocessing Source/WebCore/dom/DOMError.idl https://bugs.webkit.org/show_bug.cgi?id=87763 Reviewed by Adam Barth. Add newline at end of file to avoid warning: ../dom/DOMError.idl:35:2: warning: no newline at end of file * dom/DOMError.idl: 2012-05-29 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Move fileExists to Platform.h https://bugs.webkit.org/show_bug.cgi?id=87531 Reviewed by Adam Barth. Part of a refactoring series. See tracking bug 82948. * platform/chromium/FileSystemChromium.cpp: (WebCore::fileExists): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-29 Kentaro Hara <haraken@chromium.org> [V8] Rename v8Null() to v8NullWithCheck() https://bugs.webkit.org/show_bug.cgi?id=87713 Reviewed by Adam Barth. In IRC, cmarcelo@ pointed out that v8::Null() and v8Null() are confusing. This patch renames v8Null() to v8NullWithCheck(). No tests. No behavior change. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestException.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): * bindings/v8/V8Binding.h: (WebCore::v8NullWithCheck): (WebCore::v8DateOrNull): 2012-05-29 Christophe Dumez <christophe.dumez@intel.com> Some Content Security Policy console messages are missing line numbers in JSC https://bugs.webkit.org/show_bug.cgi?id=87558 Reviewed by Adam Barth. Make ScriptController::eventHandlerPosition() behave the same way on JSC than V8. This means that TextPosition::minimumPosition() is returned if parser is null, instead of TextPosition::belowRangePosition(). The line numbers are now correctly printed in the output of Content Security Policy tests. Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html http/tests/security/contentSecurityPolicy/javascript-url-blocked.html * bindings/js/ScriptController.cpp: (WebCore::ScriptController::eventHandlerPosition): 2012-05-29 Shawn Singh <shawnsingh@chromium.org> [chromium] make WebTransformationMatrix object usable by non-webkit code https://bugs.webkit.org/show_bug.cgi?id=87315 Reviewed by James Robinson. This change is covered by existing tests and by whether it compiles. There should be no changes in behavior. * platform/chromium/support/WebTransformationMatrix.cpp: (WebKit::WebTransformationMatrix::WebTransformationMatrix): (WebKit::WebTransformationMatrix::operator=): (WebKit::WebTransformationMatrix::operator==): (WebKit::WebTransformationMatrix::inverse): (WebKit::WebTransformationMatrix::to2dTransform): (WebKit::WebTransformationMatrix::multiply): (WebKit::WebTransformationMatrix::makeIdentity): (WebKit::WebTransformationMatrix::translate): (WebKit::WebTransformationMatrix::translate3d): (WebKit::WebTransformationMatrix::translateRight3d): (WebKit::WebTransformationMatrix::scale): (WebKit::WebTransformationMatrix::scaleNonUniform): (WebKit::WebTransformationMatrix::scale3d): (WebKit::WebTransformationMatrix::rotate): (WebKit::WebTransformationMatrix::rotate3d): (WebKit::WebTransformationMatrix::skewX): (WebKit::WebTransformationMatrix::skewY): (WebKit::WebTransformationMatrix::applyPerspective): (WebKit::WebTransformationMatrix::blend): (WebKit::WebTransformationMatrix::hasPerspective): (WebKit::WebTransformationMatrix::isInvertible): (WebKit::WebTransformationMatrix::isBackFaceVisible): (WebKit::WebTransformationMatrix::isIdentity): (WebKit::WebTransformationMatrix::isIdentityOrTranslation): (WebKit::WebTransformationMatrix::isIntegerTranslation): (WebKit::WebTransformationMatrix::m11): (WebKit::WebTransformationMatrix::setM11): (WebKit::WebTransformationMatrix::m12): (WebKit::WebTransformationMatrix::setM12): (WebKit::WebTransformationMatrix::m13): (WebKit::WebTransformationMatrix::setM13): (WebKit::WebTransformationMatrix::m14): (WebKit::WebTransformationMatrix::setM14): (WebKit::WebTransformationMatrix::m21): (WebKit::WebTransformationMatrix::setM21): (WebKit::WebTransformationMatrix::m22): (WebKit::WebTransformationMatrix::setM22): (WebKit::WebTransformationMatrix::m23): (WebKit::WebTransformationMatrix::setM23): (WebKit::WebTransformationMatrix::m24): (WebKit::WebTransformationMatrix::setM24): (WebKit::WebTransformationMatrix::m31): (WebKit::WebTransformationMatrix::setM31): (WebKit::WebTransformationMatrix::m32): (WebKit::WebTransformationMatrix::setM32): (WebKit::WebTransformationMatrix::m33): (WebKit::WebTransformationMatrix::setM33): (WebKit::WebTransformationMatrix::m34): (WebKit::WebTransformationMatrix::setM34): (WebKit::WebTransformationMatrix::m41): (WebKit::WebTransformationMatrix::setM41): (WebKit::WebTransformationMatrix::m42): (WebKit::WebTransformationMatrix::setM42): (WebKit::WebTransformationMatrix::m43): (WebKit::WebTransformationMatrix::setM43): (WebKit::WebTransformationMatrix::m44): (WebKit::WebTransformationMatrix::setM44): (WebKit::WebTransformationMatrix::a): (WebKit::WebTransformationMatrix::setA): (WebKit::WebTransformationMatrix::b): (WebKit::WebTransformationMatrix::setB): (WebKit::WebTransformationMatrix::c): (WebKit::WebTransformationMatrix::setC): (WebKit::WebTransformationMatrix::d): (WebKit::WebTransformationMatrix::setD): (WebKit::WebTransformationMatrix::e): (WebKit::WebTransformationMatrix::setE): (WebKit::WebTransformationMatrix::f): (WebKit::WebTransformationMatrix::setF): (WebKit::WebTransformationMatrix::toWebCoreTransform): (WebKit::WebTransformationMatrix::mapRect): (WebKit::WebTransformationMatrix::mapPoint): (WebKit::WebTransformationMatrix::mapQuad): (WebKit::WebTransformationMatrix::projectPoint): 2012-05-29 Alexis Menard <alexis.menard@openbossa.org> [CSS3 Backgrounds and Borders] Implement box-decoration-break parsing. https://bugs.webkit.org/show_bug.cgi?id=87678 Reviewed by Eric Seidel. Implement the parsing part of box-decoration-break. The specification is located at http://www.w3.org/TR/css3-background/#box-decoration-break. So far Opera implements it. This patch only implements the parsing part of the property. A following patch will implement the rendering part. Despite the rendering part missing it improves http://css3test.com by 1%. Test: fast/box-decoration-break/box-decoration-break-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore): (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleBoxData.cpp: (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleBoxData::operator==): * rendering/style/StyleBoxData.h: (WebCore::StyleBoxData::boxDecorationBreak): (StyleBoxData): 2012-05-29 David Barr <davidbarr@chromium.org> [text-overflow: ellipsis] WebKit should ignore the ellipsis for the purpose of dispatching mouse events https://bugs.webkit.org/show_bug.cgi?id=63781 Reviewed by Eric Seidel. "Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events." http://www.w3.org/TR/2012/WD-css3-ui-20120117/#text-overflow Test: fast/css/text-overflow-ellipsis-hit-test.html * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): Always return false. 2012-05-29 Gavin Peters <gavinp@chromium.org> [Chromium] Remove assertions on state in Prerender.cpp https://bugs.webkit.org/show_bug.cgi?id=87746 Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the removedFromDocument behaviour on each element, including the <link> element launching the prerender. This causes an assertion failure. I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the overzealous assertions in Prerender that were inappropriate. Reviewed by Adam Barth. No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered queries into Google Web Search. * platform/chromium/Prerender.cpp: (WebCore::Prerender::Prerender): (WebCore::Prerender::add): (WebCore::Prerender::cancel): (WebCore::Prerender::abandon): * platform/chromium/Prerender.h: (Prerender): 2012-05-29 Victor Carbune <victor@rosedu.org> Display cues in the controls area https://bugs.webkit.org/show_bug.cgi?id=87591 Reviewed by Eric Carlson. Changed the behaviour to implicitly hide the volume slidebar if the controls are hidden (due mouse moving out of the video area or controls are toggled through JS). This seems to be the simplest fix to this issue, otherwise on toggling the display:none property on the controls the volume slidebar might appear below the video. Re-enabled failing tests for this functionality. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled timer to set the display:none property on the controls. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::hide): Added a call to hide the volume slider. (WebCore::MediaControlRootElement::makeTransparent): Same. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::hide): Same. (WebCore::MediaControlRootElementChromium::makeTransparent): Same. 2012-05-29 Adrienne Walker <enne@google.com> Fix transparent iframes with composited contents in WK1 on Mac https://bugs.webkit.org/show_bug.cgi?id=76478 Reviewed by Simon Fraser. Test: compositing/iframes/repaint-after-losing-scrollbars.html * page/FrameView.cpp: (WebCore::FrameView::useSlowRepaints): 2012-05-29 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87787 [New Multicolumn] Refactor the region and flow thread code so that it can pick up the correct column widths and heights when determining the logical width and height of the flow thread itself. This patch adds new virtual methods to RenderRegion: logicalWidthForFlowThreadContent and logicalHeightForFlowThreadContent. For normal regions, these methods return the contentWidth and contentHeight of the regions themselves. For column sets, however, these methods actually return the column widths and heights. This allows the flow thread to properly lay out according to the column width. Region invalidation is also done properly by using these new methods. In some cases the code is actually simplified, since we can get rid of some isHorizontalWritingMode() switching. With this patch the flow thread now actually lays out and paints at the right width (spilling out of the region set in a single unbroken column). Reviewed by Dan Bernstein. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): (WebCore::RenderFlowThread::computeLogicalHeight): * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::ensureColumnSets): * rendering/RenderMultiColumnBlock.h: (WebCore::RenderMultiColumnBlock::isRenderMultiColumnBlock): (RenderMultiColumnBlock): (WebCore::toRenderMultiColumnBlock): (WebCore): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::computeLogicalWidth): (WebCore): (WebCore::RenderMultiColumnSet::computeLogicalHeight): * rendering/RenderMultiColumnSet.h: (WebCore::RenderMultiColumnSet::setColumnWidthAndCount): (RenderMultiColumnSet): * rendering/RenderObject.h: (WebCore::RenderObject::isRenderMultiColumnBlock): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::logicalWidthForFlowThreadContent): (WebCore): (WebCore::RenderRegion::logicalHeightForFlowThreadContent): (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: (RenderRegion): 2012-05-29 Alec Flett <alecflett@chromium.org> IndexedDB: Align codes and names for IDB-specific and DOM-specific errors/exceptions https://bugs.webkit.org/show_bug.cgi?id=87276 Reviewed by Tony Chang. No new tests. Existing tests have been updated to use the new exception constant values. The IDB spec has evolved to DOM4-style DOMExceptions, which are referred to with MixedCase, string-based style names for exceptions rather than UNDERSCORE_CONSTANT_ERR codes. Change to use MixedCase error/exception names, and tease out the IDB-specific exception/error codes/names from the system-level codes. Make sure that the legacy IDB-masked exception code values match the DOM exception values. Make sure that IDBDatabaseException[exception.name] still works. * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::deleteObjectStore): (WebCore::IDBDatabaseBackendImpl::setVersion): (WebCore::IDBDatabaseBackendImpl::transaction): * Modules/indexeddb/IDBDatabaseException.cpp: (IDBDatabaseExceptionNameDescription): (WebCore): (WebCore::IDBDatabaseException::initializeDescription): * Modules/indexeddb/IDBDatabaseException.h: * Modules/indexeddb/IDBDatabaseException.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::index): (WebCore::IDBObjectStoreBackendImpl::deleteIndex): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::abort): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::objectStore): 2012-05-29 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87775 [New Multicolumn] Make sure RenderMultiColumnSets have their own copy of the count, width and height of their columns. Reviewed by Anders Carlsson. * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock): (WebCore::RenderMultiColumnBlock::ensureColumnSets): * rendering/RenderMultiColumnBlock.h: (WebCore::RenderMultiColumnBlock::columnWidth): (WebCore::RenderMultiColumnBlock::columnCount): (RenderMultiColumnBlock): * rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::RenderMultiColumnSet): * rendering/RenderMultiColumnSet.h: (WebCore::RenderMultiColumnSet::columnCount): (WebCore::RenderMultiColumnSet::columnWidth): (WebCore::RenderMultiColumnSet::columnHeight): (RenderMultiColumnSet): (WebCore::RenderMultiColumnSet::setColumnWidthAndCount): (WebCore::RenderMultiColumnSet::setColumnHeight): 2012-05-29 Simon Fraser <simon.fraser@apple.com> Incomplete repaint on twitter.com when replying to a tweet https://bugs.webkit.org/show_bug.cgi?id=87553 Reviewed by Dean Jackson. Style changes can cause a compositing layer to change between requiring its own backing store or not, e.g. with the addition or removal of a transform. When that happens, we need to repaint the ancesetor layer that this layer was, or will be drawing into. Factored some code out of layerWillBeRemoved() to be able to also call it from setRequiresOwnBackingStore(). New manual test, ManualTests/compositing/requires-backing-change.html. I was not able to get an automated pixel test to work. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::setRequiresOwnBackingStore): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): Remove trailing whitespace. (WebCore::RenderLayerCompositor::repaintInCompositedAncestor): (WebCore::RenderLayerCompositor::layerWillBeRemoved): * rendering/RenderLayerCompositor.h: 2012-05-29 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87771 [New Multicolumn] Make sure we have one column set by default and add it to the flow thread's region list. Reviewed by Anders Carlsson. * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::ensureColumnSets): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): 2012-05-29 John Sullivan <sullivan@apple.com> Update label for blacklisted plug-in https://bugs.webkit.org/show_bug.cgi?id=87767 rdar://problem/11550048 Reviewed by Kevin Decker. * English.lproj/Localizable.strings: Regenerated. * platform/LocalizedStrings.cpp: (WebCore::insecurePluginVersionText): Changed this string. 2012-05-29 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout https://bugs.webkit.org/show_bug.cgi?id=87536 Reviewed by Tony Chang. Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately). The issue is that we would count the borders and paddings twice for the border-box case which would lead to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches what RenderBox and the rendering code does generally. Also refactored the code to avoid the need for local variables and make it more readable. 2012-05-25 Ojan Vafai <ojan@chromium.org> Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly https://bugs.webkit.org/show_bug.cgi?id=58453 Reviewed by Tony Chang. Test: css3/flexbox/align-absolute-child.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::adjustAlignmentForChild): When adjusting positioned items, adjust their static position, not their location. (WebCore::RenderFlexibleBox::flipForRightToLeftColumn): (WebCore::RenderFlexibleBox::flipForWrapReverse): * rendering/RenderFlexibleBox.h: 2012-05-29 Abhishek Arya <inferno@chromium.org> Crash due to text fragment destruction when updating first-letter block. https://bugs.webkit.org/show_bug.cgi?id=87751 Reviewed by Eric Seidel. Test: fast/text/text-fragment-first-letter-update-crash.html * rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): 2012-05-29 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87764 Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock. Also stub out ensureColumnSets() and write a comment describing how it's going to work. Reviewed by Anders Carlsson. * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock): (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange): (WebCore): (WebCore::RenderMultiColumnBlock::ensureColumnSets): * rendering/RenderMultiColumnBlock.h: (WebCore::RenderMultiColumnBlock::columnHeight): (WebCore::RenderMultiColumnBlock::setColumnHeight): (RenderMultiColumnBlock): 2012-05-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118620. http://trac.webkit.org/changeset/118620 https://bugs.webkit.org/show_bug.cgi?id=87760 This patch causes regression to read an empty file/blob via FileReader (Requested by jianli on #webkit). * fileapi/FileReader.cpp: (WebCore::FileReader::stringResult): 2012-05-29 Andreas Kling <kling@webkit.org> Make StylePropertySet a variable-sized object to reduce memory use. <http://webkit.org/b/87506> Reviewed by Antti Koivisto. Make immutable StylePropertySet objects variable-sized and allocate exactly the space needed to hold the CSSProperty objects passed at construction. This lets us avoid the memory overhead of Vector<CSSProperty, 4>. Renamed StylePropertySet::adopt* to create and createImmutable since they no longer adopt the incoming vector. More cleanup will follow in this area. This reduces memory usage across the board - the more CSS declarations, the bigger the benefit. As an example, we save around ~0.5MB on wsj.com. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::CSSParser::createStylePropertySet): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::createImmutable): (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::~StylePropertySet): (WebCore::StylePropertySet::copyPropertiesFrom): (WebCore::StylePropertySet::removeProperty): (WebCore::StylePropertySet::setProperty): (WebCore::StylePropertySet::parseDeclaration): (WebCore::StylePropertySet::addParsedProperties): (WebCore::StylePropertySet::asText): (WebCore::StylePropertySet::merge): (WebCore::StylePropertySet::addSubresourceStyleURLs): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::findPropertyWithId): (WebCore::StylePropertySet::removeEquivalentProperties): (WebCore::StylePropertySet::copyPropertiesInSet): (WebCore::StylePropertySet::averageSizeInBytes): (SameSizeAsStylePropertySet): (WebCore::StylePropertySet::append): * css/StylePropertySet.h: (WebCore::StylePropertySet::create): (StylePropertySet): (WebCore::StylePropertySet::propertyAt): (WebCore::StylePropertySet::propertyCount): (WebCore::StylePropertySet::isEmpty): (WebCore::StylePropertySet::array): * dom/StyledElement.cpp: (WebCore::StyledElement::updateAttributeStyle): 2012-05-29 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87759 Pull the initial page logical height checking for columns into its own separate function. This will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the effect of cleaning up layoutBlock even for the existing code. Reviewed by Anders Carlsson. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::checkForPaginationLogicalHeightChange): (WebCore): (WebCore::RenderBlock::layoutBlock): * rendering/RenderBlock.h: (RenderBlock): 2012-05-29 Victor Carbune <victor@rosedu.org> Update cue event dispatching for zero and negative duration cues https://bugs.webkit.org/show_bug.cgi?id=85143 Reviewed by Eric Carlson. Updated existing test. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly treated event dispatching for zero and negative duration cues. (WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't handle invalid cues with intervals - negative cues need to be treated as zero-length cues as they are always missed cues anyway. (WebCore::HTMLMediaElement::textTrackRemoveCue): Same. 2012-05-29 MORITA Hajime <morrita@google.com> ShadowRoot.getElementById() returns removed node. https://bugs.webkit.org/show_bug.cgi?id=62184 Deregitration of m_elementsById map is done at Element::removedFrom() But the tree scope of the removed node is already reset from a shadow root to a document. This change lookup the old shadow root through its parent node and deregitrater the node against it. Reviewed by Dimitri Glazkov. Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html * dom/Element.cpp: (WebCore::treeScopeOfParent): (WebCore): (WebCore::Element::removedFrom): * dom/Element.h: (Element): (WebCore::Element::updateId): (WebCore): 2012-05-29 Dana Jansens <danakj@chromium.org> [chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect https://bugs.webkit.org/show_bug.cgi?id=87677 Reviewed by Adrienne Walker. When a contributing surface is visited, and we have not visited another surface, then we know the surface is completely unoccluded. However, the root scissor rect should still be applied, and anything outside of it should be considered occluded. Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::targetRenderSurface): (WebCore): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::targetRenderSurface): (WebCore): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): 2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl https://bugs.webkit.org/show_bug.cgi?id=87706 Reviewed by Antonio Gomes. Because we use authentication callback mechanism of libcurl, which will take care of all the authentication communication between UA and server, so the only thing we need to do is to provide credential information when authentication callback is triggered. By using this we don't need to process intermediate headers for each http authentication scheme. Implemented interface function notifyAuthReceived() in NetworkJob to handle the authentication notification from networking thread. When the authentication callback is triggered, we should cancel the current loading request and restart a new one with credential information attached which comes from credentialStorage or user input. Internally reviewed by Joe Mason <jmason@rim.com>. No new tests since there is no behavior change. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyAuthReceived): (WebCore): (WebCore::NetworkJob::handleNotifyHeaderReceived): (WebCore::NetworkJob::sendRequestWithCredentials): * platform/network/blackberry/NetworkJob.h: (NetworkJob): 2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] http authentication challenge issue when loading subresource https://bugs.webkit.org/show_bug.cgi?id=87660 Reviewed by Rob Buis. We should try to store the credential information as soon as we receive http status notification which indicates that the authentication succeeds, instead of storing credentials when the main resource receives notify done which is too late for loading subresource. Internally reviewed by Joe Mason <jmason@rim.com> No new tests since there is no change in behavior. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyStatusReceived): (WebCore::NetworkJob::handleNotifyClose): 2012-05-29 Alexey Proskuryakov <ap@apple.com> [Mac] Move DefaultFonts.plist to C++ code https://bugs.webkit.org/show_bug.cgi?id=87560 <rdar://problem/11466119> Reviewed by Dan Bernstein. * DerivedSources.make: * Resources/DefaultFonts.plist.in: Removed. * WebCore.xcodeproj/project.pbxproj: * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies): Instead of having a separate configuration file, just hardcode the settings in C++. 2012-05-29 Alexei Filippov <alexeif@chromium.org> Web Inspector: Retainers are missing for all objects https://bugs.webkit.org/show_bug.cgi?id=87655 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource): 2012-05-29 Philippe Normand <pnormand@igalia.com> [GStreamer] Video sink doesn't respect WebKit code style https://bugs.webkit.org/show_bug.cgi?id=87693 Reviewed by Alexis Menard. No change in behavior of the sink, this patch only adapts the code style to WebKit's. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (_WebKitVideoSinkPrivate): (webkitVideoSinkTimeoutCallback): (webkitVideoSinkRender): (webkitVideoSinkDispose): (unlockBufferMutex): (webkitVideoSinkUnlock): (webkitVideoSinkUnlockStop): (webkitVideoSinkStop): (webkitVideoSinkStart): (webkitVideoSinkMarshalVoidAndMiniObject): (webkit_video_sink_class_init): (webkitVideoSinkNew): * platform/graphics/gstreamer/VideoSinkGStreamer.h: (_WebKitVideoSink): (_WebKitVideoSinkClass): 2012-05-29 Roland Takacs <takacs.roland@stud.u-szeged.hu> [Qt] Uninitialized shader compiler when GLES is used https://bugs.webkit.org/show_bug.cgi?id=87712 The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization of shader compiler to compile shader codes for ES-platforms as well. Reviewed by Noam Rosenthal. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2012-05-29 Taiju Tsuiki <tzik@chromium.org> Add InspectorFileSystemAgent::FrontendProvider https://bugs.webkit.org/show_bug.cgi?id=87635 InspectorFileSystemAgent needs weak reference to its frontend to perform asynchronous operation. Reviewed by Yury Semikhatsky. * inspector/InspectorFileSystemAgent.cpp: (InspectorFileSystemAgent::FrontendProvider): (WebCore): (WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent): (WebCore::InspectorFileSystemAgent::enable): (WebCore::InspectorFileSystemAgent::disable): (WebCore::InspectorFileSystemAgent::setFrontend): (WebCore::InspectorFileSystemAgent::clearFrontend): (WebCore::InspectorFileSystemAgent::restore): (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): 2012-05-29 Yoshifumi Inoue <yosin@chromium.org> REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection https://bugs.webkit.org/show_bug.cgi?id=87614 Reviewed by Kent Tamura. This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl methods which was implemented in HTMLFormControlElement at r109729 and updates CSS pseudo class checker to check "optgroup" element. Tests: fast/forms/select/optgroup-clicking.html fast/forms/select/optgroup-disabled.html fast/forms/select/optgroup-rendering.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. We checked tag name "optgroup" in addition isFormControlElement. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::disabled): Added. * html/HTMLOptGroupElement.h: (HTMLOptGroupElement): Added isEnabledFormControl. 2012-05-29 Alexander Pavlov <apavlov@chromium.org> [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space https://bugs.webkit.org/show_bug.cgi?id=87735 Reviewed by Kent Tamura. This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418. No new tests, as popups are not testable in Chromium. * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::layoutAndCalculateWidgetRect): 2012-05-29 Andrei Bucur <abucur@adobe.com> [CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset https://bugs.webkit.org/show_bug.cgi?id=87491 This patch updates the CSSOM property name overflow to overset. There are no changes in functionality. Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/ Reviewed by Andreas Kling. Test: fast/regions/webkit-named-flow-overset.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::overset): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::computeOverflowStateForRegions): * rendering/RenderFlowThread.h: 2012-05-29 Andreas Kling <kling@webkit.org> Give StylePropertySet a proper mutability flag. <http://webkit.org/b/87675> Reviewed by Antti Koivisto. Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable. This is clean-up and prep work for implementing a more efficient storage scheme for immutable StylePropertySets (fixed-size array instead of vector) as the vast majority of them are unlikely to ever mutate during their lifetime. Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify an immutable object. Also made properties() const on StyleRule and friends, which brought some additional code churn along with it. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::style): (WebCore::CSSFontFaceRule::reattach): * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSPageRule.cpp: (WebCore::CSSPageRule::style): (WebCore::CSSPageRule::reattach): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::addSubresourceStyleURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::style): (WebCore::CSSStyleRule::reattach): * css/CSSValue.cpp: (WebCore::CSSValue::addSubresourceStyleURLs): * css/CSSValue.h: (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::addSubresourceStyleURLs): * css/CSSValueList.h: (CSSValueList): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::setCSSParserMode): (WebCore): (WebCore::StylePropertySet::copyPropertiesFrom): (WebCore::StylePropertySet::removeShorthandProperty): (WebCore::StylePropertySet::removeProperty): (WebCore::StylePropertySet::setProperty): (WebCore::StylePropertySet::parseDeclaration): (WebCore::StylePropertySet::addParsedProperties): (WebCore::StylePropertySet::addParsedProperty): (WebCore::StylePropertySet::merge): (WebCore::StylePropertySet::addSubresourceStyleURLs): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::findPropertyWithId): (WebCore::StylePropertySet::removeEquivalentProperties): (WebCore::StylePropertySet::copyPropertiesInSet): * css/StylePropertySet.h: (WebCore::StylePropertySet::adopt): (WebCore::StylePropertySet::adoptMutable): (StylePropertySet): (WebCore::StylePropertySet::isMutable): * css/StyleResolver.cpp: (WebCore::StyleResolver::addMatchedProperties): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * css/StyleRule.cpp: (WebCore::StyleRule::mutableProperties): (WebCore): (WebCore::StyleRulePage::mutableProperties): (WebCore::StyleRuleFontFace::mutableProperties): * css/StyleRule.h: (WebCore::StyleRule::properties): (StyleRule): (WebCore::StyleRuleFontFace::properties): (StyleRuleFontFace): (WebCore::StyleRulePage::properties): (StyleRulePage): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ensureInlineStyle): (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation): * editing/EditingStyle.cpp: (WebCore::styleFromMatchedRulesForElement): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::parseAttribute): (WebCore::SVGFontFaceElement::rebuildFontFace): (WebCore::SVGFontFaceElement::removedFrom): 2012-05-29 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> [EFL] Refactoring. Get rid of unnecessary singleCharacterString() function https://bugs.webkit.org/show_bug.cgi?id=87654 Reviewed by Csaba Osztrogonác. Evas key events already provide key string, so no practical need for singleCharacterString() evaluating the event string from keyname. Modified code related functionality is already covered with fast/events and fast/forms tests. * platform/efl/EflKeyboardUtilities.cpp: * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2012-05-29 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed: Web Inspector: single line fix after r118742. * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapProfileHeader.prototype.saveToFile): 2012-05-29 Kentaro Hara <haraken@chromium.org> Remove m_rootNode and m_selectorChecker from SelectorQuery.h https://bugs.webkit.org/show_bug.cgi?id=87650 Reviewed by Antti Koivisto. To avoid parsing CSS selectors every time, I am planning to cache SelectorQuery objects into a HashMap, which will be defined in Node::querySelector(). To make the size of SelectorQuery small, this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h. Tests: fast/dom/SelectorAPI/*. No change in test results. * dom/Node.cpp: (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): (WebCore): (WebCore::SelectorQuery::queryAll): (WebCore::SelectorQuery::queryFirst): * dom/SelectorQuery.h: (SelectorQuery): 2012-05-29 Eugene Klyuchnikov <eustas.bug@gmail.com> Web Inspector: Tabbed Settings Screen https://bugs.webkit.org/show_bug.cgi?id=87497 Reviewed by Yury Semikhatsky. Combine settings screen and shortcuts screen to a single tabbed settings screen. This will make shortcuts screen more discoverable. * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen): Make titled tamplate optional. (WebInspector.HelpScreen.prototype._createCloseButton): Extract method. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): Split initialization and UI construction. (WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection): (WebInspector.SettingsScreen.prototype._createSettingsTabView): Extract GUI construction method. (WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane): Make GUI construction lazy. (WebInspector.SettingsScreen.prototype.selectTab): Add method for external tab swithching. (WebInspector.SettingsScreen.prototype.wasShown): Make GUI construction lazy. (WebInspector.SettingsScreenTabbedPane): Extend class to access protected member. (WebInspector.SettingsController.prototype._buttonClicked): Change "showSettingsScreen" visibility and parameters. (WebInspector.SettingsController.prototype._onHideSettingsScreen): Preserve settings screen state. (WebInspector.SettingsController.prototype.showSettingsScreen): Change method visibility and parameters. * inspector/front-end/ShortcutsScreen.js: (WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen. (WebInspector.ShortcutsScreen.prototype._createShortcutsTabView): Refactoring of GUI construction. (WebInspector.ShortcutsSection.prototype.renderSection): Ditto. * inspector/front-end/helpScreen.css: (.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings. (.help-window-main ::-webkit-resizer): Ditto. (.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto. (.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto. (.help-window-main ::-webkit-scrollbar-track:vertical): Ditto. (body:not(.compact) #settings-screen .tabbed-pane): Fix container height. (#settings-screen .tabbed-pane-header): Ditto. (#settings-screen .tabbed-pane-header-tabs): Adjust spacing. (#settings-screen .tabbed-pane-header-tab): Adjust style. (#settings-screen .help-close-button): Adjust spacing. (#settings-screen .tabbed-pane-header-tab.selected): Erase line below active tab. (#settings-screen .tabbed-pane-content): Adjust spacing. (#settings-screen .help-content): Ditto. * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): Use Settings screen to show shortcuts. 2012-05-29 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: REGRESSION: load heap snapshot doesn't work. https://bugs.webkit.org/show_bug.cgi?id=87642 HeapSnapshotReceiver interface was introduced. It declares the API for HeapSnapshotLoader, HeapSnapshotLoaderProxy and HeapSnapshotSaveToFileReceiver. The HeapProfileHeader was refactored and tests were added. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotLoader.js: (WebInspector.HeapSnapshotLoader): (WebInspector.HeapSnapshotLoader.prototype.startLoading): (WebInspector.HeapSnapshotLoader.prototype.dispose): (WebInspector.HeapSnapshotLoader.prototype._reset): (WebInspector.HeapSnapshotLoader.prototype.finishLoading): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls): (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading): (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk): (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotReceiver): (WebInspector.HeapSnapshotReceiver.prototype.startLoading): (WebInspector.HeapSnapshotReceiver.prototype.pushJSONChunk): (WebInspector.HeapSnapshotReceiver.prototype.finishLoading): (WebInspector.HeapSnapshotReceiver.prototype.dispose): (WebInspector.HeapProfileHeader): (WebInspector.HeapProfileHeader.prototype.load): (WebInspector.HeapProfileHeader.prototype._setupWorker): (WebInspector.HeapProfileHeader.prototype.dispose): (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate): (WebInspector.HeapProfileHeader.prototype.pushJSONChunk): (WebInspector.HeapProfileHeader.prototype._parsed): (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot): (WebInspector.HeapProfileHeader.prototype.saveToFile): (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad): (WebInspector.HeapProfileHeader.prototype.loadFromFile): (WebInspector.HeapProfileHeader.prototype._loadNextChunk): (WebInspector.HeapProfileHeader.prototype._nextChunkLoaded): (WebInspector.HeapProfileHeader.prototype._createFileReader): (WebInspector.HeapSnapshotSaveToFileReceiver): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.startLoading): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.pushJSONChunk): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.finishLoading): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.dispose): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._startSavingSnapshot): (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._saveStatusUpdate): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._createFileSelectorElement.onChange): (WebInspector.ProfilesPanel.prototype._createFileSelectorElement): (WebInspector.ProfilesPanel.prototype._loadFromFile): 2012-05-29 Eric Seidel <eric@webkit.org> Add HTMLIFrameElement.seamless property accessor now that seamless is enabled and works https://bugs.webkit.org/show_bug.cgi?id=87708 Reviewed by Adam Barth. Lots of tests in fast/frames/seamless cover this property. * html/HTMLIFrameElement.idl: 2012-05-29 Kentaro Hara <haraken@chromium.org> [Performance] Optimize querySelector() and querySelectorAll() by removing redundant dummy style sheet creations https://bugs.webkit.org/show_bug.cgi?id=87627 Reviewed by Antti Koivisto. This patch improves performance of querySelector("#id") by 4.2% ~ 17.7% in Safari and Chromium. Performance tests: https://bugs.webkit.org/attachment.cgi?id=144288 The performance test results in my desktop: [Safari/Mac] document.querySelector("#headId") : 13.60 ms => 12.40 ms +9.68% document.querySelector("#duplicatedId") : 14.80 ms => 14.20 ms +4.23% document.querySelector("#tailId") : 13.80 ms => 12.20 ms +13.11% document.querySelectorAll("#headId") : 17.80 ms => 14.60 ms +21.92% document.querySelectorAll("#duplicatedId") : 513.80 ms => 471.60 ms +8.95% document.querySelectorAll("#tailId") : 19.20 ms => 16.40 ms +17.07% document.querySelector("h1") : 14.40 ms => 13.60 ms +5.88% document.querySelector("h2") : 14.80 ms => 13.80 ms +7.25% document.querySelector("h3") : 312.00 ms => 306.60 ms +1.76% document.querySelectorAll("h1") : 322.00 ms => 314.60 ms +2.35% document.querySelectorAll("h2") : 481.00 ms => 420.60 ms +14.36% document.querySelectorAll("h3") : 326.80 ms => 315.80 ms +3.48% document.querySelector(".headClass") : 16.20 ms => 15.40 ms +5.19% document.querySelector(".duplicatedClass") : 17.00 ms => 15.40 ms +10.39% document.querySelector(".tailClass") : 369.60 ms => 362.60 ms +1.93% document.querySelectorAll(".headClass") : 388.20 ms => 377.60 ms +2.81% document.querySelectorAll(".duplicatedClass") : 605.00 ms => 581.20 ms +4.09% document.querySelectorAll(".tailClass") : 401.60 ms => 391.40 ms +2.61% [Chromium/Linux] ocument.querySelector("#headId") : 16.00 ms => 13.60 ms +17.65% document.querySelector("#duplicatedId") : 16.80 ms => 15.40 ms +9.09% document.querySelector("#tailId") : 16.00 ms => 13.60 ms +17.65% document.querySelectorAll("#headId") : 29.00 ms => 25.00 ms +16.00% document.querySelectorAll("#duplicatedId") : 561.40 ms => 505.20 ms +11.12% document.querySelectorAll("#tailId") : 34.00 ms => 26.80 ms +26.87% document.querySelector("h1") : 18.20 ms => 15.80 ms +15.19% document.querySelector("h2") : 19.00 ms => 16.60 ms +14.46% document.querySelector("h3") : 280.40 ms => 274.00 ms +2.34% document.querySelectorAll("h1") : 300.20 ms => 365.20 ms -17.80% document.querySelectorAll("h2") : 487.60 ms => 504.20 ms -3.29% document.querySelectorAll("h3") : 349.40 ms => 324.00 ms +7.84% document.querySelector(".headClass") : 18.40 ms => 16.00 ms +15.00% document.querySelector(".duplicatedClass") : 19.40 ms => 16.20 ms +19.75% document.querySelector(".tailClass") : 349.60 ms => 345.40 ms +1.22% document.querySelectorAll(".headClass") : 382.80 ms => 378.20 ms +1.22% document.querySelectorAll(".duplicatedClass") : 550.80 ms => 574.20 ms -4.08% document.querySelectorAll(".tailClass") : 381.00 ms => 387.00 ms -1.55% I've found that StyleSheetInternal::create() in CSSParser::parseSelector() is a bottleneck of querySelector() and querySelectorAll(). void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorList) { RefPtr<StyleSheetInternal> dummyStyleSheet = StyleSheetInternal::create(); setStyleSheet(dummyStyleSheet.get()); ...; } This patch removes a dummy style sheet. Previously the dummy style sheet was needed to avoid null checks of m_styleSheet in CSSGrammer.y. This patch fixes CSSGrammer.y so that it works fine with a null m_styleSheet. Tests: fast/dom/SelectorAPI/*. No change in the test results. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::parseSelector): 2012-05-29 Nikolas Zimmermann <nzimmermann@rim.com> SVGViewSpec DOM bindings aka SVGSVGElement.currentView is unimplemented https://bugs.webkit.org/show_bug.cgi?id=15495 Reviewed by Rob Buis. Finish SVGViewSpec implementation and expose it to the Web. Numerous smaller bugs are fixed: - SVGViewSpec and all of its contents should be read-only. Enforce that and test it. Add a new enum to SVGPropertyInfo so that each SVGAnimatedProperty knows if its content is supposed to be read-write or read-only. - Make the 'transform' attribute of SVGViewSpec exposable by switching to a SVGTransformListProperty - it can now be accessed from JS. - Assure that following XXXString methods are in sync with the corresponding SVG DOM interfaces readonly attribute DOMString viewBoxString; readonly attribute DOMString preserveAspectRatioString; readonly attribute DOMString transformString; readonly attribute DOMString viewTargetString; - Cleanup code in svg/properties that was intended to handle SVGViewSpec. Turns out lot of the complexity was unncessary, and can be removed. - Move SVGFitToViewBox to the same pattern SVGZoomAndPan uses since two days, that avoids any virtual function calls for attribute parsing. - Create/expose ObjectiveC/JS bindings for SVGViewSpec. - Enable SVGViewSpec constructor. Tests: svg/custom/linking-a-03-b-all-expected.svg svg/dom/SVGViewSpec-defaults.html svg/dom/SVGViewSpec.html svg/dom/complex-svgView-specification.html svg/dom/viewspec-parser.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::setValue): (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/objc/DOMSVG.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::valueAccessorSetter): (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback): * page/DOMWindow.idl: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildTileImageTransform): * svg/SVGFitToViewBox.cpp: * svg/SVGFitToViewBox.h: (SVGFitToViewBox): (WebCore::SVGFitToViewBox::parseAttribute): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::orientTypePropertyInfo): (WebCore::SVGMarkerElement::parseAttribute): (WebCore::SVGMarkerElement::synchronizeOrientType): (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::dPropertyInfo): (WebCore::SVGPathElement::svgAttributeChanged): (WebCore::SVGPathElement::pathByteStream): (WebCore::SVGPathElement::lookupOrCreateDWrapper): (WebCore::SVGPathElement::synchronizeD): * svg/SVGPathSegWithContext.h: (WebCore::SVGPathSegWithContext::animatedProperty): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseAttribute): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::pointsPropertyInfo): (WebCore::SVGPolyElement::parseAttribute): (WebCore::SVGPolyElement::synchronizePoints): (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): * svg/SVGRect.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::~SVGSVGElement): (WebCore::SVGSVGElement::currentView): (WebCore::SVGSVGElement::parseAttribute): (WebCore::SVGSVGElement::currentViewBoxRect): (WebCore::SVGSVGElement::viewBoxToViewTransform): (WebCore::SVGSVGElement::setupInitialView): (WebCore::SVGSVGElement::inheritViewAttributes): * svg/SVGSVGElement.h: (SVGSVGElement): * svg/SVGSVGElement.idl: * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::parseAttribute): * svg/SVGTests.cpp: (WebCore::SVGTests::requiredFeaturesPropertyInfo): (WebCore::SVGTests::requiredExtensionsPropertyInfo): (WebCore::SVGTests::systemLanguagePropertyInfo): (WebCore::SVGTests::synchronizeRequiredFeatures): (WebCore::SVGTests::synchronizeRequiredExtensions): (WebCore::SVGTests::synchronizeSystemLanguage): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::textLengthPropertyInfo): (WebCore::SVGTextContentElement::synchronizeTextLength): (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::parseAttribute): * svg/SVGViewElement.h: * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::viewBoxPropertyInfo): (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): (WebCore::SVGViewSpec::transformPropertyInfo): (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::viewBoxIdentifier): (WebCore::SVGViewSpec::preserveAspectRatioIdentifier): (WebCore::SVGViewSpec::transformIdentifier): (WebCore::SVGViewSpec::setZoomAndPan): (WebCore::SVGViewSpec::setTransformString): (WebCore::SVGViewSpec::transformString): (WebCore::SVGViewSpec::viewBoxString): (WebCore::SVGViewSpec::preserveAspectRatioString): (WebCore::SVGViewSpec::viewTarget): (WebCore::SVGViewSpec::transform): (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): (WebCore::SVGViewSpec::reset): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: (WebCore::SVGViewSpec::~SVGViewSpec): (SVGViewSpec): (WebCore::SVGViewSpec::create): (WebCore::SVGViewSpec::setViewTargetString): (WebCore::SVGViewSpec::setZoomAndPan): (WebCore::SVGViewSpec::contextElement): (WebCore::SVGViewSpec::resetContextElement): (WebCore::SVGViewSpec::transformBaseValue): (WebCore::SVGViewSpec::viewBoxAnimated): (WebCore::SVGViewSpec::viewBox): (WebCore::SVGViewSpec::viewBoxBaseValue): (WebCore::SVGViewSpec::setViewBoxBaseValue): (WebCore::SVGViewSpec::preserveAspectRatioAnimated): (WebCore::SVGViewSpec::preserveAspectRatio): (WebCore::SVGViewSpec::preserveAspectRatioBaseValue): (WebCore::SVGViewSpec::setPreserveAspectRatioBaseValue): * svg/SVGViewSpec.idl: * svg/properties/SVGAnimatedProperty.h: (WebCore::SVGAnimatedProperty::isReadOnly): (WebCore::SVGAnimatedProperty::setIsReadOnly): (SVGAnimatedProperty): (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): (WebCore::SVGAnimatedProperty::lookupWrapper): (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): * svg/properties/SVGAnimatedPropertyMacros.h: (WebCore::SVGSynchronizableAnimatedProperty::synchronize): (SVGSynchronizableAnimatedProperty): * svg/properties/SVGAnimatedPropertySynchronizer.h: Removed. * svg/properties/SVGAttributeToPropertyMap.h: * svg/properties/SVGListProperty.h: * svg/properties/SVGListPropertyTearOff.h: (SVGListPropertyTearOff): (WebCore::SVGListPropertyTearOff::isReadOnly): * svg/properties/SVGPathSegListPropertyTearOff.h: (SVGPathSegListPropertyTearOff): (WebCore::SVGPathSegListPropertyTearOff::isReadOnly): * svg/properties/SVGProperty.h: (SVGProperty): * svg/properties/SVGPropertyInfo.h: (WebCore::SVGPropertyInfo::SVGPropertyInfo): (SVGPropertyInfo): * svg/properties/SVGPropertyTearOff.h: (WebCore::SVGPropertyTearOff::isReadOnly): * svg/properties/SVGStaticListPropertyTearOff.h: (SVGStaticListPropertyTearOff): (WebCore::SVGStaticListPropertyTearOff::isReadOnly): 2012-05-29 Kent Tamura <tkent@chromium.org> REGRESSION (r90971): the cursor is painted “behind” the placeholder text https://bugs.webkit.org/show_bug.cgi?id=87155 Reviewed by Hajime Morita. This regression happened only on platforms on which RenderTheme::shouldShowPlaceholderWhenFocused() returns true. Because the order of renderers for the editable node and the placeholder node was: - A renderer for the editable node - A renderer for the placeholder node, The text caret was painted, then the palceholder was painted. We should not use z-index in the built-in shadow nodes. So the patch fixes this bug by re-ordering these renderers. Tests: fast/forms/input-placeholder-paint-order-2.html fast/forms/input-placeholder-paint-order.html fast/forms/textarea/textarea-placeholder-paint-order-2.html fast/forms/textarea/textarea-placeholder-paint-order.html * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer): Added. Reorder the order of renderers so that the placeholder renderer precedes the inner text renderer. * html/HTMLTextFormControlElement.h: Add fixPlaceholderRenderer() declaration. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::attach): Calls fixPlaceholderRenderer(). (WebCore::HTMLTextAreaElement::updatePlaceholderText): ditto. Also, use innerTextElement() to improvde code readability. * html/HTMLTextAreaElement.h: (HTMLTextAreaElement): Overrides attach(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::updatePlaceholderText): Calls fixPlaceholderRenderer(). (WebCore::TextFieldInputType::attach): ditto. * html/TextFieldInputType.h: (TextFieldInputType): Overrides attach(). 2012-05-28 Kentaro Hara <haraken@chromium.org> [V8] Implement V8Binding::v8Null(isolate) and use it in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=87692 Reviewed by Adam Barth. Since v8::Null(isolate) crashes if we pass a NULL isolate, we are planning to pass Isolate to v8::Null() in the following steps: [1] Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check. If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise, v8Null(isolate) calls v8::Null(isolate). [2] In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } ) [3] In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } ) This bug fixes [1] by implementing V8Binding::v8Null(isolate). Also this patch uses V8Binding::v8Null(isolate) in bindings/v8/*.{h,cpp}. No tests. No behavior change. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (NativeToJSValue): * bindings/scripts/test/V8/V8Float64Array.h: * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestException.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): * bindings/v8/V8Binding.h: (WebCore::v8Null): (WebCore): (WebCore::v8DateOrNull): * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8DOMWrapper.h: (WebCore): 2012-05-28 Kent Tamura <tkent@chromium.org> Fix a crash in HTMLFormControlElement::disabled(). https://bugs.webkit.org/show_bug.cgi?id=86534 Reviewed by Ryosuke Niwa. Stop to hold pointers of fildset and legend elements. We can avoid it by holding ancestor's disabled state. The ancesotr's disabled state should be invalidated when - fieldset's disabled value is changed. - fieldset's children is updated because a legend position might be changed. - A form control is attached to or detached from a tree. No new tests. It's almost impossible to make a reliable test. * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder): Added. Invalidate disabled state of form controls under the specified node. (WebCore::HTMLFieldSetElement::disabledAttributeChanged): Uses invalidateDisabledStateUnder(). (WebCore::HTMLFieldSetElement::childrenChanged): Added new override function. We need invalidate disabled state of form controls under legend elements. * html/HTMLFieldSetElement.h: (HTMLFieldSetElement): Add invalidateDisabledStateUnder() and childrenChanged(). * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): Remove initialization of the removed data members. Initialize m_ancestorDisabledState. (WebCore::HTMLFormControlElement::updateAncestorDisabledState): Update m_ancestorDisabledState. It should be AncestorDisabledStateDisabled if the control is under a disabled fieldset and not under the first legend child of the disabled filedset. (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged): Invalidate m_ancestorDisabledState. (WebCore::HTMLFormControlElement::insertedInto): ditto. (WebCore::HTMLFormControlElement::removedFrom): ditto. (WebCore::HTMLFormControlElement::disabled): Calls updateAncestorDisabledState() if needed. (WebCore::HTMLFormControlElement::recalcWillValidate): Remove unnecessary check for m_legendAncestor. * html/HTMLFormControlElement.h: (HTMLFormControlElement): - Rename updateFieldSetAndLegendAncestor() to updateAncestorDisabledState(), and make it private. - Remove m_fieldSetAncestor, m_legendAncestor, and m_fieldSetAncestorValid. - Add m_ancestorDisabledState. 2012-05-28 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] Receiving reserved close codes, 1005, 1006, and 1015 must appear as code=1006 and wasClean=false https://bugs.webkit.org/show_bug.cgi?id=87084 Reviewed by Kent Tamura. Status codes 1005, 1006, and 1015 are forbidden to be sent in actual close frames. If a client received these frames, the client should handle them as broken. Close frames containing invalid body size are the same as these forbidden cases. Update close-code-and-reason tests to verify this patch. * Modules/websockets/WebSocket.cpp: Handle AbnormalClosure as wasClean == false (WebCore::WebSocket::didClose): * Modules/websockets/WebSocketChannel.cpp: Handle close frames' status code carefully (WebCore::WebSocketChannel::processFrame): * Modules/websockets/WebSocketChannel.h: Update on newly defined close event codes 2012-05-28 Kentaro Hara <haraken@chromium.org> [V8] Avoid passing NULL to an 'isolate' parameter https://bugs.webkit.org/show_bug.cgi?id=87689 Reviewed by Adam Barth. v8::Null(isolate) crashes if we pass a NULL isolate. Thus we are planning to replace v8::Null()s in a following way: - Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check. If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise, v8Null(isolate) calls v8::Null(isolate). - In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } ) - In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional 'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } ) However, currently we cannot do the replacement mechanically, since some code pass NULL to a non-optional 'isolate' parameter. In other words, currently "non-optional" does not guarantee that 'isolate' is not NULL. This patch removes all the code that passes NULL to a non-optional 'isolate' parameter. This will enable us to achieve the replacement mechanically. No tests. No behavior change. * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackImplementation): (NativeToJSValue): * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithClass1Param): (WebCore::V8TestCallback::callbackWithClass2Param): (WebCore::V8TestCallback::callbackWithStringList): (WebCore::V8TestCallback::callbackRequiresThisToPass): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): 2012-05-28 Kent Tamura <tkent@chromium.org> Form controls in <fieldset disabled> should not be validated. https://bugs.webkit.org/show_bug.cgi?id=87381 Reviewed by Hajime Morita. We need to use disabeld() instead of m_disabled to calculate willValidate property. Also, we need to update willValidate if necessary. Test: fast/forms/fieldset/validation-in-fieldset.html * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::disabledAttributeChanged): - Do not traverse this. - Calls ancestorDisabledStateWasChanged() instead of setNeedsStyleRecalc() because we'd like to do additional tasks. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged): Added. Just calls disabledAttributeChanged(). (WebCore::HTMLFormControlElement::parseAttribute): Do not call setNeedsWillValidateCheck() whenever an attribute is updated. It should be called only if disabled or readonly attribute is updated. (WebCore::HTMLFormControlElement::disabledAttributeChanged): Add setNeedsWillValidateCheck(). It was moved from parseAttribute(). (WebCore::HTMLFormControlElement::insertedInto): Invalidate ancestor information. (WebCore::HTMLFormControlElement::recalcWillValidate): Use disabled() instead of m_disabled. disabled() takes care of ancestor's disabled state. * html/HTMLFormControlElement.h: (HTMLFormControlElement): 2012-05-28 Rakesh KN <rakesh.kn@motorola.com> [Forms] HTMLFieldSetElement.idl doesn't have elements attribute. https://bugs.webkit.org/show_bug.cgi?id=80110 Reviewed by Kent Tamura. Implemented elements attribute for HTMLFieldSetElement. This is spec'ed at http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-fieldset-elements Tests: fast/forms/fieldset/fieldset-elements.html fast/forms/fieldset/fieldset-form-collection-radionode-list.html * dom/Node.cpp: (WebCore::Node::radioNodeList): Extended ASSERT to assert if not HTMLFieldSetElement or HTMLFormElement. * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::elements): Elements attribute implementation. (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): Update the formcontrol elements collections if dom tree got modified. (WebCore::HTMLFieldSetElement::associatedElements): FormControl elements collection accessor. (WebCore::HTMLFieldSetElement::length): Number of elements in the fieldset group. * html/HTMLFieldSetElement.h: Added elements collection member and form control collection members. * html/HTMLFieldSetElement.idl: Added elements attribute. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::formControlElements): Added support for HTMLFieldSetElement, based on base element type gets its associated elements. (WebCore::HTMLFormCollection::numberOfFormControlElements): Ditto (WebCore::HTMLFormCollection::getNamedFormItem): Process image elements only for form element. (WebCore::HTMLFormCollection::updateNameCache): Ditto * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): DynamicSubTree root element is decided based on the type whether base element is form or fieldset element. Renamed m_formElement to m_baseElement. (WebCore::RadioNodeList::~RadioNodeList): Renamed m_formElement to m_baseElement. (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter): Form element specific changes moved under form element check. * html/RadioNodeList.h: (WebCore::RadioNodeList::create): (RadioNodeList): Renamed m_formElement to m_baseElement. 2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail https://bugs.webkit.org/show_bug.cgi?id=80135 Reviewed by Rob Buis. RIM PR: 145660 Fixed a regression introduced by r111810, we should cancel the new request when user press cancel button in http authentication challenge dialog, and we should also allow sending empty username and password with the request. Also removed redundant codes which checked the existence of the FrameLoaderClient pointer, as we've already moved authenticationChallenge() out of class FrameLoaderClient, it is not needed. Manual test added. Testing http authentication dialog relies on user interaction. Resubmit the patch reverted by r115104 after the digest infinite loop issue for BlackBerry porting get identified and fixed. Internally reviewed by Joe Mason <jmason@rim.com> * platform/blackberry/PageClientBlackBerry.h: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] http authentication challenge issue when loading favicon https://bugs.webkit.org/show_bug.cgi?id=87665 Reviewed by Rob Buis. Provide the TargetType when generating a favicon loading request. Loading favicons is triggered after the main resource has been loaded and parsed, so if we cancel the authentication challenge when loading main resource, we should also cancel loading the favicon when it starts to load. If not we will receive another challenge after we canceled the main resource loading, which may confuse the user. Internally reviewed by Joe Mason <jmason@rim.com> No new tests because of no behavior changes. * loader/icon/IconLoader.cpp: (WebCore::IconLoader::startLoading): * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-05-28 MORITA Hajime <morrita@google.com> Rename FrameLoaderClient::shadowDOMAllowed() to allowShadowDOM() https://bugs.webkit.org/show_bug.cgi?id=87101 Reviewed by Kentaro Hara. No new tests. No behavior change. * bindings/generic/ContextEnabledFeatures.cpp: (WebCore::ContextEnabledFeatures::shadowDOMEnabled): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowShadowDOM): 2012-05-28 David Barton <dbarton@mathscribe.com> mathml/presentation/mo-stretch.html and mroot-pref-width.html tests fail on Mac https://bugs.webkit.org/show_bug.cgi?id=86786 Reviewed by Darin Adler. The fix to https://bugs.webkit.org/show_bug.cgi?id=84167 changed inline-table baselines, including for <mtable>. We therefore have to correct <mtable>'s vertical-align CSS property. Tested by existing tests mo-stretch.html, row-alignment.xhtml, and tables.xhtml. * css/mathml.css: (mtable): 2012-05-28 Luke Macpherson <macpherson@chromium.org> Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability. https://bugs.webkit.org/show_bug.cgi?id=87078 Reviewed by Darin Adler. This patch implements a number of improvements to filteredProperties: 1) Make the code more linearly readable by separating out handling of important and non-important properties. 2) Eliminate one BitArray instance (reduces hot memory so more cache friendly). 3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property. The key algorithmic change is to add properties in decreasing precedence: a) Iterating once per (important, !important) so that important properties are visited first. b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence. Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list. In particular fast/css contains test cases for important corner cases like duplicated important properties. * css/CSSParser.cpp: (WebCore::CSSParser::createStylePropertySet): * css/CSSProperty.h: Add vector traits so that CSSProperty can just be memset by vector without calling constructor. 2012-05-28 MORITA Hajime <morrita@google.com> Can't edit <input> elements with :first-letter https://bugs.webkit.org/show_bug.cgi?id=87615 Reviewed by Kent Tamura. A check using canHaveGeneratedChildren() should cover not only button and menulist, but also RenderTextControl. This change pulles canHaveGeneratedChildren() up from RenderDeprecatedFlexibleBox to RenderObject, and lets RenderTextControl override it. Test: fast/forms/input-first-letter-edit.html * rendering/RenderBlock.cpp: (WebCore): (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderBlock.h: Removed a static function canHaveGeneratedChildren() (RenderBlock): * rendering/RenderDeprecatedFlexibleBox.h: * rendering/RenderObject.cpp: (WebCore): (WebCore::RenderObject::canHaveGeneratedChildren): Added. * rendering/RenderObject.h: (RenderObject): * rendering/RenderTextControl.h: 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Add support for layers with scale invariant size https://bugs.webkit.org/show_bug.cgi?id=87601 Reviewed by Rob Buis. To support layers that have a "floating" appearance, i.e. don't change size when the web page is drawn at a different scale, we add a new layer property named "sizeIsScaleInvariant". The anchor position will still be given in document coordinates for these "floating" layers, so this is well suited for interface elements like selection handles whose size is always the same but move with the web page contents. PR #156812 * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::setDrawTransform): (WebCore::LayerCompositingThread::drawTextures): (WebCore::LayerCompositingThread::drawMissingTextures): * platform/graphics/blackberry/LayerCompositingThread.h: (LayerCompositingThread): * platform/graphics/blackberry/LayerCompositingThreadClient.h: (LayerCompositingThreadClient): (WebCore::LayerCompositingThreadClient::drawMissingTextures): * platform/graphics/blackberry/LayerData.h: (WebCore::LayerData::LayerData): (WebCore::LayerData::sizeIsScaleInvariant): (LayerData): * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::LayerRenderer): (WebCore::LayerRenderer::compositeLayers): (WebCore::LayerRenderer::updateLayersRecursive): (WebCore::LayerRenderer::compositeLayersRecursive): * platform/graphics/blackberry/LayerRenderer.h: (LayerRenderer): * platform/graphics/blackberry/LayerTiler.cpp: (WebCore::LayerTiler::updateTextureContentsIfNeeded): (WebCore::LayerTiler::drawTextures): (WebCore::LayerTiler::drawMissingTextures): (WebCore::LayerTiler::drawTexturesInternal): * platform/graphics/blackberry/LayerTiler.h: (LayerTiler): * platform/graphics/blackberry/LayerWebKitThread.h: (WebCore::LayerWebKitThread::setSizeIsScaleInvariant): (LayerWebKitThread): 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Make it possible to manipulate layers on the compositing thread https://bugs.webkit.org/show_bug.cgi?id=87602 Reviewed by Rob Buis. Normally, layers are manipulated on the WebKit thread, and the changes are synced to the compositing thread during the next accelerated compositing commit operation. However, for overlay layers the ability to manipulate layers on the compositing thread is necessary for adequate user interface responsiveness. Two mechanisms are added: 1. For a layer with a WebKit-thread counterpart, you can temporarily override attributes or add animations whose output override attributes. 2. For a layer with no WebKit-thread counterpart, you can now directly set the compositing thread values for attributes. If you attempt to do this for layers that do have a WebKit-thread counterpart, the compositing thread values will be overwritten at the time of the next commit, which makes the override mechanism more useful there. PR #156812 * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::addSublayer): (WebCore): (WebCore::LayerCompositingThread::updateAnimations): (WebCore::LayerCompositingThread::removeAnimation): (WebCore::LayerCompositingThread::override): (WebCore::LayerCompositingThread::clearOverride): * platform/graphics/blackberry/LayerCompositingThread.h: (LayerOverride): (WebCore::LayerOverride::create): (WebCore::LayerOverride::setPosition): (WebCore::LayerOverride::setAnchorPoint): (WebCore::LayerOverride::setBounds): (WebCore::LayerOverride::setTransform): (WebCore::LayerOverride::setOpacity): (WebCore::LayerOverride::addAnimation): (WebCore::LayerOverride::LayerOverride): (WebCore): (LayerCompositingThread): (WebCore::LayerCompositingThread::setPosition): (WebCore::LayerCompositingThread::setAnchorPoint): (WebCore::LayerCompositingThread::setBounds): (WebCore::LayerCompositingThread::setSizeIsScaleInvariant): (WebCore::LayerCompositingThread::setTransform): (WebCore::LayerCompositingThread::setOpacity): (WebCore::LayerCompositingThread::setNeedsTexture): * platform/graphics/blackberry/LayerWebKitThread.cpp: (WebCore::LayerWebKitThread::LayerWebKitThread): (WebCore::LayerWebKitThread::commitOnCompositingThread): * platform/graphics/blackberry/LayerWebKitThread.h: (LayerWebKitThread): (WebCore::LayerWebKitThread::clearOverride): 2012-05-28 Rob Flack <flackr@chromium.org> [chromium] Only increase size of Combo Box Options when displayed on touch screen https://bugs.webkit.org/show_bug.cgi?id=85921 Reviewed by Adam Barth. Adds a flag to set whether the current device is a touch screen, independent of whether touch events are supported and use this for the combo box sizing. No new tests as this is a flag change and covered by existing tests: WebKit/chromium/tests/PopupMenuTest.cpp * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setDeviceSupportsTouch): (WebCore::Settings::deviceSupportsTouch): (Settings): * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::getRowHeight): * platform/chromium/PopupListBox.h: (PopupContainerSettings): * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupMenuChromium::show): 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Make custom compositing thread layers more flexible https://bugs.webkit.org/show_bug.cgi?id=87600 Reviewed by Rob Buis. Introduce a LayerCompositingThreadClient that's used to fine tune the behaviour of custom layers. Let the LayerTiler be a LayerCompositingThreadClient and thus decouple it from LayerCompositingThread. Adjust method signatures to allow a one-to-many relationship between Client and Layer. Remove the old LayerCompositingThread::drawCustom() in favour of this new Client interface. PR #156812 * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::create): (WebCore::LayerCompositingThread::LayerCompositingThread): (WebCore::LayerCompositingThread::~LayerCompositingThread): (WebCore::LayerCompositingThread::deleteTextures): (WebCore::LayerCompositingThread::drawTextures): (WebCore::LayerCompositingThread::hasMissingTextures): (WebCore::LayerCompositingThread::drawMissingTextures): (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded): (WebCore::LayerCompositingThread::bindContentsTexture): (WebCore::LayerCompositingThread::setVisible): (WebCore::LayerCompositingThread::scheduleCommit): * platform/graphics/blackberry/LayerCompositingThread.h: (WebCore): (LayerCompositingThread): * platform/graphics/blackberry/LayerCompositingThreadClient.h: Added. (WebCore): (LayerCompositingThreadClient): (WebCore::LayerCompositingThreadClient::~LayerCompositingThreadClient): (WebCore::LayerCompositingThreadClient::bindContentsTexture): (WebCore::LayerCompositingThreadClient::hasMissingTextures): (WebCore::LayerCompositingThreadClient::drawMissingTextures): (WebCore::LayerCompositingThreadClient::scheduleCommit): * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::drawDebugBorder): * platform/graphics/blackberry/LayerTiler.cpp: (WebCore::LayerTiler::LayerTiler): (WebCore::LayerTiler::layerCompositingThreadDestroyed): (WebCore::LayerTiler::layerVisibilityChanged): (WebCore::LayerTiler::uploadTexturesIfNeeded): (WebCore::LayerTiler::deleteTextures): (WebCore::LayerTiler::scheduleCommit): (WebCore): (WebCore::LayerTiler::bindContentsTexture): * platform/graphics/blackberry/LayerTiler.h: (LayerTiler): (WebCore::LayerTiler::hasMissingTextures): * platform/graphics/blackberry/LayerWebKitThread.cpp: (WebCore::LayerWebKitThread::LayerWebKitThread): * platform/graphics/blackberry/LayerWebKitThread.h: (LayerWebKitThread): 2012-05-25 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled https://bugs.webkit.org/show_bug.cgi?id=42328 Reviewed by Eric Seidel. Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this change will allow more tests to run in WebKitTestRunner and DRT for ports that weren't implementing this function before. This patch also refactors InspectorController::enableProfiler() and InspectorController::disableProfiler() to InspectorController::setProfilerEnabled(bool). * WebCore.exp.in: * inspector/InspectorController.cpp: (WebCore::InspectorController::profilerEnabled): (WebCore::InspectorController::setProfilerEnabled): * inspector/InspectorController.h: (InspectorController): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setJavaScriptProfilingEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-28 Yong Li <yoli@rim.com> Crash on incomplete :not(). https://bugs.webkit.org/show_bug.cgi?id=86673 Reviewed by Antti Koivisto. Add back null-checks for incomplete :not() class which were dropped by r81845. * css/CSSSelector.cpp: (WebCore::CSSSelector::specificityForOneSelector): (WebCore::CSSSelector::selectorText): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): (WebCore::SelectorChecker::determineLinkMatchType): 2012-05-28 Leo Yang <leo.yang@torchmobile.com.cn> FileWriterSync binding should have no static table https://bugs.webkit.org/show_bug.cgi?id=87645 Reviewed by George Staikos. FileWriterSync could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file. Covered by existing test: fast/filesystem/workers/sync-operations.html. * Modules/filesystem/FileWriterSync.idl: 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Add an overlay layer https://bugs.webkit.org/show_bug.cgi?id=87567 Reviewed by Antonio Gomes. The overlay layer allows us to have compositing layers even though the web page is not currently using accelerated compositing. These layers can be used to implement tap highlight, inspector overlay and more. The WebCore changes support the overlay layer functionality in WebKit by making it possible to add animations from the compositing thread without them being instantly overwritten during the next commit. Also a new custom layer type is added, which allow an overlay layer to draw itself using raw OpenGL calls. An instance of a custom subclass of LayerCompositingThread must be provided when creating the LayerWebKitThread. Then, the custom layer can be used as the content layer of a GraphicsLayer, or by itself. Reviewed internally by Filip Spacek. PR #154335 * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::~LayerCompositingThread): (WebCore::LayerCompositingThread::deleteTextures): (WebCore::LayerCompositingThread::drawTextures): (WebCore::LayerCompositingThread::drawMissingTextures): (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded): (WebCore::LayerCompositingThread::setVisible): (WebCore::LayerCompositingThread::scheduleCommit): * platform/graphics/blackberry/LayerCompositingThread.h: (WebCore::LayerCompositingThread::addAnimation): (WebCore::LayerCompositingThread::setRunningAnimations): (WebCore::LayerCompositingThread::setSuspendedAnimations): (LayerCompositingThread): (WebCore::LayerCompositingThread::drawCustom): * platform/graphics/blackberry/LayerData.h: (LayerData): * platform/graphics/blackberry/LayerWebKitThread.cpp: (WebCore::LayerWebKitThread::LayerWebKitThread): (WebCore): (WebCore::LayerWebKitThread::~LayerWebKitThread): (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded): (WebCore::LayerWebKitThread::startAnimations): (WebCore::LayerWebKitThread::commitOnCompositingThread): (WebCore::LayerWebKitThread::setNeedsDisplayInRect): (WebCore::LayerWebKitThread::setNeedsDisplay): (WebCore::LayerWebKitThread::setIsMask): (WebCore::LayerWebKitThread::setRunningAnimations): (WebCore::LayerWebKitThread::setSuspendedAnimations): * platform/graphics/blackberry/LayerWebKitThread.h: (LayerWebKitThread): 2012-05-28 Leo Yang <leo.yang@torchmobile.com.cn> ProgressEvent JSC binding should have no static table https://bugs.webkit.org/show_bug.cgi?id=87365 Reviewed by George Staikos. ProgressEvent could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file. Covered by existing test: fast/filesystem/workers/file-writer-events.html. * dom/ProgressEvent.idl: 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Update WebPageCompositor::render() API https://bugs.webkit.org/show_bug.cgi?id=87565 Reviewed by Rob Buis. The new API allows the embedder to specify the root transform and many OpenGL related parameters. Also refactor the code to allow several sets of layers to be rendered, and to allow interleaving the rendering of layers with rendering of buffers and checkerboard. Reviewed internally by Filip Spacek. PR #154334 * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::drawTextures): (WebCore::LayerCompositingThread::drawSurface): * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::orthoMatrix): (WebCore::LayerRenderer::LayerRenderer): (WebCore::LayerRenderer::prepareFrame): (WebCore): (WebCore::LayerRenderer::setViewport): (WebCore::LayerRenderer::compositeLayers): (WebCore::LayerRenderer::compositeBuffer): (WebCore::LayerRenderer::drawCheckerboardPattern): (WebCore::LayerRenderer::drawLayersOnSurfaces): (WebCore::LayerRenderer::prepareFrameRecursive): (WebCore::LayerRenderer::updateLayersRecursive): (WebCore::LayerRenderer::compositeLayersRecursive): (WebCore::LayerRenderer::updateScissorIfNeeded): (WebCore::LayerRenderingResults::addHolePunchRect): * platform/graphics/blackberry/LayerRenderer.h: (LayerRenderer): 2012-05-28 Antti Koivisto <antti@apple.com> REGRESSION(r96517): Attribute selector fails to match dynamically modified style attribute https://bugs.webkit.org/show_bug.cgi?id=87349 Reviewed by Andreas Kling. Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching style attribute are rare, disallow them from the fast path rather than making it more branchy. Test: fast/css/dynamic-style-attribute-query.html * css/SelectorChecker.cpp: (WebCore::isFastCheckableMatch): 2012-05-28 Peter Rybin <peter.rybin@gmail.com> Web Inspector: Expose function (closure) scopes in remote protocol https://bugs.webkit.org/show_bug.cgi?id=86861 Reviewed by Yury Semikhatsky. A data transfer from V8's FunctionMirror via DebuggerScript.js via InjectedScriptHost is built. Scope field is added to protocol declaration similar to scopes of stack call frame. Test for function details is extended. JSC code binging got fixme for implemting the corresponding feature. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::functionDetails): * bindings/v8/DebuggerScript.js: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::functionScopes): (WebCore): * bindings/v8/ScriptDebugServer.h: (ScriptDebugServer): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::functionDetailsCallback): * inspector/InjectedScriptHost.cpp: (WebCore): (WebCore::InjectedScriptHost::scriptDebugServer): * inspector/InjectedScriptHost.h: (WebCore): (WebCore::InjectedScriptHost::init): (InjectedScriptHost): * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): 2012-05-28 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Add a constructor to create a Path from an SkPath https://bugs.webkit.org/show_bug.cgi?id=87566 Reviewed by Antonio Gomes. Skia allows the creation of more complex paths than WebCore would allow. This will be used in the BlackBerry port to implement a default tap highlight appearance. Reviewed internally by Mike Lattanzio. PR #154329 * platform/graphics/Path.h: (Path): * platform/graphics/skia/PathSkia.cpp: (WebCore): (WebCore::Path::Path): 2012-05-28 Alexis Menard <alexis.menard@openbossa.org> Unreviewed build fix for Mac on Lion. * inspector/CodeGeneratorInspector.py: 2012-05-28 Keishi Hattori <keishi@webkit.org> Expose value localization function of HTMLInputElement https://bugs.webkit.org/show_bug.cgi?id=84356 Reviewed by Kent Tamura. No new tests. We want to localize the values that are defined in the datalist element. This adds HTMLInputElement::localizeValue() which will localize a given value. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::localizeValue): (WebCore): (WebCore::BaseDateAndTimeInputType::visibleValue): * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::localizeValue): (WebCore): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::localizeValue): (WebCore): * html/InputType.h: (InputType): * html/NumberInputType.cpp: (WebCore::NumberInputType::localizeValue): (WebCore): (WebCore::NumberInputType::visibleValue): * html/NumberInputType.h: (NumberInputType): 2012-05-28 Yury Semikhatsky <yurys@chromium.org> Unreviewed. Test fix after r118670: saved timeline data may not have DOM counters data and MemoryStatistics object should take this into account. * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype._onRecordAdded): 2012-05-28 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118580. http://trac.webkit.org/changeset/118580 https://bugs.webkit.org/show_bug.cgi?id=87647 Caused webkit_unit_tests to crash on chromium. (Requested by bulach on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): (WebCore::ContentLayerPainter::ContentLayerPainter): (ContentLayerPainter): (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/TiledLayerChromium.cpp: (UpdatableTile): (WebCore::UpdatableTile::UpdatableTile): (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/TiledLayerChromium.h: (TiledLayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): 2012-05-28 Peter Beverloo <peter@chromium.org> Æ doesn't get rendered as U+00C6 https://bugs.webkit.org/show_bug.cgi?id=87465 Reviewed by Adam Barth. The if-statement to check whether the first entry of a certain letter already exists in the index used .get(). The very first alphabetical entry is in position "0", which evaluates to false, causing the first entry to be ignored. Instead, use a "x not in y" check here. Also update WebCore.gyp to list the create-html-entity-table script as an input for the action, to make sure the table will be recreated. Test: html5lib/resources/entities02.dat * WebCore.gyp/WebCore.gyp: * html/parser/create-html-entity-table: 2012-05-28 Yury Semikhatsky <yurys@chromium.org> Web Inspector: dom counters graphs vanish on switching between timeline views https://bugs.webkit.org/show_bug.cgi?id=87628 Reviewed by Vsevolod Vlasov. MemoryStatistics object now listens to the TimelineModel events instead of being populated by timeline panel. This behavior mathes that of the overview pane. * inspector/front-end/MemoryStatistics.js: (WebInspector.MemoryStatistics.prototype.addTimlineEvent): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): 2012-05-28 Marcus Bulach <bulach@chromium.org> [chromium] Buildfix: remove obsolete file from gypi. https://bugs.webkit.org/show_bug.cgi?id=87643 Reviewed by no-reviewer. Following http://trac.webkit.org/changeset/118610. Removes reference to platform/graphics/gstreamer/ImageGStreamerCG.mm * WebCore.gypi: 2012-05-28 MORITA Hajime <morrita@google.com> HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach() https://bugs.webkit.org/show_bug.cgi?id=87608 Reviewed by Kent Tamura. Moved m_validationMessage clearance from detach() to removedFrom() and remove detach(). No new tests. This change has no visible difference. Upcoming changes rely on this though. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFrom): 2012-05-28 Yury Semikhatsky <yurys@chromium.org> Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling https://bugs.webkit.org/show_bug.cgi?id=87624 Reviewed by Vsevolod Vlasov. Keep record button state in sync with the current profiling state. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.toggleRecordButton): 2012-05-28 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118650. http://trac.webkit.org/changeset/118650 https://bugs.webkit.org/show_bug.cgi?id=87639 Patch caused massive failures throughout the builders (Requested by zdobersek on #webkit). * css/MediaQuery.cpp: (WebCore): (WebCore::MediaQuery::serialize): (WebCore::MediaQuery::MediaQuery): (WebCore::MediaQuery::cssText): * css/MediaQuery.h: (WebCore::MediaQuery::expressions): (WebCore::MediaQuery::mediaType): (MediaQuery): (WebCore::MediaQuery::copy): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator::eval): (WebCore::aspect_ratioMediaFeatureEval): (WebCore::device_aspect_ratioMediaFeatureEval): (WebCore::transform_3dMediaFeatureEval): (WebCore::view_modeMediaFeatureEval): (WebCore::createFunctionMap): * css/MediaQueryEvaluator.h: (WebCore): (MediaQueryEvaluator): * css/StyleResolver.cpp: (WebCore): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (MediaQueryResult): (WebCore::MediaQueryResult::MediaQueryResult): (WebCore): (StyleResolver): 2012-05-28 Gyuyoung Kim <gyuyoung.kim@samsung.com> Move allowRoundingHacks to Internals interface https://bugs.webkit.org/show_bug.cgi?id=87328 Reviewed by Hajime Morita. Add allowRoundingHacks function, because it is able to work in the cross-port way by means of the Internals interface. In addition, a function is added in order to restore default setting values. No new tests, since we are improving here the infra-structure for testing a specific method. * testing/Internals.cpp: (WebCore::Internals::reset): (WebCore): (WebCore::Internals::resetDefaultsToConsistentValues): (WebCore::Internals::allowRoundingHacks): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn> [BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog https://bugs.webkit.org/show_bug.cgi?id=87579 Reviewed by George Staikos. In function NetworkJob::startNewJobWithRequest, We should cancel the NetworkJob first before we start a new NetworkJob which reuses the resource handle of the old one. If we only set the m_handle = 0 of the old NetworkJob without cancelling itself, it will still receives data notification from network thread and handles the received data with the released resource handler, which will cause the crash. No new tests because no behavior has changed. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::startNewJobWithRequest): 2012-05-27 MORITA Hajime <morrita@google.com> [Refactoring][ShadowDOM] Some ElementShadow methods can be inlined. https://bugs.webkit.org/show_bug.cgi?id=87617 Reviewed by Kentaro Hara. Inlined ElementShadow::attachHost(), ElementShadow::detachHost() and ElementShadow::reattach() No new tests. No behavior change. * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * dom/ElementShadow.cpp: (WebCore::ElememtnShadow::reattachHostChildrenAndShadow): * dom/ElementShadow.h: (ElementShadow): 2012-05-28 Peter Rybin <peter.rybin@gmail.com> Web Inspector: CodeGeneratorInspector.py: protect typed API from C++ implicit float to int cast https://bugs.webkit.org/show_bug.cgi?id=87183 Reviewed by Yury Semikhatsky. An intermediate C++ class is introduced that uses C++ template technique to control actual type of its constructor argument. All input parameters of type "int" now have type ExactlyInt. All usage sites are fixed accordingly. * inspector/CodeGeneratorInspector.py: (TypeModel.RefPtrBased): (TypeModel.Enum): (TypeModel.ValueType): (TypeModel.ValueType.get_opt_output_type_): (TypeModel.ValueType.ValueOptional.get_command_return_pass_model): (TypeModel.ExactlyInt): (TypeModel.ExactlyInt.__init__): (TypeModel.ExactlyInt.get_input_param_type_text): (TypeModel.ExactlyInt.get_opt_output_type_): (TypeModel.init_class): (ExactlyInt): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::enable): (WebCore::InspectorAgent::didCreateWorker): (WebCore::InspectorAgent::didDestroyWorker): (WebCore::InspectorAgent::evaluateForTestInFrontend): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus): (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorMemoryAgent.cpp: (WebCore::jsHeapInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::notifyContextCreated): 2012-05-28 Kentaro Hara <haraken@chromium.org> Unreviewed. Rebaselined run-binding-tests results. * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObjectOwner::finalize): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::JSTestCustomNamedGetterOwner::finalize): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructorOwner::finalize): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTargetOwner::finalize): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestExceptionOwner::finalize): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceOwner::finalize): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerOwner::finalize): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorOwner::finalize): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjOwner::finalize): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): 2012-05-28 Darin Adler <darin@apple.com> StyleResolver need not allocate each MediaQueryResult on the heap https://bugs.webkit.org/show_bug.cgi?id=75223 Reviewed by Daniel Bates. * css/MediaQuery.cpp: Removed some comments that pointed to CSS documents. There is no guarantee these links will be valid over time. (WebCore::MediaQuery::MediaQuery): Rewrote for clarity, conventional WebKit coding style, and simplicity. (WebCore::MediaQuery::copy): Moved out of line; not performance critical, and this allows us to cut down header dependencies. (WebCore::MediaQuery::cssText): Updated for change to data member name. * css/MediaQuery.h: Removed unneeded includes. Removed non-helpful argument name "exprs". Changed expressions function to return a reference instead of a pointer. Changed mediaType and cssText functions to return a reference. Renamed m_serializationCache to m_serializedQuery. Moved copy function out of header. * css/MediaQueryEvaluator.cpp: Renamed EvalFunc to MediaFeatureEvaluationFunction. Broke a FIXME into three and reworded for clarity. (WebCore::MediaQueryEvaluator): Updated for name changes. (WebCore::MediaQueryEvaluator::eval): Rewrote this for clarity and to regularize the logic a bit. (WebCore::aspect_ratioMediaFeatureEval): Got rid of a != 0 that is contrary to the normal WebKit style. (WebCore::device_aspect_ratioMediaFeatureEval): Ditto. (WebCore::transform_3dMediaFeatureEval): Fixed mangled #if that was here. (WebCore::view_modeMediaFeatureEval): Replaced UNUSED_PARAM usage with ASSERT_UNUSED. (WebCore::createFunctionMap): Changed this so it returns the map so we can use a cleaner style in the caller. (WebCore::MediaQueryEvaluator::eval): Updated to take a reference and improved the comments and coding style a bit. * css/MediaQueryEvaluator.h: Updated comment style. Removed unused constructor. Removed unneeded destructor declaration. Renamed m_expResult to m_mediaFeatureResult. * css/StyleResolver.cpp: Moved the MediaQueryResult class into this file and made it a structure rather than a class. (WebCore::StyleResolver::addViewportDependentMediaQueryResult): Updated to take a reference argument instead of a pointer and for the new vector type. (WebCore::StyleResolver::affectedByViewportChange): Updated for above changes. * css/StyleResolver.h: Removed many unneeded includes and forward declarations of classes, including now-unneeded include of MediaQueryExp.h. Replaced MediaQueryResult definition with a forward declaration. Changed addViewportDependentMediaQueryResult to take a reference instead of a pointer. Changed m_viewportDependentMediaQueryResults to be a vector of values rather than of pointers. 2012-05-27 Shinya Kawanaka <shinyak@chromium.org> cut, copy or paste event won't be fired in Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87352 Reviewed by Dimitri Glazkov. cut, copy or paste event was not fired in Shadow DOM. Since event re-targeting has been implemented, it should be safe to fire them in Shadow DOM now. Tests: fast/dom/shadow/cppevent-in-shadow.html fast/dom/shadow/cppevent-input-in-shadow.html * editing/Editor.cpp: (WebCore::Editor::findEventTargetFrom): 2012-05-27 Hayato Ito <hayato@chromium.org> Support multiple shadow roots in event dispatching. https://bugs.webkit.org/show_bug.cgi?id=87470 Reviewed by Dimitri Glazkov. The current implementation does not set event's target correctly if an event happens on DOM tree with multiple shadow roots. So this patch updates an event re-targeting algorithm so that it works even if it is applied to multiple shadow roots. Tests: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseParentIncludingInsertionPointAndShadowRoot): * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::ensureEventAncestors): 2012-05-27 Benjamin Poulain <benjamin@webkit.org> Minor code cleaning for the interface of MainResourceLoader https://bugs.webkit.org/show_bug.cgi?id=87607 Reviewed by Darin Adler. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::MainResourceLoader): (WebCore::MainResourceLoader::handleSubstituteDataLoadNow): (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon): * loader/MainResourceLoader.h: (MainResourceLoader): -Add the OVERRIDE keyword for the methods inherited from ResourceLoader. -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist. -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should only be used by handleSubstituteDataLoadSoon() and indirectly through the timer. 2012-05-27 Yoshifumi Inoue <yosin@chromium.org> [WTF] Introduce UINT64_C to MathExtras.h https://bugs.webkit.org/show_bug.cgi?id=87485 Reviewed by Kent Tamura. This patch introduces UINT64_C for all platforms to avoid using conditional compilation. No new tests. This patch doesn't change behavior. * Modules/websockets/WebSocketFrame.cpp: (WebCore::WebSocketFrame::parseFrame): Replace conditional compilation with UINT64_C. 2012-05-27 Luke Macpherson <macpherson@chromium.org> Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables. https://bugs.webkit.org/show_bug.cgi?id=87462 Reviewed by Dimitri Glazkov. Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation. This will allow future code to re-use the array of transform names, and StringBuilder is generally faster. Covered by existing CSS transform tests. * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customCssText): 2012-05-27 Arvid Nilsson <anilsson@rim.com> [BlackBerry] Update color for tap highlight and selection https://bugs.webkit.org/show_bug.cgi?id=87606 Reviewed by Antonio Gomes. PR #154813 * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::platformTapHighlightColor): (WebCore::RenderThemeBlackBerry::platformActiveSelectionBackgroundColor): 2012-05-27 Benjamin Poulain <bpoulain@apple.com> When pages are loaded from AppCache with DeferredLoading, willSendRequest() is never called https://bugs.webkit.org/show_bug.cgi?id=87582 Reviewed by Darin Adler. Previously, there was a shortcut when a deferred MainResourceLoader is resumed: If the data was coming from AppCache we could jump directly to startDataLoadTimer(). The problem with the shortcut is willSendRequest() is never called in that particular case (substituteData + deferred-resume). The imbalance between willSendRequest() and didReceiveResponse() causes problems. This patch removes the shortcut so that MainResourceLoader::loadNow() is used regardless of the deferred loading. The method MainResourceLoader::loadNow() handle the substituteData as if the loading was not deferred. Test: http/tests/appcache/load-from-appcache-defer-resume-crash.html * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon): Rename the method to be consistent with the attribute it uses, making the naming more explicit. (WebCore::MainResourceLoader::loadNow): (WebCore::MainResourceLoader::setDefersLoading): * loader/MainResourceLoader.h: (MainResourceLoader): 2012-05-27 David Kilzer <ddkilzer@apple.com> Use xcrun to find gperf path on platforms that use Xcode <http://webkit.org/b/87587> Reviewed by Dan Bernstein. * WebCore.xcodeproj/project.pbxproj: (Generate Derived Sources): Set GPERF environment variable using xcrun. * css/makeprop.pl: Use GPERF environment variable if set, else "gperf". * css/makevalues.pl: Ditto. * make-hash-tools.pl: Ditto. 2012-05-27 Li Yin <li.yin@intel.com> [FileAPI] FileReader should fire progress event when blob has been completely read into memory https://bugs.webkit.org/show_bug.cgi?id=87585 Reviewed by Kentaro Hara. From Spec: http://www.w3.org/TR/FileAPI/#dfn-progress-event One progress event will fire when blob has been completely read into memory. Firefox, Opera and IE follows the spec. Webkit based browser doesn't do that, it only fires progress event at interval of 50ms. WebKit should add the behavior to make the conformance with the spec. Tests: fast/files/file-reader-event-listener.html * fileapi/FileReader.cpp: (WebCore::FileReader::didFinishLoading): 2012-05-26 Li Yin <li.yin@intel.com> [FileAPI] The result attribute of FileReader shuold use null to replace empty string https://bugs.webkit.org/show_bug.cgi?id=87578 Reviewed by Kentaro Hara. From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr Before read method has been called or an error in reading has occurred, the result attribute should be null, not empty string. Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based browser don't. WebKit should change the returned value empty string into null to keep conformance with the spec. Tests: fast/files/read-file-async.html fast/files/blob-slice-test.html fast/files/read-blob-async.html fast/files/workers/worker-read-blob-async.html fast/files/workers/worker-read-file-async.html * fileapi/FileReader.cpp: (WebCore::FileReader::stringResult): 2012-05-26 Andy Estes <aestes@apple.com> Fix the build when NETSCAPE_PLUGIN_API is disabled by marking a parameter as unused. * plugins/PluginData.cpp: (WebCore::PluginData::initPlugins): 2012-05-26 Nate Chapin <japhet@chromium.org> Cancel CachedResource loads when the last client is removed. https://bugs.webkit.org/show_bug.cgi?id=35377 Reviewed by Darin Adler. Test: http/tests/cache/cancel-in-progress-load.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::errorLoadingResource): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::allClientsRemoved): * loader/cache/CachedFont.cpp: (WebCore::CachedFont::allClientsRemoved): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::allClientsRemoved): * loader/cache/CachedRawResource.cpp: (WebCore): * loader/cache/CachedRawResource.h: (WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::allClientsRemoved): (WebCore): * loader/cache/CachedResource.h: (CachedResource): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::allClientsRemoved): 2012-05-26 Simon Fraser <simon.fraser@apple.com> fast/block/inline-children-root-linebox-crash.html asserts after r118567 https://bugs.webkit.org/show_bug.cgi?id=87544 Reviewed by Darin Adler. RenderInline::offsetFromContainer() set offsetDependsOnPoint to true based on the container's flipped writing mode. However, offsetFromContainer() would then overwrite that, since it only checked for columns. Fix by having RenderInline::offsetFromContainer() check for flipping on the container. This fixes the assertion. The new testcase exercises fixes another issue; unlike mapLocalToAbsolute(), RenderGeometryMap::absoluteRect() didn't pass the rect center point through the mapping, which resulted in a different result in some flipping cases. Test: compositing/geometry/flipped-blocks-inline-mapping.html * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::absoluteRect): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetFromContainer): (WebCore::RenderInline::pushMappingToContainer): 2012-05-26 Geoffrey Garen <ggaren@apple.com> WebKit should be lazy-finalization-safe (esp. the DOM) v2 https://bugs.webkit.org/show_bug.cgi?id=87581 Reviewed by Oliver Hunt. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::destroy): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::destroy): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::destroy): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNodeOwner::finalize): * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::destroy): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObject::destroy): (WebCore::JSTestActiveDOMObjectOwner::finalize): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::JSTestCustomNamedGetter::destroy): (WebCore::JSTestCustomNamedGetterOwner::finalize): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructor::destroy): (WebCore::JSTestEventConstructorOwner::finalize): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTarget::destroy): (WebCore::JSTestEventTargetOwner::finalize): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::JSTestException::destroy): (WebCore::JSTestExceptionOwner::finalize): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::destroy): (WebCore::JSTestInterfaceOwner::finalize): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::destroy): (WebCore::JSTestMediaQueryListListenerOwner::finalize): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructor::destroy): (WebCore::JSTestNamedConstructorOwner::finalize): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::destroy): (WebCore::JSTestObjOwner::finalize): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::destroy): (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::destroy): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::destroy): * bridge/qt/qt_runtime_qt4.cpp: (JSC::Bindings::QtRuntimeMethod::destroy): * bridge/runtime_array.cpp: (JSC::RuntimeArray::destroy): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::destroy): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::destroy): * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::finalize): Use static_cast instead of jsCast because jsCast does Structure-based validation, and our Structure is not guaranteed to be alive when we get finalized. 2012-05-26 Simon Fraser <simon.fraser@apple.com> Clip rects assertion when hovering div with transform https://bugs.webkit.org/show_bug.cgi?id=87580 Reviewed by Eric Seidel. Hit testing used to use temporary clip rects in composited documents, until r118562. Now that we cache clip rects for hit testing, we need to clear the cache on descendant layers when a layer gains or loses a transform. Test: fast/layers/clip-rects-assertion.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateTransform): 2012-05-25 Dan Bernstein <mitz@apple.com> <rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen() https://bugs.webkit.org/show_bug.cgi?id=87571 Reviewed by Anders Carlsson. fakeMouseEventTimerFired() uses the last known mouse position for the fake mouse event, but calls contentsToScreen() to compute a corresponding position in screen coordinates. Avoid this by also recording the last known mouse position in screen coordinates, and using that value. * page/EventHandler.cpp: (WebCore::EventHandler::clear): Added resetting m_currentMouseGlobalPosition. (WebCore::EventHandler::handleMousePressEvent): Added updating m_currentMouseGlobalPosition when updating m_currentMousePosition. (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto. (WebCore::EventHandler::handleMouseMoveEvent): Ditto. (WebCore::EventHandler::handleMouseReleaseEvent): Ditto. (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Changed to use m_currentMouseGlobalPosition in the fake event instead of calling contentsToScreen(). * page/EventHandler.h: Added m_currentMouseGlobalPosition data member. 2012-05-25 Philippe Normand <pnormand@igalia.com> [GStreamer] Remove ImageGStreamerCG implementation https://bugs.webkit.org/show_bug.cgi?id=87559 The ImageGStreamerCG abstraction is being removed until I manage to port my gst-mac WebKit branch over to the WebKit2 mac port. No need to update the XCode project because this file is not referenced there anyway. Reviewed by Martin Robinson. * platform/graphics/gstreamer/ImageGStreamer.h: (ImageGStreamer): * platform/graphics/gstreamer/ImageGStreamerCG.mm: Removed. 2012-05-26 Rob Buis <rwlbuis@webkit.org> Bug 15799: textPath element does not re-render when referenced path changes https://bugs.webkit.org/show_bug.cgi?id=15799 Reviewed by Nikolas Zimmermann. Support textPath updating to changes on the referenced path. To make this possible use the target reference functionality also used by SVGFEImageElement. Tests: svg/custom/textPath-change-id-expected.svg svg/custom/textPath-change-id-pattern-expected.svg svg/custom/textPath-change-id-pattern.svg svg/custom/textPath-change-id.svg svg/custom/textPath-change-id2-expected.svg svg/custom/textPath-change-id2-pattern-expected.svg svg/custom/textPath-change-id2-pattern.svg svg/custom/textPath-change-id2.svg svg/custom/textPath-change-reference-expected.svg svg/custom/textPath-change-reference-pattern-expected.svg svg/custom/textPath-change-reference-pattern.svg svg/custom/textPath-change-reference-using-baseval-expected.svg svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg svg/custom/textPath-change-reference-using-baseval-pattern.svg svg/custom/textPath-change-reference-using-baseval.svg svg/custom/textPath-change-reference.svg svg/custom/textPath-change-reference2-expected.svg svg/custom/textPath-change-reference2-pattern-expected.svg svg/custom/textPath-change-reference2-pattern.svg svg/custom/textPath-change-reference2-using-baseval-expected.svg svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg svg/custom/textPath-change-reference2-using-baseval-pattern.svg svg/custom/textPath-change-reference2-using-baseval.svg svg/custom/textPath-change-reference2.svg svg/custom/textPath-insert-path-expected.svg svg/custom/textPath-insert-path-pattern-expected.svg svg/custom/textPath-insert-path-pattern.svg svg/custom/textPath-insert-path.svg svg/custom/textPath-modify-child-expected.svg svg/custom/textPath-modify-child-pattern-expected.svg svg/custom/textPath-modify-child-pattern.svg svg/custom/textPath-modify-child.svg svg/custom/textPath-path-change-expected.svg svg/custom/textPath-path-change-pattern-expected.svg svg/custom/textPath-path-change-pattern.svg svg/custom/textPath-path-change-using-svg-dom-expected.svg svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg svg/custom/textPath-path-change-using-svg-dom-pattern.svg svg/custom/textPath-path-change-using-svg-dom.svg svg/custom/textPath-path-change.svg svg/custom/textPath-path-change2-expected.svg svg/custom/textPath-path-change2-pattern-expected.svg svg/custom/textPath-path-change2-pattern.svg svg/custom/textPath-path-change2.svg svg/custom/textPath-remove-path-expected.svg svg/custom/textPath-remove-path-pattern-expected.svg svg/custom/textPath-remove-path-pattern.svg svg/custom/textPath-remove-path.svg svg/custom/textPath-set-id-expected.svg svg/custom/textPath-set-id.svg svg/custom/textPath-startoffset-expected.svg svg/custom/textPath-startoffset-pattern-expected.svg svg/custom/textPath-startoffset-pattern.svg svg/custom/textPath-startoffset.svg * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::~SVGTextPathElement): (WebCore): (WebCore::SVGTextPathElement::clearResourceReferences): (WebCore::SVGTextPathElement::svgAttributeChanged): (WebCore::SVGTextPathElement::buildPendingResource): (WebCore::SVGTextPathElement::insertedInto): (WebCore::SVGTextPathElement::removedFrom): * svg/SVGTextPathElement.h: 2012-05-26 Nikolas Zimmermann <nzimmermann@rim.com> Avoid updateFromElement() usage in SVG https://bugs.webkit.org/show_bug.cgi?id=87573 Stop relying on updateFromElement() - instead rely on addChild/removeChild, which allows us to optimize the resources re-fetching. When a child is added to the tree we don't need to remove existing resources from the SVGResourcesCache - the renderer can't be in the cache yet. Similary, remove the entry from the cache earlier: as soon as the renderer is removed from the tree, instead of waiting for willBeDestroyed(). No new tests, refactoring only. * rendering/svg/RenderSVGBlock.cpp: * rendering/svg/RenderSVGBlock.h: (RenderSVGBlock): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::addChild): (WebCore): (WebCore::RenderSVGContainer::removeChild): * rendering/svg/RenderSVGContainer.h: (RenderSVGContainer): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::addChild): (WebCore::RenderSVGInline::removeChild): * rendering/svg/RenderSVGInline.h: (RenderSVGInline): * rendering/svg/RenderSVGModelObject.cpp: * rendering/svg/RenderSVGModelObject.h: (RenderSVGModelObject): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::addChild): (WebCore): (WebCore::RenderSVGRoot::removeChild): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::addChild): (WebCore::RenderSVGText::removeChild): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientStyleChanged): (WebCore::rendererCanHaveResources): (WebCore): (WebCore::SVGResourcesCache::clientWasAddedToTree): (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree): * rendering/svg/SVGResourcesCache.h: (SVGResourcesCache): * svg/SVGStyledElement.cpp: * svg/SVGStyledElement.h: (SVGStyledElement): 2012-05-25 Nat Duca <nduca@chromium.org> [chromium] Instrument V8 GC with TraceEvent https://bugs.webkit.org/show_bug.cgi?id=87530 Reviewed by Kentaro Hara. We sometimes get performance issues where performance stalls can be attributed to badly timed GC operations, especially ones that happen just before a frame running. This adds tracing calls around GC so that we can better understand these kinds of hangs. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::gcEpilogue): 2012-05-25 Garrett Casto <gcasto@chromium.org> Allow WebTextFieldDecoratorClient to see applied decorations. https://bugs.webkit.org/show_bug.cgi?id=86557 Reviewed by Kent Tamura. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::fromShadowRoot): A function that will extract a TextFielDecorationElement from a ShadowRoot, if there is one. * html/shadow/TextFieldDecorationElement.h: (WebCore): (TextFieldDecorator): 2012-05-25 Tony Chang <tony@chromium.org> implement new negative flexing algorithm https://bugs.webkit.org/show_bug.cgi?id=86528 Reviewed by Ojan Vafai. Rather than just scale by the negative flexibility, we also take the flex-basis (preferred size) into consideration. That means items with a larger preferred size will shrink faster. Test: css3/flexbox/flex-algorithm.html (new test cases added) * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Handle overflow. (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeNextFlexLine): Sum weighted negative flex. (WebCore::RenderFlexibleBox::freezeViolations): (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Shrink by weighted amount. Also handle large values by making sure the flex values are finite. * rendering/RenderFlexibleBox.h: 2012-05-25 Mihai Parparita <mihaip@chromium.org> Allow synchronous XHRs to be disabled in documents https://bugs.webkit.org/show_bug.cgi?id=87540 Reviewed by Eric Seidel. Test: fast/xmlhttprequest/xmlhttprequest-sync-disabled.html Synchronous XMLHttpRequests are a problematic API, since they result in blocked UI threads. Some clients may wish to always disable them; give them a setting to do so (see also r103629 for other cases where synchronous XHRs are disabled). * page/Settings.cpp: (WebCore): (WebCore::Settings::Settings): * page/Settings.h: (Settings): (WebCore::Settings::setSyncXHRInDocumentsEnabled): (WebCore::Settings::syncXHRInDocumentsEnabled): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): 2012-05-25 Kinuko Yasuda <kinuko@chromium.org> [chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata https://bugs.webkit.org/show_bug.cgi?id=87492 Reviewed by Adam Barth. No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass. * platform/chromium/FileSystemChromium.cpp: (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::getFileMetadata): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-25 Abhishek Arya <inferno@chromium.org> Crash in RenderTableSection::paintCell. https://bugs.webkit.org/show_bug.cgi?id=87445 Reviewed by Eric Seidel and Julien Chaffraix. Fix the crash by preventing table parts from being set as layout root. This prevents us from accessing removed table cells which can happen if RenderTableSection::layout is called directly without calling RenderTable::layout first (in case of cell recalc). Add ASSERTs to RenderTableSection::layout to prevent layout to happen when we are already pending cell recalc or our table is pending section recalc. In those cases, RenderTable::layout should be called first to relayout the entire table. Test: tables/table-section-overflow-clip-crash.html * rendering/RenderObject.cpp: (WebCore::objectIsRelayoutBoundary): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layout): 2012-05-25 Philip Rogers <pdr@google.com> Fix for self-closing <use> tags https://bugs.webkit.org/show_bug.cgi?id=87504 Reviewed by Adam Barth. This change causes self-closing non-html tags to behave the same as tags immediately followed by the closing tag. Test: svg/custom/svg-self-closing-use.html * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attachLater): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertForeignElement): * html/parser/HTMLConstructionSite.h: (HTMLConstructionSite): 2012-05-25 Dan Bernstein <mitz@apple.com> Make the ICU-based implementation of NonSharedCharacterBreakIterator work in configurations that do not have COMPARE_AND_SWAP enabled. Reviewed by Jessie Berlin. * platform/text/TextBreakIteratorICU.cpp: (WebCore::compareAndSwapNonSharedCharacterBreakIterator): Added this helper. It uses weakCompareAndSwap when COMPARE_AND_SWAP is enabled, and uses a mutex to do the atomic compare and swap otherwise. (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use compareAndSwapNonSharedCharacterBreakIterator(). (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto. 2012-05-25 Tommy Widenflycht <tommyw@google.com> MediaStream API: Make sure IceCallback is valid for PeerConnection00 https://bugs.webkit.org/show_bug.cgi?id=87480 Reviewed by Adam Barth. Existing tests have been extended to cover this change. * Modules/mediastream/PeerConnection00.cpp: (WebCore::PeerConnection00::create): * Modules/mediastream/PeerConnection00.h: * Modules/mediastream/PeerConnection00.idl: 2012-05-25 Mike West <mkwst@chromium.org> Inline script and style blocked by Content Security Policy should provide more detailed console errors. https://bugs.webkit.org/show_bug.cgi?id=86848 Reviewed by Adam Barth. This change adds a URL and line number for context to each call to `ContentSecurityPolicy::allowInline*`, and pipes it through to the console message generation in `CSPDirectiveList::reportViolation`. Line numbers are not added for injected scripts (`document.write(...)`, `document.body.appendChild`, and etc.). Tests: http/tests/security/contentSecurityPolicy/injected-inline-script-allowed.html http/tests/security/contentSecurityPolicy/injected-inline-script-blocked.html http/tests/security/contentSecurityPolicy/injected-inline-style-allowed.html http/tests/security/contentSecurityPolicy/injected-inline-style-blocked.html * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::executeScript): * dom/ScriptElement.h: (ScriptElement): * dom/StyleElement.cpp: (WebCore::StyleElement::StyleElement): (WebCore::StyleElement::createSheet): * dom/StyleElement.h: (StyleElement): * dom/StyledElement.cpp: (WebCore::StyledElement::StyledElement): (WebCore): (WebCore::StyledElement::style): (WebCore::StyledElement::styleAttributeChanged): * dom/StyledElement.h: (StyledElement): * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::reportViolation): (WebCore::CSPDirectiveList::checkInlineAndReportViolation): (WebCore::CSPDirectiveList::checkEvalAndReportViolation): (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): (WebCore::CSPDirectiveList::allowInlineScript): (WebCore::CSPDirectiveList::allowInlineStyle): (WebCore::CSPDirectiveList::allowEval): (WebCore): (WebCore::isAllowedByAllWithCallStack): (WebCore::isAllowedByAllWithContext): (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): (WebCore::ContentSecurityPolicy::allowInlineScript): (WebCore::ContentSecurityPolicy::allowInlineStyle): * page/ContentSecurityPolicy.h: (WTF): 2012-05-25 Tim Horton <timothy_horton@apple.com> ENABLE_CSS3_FLEXBOX is insufficient to disable all web-facing bits of the feature https://bugs.webkit.org/show_bug.cgi?id=87537 <rdar://problem/11524921> Reviewed by Simon Fraser. Allow the feature flag to disable more web-facing parts of the CSS3 flexbox implementation (primarily fallout from hiding it from computed style). * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::asText): * css/StylePropertyShorthand.cpp: (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimation::ensurePropertyMap): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/style/RenderStyleConstants.h: 2012-05-25 Adrienne Walker <enne@google.com> [chromium] Add setting for painting debug info onto tiles https://bugs.webkit.org/show_bug.cgi?id=75763 Reviewed by James Robinson. Add a compile-time CCSetting to paint debug information onto tiles. This can help to understand paint counts and layer indices. This setting is off by default. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::UpdatableTile): (WebCore::UpdatableTile::setUpdateFrame): (WebCore::UpdatableTile::incrementPaintCount): (WebCore::UpdatableTile::updateFrame): (WebCore::UpdatableTile::paintCount): (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::prepareToUpdateTiles): (WebCore::TiledLayerChromium::paintDebugTileInfo): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): 2012-05-25 Ami Fischman <fischman@chromium.org> [chromium] Default media controls should render only the currentTime-containing buffered range https://bugs.webkit.org/show_bug.cgi?id=85925 Reviewed by Eric Carlson. Test: http/tests/media/video-buffered-range-contains-currentTime.html * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaSlider): 2012-05-25 Simon Fraser <simon.fraser@apple.com> Build fix: add TransformationMatrix ctor from an AffineTransform. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::TransformationMatrix): (WebCore): * platform/graphics/transforms/TransformationMatrix.h: (TransformationMatrix): 2012-05-24 Ryosuke Niwa <rniwa@webkit.org> createContextualFragment and insertAdjacentHTML should throw syntax error https://bugs.webkit.org/show_bug.cgi?id=87454 Reviewed by Darin Adler. Before this patch, createContextualFragment threw NOT_SUPPORTED_ERR and insertAdjacentHTML didn't throw any errors. Make them throw SYNTAX_ERR to be consistent with the spec and Firefox: http://html5.org/specs/dom-parsing.html#parsing http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm Also reduced the code duplication. Test: fast/dom/xhtml-fragment-parsing-exceptions.xhtml * dom/Range.cpp: (WebCore::Range::createContextualFragment): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setInnerHTML): Explicitly pass AllowScriptingContent. * editing/markup.cpp: (WebCore::createFragmentFromMarkup): (WebCore::createFragmentForInnerOuterHTML): Takes ExceptionCode now. (WebCore::createContextualFragment): Share code with createFragmentForInnerOuterHTML and propagate the exception code. * editing/markup.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerHTML): Explicitly pass AllowScriptingContent. (WebCore::HTMLElement::setOuterHTML): Ditto. (WebCore::HTMLElement::insertAdjacentHTML): Ditto; also rename ignoredEc to ignoredEC per Darin's comment on the bug 87339. 2012-05-25 John Knottenbelt <jknotten@chromium.org> Body scrollWidth() and scrollHeight() should be page scale-invariant https://bugs.webkit.org/show_bug.cgi?id=87494 RenderView::documentRect() is calculating the "scaled" document rect by applying the current transformation matrix to the unscaledDocumentRect() and then returning the rounded-out IntRect result. This rounding out is incorrect because it allows the scaled rectangle to represent an area that is not actually covered by the document. We fix this by applying the current transform to the document rect as a FloatRect and then explicitly converting to IntRect, which takes the floor of the resulting rectangle coordinates instead of rounding them out. This is evidenced by the document.body.scrollWidth() and document.body.scrollHeight() changing under page scale factor when they are expected to remain invariant. Reviewed by James Robinson. Test: fast/dom/window-scroll-scaling.html * rendering/RenderView.cpp: (WebCore::RenderView::documentRect): 2012-05-25 Dan Bernstein <mitz@apple.com> characterBreakIterator() is not safe to use reentrantly or from multiple threads https://bugs.webkit.org/show_bug.cgi?id=87521 Reviewed by Darin Adler. Replaced characterBreakIterator() with a NonSharedCharacterBreakIterator class, which obtains a unique TextBreakIterator. Replaced the global shared instance with a single-entry cache. * dom/CharacterData.cpp: (WebCore::CharacterData::parserAppendData): Changed to use NonSharedCharacterBreakIterator. * platform/graphics/StringTruncator.cpp: (WebCore::centerTruncateToBuffer): Ditto. (WebCore::rightTruncateToBuffer): Ditto. * platform/text/String.cpp: (WebCore::numGraphemeClusters): Ditto. (WebCore::numCharactersInGraphemeClusters): Ditto. * platform/text/TextBreakIterator.h: Removed the declaration of characterBreakIterator(). (NonSharedCharacterBreakIterator): Added. An instance of this class has a character break iterator instance that is unique to it for the lifetime of the instance. (WebCore::NonSharedCharacterBreakIterator::operator TextBreakIterator*): Added. * platform/text/TextBreakIteratorICU.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Added. Tries to swap the m_iterator member variable with the cached instance. If that fails, initializes m_iterator to a new character break iterator. (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Added. Tries to put the m_iterator member variable back in the cache. If that fails, meaning there is already something in the cache, destroys m_iterator. * platform/text/gtk/TextBreakIteratorGtk.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in TextBreakIteratorICU.cpp. (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto. (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator() here. * platform/text/qt/TextBreakIteratorQt.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in TextBreakIteratorICU.cpp. (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto. (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator() here. * platform/text/wince/TextBreakIteratorWinCE.cpp: (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in TextBreakIteratorICU.cpp. (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto. (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator() here. 2012-05-25 Simon Fraser <simon.fraser@apple.com> Terrible performance on http://alliances.commandandconquer.com/ and http://www.lordofultima.com/ https://bugs.webkit.org/show_bug.cgi?id=84410 Reviewed by Dave Hyatt. First part of fixing O(N^2) issues when walking the RenderLayer tree for computeCompositingRequirements(). For each layer that goes into the OverlapMap, we were computing an absolute layer bounds, which requires walking back to the root of the tree. Optimize this when possible by storing a stack of offsets as we walk the tree, and using this stack to do the mapping. The stack of offsets and transforms is managed by RenderGeometryMap. When visiting a RenderLayer, RenderLayerCompositor pushes onto the geometry map stack data about offsets and transforms between the current layer and its stacking-parent. RenderGeometryMap handles the case where the previous renderer pushed is between the current renderer and its container. RenderGeometryMap can also handle callers pushing renderers with multiple containers between them. RenderGeometryMap stores some flags about whether the set of mapping steps in the stack involve transforms, fixed position, or special non-uniform mappings like CSS columns. In some cases, it falls back to mapping via renderers. Once constructed, the RenderGeometryMap stack can be used to map multiple rects or points efficiently. Stacks consisting of simple offsets are collapsed to a single offset. Mappings between renderers and their containers are pushed by pushMappingToContainer() methods, which are similar to mapLocalToContainer() methods. Having this code in RenderObjects was deemed preferable to handling columns, transforms etc. all in RenderLayer code. Tested by assertions in RenderGeometryMap code that its mapping matches mapping via localToAbsolute() calls. RenderLayerCompositor::updateCompositingLayers() creates a RenderGeometryMap, and pushes and pops layer renderers as it visits them. The geometry map is used by RenderLayerCompositor::addToOverlapMap() when computing absolute layer bounds. Futher optimizations in RenderGeometryMap are possible, especially with stacks that have many offsets and a few transforms. Tests: compositing/geometry/composited-in-columns.html compositing/geometry/flipped-writing-mode.html * CMakeLists.txt: Add RenderGeometryMap * GNUmakefile.list.am: Ditt * Target.pri: Ditto * WebCore.gypi: Ditto * WebCore.vcproj/WebCore.vcproj: Ditto * WebCore.xcodeproj/project.pbxproj: Ditto * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteContentBox): (WebCore::RenderBox::pushMappingToContainer): (WebCore::RenderBox::offsetFromContainer): * rendering/RenderBox.h: * rendering/RenderGeometryMap.cpp: Added. (RenderGeometryMapStep): (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): (WebCore::RenderGeometryMapStep::mapPoint): (WebCore::RenderGeometryMapStep::mapQuad): (WebCore::RenderGeometryMap::RenderGeometryMap): (WebCore::RenderGeometryMap::~RenderGeometryMap): (WebCore::RenderGeometryMap::absolutePoint): (WebCore::RenderGeometryMap::absoluteRect): (WebCore::RenderGeometryMap::mapToAbsolute): (WebCore::RenderGeometryMap::pushMappingsToAncestor): (WebCore::RenderGeometryMap::push): (WebCore::RenderGeometryMap::pushView): (WebCore::RenderGeometryMap::popMappingsToAncestor): (WebCore::RenderGeometryMap::stepInserted): (WebCore::RenderGeometryMap::stepRemoved): * rendering/RenderGeometryMap.h: Added. (RenderGeometryMap): (WebCore::RenderGeometryMap::hasNonUniformStep): (WebCore::RenderGeometryMap::hasTransformStep): (WebCore::RenderGeometryMap::hasFixedPositionStep): * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetFromContainer): (WebCore::RenderInline::pushMappingToContainer): * rendering/RenderInline.h: (RenderInline): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): (WebCore::RenderObject::pushMappingToContainer): (WebCore::RenderObject::offsetFromContainer): (WebCore::RenderObject::container): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::offsetFromContainer): * rendering/RenderTableCell.h: (RenderTableCell): * rendering/RenderView.cpp: (WebCore::RenderView::pushMappingToContainer): * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::pushMappingToContainer): * rendering/svg/RenderSVGForeignObject.h: (RenderSVGForeignObject): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::pushMappingToContainer): * rendering/svg/RenderSVGInline.h: (RenderSVGInline): * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::pushMappingToContainer): * rendering/svg/RenderSVGModelObject.h: (RenderSVGModelObject): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::pushMappingToContainer): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::pushMappingToContainer): * rendering/svg/RenderSVGText.h: (RenderSVGText): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::pushMappingToContainer): * rendering/svg/SVGRenderSupport.h: (SVGRenderSupport): 2012-05-25 Simon Fraser <simon.fraser@apple.com> Cache absolute clip rects on RenderLayer for compositing overlap testing https://bugs.webkit.org/show_bug.cgi?id=87212 Reviewed by Dave Hyatt. Enhance the cache of ClipRects on RenderLayers to store three different types of ClipRects, rather than just one. We need to compute clip rects relative to different layers for different purposes. For painting, we compute relative to the compositing layer which is acting as a painting root. For hit testing, we compute relative to the root, except for transformed layers. For composting overlap testing, we compute relative to the root ("absolute"). At other times, we do one-off computation which we never want to cache ("temporary clip rects"). This change allows us to cache rects for hit testing, and for compositing overlap testing. This has huge performance benefits on some pages (bug 84410). This change also makes ClipRects not arena-allocated, so we can use RefPtr<ClipRect>. No testable behavior change. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::willBeDestroyed): No need for the explicit clipRects teardown, since clipRects don't need a live RenderObject for arena-based destruction. * rendering/RenderLayer.cpp: Remove arena-related new and delete. (WebCore::RenderLayer::RenderLayer): No need to explicitly initialize m_clipRects, since it's an OwnPtr now. (WebCore::RenderLayer::~RenderLayer): No explicit clipRect teardown required. (WebCore::RenderLayer::clippingRootForPainting): Renamed to make its purpose more obvious. (WebCore::RenderLayer::paintLayer): Use the TemporaryClipRects type when necessary. (WebCore::RenderLayer::paintLayerContents): Ditto (WebCore::RenderLayer::hitTestLayer): No longer need to use temporary clipRects when hit testing since we cache clip rects for hit testing. (WebCore::RenderLayer::updateClipRects): Take a ClipRectsType and pass it through. (WebCore::RenderLayer::calculateClipRects): Ditto (WebCore::RenderLayer::parentClipRects): Ditto (WebCore::RenderLayer::backgroundClipRect): Ditto (WebCore::RenderLayer::calculateRects): Take ClipRectsType, which obviates temporaryClipRects. (WebCore::RenderLayer::childrenClipRect): Use clippingRootForPainting(). (WebCore::RenderLayer::selfClipRect): Ditto (WebCore::RenderLayer::localClipRect): Ditto (WebCore::RenderLayer::clearClipRectsIncludingDescendants): Take a type of clip rect to clear (include all). Allows us to just clear painting clip rects. (WebCore::RenderLayer::clearClipRects): * rendering/RenderLayer.h: (WebCore::ClipRects::create): We don't use RefCounted<> in order to use a bit in the refCount for a flag. Add create() method. (WebCore::ClipRects::deref): No longer arena-allocated. (WebCore::ClipRectsCache::ClipRectsCache): Struct that holds a small array of the 3 types of clipRects (and, in debug, the layer relative to which they were computed). (WebCore::RenderLayer::clipRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): Use AbsoluteClipRects; rootLayer is always the RenderView's layer here. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use TemporaryClipRects. (WebCore::RenderLayerBacking::setRequiresOwnBackingStore): When this variable changes, we need to invalidate painting clipRects, since it affects the ancestor relative to which those rects are computed. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): When the composited state of a layer changes, we have to clear all descendant clip rects, since this can affect the layers relative to which clip rects are computed. (WebCore::RenderLayerCompositor::addToOverlapMap): Use AbsoluteClipRects. (WebCore::RenderLayerCompositor::computeCompositingRequirements): No need to call updateLayerPosition(), since that should have always happened after layout. That call cleared clip rects, so removing it is very beneficial. (WebCore::RenderLayerCompositor::clippedByAncestor): Use TemporaryClipRects. * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): Use TemporaryClipRects. 2012-05-25 Dean Jackson <dino@apple.com> Unreviewed, rolling out r112155. http://trac.webkit.org/changeset/112155 https://bugs.webkit.org/show_bug.cgi?id=79389 Hitch (due to style recalc?) when starting CSS3 animation This caused a number of issues, including: https://bugs.webkit.org/show_bug.cgi?id=87146 https://bugs.webkit.org/show_bug.cgi?id=84194 <rdar://problem/11506629> <rdar://problem/11267408> <rdar://problem/11531859> * dom/Element.cpp: (WebCore::Element::recalcStyle): 2012-05-25 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=87525 For the new multi-column layout, create a flow thread and make sure the children get put inside it. Reviewed by Eric Seidel. * rendering/RenderMultiColumnBlock.cpp: (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock): (WebCore::RenderMultiColumnBlock::addChild): (WebCore): * rendering/RenderMultiColumnBlock.h: (WebCore): (RenderMultiColumnBlock): (WebCore::RenderMultiColumnBlock::flowThread): * rendering/RenderMultiColumnFlowThread.cpp: (WebCore::RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread): (WebCore): * rendering/RenderMultiColumnFlowThread.h: (RenderMultiColumnFlowThread): * rendering/RenderMultiColumnSet.h: * rendering/RenderObject.h: (RenderObject): (WebCore::RenderObject::isRenderMultiColumnSet): 2012-05-25 Emil A Eklund <eae@chromium.org> Change RenderBoxModelObject to compute relativePositionOffset as size https://bugs.webkit.org/show_bug.cgi?id=87447 Reviewed by Eric Seidel. Compute relativePositionOffset as size instead of doing one axis at a time as all call sites uses the size version of the method. This avoids having to walk the DOM twice to accumulate the offsets. Also remove the relativePositionOffsetX and Y methods as they are no longer used. No new tests, covered by existing tests. * rendering/RenderBox.cpp: (WebCore::RenderBox::layoutOverflowRectForPropagation): * rendering/RenderBoxModelObject.cpp: (WebCore::accumulateRelativePositionOffsets): (WebCore::RenderBoxModelObject::relativePositionOffset): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): 2012-05-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118395. http://trac.webkit.org/changeset/118395 https://bugs.webkit.org/show_bug.cgi?id=87526 Breaking sites including GMail and Yahoo mail (Requested by jsbell on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): 2012-05-25 Ken Buchanan <kenrb@chromium.org> Layout root not getting cleared for anonymous renderers geting destroyed https://bugs.webkit.org/show_bug.cgi?id=84002 Reviewed by Abhishek Arya. This is a follow-up to r109406, which added a check to clear layout roots when they point to a renderer that is being destroyed. The thinking was that layout roots would never be anonymous renderers, but there are some cases where this is not true (in particular, generated content containers with overflow clips can be layout roots). As in r109406, this patch has no layout test. This is because any test that exercises this behavior is caused by an existing layout bug where a child is not properly getting layout (or a renderer is getting dirtied out of order during layout) and will fail multiple ASSERTs: in particular, ASSERT(!m_layoutRoot->container() || !m_layoutRoot-> container()->needsLayout()) in FrameView::scheduleRelayoutOfSubtree(), and ASSERT_NOT_REACHED() in RenderObject::clearLayoutRootIfNeeded(). We are preventing those bugs from manifesting as security issues with this patch. This also removes an ASSERT from the RenderObject destructor. This is redundant with the condition in RenderObject::clearLayoutRootIfNeeded() which is always called in RenderObject::willBeDestroyed(), so the check is not needed. It had to be removed because it fails when I try to adjust the ASSERT condition by removing the !node() check, due to RenderWidget clearing its node() during destruction. * rendering/RenderObject.cpp: (WebCore::RenderObject::~RenderObject): (WebCore::RenderObject::willBeDestroyed): 2012-05-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Hangup when continuously changing a css width value in Inspector https://bugs.webkit.org/show_bug.cgi?id=85802 Reviewed by Vsevolod Vlasov. An error in the property whitespace prefix detection algorithm would append the previous line trailing whitespace, thereby enormously increasing the actual prefix during multiple incremental property changes. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): 2012-05-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Clean up Inspector.json after r118367 https://bugs.webkit.org/show_bug.cgi?id=87499 Reviewed by Yury Semikhatsky. This cleans up the semantic inconsistencies introduced into type/field names r118367. No new tests, as this is a refactoring. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): 2012-05-25 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: speed-up HeapSnapshot._bfs method. https://bugs.webkit.org/show_bug.cgi?id=87502 It had containmentEdges.length call in the loop that forced deoptimization. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance): (WebInspector.HeapSnapshot.prototype._bfs): 2012-05-25 Alexei Filippov <alexeif@chromium.org> Web Inspector: Speed up edges iteration in heap profiler https://bugs.webkit.org/show_bug.cgi?id=87286 Add an extra node to nodes array that points to the end of edges array. It allows to eliminate a check for the last node in iteration code. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart): (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd): (WebInspector.HeapSnapshotNodeIterator): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._bfs): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): (WebInspector.HeapSnapshot.prototype._buildDominatorTree): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): 2012-05-25 Andrey Kosyakov <caseq@chromium.org> Web Inspector: put paint and compositing timeline events in a new category of their own https://bugs.webkit.org/show_bug.cgi?id=86852 Reviewed by Pavel Feldman. - add forth timeline category, "Painting"; make it light-purple; - assign paint and compositing events to Painting category; * WebCore.gypi: added timelineBarLightPurple.png; * inspector/front-end/Images/timelineBarLightPurple.png: Added. * inspector/front-end/Images/timelineCheckmarks.png: added light-purple icon; * inspector/front-end/Images/timelineDots.png: ditto. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): do not merge bars in same raw if these are from different categories; (WebInspector.TimelineCategoryStrips.prototype.update): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.recordStyle): * inspector/front-end/WebKit.qrc: added timelineBarLightPurple.png; * inspector/front-end/timelinePanel.css: added styles for painting category; (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox): (.timeline-category-painting .timeline-graph-bar): (.popover .timeline-painting): (.timeline-category-scripting .timeline-tree-icon): (.timeline-category-rendering .timeline-tree-icon): (.timeline-category-painting .timeline-tree-icon): 2012-05-25 W. James MacLean <wjmaclean@chromium.org> [chromium] LayerChromium should recognise existing layer active animations when the layer is added. https://bugs.webkit.org/show_bug.cgi?id=87166 Reviewed by Adrienne Walker. Unit test added. LayerChromium needs to correctly recognize if a newly added layer has an existing active animation. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::notifyAnimationFinished): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-05-25 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: HeapSnapshot: introduce performance counter for HeapSnapshotConstructorsDataGrid._aggregatesReceived method. https://bugs.webkit.org/show_bug.cgi?id=87393 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._aggregatesReceived): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren): 2012-05-25 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric. https://bugs.webkit.org/show_bug.cgi?id=87490 Originally WebInspector.Uint32Array was used for dynamic array reallocation because we had no information about expected arrays sizes. Now we have these sizes and allocates array precisely. Reviewed by Yury Semikhatsky. * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore): * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotLoader.js: (WebInspector.HeapSnapshotLoader.prototype._parseUintArray): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): 2012-05-25 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric. https://bugs.webkit.org/show_bug.cgi?id=87490 Originally WebInspector.Uint32Array was used for dynamic array reallocation because we had no information about expected arrays sizes. Now we have these sizes and allocates array precisely. Reviewed by Yury Semikhatsky. * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore): * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotLoader.js: (WebInspector.HeapSnapshotLoader.prototype._parseUintArray): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): 2012-05-25 Alexander Pavlov <apavlov@chromium.org> Web Inspector: cmd-[ shortcut navigates page and is fr-keyboard incompatible https://bugs.webkit.org/show_bug.cgi?id=85312 Reviewed by Vsevolod Vlasov. Suppress the handling of panel history navigation events if the corresponding keyboard activities produce the "keypress" event (which is the case on French keyboards, where AltGr+[ is translated into Ctrl+Alt+[ on Windows). The event is also told to preventDefault() to avoid browser history navigation on Mac while traversing the Inspector panel history. * inspector/front-end/InspectorView.js: (WebInspector.InspectorView): (WebInspector.InspectorView.prototype._keyPress): (WebInspector.InspectorView.prototype._keyDown): (WebInspector.InspectorView.prototype._keyDownInternal): * inspector/front-end/UIUtils.js: (WebInspector.isWin): 2012-05-25 Yury Semikhatsky <yurys@google.com> Unreviewed. Fixed closure compiler warnings. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeMemoryProfileType.prototype.buttonClicked): (WebInspector.NativeMemoryProfileHeader.prototype.createView): 2012-05-25 Lu Guanqun <guanqun.lu@intel.com> [GTK] fix compilation warning in GtkInputMethodFilter.cpp https://bugs.webkit.org/show_bug.cgi?id=87475 Reviewed by Martin Robinson. * platform/gtk/GtkInputMethodFilter.cpp: (WebCore::GtkInputMethodFilter::setWidget): 2012-05-25 Zalan Bujtas <zbujtas@gmail.com> [Qt] Broken controls rendering when transform is applied. https://bugs.webkit.org/show_bug.cgi?id=87483 Reviewed by Simon Hausmann. Use only the scaling transform value to determine the size of the control to be drawn. When other transforms present such as rotate or skew, ignore them, unless scaling also involved. In that case, calculate the scaling value out of the transformation. * ManualTests/qt/control_paiting_with_transforms.html: Added. * platform/qt/RenderThemeQtMobile.cpp: (WebCore::painterScale): (WebCore): (WebCore::StylePainterMobile::sizeForPainterScale): 2012-05-17 Andrey Kosyakov <caseq@chromium.org> [chromium] add instrumentation for compositing https://bugs.webkit.org/show_bug.cgi?id=83928 Reviewed by James Robinson. - plumb willCommit() and didBeginFrame() from CCSingleThreadProxy and CCThreadProxy to inspector instrumentation; - note for threaded case, didBeginFrame() is invoked upon unblocking of main thread; * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHostClient): (WebCore::CCLayerTreeHost::didBeginFrame): (WebCore::CCLayerTreeHost::willCommit): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::beginFrame): 2012-05-25 Taiju Tsuiki <tzik@chromium.org> Web Inspector: Drop InspectorFileSystemInstrumentation https://bugs.webkit.org/show_bug.cgi?id=87460 Inspector does not need to track DOMFileSystem object now. So we can drop InspectorFileSystemInstrumentation. Reviewed by Vsevolod Vlasov. * GNUmakefile.list.am: * Modules/filesystem/DOMFileSystem.cpp: (WebCore::DOMFileSystem::create): * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorFileSystemAgent.cpp: (WebCore::InspectorFileSystemAgent::enable): * inspector/InspectorFileSystemAgent.h: (InspectorFileSystemAgent): * inspector/InspectorFileSystemInstrumentation.h: Removed. * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: (WebCore): (InspectorInstrumentation): 2012-05-25 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: HeapProfiler: speed-up _calculateClassesRetainedSize and _buildAggregates. https://bugs.webkit.org/show_bug.cgi?id=87482 Engine didn't inline node's classIndex method because the switch statement in it wasn't inlineable. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.classIndex): 2012-05-24 Andreas Kling <kling@webkit.org> Dodge style recalc when id attribute is overwritten with same value. <http://webkit.org/b/87211> Reviewed by Eric Seidel. Don't force style recalc when the id attribute is set to the same value it already had. ~3.5% improvement on Dromaeo's "dom-attr" locally. * dom/Element.cpp: (WebCore::Element::attributeChanged): 2012-05-24 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add profile type for native memory snapshots https://bugs.webkit.org/show_bug.cgi?id=87400 Reviewed by Vsevolod Vlasov. Introduced new profile type and view classes for native memory snapshots. All the stuff is hidden behind an experimental setting. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/NativeMemorySnapshotView.js: Added. (WebInspector.NativeMemorySnapshotView): (WebInspector.NativeMemorySnapshotView.prototype.dispose): (WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems): (WebInspector.NativeMemorySnapshotView.prototype.get profile): (WebInspector.NativeMemoryProfileType): (WebInspector.NativeMemoryProfileType.prototype.get buttonTooltip): (WebInspector.NativeMemoryProfileType.prototype.buttonClicked): (WebInspector.NativeMemoryProfileType.prototype.get treeItemTitle): (WebInspector.NativeMemoryProfileType.prototype.get description): (WebInspector.NativeMemoryProfileType.prototype.createTemporaryProfile): (WebInspector.NativeMemoryProfileType.prototype.createProfile): (WebInspector.NativeMemoryProfileHeader): (WebInspector.NativeMemoryProfileHeader.prototype.createSidebarTreeElement): (WebInspector.NativeMemoryProfileHeader.prototype.createView): * inspector/front-end/ProfilesPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-05-25 Yury Semikhatsky <yurys@chromium.org> Web Inspector: make some profiler methods private https://bugs.webkit.org/show_bug.cgi?id=87479 Reviewed by Vsevolod Vlasov. - Removed unused methods. - Renamed private methods so that their names start with underscore. - ProfileLauncherView methods are called directly from ProfilesPanel instead of sending events. * inspector/front-end/CPUProfileView.js: * inspector/front-end/CSSSelectorProfileView.js: (WebInspector.CSSSelectorProfileType.prototype.buttonClicked): (WebInspector.CSSSelectorProfileType.prototype._startRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile): * inspector/front-end/ProfileLauncherView.js: (WebInspector.ProfileLauncherView.prototype.profileStarted): (WebInspector.ProfileLauncherView.prototype.profileFinished): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.createProfile): (WebInspector.ProfilesPanel.prototype.toggleRecordButton): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback.var): (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback): (WebInspector.ProfilesPanel.prototype._populateProfiles): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot.done): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): 2012-05-25 Keishi Hattori <keishi@webkit.org> Bad checkValidity result on recently "enabled" form fields https://bugs.webkit.org/show_bug.cgi?id=85704 Reviewed by Kent Tamura. Test: fast/forms/disabled-attr-checkvalidity.html We were tripping on the assertion m_isValid == validity()->valid() inside HTMLFormControlElement::isValidFormControlElement. m_isValid was becoming stale because setNeedsValidityCheck wasn't called after m_willValidate changed. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::willValidate): We used const_cast because it was too difficult to remove const. We are checking if the value from willValidate has changed to avoid an infinite loop. (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): 2012-05-24 Kinuko Yasuda <kinuko@chromium.org> [chromium] DataTransferItem.webkitGetAsEntry() shouldn't be exposed without flag yet https://bugs.webkit.org/show_bug.cgi?id=87457 Reviewed by Kent Tamura. No new tests, marking some tests SKIP as we stop exposing this by default. * Modules/filesystem/DataTransferItemFileSystem.idl: Removed webkitGetAsEntry 2012-05-25 Rakesh KN <rakesh.kn@motorola.com> RadioNodeList does not include a object element https://bugs.webkit.org/show_bug.cgi?id=87371 Reviewed by Kent Tamura. As per spec http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-listed Object element should also be listed in RadioNodeList object. Updated existing test. * html/RadioNodeList.cpp: (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter): Compares if test element's name/id and form matches that of the RadioNodeList filter. (WebCore::RadioNodeList::nodeMatches): Added support for Object element, check if object elements name/id matches the RadioNodeList filter. * html/RadioNodeList.h: (RadioNodeList): Ditto 2012-05-25 Jan Keromnes <janx@linux.com> Web Inspector: Resource object has no methods getContent and setContent https://bugs.webkit.org/show_bug.cgi?id=87424 This fixes the extension API so that it uses the `new Resource()` constructor, which adds the missing `getContent` and `setContent` methods to a `Resource` object. Reviewed by Vsevolod Vlasov. The tests were fixed accordingly in: LayoutTests/inspector/extensions/extensions-resources-expected.txt * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper): (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler): 2012-05-24 Tim Horton <timothy_horton@apple.com> Add feature defines for web-facing parts of CSS Regions and Exclusions https://bugs.webkit.org/show_bug.cgi?id=87442 <rdar://problem/10887709> Reviewed by Dan Bernstein. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled): (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled): * bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS): * bindings/objc/DOMCSS.mm: (kitClass): * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::detectAtToken): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSRule.cpp: (WebCore::CSSRule::cssText): (WebCore::CSSRule::destroy): (WebCore::CSSRule::reattach): * css/CSSRule.h: (WebCore::CSSRule::isRegionRule): * css/CSSRule.idl: * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::asText): * css/StylePropertyShorthand.cpp: (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleRule.cpp: (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy): (WebCore::StyleRuleBase::createCSSOMWrapper): * css/WebKitCSSRegionRule.cpp: * css/WebKitCSSRegionRule.h: * css/WebKitCSSRegionRule.idl: * dom/Document.cpp: * dom/Document.h: * dom/Document.idl: * page/DOMWindow.idl: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setCSSRegionsEnabled): (WebCore::Settings::cssRegionsEnabled): 2012-05-24 Geoffrey Garen <ggaren@apple.com> WebKit should be lazy-finalization-safe (esp. the DOM) https://bugs.webkit.org/show_bug.cgi?id=87456 Reviewed by Filip Pizlo. * bindings/js/DOMWrapperWorld.cpp: (WebCore::JSStringOwner::finalize): * bindings/js/JSDOMBinding.cpp: (WebCore::jsStringSlowCase): * bindings/js/JSDOMBinding.h: (WebCore::cacheWrapper): (WebCore::uncacheWrapper): Use the new idioms. (WebCore::jsString): Use get instead of find because get is simpler in the case of entries that are logically null. (WebCore::domObjectWrapperMapFor): Removed, since it was unused. * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::clearWrapper): Use the new idioms. * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::invalidate): Check for null while iterating, since that's possible now. (JSC::Bindings::RootObject::addRuntimeObject): (JSC::Bindings::RootObject::removeRuntimeObject): (JSC::Bindings::RootObject::finalize): Use the new idioms. * bridge/runtime_root.h: (RootObject): Clarified the word "need". 2012-05-24 Kent Tamura <tkent@chromium.org> PAGE_POPUP: window.setValueAndClosePopup should be moved to a per-context property of DOMWindow. https://bugs.webkit.org/show_bug.cgi?id=87086 Reviewed by Adam Barth. - Introduce window.pagePagePopupController property as V8EnabledPerContext. - Move window.setValueAndClosePopup() to window.pagePopupController. So, we can remove ad-hoc ScriptController::installFunctionsForPagePopup(). No behavior change. Test: fast/forms/date/no-page-popup-controller.html * Resources/calendarPicker.js: (submitValue): Use window.pagePopupController. (handleCancel): ditto. * WebCore.gypi: Add new files. * bindings/generic/ContextEnabledFeatures.cpp: (WebCore::ContextEnabledFeatures::pagePopupEnabled): Added. * bindings/generic/ContextEnabledFeatures.h: (ContextEnabledFeatures): Added. * bindings/v8/ScriptController.cpp: Remove installFunctionsForPagePopup(). * bindings/v8/ScriptController.h: ditto. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowPagePopup): Added. * page/DOMWindowPagePopup.cpp: (WebCore::DOMWindowPagePopup::DOMWindowPagePopup): Creates a PagePopupController object for the specified PagePopupClient. (WebCore::DOMWindowPagePopup::~DOMWindowPagePopup): Empty destructor to generate the RefPtr<PagePopupController> destructor. (WebCore::DOMWindowPagePopup::pagePopupController): * page/DOMWindowPagePopup.h: (DOMWindowPagePopup): - Remove setValueAndClosePopup() - Add pagePopupController() - Change the data member from PagePopupClient to PagePopupController. * page/DOMWindowPagePopup.idl: Supply per-context window.pagePopupController. * page/PagePopupController.cpp: Added. This object is attached to window. * page/PagePopupController.h: ditto. * page/PagePopupController.idl: ditto. 2012-05-21 Kinuko Yasuda <kinuko@chromium.org> Cleanup: add a file system call which captures the file metadata at once. https://bugs.webkit.org/show_bug.cgi?id=86995 Reviewed by David Levin. Current File.slice() (webkitSlice()) implementation calls two separate platform calls, getFileSize() and getFileModificationTime() [both are defined in platform/FileSystem.h], to capture the file metadata, but we should have a single file system call to get them at once for two reasons: 1. save additional system call costs, and 2. atomically obtain the file metadata. No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass. * fileapi/File.cpp: (WebCore::File::captureSnapshot): * platform/FileMetadata.h: * platform/FileSystem.h: * platform/chromium/FileSystemChromium.cpp: (WebCore::getFileMetadata): Added. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/gtk/FileSystemGtk.cpp: (WebCore::getFileMetadata): Added. * platform/posix/FileSystemPOSIX.cpp: (WebCore::getFileMetadata): Added. * platform/qt/FileSystemQt.cpp: (WebCore::getFileMetadata): Added. * platform/win/FileSystemWin.cpp: (WebCore::getFileSizeFromFindData): (WebCore::getFileModificationTimeFromFindData): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::getFileMetadata): Added. * platform/wince/FileSystemWinCE.cpp: (WebCore::getFileSizeFromFileInfo): (WebCore::getFileModificationTimeFromFileInfo): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::getFileMetadata): Added. * platform/wx/FileSystemWx.cpp: (WebCore::getFileMetadata): Added. (WebCore): 2012-05-24 Hironori Bono <hbono@chromium.org> Enable grammar checking on Chromium when we paste text (Take 2) https://bugs.webkit.org/show_bug.cgi?id=74393 Reviewed by Ryosuke Niwa. This change enables grammar checking on Chromium and implements a mock grammar checker to fix a failing test. Test: editing/spelling/grammar-markers.html * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): render grammar markers in gray on Windows and Linux or in green on Mac. 2012-05-24 Dominic Mazzoni <dmazzoni@google.com> Crash in WebCore::AccessibilityTable::isDataTable https://bugs.webkit.org/show_bug.cgi?id=87409 Reviewed by Abhishek Arya. Use Node::rendererIsEditable everywhere rather than Node::isContentEditable because the latter can trigger a layout and destroy the renderer. New test covers the change to AccessibilityTable.cpp, changes to AccessibilityRenderObject.cpp are covered by existing tests. Test: accessibility/contenteditable-table-check-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isReadOnly): (WebCore::AccessibilityRenderObject::contentChanged): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable): 2012-05-24 Yoshifumi Inoue <yosin@chromium.org> [Forms][TextArea] Too long validation message doesn't count LF as CRLF https://bugs.webkit.org/show_bug.cgi?id=87458 Reviewed by Kent Tamura. This patch changes current number of characters in "too long" validation message parameter to counting newline as 2 characters (CR and LF) as submission data. No new tests. To have test for this change, we need to change localization text handling during DRT. We'll try. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::validationMessage): Use computeLengthForSubmission instead of numGraphmeClusters. 2012-05-24 Hayato Ito <hayato@chromium.org> Fix crashes caused by a DOMCharacterDataModified event on a text node. https://bugs.webkit.org/show_bug.cgi?id=86953 Reviewed by Dimitri Glazkov. TextNode can be released while CharacterData::setData() will dispatch a mutation event. So protect it. Mutation event itself should not be dispatched on the test case. This is being tracked by webkit bug https://bugs.webkit.org/show_bug.cgi?id=87372. Test: fast/events/dom-character-data-modified-textarea-crash.html * dom/CharacterData.cpp: (WebCore::CharacterData::setData): 2012-05-24 Philippe Normand <pnormand@igalia.com> [GTK] Add --enable-css3-flexbox configure option after r118304. https://bugs.webkit.org/show_bug.cgi?id=87455 Reviewed by Xan Lopez. * GNUmakefile.am: 2012-05-24 MORITA Hajime <morrita@google.com> Scoped stylesheet should be per-document-configurable. https://bugs.webkit.org/show_bug.cgi?id=86985 Reviewed by Kent Tamura. This change replaced RuntimeEnabledFeatures::styleScopedEnabled() callsites with newly introduced ContextEnabledFeatures::styleScopedEnabled(). Clients can override the decision by implementing FrameLoaderClient::allowStyleScoped(). No new tests. This isn't testable on DRT. * bindings/generic/ContextEnabledFeatures.cpp: (WebCore): (WebCore::ContextEnabledFeatures::styleScopedEnabled): * bindings/generic/ContextEnabledFeatures.h: (WebCore): (ContextEnabledFeatures): * css/StyleResolver.cpp: (WebCore::StyleResolver::determineScope): * css/StyleResolver.h: (StyleResolver): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::registerWithScopingNode): (WebCore::HTMLStyleElement::unregisterWithScopingNode): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowStyleScoped): 2012-05-24 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118452. http://trac.webkit.org/changeset/118452 https://bugs.webkit.org/show_bug.cgi?id=87446 Causes many tests to assert on Mac, NRWT bails out (Requested by sundiamonde on #webkit). * rendering/RenderObject.cpp: (WebCore::RenderObject::~RenderObject): (WebCore::RenderObject::clearLayoutRootIfNeeded): 2012-05-24 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Add contextMenuItemVector stub. * platform/wx/ContextMenuWx.cpp: (WebCore): (WebCore::contextMenuItemVector): 2012-05-24 Raymond Toy <rtoy@google.com> Use 32-byte alignment in AudioArray if using WEBAUDIO_FFMPEG https://bugs.webkit.org/show_bug.cgi?id=87430 Reviewed by Chris Rogers. Covered by existing tests. * platform/audio/AudioArray.h: (WebCore::AudioArray::allocate): 2012-05-24 Antoine Labour <piman@chromium.org> [chromium] Add a setForceRenderSurface to WebLayer for test/bench purpose https://bugs.webkit.org/show_bug.cgi?id=87436 Reviewed by James Robinson. Tested by CCLayerTreeHostCommonTest.verifyForceRenderSurface * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setForceRenderSurface): (WebCore): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::forceRenderSurface): (LayerChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::forceRenderSurface): (WebCore::CCLayerImpl::setForceRenderSurface): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-05-24 Ken Buchanan <kenrb@chromium.org> Layout root not getting cleared for anonymous renderers geting destroyed https://bugs.webkit.org/show_bug.cgi?id=84002 Reviewed by Abhishek Arya. This is a follow-up to r109406, which added a check to clear layout roots when they point to a renderer that is being destroyed. The thinking was that layout roots would never be anonymous renderers, but there are some cases where this is not true (in particular, generated content containers with overflow clips can be layout roots). As in r109406, this patch has no layout test. This is because any test that exercises this behavior is caused by an existing layout bug where a child is not properly getting layout (or a renderer is getting dirtied out of order during layout) and will fail multiple ASSERTs: in particular, ASSERT(!m_layoutRoot->container() || !m_layoutRoot-> container()->needsLayout()) in FrameView::scheduleRelayoutOfSubtree(), and ASSERT_NOT_REACHED() in RenderObject::clearLayoutRootIfNeeded(). We are preventing those bugs from manifesting as security issues with this patch. * rendering/RenderObject.cpp: (WebCore::RenderObject::~RenderObject): (WebCore::RenderObject::willBeDestroyed): 2012-05-24 Anders Carlsson <andersca@apple.com> Corrupted pages rendering when images are zoomed on Google+ https://bugs.webkit.org/show_bug.cgi?id=87439 <rdar://problem/11503078> Reviewed by Beth Dakin. The rect that's given to scrollContentsSlowPath is in frame view coordinates, but if we end up passing them to RenderLayer::setBackingNeedsRepaintInRect we need to account for the frame scale factor. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsSlowPath): 2012-05-24 Ryosuke Niwa <rniwa@webkit.org> REGRESSION (r112399): insertHTML doesn't respect current selection range and inserts HTML to incorrect position https://bugs.webkit.org/show_bug.cgi?id=87195 Reviewed by Darin Adler. The bug was caused by our passing insertionPos.anchorNode() to splitTreeToNode's start node even when the position's type was an offset in a container. Fixed the bug by passing the node after the insert position or the container node if the position is at the end of the container. Test: editing/pasteboard/paste-at-end-of-node-followed-by-inline-element.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 2012-05-24 Emil A Eklund <eae@chromium.org> REGRESSION (115573): Incorrect rounding of margins for floats https://bugs.webkit.org/show_bug.cgi?id=87319 Reviewed by Eric Seidel. In RenderBlock::computeInlinePreferredLogicalWidths we used a float to accumulate margins for floating children while the children themselves represent their margins as LayoutUnits. Due to lack of rounding this can cause the block to be too small at certain certain zoom levels, causing unwanted wrapping. This patch changes computeInlinePreferredLogicalWidths to use a LayoutUnit to accumulate the margins and thus ensures that the margin values are rounded the same way. Test: fast/block/float/floats-with-margin-should-not-wrap.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): 2012-05-24 Christophe Dumez <christophe.dumez@intel.com> postMessage and webkitPostMessage should behave the same way https://bugs.webkit.org/show_bug.cgi?id=87384 Reviewed by Adam Barth. Make postMessage behave the same way as webkitPostMessage, meaning that it supports transfer of MessagePorts and ArrayBuffers as per the spec. Both V8 and JSC implementations have been updated. Test: fast/dom/Window/window-postmessage-args.html * bindings/js/JSDOMWindowCustom.cpp: (WebCore::handlePostMessage): (WebCore::JSDOMWindow::postMessage): (WebCore::JSDOMWindow::webkitPostMessage): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DOMWindow::postMessageCallback): (WebCore::V8DOMWindow::webkitPostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DedicatedWorkerContext::postMessageCallback): (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8MessagePort::postMessageCallback): (WebCore::V8MessagePort::webkitPostMessageCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8Worker::postMessageCallback): (WebCore::V8Worker::webkitPostMessageCallback): 2012-05-24 Pablo Flouret <pablof@motorola.com> Submit button doesn't submit the form if the form is wrapped by an anchor tag https://bugs.webkit.org/show_bug.cgi?id=86719 Reviewed by Ryosuke Niwa. When a form's button is clicked or activated with the keyboard a DOMActivate event is dispatched internally and the default handler for it takes care of processing the form submission, but the underlying event that prompted it is not set as handled and so it ends up navigating the anchor, thereby cancelling the form submission. This patch sets the original click event as handled if the DOMActivate event was handled. This matches the rest of the browsers for form controls that submit a form (input type=submit, button type=submit, input type=image, etc), and matches IE for the rest of the controls (basically, IE never activates the anchor when clicking on form controls, Presto and Gecko mostly don't either, except in a few cases. Test: fast/forms/form-in-anchor-controls-activation.html * dom/Node.cpp: (WebCore::Node::dispatchDOMActivateEvent): (WebCore::Node::defaultEventHandler): * dom/Node.h: (Node): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler): 2012-05-24 Crystal Zhang <haizhang@rim.com> [BlackBerry] Implement select popup and remove old hook to air popup https://bugs.webkit.org/show_bug.cgi?id=87419 Reviewed by Rob Buis. Add new files to make file, add css file for select popup. * PlatformBlackBerry.cmake: * Resources/blackberry/popupControlBlackBerry.css: Added. (html): (body): (.bottombuttonOK): (.bottombuttonCancel): (.tablebutton): 2012-05-24 Levi Weintraub <leviw@chromium.org> Avoid creating InlineBoxes for floating and positioned objects in isolates. https://bugs.webkit.org/show_bug.cgi?id=87277 Reviewed by Eric Seidel. We currently will create a placeholder run for the first object we encounter inside an isolate. Then in RenderBlockLineLayout's constructBidiRuns, we replace that run with the contents of the Isolate. We run into problems when there are no valid contents in the Isolate. We can't simply remove the placeholder if there's nothing to replace it with since it may be the logically last run, which we track but can't rebuild by the time we're handling isolates (we've already shuffled the BidiRuns around). With this change, we avoid creating a placeholder altogether until we hit contents in the isolate that would warrant a BidiRun in the first place. Test: fast/text/international/float-as-only-child-of-isolate-crash.html * rendering/InlineIterator.h: (WebCore::IsolateTracker::addFakeRunIfNecessary): * rendering/RenderBlock.h: (RenderBlock): (WebCore::RenderBlock::shouldSkipCreatingRunsForObject): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::appendRunsForObject): 2012-05-24 Ryosuke Niwa <rniwa@webkit.org> There are too many poorly named functions to create a fragment from markup https://bugs.webkit.org/show_bug.cgi?id=87339 Reviewed by Eric Seidel. Moved all functions that create a fragment from markup to markup.h/cpp. There should be no behavioral change. * dom/Range.cpp: (WebCore::Range::createContextualFragment): * dom/Range.h: Removed createDocumentFragmentForElement. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::setInnerHTML): * editing/markup.cpp: (WebCore::createFragmentFromMarkup): (WebCore::createFragmentForInnerOuterHTML): Renamed from createFragmentFromSource. (WebCore::createFragmentForTransformToFragment): Moved from XSLTProcessor. (WebCore::removeElementPreservingChildren): Moved from Range. (WebCore::createContextualFragment): Ditto. * editing/markup.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerHTML): (WebCore::HTMLElement::setOuterHTML): (WebCore::HTMLElement::insertAdjacentHTML): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::patchNode): Added a FIXME since this code should be using one of the functions listed in markup.h * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToFragment): 2012-05-24 Jer Noble <jer.noble@apple.com> MediaControlTimelineElement is adjusting time 3 times per click https://bugs.webkit.org/show_bug.cgi?id=58160 Reviewed by Eric Carlson. No new tests; we intentionally throttle timeupdate events for the same movie time, so there is no way to write a layout test for this case. Only call setCurrentTime() on mousedown or mousemove events. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::defaultEventHandler): 2012-05-24 John Mellor <johnme@chromium.org> Font Boosting: Add compile flag and runtime setting https://bugs.webkit.org/show_bug.cgi?id=87394 Reviewed by Adam Barth. Add ENABLE_FONT_BOOSTING compile flag and fontBoostingEnabled runtime setting. No functionality yet, so no new tests. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * Target.pri: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setFontBoostingEnabled): (WebCore): * page/Settings.h: (Settings): (WebCore::Settings::fontBoostingEnabled): 2012-05-24 Greg Spencer <gspencer@chromium.org> MHTML files should be loadable from all schemes considered local, not just "file:" https://bugs.webkit.org/show_bug.cgi?id=86540 Reviewed by Adam Barth. Existing tests should verify correct function. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::create): 2012-05-24 Dana Jansens <danakj@chromium.org> [chromium] Remove some leftover references to LayerTilerChromium https://bugs.webkit.org/show_bug.cgi?id=87405 Reviewed by James Robinson. * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/SolidColorLayerChromium.h: 2012-05-24 Jessie Berlin <jberlin@apple.com> REGRESSION(r109663) All the the dom/html/level2/html/HTMLFrameElement* tests crash on Windows https://bugs.webkit.org/show_bug.cgi?id=87410 Reviewed by Anders Carlsson. Do not pass a reference type to va_start (see r75435). * platform/LocalizedStrings.cpp: (WebCore::formatLocalizedString): 2012-05-24 Yael Aharon <yael.aharon@nokia.com> [Qt] Stop using the flag FIXED_POSITION_CREATES_STACKING_CONTEXT https://bugs.webkit.org/show_bug.cgi?id=87392 Reviewed by Antonio Gomes. Remove our dependency on a build flag and use the new setting. No new tests. * css/StyleResolver.cpp: 2012-05-24 Alexey Proskuryakov <ap@apple.com> [WK2] Let the client give local files universal access on a case by case basis https://bugs.webkit.org/show_bug.cgi?id=87174 <rdar://problem/11024330> Reviewed by Maciej Stachowiak. * dom/Document.cpp: (WebCore::Document::initSecurityContext): When settings->allowUniversalAccessFromFileURLs() is false, also try asking the client for an indulgence. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::shouldForceUniversalAccessFromLocalURL): Default implementation doesn't change anything. 2012-05-24 Tony Chang <tony@chromium.org> improve StyleRareNonInheritedData bit packing on Windows https://bugs.webkit.org/show_bug.cgi?id=87322 Reviewed by Eric Seidel. Accessors for m_runningAcceleratedAnimation and m_hasAspectRatio are on RenderStyle already. Also reorder the variables in operator== to be consistent with the constructor and header file. This makes it easier to add or remove values. No new tests, just refactoring. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: (StyleRareNonInheritedData): 2012-05-24 Robert Hogan <robert@webkit.org> Negative margin block doesn't properly clear a float enclosed by a previous sibling https://bugs.webkit.org/show_bug.cgi?id=10900 Reviewed by David Hyatt. Tests: fast/css/clear-float-sibling.html Parent blocks keep a list of child floats that extend out of the parent block and by implication overhang into the parent's siblings. But this doesn't work if the sibling has collapsing margins - it will not find the float in the previous block's list so will ignore the float and fail to clear it. RenderBlock:collapseMargins() needs to check if a child's collapsing margin has reduced the height of the parent up past the bottom of its previous sibling's lowest float and add the now overhanging float to the parent's float list if appropriate. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): 2012-05-24 Kinuko Yasuda <kinuko@chromium.org> Cleanup: introduce toFile() to reduce static cast from Blob to File https://bugs.webkit.org/show_bug.cgi?id=87234 Reviewed by Eric Seidel. No new tests as this must have no side effect. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * fileapi/Blob.cpp: (WebCore::Blob::webkitSlice): * fileapi/Blob.h: (Blob): * fileapi/File.h: (WebCore::toFile): Added. (WebCore): * fileapi/FileReader.cpp: (WebCore::FileReader::readAsArrayBuffer): (WebCore::FileReader::readAsBinaryString): (WebCore::FileReader::readAsText): (WebCore::FileReader::readAsDataURL): * fileapi/WebKitBlobBuilder.cpp: (WebCore::WebKitBlobBuilder::append): * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::files): * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): 2012-05-24 Darin Adler <darin@apple.com> SVGElement::addEventListener has peculiar RefPtr usage https://bugs.webkit.org/show_bug.cgi?id=86497 Reviewed by Andy Estes. * svg/SVGElement.cpp: (WebCore::SVGElement::addEventListener): Switch to a more-standard style of RefPtr usage, getting rid of some unneeded reference count churn; also removed an unneeded special case for zero listeners. 2012-05-24 Raphael Kubo da Costa <rakuco@webkit.org> [EFL] Modify keycode conversion functions to return keycodes with location information after r118001. https://bugs.webkit.org/show_bug.cgi?id=87203 Reviewed by Andreas Kling. Add the required changes to make fast/events/keydown-leftright-keys.html pass after r118001. * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createWindowsKeyMap): Translate the keycodes for "{left,right}{Shift,Alt,Control}" into the right windows keyboard definitions. 2012-05-24 Claudio Saavedra <csaavedra@igalia.com> [Gtk] Wrong cursor used for ne-resize https://bugs.webkit.org/show_bug.cgi?id=87366 Reviewed by Eric Seidel. * platform/gtk/CursorGtk.cpp: (WebCore::Cursor::ensurePlatformCursor): Use GDK_TOP_RIGHT_CORNER for Cursor::NorthEastPanning. 2012-05-24 Gabor Ballabas <gaborb@inf.u-szeged.hu> [Qt] Fix Webkit1 + V8 build. https://bugs.webkit.org/show_bug.cgi?id=87368 Reviewed by Eric Seidel. No new tests, because this is a buildfix. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/v8/npruntime_impl.h: * bindings/v8/npruntime_priv.h: 2012-05-24 Dana Jansens <danakj@chromium.org> [chromium] Only display frames created with memory allocations meant to be displayed https://bugs.webkit.org/show_bug.cgi?id=85108 Reviewed by Adrienne Walker. In this patch we remove the setVisible() code paths from CCProxy, and instead commit visiblity state along with a frame. We also commit a flag with a frame that indicates if the frame is one that can be drawn. The impl host is set to visible during commit instead of using a special channel through the proxy, and the scheduler allows commits when we are waiting to draw our first frame but blocked on being non-visible. canDraw is gated on a new flag that indicates if the frame is one meant for display. A frame is meant for display if the frame was generated with a memory allocation meant for display. At this time, any non-zero memory allocation is considered meant for display. We prevent races by not changing the memory allocation at any time except during a commit. So we force a commit when the memory allocation needs to be adjusted and we are not visible. Similarly, we force a commit when visibility changes so that we are able to commit the visibility change to the impl tree. In order to prevent drawing frames that are not meant for display with a single thread, we prevent compositing when the impl tree is not visible, with an early out in CCSingleThreadProxy. Unit tests: CCLayerTreeHostTestVisibilityAndAllocationControlDrawing * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setNeedsCommit): (WebCore): (WebCore::CCLayerTreeHost::setNeedsForcedCommit): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes): (WebCore::CCLayerTreeHost::scheduleComposite): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::canDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::sourceFrameCanBeDrawn): (WebCore::CCLayerTreeHostImpl::setSourceFrameCanBeDrawn): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::drawSuspendedUntilCommit): (WebCore::CCSchedulerStateMachine::scheduledToDraw): (WebCore::CCSchedulerStateMachine::updateState): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore): (WebCore::CCSingleThreadProxy::setNeedsForcedCommit): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::setNeedsForcedCommit): (WebCore): (WebCore::CCThreadProxy::setNeedsForcedCommitOnImplThread): (WebCore::CCThreadProxy::forceBeginFrameOnImplThread): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::scheduledActionCommit): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-05-24 Pavel Feldman <pfeldman@chromium.org> Web Inspector: [regression] search in formatted scripts is broken. https://bugs.webkit.org/show_bug.cgi?id=87377 Reviewed by Vsevolod Vlasov. Using formatted content in search. Test: inspector/debugger/script-formatter-search.html * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): (WebInspector.JavaScriptSource.prototype.searchInContent.callbackWrapper): (WebInspector.JavaScriptSource.prototype.searchInContent): 2012-05-24 Philip Rogers <pdr@google.com> Refactor SVGAnimateTransformElement to avoid expensive determineAnimatedPropertyType call https://bugs.webkit.org/show_bug.cgi?id=87309 Reviewed by Nikolas Zimmermann. This is a simple refactor that matches the work done in https://bugs.webkit.org/show_bug.cgi?id=87309 to avoid an expensive call. No new tests, no actual effects beyond performance improvement. * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::hasValidAttributeType): 2012-05-24 Csaba Osztrogonác <ossy@webkit.org> [Qt] Unreviewed trvial fixes. * Target.pri: Typo fix after r118226. * WebCore.pri: Warning fix after r117291. 2012-05-24 Antti Koivisto <antti@apple.com> Move StyleRuleImport to a file of its own https://bugs.webkit.org/show_bug.cgi?id=87386 Rubber-stamped by Andreas Kling. Move StyleRuleImport out from CSSImportRule.cpp/.h * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSImportRule.cpp: (WebCore): (WebCore::CSSImportRule::href): * css/CSSImportRule.h: (WebCore): (CSSImportRule): * css/CSSParser.cpp: * css/StyleRuleImport.cpp: Copied from Source/WebCore/css/CSSImportRule.cpp. (WebCore): * css/StyleRuleImport.h: Copied from Source/WebCore/css/CSSImportRule.h. (WebCore): * css/StyleSheetContents.cpp: 2012-05-24 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118352. http://trac.webkit.org/changeset/118352 https://bugs.webkit.org/show_bug.cgi?id=87390 Caused 6 editing/spelling tests crash/fail on chromium in debug. (Requested by vsevik on #webkit). * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): 2012-05-24 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Support hierarchical context menus https://bugs.webkit.org/show_bug.cgi?id=86847 Reviewed by Pavel Feldman. This patch makes use of the WebMenuItemInfo SubMenu type to expose the capability of building submenu items in the Web Inspector's context menu. ContextMenuItems are also passed/stored by reference/value rather than pointer in order to be consistent with the PlatformMenuDescription typedef. * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::populateContextMenuItems): Enable submenu item population. (WebCore): (WebCore::JSInspectorFrontendHost::showContextMenu): Extract the menu population part into populateContextMenuItems(). * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::populateContextMenuItems): Enable submenu item population. (WebCore): (WebCore::V8InspectorFrontendHost::showContextMenuCallback): Extract the menu population part into populateContextMenuItems(). * inspector/InspectorFrontendHost.cpp: (WebCore::FrontendMenuProvider::create): Use reference instead of pointer for ContextMenuItems. (WebCore::FrontendMenuProvider::FrontendMenuProvider): Use reference instead of pointer for ContextMenuItems. (WebCore::FrontendMenuProvider::populateContextMenu): Use reference instead of pointer for ContextMenuItems. (WebCore::FrontendMenuProvider::contextMenuCleared): (FrontendMenuProvider): (WebCore::InspectorFrontendHost::showContextMenu): Use reference instead of pointer for ContextMenuItems. * inspector/InspectorFrontendHost.h: (InspectorFrontendHost): * inspector/front-end/ContextMenu.js: Support the tree-like structure of context menus. (WebInspector.ContextMenuItem): (WebInspector.ContextMenuItem.prototype.id): (WebInspector.ContextMenuItem.prototype.type): (WebInspector.ContextMenuItem.prototype._buildDescriptor): (WebInspector.ContextSubMenuItem): (WebInspector.ContextSubMenuItem.prototype.appendItem): (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem): (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem): (WebInspector.ContextSubMenuItem.prototype.appendSeparator): (WebInspector.ContextSubMenuItem.prototype._buildDescriptor): (WebInspector.ContextMenu): (WebInspector.ContextMenu.prototype.nextId): (WebInspector.ContextMenu.prototype.show): (WebInspector.ContextMenu.prototype._setHandler): (WebInspector.ContextMenu.prototype._buildDescriptor): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu): Support sub-menus. (.WebInspector.SoftContextMenu.prototype.show): (.WebInspector.SoftContextMenu.prototype._parentGlassPaneElement): (.WebInspector.SoftContextMenu.prototype._createMenuItem): (.WebInspector.SoftContextMenu.prototype._createSubMenu): (.WebInspector.SoftContextMenu.prototype._createSeparator): (.WebInspector.SoftContextMenu.prototype._menuItemMouseUp): (.WebInspector.SoftContextMenu.prototype._focus): (.WebInspector.SoftContextMenu.prototype._triggerAction): (.WebInspector.SoftContextMenu.prototype._showSubMenu): (.WebInspector.SoftContextMenu.prototype._buildMouseEventForSubMenu): (.WebInspector.SoftContextMenu.prototype._hideSubMenu): (.WebInspector.SoftContextMenu.prototype._menuItemMouseOut): (.WebInspector.SoftContextMenu.prototype._highlightMenuItem): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): (.WebInspector.SoftContextMenu.prototype._glassPaneMouseUp): (.WebInspector.SoftContextMenu.prototype._discardMenu): (.WebInspector.SoftContextMenu.prototype._discardSubMenus): * inspector/front-end/inspector.css: Support for sub-menus, separator improvement. (.soft-context-menu-separator): (.soft-context-menu-separator > .separator-line): (.soft-context-menu-item-submenu-arrow): * platform/chromium/ContextMenuChromium.cpp: (WebCore::contextMenuItemVector): Implemented. (WebCore): 2012-05-24 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: Breakpoints Pane should not show context menu with no breakpoints https://bugs.webkit.org/show_bug.cgi?id=87340 Reviewed by Pavel Feldman. Removed the method _contextMenu as this would be redundant call because _breakpointContextMenu would take care of showing the remove all breakpoints option. * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): 2012-05-24 Yury Semikhatsky <yurys@chromium.org> Unreviewed. Chromium Mac build fix after r118357. Use full name specifier instead of "using" directive. * inspector/InspectorMemoryAgent.cpp: (WebCore::jsHeapInfo): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): 2012-05-24 Pavel Feldman <pfeldman@chromium.org> Web Inspector: introduce virtual resource for inspector stylesheet. https://bugs.webkit.org/show_bug.cgi?id=87357 Reviewed by Vsevolod Vlasov. This change introduces virtual resource that represents inspector stylesheet (that is added for styles added via inspector). New resource has url of form "inspector://<page url folder>/inspector-stylesheet. It enables live editing and revision history of the inspector stylesheet. Test: inspector/styles/edit-inspector-stylesheet.html * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::bindStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): (WebCore::InspectorDOMAgent::pageAgent): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (WebCore): (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype._undoRedoCompleted): (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule): (WebInspector.CSSStyleModelResourceBinding): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype._inspectedURLChanged): (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders): (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): (WebInspector.CSSStyleModelResourceBinding.prototype._getViaInspectorResource.hadersLoaded): (WebInspector.CSSStyleModelResourceBinding.prototype._getViaInspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource.overrideRequestContent.callbackWrapper): (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource.overrideRequestContent): (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource): (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.isHidden): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onRequestUpdateDropped): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): (WebInspector.ResourceTreeFrame.prototype._navigate): (WebInspector.ResourceTreeFrame.prototype.addResource): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.appendResource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/StylesPanel.js: (WebInspector.InspectorStyleSource): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback): (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): 2012-05-24 Robin Cao <robin.cao@torchmobile.com.cn> [BlackBerry] Possible deadlock in the WebGL code path https://bugs.webkit.org/show_bug.cgi?id=87375 Reviewed by Rob Buis. Fix a deadlock happening in the WebGL code path. The mutex is locked but is not unlocked afterword. Also fix a possible double delete, the mutex m_frontBufferLock will be destroyed in the base class. Covered by tests in fast/canvas/webgl. * platform/graphics/blackberry/LayerCompositingThread.cpp: (WebCore::LayerCompositingThread::releaseTextureResources): * platform/graphics/blackberry/WebGLLayerWebKitThread.cpp: (WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread): 2012-05-24 Ian Vollick <vollick@chromium.org> [chromium] Forcibly sync running animations in the waiting state when synchronized start times are needed. https://bugs.webkit.org/show_bug.cgi?id=87153 Reviewed by James Robinson. Unit test: CCLayerAnimationControllerTest.ForceSyncWhenSynchronizedStartTimeNeeded * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::replaceImplThreadAnimations): 2012-05-24 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: convert HeapSnapshotGridNode._provider into getter. https://bugs.webkit.org/show_bug.cgi?id=87382 I found that we create a provider for child nodes for the each DataGrid node in advance. It cost us one async call to the HeapSnapshot's worker per each such the node. I converted the property into the getter which is initializing the provider lazily. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotGridNodes.js: (WebInspector.HeapSnapshotGridNode): (WebInspector.HeapSnapshotGridNode.prototype.createProvider): (WebInspector.HeapSnapshotGridNode.prototype._provider): (WebInspector.HeapSnapshotGridNode.prototype.dispose): (WebInspector.HeapSnapshotGridNode.prototype._populate): (WebInspector.HeapSnapshotGridNode.prototype.expandWithoutPopulate): (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.serializeNextChunk): (WebInspector.HeapSnapshotGridNode.prototype.sort): (WebInspector.HeapSnapshotGenericObjectNode): (WebInspector.HeapSnapshotGenericObjectNode.prototype.updateHasChildren): (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotInstanceNode): (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype.createProvider): (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId): (WebInspector.HeapSnapshotDiffNode): (WebInspector.HeapSnapshotDiffNode.prototype.createProvider): (WebInspector.HeapSnapshotDominatorObjectNode): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.createProvider): (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId): 2012-05-24 Rakesh KN <rakesh.kn@motorola.com> Filter for RadioNodeList should be case sensitive. https://bugs.webkit.org/show_bug.cgi?id=87369 Reviewed by Kent Tamura. Element's id/name attribute matching criteria is case sensitive now. Modified existing test. * html/RadioNodeList.cpp: (WebCore::RadioNodeList::nodeMatches): Element matching criteria is case sensitive. 2012-05-23 Yury Semikhatsky <yurys@chromium.org> Web Inspector: add a command to InspectorMemoryAgent for getting process memory break down https://bugs.webkit.org/show_bug.cgi?id=87263 Reviewed by Pavel Feldman. Introduced new protocol command Memory.getProcessMemoryDistribution which returns memory distribution for the inspected process. Currently only JS allocated and used heap size is included. * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: (WebCore::jsHeapInfo): (WebCore): (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * inspector/InspectorMemoryAgent.h: (InspectorMemoryAgent): * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-05-24 Nikolas Zimmermann <nzimmermann@rim.com> SVGZoomAndPan constants are missing from window object https://bugs.webkit.org/show_bug.cgi?id=15494 Reviewed by Rob Buis. Generate the SVGZoomAndPanConstructor, so that the constants defined in the IDL can be reached from the bindings. Provide a stub-implementation of ref/deref that's never used, as we don't actually use JSSVGZoomAndPan which needs this, but only the JSSVGZoomAndPanConstructor. Add a new IDL flag "SuppressToJSObject" which disables generation of toJS/toV8 methods for classes that are only used in SVGs interfaces via multiple inheritance. This affects: SVGFitToViewBox, SVGTests, SVGLangSapce, SVGExternalResourcesRequired, etc. Unlike those classes SVGZoomAndPan defines constants, and thus needs a generated Constructor. That requires us to build JSSVGZoomAndPan.* (JSSVGFitToViewBox/etc. is generated, but not built!). Unfortunately this causes compilation problems on Windows, as it builds all sources in a single-file. MSVC can't decide whether it should call toJS(Node*) or toJS(SVGZoomAndPan*) for a SVGSVGElement. To avoid these problems stop generating toJS/toV8 completely for all SVG MI types. They were never used before, so there's no point in actually generating them, as it's now causing problems. This is a preparation towards bug 15495, which covers implementing SVGSVGElement.currentView and the SVGViewSpec interface. No new tests. The SVGZoomAndPan constructor is covered by existing tests, now that its enabled. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.pri: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorJS.pm: (ShouldGenerateToJSDeclaration): (ShouldGenerateToJSImplementation): (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/IDLAttributes.txt: * gyp/WebCore.gyp: * page/DOMWindow.idl: * svg/SVGDocument.cpp: (WebCore::SVGDocument::zoomAndPanEnabled): * svg/SVGExternalResourcesRequired.idl: * svg/SVGFitToViewBox.idl: * svg/SVGLangSpace.idl: * svg/SVGLocatable.idl: * svg/SVGRenderingIntent.idl: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): (WebCore::SVGSVGElement::parseAttribute): (WebCore::SVGSVGElement::viewBoxToViewTransform): (WebCore::SVGSVGElement::setupInitialView): (WebCore::SVGSVGElement::inheritViewAttributes): * svg/SVGSVGElement.h: (SVGSVGElement): (WebCore::SVGSVGElement::useCurrentView): (WebCore::SVGSVGElement::setUseCurrentView): (WebCore::SVGSVGElement::zoomAndPan): (WebCore::SVGSVGElement::setZoomAndPan): * svg/SVGStylable.idl: * svg/SVGTests.idl: * svg/SVGURIReference.idl: * svg/SVGUnitTypes.idl: * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::SVGViewElement): (WebCore::SVGViewElement::parseAttribute): * svg/SVGViewElement.h: (SVGViewElement): (WebCore::SVGViewElement::zoomAndPan): (WebCore::SVGViewElement::setZoomAndPan): * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransformString): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: (SVGViewSpec): (WebCore::SVGViewSpec::transformBaseValue): (WebCore::SVGViewSpec::zoomAndPan): (WebCore::SVGViewSpec::setZoomAndPanBaseValue): * svg/SVGZoomAndPan.cpp: (WebCore::SVGZoomAndPan::isKnownAttribute): (WebCore::SVGZoomAndPan::addSupportedAttributes): (WebCore): (WebCore::SVGZoomAndPan::parseZoomAndPan): (WebCore::SVGZoomAndPan::ref): (WebCore::SVGZoomAndPan::deref): (WebCore::SVGZoomAndPan::setZoomAndPan): * svg/SVGZoomAndPan.h: (SVGZoomAndPan): (WebCore::SVGZoomAndPan::parseFromNumber): (WebCore::SVGZoomAndPan::parseAttribute): (WebCore::SVGZoomAndPan::zoomAndPan): * svg/SVGZoomAndPan.idl: 2012-05-24 Hironori Bono <hbono@chromium.org> Enable grammar checking on Chromium when we paste text. https://bugs.webkit.org/show_bug.cgi?id=74393 Reviewed by Hajime Morita. This change enables grammar checking on Chromium and implements a mock grammar checker to fix a failing test. Test: editing/spelling/grammar-markers.html * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): render grammar markers in gray on Windows and Linux or in green on Mac. 2012-05-17 Andrey Kosyakov <caseq@chromium.org> Web Inspector: add inspector instrumentation interface for compositing https://bugs.webkit.org/show_bug.cgi?id=83842 Reviewed by Pavel Feldman. - added instrumentation methods to mark start/end of layer compositing; - added associated timeline record type (CompositeLayers); - plumbed the calls from instrumentation up to the timeline panel; - actual call-sites are platform-specific and will come as separate patches. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willCompositeImpl): (WebCore): (WebCore::InspectorInstrumentation::didCompositeImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::willComposite): (WebCore): (WebCore::InspectorInstrumentation::didComposite): * inspector/InspectorTimelineAgent.cpp: (TimelineRecordType): (WebCore::InspectorTimelineAgent::willComposite): (WebCore): (WebCore::InspectorTimelineAgent::didComposite): * inspector/InspectorTimelineAgent.h: (InspectorTimelineAgent): * inspector/front-end/TimelineModel.js: * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.recordStyle): 2012-05-24 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed Web Inspector: remove obsolete isDetailedSnapshot method from HeapSnapshotView. * inspector/front-end/HeapSnapshotView.js: 2012-05-24 Vivek Galatage <vivekgalatage@gmail.com> Web Inspector: localStorage items are not updated when the storage changes https://bugs.webkit.org/show_bug.cgi?id=83012 Reviewed by Pavel Feldman. Renamed the inspector protocol UpdateDOMStorage to domStorageUpdated. Instrumented StorageEventDispatcher to send the update event to the front-end. Also removed the way DOM Storage Agent used to listen for the storage events. Added new test to verify the update notifications. Test: inspector/storage-panel-dom-storage-update.html * dom/EventListener.h: * inspector/Inspector.json: * inspector/InspectorDOMStorageAgent.cpp: (WebCore): (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::didUseDOMStorage): (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent): * inspector/InspectorDOMStorageAgent.h: (InspectorDOMStorageAgent): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource): (WebCore::InspectorDOMStorageResource::isSameHostAndType): (WebCore::InspectorDOMStorageResource::unbind): * inspector/InspectorDOMStorageResource.h: (WebCore): (InspectorDOMStorageResource): (WebCore::InspectorDOMStorageResource::create): (WebCore::InspectorDOMStorageResource::id): (WebCore::InspectorDOMStorageResource::storageArea): (WebCore::InspectorDOMStorageResource::frame): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl): (WebCore): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::didUseDOMStorage): (WebCore): (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent): * inspector/front-end/DOMStorage.js: (WebInspector.DOMStorageDispatcher.prototype.domStorageUpdated): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.domStorageUpdated): * storage/StorageEventDispatcher.cpp: (WebCore::StorageEventDispatcher::dispatch): 2012-05-23 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: introduce console proxy object for HeapSnapshot worker. https://bugs.webkit.org/show_bug.cgi?id=87346 There is no console object in html5 workers at the moment. This makes me sad when I'm troubleshooting the HeapSnapshot stuff. I wrote a simplest proxy object which sends the log, info and error messages to the WebInspector window. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived): * inspector/front-end/HeapSnapshotWorker.js: (WebInspector.WorkerConsole): (WebInspector.WorkerConsole.prototype.log): (WebInspector.WorkerConsole.prototype.error): (WebInspector.WorkerConsole.prototype.info): (WebInspector.WorkerConsole.prototype._postMessage): 2012-05-24 Shinya Kawanaka <shinyak@chromium.org> Elements in Shadow DOM are not resizable. https://bugs.webkit.org/show_bug.cgi?id=87342 Reviewed by Ryosuke Niwa. In RenderLayer::resize(), shadowAncestorNode() was used but if the ancestor node is used, it is not possible to resize elements in Shadow DOM. The comments said it is necessary for textarea, however actually it is not necessary now. Existing test (fast/css/resize-corner-tracking) covers it. Test: fast/dom/shadow/resize-in-shadow-dom.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): 2012-05-24 Antti Koivisto <antti@apple.com> Move StyleSheetContents to a separate file https://bugs.webkit.org/show_bug.cgi?id=87354 Reviewed by Eric Seidel. Move StyleSheetContents class to StyleSheetContents.h/cpp. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSFontFaceSrcValue.cpp: * css/CSSGrammar.y: * css/CSSImportRule.cpp: * css/CSSParser.cpp: * css/CSSPrimitiveValue.cpp: * css/CSSRule.cpp: * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::create): (WebCore::CSSStyleSheet::href): (WebCore): (WebCore::CSSStyleSheet::baseURL): (WebCore::CSSStyleSheet::isLoading): * css/CSSStyleSheet.h: (WebCore): (CSSStyleSheet): * css/StylePropertySet.cpp: * css/StyleResolver.cpp: * css/StyleSheetContents.cpp: Copied from css/CSSStyleSheet.cpp. (WebCore): * css/StyleSheetContents.h: Copied from css/CSSStyleSheet.h. (WebCore): * dom/DOMImplementation.cpp: (WebCore::XMLMIMETypeRegExp::XMLMIMETypeRegExp): * dom/Document.cpp: * dom/ProcessingInstruction.cpp: * dom/StyleElement.cpp: * html/HTMLLinkElement.cpp: * html/HTMLStyleElement.cpp: * inspector/InspectorStyleSheet.cpp: * loader/cache/CachedCSSStyleSheet.cpp: * page/PageSerializer.cpp: 2012-05-24 Kristóf Kosztyó <kkristof@inf.u-szeged.hu> [Qt] Buildfix for the minimal build because the r118197 broke it. https://bugs.webkit.org/show_bug.cgi?id=87096 Reviewed by Csaba Osztrogonác. * plugins/PluginData.cpp: (WebCore): (WebCore::PluginData::refresh): (WebCore::PluginData::initPlugins): 2012-05-23 Ilya Tikhonovsky <loislo@chromium.org> Unreviewed: Web Inspector single line fix for r118162. * inspector/front-end/HeapSnapshotDataGrids.js: (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren): 2012-05-23 Lu Guanqun <guanqun.lu@intel.com> sort the array 'non_wrapper_types' https://bugs.webkit.org/show_bug.cgi?id=87335 Reviewed by Kentaro Hara. * bindings/scripts/CodeGeneratorV8.pm: 2012-05-23 Shinya Kawanaka <shinyak@chromium.org> Document.elementFromPoint exposes inner element of Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87235 Reviewed by Dimitri Glazkov. Document::elementFromPoint didn't consider nested Shadow DOM. The container node should be adjusted up to document TreeScope beyond ShadowRoot TreeScope. Test: fast/dom/shadow/element-from-point-in-nested-shadow.html * dom/Document.cpp: (WebCore::Document::elementFromPoint): 2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118297. http://trac.webkit.org/changeset/118297 https://bugs.webkit.org/show_bug.cgi?id=87338 It caused several layout failures on Mac (Requested by sundiamonde on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): 2012-05-23 Shinya Kawanaka <shinyak@chromium.org> Document.caretRangeFromPoint exposes inner elemnet of Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87231 Reviewed by Dimitri Glazkov. Document::caretRangeFromPoint didn't consider nested Shadow DOM. The container node should be adjusted up to document TreeScope beyond ShadowRoot TreeScope. Test: fast/dom/shadow/caret-range-from-point-in-nested-shadow.html * dom/Document.cpp: (WebCore::Document::caretRangeFromPoint): 2012-05-23 Julien Chaffraix <jchaffraix@webkit.org> Crash in RenderTableCol::nextColumn https://bugs.webkit.org/show_bug.cgi?id=87314 Reviewed by Abhishek Arya. Tests: fast/table/canvas-column-in-column-group.html fast/table/columngroup-inside-columngroup.html The issue comes from elements not abiding by the display property (e.g. canvas). This means that any renderer with display: table-column would pass the current isChildAllowed check and would confuse our algorithm to iterate. We were getting away with allowing those children as table columns or column groups don't paint themselves but it's better to just not allow such children in the first place. * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::isChildAllowed): Fixed the logic to only accept proper column renderer (RenderTableCol with display: column to ignore column-groups). Also removed an unneeded NULL-check. 2012-05-23 Jer Noble <jer.noble@apple.com> REGRESSION: compositing/video/video-poster.html fails on Mac https://bugs.webkit.org/show_bug.cgi?id=87199 Reviewed by Maciej Stachowiak. No new tests; fixes failing compositing/video/video-poster.html test. Instead of creating the video layer directly, simply allow the layer to be created in updateStates() by changing the definition of isReadyForVideoSetup() to bypass the m_isAllowedToRender check if the player reports a video track is present. This causes the video layer to be created and for future calls to prepareForRendering() to result in calls to mediaPlayerRenderingModeChanged(). * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): 2012-05-23 Nico Weber <thakis@chromium.org> [chromium/mac] Unbreak popup menus. https://bugs.webkit.org/show_bug.cgi?id=87325 Reviewed by David Levin. http://svn.webkit.org/repository/webkit/trunk@117607 added this function, but the Chromium/Mac build doesn't use the file added in that change and hence didn't have the category method.. Adding it doesn't help, as the category calls a 10.7-only function. Just don't use the category for chromium/mac. Fixes http://crbug.com/129418 * platform/mac/WebCoreNSCellExtras.h: 2012-05-23 Ojan Vafai <ojan@chromium.org> add back the ability to disable flexbox https://bugs.webkit.org/show_bug.cgi?id=87147 Reviewed by Tony Chang. * Configurations/FeatureDefines.xcconfig: * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): 2012-05-23 Shinya Kawanaka <shinyak@chromium.org> [Shadow] mousewheel event isn't fired on nodes in Shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=87218 Reviewed by Dimitri Glazkov. EventHander::handleWheelEvent re-targets an event to a shadow ancestor node, however it should be done by adjusting event target. So we don't need to have it. Tests: fast/dom/shadow/wheel-event-in-shadow-dom.html fast/dom/shadow/wheel-event-on-input-in-shadow-dom.html * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): 2012-05-23 Huang Dongsung <luxtella@company100.net> Remove an unused setter in CachedResource.h. https://bugs.webkit.org/show_bug.cgi?id=87324 CachedResource::setInLiveDecodedResourcesList was defined in r24925, but it has been unused. Reviewed by Darin Adler. * loader/cache/CachedResource.h: 2012-05-23 Hayato Ito <hayato@chromium.org> Adjust a target node of a mouse event correctly when a distributed text node is clicked. https://bugs.webkit.org/show_bug.cgi?id=86999 Reviewed by Dimitri Glazkov. Make EventHandler::updateMouseEventTargetNode() be aware of shadow dom subtree so that an insertion point can receive an event when a distributed text node is clicked. Tests: fast/dom/shadow/shadow-dom-event-dispatching.html * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): 2012-05-23 Shinya Kawanaka <shinyak@chromium.org> [Shadow] drop event is not fired on nodes in Shadow DOM https://bugs.webkit.org/show_bug.cgi?id=85774 Reviewed by Dimitri Glazkov. EventHander::updateDragAndDrop re-targets an event to a shadow ancestor node, however it should be done by adjusting event target. So we don't need to have it. Tests: fast/dom/shadow/drop-event-for-input-in-shadow.html fast/dom/shadow/drop-event-in-shadow.html * page/EventHandler.cpp: (WebCore::EventHandler::updateDragAndDrop): 2012-05-23 Emil A Eklund <eae@chromium.org> REGRESSION (115573): Incorrect rounding of margins for floats https://bugs.webkit.org/show_bug.cgi?id=87319 Reviewed by Eric Seidel. In RenderBlock::computeInlinePreferredLogicalWidths we used a float to accumulate margins for floating children while the children themselves represent their margins as LayoutUnits. Due to lack of rounding this can cause the block to be too small at certain certain zoom levels, causing unwanted wrapping. This patch changes computeInlinePreferredLogicalWidths to use a LayoutUnit to accumulate the margins and thus ensures that the margin values are rounded the same way. Test: fast/block/float/floats-with-margin-should-not-wrap.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): 2012-05-23 Huang Dongsung <luxtella@company100.net> Remove unused declarations in MemoryCache.h https://bugs.webkit.org/show_bug.cgi?id=87323 It is originated from r75912. Reviewed by Darin Adler. * loader/cache/MemoryCache.h: 2012-05-23 Eric Seidel <eric@webkit.org> Add seamless layout code (and pass most of the remaining seamless tests) https://bugs.webkit.org/show_bug.cgi?id=86608 Reviewed by Ojan Vafai. This patch contains almost all the layout changes needed for seamless iframes. I removed the scroll-bar avoiding code at the last moment, as it didn't work for platforms other than mac-lion. I'll add that, as well as the HTMLIFrameElement.seamless idl attribute in a follow-up patch. Seamless iframes piggy-back a bit on the existing frame-flattening logic, however seamless is different from frame-flattening in a few ways: - Frame flattening can only ever make an iframe larger (seamless just behaves like a normal div). - Frame flattening disables scrollbars (seamless frames behave like normal overflow: auto divs). - Seamless only has to work with iframes (flattening works with frame/frameset as well). - Seamless support shrink-wrap size negotiation when the iframe is inline. Test: fast/frames/seamless/seamless-percent-height.html * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): map inline -> inline-block for seamless iframes. * dom/Document.cpp: (WebCore::Document::scheduleStyleRecalc): - Seamless iframes don't manage their own style recalc. (WebCore::Document::recalcStyle): - We should make sure our parent is resolved before we are, but currently that causes some tests to crash I don't have a test to demonstrate this need yet, as presumably it's fulfilled through other codepaths atm. * page/FrameView.cpp: (WebCore::FrameView::scheduleRelayout): Do the cheaper check first. (WebCore::FrameView::isInChildFrameWithFrameFlattening): Make frameview layout abort child layouts like how frame flattening does. * rendering/RenderBox.h: (WebCore::RenderBox::stretchesToViewport): Disable the stretch-to-viewport quirk for seamless iframes (it makes no sense and breaks the layout code). * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::computeLogicalHeight): - This function is needed for the child document to participate in the normal block shrink-wrap algorithm. Thankfully all the shrink-wrap logic is in RenderBox instead of RenderBlock. In the future we may make RenderIframe a RenderBlock for the seamless case. We may just split RenderIframe into two renderers. (WebCore::RenderIFrame::computeLogicalWidth): (WebCore::RenderIFrame::shouldComputeSizeAsReplaced): - seamless iframes behave like blocks, not inline replaced elements. (WebCore): (WebCore::RenderIFrame::isInlineBlockOrInlineTable): - Behave like an inline-block when marked inline. (WebCore::RenderIFrame::minPreferredLogicalWidth): - When asked for our pref widths, return those of our child document. (WebCore::RenderIFrame::maxPreferredLogicalWidth): (WebCore::RenderIFrame::isSeamless): helper function (WebCore::RenderIFrame::contentRootRenderer): helper function (WebCore::RenderIFrame::flattenFrame): seamless iframes never use the frame-flattening feature. (WebCore::RenderIFrame::layoutSeamlessly): The guts of seamless layout. (WebCore::RenderIFrame::layout): * rendering/RenderIFrame.h: (WebCore): (RenderIFrame): 2012-05-23 Rafael Brandao <rafael.lobo@openbossa.org> [Qt] GraphicsContext should avoid converting rotation angle to degrees https://bugs.webkit.org/show_bug.cgi?id=87317 Reviewed by Noam Rosenthal. The angle for rotate is already in radians, so we should take advantage of it by using QTransform::rotateRadians, rather than converting it back internally. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::rotate): 2012-05-23 David Tseng <dtseng@google.com> AX: Prevents assertion from potentially dereferencing null pointer. https://bugs.webkit.org/show_bug.cgi?id=87290 Reviewed by Chris Fleizach. Changes to assertions. Coverage by existing tests. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::cellForColumnAndRow): 2012-05-23 Tony Chang <tony@chromium.org> auto margins on flexbox should allocate space in the cross direction https://bugs.webkit.org/show_bug.cgi?id=86913 Reviewed by Ojan Vafai. Test: css3/flexbox/auto-margins.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis): (WebCore): (WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): If we have flex-align: baseline and auto margins, we ignore flex-align: baseline. (WebCore::RenderFlexibleBox::alignChildren): auto margins apply before flex-align. * rendering/RenderFlexibleBox.h: 2012-05-23 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r118120. http://trac.webkit.org/changeset/118120 https://bugs.webkit.org/show_bug.cgi?id=87193 some LayoutTests crash since the patch passes a NULL to Null(isolate) * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestException.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): 2012-05-23 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r118129. http://trac.webkit.org/changeset/118129 https://bugs.webkit.org/show_bug.cgi?id=87202 some LayoutTests crash since the patch passes a NULL to Null(isolate) * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::contentDocumentAttrGetter): (WebCore::TestObjV8Internal::getSVGDocumentCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): 2012-05-23 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r118133. http://trac.webkit.org/changeset/118133 https://bugs.webkit.org/show_bug.cgi?id=87207 some LayoutTests crash since the patch passes a NULL to Null(isolate) * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAccessorGetter): (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter): (WebCore::V8Coordinates::headingAccessorGetter): (WebCore::V8Coordinates::speedAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter): (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter): (WebCore::V8DeviceMotionEvent::intervalAccessorGetter): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter): (WebCore::V8DeviceOrientationEvent::betaAccessorGetter): (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter): (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): 2012-05-23 Kentaro Hara <haraken@chromium.org> Unreviewed, rolling out r118134. http://trac.webkit.org/changeset/118134 https://bugs.webkit.org/show_bug.cgi?id=87209 some LayoutTests crash since the patch passes a NULL to Null(isolate) * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8Object): (WebCore::toV8): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): (WebCore::toV8Slow): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): 2012-05-23 James Robinson <jamesr@chromium.org> Add a Setting to make position:fixed form a new stacking context https://bugs.webkit.org/show_bug.cgi?id=87186 Reviewed by Adam Barth. position:fixed elements form a new stacking context in several mobile WebKit ports and in the Qt port always. To be consistent across devices, we want to try turning it on everywhere. This will likely cause compatibility issues, so we need a runtime setting in order to stage the change carefully. Tests: fast/block/positioning/fixed-position-stacking-context.html fast/block/positioning/fixed-position-stacking-context2.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setFixedPositionCreatesStackingContext): (WebCore::Settings::fixedPositionCreatesStackingContext): (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setFixedPositionCreatesStackingContext): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-23 Michael Nordman <michaeln@google.com> [chromium] DomStorage events handling needs TLC (3) https://bugs.webkit.org/show_bug.cgi?id=87031 https://code.google.com/p/chromium/issues/detail?id=128482 Create WebCore::Storage instances as a side effect of attaching storage event handlers. This allows storage events in chromium to be propagated with less IPC chatter. Worth noting that in non-chromium ports, creation of the localStorage instance can have an additional side effect of scheduling a background task to read the area's values from disk, which given the interest in events is probably a beneficial side effect. Reviewed by Adam Barth. No new tests. Existing tests cover this. * page/DOMWindow.cpp: (WebCore::didAddStorageEventListener): (WebCore::DOMWindow::addEventListener): 2012-05-23 Michael Saboff <msaboff@apple.com> Crash in fast/files/read tests during Garbage Collection https://bugs.webkit.org/show_bug.cgi?id=87165 Reviewed by Alexey Proskuryakov. Changed hasPendingActivity() processing to use ActiveDOMObject::hasPendingActivity() and associated setPendingActivity() / unsetPendingActivity(). Fixed two existing tests with change. * Modules/filesystem/FileWriter.cpp: (WebCore::FileWriter::stop): (WebCore::FileWriter::write): (WebCore::FileWriter::truncate): (WebCore::FileWriter::signalCompletion): * Modules/filesystem/FileWriter.h: * fileapi/FileReader.cpp: (WebCore::FileReader::readInternal): (WebCore::FileReader::doAbort): (WebCore::FileReader::didFinishLoading): (WebCore::FileReader::didFail): * fileapi/FileReader.h: 2012-05-23 Abhishek Arya <inferno@chromium.org> Crash in run-ins with continuations while moving back to original position. https://bugs.webkit.org/show_bug.cgi?id=87264 Reviewed by Julien Chaffraix. Run-in that are now placed in sibling block can break up into continuation chains when new children are added to it. We cannot easily send them back to their original place since that requires writing integration logic with RenderInline::addChild and all other places that might cause continuations to be created (without blowing away |this|). Disabling this feature for now to prevent crashes. Test: fast/runin/runin-continuations-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::moveRunInToOriginalPosition): 2012-05-23 Abhishek Arya <inferno@chromium.org> Crash in RenderInline::linesVisualOverflowBoundingBox. https://bugs.webkit.org/show_bug.cgi?id=85804 Reviewed by Dave Hyatt. Defer layout of replaced elements to the next line break function. We shouldn't do it while we are clearing our inline chilren lineboxes in full layout mode. Test: fast/block/inline-children-root-linebox-crash.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2012-05-23 Chris Rogers <crogers@google.com> AudioParam must support fan-in (multiple audio connections) (take 2) https://bugs.webkit.org/show_bug.cgi?id=83610 Reviewed by Kenneth Russell. This re-lands bug: https://bugs.webkit.org/show_bug.cgi?id=83610 Now that a fix has been landed: http://trac.webkit.org/changeset/118099 Test: webaudio/audioparam-summingjunction.html * Modules/webaudio/AudioParam.cpp: * Modules/webaudio/AudioParam.h: (WebCore::AudioParam::calculateSampleAccurateValues): (WebCore::AudioParam::calculateAudioRateSignalValues): Sums intrinsic parameter value with all audio-rate connections. (WebCore::AudioParam::connect): (WebCore::AudioParam::disconnect): Support multiple connections. (WebCore::AudioParam::hasSampleAccurateValues): If we have one or more audio-rate connections. (WebCore::AudioParam::AudioParam): AudioParam now sub-classes AudioSummingJunction. 2012-05-23 Christophe Dumez <christophe.dumez@intel.com> [EFL] webintents/web-intents-delivery-reuse.html is failing on EFL port https://bugs.webkit.org/show_bug.cgi?id=87092 Reviewed by Adam Barth. Remove readonly keyword from the webkitIntent attribute. This is needed otherwise the [Replaceable] extended attribute has not effect with JSC. This is tested by webintents/web-intents-delivery-reuse.html test case. * Modules/intents/DOMWindowIntents.idl: 2012-05-23 Abhishek Arya <inferno@chromium.org> ASSERT failure toRenderProgress in HTMLProgressElement::didElementStateChange https://bugs.webkit.org/show_bug.cgi?id=87274 Reviewed by Darin Adler. Progress bar can't run-in. Prevent it from becoming a run-in, leading to an unworkable RenderInline. Test: fast/runin/progress-run-in-crash.html * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::didElementStateChange): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded): 2012-05-23 Andrew Lo <anlo@rim.com> [BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing requestAnimationFrames https://bugs.webkit.org/show_bug.cgi?id=87289 Reviewed by Antonio Gomes. requestAnimationFrame already covered by tests in LayoutTests/fast/animation. If UI thread cannot acquire DisplayRefreshMonitor mutex immediately, avoid blocking on the mutex, it can trigger the frame change on the next animation tick instead. * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): 2012-05-23 Alec Flett <alecflett@chromium.org> Implement DOM4 DOMError https://bugs.webkit.org/show_bug.cgi?id=87055 Reviewed by Adam Barth. Implement the DOMError class and it's IDL interface. No new tests. Not testable yet, as it's not used. * WebCore.gypi: * dom/DOMError.cpp: Added. (WebCore): (WebCore::DOMError::DOMError): * dom/DOMError.h: Added. (WebCore): (DOMError): (WebCore::DOMError::create): (WebCore::DOMError::name): * dom/DOMError.idl: Added. 2012-05-23 Kenneth Russell <kbr@google.com> REGRESSION(117918) - 4 webgl/tex-iomage-and-sub-image-2d-with-image tests failing on Mac bots. https://bugs.webkit.org/show_bug.cgi?id=87136 Reviewed by Stephen White. Fixed longstanding bug in GraphicsContext3D constructor in Mac port, and logic error in tracking of texture bound to unit 0. Also fixed up Cairo port's constructor by code inspection. This code is ripe for cleanup; Bug 87198 filed for this. Covered by existing tests. * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): Initialize missing members. * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): Correctly initialize m_activeTexture. * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::bindTexture): Fix logic error in tracking of texture bound to unit 0. 2012-05-23 Dana Jansens <danakj@chromium.org> [chromium] Layers on main thread should get a RenderSurface for animating transform only if masksToBounds is true also https://bugs.webkit.org/show_bug.cgi?id=87184 Reviewed by James Robinson. Layers on main thread get a RenderSurface if their impl counterpart may have a RenderSurface due to its animating transform. We currently create a RenderSurface for all layers with an animating transform and a descendant that drawsContents. But a RenderSurface on impl also implies that the layer masksToBounds. So only make a RenderSurface on main thread when the layer also masksToBounds. Modified unit test CCLayerTreeHostCommonTest.verifyAnimationsForRenderSurfaceHierarchy. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): 2012-05-23 Chris Fleizach <cfleizach@apple.com> Regression(r112694): Crash in WebCore::AXObjectCache::postNotification https://bugs.webkit.org/show_bug.cgi?id=86029 Reviewed by Abhishek Arya. Test: accessibility/content-changed-notification-causes-crash.html * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isDetached): (AccessibilityObject): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::contentChanged): 2012-05-23 Robin Dunn <robin@alldunn.com> [wx] Fix memory leak in FontHolder. https://bugs.webkit.org/show_bug.cgi?id=87281 Reviewed by Kevin Ollivier. * platform/graphics/wx/FontPlatformData.h: 2012-05-23 Robin Dunn <robin@alldunn.com> [wx] Make sure we do not create a substitute font if the facename is not found. https://bugs.webkit.org/show_bug.cgi?id=87280 Reviewed by Kevin Ollivier. * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::createFontPlatformData): 2012-05-23 Robin Dunn <robin@alldunn.com> [wx] Implement transparency layer support. https://bugs.webkit.org/show_bug.cgi?id=87279 Reviewed by Kevin Ollivier. * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): 2012-05-23 Jer Noble <jer.noble@apple.com> GenericClock loses precision due to float->double conversion. https://bugs.webkit.org/show_bug.cgi?id=87227 Reviewed by Darin Adler. No new tests; fixes media/media-controller-time.html on Chromium. Only narrow to float after the entire calculation is complete. This requires now() and m_offset to be double-precision. * platform/ClockGeneric.cpp: (ClockGeneric::currentTime): (ClockGeneric::now): Make double-precision. * platform/ClockGeneric.h: (ClockGeneric): Make m_offset double-precision. 2012-05-22 Jer Noble <jer.noble@apple.com> PlatformClockCM has uninitialized m_rate member. https://bugs.webkit.org/show_bug.cgi?id=87217 Reviewed by Eric Carlson. Test: media/media-controller-time.html Initialize the m_rate member to a default of 1 (second-per-second), matching the implementation of ClockGeneric. * platform/mac/PlatformClockCM.mm: (PlatformClockCM::PlatformClockCM): 2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118096. http://trac.webkit.org/changeset/118096 https://bugs.webkit.org/show_bug.cgi?id=87285 caused multiple crashes on the mac bots (Requested by jessieberlin on #webkit). * dom/ContainerNodeAlgorithms.h: 2012-05-23 Darin Adler <darin@apple.com> Speed up traverseNextNode when called on a ContainerNode or Element https://bugs.webkit.org/show_bug.cgi?id=87224 Reviewed by Geoffrey Garen. * dom/ContainerNode.h: Added overrides of traverseNextNode for ContainerNode. That way, when we know at compile time something is ContainerNode, we can skip a branch at the start of this hot function. 2012-05-23 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> Use PluginDataNone.cpp always when NETSCAPE_PLUGIN_API is OFF https://bugs.webkit.org/show_bug.cgi?id=87096 Reviewed by Andy Estes. Fix a build error by adding an extra check in PluginData.cpp to use PluginStrategy only when NETSCAPE_PLUGIN_API is ON. No new tests. This is only a build fix. * plugins/PluginData.cpp: (WebCore): 2012-05-23 Malcolm MacLeod <malcolm.macleod@tshwanedje.com> [wx] Fix scrollbar drawing under wxGTK. https://bugs.webkit.org/show_bug.cgi?id=87150 Reviewed by Kevin Ollivier. * platform/wx/wxcode/gtk/scrollbar_render.cpp: (wxRenderer_DrawScrollbar): 2012-05-23 Antti Koivisto <antti@apple.com> Rename StyleSheetInternal to StyleSheetContents https://bugs.webkit.org/show_bug.cgi?id=87272 Reviewed by Andreas Kling. The name is more descriptive and the code reads better. Plain "StyleSheet" would be good too but that is a CSSOM type and the name can't be used without changing idl code generation and resolving bunch of other issues. * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): * css/CSSFontFaceSrcValue.h: (CSSFontFaceSrcValue): * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): (WebCore::StyleRuleImport::requestStyleSheet): * css/CSSImportRule.h: (WebCore): (WebCore::StyleRuleImport::parentStyleSheet): (WebCore::StyleRuleImport::setParentStyleSheet): (WebCore::StyleRuleImport::styleSheet): (StyleRuleImport): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::insertRule): * css/CSSParser.cpp: (WebCore::CSSParser::parseSheet): (WebCore::CSSParser::parseRule): (WebCore::CSSParser::parseKeyframeRule): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseSelector): (WebCore::CSSParser::parseDeclaration): (WebCore::CSSParser::setStyleSheet): (WebCore::CSSParser::parseFlowThread): * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::addSubresourceStyleURLs): * css/CSSReflectValue.h: (CSSReflectValue): * css/CSSRule.cpp: (WebCore::CSSRule::parserContext): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetContents::estimatedSizeInBytes): (WebCore::StyleSheetContents::StyleSheetContents): (WebCore::StyleSheetContents::~StyleSheetContents): (WebCore::StyleSheetContents::isCacheable): (WebCore::StyleSheetContents::parserAppendRule): (WebCore::StyleSheetContents::ruleAt): (WebCore::StyleSheetContents::ruleCount): (WebCore::StyleSheetContents::clearCharsetRule): (WebCore::StyleSheetContents::clearRules): (WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule): (WebCore::StyleSheetContents::wrapperInsertRule): (WebCore::StyleSheetContents::wrapperDeleteRule): (WebCore::StyleSheetContents::parserAddNamespace): (WebCore::StyleSheetContents::determineNamespace): (WebCore::StyleSheetContents::parseAuthorStyleSheet): (WebCore::StyleSheetContents::parseString): (WebCore::StyleSheetContents::parseStringAtLine): (WebCore::StyleSheetContents::isLoading): (WebCore::StyleSheetContents::checkLoaded): (WebCore::StyleSheetContents::notifyLoadedSheet): (WebCore::StyleSheetContents::startLoadingDynamicSheet): (WebCore::StyleSheetContents::rootStyleSheet): (WebCore::StyleSheetContents::singleOwnerNode): (WebCore::StyleSheetContents::singleOwnerDocument): (WebCore::StyleSheetContents::completeURL): (WebCore::StyleSheetContents::addSubresourceStyleURLs): (WebCore::StyleSheetContents::parentStyleSheet): (WebCore::StyleSheetContents::registerClient): (WebCore::StyleSheetContents::unregisterClient): (WebCore::StyleSheetContents::addedToMemoryCache): (WebCore::StyleSheetContents::removedFromMemoryCache): (WebCore::CSSStyleSheet::createInline): (WebCore::CSSStyleSheet::CSSStyleSheet): (WebCore::CSSStyleSheet::~CSSStyleSheet): (WebCore::CSSStyleSheet::willMutateRules): (WebCore::CSSStyleSheet::didMutateRules): (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers): (WebCore::CSSStyleSheet::length): (WebCore::CSSStyleSheet::item): (WebCore::CSSStyleSheet::rules): (WebCore::CSSStyleSheet::insertRule): (WebCore::CSSStyleSheet::deleteRule): (WebCore::CSSStyleSheet::cssRules): * css/CSSStyleSheet.h: (WebCore::StyleSheetContents::create): (StyleSheetContents): (WebCore::StyleSheetContents::copy): (WebCore::CSSStyleSheet::create): (WebCore::CSSStyleSheet::contents): (CSSStyleSheet): * css/CSSValue.cpp: (WebCore::CSSValue::addSubresourceStyleURLs): * css/CSSValue.h: (WebCore): (CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::addSubresourceStyleURLs): * css/CSSValueList.h: (CSSValueList): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::contextStyleSheet): * css/PropertySetCSSStyleDeclaration.h: (WebCore): (PropertySetCSSStyleDeclaration): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::setProperty): (WebCore::StylePropertySet::parseDeclaration): (WebCore::StylePropertySet::addSubresourceStyleURLs): * css/StylePropertySet.h: (WebCore): (StylePropertySet): * css/StyleResolver.cpp: (RuleSet): (WebCore): (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets): (WebCore::StyleResolver::appendAuthorStylesheets): (WebCore::parseUASheet): (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::insertRule): * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createCSSStyleSheet): * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::updateBaseURL): (WebCore::Document::pageUserSheet): (WebCore::Document::pageGroupUserSheets): (WebCore::Document::addUserSheet): (WebCore::Document::testAddedStylesheetRequiresStyleRecalc): (WebCore::Document::analyzeStylesheetChange): (WebCore::styleSheetsUseRemUnits): * dom/Document.h: (WebCore): (Document): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setCSSStyleSheet): (WebCore::ProcessingInstruction::parseStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * dom/StyledElement.cpp: (WebCore::StyledElement::setInlineStyleProperty): (WebCore::StyledElement::addSubresourceAttributeURLs): (WebCore::StyledElement::addPropertyToAttributeStyle): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): (WebCore::HTMLLinkElement::styleSheetIsLoading): (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): * inspector/InspectorStyleSheet.cpp: (WebCore::fillMediaListChain): (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyleSheet::styleSheetURL): (WebCore::InspectorStyleSheet::reparseStyleSheet): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet): (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet): * loader/cache/CachedCSSStyleSheet.h: (WebCore): (CachedCSSStyleSheet): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeCSSStyleSheet): 2012-05-23 Darin Adler <darin@apple.com> Use ContainerNode instead of Node where possible https://bugs.webkit.org/show_bug.cgi?id=87220 Reviewed by Geoffrey Garen. It's better to use a more specific type; in some cases we even generate more efficient code if we have a more specific type. Also, we want any type casts to be as close as possible to the corresponding type checks, so eliminating these uses of toContainerNode is a plus, also. * dom/ContainerNodeAlgorithms.h: Changed insertionPoint to be a ContainerNode instead of a Node. Fixed spelling error "inseretions". Changed (WebCore::ChildFrameDisconnector::Target::Target): Changed type of frame owner element to HTMLFrameOwnerElement from Node. * dom/DocumentType.cpp: (WebCore::DocumentType::insertedInto): (WebCore::DocumentType::removedFrom): * dom/DocumentType.h: * dom/Element.cpp: (WebCore::Element::insertedInto): (WebCore::Element::removedFrom): * dom/Element.h: * dom/Node.cpp: (WebCore::Node::insertedInto): (WebCore::Node::removedFrom): * dom/Node.h: * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::insertedInto): (WebCore::ProcessingInstruction::removedFrom): * dom/ProcessingInstruction.h: * dom/ScriptElement.cpp: (WebCore::ScriptElement::insertedInto): * dom/ScriptElement.h: * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::insertedInto): (WebCore::FormAssociatedElement::removedFrom): * html/FormAssociatedElement.h: * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::insertedInto): (WebCore::HTMLBaseElement::removedFrom): * html/HTMLBaseElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedInto): (WebCore::HTMLBodyElement::didNotifyDescendantInsertions): * html/HTMLBodyElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::insertedInto): (WebCore::HTMLFormControlElement::removedFrom): * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedInto): (WebCore::HTMLFormElement::didNotifyDescendantInsertions): (WebCore::HTMLFormElement::removedFrom): * html/HTMLFormElement.h: * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::insertedInto): (WebCore::HTMLFrameElementBase::didNotifyDescendantInsertions): * html/HTMLFrameElementBase.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::insertedInto): (WebCore::HTMLFrameSetElement::removedFrom): * html/HTMLFrameSetElement.h: * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::insertedInto): (WebCore::HTMLIFrameElement::removedFrom): * html/HTMLIFrameElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::insertedInto): (WebCore::HTMLImageElement::removedFrom): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::insertedInto): (WebCore::HTMLInputElement::removedFrom): * html/HTMLInputElement.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::insertedInto): (WebCore::HTMLLinkElement::removedFrom): * html/HTMLLinkElement.h: * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::insertedInto): (WebCore::HTMLMapElement::removedFrom): * html/HTMLMapElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::insertedInto): (WebCore::HTMLMediaElement::removedFrom): * html/HTMLMediaElement.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::insertedInto): * html/HTMLMetaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::insertedInto): (WebCore::HTMLObjectElement::removedFrom): * html/HTMLObjectElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedInto): * html/HTMLOptionElement.h: * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::insertedInto): * html/HTMLQuoteElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::insertedInto): * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::insertedInto): * html/HTMLSelectElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::insertedInto): (WebCore::HTMLSourceElement::removedFrom): * html/HTMLSourceElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::insertedInto): (WebCore::HTMLStyleElement::removedFrom): * html/HTMLStyleElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::insertedInto): * html/HTMLTextFormControlElement.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::insertedInto): (WebCore::HTMLTitleElement::removedFrom): * html/HTMLTitleElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedInto): (WebCore::HTMLTrackElement::removedFrom): * html/HTMLTrackElement.h: * mathml/MathMLMathElement.cpp: (WebCore::MathMLMathElement::insertedInto): * mathml/MathMLMathElement.h: * svg/SVGElement.cpp: (WebCore::SVGElement::removedFrom): * svg/SVGElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::insertedInto): (WebCore::SVGFEImageElement::removedFrom): * svg/SVGFEImageElement.h: * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::insertedInto): (WebCore::SVGFontFaceElement::removedFrom): * svg/SVGFontFaceElement.h: * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::insertedInto): * svg/SVGFontFaceUriElement.h: * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::insertedInto): (WebCore::SVGGlyphElement::removedFrom): * svg/SVGGlyphElement.h: * svg/SVGHKernElement.cpp: (WebCore::SVGHKernElement::insertedInto): (WebCore::SVGHKernElement::removedFrom): * svg/SVGHKernElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::insertedInto): * svg/SVGImageElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::insertedInto): (WebCore::SVGSVGElement::removedFrom): * svg/SVGSVGElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::insertedInto): * svg/SVGScriptElement.h: * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::insertedInto): (WebCore::SVGStyleElement::removedFrom): * svg/SVGStyleElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedInto): (WebCore::SVGStyledElement::removedFrom): * svg/SVGStyledElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::insertedInto): (WebCore::SVGTRefElement::removedFrom): * svg/SVGTRefElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedInto): * svg/SVGTextPathElement.h: * svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::insertedInto): (WebCore::SVGTitleElement::removedFrom): * svg/SVGTitleElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedInto): (WebCore::SVGUseElement::removedFrom): * svg/SVGUseElement.h: * svg/SVGVKernElement.cpp: (WebCore::SVGVKernElement::insertedInto): (WebCore::SVGVKernElement::removedFrom): * svg/SVGVKernElement.h: * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedInto): (WebCore::SVGSMILElement::removedFrom): * svg/animation/SVGSMILElement.h: Changed arguments of insertedInto and removedFrom to ContainerNode instead of Node. Did the same with didNotifyDescendantInsertions, while fixing the typo in its name. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Put a typecast toHTMLElement here. The check for isListElement and isLegacyAppleStyleSpan takes care of the type checking. (WebCore::ReplaceSelectionCommand::insertAsListItems): Changed this function to take an HTMLElement instead of a Node, then we can drop use of the toContainerNode function. * editing/ReplaceSelectionCommand.h: * editing/TextIterator.cpp: Fixed a typo in a comment. 2012-05-23 Alexei Filippov <alexeif@chromium.org> Web Inspector: filter out debugging stuff from the heap class view https://bugs.webkit.org/show_bug.cgi?id=86723 We mark objects that are accessible from user roots (e.g. Window) with pageObject attribute. This fix filters out all non-pageObjects from the classes view. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.isPageObject): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize): (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex): (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes): (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass): 2012-05-23 Andrei Bucur <abucur@adobe.com> [CSSRegions]Implement NamedFlow::name attribute https://bugs.webkit.org/show_bug.cgi?id=79645 Implementation for the NamedFlow::name attribute per the CSS Regions WD 3-May-2012 recommendation: http://www.w3.org/TR/2012/WD-css3-regions-20120503/ Reviewed by Andreas Kling. Test: fast/regions/webkit-named-flow-name.html * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::name): (WebCore): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: 2012-05-23 Andreas Kling <kling@webkit.org> Let the compiler generate FontFamily's copy ctor and assignment operator. Blindly rubberstamped by the brave Antti Koivisto. * platform/graphics/FontFamily.cpp: * platform/graphics/FontFamily.h: 2012-05-23 Andreas Kling <kling@webkit.org> CSSParser: Simplify StylePropertySet creation. <http://webkit.org/b/87259> Reviewed by Alexis Menard. Turn CSSParser's filteredProperties() into createStylePropertySet() which filters the parsed properties and creates a new StylePropertySet, adopting the vector to avoid the Vector copy we were previously incurring. Added a StylePropertyVector typedef for Vector<CSSProperty, 4> since we need to pass this type to the constructor for Vector::swap() to work. And thus StylePropertySet::create(const Vector<CSSProperty>&, CSSParserMode) became StylePropertySet::adopt(StylePropertyVector&, CSSParserMode). * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet): * css/CSSParser.cpp: (WebCore::CSSParser::createStylePropertySet): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframe): * css/CSSParser.h: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::StylePropertySet): (WebCore::StylePropertySet::removePropertiesInSet): (WebCore::StylePropertySet::copyPropertiesInSet): (SameSizeAsStylePropertySet): * css/StylePropertySet.h: (WebCore::StylePropertySet::adopt): (StylePropertySet): 2012-05-23 Andreas Kling <kling@webkit.org> Kill some frivolous null-checking of Element::m_attributeData. <http://webkit.org/b/87248> Reviewed by Antti Koivisto. Replace unnecessary Element::m_attributeData with assertions where it makes sense. Others are flat out removed because it should be obvious from context that it's non-null. E.g if an attribute has changed, we're obviously storing it somewhere. Also added a short-circuit to Element::normalize() if there are no Attr objects associated with the element. * dom/Element.cpp: (WebCore::Element::~Element): (WebCore::Element::attributeChanged): (WebCore::Element::insertedInto): (WebCore::Element::removedFrom): (WebCore::Element::removeAttributeNode): (WebCore::Element::normalizeAttributes): * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): 2012-05-23 Andreas Kling <kling@webkit.org> Let Element::detachAttribute() handle removal of the attribute. <http://webkit.org/b/87242> Reviewed by Antti Koivisto. All the call sites were removing the attribute after detaching it, so move that into detachAttribute(). The function name already made it sound like it removes the attribute anyway. Also sprinkle some assertions wrt being called with guaranteed presence of attributeData() and the provided index in the attribute vector. * dom/Element.cpp: (WebCore::Element::detachAttribute): (WebCore::Element::removeAttributeNode): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::removeNamedItemNS): 2012-05-23 Andreas Kling <kling@webkit.org> Streamline Element teardown for the no-Attr-objects case. <http://webkit.org/b/87228> Reviewed by Antti Koivisto. Dodge one function call in ~Element() if the element has no Attr objects associated (the typical case.) Renamed detachAttributes to detachAttrObjectsFromElement to reduce ambiguity. * dom/Element.cpp: (WebCore::Element::~Element): * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::detachAttrObjectsFromElement): (WebCore::ElementAttributeData::clearAttributes): * dom/ElementAttributeData.h: (ElementAttributeData): 2012-05-23 Jochen Eisinger <jochen@chromium.org> Fix incomplete switch statement in CSSParser after r118082 https://bugs.webkit.org/show_bug.cgi?id=87250 Reviewed by Alexis Menard. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118105. http://trac.webkit.org/changeset/118105 https://bugs.webkit.org/show_bug.cgi?id=87255 New LayoutTest is causing several cookie tests to fail on numerous bots (Requested by steveblock on #webkit). * platform/blackberry/CookieJarBlackBerry.cpp: (WebCore::setCookies): * platform/blackberry/CookieManager.cpp: (WebCore::CookieManager::setCookies): (WebCore::CookieManager::checkAndTreatCookie): (WebCore::CookieManager::addCookieToMap): (WebCore::CookieManager::setPrivateMode): (WebCore): * platform/blackberry/CookieManager.h: * platform/blackberry/CookieMap.cpp: (WebCore::CookieMap::addOrReplaceCookie): (WebCore::CookieMap::removeCookie): * platform/blackberry/CookieMap.h: (CookieMap): 2012-05-23 Zan Dobersek <zandobersek@gmail.com> [Gtk] EventSender should properly handle (left|right)(control|shift|alt) after r118001 https://bugs.webkit.org/show_bug.cgi?id=87221 Reviewed by Martin Robinson. No new tests - covered by fast/events/keydown-leftright-keys.html. Windows key code for shift, control and alt keys should respect the left or right position of that key. This way the DOM location code of a key event is properly determined for these keys. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode): 2012-05-23 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: eliminate getters from HeapSnapshot.js https://bugs.webkit.org/show_bug.cgi?id=87241 getters can't be inlined by engine at the moment. I found that conversion getters into functions gives us about 600 ms RESULT heap-snapshot: switch-to-containment-view= 1920 ms vs RESULT heap-snapshot: switch-to-containment-view= 1367 ms Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotEdge.prototype.hasStringName): (WebInspector.HeapSnapshotEdge.prototype.isElement): (WebInspector.HeapSnapshotEdge.prototype.isHidden): (WebInspector.HeapSnapshotEdge.prototype.isWeak): (WebInspector.HeapSnapshotEdge.prototype.isInternal): (WebInspector.HeapSnapshotEdge.prototype.isInvisible): (WebInspector.HeapSnapshotEdge.prototype.isShortcut): (WebInspector.HeapSnapshotEdge.prototype.name): (WebInspector.HeapSnapshotEdge.prototype.node): (WebInspector.HeapSnapshotEdge.prototype.nodeIndex): (WebInspector.HeapSnapshotEdge.prototype.rawEdges): (WebInspector.HeapSnapshotEdge.prototype.toString): (WebInspector.HeapSnapshotEdge.prototype.type): (WebInspector.HeapSnapshotEdge.prototype._hasStringName): (WebInspector.HeapSnapshotEdge.prototype._name): (WebInspector.HeapSnapshotEdge.prototype._nameOrIndex): (WebInspector.HeapSnapshotEdgeIterator.prototype.index): (WebInspector.HeapSnapshotEdgeIterator.prototype.setIndex): (WebInspector.HeapSnapshotEdgeIterator.prototype.item): (WebInspector.HeapSnapshotRetainerEdge): (WebInspector.HeapSnapshotRetainerEdge.prototype.clone): (WebInspector.HeapSnapshotRetainerEdge.prototype.hasStringName): (WebInspector.HeapSnapshotRetainerEdge.prototype.isElement): (WebInspector.HeapSnapshotRetainerEdge.prototype.isHidden): (WebInspector.HeapSnapshotRetainerEdge.prototype.isInternal): (WebInspector.HeapSnapshotRetainerEdge.prototype.isInvisible): (WebInspector.HeapSnapshotRetainerEdge.prototype.isShortcut): (WebInspector.HeapSnapshotRetainerEdge.prototype.isWeak): (WebInspector.HeapSnapshotRetainerEdge.prototype.name): (WebInspector.HeapSnapshotRetainerEdge.prototype.node): (WebInspector.HeapSnapshotRetainerEdge.prototype.nodeIndex): (WebInspector.HeapSnapshotRetainerEdge.prototype.retainerIndex): (WebInspector.HeapSnapshotRetainerEdge.prototype.setRetainerIndex): (WebInspector.HeapSnapshotRetainerEdge.prototype._node): (WebInspector.HeapSnapshotRetainerEdge.prototype._edge): (WebInspector.HeapSnapshotRetainerEdge.prototype.toString): (WebInspector.HeapSnapshotRetainerEdge.prototype.type): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.first): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.index): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.setIndex): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.item): (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.next): (WebInspector.HeapSnapshotNode.prototype.canBeQueried): (WebInspector.HeapSnapshotNode.prototype.distanceToWindow): (WebInspector.HeapSnapshotNode.prototype.className): (WebInspector.HeapSnapshotNode.prototype.dominatorIndex): (WebInspector.HeapSnapshotNode.prototype.edges): (WebInspector.HeapSnapshotNode.prototype.edgesCount): (WebInspector.HeapSnapshotNode.prototype.flags): (WebInspector.HeapSnapshotNode.prototype.id): (WebInspector.HeapSnapshotNode.prototype.isHidden): (WebInspector.HeapSnapshotNode.prototype.isNative): (WebInspector.HeapSnapshotNode.prototype.isSynthetic): (WebInspector.HeapSnapshotNode.prototype.isWindow): (WebInspector.HeapSnapshotNode.prototype.isDetachedDOMTreesRoot): (WebInspector.HeapSnapshotNode.prototype.isDetachedDOMTree): (WebInspector.HeapSnapshotNode.prototype.isRoot): (WebInspector.HeapSnapshotNode.prototype.name): (WebInspector.HeapSnapshotNode.prototype.rawEdges): (WebInspector.HeapSnapshotNode.prototype.retainedSize): (WebInspector.HeapSnapshotNode.prototype.retainers): (WebInspector.HeapSnapshotNode.prototype.selfSize): (WebInspector.HeapSnapshotNode.prototype.type): (WebInspector.HeapSnapshotNode.prototype._name): (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd): (WebInspector.HeapSnapshotNode.prototype._nextNodeIndex): (WebInspector.HeapSnapshotNode.prototype._type): (WebInspector.HeapSnapshotNodeIterator): (WebInspector.HeapSnapshotNodeIterator.prototype.hasNext): (WebInspector.HeapSnapshotNodeIterator.prototype.index): (WebInspector.HeapSnapshotNodeIterator.prototype.setIndex): (WebInspector.HeapSnapshotNodeIterator.prototype.item): (WebInspector.HeapSnapshotNodeIterator.prototype.next): (WebInspector.HeapSnapshot.prototype._allNodes): (WebInspector.HeapSnapshot.prototype.rootNode): (WebInspector.HeapSnapshot.prototype.get totalSize): (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode): (WebInspector.HeapSnapshot.prototype.aggregatesForDiff): (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize): (WebInspector.HeapSnapshot.prototype._sortAggregateIndexes): (WebInspector.HeapSnapshot.prototype._markInvisibleEdges): (WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): (WebInspector.HeapSnapshot.prototype._calculateDiffForClass): (WebInspector.HeapSnapshot.prototype._nodeForSnapshotObjectId): (WebInspector.HeapSnapshot.prototype.nodeClassName): (WebInspector.HeapSnapshot.prototype.dominatorIdsForNode): (WebInspector.HeapSnapshot.prototype.createEdgesProvider): (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype._createIterationOrder): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.isEmpty): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.item): (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeItemsRange): (WebInspector.HeapSnapshotEdgesProvider.prototype.serializeItem): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareEdgeFieldName): (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField): (WebInspector.HeapSnapshotNodesProvider): (WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition): (WebInspector.HeapSnapshotNodesProvider.prototype.serializeItem): (WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByNodeField): * inspector/front-end/HeapSnapshotGridNodes.js: * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProviderProxy.prototype.isEmpty): 2012-05-22 Yury Semikhatsky <yurys@chromium.org> Web Inspector: Debugger should correctly show catch scope https://bugs.webkit.org/show_bug.cgi?id=87197 Reviewed by Vsevolod Vlasov. * bindings/v8/DebuggerScript.js: In case of Catch scope the scope object is a synthetic one which means that it contains all standard object properties. When passing this object further we need to leave only properties available in the catch block(only variable thar stores the exception in fact). 2012-05-23 Allan Sandfeld Jensen <allan.jensen@nokia.com> [Qt] FloatSize Qt Support https://bugs.webkit.org/show_bug.cgi?id=87237 Reviewed by Andreas Kling. No new functionality. No new tests. * Target.pri: * platform/graphics/FloatSize.h: (FloatSize): * platform/graphics/qt/FloatSizeQt.cpp: Added. (WebCore::FloatSize::FloatSize): (WebCore::FloatSize::operator QSizeF): 2012-05-23 Alexei Filippov <alexeif@chromium.org> Web Inspector: Enable HeapSnapshotRealWorker in production mode. https://bugs.webkit.org/show_bug.cgi?id=87240 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): 2012-05-23 'Pavel Feldman' <pfeldman@chromium.org> Not reviewed: inspector's Find is not consuming event as of r117974. * inspector/front-end/AdvancedSearchController.js: (WebInspector.AdvancedSearchController.prototype.handleShortcut): * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.handleShortcut): 2012-05-23 Pavel Feldman <pfeldman@chromium.org> Web Inspector: enable drag-an-drop from the navigator panel. https://bugs.webkit.org/show_bug.cgi?id=87238 Reviewed by Vsevolod Vlasov. Making tree item draggable. * inspector/front-end/NavigatorView.js: (WebInspector.NavigatorSourceTreeElement.prototype.onattach): (WebInspector.NavigatorSourceTreeElement.prototype._onmousedown.callback): (WebInspector.NavigatorSourceTreeElement.prototype._onmousedown): (WebInspector.NavigatorSourceTreeElement.prototype._ondragstart): 2012-05-23 Ryosuke Niwa <rniwa@webkit.org> WebKit spends ~20% of time in HTMLTextAreaElement::defaultValue() when opening a review page https://bugs.webkit.org/show_bug.cgi?id=86813 Reviewed by Eric Seidel. Replace String and calls to String::operator+= by StringBuilder and calls to append respectively. While there are other optimizations we can implement such as not replacing all nodes in the shadow DOM, or not serializing the value when detecting whether the value had changed, they require considerable amount of refactoring and this change alone seems to buy us a lot so let us defer those 'til later time. Also avoid the redundant call to setValue in childrenChanged when the value is dirty. This should halve the time we spend in setting the value. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): (WebCore::HTMLTextAreaElement::defaultValue): 2012-05-23 Alice Boxhall <aboxhall@chromium.org> AX: Contenteditable tables should always be exposed as data tables https://bugs.webkit.org/show_bug.cgi?id=87052 Reviewed by Chris Fleizach. Tested in accessibility/table-detection.html. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::isDataTable): Return true if the node is contenteditable. 2012-05-23 Ryosuke Niwa <rniwa@webkit.org> Fix a typo per Darin's comment. * rendering/RenderBlockLineLayout.cpp: (WebCore::constructBidiRuns): 2012-05-23 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to v8::Null() in custom bindings (Part 2) https://bugs.webkit.org/show_bug.cgi?id=87209 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8::Null() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::toV8Object): (WebCore::toV8): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAccessorGetter): * bindings/v8/custom/V8IDBAnyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ImageDataCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Int8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * bindings/v8/custom/V8NamedNodeMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): (WebCore::toV8Slow): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGElementCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8SVGPathSegCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8StyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8TrackEventCustom.cpp: (WebCore::V8TrackEvent::trackAccessorGetter): * bindings/v8/custom/V8Uint16ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::toV8): 2012-05-23 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to v8::Null() in custom bindings (Part 1) https://bugs.webkit.org/show_bug.cgi?id=87207 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8::Null() in custom bindings. Also this patch makes V8DeviceMotionEventCustom::createAccelerationObject() and V8DeviceMotionEventCustom::createRotationRateObject() static. No tests. No change in behavior. * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSRuleCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8CSSValueCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAccessorGetter): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAccessorGetter): (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter): (WebCore::V8Coordinates::headingAccessorGetter): (WebCore::V8Coordinates::speedAccessorGetter): * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMTokenListCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter): (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter): (WebCore::V8DeviceMotionEvent::intervalAccessorGetter): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter): (WebCore::V8DeviceOrientationEvent::betaAccessorGetter): (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter): (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAccessorGetter): * bindings/v8/custom/V8EntryCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EntrySyncCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float32ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8Float64ArrayCustom.cpp: (WebCore::toV8): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::toV8): 2012-05-22 MORITA Hajime <morrita@google.com> [Refactoring] ElementShadow::m_needsRedistributing should be on ContentDistributor https://bugs.webkit.org/show_bug.cgi?id=87216 Reviewed by Kentaro Hara. Moved ElementShadow::m_needsRedistributing to ContentDistributor::m_needsRedistributing No new tests. No behavior change. * dom/ElementShadow.cpp: (WebCore::ElementShadow::recalcStyle): (WebCore::ElementShadow::needsRedistributing): (WebCore::ElementShadow::setNeedsRedistributing): * dom/ElementShadow.h: (ElementShadow): * dom/ShadowRoot.h: Removed outdated declarations. * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::ContentDistributor): * html/shadow/ContentDistributor.h: (WebCore::ContentDistributor::needsRedistributing): (WebCore::ContentDistributor::setNeedsRedistributing): (WebCore::ContentDistributor::clearNeedsRedistributing): 2012-05-22 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to v8::Null() in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=87202 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to v8::Null() in CodeGeneratorV8.pm. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateFunctionCallback): (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::contentDocumentAttrGetter): (WebCore::TestObjV8Internal::getSVGDocumentCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): 2012-05-22 Andreas Kling <kling@webkit.org> Short-circuit Element::attrIfExists() when the Element has no Attr list. <http://webkit.org/b/87214> Reviewed by Ryosuke Niwa. This function was lukewarm on Dromaeo/dom-attr (0.4% of samples.) Added an early return if !hasAttrList() to avoid the function call overhead of ElementAttributeData::attrIfExists(). * dom/Element.cpp: (WebCore::Element::attrIfExists): 2012-05-22 Hayato Ito <hayato@chromium.org> Remove an assertion since an event's target might be a shadow root if a text node is clicked. https://bugs.webkit.org/show_bug.cgi?id=87072 Reviewed by Dimitri Glazkov. Tests: fast/dom/shadow/shadow-dom-event-dispatching.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker): 2012-05-22 Dongwoo Im <dw.im@samsung.com> [EFL] Implements the registerProtocolHandler method and option. https://bugs.webkit.org/show_bug.cgi?id=73638 Reviewed by Andreas Kling. The registerProtocolHandler() method allows Web sites to register themselves as possible handlers for particular schemes. http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler * CMakeLists.txt: Add page/NavigatorRegisterProtocolHandler.idl into WebCore_IDL_FILES. 2012-05-22 Kentaro Hara <haraken@chromium.org> [V8][Performance] Pass Isolate to v8::Null() in V8Node::toV8() https://bugs.webkit.org/show_bug.cgi?id=87193 Reviewed by Adam Barth. This patch improves the performance of Bindings/undefined-first-child.html by 58.7%, Bindings/undefined-get-element-by-id.html by 26.8%, Dromaeo/dom-query.html(getElementById (not in document)) by 9.8%, and Dromaeo/dom-query.html(getElementsByName (not in document)) by 2.1%. These benchmarks test the performance of accessing an undefined Node object. Performance test results in my Linux desktop: [Bindings/undefined-first-child.html] - without my patch RESULT Bindings: undefined-first-child= 481.843775891 runs/s median= 474.934036939 runs/s, stdev= 17.7753278263 runs/s, min= 471.204188482 runs/s, max= 534.629404617 runs/s - with my patch RESULT Bindings: undefined-first-child= 764.720531908 runs/s median= 803.515696424 runs/s, stdev= 54.7402312963 runs/s, min= 688.806888069 runs/s, max= 807.061790668 runs/s [Bindings/undefined-get-element-by-id.html] - without my patch RESULT Bindings: undefined-get-element-by-id= 236.642705579 runs/s median= 234.527786832 runs/s, stdev= 5.77090297761 runs/s, min= 231.362467866 runs/s, max= 246.305418719 runs/s - with my patch RESULT Bindings: undefined-get-element-by-id= 300.031032067 runs/s median= 303.797468354 runs/s, stdev= 6.99060409266 runs/s, min= 287.581699346 runs/s, max= 304.955527319 runs/s [Dromaeo/dom-query.html(getElementById (not in document))] - without my patch 2855.80runs/s ±0.30% - with my patch 3136.20runs/s ±0.22% [Dromaeo/dom-query.html(getElementsByName (not in document))] - without my patch 2198.00runs/s ±0.50% - with my patch 2243.40runs/s ±3.39% Currently v8::Null() looks up Isolate, which is a bottleneck of V8Node::toV8() for undefined Nodes. This patch removes the Isolate look-up by passing Isolate to v8::Null(), like v8::Null(isolate). * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateHeader): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: Updated run-bindings-tests results. (WebCore::toV8): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestEventTarget.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestException.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestInterface.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestNode.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestObj.h: (WebCore::toV8): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (WebCore::toV8): 2012-05-22 MORITA Hajime <morrita@google.com> REGRESSION(r116629) tests for <style scoped> is crashing https://bugs.webkit.org/show_bug.cgi?id=87191 Reviewed by Kent Tamura. unregisterWithScopingNode() and registerWithScopingNode() doesn't follow refactoring around removedFrom(), insertedInto() and willRemove(). This change aligns them to such recent changes. No new tests. Covered by existing tests. * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::unregisterWithScopingNode) (WebCore::HTMLStyleElement::insertedInto): - Allowed registerWithScopingNode() only for in-document traversal. That is how it originally did. (WebCore::HTMLStyleElement::removedFrom): - Gave ex-parent to unregisterWithScopingNode(). * html/HTMLStyleElement.h: (WebCore::HTMLStyleElement::unregisterWithScopingNode): (HTMLStyleElement): 2012-05-21 Shawn Singh <shawnsingh@chromium.org> Improve W3C conformance of backface-visibility https://bugs.webkit.org/show_bug.cgi?id=84195 Reviewed by Adrienne Walker. Tests: compositing/backface-visibility/backface-visibility-3d.html compositing/backface-visibility/backface-visibility-hierarchical-transform.html compositing/backface-visibility/backface-visibility-non3d.html compositing/backface-visibility/backface-visibility-simple.html Unit Tests: CCLayerTreeHostCommonTest::verifyBackFaceCullingWithoutPreserves3d CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3d Also updated a few other layout and unit tests. This patch updates chromium to conform to the W3C spec on CSS transforms, Section 12 about backface visibility. This patch also updates layout tests to reflect the latest W3C spec. In particular, rule #1 on section 12, http://dev.w3.org/csswg/css3-transforms/#backface-visibility-property states which transforms should be used to determine backface-visibility. Because chromium has an additional quirk of the concept of render surfaces, unit tests needed to be updated as well. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::layerIsRootOfNewRenderingContext): (WebCore): (WebCore::isLayerBackFaceVisible): (WebCore::isSurfaceBackFaceVisible): (WebCore::calculateVisibleLayerRect): (WebCore::layerShouldBeSkipped): (WebCore::calculateDrawTransformsAndVisibilityInternal): 2012-05-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r118095. http://trac.webkit.org/changeset/118095 https://bugs.webkit.org/show_bug.cgi?id=87201 "Causing crashes on Mac in WebCore::StyleResolver::adjustRenderStyle (Requested by sundiamonde on #webkit). * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-22 Levi Weintraub <leviw@chromium.org> NULL ptr in WebCore::RenderBlock::layoutRunsAndFloatsInRange https://bugs.webkit.org/show_bug.cgi?id=77786 Reviewed by Ryosuke Niwa. InlineBidiResolver adds one fake TextRun for isolated inlines in the process of creating the list of TextRuns to send to the UBA. After the UBA has been run and the TextRuns reordered, we re-run InlineBidiResolver rooted in the isolate and replace the fake run with those generated by the subsequent pass by calling the method BidiRunList::replaceRunWithRuns. This method assumes there are runs to replace the fake run with. Positioned inline children are ignored when creating TextRuns, so when an isolated inline has only positioned children we end up with an empty set of runs to pass to replaceRunWithRuns. Ideally, we'd remove the fake run and not replace it with anything, but BidiRunList keeps a pointer to the logically last run, which we're unable to easily re-determine after the UBA has been run. Instead, we leave the fake run in the list and simply avoid calling replaceRunWithRuns when we don't have any replacement runs. Test: fast/block/line-layout/crash-in-isolate-with-positioned-child.html * rendering/RenderBlockLineLayout.cpp: (WebCore::constructBidiRuns): 2012-05-22 Kent Tamura <tkent@chromium.org> [V8] Refactor generation code for non-standard functions https://bugs.webkit.org/show_bug.cgi?id=87185 Reviewed by Kentaro Hara. No behavior change. Just a refactoring. * bindings/scripts/CodeGeneratorV8.pm: (IsStandardFunction): Introduce a new function to check if a function can be in a batch registration. (GenerateNonStandardFunction): Factor out a code to generate non-standard functions. (GenerateImplementation): Use IsStandardFunction and GenerateNonStandardFunction. 2012-05-22 Hayato Ito <hayato@chromium.org> Make ComposedShadowTreeWalker traverse inactive insertion points correctly. https://bugs.webkit.org/show_bug.cgi?id=86830 Reviewed by Dimitri Glazkov. Fixed InsertionPoint::isActive() issue, which may return true wrongly even if the insertion point is not in Shadow DOM subtree. Now ComposedShadowTreeWalker can traverse inactive insertion points correctly using InsertionPoint::isActive(). Test: fast/dom/shadow/composed-shadow-tree-walker.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNode): (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement): (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::isActive): * html/shadow/InsertionPoint.h: (WebCore::isActiveInsertionPoint): (WebCore): 2012-05-22 Mark Pilgrim <pilgrim@chromium.org> [Chromium] Call canAccelerate2dCanvas directly https://bugs.webkit.org/show_bug.cgi?id=86893 Reviewed by James Robinson. Part of a refactoring series. See tracking bug 82948. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::shouldAccelerate): * platform/chromium/PlatformSupport.h: 2012-05-22 Jason Liu <jason.liu@torchmobile.com.cn> [BlackBerry] Possible to clobber httponly cookie. https://bugs.webkit.org/show_bug.cgi?id=86067 Reviewed by Rob Buis. If a cookie is set by javaScript and there is already a same httpOnly cookie in cookieManager, we should reject it. If it has a httpOnly property, we reject it, too. Test: http/tests/cookies/js-get-and-set-http-only-cookie.php * platform/blackberry/CookieJarBlackBerry.cpp: (WebCore::setCookies): * platform/blackberry/CookieManager.cpp: (WebCore::CookieManager::setCookies): (WebCore::CookieManager::shouldRejectNotHttpCookie): (WebCore): * platform/blackberry/CookieManager.h: 2012-05-22 Dana Jansens <danakj@chromium.org> [chromium] Don't drop children of a RenderSurface from the renderSurfaceLayerList when then position of the surface in its clipRect is not known https://bugs.webkit.org/show_bug.cgi?id=87181 Reviewed by Adrienne Walker. We want to avoid dropping things from the renderSurfaceLayerList on main thread when they may be in the renderSurfaceLayerList on impl thread due to animation. A render surface would drop all its children if its contentRect was clipped to become empty by its parent. But when the surface is being animated, then we can't be sure how its parent will clip the surface's content, so we don't clip it at all. Chromium bug: http://crbug.com/128739 Unit test: CCLayerTreeHostCommonTest.verifyClipRectCullsSurfaceWithoutVisibleContent * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): 2012-05-22 Kangil Han <kangil.han@samsung.com> [EFL][DRT] Implement touch event https://bugs.webkit.org/show_bug.cgi?id=86720 Reviewed by Hajime Morita. Currently EFL DRT doesn't support touch event. Therefore, this patch enabled it and implemented some eventSender function callbacks. * platform/PlatformTouchEvent.h: (PlatformTouchEvent): Implement meta state. * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): Implement meta state. 2012-05-22 Chris Rogers <crogers@google.com> AudioNodeOutput::disconnectAllParams() must take care when iterating through its parameter list https://bugs.webkit.org/show_bug.cgi?id=87190 Reviewed by Kenneth Russell. No new tests. Covered by existing tests. * Modules/webaudio/AudioNodeOutput.cpp: (WebCore::AudioNodeOutput::disconnectAllParams): 2012-05-22 MORITA Hajime <morrita@google.com> <shadow> and <content> should be hidden behind ContextEnabledFeatures https://bugs.webkit.org/show_bug.cgi?id=87063 This change repalces "runtimeConditional" tag definition property with new "contextConditional" property, which refers ContextEnabledFeatures instead of RuntimeEnabledFeatures. Reviewed by Dimitri Glazkov. No new tests. DRT cannot test this. No behaviour change on DRT. * dom/make_names.pl: (defaultTagPropertyHash): (printConstructorInterior): (printFactoryCppFile): (printWrapperFunctions): (printWrapperFactoryCppFile): * html/HTMLTagNames.in: 2012-05-22 Kent Tamura <tkent@chromium.org> Fix a crash in HTMLFormControlElement::disabled(). https://bugs.webkit.org/show_bug.cgi?id=86534 Reviewed by Hajime Morita. Node::removedFrom() was not called in some cases. This patch fixes it. No new tests. It's almost impossible to make a reliable test. * dom/ContainerNodeAlgorithms.h: Remove inDocument() check so that Node::removedFrom() is called even if a parent node in an orphan tree is deleted but a child node remains, 2012-05-22 James Robinson <jamesr@chromium.org> Add a Setting to make position:fixed form a new stacking context https://bugs.webkit.org/show_bug.cgi?id=87186 Reviewed by Adam Barth. position:fixed elements form a new stacking context in several mobile WebKit ports and in the Qt port always. To be consistent across devices, we want to try turning it on everywhere. This will likely cause compatibility issues, so we need a runtime setting in order to stage the change carefully. Tests: fast/block/positioning/fixed-position-stacking-context.html fast/block/positioning/fixed-position-stacking-context2.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setFixedPositionCreatesStackingContext): (WebCore::Settings::fixedPositionCreatesStackingContext): (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): (WebCore::InternalSettings::setFixedPositionCreatesStackingContext): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-05-22 Adam Barth <abarth@webkit.org> RenderInline::absoluteRects does some incorrect layout math https://bugs.webkit.org/show_bug.cgi?id=87036 Reviewed by Eric Seidel. http://trac.webkit.org/changeset/88297/trunk/Source/WebCore/rendering/RenderInline.cpp contained a typo. We should accumulate offsets, not add sizes to offsets. Test: fast/inline/boundingBox-with-continuation.html * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): (WebCore): 2012-05-22 Dana Jansens <danakj@chromium.org> [chromium] Don't force the visibleLayerRect to be empty for animating layers whose front face is not visible https://bugs.webkit.org/show_bug.cgi?id=86886 Reviewed by Adrienne Walker. Previously we would force the visibleLayerRect to be empty for these animating layers, and then special case the pre-painting code to paint them if they were within some size limit, to avoid having the layer steal too much memory. Instead, just use the visibleLayerRect given to the layer. Since the transform flips the layer such that its back face is visible, it will also compute a visibleLayerRect in the front face of the layer, and its size will be bounded by the viewport. This will cause the layer to be painted with visible priority instead of prepainted, but ensures the visible parts of the layer is painted and ready to go when the animation flips the layer around. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleLayerRect): 2012-05-22 Jer Noble <jer.noble@apple.com> REGRESSION (r98359): Video does not render on http://panic.com/dietcoda/ https://bugs.webkit.org/show_bug.cgi?id=87171 Reviewed by Maciej Stachowiak. No new tests; behavior is very timing specific and only occurs on a subset of all platforms. Instead of calling prepareForRendering() from metadataLoaded(), which may fail and cause subsequent calls to prepareForRendering() to short circuit, call createVideoLayer() directly, which achieves the original goals of the fix for http://webkit.org/b/70448, but without breaking subsequent calls to prepareForRendering() if called at the wrong time. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): 2012-05-22 Tim Horton <timothy_horton@apple.com> Add a quirk for applications that depend on the relative ordering of progressCompleted/didFinishLoad https://bugs.webkit.org/show_bug.cgi?id=87178 <rdar://problem/11468434> Reviewed by Maciej Stachowiak. Some applications depend on the relative ordering of progressCompleted/didFinishLoad, which was changed to be more correct in http://trac.webkit.org/changeset/94105. For applications built before 94105, we can provide the old behavior. For the time being, this will only apply to Mail.app. No new tests, will not affect behavior for any application except Mail. * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setNeedsDidFinishLoadOrderQuirk): (WebCore::Settings::needsDidFinishLoadOrderQuirk): 2012-05-22 Alexis Menard <alexis.menard@openbossa.org> Move some CSS regions properties to CSSParser::isValidKeywordPropertyAndValue. https://bugs.webkit.org/show_bug.cgi?id=87169 Reviewed by Tony Chang. Move some CSS regions properties to the fast path implemented by CSSParser::isValidKeywordPropertyAndValue. No new tests : Existing tests should cover. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): 2012-05-22 Emil A Eklund <eae@chromium.org> Represents margins as box and simplify writing mode logic https://bugs.webkit.org/show_bug.cgi?id=86952 Reviewed by Eric Seidel. Add a new class, FractionalLayoutBox, that represents the four sides of a box and change RenderBox to use it to represent margins. The new box class is intended to be used to represent things like margins, paddings and borders where the current rect class isn't a good fit. It also encapsulated a lot of the horizontal/vertical writing mode and bidi logic allowing it to be reused. No new tests, no change in functionality. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/FractionalLayoutBoxExtent.cpp: Added. * platform/graphics/FractionalLayoutBoxExtent.h: Added. * rendering/LayoutTypes.h: * rendering/RenderBlock.cpp: * rendering/RenderBox.cpp: * rendering/RenderBox.h: * rendering/RenderScrollbarPart.cpp: * rendering/RenderScrollbarPart.h: 2012-05-22 Kentaro Hara <haraken@chromium.org> [V8] Replace 'throwTypeError(); return Undefined();' with 'return throwTypeError();' https://bugs.webkit.org/show_bug.cgi?id=87106 Reviewed by Adam Barth. This patch replaces throwTypeError(); return v8::Undefined(); with return throwTypeError(); No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOverloadedFunctionCallback): (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethodCallback): (WebCore::TestObjV8Internal::overloadedMethod1Callback): 2012-05-22 Dan Bernstein <mitz@apple.com> REGRESSION (r105513): CSS max-width is not applied to SVG element https://bugs.webkit.org/show_bug.cgi?id=87050 Reviewed by Darin Adler. Tests: svg/css/max-height.html svg/css/max-width.html * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Changed to also call into the base class implementation of this function if max-width was specified. (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Changed to call into the bas class implementation of this function if either height or max-height were specified. 2012-05-22 Kentaro Hara <haraken@chromium.org> [V8] Pass Isolate to throwTypeError() https://bugs.webkit.org/show_bug.cgi?id=87111 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch passes Isolate to throwTypeError() in custom bindings. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCallback): * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::constructWebGLArray): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallback): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::setDragImageCallback): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCallback): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallback): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::openCallback): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionStartAccessorGetter): (WebCore::V8HTMLInputElement::selectionStartAccessorSetter): (WebCore::V8HTMLInputElement::selectionEndAccessorGetter): (WebCore::V8HTMLInputElement::selectionEndAccessorSetter): (WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter): (WebCore::V8HTMLInputElement::selectionDirectionAccessorSetter): (WebCore::V8HTMLInputElement::setSelectionRangeCallback): * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: (WebCore::V8HTMLMediaElement::controllerAccessorSetter): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::inspectedObjectCallback): * bindings/v8/custom/V8IntentConstructor.cpp: (WebCore::V8Intent::constructorCallback): * bindings/v8/custom/V8MessageChannelConstructor.cpp: (WebCore::V8MessageChannel::constructorCallback): * bindings/v8/custom/V8NotificationCenterCustom.cpp: (WebCore::V8NotificationCenter::requestPermissionCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: (WebCore::V8SQLResultSetRowList::itemCallback): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-05-22 Kentaro Hara <haraken@chromium.org> [V8] Replace 'setDOMException(); return Undefined();' with 'return setDOMException();' https://bugs.webkit.org/show_bug.cgi?id=87102 Reviewed by Adam Barth. This patch replaces setDOMException(); return v8::Undefined(); with return setDOMException(); In addition, just in case, this patch replaces if (...) setDOMException(); return v8::Undefined(); with if (...) return setDOMException(); return v8::Undefined(); because people might insert some code just above 'return v8::Undefined()' in the future. No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArrayWithArrayBufferArgument): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::getInt8Callback): (WebCore::V8DataView::getUint8Callback): (WebCore::V8DataView::setInt8Callback): (WebCore::V8DataView::setUint8Callback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::V8DirectoryEntrySync::getDirectoryCallback): (WebCore::V8DirectoryEntrySync::getFileCallback): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::addCallback): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8SVGLengthCustom.cpp: (WebCore::V8SVGLength::valueAccessorGetter): (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::observeCallback): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): 2012-05-22 Martin Robinson <mrobinson@igalia.com> [TextureMapper] [Cairo] Implement repaint counters https://bugs.webkit.org/show_bug.cgi?id=87062 Reviewed by Gustavo Noronha Silva. No new tests. This just adds a debugging feature that shouldn't affect the normal drawing of a page. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::updateBackingStore): Now, if repaint counters are enabled, increment the repaint count and call drawRepaintCounter. (WebCore::TextureMapperLayer::drawRepaintCounter): Added. * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): Added declaration for drawRepaintCounter. 2012-05-22 Simon Fraser <simon.fraser@apple.com> Use the same animation begin time while updating compositing layers https://bugs.webkit.org/show_bug.cgi?id=87080 Reviewed by Dean Jackson. Tidied up some beginAnimationUpdate/endAnimationUpdate logic, but further cleaning is required. We currently bracket some calls to recaclcStyle() with begin/endAnimationUpdate, but not all. We don't bracket layout, or compositing updates. This patch adds bracketing around compositing updates, in order to be able to add some assertions in a later patch that rely on RenderLayer::currentTransform() giving consistent results, since currentTransform() depends on the animation begin time. Made AnimationController::beginAnimationUpdate() and AnimationController::endAnimationUpdate() nestable by adding a counter. Added a stack-based class, AnimationUpdateBlock, which calls begin/endAnimationUpdate. Replaced calls to begin/endAnimationUpdate in Document::updateStyleIfNeeded() and Document::styleResolverChanged() with AnimationUpdateBlock. Filed a bug to cover other calls to recalcStyle which might need this (87159). Removed a call to beginAnimationUpdate() in Document::implicitOpen(), which was added in r42415. I believe that r57390 makes this unnecessary, and was not able to reproduce the original bug after removing it. It was the only unpaired beginAnimationUpdate call. Made AnimationControllerPrivate::getAnimatedStyleForRenderer() not use a new beginTime each time it was called, so its beginTime now depends on some earlier beginAnimationUpdate. Fixed CSSComputedStyleDeclaration::getPropertyCSSValue() to use an AnimationUpdateBlock so that calls to computed style do use the current time to compute an animating value (as before). Not testable. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * dom/Document.cpp: (WebCore::Document::updateStyleIfNeeded): (WebCore::Document::implicitOpen): (WebCore::Document::styleResolverChanged): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer): (WebCore::AnimationController::AnimationController): (WebCore::AnimationController::beginAnimationUpdate): (WebCore::AnimationController::endAnimationUpdate): * page/animation/AnimationController.h: (AnimationController): (WebCore): (AnimationUpdateBlock): (WebCore::AnimationUpdateBlock::AnimationUpdateBlock): (WebCore::AnimationUpdateBlock::~AnimationUpdateBlock): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): 2012-05-22 Tony Chang <tony@chromium.org> REGRESSION(r117613): Dromaeo/jslib-style-prototype regressed by 20% https://bugs.webkit.org/show_bug.cgi?id=87142 Reviewed by Alexis Menard. Move CSSPropertyDisplay back into isValidKeywordPropertyAndValue. Pass in the parser context so we can check whether we're grid or not. No new tests. Covered by Dromaeo/jslib-style-prototype perf test. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::parseKeywordValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFont): == Rolled over to ChangeLog-2012-05-22 ==