2012-03-27 Joe Thomas Implement vw/vh/vmin (viewport sizes) from CSS3 Values and Units https://bugs.webkit.org/show_bug.cgi?id=27160 Reviewed by Antti Koivisto. vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units. New Length types such as ViewportRelativeWidth, ViewportRelativeHeight and ViewportRelativeMin are added for these length units and included the support for fetching the value of these relative units based on the current viewport size. The specification related to this implementation is http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths. Tests: css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: Modified to support viewport relative Length types. (getAttributeSetForAccessibilityObject): * css/CSSComputedStyleDeclaration.cpp: Ditto. (WebCore::getPositionOffsetValue): (WebCore::getBorderRadiusCornerValues): (WebCore::getBorderRadiusCornerValue): (WebCore::getBorderRadiusShorthandValue): (WebCore::lineHeightFromStyle): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSGrammar.y: Added vw/vh/vmin support. * css/CSSParser.cpp: Parsing of relative units and creation of CSSPrimitiveValue. (WebCore::CSSParser::validUnit): Added vw/vh/vmin to the valid units. (WebCore::CSSParser::createPrimitiveNumericValue): Added vw/vh/vmin as valid primitive units. (WebCore::unitFromString): (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitiveValue for vw/vh/vmin. (WebCore::CSSParser::detectNumberToken): Parsing the vw/vh/vmin tokens. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vw/vh/vmin. (WebCore::unitCategory): Ditto. (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Added support for vw/vh/vmin. (WebCore::CSSPrimitiveValue::customCssText): Ditto. (WebCore::CSSPrimitiveValue::viewportRelativeLength): Function to create the Length structure for the viewport-relative unit types. (WebCore): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isViewportRelativeLength): Checks whether the primitive value is ViewportRelative Lengths. (CSSPrimitiveValue): * css/CSSPrimitiveValue.idl: Added support for vw/vh/vmin. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): Ditto. * css/CSSStyleApplyProperty.cpp: Applying relative viewport length units to the specific CSS property. (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/CSSStyleSelector.cpp: Added support for viewport relative units. * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size. (WebCore::miminumValueForLength): (WebCore::valueForLength): (WebCore::floatValueForLength): * css/LengthFunctions.h: Added new RenderView argument. (WebCore): * dom/Document.cpp: (WebCore::Document::pageSizeAndMarginsInPixels): Modified to support viewport relative Length types. (WebCore::Document::viewportSize): New function to fetch the current viewport size. (WebCore): * dom/Document.h: Ditto. (Document): * html/HTMLAreaElement.cpp: Modified to support viewport relative Length types. (WebCore::HTMLAreaElement::getRegion): * platform/Length.h: (WebCore::Length::isViewportRelative): To check the Length is of type ViewportRelative. (WebCore::Length::viewportRelativeLength): To get the relative value. * rendering/RenderBR.cpp: Modified to support viewport relative Length types. (WebCore::RenderBR::lineHeight): * rendering/RenderBlock.cpp: Ditto. (WebCore::RenderBlock::textIndentOffset): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::RenderBlock::lineHeight): * rendering/RenderBox.cpp: Ditto. (WebCore::RenderBox::reflectionOffset): (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::clipRect): (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): (WebCore::RenderBox::computeInlineDirectionMargins): (WebCore::RenderBox::computeContentLogicalHeightUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): (WebCore::RenderBox::computeBlockDirectionMargins): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::RenderBox::computePositionedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidthReplaced): (WebCore::RenderBox::computePositionedLogicalHeightReplaced): * rendering/RenderBoxModelObject.cpp: Ditto. (WebCore::RenderBoxModelObject::relativePositionOffsetX): (WebCore::RenderBoxModelObject::relativePositionOffsetY): (WebCore::RenderBoxModelObject::paddingTop): (WebCore::RenderBoxModelObject::paddingBottom): (WebCore::RenderBoxModelObject::paddingLeft): (WebCore::RenderBoxModelObject::paddingRight): (WebCore::RenderBoxModelObject::paddingBefore): (WebCore::RenderBoxModelObject::paddingAfter): (WebCore::RenderBoxModelObject::paddingStart): (WebCore::RenderBoxModelObject::paddingEnd): (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::computeBorderImageSide): (WebCore::RenderBoxModelObject::paintNinePieceImage): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::paintBoxShadow): * rendering/RenderFlexibleBox.cpp: Ditto. (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderInline.cpp: Ditto. (WebCore::computeMargin): (WebCore::RenderInline::lineHeight): * rendering/RenderMenuList.cpp: Ditto. (WebCore::RenderMenuList::updateOptionsWidth): * rendering/RenderObject.cpp: Ditto. (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderReplaced.cpp: Ditto. (WebCore::RenderReplaced::paint): * rendering/RenderScrollbarPart.cpp: Ditto. (WebCore::calcScrollbarThicknessUsing): (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/RenderTable.cpp: Ditto. (WebCore::RenderTable::computeLogicalWidth): (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): * rendering/RenderTableCell.cpp: Ditto. (WebCore::RenderTableCell::logicalHeightForRowSizing): * rendering/RenderTableSection.cpp: Ditto. (WebCore::RenderTableSection::calcRowLogicalHeight): * rendering/RenderText.h: Ditto. (WebCore::RenderText::marginLeft): (WebCore::RenderText::marginRight): * rendering/RenderThemeMac.mm: Ditto. (WebCore::RenderThemeMac::paintMenuListButtonGradients): * rendering/RenderView.h: (WebCore::RenderView::viewportSize): * rendering/RenderWidget.cpp: Ditto. (WebCore::RenderWidget::paint): * rendering/RootInlineBox.cpp: Ditto. (WebCore::RootInlineBox::verticalPositionForBox): * rendering/style/RenderStyle.cpp: Ditto. (WebCore::calcRadiiFor): (WebCore::RenderStyle::getRoundedBorderFor): * rendering/style/RenderStyle.h: Ditto. * rendering/svg/RenderSVGRoot.cpp: Ditto. (WebCore::resolveLengthAttributeForSVG): (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): 2012-03-27 Gao Chun Remove deprecated LowPass2FilterNode and HighPass2FilterNode https://bugs.webkit.org/show_bug.cgi?id=82296 Reviewed by Chris Rogers. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/webaudio/AudioContext.cpp: * Modules/webaudio/AudioContext.h: (WebCore): (AudioContext): * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioNode.h: * Modules/webaudio/BiquadFilterNode.cpp: (WebCore::BiquadFilterNode::BiquadFilterNode): * Modules/webaudio/BiquadProcessor.cpp: * Modules/webaudio/BiquadProcessor.h: * Modules/webaudio/HighPass2FilterNode.cpp: Removed. * Modules/webaudio/HighPass2FilterNode.h: Removed. * Modules/webaudio/HighPass2FilterNode.idl: Removed. * Modules/webaudio/LowPass2FilterNode.cpp: Removed. * Modules/webaudio/LowPass2FilterNode.h: Removed. * Modules/webaudio/LowPass2FilterNode.idl: Removed. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: 2012-03-27 Sami Kyostila [chromium] Add TextureCopier for copying texture contents https://bugs.webkit.org/show_bug.cgi?id=80870 Reviewed by Stephen White. This patch introduces a TextureCopier class whose job is to copy the contents from one GL texture to another using the most efficient means for the current GPU. This version uses render-to-texture to do the copy, but a path based on EXT_framebuffer_blit can be added later. The class is intended to replace the use of image path operations such as glCopyTex{Sub}Image2D for duplicating texture contents. The reason is that such functions may not be very well optimized in some -- mainly mobile -- GPU drivers. With this patch the new copier is used just for Canvas2D layer presentation, but another potential use is for WebGL layer presentation. Test: webkit_unit_tests: TextureCopierTest * WebCore.gypi: * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: (Canvas2DLayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initializeSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (WebCore::LayerRendererChromium::textureCopier): (LayerRendererChromium): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderPosTexIdentity::getShaderString): (WebCore): (WebCore::FragmentShaderRGBATexCopy::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (VertexShaderPosTexIdentity): (WebCore::VertexShaderPosTexIdentity::init): (WebCore): (FragmentShaderRGBATexCopy): * platform/graphics/chromium/TextureCopier.cpp: Added. (WebCore): (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::copyTexture): * platform/graphics/chromium/TextureCopier.h: Added. (WebCore): (TextureCopier): (WebCore::TextureCopier::~TextureCopier): (AcceleratedTextureCopier): (WebCore::AcceleratedTextureCopier::create): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::CCTextureUpdater): * platform/graphics/chromium/cc/CCTextureUpdater.h: (WebCore): (CCTextureUpdater): (WebCore::CCTextureUpdater::copier): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread): 2012-03-27 Levi Weintraub Correct SVG paint functions that are still using IntPoints https://bugs.webkit.org/show_bug.cgi?id=82343 Reviewed by Eric Seidel. Two small corrections to SVG paint functions that should use LayoutPoint instead of IntPoint. No new tests. No change in behavior. * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::paint): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::paint): 2012-03-27 Zalan Bujtas Frame flattening: childframe in FrameView::layout() needs protector. https://bugs.webkit.org/show_bug.cgi?id=82345 Reviewed by Kenneth Rohde Christiansen. RefPtr protector(this) is supposed to protect the current frameview in FrameView::layout() from being destroyed by recalcStyle(). However, when frame flattening is on and a child frame is re-starting layout from the topmost parent, the protection is missing and parent's recalcStyle() can destroy the child frame. Moving the protector before the layout re-starting is initiated makes the child frame safe. No new tests. Unable to create a test case, where this scenario is reproducible. * page/FrameView.cpp: (WebCore::FrameView::layout): 2012-03-27 Antti Koivisto Construct CSSCharsetRule on CSSOM API access only https://bugs.webkit.org/show_bug.cgi?id=82332 Reviewed by Andreas Kling. Charset is just a string. There is usually no need to construct CSSCharsetRule at all. - Make CSS parser to return encoding string instead of CSSCharsetRule object. This string is used for constructing CSSCharsetRule if it is needed (and nothing else, @charset has no effect after string decoding). - Remove internal interface for adding and removing rules. It has no clients. * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::~CSSStyleSheet): (WebCore::CSSStyleSheet::parserAppendRule): (WebCore::CSSStyleSheet::ensureCharsetRule): (WebCore): (WebCore::CSSStyleSheet::length): (WebCore::CSSStyleSheet::item): (WebCore::CSSStyleSheet::clearCharsetRule): (WebCore::CSSStyleSheet::clearRules): (WebCore::CSSStyleSheet::parserSetEncodingFromCharsetRule): (WebCore::CSSStyleSheet::rules): (WebCore::CSSStyleSheet::insertRule): (WebCore::CSSStyleSheet::addRule): (WebCore::CSSStyleSheet::deleteRule): * css/CSSStyleSheet.h: (WebCore): (CSSStyleSheet): (WebCore::CSSStyleSheet::ruleVector): (WebCore::CSSStyleSheet::hasCharsetRule): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::reparseStyleSheet): 2012-03-27 Stephen White [chromium] Fix filter context creation to be more conservative. https://bugs.webkit.org/show_bug.cgi?id=82349 Reviewed by James Robinson. Covered by webkit_unit_tests, and css3/filters layout tests. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setFilters): Only request a filter context if the filter lists is non-empty. * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setNeedsFilterContext): Add a bool param, so tests can cancel a request for filter contexts. 2012-03-27 Stephen Chenney elements in the parser can create elements not marked as created by the parser https://bugs.webkit.org/show_bug.cgi?id=81985 Reviewed by Adam Barth. The SVGUseElement was creating its shadow tree immediately upon demand. This resulted in nodes being created that were not marked as "createdByParser", even during parsing. As it happens, there is already code in there to track "createdByParser" in the SVGUseElement, it was just being ignored all the time. This may even have been inefficient. Now we delay creating the shadow dom tree until children are finished, which is the standard time to handle the createdByParser flag. I also verified that other SVG classes that derived from core DOM classes that use the createdByParser flag do correctly pass this flag on. No new tests as this is covered by existing tests and does not have new behavior. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoDocument): (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::willRecalcStyle): (WebCore::SVGUseElement::finishParsingChildren): * xml/XMLErrors.cpp: (WebCore::XMLErrors::insertErrorMessageBlock): 2012-03-27 Ming Xie [BlackBerry] Disable DisallowCType.h usage https://bugs.webkit.org/show_bug.cgi?id=82211 Reviewed by Rob Buis. Build fix: QNX port does use ctype.h, so we should not include in WebCore/config.h No new tests - Build Fix * config.h: 2012-03-27 Hao Zheng Change default position attribute of media control panel to relative for Android. https://bugs.webkit.org/show_bug.cgi?id=82303 Reviewed by Eric Carlson. Follow up https://bugs.webkit.org/show_bug.cgi?id=79746 . * css/mediaControlsChromiumAndroid.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): 2012-03-27 Alexei Filippov Web Inspector: Speed up snapshot parsing. https://bugs.webkit.org/show_bug.cgi?id=82325 Replacing the iterators with raw nodes/edges access speeds up some phases phasses up to 10 times, taking down the whole init time to less than 6 sec. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildNodeIndex): (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): 2012-03-27 Antti Koivisto Assertion failure in acid2. Rubber-stamped by Andreas Kling. Remove assert added in http://trac.webkit.org/changeset/112258. It seems insertedInto/removedFromDocument don't always pair. * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): 2012-03-27 Yury Semikhatsky Web Inspector: simplify heap profiler front-end https://bugs.webkit.org/show_bug.cgi?id=82338 Simplify constructors of WebInspector.HeapSnapshotArraySlice and WebInspector.HeapSnapshotEdgesProvider. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotArraySlice): (WebInspector.HeapSnapshotArraySlice.prototype.item): (WebInspector.HeapSnapshotArraySlice.prototype.slice): (WebInspector.HeapSnapshotNode.prototype.get rawEdges): (WebInspector.HeapSnapshot.prototype._retainersForNode): (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode): (WebInspector.HeapSnapshot.prototype.createEdgesProvider): (WebInspector.HeapSnapshotEdgesProvider): 2012-03-27 Vsevolod Vlasov Web Inspector: Tabbed pane should set focus on its contents on tab click. https://bugs.webkit.org/show_bug.cgi?id=82323 Reviewed by Pavel Feldman. Otherwise selected tab does not have focus. Also added tabIndex on tabElements to prevent pasting on closing middle click. * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.focus): (WebInspector.TabbedPane.prototype.selectTab): (WebInspector.TabbedPaneTab.prototype._createTabElement): (WebInspector.TabbedPaneTab.prototype._tabClicked): 2012-03-27 Pavel Podivilov Web Inspector: dispatch breakpoint-added and breakpoint-removed events on UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=82318 Reviewed by Vsevolod Vlasov. Breakpoint-added and breakpoint-removed events are always related to specific UISourceCode. See bug 82224 for more details. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.UISourceCodeImpl.prototype.breakpointAdded): (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): (WebInspector.ScriptsPanel.prototype._addBreakpointListeners): (WebInspector.ScriptsPanel.prototype._removeBreakpointListeners): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): * inspector/front-end/UISourceCode.js: 2012-03-27 Jason Liu [BlackBerry]Cleanup WTF string in platform/network/blackberry https://bugs.webkit.org/show_bug.cgi?id=82005 Reviewed by Rob Buis. No new tests. Just replace WTF::String with String. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyDataReceived): 2012-03-27 Alexander Pavlov Web Inspector: Enable "number" parameters in the web inspector protocol methods https://bugs.webkit.org/show_bug.cgi?id=82334 The generated protocol dispatcher does not understand protocol method parameters of type "number" (mapped to "double" in the native code.) Reviewed by Vsevolod Vlasov. * inspector/CodeGeneratorInspector.py: (RawTypes.Number.get_getter_name): (RawTypes.Number.get_c_initializer): (RawTypes.Number.get_js_bind_type): (RawTypes.Number.get_validate_method_params.ValidateMethodParams): (RawTypes.Number.get_validate_method_params): 2012-03-27 Alexei Filippov Web Inspector: Fix missing objects in the dominators view. https://bugs.webkit.org/show_bug.cgi?id=82194 Due to the nature of dominators tree it is not possible to hide internal objects there because they may happen to contain user objects that can't be hidden. Besides that it fixes a small bug in HeapSnapshotArraySlice.slice function. Reviewed by Yury Semikhatsky. * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotArraySlice.prototype.slice): 2012-03-27 Antti Koivisto Remove Document::mappedElementSheet() https://bugs.webkit.org/show_bug.cgi?id=82242 Reviewed by Andreas Kling and Nikolas Zimmermann. The only thing this is used for anymore is SVGFontFaceElement. That can be handled without the confusing extra stylesheet. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): * css/CSSStyleSelector.h: (CSSStyleSelector): - Add font face rules from registered SVGFontFaceElements. - Simplify the constructor signature. Stylesheets are part of the document. * dom/Document.cpp: (WebCore::Document::~Document): (WebCore::Document::createStyleSelector): (WebCore): (WebCore::Document::updateBaseURL): * dom/Document.h: (WebCore): (WebCore::Document::documentUserSheets): (Document): - Remove mappedElementSheet - Adapt to the CSSStyleSelector constructor signature changes. * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::svgFontFaceElements): (WebCore): (WebCore::SVGDocumentExtensions::registerSVGFontFaceElement): (WebCore::SVGDocumentExtensions::unregisterSVGFontFaceElement): * svg/SVGDocumentExtensions.h: (WebCore): (SVGDocumentExtensions): - Add map for SVGFontFaceElements * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::insertedIntoDocument): (WebCore::SVGFontFaceElement::removedFromDocument): (WebCore): * svg/SVGFontFaceElement.h: (SVGFontFaceElement): (WebCore::SVGFontFaceElement::fontFaceRule): - Switch to updating svgFontFaceElements map. - Use elementSheet as the parent sheet (nothing is ever added to the elementSheet, it is used for resolving relative URLs only). 2012-03-27 Vsevolod Vlasov Web Inspector: startEditing should remove tabIndex attribute from the element if it was not set before. https://bugs.webkit.org/show_bug.cgi?id=82322 Reviewed by Pavel Feldman. This patch removes tabIndex attribute from the element after editing if it was not present before. Otherwise tabIndex becomes set unexpectedly after exiting edit mode. * inspector/front-end/UIUtils.js: (WebInspector.startEditing.cleanUpAfterEditing): 2012-03-27 Vsevolod Vlasov Web Inspector: Tree outline should not start search on key press if it is being edited. https://bugs.webkit.org/show_bug.cgi?id=82327 Reviewed by Pavel Feldman. This is needed for snippet renaming support. * inspector/front-end/treeoutline.js: (TreeOutline): (TreeOutline.prototype._treeKeyPress): 2012-03-27 Levi Weintraub Revert RenderApplet::intrinsicSize to integers https://bugs.webkit.org/show_bug.cgi?id=82206 Reviewed by Eric Seidel. Intrinsic sizes originate either outside of WebCore, or from their initial values, which are always integers. Reverting RenderApplet::intrinsicSize to integers, the last spot improperly using LayoutUnits No new tests. No change in behavior. * rendering/RenderApplet.cpp: (WebCore::RenderApplet::intrinsicSize): * rendering/RenderApplet.h: (RenderApplet): 2012-03-27 Alexis Menard Increase code sharing between CSSComputedStyleDeclaration and CSSPropertyLonghand. https://bugs.webkit.org/show_bug.cgi?id=82261 Reviewed by Ryosuke Niwa. Use longhands declaration from CSSPropertyLonghand in CSSComputedStyleDeclaration to avoid code duplication. No new tests : refactoring only, we shouldn't have any behavior difference. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand): * css/CSSComputedStyleDeclaration.h: (WebCore): (CSSComputedStyleDeclaration): * css/CSSPropertyLonghand.cpp: (WebCore::outlineLonghand): Re-order to match the spec default order and also remove outline-offset as it is not part of the shorthand (http://www.w3.org/TR/css3-ui/#outline). Luckily this was cover by a layout test. 2012-03-27 Vsevolod Vlasov Web Inspector: Editable TextViewer should show cursor when it is focused. https://bugs.webkit.org/show_bug.cgi?id=82320 Reviewed by Pavel Feldman. TextViewer now focuses editable inner container unless read-only flag is set. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.focus): (WebInspector.TextEditorMainPanel): (WebInspector.TextEditorMainPanel.prototype._handleElementFocus): (WebInspector.TextEditorMainPanel.prototype.focus): 2012-03-26 Levi Weintraub Unreviewed. Removing change markers from ChangeLog. 2012-03-26 Levi Weintraub Convert RenderSelectionInfo::rect to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=82213 Reviewed by Eric Seidel. RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates local to renderers should be stored in LayoutUnits. No new tests. No change in behavior. * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::rect): (RenderSelectionInfo): 2012-03-26 Levi Weintraub Convert RenderSelectionInfo::rect to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=82213 Reviewed by Eric Seidel. RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates local to renderers should be stored in LayoutUnits as described in http://trac.webkit.org/wiki/LayoutUnit No new tests. No change in behavior. * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::rect): (RenderSelectionInfo): 2012-03-27 Nikolas Zimmermann Enable animVal support for SVGAnimatedRect https://bugs.webkit.org/show_bug.cgi?id=82317 Reviewed by Zoltan Herczeg. Enable animVal support for SVGAnimatedRect. Very simple now that everything is prepared. All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedRectAnimator. Extended existing tests to cover this. * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedRectAnimator::animValWillChange): (WebCore::SVGAnimatedRectAnimator::animValDidChange): * svg/SVGAnimatedRect.h: (SVGAnimatedRectAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::supportsAnimVal): 2012-03-27 Sheriff Bot Unreviewed, rolling out r112201. http://trac.webkit.org/changeset/112201 https://bugs.webkit.org/show_bug.cgi?id=82302 Breaks chromium's WebPageSerializerTest.HTMLNodes test (Requested by pfeldman on #webkit). * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::error): (WebCore): * loader/cache/CachedCSSStyleSheet.h: (CachedCSSStyleSheet): * loader/cache/CachedFont.cpp: (WebCore): (WebCore::CachedFont::error): * loader/cache/CachedFont.h: (CachedFont): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::error): * loader/cache/CachedResource.h: (CachedResource): * loader/cache/CachedScript.cpp: (WebCore::CachedScript::error): (WebCore): * loader/cache/CachedScript.h: (CachedScript): * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::error): (WebCore): * loader/cache/CachedXSLStyleSheet.h: (CachedXSLStyleSheet): 2012-03-27 Levi Weintraub LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=82185 Reviewed by Eric Seidel. Removing an optional parameter for old bounds in LayoutRepainter's constructor that is no longer used. The old bounds are instead always gleaned from the renderer's clippedOverflowRectForRepaint. The renderer's bounds and outline rect also are stored in LayoutUnits to properly detect sub-pixel changes during layout. Eventually, we'll pixel snap these values when telling the embedder to invalidate. Adding a comment to that effect. No new tests. No change in behavior. * rendering/LayoutRepainter.cpp: (WebCore::LayoutRepainter::LayoutRepainter): * rendering/LayoutRepainter.h: (LayoutRepainter): 2012-03-27 Nikolas Zimmermann Enable animVal support for SVGAnimatedString https://bugs.webkit.org/show_bug.cgi?id=82316 Reviewed by Zoltan Herczeg. Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared. All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator. Test: svg/animations/svgstring-animation-1.html * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedStringAnimator::animValWillChange): (WebCore::SVGAnimatedStringAnimator::animValDidChange): * svg/SVGAnimatedString.h: (SVGAnimatedStringAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::supportsAnimVal): 2012-03-27 Levi Weintraub Update usage of LayoutUnits in RenderListMarker https://bugs.webkit.org/show_bug.cgi?id=81921 Reviewed by Eric Seidel. Implementing proper pixel snapping in list marker painting, and correcting usage of integers for local coordinates/margins that should be sub-pixel. No new tests. No change in behavior. * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::localSelectionRect): Changed to LayoutUnits since this represents a rect in local coordinates. (WebCore::RenderListMarker::paint): Doing proper pixel snapping, and using integers for results from text measurement. (WebCore::RenderListMarker::computePreferredLogicalWidths): Using integers for results from text measurement. (WebCore::RenderListMarker::updateMargins): Fixing to be LayoutUnits. * rendering/RenderListMarker.h: (RenderListMarker): 2012-03-27 Levi Weintraub Revert linesBoundingBox to integers https://bugs.webkit.org/show_bug.cgi?id=82182 Reviewed by Eric Seidel. LayoutRects are intended to be pixel snapped to determine the ultimate screen coordinates, but the Inline Box tree is laid out using floats, and pixel snapping the resulting box from linesBoundingBox would produce a potentially incorrect rectangle. Keeping this using enclosingIntRect retains the previous accuracy and prevents misuse. No new tests. No change in behavior. * rendering/RenderInline.cpp: (WebCore::RenderInline::linesBoundingBox): * rendering/RenderInline.h: (RenderInline): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): * rendering/RenderText.cpp: (WebCore::RenderText::linesBoundingBox): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::linesBoundingBox): * rendering/svg/RenderSVGInlineText.h: (RenderSVGInlineText): 2012-03-26 Pavel Podivilov Web Inspector: store UIBreakpoints on UISourceCode. https://bugs.webkit.org/show_bug.cgi?id=82214 This change will allow us to make breakpoint-added and breakpoint-removed events a part of UISourceCode interface. See bug 82224 for more details. Reviewed by Vsevolod Vlasov. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI): (WebInspector.BreakpointManager.prototype.debuggerReset): * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.addScript): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.UISourceCodeImpl): (WebInspector.UISourceCodeImpl.prototype.breakpoints): (WebInspector.UISourceCodeImpl.prototype.breakpointAdded): (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype._snippetAdded): (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.get domain): (WebInspector.UISourceCode.prototype.get folderName): (WebInspector.UISourceCode.prototype.get fileName): (WebInspector.UISourceCode.prototype.get displayName): (WebInspector.UISourceCode.prototype._parseURL): (WebInspector.UISourceCode.prototype._didRequestContent): (WebInspector.UISourceCode.prototype.breakpoints): * inspector/front-end/inspector.html: 2012-03-27 Nat Duca [chromium] Fix crash with fling with tracing enabled https://bugs.webkit.org/show_bug.cgi?id=82306 The TRACE_EVENT_START instrumentation was deferencing a PassOwnPtr after it had been passed into another OwnPtr. This caused frequent crashes when tracing was enabled. Reviewed by Adam Barth. * platform/ActivePlatformGestureAnimation.cpp: (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation): * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp: (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation): 2012-03-27 Carlos Garcia Campos [SOUP] Implement missing methods in CookieJarSoup https://bugs.webkit.org/show_bug.cgi?id=82082 Reviewed by Martin Robinson. * platform/network/soup/CookieJarSoup.cpp: (WebCore::defaultCookieJar): Return a global GRefPtr to store the default cookie jar. (WebCore::soupCookieJar): Return the current cookie jar or create a new one. (WebCore::setSoupCookieJar): Set the current cookie jar. (WebCore::setCookies): Fix coding style. (WebCore::cookiesForDocument): Helper function to get the list of cookies as a string. (WebCore::cookies): Use cookiesForDocument(). (WebCore::cookieRequestHeaderFieldValue): Ditto. (WebCore::getRawCookies): Get the list of cookies for the given document and url. (WebCore::deleteCookie): Delete the given cookie. (WebCore::getHostnamesWithCookies): Use GOwnPtr. (WebCore::deleteCookiesForHostname): Use GOwnPtr and soup_cookie_domain_matches() instead of comparing the domain directly with the given hostname. (WebCore::deleteAllCookies): Use GOwnPtr. * platform/network/soup/CookieJarSoup.h: * platform/network/soup/GOwnPtrSoup.cpp: (WTF::SoupCookie): Add GOwnPtr template for SoupCookie. * platform/network/soup/GOwnPtrSoup.h: * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ensureSessionIsInitialized): Use soupCookieJar() instead of defaultCookieJar(). 2012-03-27 Nikolas Zimmermann Enable animVal support for SVGAnimatedBoolean https://bugs.webkit.org/show_bug.cgi?id=82311 Reviewed by Antti Koivisto. Enable animVal support for SVGAnimatedBoolean. Very simple now that everything is prepared. All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedBooleanAnimator. Extended existing tests to cover this. * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedBooleanAnimator::animValWillChange): (WebCore::SVGAnimatedBooleanAnimator::animValDidChange): * svg/SVGAnimatedBoolean.h: (SVGAnimatedBooleanAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::supportsAnimVal): 2012-03-27 Nikolas Zimmermann gets pixellated when stretched https://bugs.webkit.org/show_bug.cgi?id=81631 Reviewed by Antti Koivisto. Final cleanup of RenderReplaced after the intrinsic size negotiation patch series from some weeks/months ago. Stop tracking whether a RenderReplaced has an intrinsic size or not with an extra-bool, instead assume each RenderReplaced derived class has an intrinsic size. If not, the class should override computeIntrinsicRatioInformation() for any custom logic - currently only done by RenderImage. Remove all logic depending on m_hasIntrinsicSize from computeReplacedLogicalWidth/Height, which was used to support different sizing models depending on if the replaced element is a RenderImage or a RenderPart. Unify all of this in computeIntrinsicRatioInformation right in RenderReplaced. This allows to remove a hack from RenderImage::computeReplacedLogicalWidth(), which forced the synchroniziation of the intrinsicSize() before calling the base classes RenderReplaced::computeReplacedLogicalWidth(). Now RenderImage just overrides the layout() method, calls RenderReplaced::layout() and then sets the container size of the image resources to [contentWidth(), contentHeight()] - reflecting the actual result of the layout. Furthermore this now allows us to unify CachedImage::imageSizeForRenderer() again for both SVG and non-SVG images. Propagating the right container size to the image resource fixes the actual bug, that the SVGImage got pixellated. Adding new tests covering percentage width or height set on an embedding an external SVG, no more pixelation. Tests: svg/as-image/img-relative-height-expected.html svg/as-image/img-relative-height.html svg/as-image/img-relative-width-expected.html svg/as-image/img-relative-width.html * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageSizeForRenderer): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::RenderEmbeddedObject): * rendering/RenderImage.cpp: (WebCore::RenderImage::layout): (WebCore::RenderImage::computeIntrinsicRatioInformation): * rendering/RenderImage.h: (RenderImage): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): (WebCore::rendererHasAspectRatio): (WebCore): (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox): (WebCore::RenderReplaced::computeIntrinsicRatioInformation): (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/RenderReplaced.h: (WebCore::RenderReplaced::intrinsicSize): (RenderReplaced): (WebCore::RenderReplaced::setIntrinsicSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::setContainerSize): * svg/graphics/SVGImage.h: (WebCore::SVGImage::usesContainerSize): 2012-03-27 Ilya Tikhonovsky Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation. https://bugs.webkit.org/show_bug.cgi?id=82305 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._bfs): 2012-03-27 Nikolas Zimmermann SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation https://bugs.webkit.org/show_bug.cgi?id=67563 Reviewed by Dirk Schulze. Add SVGAnimatedIntegerOptionalInteger type handling animation of pair objects as used for the SVG properties 'filterRes' and 'order'. They're currently animated as SVGAnimatedNumberOptionalNumber - but that won't work for animVal support. Fix that and enable animVal support for SVGAnimatedInteger(OptionalInteger). Use 'int' as datatype for SVGAnimatedInteger instead of 'long' for consistency, and move SVGAnimatedEnumeration from 'int' to 'unsigned short', to make them distinguishable. Test: svg/animations/svginteger-animation-2.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAllInOne.cpp: * svg/SVGAnimatedEnumeration.h: (WebCore): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation): (WebCore): (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedIntegerAnimator::animValWillChange): (WebCore::SVGAnimatedIntegerAnimator::animValDidChange): (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger): (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedInteger.h: (WebCore): (SVGAnimatedIntegerAnimator): * svg/SVGAnimatedIntegerOptionalInteger.cpp: Added. (WebCore): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance): * svg/SVGAnimatedIntegerOptionalInteger.h: Copied from Source/WebCore/svg/SVGAnimatedInteger.h. (WebCore): (SVGAnimatedIntegerOptionalIntegerAnimator): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::~SVGAnimatedIntegerOptionalIntegerAnimator): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createIntegerOptionalInteger): (WebCore): (WebCore::SVGAnimatedType::integerOptionalInteger): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::supportsAnimVal): * svg/SVGAnimatedType.h: (SVGAnimatedType): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::setFilterRes): * svg/SVGFilterElement.h: (SVGFilterElement): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::getPathSegAtLength): * svg/SVGPathElement.h: (SVGPathElement): * svg/SVGPathParserFactory.cpp: (WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathByteStream): * svg/SVGPathParserFactory.h: (SVGPathParserFactory): * svg/SVGPathTraversalStateBuilder.cpp: (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex): * svg/SVGPathTraversalStateBuilder.h: (SVGPathTraversalStateBuilder): * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal): (WebCore::SVGAnimatedEnumerationPropertyTearOff::create): (WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue): (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff): * svg/properties/SVGPropertyInfo.h: * svg/properties/SVGPropertyTraits.h: 2012-03-25 Nikolas Zimmermann Enable animVal support for SVGAngle https://bugs.webkit.org/show_bug.cgi?id=82144 Reviewed by Rob Buis. Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared. All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator. Extended existing tests to cover this. * svg/SVGAnimatedAngle.cpp: (WebCore::sharedSVGAngle): (WebCore::SVGAnimatedAngleAnimator::constructFromString): (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedAngleAnimator::animValWillChange): (WebCore::SVGAnimatedAngleAnimator::animValDidChange): (WebCore::SVGAnimatedAngleAnimator::calculateDistance): * svg/SVGAnimatedAngle.h: (SVGAnimatedAngleAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::supportsAnimVal): 2012-03-27 Yury Semikhatsky Web Inspector: remove remains of path finder in heap profiler front-end https://bugs.webkit.org/show_bug.cgi?id=82304 Removed remainders of heap path finder as this code is not used anymore. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotProxy.js: 2012-03-27 Dan Bernstein Reverted r112214, since it was not the right fix for the build. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-03-27 Kentaro Hara [V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc https://bugs.webkit.org/show_bug.cgi?id=82201 Reviewed by Adam Barth. This patch improves performance of createTextNode() by 13%, createElement() by 14%, and cloneNode() by 16%. Similar performance improvement will be observed in DOM methods that create a new object every time. Performance test: https://bugs.webkit.org/attachment.cgi?id=133799 The performance test results are as follows. Since the performance of V8's GC is really unstable, the average of measured times makes no sense in Chromium. Instead, let us focus on the median. I believe that this performance improvement has impact on Dromaeo, but we cannot observe the improvement due to the unsteadiness of V8's GC, as shown below. Chromium/V8/Linux (without the patch): createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms) createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms) cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms) Dromaeo/dom-modify/createElement: 439.17runs/s +-31.60% (<--- pretty noisy) Dromaeo/dom-modify/createTextNode: 287.71runs/s +-28.39% (<--- pretty noisy) Dromaeo/dom-modify/cloneNode: 174.62runs/s +-25.68% (<--- pretty noisy) Chromium/V8/Linux (with the patch): createTextNode : median=240ms (mean=411.12ms, min=237ms, max=2965ms) createElement : median=325ms (mean=585.30ms, min=317ms, max=2984ms) cloneNode : median=310ms (mean=522.48ms, min=302ms, max=2988ms) Dromaeo/dom-modify/createElement: 507.15runs/s +-36.00% (<--- pretty noisy) Dromaeo/dom-modify/createTextNode: 251.01runs/s +-6.57% Dromaeo/dom-modify/cloneNode: 177.85runs/s +-28.74% (<--- pretty noisy) Chromium/V8/Mac (without the patch): createTextNode : median=317ms (mean=439.08ms, min=303ms, max=3126ms) createElement : median=403ms (mean=695.70ms, min=398ms, max=5615ms) cloneNode : median=384ms (mean=577.96ms, min=372ms, max=5313ms) Dromaeo/dom-modify/createElement: 493.89runs/s +-28.32% (<--- pretty noisy) Dromaeo/dom-modify/createTextNode: 279.66runs/s +-1.91% Dromaeo/dom-modify/cloneNode: 173.06runs/s +-24.41% (<--- pretty noisy) Chromium/V8/Mac (with the patch): createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms) createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms) cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms) Dromaeo/dom-modify/createElement: 510.47runs/s +-28.13% (<--- pretty noisy) Dromaeo/dom-modify/createTextNode: 215.80runs/s +-20.99% (<--- pretty noisy) Dromaeo/dom-modify/cloneNode: 174.41runs/s +-24.85% (<--- pretty noisy) Safari/JavaScriptCore/Mac: createTextNode : median=142ms (mean=141.04ms, min=110ms, max=168ms) createElement : median=234ms (mean=245.74ms, min=219ms, max=305ms) cloneNode : median=210ms (mean=213.36ms, min=204ms, max=284ms) Dromaeo/dom-modify/createElement: 822.49runs/s +-1.69% Dromaeo/dom-modify/createTextNode: 735.57runs/s +-0.91% Dromaeo/dom-modify/cloneNode: 135.20runs/s +-4.13% This patch makes the following two optimizations: [1] If the currently running context is equal to the context that we are about to enter, we do not call context->Enter(). [2] We do not create a Local handle of the context until we really need to enter the context. * bindings/scripts/CodeGeneratorV8.pm: (GenerateToV8Converters): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::persistentContext): (WebCore): * bindings/v8/V8Proxy.h: (V8Proxy): * WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results. 2012-03-27 Bill Budge cross-origin XMLHttpRequest doesn't work with redirect https://bugs.webkit.org/show_bug.cgi?id=57600 Reviewed by Adam Barth. Changes DocumentThreadableLoader to follow the CORS redirect steps when asynchronously loading a cross origin request with access control. Synchronous loads should not be affected. Also adds methods to ResourceRequestBase to clear special request headers that aren't allowed when using access control. Follows the CORS spec as described in the Latest Editor Draft at: http://www.w3.org/TR/cors/ Test: http/tests/xmlhttprequest/access-control-and-redirects-async.html * loader/DocumentThreadableLoader.cpp: * loader/DocumentThreadableLoader.h: * platform/network/ResourceRequestBase.cpp: * platform/network/ResourceRequestBase.h: 2012-03-27 Adam Barth ImageLoader::m_firedLoadEvent is a confusing name https://bugs.webkit.org/show_bug.cgi?id=82283 Reviewed by Kentaro Hara. This patch renames m_firedLoadEvent (and friends) to m_hasPendingLoadEvent (and negates the value). That name more accurately reflects the semantics of this piece of state. For example, we now initialize m_hasPendingLoadEvent to false, which makes sense as there is no pending load event, whereas before we initialized m_firedLoadEvent to true, which made less sense since we hadn't yet actually fired the load event. * bindings/v8/V8GCController.cpp: (WebCore::calculateGroupId): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::attach): * html/HTMLImageElement.h: (HTMLImageElement): (WebCore::HTMLImageElement::hasPendingLoadEvent): (WebCore::HTMLImageElement::hasPendingActivity): * html/ImageInputType.cpp: (WebCore::ImageInputType::attach): * loader/ImageLoader.cpp: (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::~ImageLoader): (WebCore::ImageLoader::setImage): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): (WebCore::ImageLoader::dispatchPendingLoadEvent): (WebCore::ImageLoader::dispatchPendingErrorEvent): * loader/ImageLoader.h: (WebCore::ImageLoader::hasPendingBeforeLoadEvent): (WebCore::ImageLoader::hasPendingLoadEvent): (ImageLoader): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::haveLoadedRequiredResources): 2012-03-27 Dan Bernstein Tried to fix 32-bit builds. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-03-26 Sheriff Bot Unreviewed, rolling out r112199. http://trac.webkit.org/changeset/112199 https://bugs.webkit.org/show_bug.cgi?id=82295 Breaks Chromium Win compilation (Requested by pfeldman on #webkit). * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): (GenerateNamedConstructorCallback): (GenerateToV8Converters): (GetDomMapFunction): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): (WebCore): * bindings/v8/V8DOMWrapper.h: (WebCore): (V8DOMWrapper): (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): 2012-03-26 David Kilzer Build system prep work for upstreaming iOS changes Reviewed by Mark Rowe. * DerivedSources.make: Move 'bison' into a variable and use xcrun to find it on Mac OS X. * bindings/scripts/preprocessor.pm: (applyPreprocessor): Add local @args variable. On iOS, the compiler needs additional "-isysroot $(SDKROOT)" arguments when invoked, so it's easier to add them to an array, especially if $SDKROOT contains a space in the path. Remove now-redundant $gccLocation variable. 2012-03-26 Nate Chapin Remove duplicate error() impls in CachedResource subclasses https://bugs.webkit.org/show_bug.cgi?id=81161 Reviewed by Alexey Proskuryakov. No new tests, refactor only. * loader/cache/CachedCSSStyleSheet.cpp: * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedFont.cpp: * loader/cache/CachedFont.h: * loader/cache/CachedImage.cpp: * loader/cache/CachedResource.h: Make checkNotify() virtual, so the right checkNotify() gets called in error(). * loader/cache/CachedScript.cpp: * loader/cache/CachedScript.h: * loader/cache/CachedXSLStyleSheet.cpp: * loader/cache/CachedXSLStyleSheet.h: 2012-03-26 Ken Buchanan Assert failure from capitalized RenderTextFragment https://bugs.webkit.org/show_bug.cgi?id=82096 Reviewed by Ryosuke Niwa. The cause of this bug was the call to RenderTextFragment::setTextInternal resulting from a style change from RenderObject::addChild. The idea here is to better separate the code path for transforming existing text from the code path for replacing the underlying text of a node. For RenderTextFragment this has to be clear because only in the latter case does the first-letter get reset. * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): Added call to transformText * rendering/RenderText.cpp: (WebCore::RenderText::styleDidChange): Added call to transformText (WebCore::RenderText::transformText): Added * rendering/RenderText.h: (WebCore::RenderText::setText): Changed to virtual so RenderTextFragment can override (WebCore::RenderText::transformText): Added * rendering/RenderTextFragment.cpp: (WebCore::RenderTextFragment::styleDidChange): Removed references to m_allowFragmentReset which was the previous approach to separating the code paths (WebCore::RenderTextFragment::setTextInternal): Deleted (WebCore::RenderTextFragment::setText): Added with most of logic that was previously in setTextInternal (WebCore::RenderTextFragment::transformText): Added * rendering/RenderTextFragment.h: (WebCore::RenderTextFragment::setText): Added (WebCore::RenderTextFragment::transformText): Added (WebCore::RenderTextFragment::setTextInternal): Deleted 2012-03-26 Adam Klein Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set() https://bugs.webkit.org/show_bug.cgi?id=82256 Reviewed by Adam Barth. This moves leakRef() calls out of generated code, centralizing them in V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void' (which clearly can't be wrapped in a PassRefPtr). Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic. (GenerateNamedConstructorCallback): ditto. (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method instead of directly accessing the wrapper maps and calling set. (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function. (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction. * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it. * bindings/v8/V8DOMWrapper.h: (WebCore): Forward decls. (V8DOMWrapper): (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline. (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto. (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods; this one handles non-active Nodes. (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse DOMNode method, now handles only active Nodes. (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances. 2012-03-26 Pratik Solanki Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength https://bugs.webkit.org/show_bug.cgi?id=82254 Reviewed by Benjamin Poulain. No new tests because no functional changes. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/LengthFunctions.cpp: (WebCore::minimumValueForLength): (WebCore::valueForLength): * css/LengthFunctions.h: (WebCore): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::getRegion): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::layout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::textIndentOffset): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegion): (WebCore::RenderBox::computeLogicalWidthInRegionUsing): (WebCore::RenderBox::computeInlineDirectionMargins): (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeBlockDirectionMargins): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::RenderBox::computePositionedLogicalHeightUsing): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paddingTop): (WebCore::RenderBoxModelObject::paddingBottom): (WebCore::RenderBoxModelObject::paddingLeft): (WebCore::RenderBoxModelObject::paddingRight): (WebCore::RenderBoxModelObject::paddingBefore): (WebCore::RenderBoxModelObject::paddingAfter): (WebCore::RenderBoxModelObject::paddingStart): (WebCore::RenderBoxModelObject::paddingEnd): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderInline.cpp: (WebCore::computeMargin): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): * rendering/RenderScrollbarPart.cpp: (WebCore::calcScrollbarThicknessUsing): (WebCore::RenderScrollbarPart::computeScrollbarWidth): (WebCore::RenderScrollbarPart::computeScrollbarHeight): * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): * rendering/RenderText.h: (WebCore::RenderText::marginLeft): (WebCore::RenderText::marginRight): * rendering/style/RenderStyle.h: 2012-03-26 Shinya Kawanaka Triggers assertion if dragging from outside of in a shadow tree to inside of it. https://bugs.webkit.org/show_bug.cgi?id=82177 Reviewed by Dimitri Glazkov. VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries has moved the start position or the end position to the invalid position, i.e. position after (before) the non-existing node. This patch fixes the problem, and adds assertion that the selection does not cross shadow boundaries. Test: fast/dom/shadow/drag-to-meter-in-shadow-crash.html * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): 2012-03-26 Scott Byer Enable layout testing of the scroll animator. https://bugs.webkit.org/show_bug.cgi?id=81858 Add a call to the InternalSettings that layout tests can use to turn on scroll animation. Enable animation updates for the Chromium platform DRT when scroll animation has been turned on in a test. This should be a no-op for all current layout tests. Reviewed by James Robinson. No new tests. Layout test results should be unchanged. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setEnableScrollAnimator): (WebCore): (WebCore::InternalSettings::scrollAnimatorEnabled): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-03-26 Charles Wei Fix minor spell error in DocumentLoader.h https://bugs.webkit.org/show_bug.cgi?id=82141 Reviewed by Nate Chapin. Just fix spell error, no new tests. * loader/DocumentLoader.h: (WebCore::DocumentLoader::setClientRedirectSourceForHistory): 2012-03-26 Brian Salomon [Skia] Remove use of deprecated Skia constant and struct field names https://bugs.webkit.org/show_bug.cgi?id=81034 Reviewed by James Robinson. No behavior change, so no tests. The modified code is executed by many existing tests. * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: (WebCore::CCRenderSurfaceFilters::apply): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::createAcceleratedCanvas): 2012-03-26 Nat Duca [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget https://bugs.webkit.org/show_bug.cgi?id=82265 In threaded compositing mode, the WebWidget is self-scheduled, receiving damage and processing it without forwarding that damage up to the embedding WebWidgetClient. In Chromium's case, the client uses the presence of damage to perform input flow control. This patch exposes the need for input flow control to the embedder, while keeping the actual logic about what exactly warrants input flow control inside the implementation. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitComplete): (WebCore::CCLayerTreeHost::commitRequested): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHostClient): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitRequested): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::commitRequested): (WebCore): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-03-26 Adam Barth When fails the CORS check, we should fire the error event https://bugs.webkit.org/show_bug.cgi?id=81998 Reviewed by Nate Chapin. The spec says we're supposed to fire the error event when the CORS check fails, but we haven't been. This patch is larger than it might otherwise be because we're firing the event asynchronously, but that seems like the right thing to do. Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html * dom/Document.cpp: (WebCore::Document::implicitClose): * loader/ImageLoader.cpp: (WebCore::errorEventSender): (WebCore): (WebCore::ImageLoader::ImageLoader): (WebCore::ImageLoader::~ImageLoader): (WebCore::ImageLoader::setImage): (WebCore::ImageLoader::updateFromElement): (WebCore::ImageLoader::notifyFinished): (WebCore::ImageLoader::dispatchPendingEvent): (WebCore::ImageLoader::dispatchPendingErrorEvent): (WebCore::ImageLoader::dispatchPendingErrorEvents): * loader/ImageLoader.h: (ImageLoader): 2012-03-26 Stephen White Make filters and the threaded compositor play well together. https://bugs.webkit.org/show_bug.cgi?id=78139 Use a dedicated GraphicsContext3D instance for all filters calls in the threaded case. Clone all FilterOperations for thread safety in the threaded case. Reviewed by James Robinson. Covered by tests in LayoutTests/css3/filters. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setFilters): Set a global flag if we've seen content with filters, so we know we need to create the filter context. (WebCore::LayerChromium::pushPropertiesTo): Clone all filter operations if we're in the threaded case. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::needsFilterContext): (WebCore::CCLayerTreeHost::setNeedsFilterContext): (CCLayerTreeHost): Add flag and accessors for needsFilterContext. * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::applyFilters): Pick up the appropriate context from SharedGraphicsContext3D, depending if we're in the threaded case or not. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::recreateContext): For the threaded compositor re-create the filter context alongside the main compositor context on lost context, if requested. (WebCore::CCThreadProxy::beginFrame): Create the filter context in beginFrame, if it was resquested and is NULL. This handles the first-use case. * platform/graphics/filters/CustomFilterOperation.h: (WebCore::CustomFilterOperation::clone): Assert if trying to clone the custom filter operation (it has non-threadsafe members). * platform/graphics/filters/FilterOperation.h: (WebCore::DefaultFilterOperation::clone): (WebCore::PassthroughFilterOperation::clone): (WebCore::ReferenceFilterOperation::clone): (WebCore::BasicColorMatrixFilterOperation::clone): (WebCore::BasicComponentTransferFilterOperation::clone): (WebCore::GammaFilterOperation::clone): (WebCore::BlurFilterOperation::clone): (WebCore::DropShadowFilterOperation::clone): Add clone methods for all FilterOperations. * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext): (WebCore::SharedGraphicsContext3DImpl::getContext): (WebCore::SharedGraphicsContext3DImpl::createContext): (WebCore::SharedGraphicsContext3D::get): (WebCore::getOrCreateContextForImplThread): (WebCore::SharedGraphicsContext3D::getForImplThread): (WebCore::SharedGraphicsContext3D::haveForImplThread): (WebCore::SharedGraphicsContext3D::createForImplThread): Split out context creation, lost context recovery, and retrieval into separate functions, so the impl thread can use only the parts it wants on the threads it wants (create and have on main, get on impl). Add asserts to ensure that's how they're called. * platform/graphics/gpu/SharedGraphicsContext3D.h: (SharedGraphicsContext3D): Reuse the SharedGraphicsContext infrastructure to create a new context singleton for filter use in the threaded compositor. 2012-03-26 Adam Barth FrameLoader::shouldAllowNavigation uses Frame for context rather than Document https://bugs.webkit.org/show_bug.cgi?id=81020 Reviewed by Eric Seidel. The vast majority of security checks in the browser should use a ScriptExecutionContext (aka a Document) to designate "who" is attempting to perform a given action. Unfortunately, shouldAllowNavigation was using a Frame to designate "who" is attempting the navigation. In cases when the executing script is "inactive" (i.e., belongs to a document that is not currently displayed in a Frame), using the Frame can cause us to grant the script the privileges of the document that's currently displayed in the Frame rather than the one that contains the script. This patch moves shouldAllowNavigation from FrameLoader to Document (and renames it to canNavigate), effectively change the context object from a Frame to a Document. Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html * bindings/generic/BindingSecurity.h: (BindingSecurity): (WebCore): * bindings/v8/V8Utilities.cpp: (WebCore): * bindings/v8/V8Utilities.h: (WebCore): - Deletes unused code. * dom/Document.cpp: (WebCore::canAccessAncestor): (WebCore): (WebCore::Document::canNavigate): - canNavigate is copied from FrameLoader::shouldAllowNavigation. I've added a null-check bailout if the document is inactive. * dom/Document.h: (Document): * loader/FormState.cpp: (WebCore::FormState::FormState): (WebCore::FormState::create): * loader/FormState.h: (WebCore): (FormState): (WebCore::FormState::sourceDocument): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): - Changes the context object from Frame to Document. * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::loadFrameRequest): (WebCore): (WebCore::FrameLoader::findFrameForNavigation): - FrameLoader::findFrameForNavigation still incorrectly uses Frame as the context object, but that's a bug for another patch. (WebCore::createWindow): * loader/FrameLoader.h: (FrameLoader): * loader/NavigationScheduler.cpp: (WebCore::ScheduledFormSubmission::fire): * page/DOMWindow.cpp: (WebCore::DOMWindow::close): (WebCore::DOMWindow::setLocation): (WebCore::DOMWindow::open): * page/History.cpp: (WebCore::History::go): 2012-03-26 Vangelis Kokkevis [chromium] Simplify and fix CCLayerSorter https://bugs.webkit.org/show_bug.cgi?id=82114 A significant cleanup, simplification and improvement of the CCLayerSorter code. Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests. By treating every layer as two triangles, the old overlap code did a lot of redundant work including testing two of the vertices of the layer and its diagonal twice. The new overlap tests check: 1. The four corners of each of the two layers against the other layer. 2. The four edges of each layer against the edges of the other layer. Unlike the old code, the new code has no early-outs in the overlap tests as those where causing us to miss legitimate overlaps. A new technique for breaking dependency cycles introduced by intersecting layers is implemented. Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum of graph edge weights (defined as the max depth difference between two layers). Layers that intersect have their respective graph edge weight set to zero, making them more likely to be picked for breaking the cycles (it's not a perfect solution but it seems to perform much better than the previous one). In addition to being overly complex and doing reduntant work, the old code was missing a perspective divide when computing the coordinates of the layer's corners in the projected plane which was the source of a lot of mis-sorted results. In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as: http://www.keithclark.co.uk/labs/3dcss/demo/ http://2012.beercamp.com https://developer.mozilla.org/fr/demos/detail/the-box/launch Tests: CCLayerSorter unit tests. Reviewed by Kenneth Russell. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore): (WebCore::perpProduct): (WebCore::edgeEdgeTest): (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::LayerShape::LayerShape): (WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint): (WebCore::CCLayerSorter::createGraphNodes): (WebCore::CCLayerSorter::createGraphEdges): (WebCore::CCLayerSorter::sort): * platform/graphics/chromium/cc/CCLayerSorter.h: (WebCore::CCLayerSorter::CCLayerSorter): (CCLayerSorter): (LayerShape): (WebCore::CCLayerSorter::GraphNode::GraphNode): (GraphNode): (WebCore::CCLayerSorter::GraphEdge::GraphEdge): (GraphEdge): 2012-03-26 Fady Samuel [Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail https://bugs.webkit.org/show_bug.cgi?id=81954 Reviewed by James Robinson. A static variable s_inPaintContents is set when painting, and it ensures that we don't delete GraphicsLayers or create GraphicsLayers while painting. However, because this variable is static, it does not permit the existence of multiple WebViews in different stages (one laying out and one painting). This manifests itself if one attempts to use the --force-compositing-mode in Chromium and attempts to navigate to a page with a missing or old plugin or a browser plugin (which uses a WebViewPlugin as a placeholder until it's done loading). The solution to simplify debugging is to make this flag per-Page. We can access Page from RenderLayerBacking which is a GraphicsLayerClient. We add a new method GraphicsLayerClient::verifyNotPainting with a default (do nothing) implementation and override it in RenderLayerBacking to test the flag set in Page. * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (Page): (WebCore::Page::setIsPainting): (WebCore::Page::isPainting): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): (WebCore::GraphicsLayer::~GraphicsLayer): (WebCore::GraphicsLayer::paintGraphicsLayerContents): * platform/graphics/GraphicsLayerClient.h: (GraphicsLayerClient): (WebCore::GraphicsLayerClient::verifyNotPainting): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): (WebCore): (WebCore::RenderLayerBacking::verifyNotPainting): * rendering/RenderLayerBacking.h: (RenderLayerBacking): 2012-03-23 Ryosuke Niwa cssText should use shorthand notations https://bugs.webkit.org/show_bug.cgi?id=81737 Reviewed by Enrica Casucci. Use shorthand properties to serialize style properties for cssText. The overall algorithm is to look for any property that has a shorthand, and then check if the shorthand value could be obtained (the condition is quite complicated for border properties). If it could, then append that value to the string builder, and set the corresponding entries in shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties that use the same shorthand property when we cannot use the shorthand. Test: fast/css/cssText-shorthand.html * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-03-26 Bolin Hsu [Chromium] Add Android keycodes https://bugs.webkit.org/show_bug.cgi?id=81950 Add the missing Android keycodes listed in the bug. Reviewed by Adam Barth. * platform/chromium/KeyCodeConversionAndroid.cpp: (WebCore::windowsKeyCodeForKeyEvent): * platform/chromium/KeyboardCodes.h: 2012-03-26 Levi Weintraub Switch ColumnInfo::addForcedBreak to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=82210 Reviewed by Eric Seidel. Forced breaks are added by local offsets, which should be in LayoutUnits. No new tests. No change in behavior. * rendering/ColumnInfo.h: (WebCore::ColumnInfo::addForcedBreak): 2012-03-26 Levi Weintraub Update LayoutUnit usage in ContainerNode, Element, and ElementRareData https://bugs.webkit.org/show_bug.cgi?id=82219 Reviewed by Eric Seidel. No new tests. No change in behavior. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped. * dom/Element.cpp: (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute coordinates, which are always expressed in integers. * dom/Element.h: (Element): * dom/ElementRareData.h: (WebCore::defaultMinimumSizeForResizing): Using numeric_limits::max instead of INT_MAX to avoid overflowing when LayoutUnits are sub-pixel. 2012-03-26 Adam Klein Update binding test output for V8 after r112163. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-03-26 Levi Weintraub Update localSelectionRect to return a LayoutRect https://bugs.webkit.org/show_bug.cgi?id=82183 Reviewed by Eric Seidel. localSelectionRect returns a rectangle in the coordinate space of its renderer, and therefor should remain LayoutUnits until being promoted to absolute coordinates or painted. Also fixing an incorrect conversion of startPos and endPos in selectionRectForRepaint. No new tests. No change in behavior. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect for the value being returned from the font engine since these floating point values should not be pixel snapped. * rendering/InlineTextBox.h: (InlineTextBox): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::localSelectionRect): * rendering/RenderReplaced.h: (RenderReplaced): * rendering/RenderText.cpp: (WebCore::localQuadForTextBox): (WebCore::RenderText::absoluteRectsForRange): (WebCore::RenderText::absoluteQuadsForRange): (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of start/endPos to LayoutUnits. These values represent a range of selected characters, not layout values! * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::localCaretRect): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::localSelectionRect): * rendering/svg/SVGInlineTextBox.h: (SVGInlineTextBox): 2012-03-26 Justin Novosad [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo https://bugs.webkit.org/show_bug.cgi?id=82243 Reviewed by James Robinson. Adding null pointer check to prevent crash and texture object validity check to prevent potential graphics glitch * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::pushPropertiesTo): 2012-03-26 Adam Klein Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls https://bugs.webkit.org/show_bug.cgi?id=82238 Reviewed by Adam Barth. The setJSWrapper* methods previously featured a comment that asked callers to ref the objects before passing them in. This change makes that contract explicit (and allows the removal of the comment). In addition, for ConstructorCallbacks, this change slightly reduces refcount churn by passing on the initial ref via RefPtr::release(). No new tests, no change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call. (GenerateNamedConstructorCallback): ditto. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps. * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr. (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap. (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap. * bindings/v8/V8Proxy.h: (WebCore::toV8): Remove explicit ref. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref. * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: (WebCore::V8WebKitMutationObserver::constructorCallback): ditto. * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): ditto. * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): ditto. 2012-03-26 Alexey Proskuryakov Remove obsolete FormDataStreamMac code https://bugs.webkit.org/show_bug.cgi?id=82244 Reviewed by Brady Eidson. * platform/network/ResourceHandle.h: Removed ResourceHandle::didSendBodyDataDelegateExists(). * platform/network/mac/FormDataStreamMac.h: * platform/network/mac/FormDataStreamMac.mm: Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation added support for it. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::cancel): (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): We no longer need to associate streams with ResourceHandles! 2012-03-26 Adam Klein V8RecursionScope should not hold a raw pointer to ScriptExecutionContext https://bugs.webkit.org/show_bug.cgi?id=82222 Reviewed by Eric Seidel. Instead of holding onto ScriptExecutionContext, cache the boolean value we care about (context->isDocument()). This avoids problems if the context goes away as a result of the script we just ran. Test: fast/frames/subframe-load-js-url-crash.html * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached bool instead of calling into the context. * bindings/v8/V8RecursionScope.h: (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from the constructor and cache the result. (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass anything to didLeaveScriptContext since it's now a member. (V8RecursionScope): Make didLeaveScriptContext a member function and remove its argument. Add member bool to hold the value of isDocument. 2012-03-26 Dana Jansens [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources https://bugs.webkit.org/show_bug.cgi?id=82239 Reviewed by Adrienne Walker. The assert is incorrect and should check the animation state on the surface, not the owning layer. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::updateCompositorResources): 2012-03-26 Levi Weintraub Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem https://bugs.webkit.org/show_bug.cgi?id=82179 Reviewed by Julien Chaffraix. Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details. No new tests. No change in behavior. * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror the actual coordinates we paint. (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the sub-pixel build. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect. (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header. (WebCore::RenderMenuList::clientPaddingRight): Ditto. 2012-03-26 Dan Bernstein Tried to fix an unused parameter warning after r112154. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to layoutFlexItems. (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter. * rendering/RenderFlexibleBox.h: 2012-03-26 Rob Arnold SyntheticStyleCalc on an element should not force recalculation on its children https://bugs.webkit.org/show_bug.cgi?id=79389 Reviewed by Simon Fraser. No new tests. Existing tests cover correctness, not sure how to test for performance. * dom/Element.cpp: (WebCore::Element::recalcStyle): 2012-03-26 Tony Chang apply cross axis constraints before aligning children in flexbox https://bugs.webkit.org/show_bug.cgi?id=82240 Reviewed by Ojan Vafai. We weren't applying max-height constraints before aligning children. This would cause center, end, stretch alignment to be wrong if we hit a max-height on a flexbox. This patch also moves the repositioning logic to happen after computeLogicalHeight, which will be useful for flex-line-pack. New test case in css3/flexbox/flex-align.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): * rendering/RenderFlexibleBox.h: 2012-03-26 Anders Carlsson Find in page overlay and bouncy are not always positioned correctly https://bugs.webkit.org/show_bug.cgi?id=82247 Reviewed by Sam Weinig. In WebCore, a lot of code depends on scroll position updates to happen synchronously, so update the frame view scroll position before asking the scrolling thread to scroll. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::requestScrollPositionUpdate): 2012-03-26 Nate Chapin Simplify setting loading state in DocumentLoader https://bugs.webkit.org/show_bug.cgi?id=82099 Reviewed by Adam Barth. The logic for deciding what to return for DocumentLoader::isLoading() is crazy. It's indirectly based on the ResourceLoaders that have registered themselves with the DocumentLoader, but we can make that relationship more direct. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done. (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to be private, whereas updateLoading() was public). (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): * loader/DocumentLoader.h: (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence of non-multipart ResourceLoaders directly. * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(), rather than indirectly the other way around. (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be absolutely identical to the remaining !pdl->isLoading(). (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): 2012-03-26 James Robinson Scrollable plugins not registered properly in ScrollingCoordinator https://bugs.webkit.org/show_bug.cgi?id=82163 Reviewed by Anders Carlsson. Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::computeNonFastScrollableRegion): (WebCore::ScrollingCoordinator::nonFastScrollableRegion): (WebCore): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * plugins/PluginViewBase.h: (WebCore::PluginViewBase::scrollable): (PluginViewBase): 2012-03-26 Joone Hur [GTK] Build fix for Accelerated Compositing with Clutter https://bugs.webkit.org/show_bug.cgi?id=81785 Reviewed by Martin Robinson. AcceleratedCompositingContext was introduced to isolate different accelerated compositing implementations(r104194), but the Clutter implementation doesn't build with it. This includes an initial implementation of GraphicsContext3D and fixes the build error. * GNUmakefile.list.am: * platform/graphics/clutter/DrawingBufferClutter.cpp: Added. (WebCore): (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): (WebCore::DrawingBuffer::platformColorBuffer): (WebCore::DrawingBuffer::paintCompositedResultsToCanvas): * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added. (WebCore): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::getImageData): (WebCore::GraphicsContext3D::paintToCanvas): (WebCore::GraphicsContext3D::setContextLostCallback): (WebCore::GraphicsContext3D::setErrorMessageCallback): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::isGLES2Compliant): (WebCore::GraphicsContext3D::platformLayer): * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added. (WebCore): (WebCore::GraphicsContext3DPrivate::create): (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::makeContextCurrent): (WebCore::GraphicsContext3DPrivate::platformContext): (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor): * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added. (WebCore): (GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::platformLayer): 2012-03-26 Peter Rybin Web Inspector: Expose InspectorTypeBuilder.h to other components https://bugs.webkit.org/show_bug.cgi?id=82226 Reviewed by Vsevolod Vlasov. This is a provisional commit that simplifies passing ealy warning system for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558 * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI. 2012-03-26 Antaryami Pandia An element remains focusable even though its associated is not rendered. https://bugs.webkit.org/show_bug.cgi?id=71788 Reviewed by Andy Estes. HTMLAreaElement::isFocusable() needs to consider the display and visibility state. Test: fast/events/tab-test-not-visible-imagemap.html * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::imageElement): (WebCore::HTMLAreaElement::isFocusable): * html/HTMLAreaElement.h: Make imageElement() const. (HTMLAreaElement): 2012-03-26 Anton Muhin Fix a typo in IDL https://bugs.webkit.org/show_bug.cgi?id=82215 Reviewed by Adam Barth. No new tests, just a typo fix. * notifications/WorkerContextNotifications.idl: 2012-03-26 W. James MacLean [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel. https://bugs.webkit.org/show_bug.cgi?id=82133 Reviewed by James Robinson. Covered by existing unit tests. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollBegin): 2012-03-26 Mike Lawther CSS3 calc: mixed percent/absolute for box-reflect https://bugs.webkit.org/show_bug.cgi?id=82161 Reviewed by Ojan Vafai. Tests: css3/calc/box-reflect-expected.html css3/calc/box-reflect.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-26 Mike Lawther CSS3 calc: mixed percent/absolute support for vertical-align https://bugs.webkit.org/show_bug.cgi?id=82152 Reviewed by Ojan Vafai. Tests: css3/calc/vertical-align-expected.html css3/calc/vertical-align.html * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyVerticalAlign::applyValue): 2012-03-26 Filip Spacek [BlackBerry] Accelerated compositing updates https://bugs.webkit.org/show_bug.cgi?id=82058 Reviewed by Rob Buis. * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp: (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread): (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread): (WebCore::CanvasLayerWebKitThread::setDevice): (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded): * platform/graphics/blackberry/CanvasLayerWebKitThread.h: (WebCore::CanvasLayerWebKitThread::create): (CanvasLayerWebKitThread): * platform/graphics/blackberry/InstrumentedPlatformCanvas.h: (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas): (WebCore::InstrumentedPlatformCanvas::save): (WebCore::InstrumentedPlatformCanvas::saveLayer): (WebCore::InstrumentedPlatformCanvas::restore): (WebCore::InstrumentedPlatformCanvas::translate): (WebCore::InstrumentedPlatformCanvas::scale): (WebCore::InstrumentedPlatformCanvas::rotate): (WebCore::InstrumentedPlatformCanvas::skew): (WebCore::InstrumentedPlatformCanvas::concat): (WebCore::InstrumentedPlatformCanvas::setMatrix): (WebCore::InstrumentedPlatformCanvas::clipRect): (WebCore::InstrumentedPlatformCanvas::clipPath): (WebCore::InstrumentedPlatformCanvas::clipRegion): (WebCore::InstrumentedPlatformCanvas::clear): (WebCore::InstrumentedPlatformCanvas::drawPaint): (WebCore::InstrumentedPlatformCanvas::drawPoints): (WebCore::InstrumentedPlatformCanvas::drawRect): (WebCore::InstrumentedPlatformCanvas::drawPath): (WebCore::InstrumentedPlatformCanvas::drawBitmap): (WebCore::InstrumentedPlatformCanvas::drawBitmapRect): (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix): (WebCore::InstrumentedPlatformCanvas::drawSprite): (WebCore::InstrumentedPlatformCanvas::drawText): (WebCore::InstrumentedPlatformCanvas::drawPosText): (WebCore::InstrumentedPlatformCanvas::drawPosTextH): (WebCore::InstrumentedPlatformCanvas::drawTextOnPath): (WebCore::InstrumentedPlatformCanvas::drawPicture): (WebCore::InstrumentedPlatformCanvas::drawVertices): (WebCore::InstrumentedPlatformCanvas::drawData): * platform/graphics/blackberry/LayerData.h: (WebCore::LayerData::LayerData): (WebCore::LayerData::needsTexture): (LayerData): * platform/graphics/blackberry/LayerTiler.cpp: (WebCore::LayerTiler::updateTextureContentsIfNeeded): * platform/graphics/blackberry/LayerWebKitThread.cpp: (WebCore::LayerWebKitThread::paintContents): (WebCore::LayerWebKitThread::setDrawable): * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::loadBufferingImageData): * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h. (WebCore): (ImageBufferData): 2012-03-26 Stephen Chenney Failure to invalidate text position attributes when DOM changes https://bugs.webkit.org/show_bug.cgi?id=81464 Reviewed by Nikolas Zimmermann. The text positioning elements data structure in RenderSVGText must be updated when either the children of the corresponding element are modified, or the length of the text inside the elements changes. Previously, the call to clear the text positioning elements (to force recomputation) was guarded by a flag. If code tried to invalidate when the flag was not set, then something set the flag, the elements would be invalid at use time. This patch modifies the method that invalidates the positining attributes so that the action always happens. It also renames the method to more accurately reflect its function. Test: svg/custom/delete-modified-text-in-defs-crash.svg * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag. * rendering/svg/RenderSVGText.h: (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements * svg/SVGAElement.cpp: (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements 2012-03-26 Julien Chaffraix REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute https://bugs.webkit.org/show_bug.cgi?id=81802 Reviewed by Dan Bernstein. Covered by fast/forms/placeholder-set-attribute.html which should be less flaky. Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically. This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild. 2012-03-26 Julien Chaffraix REGRESSION(r110072): fast/forms/textfield-overflow.html is failing https://bugs.webkit.org/show_bug.cgi?id=80531 Reviewed by Ojan Vafai. Tested by fast/forms/textfield-overflow.html (re-enabled after this change). The existing code would happily query layout information before calling layout (FTW!). The solution is to properly layout our object, then modify some dimensions as needed while marking ourself as needing layout and then layouting again. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as: - layoutBlock handles automatically logical height changes. - we were not modifying the logical width between layouts so we don't need to force a child relayout in this case. 2012-03-26 Robin Cao [BlackBerry] Upstream LayerCompositingThread.{h, cpp} https://bugs.webkit.org/show_bug.cgi?id=79873 Reviewed by Rob Buis. Initial upstream, no new tests. * platform/graphics/blackberry/LayerCompositingThread.cpp: Added. (WebCore): (WebCore::LayerCompositingThread::create): (WebCore::LayerCompositingThread::LayerCompositingThread): (WebCore::LayerCompositingThread::~LayerCompositingThread): (WebCore::LayerCompositingThread::destroyOnCompositingThread): (WebCore::LayerCompositingThread::setLayerRenderer): (WebCore::LayerCompositingThread::deleteTextures): (WebCore::LayerCompositingThread::setDrawTransform): (WebCore::getTransformedRect): (WebCore::LayerCompositingThread::getTransformedHolePunchRect): (WebCore::LayerCompositingThread::drawTextures): (WebCore::LayerCompositingThread::drawSurface): (WebCore::LayerCompositingThread::drawMissingTextures): (WebCore::LayerCompositingThread::releaseTextureResources): (WebCore::LayerCompositingThread::setPluginView): (WebCore::LayerCompositingThread::setMediaPlayer): (WebCore::LayerCompositingThread::clearAnimations): (WebCore::LayerCompositingThread::removeSublayer): (WebCore::LayerCompositingThread::indexOfSublayer): (WebCore::LayerCompositingThread::rootLayer): (WebCore::LayerCompositingThread::removeFromSuperlayer): (WebCore::LayerCompositingThread::setSublayers): (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded): (WebCore::LayerCompositingThread::setVisible): (WebCore::LayerCompositingThread::setNeedsCommit): (WebCore::LayerCompositingThread::scheduleCommit): (WebCore::LayerCompositingThread::updateAnimations): (WebCore::LayerCompositingThread::hasVisibleHolePunchRect): (WebCore::LayerCompositingThread::createLayerRendererSurface): * platform/graphics/blackberry/LayerCompositingThread.h: Added. (Graphics): (WebCore): (LayerCompositingThread): (WebCore::LayerCompositingThread::bindContentsTexture): (WebCore::LayerCompositingThread::getSublayers): (WebCore::LayerCompositingThread::setSuperlayer): (WebCore::LayerCompositingThread::superlayer): (WebCore::LayerCompositingThread::drawTransform): (WebCore::LayerCompositingThread::setDrawOpacity): (WebCore::LayerCompositingThread::drawOpacity): (WebCore::LayerCompositingThread::layerRendererSurface): (WebCore::LayerCompositingThread::clearLayerRendererSurface): (WebCore::LayerCompositingThread::setMaskLayer): (WebCore::LayerCompositingThread::maskLayer): (WebCore::LayerCompositingThread::setReplicaLayer): (WebCore::LayerCompositingThread::replicaLayer): (WebCore::LayerCompositingThread::getDrawRect): (WebCore::LayerCompositingThread::getTransformedBounds): (WebCore::LayerCompositingThread::hasMissingTextures): (WebCore::LayerCompositingThread::isDirty): (WebCore::LayerCompositingThread::isVisible): (WebCore::LayerCompositingThread::setOpacity): (WebCore::LayerCompositingThread::setTransform): (WebCore::LayerCompositingThread::hasRunningAnimations): (WebCore::LayerCompositingThread::numSublayers): 2012-03-26 Kent Tamura Add a notification function for detaching to TextFieldDecorator https://bugs.webkit.org/show_bug.cgi?id=82142 Reviewed by Dimitri Glazkov. Add willDetach() functio to TextFieldDecorator. This will be needed if a decorator opens a popup UI on handleClick(), and the popup UI should be closed when the attaching text field is detached. No new tests because of no behavior changes in any platforms. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::hostInput): Added. A utilify function to get an HTMLInputElement*. (WebCore::TextFieldDecorationElement::updateImage): Use hostInput(). (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto. (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach(). (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput(). * html/shadow/TextFieldDecorationElement.h: (TextFieldDecorator): (TextFieldDecorationElement): 2012-03-26 Dan Bernstein Tried to fix the 32-bit build after r112021. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper _convertToNSRange:]): 2012-03-26 Leo Yang [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp https://bugs.webkit.org/show_bug.cgi?id=82157 Reviewed by Rob Buis. AsyncFileSystemBlackBerry is responsible for asynchronous operating on file system for the blackberry porting. It's just skeleton code containing no implementation yet. No new tests because of skeleton code. * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on. * platform/AsyncFileSystem.cpp: (WebCore): * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added. (WebCore): (WebCore::AsyncFileSystem::isAvailable): (WebCore::AsyncFileSystem::isValidType): (WebCore::AsyncFileSystem::create): (WebCore::AsyncFileSystem::openFileSystem): (WebCore::AsyncFileSystem::crackFileSystemURL): (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry): (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry): (WebCore::AsyncFileSystemBlackBerry::toURL): (WebCore::AsyncFileSystemBlackBerry::move): (WebCore::AsyncFileSystemBlackBerry::copy): (WebCore::AsyncFileSystemBlackBerry::remove): (WebCore::AsyncFileSystemBlackBerry::removeRecursively): (WebCore::AsyncFileSystemBlackBerry::readMetadata): (WebCore::AsyncFileSystemBlackBerry::createFile): (WebCore::AsyncFileSystemBlackBerry::createDirectory): (WebCore::AsyncFileSystemBlackBerry::fileExists): (WebCore::AsyncFileSystemBlackBerry::directoryExists): (WebCore::AsyncFileSystemBlackBerry::readDirectory): (WebCore::AsyncFileSystemBlackBerry::createWriter): (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata): * platform/blackberry/AsyncFileSystemBlackBerry.h: Added. (WebCore): (AsyncFileSystemBlackBerry): 2012-03-26 Jonathan Dong [BlackBerry] CredentialBackingStore implement encryptString() and decryptString() https://bugs.webkit.org/show_bug.cgi?id=82204 Reviewed by Rob Buis. Implemented encryptedString() and decryptedString() in class CredentialBackingStore by calling BlackBerry::Platform::Encryptor::encryptString() and BlackBerry::Platform::Encryptor::encryptString() respectively. No new tests. * platform/network/blackberry/CredentialBackingStore.cpp: (WebCore::CredentialBackingStore::encryptedString): (WebCore::CredentialBackingStore::decryptedString): 2012-03-26 Pavel Feldman Web Inspector: 'use strict' exceptions stop in inspector code https://bugs.webkit.org/show_bug.cgi?id=82199 Reviewed by Yury Semikhatsky. Accessing callee from within InjectedScript made inspector stop on handled exceptions. I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]". * inspector/InjectedScriptSource.js: 2012-03-26 Mihai Balan [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed https://bugs.webkit.org/show_bug.cgi?id=81901 Reviewed by Antti Koivisto. Right now CSS rules position does not take into account rules that are inside a @-webkit-region declaration, leading to buggy behavior where rules that appear later in the document are superseded by rules that appear earlier in the document (opposite as how things should be). The fix updates the "global" rules counter once the rules in a @-webkit-region declaration have been added. Tests: fast/regions/region-style-rule-position-expected.html fast/regions/region-style-rule-position.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-26 Pierre Rossi [Qt] Disable focus ring in the mobile theme. https://bugs.webkit.org/show_bug.cgi?id=81934 For mobile devices intended to be used only through touch, the focus rings makes little sense and feels awkward. Reviewed by Kenneth Rohde Christiansen. No new tests. This is merely a cosmetic touch. * platform/qt/RenderThemeQtMobile.h: (RenderThemeQtMobile): (WebCore::RenderThemeQtMobile::platformFocusRingColor): 2012-03-26 Charles Wei [BlackBerry] Clean up networking code and remove WML support. https://bugs.webkit.org/show_bug.cgi?id=82170 Reviewed by Rob Buis. This just removes the WML support of BlackBerry porting, which is already removed from WebCore. No new tests needed. * platform/blackberry/MIMETypeRegistryBlackBerry.cpp: (WebCore): * platform/network/blackberry/DeferredData.cpp: (WebCore::DeferredData::DeferredData): (WebCore::DeferredData::processDeferredData): * platform/network/blackberry/DeferredData.h: (DeferredData): (WebCore::DeferredData::hasDeferredData): * platform/network/blackberry/NetworkJob.cpp: * platform/network/blackberry/NetworkJob.h: (NetworkJob): * platform/network/blackberry/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): (ResourceResponse): * platform/network/blackberry/ResourceResponseBlackBerry.cpp: (WebCore::ResourceResponse::doPlatformCopyData): (WebCore::ResourceResponse::doPlatformAdopt): 2012-03-26 Philip Rogers Add invalid bounding box concept to SVG containers https://bugs.webkit.org/show_bug.cgi?id=81104 Reviewed by Nikolas Zimmermann. An empty element needs to use an invalid bounding box because an empty bounding box isn't the default state. This change introduces the concept of an invalid object bounding box for both RenderSVGContainer and RenderSVGRoot. Code that does not explicitly check that the bounding box is valid should be unaffected by this change. We use this new invalid flag in computeContainerBoundingBoxes so that we do not include invalid bounding boxes. This change also contains a small fix in RenderSVGContainer::toRenderSVGContainer which depended on RenderSVGViewportContainer not inheriting from RenderSVGContainer, which it now does. Test: svg/custom/getBBox-empty-container.html * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::RenderSVGContainer): (WebCore::RenderSVGContainer::updateCachedBoundaries): * rendering/svg/RenderSVGContainer.h: (WebCore::RenderSVGContainer::isObjectBoundingBoxValid): (RenderSVGContainer): (WebCore::toRenderSVGContainer): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::updateCachedBoundaries): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): * rendering/svg/SVGRenderSupport.cpp: (WebCore): (WebCore::updateObjectBoundingBox): (WebCore::SVGRenderSupport::computeContainerBoundingBoxes): * rendering/svg/SVGRenderSupport.h: (SVGRenderSupport): 2012-03-26 Alexei Filippov Web Inspector: Speed up the retainers build phase. https://bugs.webkit.org/show_bug.cgi?id=81763 Replacing the edge iterator in retainers building phase makes it run 10 times faster (400 ms vs. 4 sec). Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildRetainers): 2012-03-22 Alexander Pavlov Web Inspector: Migrate InspectorCSSAgent to strict protocol types https://bugs.webkit.org/show_bug.cgi?id=81923 Reviewed by Pavel Feldman. No new tests, as this is a refactoring. * inspector/CodeGeneratorInspector.py: * inspector/InspectorCSSAgent.cpp: (SelectorProfile): (WebCore::SelectorProfile::toInspectorObject): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): (WebCore::InspectorCSSAgent::collectStyleSheets): (WebCore::InspectorCSSAgent::buildArrayForRuleList): (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorStyleSheet.cpp: (WebCore::buildSourceRangeObject): (WebCore::buildMediaObject): (WebCore::fillMediaListChain): (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyle::buildArrayForComputedStyle): (WebCore::InspectorStyle::styleWithProperties): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::buildObjectForStyle): * inspector/InspectorStyleSheet.h: (WebCore::InspectorCSSId::asProtocolValue): (InspectorStyle): (InspectorStyleSheet): 2012-03-26 Alexander Pavlov Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken https://bugs.webkit.org/show_bug.cgi?id=82191 Reviewed by Vsevolod Vlasov. Test: http/tests/inspector/modify-cross-domain-rule.html * inspector/InspectorStyleSheet.cpp: (WebCore::asCSSRuleList): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): 2012-03-26 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing files. 2012-03-26 Jason Liu [BlackBerry] Cookies mismatch when login to gmail. https://bugs.webkit.org/show_bug.cgi?id=82165 Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest for redirection loading. This issue didn't happen before because we used m_cookieData not the cookie header. Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed. Reviewed by George Staikos. No new tests. It is a refactoring issue. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::initializePlatformRequest): 2012-03-26 Alexis Menard Increase code sharing between StylePropertySet and CSSPropertyLonghand. https://bugs.webkit.org/show_bug.cgi?id=81960 Reviewed by Antti Koivisto. Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order to avoid code duplication. No new tests : refactoring only, we shouldn't have any behavior difference. * css/CSSPropertyLonghand.cpp: (WebCore::backgroundLonghand): Re-order the array to match the spec default order. (WebCore::webkitMaskLonghand): Re-order to match the original order. (WebCore::webkitTransformOriginLonghand): A LayoutTest shows that a property was missing. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::borderSpacingValue): (WebCore::StylePropertySet::get4Values): (WebCore::StylePropertySet::getLayeredShorthandValue): (WebCore::StylePropertySet::getShorthandValue): (WebCore::StylePropertySet::getCommonValue): (WebCore::StylePropertySet::asText): * css/StylePropertySet.h: (WebCore): (StylePropertySet): 2012-03-26 Allan Sandfeld Jensen [Qt] Assert in GestureTapHighlighter. https://bugs.webkit.org/show_bug.cgi?id=82187 Reviewed by Kenneth Rohde Christiansen. Adjust the boundaries of the center-rect before performing the intersection test, since adjusting the boundary may cause a new intersection. * page/GestureTapHighlighter.cpp: 2012-03-26 Antti Koivisto Split MediaList into internal and CSSOM types https://bugs.webkit.org/show_bug.cgi?id=82149 Reviewed by Andread Kling. MediaList is a CSSOM type and should not be used internally. - Use new type MediaQuerySet internally to represent a collection of media queries. - Create MediaList wrapper on-demand for CSSOM purposes only. This moves us forward in separating CSSOM from the internal stylesheet implementation. MediaQuerySet really belongs to a file of its own but that is not part of this patch. * css/CSSGrammar.y: * css/CSSImportRule.cpp: (WebCore::CSSImportRule::create): (WebCore): (WebCore::CSSImportRule::CSSImportRule): (WebCore::CSSImportRule::~CSSImportRule): (WebCore::CSSImportRule::media): (WebCore::CSSImportRule::cssText): * css/CSSImportRule.h: (WebCore): (CSSImportRule): (WebCore::CSSImportRule::mediaQueries): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): (WebCore::CSSMediaRule::~CSSMediaRule): (WebCore::CSSMediaRule::cssText): * css/CSSMediaRule.h: (WebCore::CSSMediaRule::create): (WebCore::CSSMediaRule::media): (WebCore::CSSMediaRule::mediaQueries): (CSSMediaRule): * css/CSSParser.cpp: (WebCore::CSSParser::parseMediaQuery): (WebCore::CSSParser::createMediaQuerySet): (WebCore::CSSParser::createImportRule): (WebCore::CSSParser::createMediaRule): (WebCore::CSSParser::updateLastMediaLine): * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSheet.cpp: (WebCore): (WebCore::CSSStyleSheet::media): (WebCore::CSSStyleSheet::setMediaQueries): * css/CSSStyleSheet.h: (WebCore): (CSSStyleSheet): (WebCore::CSSStyleSheet::mediaQueries): * css/MediaList.cpp: (WebCore): (WebCore::MediaQuerySet::MediaQuerySet): (WebCore::MediaQuerySet::~MediaQuerySet): (WebCore::parseMediaDescriptor): (WebCore::MediaQuerySet::parse): (WebCore::MediaQuerySet::add): (WebCore::MediaQuerySet::remove): (WebCore::MediaQuerySet::addMediaQuery): (WebCore::MediaQuerySet::mediaText): (WebCore::MediaQuerySet::ensureMediaList): - Use OwnPtr<> for MediaQuery ownership. - Move the appropriate functions to MediaQuerySet. - Clean up a bit to make this more readable and better aligned to WebKit style. (WebCore::MediaList::MediaList): (WebCore::MediaList::~MediaList): (WebCore::MediaList::setMediaText): (WebCore::MediaList::item): (WebCore::MediaList::deleteMedium): (WebCore::MediaList::appendMedium): * css/MediaList.h: (WebCore): (WebCore::MediaQuerySet::create): (WebCore::MediaQuerySet::createAllowingDescriptionSyntax): (MediaQuerySet): (WebCore::MediaQuerySet::queryVector): (WebCore::MediaQuerySet::lastLine): (WebCore::MediaQuerySet::setLastLine): (MediaList): (WebCore::MediaList::ref): (WebCore::MediaList::deref): (WebCore::MediaList::length): (WebCore::MediaList::mediaText): (WebCore::MediaList::queries): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryEvaluator.h: (WebCore): (MediaQueryEvaluator): * css/MediaQueryList.cpp: (WebCore::MediaQueryList::create): (WebCore::MediaQueryList::MediaQueryList): * css/MediaQueryList.h: (WebCore): (MediaQueryList): * css/MediaQueryMatcher.cpp: (WebCore::MediaQueryMatcher::evaluate): (WebCore::MediaQueryMatcher::matchMedia): * css/MediaQueryMatcher.h: (WebCore): (MediaQueryMatcher): * css/StyleMedia.cpp: (WebCore::StyleMedia::matchMedium): * css/StyleSheet.cpp: (WebCore::StyleSheet::~StyleSheet): Move the media query ownership to CSSStyleSheet where it belongs. (WebCore): * css/StyleSheet.h: (WebCore::StyleSheet::media): (StyleSheet): * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createCSSStyleSheet): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setCSSStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::setCSSStyleSheet): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectNextSourceChild): * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen): * inspector/InspectorStyleSheet.cpp: (WebCore::buildMediaObject): 2012-03-26 Zeno Albisser [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances. https://bugs.webkit.org/show_bug.cgi?id=82178 If TextureMapperShaderManager already has a reference to an instance of the requested shader program type, this instance should be reused instead of creating a new one. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore::TextureMapperShaderManager::getShaderProgram): 2012-03-26 Yury Semikhatsky [Chromium] Web Inspector: dedicated worker inspector is empty https://bugs.webkit.org/show_bug.cgi?id=82181 "beforeunload" event for worker inspector front-end is ingnored if the window url is "about:blank" as it is just unload of the default content before the front-end page load. Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._workerInspectorClosing): 2012-03-22 Yury Semikhatsky Web Inspector: split nodes and containment edges into two different arrays https://bugs.webkit.org/show_bug.cgi?id=81930 Extract heap profile nodes and edges into two separate arrays. This way we will have a continuous array of the heap graph nodes and can aviod additional mapping between node index and its position in the heap snapshot. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray): (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray): (WebInspector.HeapSnapshot.prototype._restoreNodeTypes): (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray): (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker): 2012-03-22 Pavel Podivilov Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping. https://bugs.webkit.org/show_bug.cgi?id=81897 Reviewed by Vsevolod Vlasov. SourceMapParser should only deal with payload parsing. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation): (WebInspector.CompilerScriptMapping.prototype.addScript): (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript): (WebInspector.SourceMapPayload): (WebInspector.SourceMapParser): (WebInspector.SourceMapParser.prototype.sourceContent): (WebInspector.SourceMapParser.prototype.findEntry): (WebInspector.SourceMapParser.prototype.findEntryReversed): * inspector/front-end/ContentProviders.js: (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent): 2012-03-26 Ilya Tikhonovsky Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster. https://bugs.webkit.org/show_bug.cgi?id=82175 We were using aString.indexOf("Window") but it is not effective from performance point of view. I'm replaced it with RegExp. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get isWindow): (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree): 2012-03-26 Pavel Feldman Web Inspector: breakpoints should be disabled while live editing JavaScript. https://bugs.webkit.org/show_bug.cgi?id=81947 Reviewed by Yury Semikhatsky. This change disables (removes from the backend) the breakpoints while editing script. Undoing or committing the change restores the breakpoints. Main logic is implemented within JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct undo/redo wrapper and better detection of the noop opterations. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.didEditContent): (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo): (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): 2012-03-25 Nat Duca [chromium] Route willBeginFrame from compositor to WebWidget https://bugs.webkit.org/show_bug.cgi?id=82171 Reviewed by Darin Fisher. * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHostClient): (WebCore::CCLayerTreeHost::willBeginFrame): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::beginFrame): 2012-03-25 Hayato Ito [Shadow DOM] Add Reified DOM Tree traversal internal APIs. https://bugs.webkit.org/show_bug.cgi?id=79197 Reviewed by Dimitri Glazkov. Add internal APIs which can be used to traverse Reified DOM tree, which is a result of node distribution algorithm explained in Shadow DOM spec. https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html Every public functions defined in ReifiedTreeTraversal are static functions and are named in a similar way to ones defined in WebCore::Node class. The only difference is that ReifiedTreeTraversal APIs consider shadow hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary transparently. There is no actual client which uses these APIs. Follow-up patches for FocusNavigation and EventDispatcher will use the APIs so that they can traverse node in reified tree order. Test: fast/dom/shadow/reified-tree-traversal.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ReifiedTreeTraversal.cpp: Added. (WebCore): (WebCore::isShadowHost): (WebCore::shadowTreeFor): (WebCore::shadowTreeOfParent): (WebCore::ReifiedTreeTraversal::firstChild): (WebCore::ReifiedTreeTraversal::lastChild): (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary): (WebCore::ReifiedTreeTraversal::traverseChild): (WebCore::ReifiedTreeTraversal::traverseLightChildren): (WebCore::ReifiedTreeTraversal::traverseNode): (WebCore::ReifiedTreeTraversal::nextSibling): (WebCore::ReifiedTreeTraversal::previousSibling): (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint): (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree): (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot): (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement): (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents): (WebCore::ReifiedTreeTraversal::parentNode): (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary): (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint): (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree): (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost): (WebCore::ReifiedTreeTraversal::adjustedParentNode): (WebCore::ReifiedTreeTraversal::traverseNextNode): (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary): (WebCore::ReifiedTreeTraversal::traversePreviousNode): (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary): * dom/ReifiedTreeTraversal.h: Added. (WebCore): (ReifiedTreeTraversal): * dom/ShadowTree.cpp: (WebCore::ShadowTree::insertionPointFor): (WebCore::ShadowTree::selectionFor): (WebCore): * dom/ShadowTree.h: (WebCore): (ShadowTree): * html/shadow/HTMLContentSelector.cpp: (WebCore::HTMLContentSelector::findFor): * html/shadow/HTMLContentSelector.h: (HTMLContentSelectionSet): (WebCore::HTMLContentSelectionSet::find): (HTMLContentSelector): * html/shadow/InsertionPoint.h: (WebCore::isInsertionPoint): (WebCore::toInsertionPoint): (WebCore): * testing/Internals.cpp: (WebCore::Internals::nextSiblingInReifiedTree): (WebCore): (WebCore::Internals::firstChildInReifiedTree): (WebCore::Internals::lastChildInReifiedTree): (WebCore::Internals::traverseNextNodeInReifiedTree): (WebCore::Internals::traversePreviousNodeInReifiedTree): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-25 Nikita Vasilyev Web Inspector: Indenting fully selected line should not indent the line next to it https://bugs.webkit.org/show_bug.cgi?id=81758 In the editor, you can select a whole line by moving caret at 0 column position and pressing Shift + Arrow Down/Up. After that, pressing Tab indents 2 lines: fully selected one and the line next to it. The patch changes this behaviour to indent only fully selected line since that is what pretty-match all the other code editors do. Reviewed by Pavel Feldman. Test: inspector/editor/indentation.html * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype._indentLines): Do not insert indent at the begging of the last line if a selection ends on its 0 column. (WebInspector.TextEditorMainPanel.prototype._unindentLines): Do not remove indent at the begging of the last line if a selection ends on its 0 column. 2012-03-25 Abhishek Arya Crash in ContainerNode::resumePostAttachCallbacks. https://bugs.webkit.org/show_bug.cgi?id=82159 Reviewed by Hajime Morita. Test: plugins/object-onfocus-mutation-crash.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach callbacks when our attach depth is 1 can fire mutation events such as onfocus which can blow away |this|. Need to protect it with a RefPtr. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks until the function completes. 2012-03-25 Dana Jansens [chromium] Layers with animating transforms should prepaint even if they are not visible yet https://bugs.webkit.org/show_bug.cgi?id=82117 Reviewed by Adrienne Walker. For animating transforms, instead of early-outing when the layer's visible rect is empty, let it prepaint regardless. For now, we just only paint the outermost tiles, and only for small layers, with at most 9 tiles. This changes the behaviour of ContentLayerChromium's idlePaintContentsIfDirty() so I've guarded the behaviour of the two prepainting functions that it calls to ensure the old behaviour holds without animations, and the new behaviour works with them. Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer TiledLayerChromiumTest.idlePaintNonVisibleLayers TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::idlePaintContentsIfDirty): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: (WebCore::TiledLayerChromium::numPaintedTiles): (TiledLayerChromium): 2012-03-25 Antti Koivisto Don't use CSSRuleList for child rule ownership https://bugs.webkit.org/show_bug.cgi?id=82127 Reviewed by Andreas Kling. CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be instantiated on-demand for API purposes only. - Use Vector> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule. - Add direct accessors, use internally instead of CSSRuleList. - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage. - Instantiate CSSRuleLists on-demand. - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest of our CSSOM implementation. Tested by fast/dom/gc-9.html. The patch decouples internals from the external API. It simplifies the child rule ownership and reduces indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead). * css/CSSGrammar.y: * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::CSSMediaRule): (WebCore::CSSMediaRule::~CSSMediaRule): (WebCore::CSSMediaRule::append): (WebCore::CSSMediaRule::insertRule): (WebCore::CSSMediaRule::deleteRule): (WebCore::CSSMediaRule::cssText): (WebCore::CSSMediaRule::cssRules): * css/CSSMediaRule.h: (WebCore::CSSMediaRule::create): (CSSMediaRule): (WebCore::CSSMediaRule::ruleCount): (WebCore::CSSMediaRule::ruleAt): * css/CSSParser.cpp: (WebCore::CSSParser::createMediaRule): (WebCore::CSSParser::createRuleList): (WebCore::CSSParser::createRegionRule): * css/CSSParser.h: (WebCore): * css/CSSRuleList.cpp: (WebCore): (WebCore::StaticCSSRuleList::StaticCSSRuleList): (WebCore::StaticCSSRuleList::~StaticCSSRuleList): (WebCore::StaticCSSRuleList::deref): (WebCore::StaticCSSRuleList::item): * css/CSSRuleList.h: (CSSRuleList): Turn CSSRuleList into abstract interface. (StaticCSSRuleList): (WebCore::StaticCSSRuleList::create): (WebCore::StaticCSSRuleList::ref): (WebCore::StaticCSSRuleList::rules): (WebCore::StaticCSSRuleList::styleSheet): (WebCore::StaticCSSRuleList::length): Concrete implementation for fixed list of rules. (WebCore): (LiveCSSRuleList): (WebCore::LiveCSSRuleList::LiveCSSRuleList): (WebCore::LiveCSSRuleList::ref): (WebCore::LiveCSSRuleList::deref): (WebCore::LiveCSSRuleList::length): (WebCore::LiveCSSRuleList::item): (WebCore::LiveCSSRuleList::styleSheet): Concrete implemenation for live list backed by the underlying container rule. LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::sortAndTransferMatchedRules): (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): * css/CSSStyleSheet.cpp: The same scheme for CSSStyleSheet.cssRule as with container rules. (StyleSheetCSSRuleList): (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList): (WebCore::StyleSheetCSSRuleList::ref): (WebCore::StyleSheetCSSRuleList::deref): (WebCore::StyleSheetCSSRuleList::length): (WebCore::StyleSheetCSSRuleList::item): (WebCore::StyleSheetCSSRuleList::styleSheet): (WebCore): (WebCore::CSSStyleSheet::rules): (WebCore::CSSStyleSheet::cssRules): * css/CSSStyleSheet.h: (CSSStyleSheet): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule): (WebCore): (WebCore::WebKitCSSKeyframesRule::append): (WebCore::WebKitCSSKeyframesRule::deleteRule): (WebCore::WebKitCSSKeyframesRule::findRule): (WebCore::WebKitCSSKeyframesRule::findRuleIndex): (WebCore::WebKitCSSKeyframesRule::cssText): (WebCore::WebKitCSSKeyframesRule::cssRules): * css/WebKitCSSKeyframesRule.h: (WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::ruleCount): (WebCore::WebKitCSSKeyframesRule::ruleAt): (WebCore::WebKitCSSKeyframesRule::length): (WebCore::WebKitCSSKeyframesRule::item): * css/WebKitCSSRegionRule.cpp: (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule): (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule): (WebCore::WebKitCSSRegionRule::cssText): (WebCore::WebKitCSSRegionRule::cssRules): * css/WebKitCSSRegionRule.h: * inspector/InspectorStyleSheet.cpp: (WebCore::asCSSRuleList): (WebCore::InspectorStyleSheet::addRule): (WebCore::InspectorStyleSheet::buildObjectForStyleSheet): 2012-03-25 Kentaro Hara Remove duplicated GenerateConditionalString() from code generators https://bugs.webkit.org/show_bug.cgi?id=82148 Reviewed by Adam Barth. Previously GenerateConditionalString()s were defined in each code generator, and they were doing the same thing. This patch puts GenerateConditionalString() in CodeGenerator.pm and removes duplicated GenerateConditionalString()s. No tests. No change in the generated code. * bindings/scripts/CodeGenerator.pm: (GenerateConditionalString): * bindings/scripts/CodeGeneratorCPP.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperty): (GenerateProperties): (GenerateFunction): (WriteData): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeaderContentHeader): (GenerateImplementationContentHeader): (GenerateHeader): (GenerateImplementation): (GenerateCallbackHeader): (GenerateCallbackImplementation): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateOverloadedFunctionCallback): (GenerateFunctionCallback): (GenerateBatchedAttributeData): (GenerateImplementation): (GenerateHeaderContentHeader): (GenerateImplementationContentHeader): (GenerateCallbackHeader): (GenerateCallbackImplementation): 2012-03-25 Kentaro Hara Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.* https://bugs.webkit.org/show_bug.cgi?id=82146 Reviewed by Adam Barth. Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/). We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*. We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch. No tests. No change in behavior. * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp. (WebCore): (WebCore::DOMWindowWebDatabase::openDatabase): * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h. (WebCore): (DOMWindowWebDatabase): (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase): (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase): * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl. * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp. (WebCore): (WebCore::WorkerContextWebDatabase::openDatabase): (WebCore::WorkerContextWebDatabase::openDatabaseSync): * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h. (WebCore): (WorkerContextWebDatabase): (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase): (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase): * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl. * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-03-25 Philip Rogers Avoid race condition when iterating over pending resources https://bugs.webkit.org/show_bug.cgi?id=82115 Reviewed by Nikolas Zimmermann. We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded where pending elements can become non-pending while we iterate over them. This patch cleans up buildPendingResourcesIfNeeded and re-works how pending resources are removed. Because pending resources can be modified while iterating over them, we introduce m_pendingResourcesForRemoval that holds pending resources that are marked for removal. Instead of iterating over this list we simply remove each pending resource from m_pendingResourcesForRemoval; if a pending resource is modified or removed during the processing of another pending resource this list is updated before the next element can be accessed. This change also removes removePendingResourceForElement which is no longer referenced. Test: http/tests/svg/change-id-with-pending-resources.html * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval): (WebCore): (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval): (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval): * svg/SVGDocumentExtensions.h: (SVGDocumentExtensions): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded): 2012-03-25 Arvid Nilsson [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor https://bugs.webkit.org/show_bug.cgi?id=82104 RIM PR: 145963 Reviewed by Rob Buis. The embedder may use vertex buffers, which affected the interpretation our vertex array pointers from memory pointers to offsets into a vertex buffer. The resulting geometry often resulted in no visible layers on screen. Fixed by getting rid of any bound buffer when we enter LayerRenderer::drawLayers(). * platform/graphics/blackberry/LayerRenderer.cpp: (WebCore::LayerRenderer::drawLayers): 2012-03-24 Nat Duca [chromium] Instrument gesture animations with async traces https://bugs.webkit.org/show_bug.cgi?id=82076 Reviewed by Adrienne Walker. * platform/ActivePlatformGestureAnimation.cpp: (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation): (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation): * platform/PlatformGestureCurve.h: (PlatformGestureCurve): * platform/TouchpadFlingPlatformGestureCurve.h: (WebCore::TouchpadFlingPlatformGestureCurve::debugName): * platform/WheelFlingPlatformGestureCurve.h: (WebCore::WheelFlingPlatformGestureCurve::debugName): * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp: (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation): (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation): * platform/graphics/chromium/cc/CCGestureCurve.h: (CCGestureCurve): 2012-03-24 Jeffrey Pfau XML error document creation should not fire mutation events https://bugs.webkit.org/show_bug.cgi?id=80765 Reviewed by Adam Barth. Broke two tests that expected the old behavior, which have now been updated. * xml/XMLErrors.cpp: (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): 2012-03-24 Florin Malita ForeignObject content is zoomed two times https://bugs.webkit.org/show_bug.cgi?id=76282 Reviewed by Nikolas Zimmermann. Test: svg/zoom/page/zoom-foreign-content.svg Reset the effective zoom property for FO-nested content to avoid having the zoom factor applied multiple times (zooming is handled by the top level SVG root element). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): 2012-03-24 Chris Fleizach AX: Support solution to handle invalid ax text marker https://bugs.webkit.org/show_bug.cgi?id=82023 Reviewed by Oliver Hunt. This provides methods to better use text markers so that assistive technologies can know when they are valid, and can convert them to and from absolute positions. Test: platform/mac/accessibility/textmarker-routines.html * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapper _convertToNSRange:]): (-[WebAccessibilityObjectWrapper _indexForTextMarker:]): (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2012-03-24 Victor Carbune Quick fix for rendering controls regression. https://bugs.webkit.org/show_bug.cgi?id=82125 Reviewed by Eric Carlson. Only temporary fix. Tests to cover the problem should be added * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::makeOpaque): The display:none property should be toggled only by the media element now. (WebCore::MediaControlPanelElement::makeTransparent): The timer that toggles the dispalay:none shouldn't be used now. 2012-03-24 Kevin Ollivier [wx] Unreviewed. Add header needed for compilation. * html/shadow/TextFieldDecorationElement.cpp: 2012-03-24 Abhishek Arya Crash in ApplyStyleCommand::applyInlineStyleToNodeRange. https://bugs.webkit.org/show_bug.cgi?id=81959 Reviewed by Ryosuke Niwa. Test: editing/execCommand/apply-style-command-crash.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak node iterator |node|. * editing/ApplyStyleCommand.h: (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr. 2012-03-24 Jesus Sanchez-Palencia Unreviewed, build fix since we use "-Werror=unused-but-set-variable". The variable 'it' was set at TextureMapperShaderManager.h:110 but never used. * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore::TextureMapperShaderManager::getShaderProgram): 2012-03-24 Zeno Albisser [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template. https://bugs.webkit.org/show_bug.cgi?id=82049 Change the getShaderProgram() function to not be a template. This is a workaround for a compiler bug that leads to an assert when compiling in debug mode on mac. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::beginClip): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderProgram): (WebCore::TextureMapperShaderManager::getShaderProgram): (TextureMapperShaderManager): 2012-03-23 Shawn Singh [chromium] Incorrect replica originTransform used in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=82118 Reviewed by Adrienne Walker. Unit test added to CCDamageTrackerTest.cpp * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForRenderSurface): 2012-03-23 Dana Jansens [chromium] When prepainting fails, tiles dirty rects may be cleared https://bugs.webkit.org/show_bug.cgi?id=82107 Reviewed by Adrienne Walker. When prepainting, if a tile is unable to be reserved due to memory limits, we bail out of prepareToUpdateTiles. But we would have cleared the dirty rect of any previous tiles. This leaves them in a bad state where their textures are reserved, but their textureIds are set to 0, and they are not marked dirty. This means that they will not be updated and displayed if they become visible, since it is assumed that valid textures with zero textureId must have a dirty region. We fix this by not clearing the dirty rects until we know we are going to update the layer. Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt): (WebCore): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): 2012-03-23 Stephanie Lewis https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals. WebProcess appears to get stuck in its GC handler (81963). Remove the call to garbage collect in low memory signal handler. Did some testing with hitting the low memory handler during Membuster and we would get back at most 100k - 200k. That isn't enough to help the system, and in that state the GC collection can take a substantial amount of time. Reviewed by Geoff Garen. Performance Change, no change in behavior. * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::releaseMemory): 2012-03-23 W. James MacLean [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found. https://bugs.webkit.org/show_bug.cgi?id=82106 Reviewed by Adrienne Walker. Existing unit tests updated. With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when wheel handlers are present. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::scrollBegin): 2012-03-23 Adam Barth Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl https://bugs.webkit.org/show_bug.cgi?id=79635 Reviewed by Kentaro Hara. This patch moves the NotificationCenter from WorkerContext to WorkerContextNotificiations, reducing clutter in WorkerContext. After this patch, Notifications are almost entirely contained in the notifications directory. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * workers/WorkerContext.cpp: (WebCore::WorkerContext::~WorkerContext): * workers/WorkerContext.h: (WebCore): (WorkerContext): * workers/WorkerContext.idl: 2012-03-23 Michal Mocny [chromium] RootLayer was not being checked for null causing segfaults very rarely. https://bugs.webkit.org/show_bug.cgi?id=82111 Reviewed by Adrienne Walker. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::beginDrawingFrame): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): 2012-03-23 Shawn Singh [chromium] Fix race bug that clobbers CCLayerImpl updateRect https://bugs.webkit.org/show_bug.cgi?id=82109 Reviewed by Dirk Pranke. If the main thread commits twice before the impl thread actually draws, then the updateRect of the first frame gets lost forever, and not propagated to the damage tracker. The solution is to accumulate the updateRect. The CCLayerImpl updateRect is already being correctly cleared at the appropriate time after drawing. Unit test added to LayerChromiumTest.cpp. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): 2012-03-23 Rafael Weinstein [MutationObservers] attributeFilter should be case sensitive at all times https://bugs.webkit.org/show_bug.cgi?id=81822 Reviewed by Ryosuke Niwa. This removes the behavior in MutationObserverRegistration which treats attributeFilter as case insensitive for HTML elements in HTML documents. Relevant tests have been updated. * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::resetObservation): (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): * dom/MutationObserverRegistration.h: (MutationObserverRegistration): 2012-03-23 Kentaro Hara Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl https://bugs.webkit.org/show_bug.cgi?id=79663 Reviewed by Adam Barth. For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl. Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results) * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/websockets/WorkerContextWebSocket.idl: Added. * WebCore.gypi: * WebCore.xcodeproj/project.xcodeproj: * workers/WorkerContext.idl: 2012-03-23 Parag Radke REGRESSION: can select text of an input button https://bugs.webkit.org/show_bug.cgi?id=13624 Reviewed by Ryosuke Niwa. Text in a button should never have a selection background of its own painted but if the button is inside an editable area, then the whole button should have it's selection background painted. Test: editing/selection/selection-button-text.html * rendering/RenderButton.h: Added implementation for the virtual function canBeSelectionLeaf() which returns true if the button renderer is editable, false other wise. * rendering/RenderTextFragment.h: Added implementation for the virtual function canBeSelectionLeaf() which returns true if the text fragment renderer is editable, false other wise. 2012-03-23 Eric Carlson Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex https://bugs.webkit.org/show_bug.cgi?id=82095 Reviewed by Dan Bernstein. No new tests, removed a bogus ASSERT that was sometimes triggered by tests. * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT. 2012-03-23 Eric Carlson Layout Test media/video-source-load.html is failing https://bugs.webkit.org/show_bug.cgi?id=82094 Reviewed by Alexey Proskuryakov. No new tests, tested by media/video-source-load.html. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called with networkState == NETWORK_EMPTY because the resource selection algorithm has not started yet. 2012-03-23 Alexey Proskuryakov [Mac] No need for platform-specific ENABLE_BLOB values https://bugs.webkit.org/show_bug.cgi?id=82102 Reviewed by David Kilzer. * Configurations/FeatureDefines.xcconfig: 2012-03-23 Kent Tamura Add TextFieldDecorator and TextFieldDecorationElement https://bugs.webkit.org/show_bug.cgi?id=80580 Reviewed by Dimitri Glazkov. These classes will be used to add a decoration icon to a text field from outside of WebCore. We have a plan to use them in Chromium port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to non-Chromium build files. How it works: When a shadow subtree for a text field is created, we ask ChromeClient to decorate it. ChromeClient appends a TextFieldDecorationElement to the existing shadow subtree or another shadow tree. A TextFieldDecorator is associated to a TextFieldDecorationElement, and it provides decoration icon images and a click handler. No new tests. This patch won't make any behavior change for now. * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h * dom/Element.h: (WebCore::Element::isTextFieldDecoration): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::createShadowSubtree): Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo(). * html/shadow/TextFieldDecorationElement.cpp: Added. (WebCore::TextFieldDecorator::~TextFieldDecorator): (WebCore::TextFieldDecorationElement::TextFieldDecorationElement): (WebCore::TextFieldDecorationElement::create): (WebCore::TextFieldDecorationElement::isTextFieldDecoration): (WebCore::TextFieldDecorationElement::updateImage): (WebCore::TextFieldDecorationElement::customStyleForRenderer): Sets the size to a square of the font-size. (WebCore::TextFieldDecorationElement::createRenderer): Always creates a RenderImage. (WebCore::TextFieldDecorationElement::attach): Sets an image for appropriate state. (WebCore::TextFieldDecorationElement::isMouseFocusable): (WebCore::TextFieldDecorationElement::defaultEventHandler): Delegate a click event to the corresponding function of TextFieldDecorator. * html/shadow/TextFieldDecorationElement.h: Added. (TextFieldDecorator): Added. (TextFieldDecorationElement): Added. (WebCore::toTextFieldDecorationElement): Added. * page/ChromeClient.h: (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation. (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto. 2012-03-23 Adam Klein Match DOM4 spec with respect to DocumentFragment insertion https://bugs.webkit.org/show_bug.cgi?id=82089 Reviewed by Ryosuke Niwa. DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild in terms of "mutation algorithms": http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms This change updates WebKit to match, in particular with regard to DocumentFragments. Previously, ContainerNode would remove nodes one at a time, then add them to the new parent. When combined with MutationObservers, this results in overly-verbose mutation records. Now we create as few records as possible, matching the spec as well as Gecko's implementation of MutationObservers. Note that we still need to check validity each time through the loop, since inserting a node may dispatch events. In a future change, I hope to move these events so that they fire only after all nodes are inserted, but that's too much to tackle all in one. Tests: fast/mutation/document-fragment-insertion.html * dom/ContainerNode.cpp: (WebCore::collectChildrenAndRemoveFromOldParent): New helper method combining collectTargetNodes() with the removal of the collected nodes from their old parent, if any. (WebCore::ContainerNode::insertBefore): Use new helper method instead of removing nodes one at a time from the fragment. (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts and moved the "do nothing" check out of the loop. (WebCore::ContainerNode::appendChild): Use new helper method. 2012-03-23 Stephen White [skia] Switch to Skia's implementation of the feMorphology filter. https://bugs.webkit.org/show_bug.cgi?id=82085 Reviewed by Dirk Schulze. Covered by existing tests in svg/filters/. * WebCore.gypi: * platform/graphics/filters/FEMorphology.h: (FEMorphology): * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added. (WebCore): (WebCore::FEMorphology::platformApplySkia): 2012-03-23 Adam Barth Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3) https://bugs.webkit.org/show_bug.cgi?id=82027 Reviewed by Kentaro Hara. Rather than watching for willDetachPage, NotificationCenter can just override ActiveDOMObject::stop directly to be notified when it needs to stop. Switching NotificationCenter over to using ActiveDOMObject callbacks frees DOMWindowNotification to implement reconnectFrame. However, this is only really a victory in princple because NotificationCenter always returns false for canSuspend(), which means we'll never actually use the reconnectFrame functionality. However, this patch does move us closer to the time when NotificationCenter can implement ActiveDOMObject::suspend/resume to play nice with the PageCache. * notifications/DOMWindowNotifications.cpp: (WebCore::DOMWindowNotifications::disconnectFrame): (WebCore::DOMWindowNotifications::reconnectFrame): * notifications/DOMWindowNotifications.h: (DOMWindowNotifications): * notifications/NotificationCenter.cpp: (WebCore::NotificationCenter::NotificationCenter): (WebCore::NotificationCenter::stop): * notifications/NotificationCenter.h: (NotificationCenter): 2012-03-23 Daniel Cheng [chromium] Support file drag out using DataTransferItemList::add(File) https://bugs.webkit.org/show_bug.cgi?id=81261 Reviewed by Tony Chang. Original patch by Varun Jain . I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor is it necessary for File objects, since File objects correspond to a native filesystem path. Test: fast/events/drag-dataTransferItemList-file-handling.html * platform/chromium/DataTransferItemListChromium.cpp: (WebCore::DataTransferItemListChromium::add): 2012-03-23 Zan Dobersek [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute https://bugs.webkit.org/show_bug.cgi?id=80030 Reviewed by Martin Robinson. Changes in CodeGeneratorGObject.pm: - group implementation of private helpers and guard them inside an ifdef if a root conditional attribute is present. - always define the type of a GObject binding, even if the root conditional feature is not enabled - the methods are generated as well, but are simply stubs if the feature is not enabled, throwing a warning upon interaction. - if the method itself is guarded by a conditional attribute, the stub implementation gains one more level of depth, throwing a warning if the method's conditional feature is not enabled but the root conditional feature is. - small style fixes in random places. Also changed are GObject baselines for binding tests. No new tests - no new testable functionality. * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (HumanReadableConditional): (GenerateConditionalWarn): (GenerateProperty): (GenerateProperties): (GenerateFunction): (GenerateFunctions): (GenerateCFile): (GenerateEventTargetIface): (Generate): (WriteData): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit): (WebKit::kit): (WebKit::wrapFloat64Array): (webkit_dom_float64array_finalize): (webkit_dom_float64array_foo): * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (WebKit): (WebKit::kit): (WebKit::wrapTestActiveDOMObject): (webkit_dom_test_active_dom_object_finalize): (webkit_dom_test_active_dom_object_exciting_function): (webkit_dom_test_active_dom_object_post_message): (webkit_dom_test_active_dom_object_get_exciting_attr): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestCallback): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_callback_with_no_param): (webkit_dom_test_callback_callback_with_class1param): (webkit_dom_test_callback_callback_with_class2param): (webkit_dom_test_callback_callback_with_non_bool_return_type): (webkit_dom_test_callback_callback_with_string_list): * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (WebKit): (WebKit::kit): (WebKit::wrapTestCustomNamedGetter): (webkit_dom_test_custom_named_getter_finalize): (webkit_dom_test_custom_named_getter_another_function): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (WebKit): (WebKit::kit): (WebKit::wrapTestEventConstructor): (webkit_dom_test_event_constructor_finalize): (webkit_dom_test_event_constructor_get_attr1): (webkit_dom_test_event_constructor_get_attr2): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (WebKit): (WebKit::core): (WebKit::wrapTestEventTarget): (webkit_dom_test_event_target_finalize): (webkit_dom_test_event_target_item): (webkit_dom_test_event_target_dispatch_event): * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestInterface): (webkit_dom_test_interface_finalize): (webkit_dom_test_interface_supplemental_method1): (webkit_dom_test_interface_supplemental_method2): (webkit_dom_test_interface_supplemental_method4): (webkit_dom_test_interface_get_supplemental_str1): (webkit_dom_test_interface_get_supplemental_str2): (webkit_dom_test_interface_set_supplemental_str2): (webkit_dom_test_interface_get_supplemental_node): (webkit_dom_test_interface_set_supplemental_node): * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (WebKit): (WebKit::kit): (WebKit::wrapTestMediaQueryListListener): (webkit_dom_test_media_query_list_listener_finalize): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (WebKit): (WebKit::kit): (WebKit::wrapTestNamedConstructor): (webkit_dom_test_named_constructor_finalize): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestObj): (webkit_dom_test_obj_finalize): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_constructed): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_init): (webkit_dom_test_obj_void_method): (webkit_dom_test_obj_void_method_with_args): (webkit_dom_test_obj_int_method): (webkit_dom_test_obj_int_method_with_args): (webkit_dom_test_obj_obj_method): (webkit_dom_test_obj_obj_method_with_args): (webkit_dom_test_obj_method_with_sequence_arg): (webkit_dom_test_obj_method_that_requires_all_args_and_throws): (webkit_dom_test_obj_serialized_value): (webkit_dom_test_obj_idb_key): (webkit_dom_test_obj_options_object): (webkit_dom_test_obj_method_with_exception): (webkit_dom_test_obj_with_script_state_void): (webkit_dom_test_obj_with_script_state_obj): (webkit_dom_test_obj_with_script_state_void_exception): (webkit_dom_test_obj_with_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context): (webkit_dom_test_obj_with_script_execution_context_and_script_state): (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces): (webkit_dom_test_obj_method_with_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args): (webkit_dom_test_obj_method_with_optional_string): (webkit_dom_test_obj_method_with_optional_string_is_undefined): (webkit_dom_test_obj_method_with_optional_string_is_null_string): (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_class_method): (webkit_dom_test_obj_class_method_with_optional): (webkit_dom_test_obj_overloaded_method1): (webkit_dom_test_obj_convert1): (webkit_dom_test_obj_convert2): (webkit_dom_test_obj_convert3): (webkit_dom_test_obj_convert4): (webkit_dom_test_obj_convert5): (webkit_dom_test_obj_mutable_point_function): (webkit_dom_test_obj_immutable_point_function): (webkit_dom_test_obj_orange): (webkit_dom_test_obj_strict_function): (webkit_dom_test_obj_get_read_only_int_attr): (webkit_dom_test_obj_get_read_only_string_attr): (webkit_dom_test_obj_get_read_only_test_obj_attr): (webkit_dom_test_obj_get_short_attr): (webkit_dom_test_obj_set_short_attr): (webkit_dom_test_obj_get_unsigned_short_attr): (webkit_dom_test_obj_set_unsigned_short_attr): (webkit_dom_test_obj_get_int_attr): (webkit_dom_test_obj_set_int_attr): (webkit_dom_test_obj_get_long_long_attr): (webkit_dom_test_obj_set_long_long_attr): (webkit_dom_test_obj_get_unsigned_long_long_attr): (webkit_dom_test_obj_set_unsigned_long_long_attr): (webkit_dom_test_obj_get_string_attr): (webkit_dom_test_obj_set_string_attr): (webkit_dom_test_obj_get_test_obj_attr): (webkit_dom_test_obj_set_test_obj_attr): (webkit_dom_test_obj_get_xml_obj_attr): (webkit_dom_test_obj_set_xml_obj_attr): (webkit_dom_test_obj_get_create): (webkit_dom_test_obj_set_create): (webkit_dom_test_obj_get_reflected_string_attr): (webkit_dom_test_obj_set_reflected_string_attr): (webkit_dom_test_obj_get_reflected_integral_attr): (webkit_dom_test_obj_set_reflected_integral_attr): (webkit_dom_test_obj_get_reflected_unsigned_integral_attr): (webkit_dom_test_obj_set_reflected_unsigned_integral_attr): (webkit_dom_test_obj_get_reflected_boolean_attr): (webkit_dom_test_obj_set_reflected_boolean_attr): (webkit_dom_test_obj_get_reflected_url_attr): (webkit_dom_test_obj_set_reflected_url_attr): (webkit_dom_test_obj_get_reflected_custom_integral_attr): (webkit_dom_test_obj_set_reflected_custom_integral_attr): (webkit_dom_test_obj_get_reflected_custom_boolean_attr): (webkit_dom_test_obj_set_reflected_custom_boolean_attr): (webkit_dom_test_obj_get_reflected_custom_url_attr): (webkit_dom_test_obj_set_reflected_custom_url_attr): (webkit_dom_test_obj_get_attr_with_getter_exception): (webkit_dom_test_obj_set_attr_with_getter_exception): (webkit_dom_test_obj_get_attr_with_setter_exception): (webkit_dom_test_obj_set_attr_with_setter_exception): (webkit_dom_test_obj_get_string_attr_with_getter_exception): (webkit_dom_test_obj_set_string_attr_with_getter_exception): (webkit_dom_test_obj_get_string_attr_with_setter_exception): (webkit_dom_test_obj_set_string_attr_with_setter_exception): (webkit_dom_test_obj_get_with_script_state_attribute): (webkit_dom_test_obj_set_with_script_state_attribute): (webkit_dom_test_obj_get_with_script_execution_context_attribute): (webkit_dom_test_obj_set_with_script_execution_context_attribute): (webkit_dom_test_obj_get_with_script_state_attribute_raises): (webkit_dom_test_obj_set_with_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises): (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_get_content_document): (webkit_dom_test_obj_get_mutable_point): (webkit_dom_test_obj_set_mutable_point): (webkit_dom_test_obj_get_immutable_point): (webkit_dom_test_obj_set_immutable_point): (webkit_dom_test_obj_get_strict_float): (webkit_dom_test_obj_set_strict_float): (webkit_dom_test_obj_get_description): (webkit_dom_test_obj_get_id): (webkit_dom_test_obj_set_id): (webkit_dom_test_obj_get_hash): * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestSerializedScriptValueInterface): (webkit_dom_test_serialized_script_value_interface_finalize): (webkit_dom_test_serialized_script_value_interface_accept_transfer_list): (webkit_dom_test_serialized_script_value_interface_multi_transfer_list): (webkit_dom_test_serialized_script_value_interface_get_value): (webkit_dom_test_serialized_script_value_interface_set_value): (webkit_dom_test_serialized_script_value_interface_get_readonly_value): (webkit_dom_test_serialized_script_value_interface_get_cached_value): (webkit_dom_test_serialized_script_value_interface_set_cached_value): (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2012-03-23 Dana Jansens [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting https://bugs.webkit.org/show_bug.cgi?id=82057 Reviewed by Adrienne Walker. Adds painted pixel metrics to CCOverdrawMetrics class, and calls in to report painted areas when updating tiles in the TiledLayerChromium class. Unit test: TiledLayerChromiumTest.opaqueContentsRegion TiledLayerChromiumTest.pixelsPaintedMetrics * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::didPaint): (WebCore): (WebCore::CCOverdrawMetrics::recordMetricsInternal): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::pixelsPainted): 2012-03-23 Abhishek Arya Crash in RenderBlock::splitBlocks. https://bugs.webkit.org/show_bug.cgi?id=81926 Reviewed by Julien Chaffraix. We are updating the :after content before calling splitFlow. The :after content gets blown away since it will go to the continuation. beforeChild was earlier set to the first child. Being the last anonymous block, its children gets pulled up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update beforeChild value. Test: fast/multicol/span/update-after-content-before-child-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): 2012-03-23 Dana Jansens [chromium] Improved composited debug borders https://bugs.webkit.org/show_bug.cgi?id=82071 Reviewed by Adrienne Walker. Fix the problem with missing debug borders. Since we append quads to the list front to back now, we draw the quads in the list from back to front of the list. Which means if the debug quad is added after the layer it is drawing around, the layer can draw over top of its debug quad. Reverse the ordering when appending to fix it. Make the border red around tiles that are checkerboarded. Missing tiles in non-root layers are drawn clear, so this makes them more visible. Put a blue border around each render surface, and a purple border on their replicas. No new tests. * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore): (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::hasReplica): (WebCore): (WebCore::CCRenderSurface::createReplicaSharedQuadState): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore): (WebCore::CCTiledLayerImpl::appendQuads): 2012-03-23 Simon Fraser Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking https://bugs.webkit.org/show_bug.cgi?id=82092 Reviewed by Dean Jackson. A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving this setting code down into RenderLayerBacking. RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does for other compositing-related settings, so that RenderLayerBacking doesn't have to grovel for Settings every time. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::updateBacking): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled): (RenderLayerCompositor): 2012-03-23 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=82083 Rubber-stamped by Simon Fraser. This patch is just a name change. getExistingScrollAnimator() (which was added earlier today) is now existingScrollAnimator(). * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureTapDown): * page/FrameView.cpp: (WebCore::FrameView::setAnimatorsAreActive): * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::willStartLiveResize): (WebCore::ScrollableArea::willEndLiveResize): (WebCore::ScrollableArea::contentAreaWillPaint): (WebCore::ScrollableArea::mouseEnteredContentArea): (WebCore::ScrollableArea::mouseExitedContentArea): (WebCore::ScrollableArea::mouseMovedInContentArea): (WebCore::ScrollableArea::contentAreaDidShow): (WebCore::ScrollableArea::contentAreaDidHide): (WebCore::ScrollableArea::contentsResized): (WebCore::ScrollableArea::serviceScrollAnimations): * platform/ScrollableArea.h: (WebCore::ScrollableArea::existingScrollAnimator): 2012-03-23 Abhishek Arya Crash due to accessing removed parent lineboxes when clearing selection. https://bugs.webkit.org/show_bug.cgi?id=81359 Reviewed by Eric Seidel. Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes check to more places. Test: editing/selection/clear-selection-crash.html * rendering/RenderObject.cpp: (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes): * rendering/RenderSelectionInfo.h: (WebCore::RenderSelectionInfo::RenderSelectionInfo): (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo): 2012-03-23 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=82083 Too many ScrollAnimators are allocated on pages with frames Reviewed by Geoffrey Garen. This patch adds a new getter to ScrollableArea called getExistingScrollAnimator() unlike scrollAnimator() this new function will just return null if there is not already a ScrollAnimator. Callers should use this new function when they have business with ScrollAnimator that does not need to do anything when there are no scrollbars. * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureTapDown): * page/FrameView.cpp: (WebCore::FrameView::setAnimatorsAreActive): * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::willStartLiveResize): (WebCore::ScrollableArea::willEndLiveResize): (WebCore::ScrollableArea::contentAreaWillPaint): (WebCore::ScrollableArea::mouseEnteredContentArea): (WebCore::ScrollableArea::mouseExitedContentArea): (WebCore::ScrollableArea::mouseMovedInContentArea): (WebCore::ScrollableArea::contentAreaDidShow): (WebCore::ScrollableArea::contentAreaDidHide): (WebCore::ScrollableArea::willRemoveHorizontalScrollbar): (WebCore::ScrollableArea::contentsResized): (WebCore::ScrollableArea::serviceScrollAnimations): * platform/ScrollableArea.h: (ScrollableArea): (WebCore::ScrollableArea::getExistingScrollAnimator): 2012-03-23 Eric Carlson Deal with DOM modifications when evaluating source elements. https://bugs.webkit.org/show_bug.cgi?id=81163 Reviewed by Alexey Proskuryakov. Test: media/video-beforeload-remove-source.html * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes. (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes. (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes. (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes. (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes. (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes. * dom/ContainerNode.h: (WebCore::getChildNodes): * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during a DOM modification during an event callback. (WebCore::HTMLMediaElement::load): Ditto. (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first child node, it will be the first node considered. (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before looking for nodes because 'beforeload' event handlers can mutate the DOM. Don't use a that is no longer a child node after 'beforeload'. Use 0 to represent the end of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous sentinel, "this", would cause a retain cycle. (WebCore::HTMLMediaElement::sourceWasAdded): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto. (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during a DOM modification during an event callback. * html/HTMLMediaElement.h: 2012-03-23 Dean Jackson Disable CSS_SHADERS in Apple builds https://bugs.webkit.org/show_bug.cgi?id=81996 Reviewed by Simon Fraser. Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h. * Configurations/FeatureDefines.xcconfig: 2012-03-23 Dave Michael Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel and Ryosuke Niwa. Make HTMLPluginElement release its m_NPObject in detach() to break a reference-counting cycle that happens on reload or navigation. With this change, HTMLPlugInElement::removedFromDocument is unnecessary, so it was removed. Note that Releasing m_NPObject does not result in a call to the plugin; it simply releases a reference count on the wrapper object for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked when the render tree is destroyed, when PluginView calls PluginPackage::unload.) Thus, it is safe to release m_NPObject in detach, because it can not result in layout or style changes. Also added numberOfLiveNodes() and numberOfLiveDocuments() to window.internals to enable testing. Test: plugins/netscape-dom-access-and-reload.html * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: (WebCore): (WebCore::Internals::numberOfLiveNodes): (WebCore::Internals::numberOfLiveDocuments): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-23 Ryosuke Niwa CSSParser doesn't set border-*-width/style/color to initial by border shorthand property https://bugs.webkit.org/show_bug.cgi?id=82040 Reviewed by Antti Koivisto. The border shorthand property sets values for border-width, border-style, and border-color shorthand properties. While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the initialization in parseShorthand fails for the border property. Fixed the bug by explicitly initializing longhand properties. Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor". This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078. Test: fast/css/border-shorthand-initialize-longhands.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand. (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available. This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set. * css/CSSPropertyLonghand.cpp: (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is "abridged" in the sense that they're still shorthands. * css/CSSPropertyLonghand.h: (WebCore::CSSPropertyLonghand::CSSPropertyLonghand): (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes. (WebCore::CSSPropertyLonghand::longhandsForInitialization): 2012-03-23 Tony Chang [chromium] rename newwtf target back to wtf https://bugs.webkit.org/show_bug.cgi?id=82064 Reviewed by Adam Barth. No new tests, only renaming a build target. * WebCore.gyp/WebCore.gyp: 2012-03-23 Adrienne Walker [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms https://bugs.webkit.org/show_bug.cgi?id=82066 Reviewed by James Robinson. With threaded compositing, OSX will crash and Windows will have black scrollbars. Fix that by reverting to the previosu behavior of updating scrollbars on the main thread instead. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::scrollbarLayerDidChange): 2012-03-23 Dan Bernstein ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers https://bugs.webkit.org/show_bug.cgi?id=81351 Rubber-stamped by Jessie Berlin. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that the issue is still noticeable, but it does not automatically make the debug bots red. 2012-03-23 Mike Lawther CSS3 calc: image sizing works with mixed percentage/absolute https://bugs.webkit.org/show_bug.cgi?id=82017 Reviewed by Ojan Vafai. Test: css3/calc/img-size-expected.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 2012-03-23 Julien Chaffraix REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height https://bugs.webkit.org/show_bug.cgi?id=81826 Reviewed by Tony Chang. Covered by tables/mozilla/bugs/bug27038-{1|2}.html. This partly reverts r107971: the extra logical height distribution change was not needed to fix the bug (it is needed by the test though). We revert to giving all the extra height to the first tbody and not the first section. This is broken but unfortunately some websites are relying on that. Getting a real distribution algorithm is covered by bug 81824. However this is super tricky to get right and I did not want to add more compatibility risks until I have something solid. * rendering/RenderTable.cpp: (WebCore::RenderTable::distributeExtraLogicalHeight): 2012-03-23 Xingnan Wang Optimize for IPP in DirectConvolver::process() https://bugs.webkit.org/show_bug.cgi?id=80255 Reviewed by Chris Rogers. Increase ~2X performance by conv() in IPP. * platform/audio/DirectConvolver.cpp: (WebCore::DirectConvolver::DirectConvolver): (WebCore::DirectConvolver::process): * platform/audio/DirectConvolver.h: (DirectConvolver): 2012-03-23 Tommy Widenflycht MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback https://bugs.webkit.org/show_bug.cgi?id=81657 Reviewed by Adam Barth. Last major WebCore patch for the JSEP PeerConnection, together with the associated IceCallback (they both depend on each other and IceCallback has very few lines of real code). My next patch after this one will do a major overhaul of the existing layout tests and add a few new ones. * GNUmakefile.list.am: * Modules/mediastream/DOMWindowMediaStream.idl: * Modules/mediastream/IceCallback.h: Added. (WebCore): (IceCallback): (WebCore::IceCallback::~IceCallback): * Modules/mediastream/IceCallback.idl: Added. * Modules/mediastream/PeerConnection00.cpp: Added. (WebCore): (WebCore::PeerConnection00::create): (WebCore::PeerConnection00::PeerConnection00): (WebCore::PeerConnection00::~PeerConnection00): (WebCore::PeerConnection00::hasLocalAudioTrack): (WebCore::PeerConnection00::hasLocalVideoTrack): (WebCore::PeerConnection00::parseMediaHints): (WebCore::PeerConnection00::createOffer): (WebCore::PeerConnection00::createAnswer): (WebCore::PeerConnection00::setLocalDescription): (WebCore::PeerConnection00::setRemoteDescription): (WebCore::PeerConnection00::localDescription): (WebCore::PeerConnection00::remoteDescription): (WebCore::PeerConnection00::startIce): (WebCore::PeerConnection00::processIceMessage): (WebCore::PeerConnection00::readyState): (WebCore::PeerConnection00::iceState): (WebCore::PeerConnection00::addStream): (WebCore::PeerConnection00::removeStream): (WebCore::PeerConnection00::localStreams): (WebCore::PeerConnection00::remoteStreams): (WebCore::PeerConnection00::close): (WebCore::PeerConnection00::didGenerateIceCandidate): (WebCore::PeerConnection00::didChangeReadyState): (WebCore::PeerConnection00::didChangeIceState): (WebCore::PeerConnection00::didAddRemoteStream): (WebCore::PeerConnection00::didRemoveRemoteStream): (WebCore::PeerConnection00::interfaceName): (WebCore::PeerConnection00::scriptExecutionContext): (WebCore::PeerConnection00::stop): (WebCore::PeerConnection00::eventTargetData): (WebCore::PeerConnection00::ensureEventTargetData): (WebCore::PeerConnection00::changeReadyState): (WebCore::PeerConnection00::changeIceState): * Modules/mediastream/PeerConnection00.h: Added. (WebCore): (PeerConnection00): (WebCore::PeerConnection00::refEventTarget): (WebCore::PeerConnection00::derefEventTarget): * Modules/mediastream/PeerConnection00.idl: Added. * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled): * bindings/js/JSPeerConnection00Custom.cpp: Added. (WebCore): (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00): * dom/EventTargetFactory.in: 2012-03-23 Adrienne Walker [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6 https://bugs.webkit.org/show_bug.cgi?id=82062 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): 2012-03-23 Tommy Widenflycht [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter https://bugs.webkit.org/show_bug.cgi?id=81924 Reviewed by Adam Barth. Nothing to test, just moving methods. * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::constructSDP): (WebCore): 2012-03-23 Sami Kyostila Reuse buffer allocation if canvas size does not change https://bugs.webkit.org/show_bug.cgi?id=80871 Reviewed by Stephen White. If the user changes the width or height attributes of a canvas element, the contents of the canvas should be cleared and the context state should be reset. This has become a common idiom to clear the canvas "efficiently" at the start of a frame. Previously, this code path triggered a full reallocation of the image buffer backing the canvas, leading to reduced performance. This patch implements an optimization where we reuse the previous image buffer allocation if the size of the canvas did not change. Also, instead of clearing the canvas every time its dimensions are touched, we only clear if anything has been drawn into the canvas since it was previously cleared. Note that for now this optimization only applies for 2D canvases, since it is not entirely clear how touching the dimensions of a WebGL canvas should work. Test: fast/canvas/canvas-resize-after-paint-without-layout.html + existing layout tests for canvas resetting. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial graphics context state so we can restore it without creating a new context. (WebCore::HTMLCanvasElement::clearImageBuffer): (WebCore): (WebCore::HTMLCanvasElement::clearCopiedImage): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::reset): No need to notify the compositor when the context is reset, because clearing the image buffer does the same thing. We can also skip the notification if we did not have an image buffer at the time of the reset, because the reset will not have any visual impact in this case. Finally, if the canvas size did change, the notification is also unnecessary because of the call to RenderObject::repaint() from HTMLCanvasElement::reset(). 2012-03-22 Martin Robinson Fix some code generation warnings on GTK+. Reviewed by Gustavo Noronha Silva. No new tests. This just fixes warnings. * GNUmakefile.am: Remove nonexistent directories from the list IDL directories. 2012-03-23 Sheriff Bot Unreviewed, rolling out r111751. http://trac.webkit.org/changeset/111751 https://bugs.webkit.org/show_bug.cgi?id=82060 caused 15% page cycler regression for chromium-linux (Requested by eae on #webkit). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-23 Kentaro Hara Support [ImplementedAs] for attributes https://bugs.webkit.org/show_bug.cgi?id=81605 Reviewed by Adam Barth. [ImplementedAs] just supports methods. [ImplementedAs] should support attributes too. Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes. (AttributeNameForGetterAndSetter): * bindings/scripts/test/TestObj.idl: Added a test case. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::strawberry): (WebDOMTestObj::setStrawberry): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_strawberry): (webkit_dom_test_obj_set_strawberry): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjStrawberry): (WebCore::setJSTestObjStrawberry): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj strawberry]): (-[DOMTestObj setStrawberry:]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::strawberryAttrGetter): (TestObjInternal): (WebCore::TestObjInternal::strawberryAttrSetter): (WebCore): 2012-03-23 Tommy Widenflycht The JSC code generator doesn't generate correct code for Constructors https://bugs.webkit.org/show_bug.cgi?id=82046 Reviewed by Kentaro Hara. The main bulk of generated code for constructors uses the name jsConstructor for the created object, and then calls GenerateParametersCheck which generates code that uses the name castedThis. * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::finishCreation): (WebCore::JSTestObjConstructor::constructJSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): 2012-03-23 Tommy Widenflycht The JSC code generator can't handle boolean arguments for Callbacks https://bugs.webkit.org/show_bug.cgi?id=82045 Reviewed by Kentaro Hara. CodeGeneratorJS.pm only handles DOMStrings and objects as arguments for a Callback, so I added support for boolean values as well. * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: (WebDOMTestCallback::callbackWithBoolean): * bindings/scripts/test/CPP/WebDOMTestCallback.h: (WebDOMTestCallback): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_callback_with_boolean): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithBoolean): (WebCore): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/ObjC/DOMTestCallback.h: * bindings/scripts/test/ObjC/DOMTestCallback.mm: (-[DOMTestCallback callbackWithBoolean:]): * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithBoolean): (WebCore): * bindings/scripts/test/V8/V8TestCallback.h: (V8TestCallback): 2012-03-23 Allan Sandfeld Jensen Touch adjustment forgets some subtarget quads. https://bugs.webkit.org/show_bug.cgi?id=82044 Reviewed by Kenneth Rohde Christiansen. Do not uncritically skip all nodes that are ancestors to other test results. Instead return the inner-most element if multiple nodes have the same distance. Test: touchadjustment/block-testing.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::compileSubtargetList): (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric): 2012-03-23 Allan Sandfeld Jensen TouchAdjustment does not correct for frame position https://bugs.webkit.org/show_bug.cgi?id=82043 Reviewed by Kenneth Rohde Christiansen. Convert geometry to window coordinates before calculating distance. Test: touchadjustment/iframe.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine): 2012-03-23 Vlad Voicu Fixed minor WebInspector display issue Clicking on disabled sections in Styles Sidebar Pane creates new elements. https://bugs.webkit.org/show_bug.cgi?id=81925 Reviewed by Timothy Hatcher No new tests should be required. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick): (WebInspector.StylePropertyTreeElement.prototype): 2012-03-23 Kentaro Hara Unreviewed, rebaselined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodWithCallbackArgCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback): (WebCore::TestObjInternal::overloadedMethod5Callback): (WebCore::TestObjInternal::overloadedMethodCallback): 2012-03-23 Ryosuke Niwa cssText should use StringBuilder https://bugs.webkit.org/show_bug.cgi?id=82028 Reviewed by Hajime Morita. Make StylePropertySet::asText more efficient by deploying StringBuilder; avoids heap churn by String::operator+ and String::operator+=. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-03-23 Ryosuke Niwa REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms https://bugs.webkit.org/show_bug.cgi?id=82035 Rollout r111754 since it caused a test to fail and the test added by the patch is failing on Mac WebKit 2. * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): (WebCore): (WebCore::HTMLPlugInElement::removedFromDocument): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-23 Adam Barth Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2) https://bugs.webkit.org/show_bug.cgi?id=82026 Reviewed by Kentaro Hara. This patch removes DOMWindow::resetNotifications, which was unneeded special-case logic for clearing the notifications center. The previous patch that tried to accomplish the same thing did not override willDetachPage, which is why it caused crashes. There's actually a cleaner way to handle these cases, which will let us implement reconnectFrame, but that will need to wait for the next patch. * notifications/DOMWindowNotifications.cpp: (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore): (WebCore::DOMWindowNotifications::disconnectFrame): (WebCore::DOMWindowNotifications::willDetachPage): (WebCore::DOMWindowNotifications::reset): * notifications/DOMWindowNotifications.h: (DOMWindowNotifications): * page/DOMWindow.cpp: (WebCore::DOMWindow::willDetachPage): (WebCore::DOMWindow::disconnectDOMWindowProperties): (WebCore::DOMWindow::clearDOMWindowProperties): * page/DOMWindow.h: (DOMWindow): * page/Frame.cpp: (WebCore::Frame::willDetachPage): 2012-03-22 Adam Barth Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1) https://bugs.webkit.org/show_bug.cgi?id=82015 Reviewed by Kentaro Hara. This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to DOMWindowNotificiations.idl in preparation for moving notificiations into Modules. A future patch will remove DOMWindow::resetNotificaitions in favor of more general mechanisms. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * notifications/DOMWindowNotifications.cpp: Added. (WebCore): (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::~DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore::DOMWindowNotifications::reset): (WebCore::DOMWindowNotifications::supplementName): * notifications/DOMWindowNotifications.h: Added. (WebCore): (DOMWindowNotifications): * notifications/DOMWindowNotifications.idl: Added. * page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): (WebCore): (WebCore::DOMWindow::resetNotifications): * page/DOMWindow.h: (WebCore): (DOMWindow): * page/DOMWindow.idl: 2012-03-22 Li Yin A client MUST close a connection if it detects a masked frame https://bugs.webkit.org/show_bug.cgi?id=81361 Reviewed by Kent Tamura. A server must not mask any frames that it sends to the client. Change the test case, not mask the frames from server to client. Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): 2012-03-22 Li Yin [WebSocket]The minimal number of bytes MUST be used to encode the length https://bugs.webkit.org/show_bug.cgi?id=81443 Reviewed by Kent Tamura. From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2 the minimal number of bytes MUST be used to encode the length New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::parseFrame): 2012-03-22 Adam Barth Unreviewed. Sort xcodeproj file. * WebCore.xcodeproj/project.pbxproj: 2012-03-22 Mao Yujie Implement strict testing criterion for callback function definition https://bugs.webkit.org/show_bug.cgi?id=80005 Reviewed by Adam Barth. Callback function should be defined as the function type instead of the object type. LayoutTest: fast/dom/MediaStream/argument-types.html * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheckExpression): (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheckExpression): (GenerateParametersCheck): 2012-03-22 Gyuyoung Kim Convert hasGrammarMarker to use Internals interface https://bugs.webkit.org/show_bug.cgi?id=82004 Reviewed by Ryosuke Niwa. Remove hasGrammarMarker functions, because it is able to work in the cross-port way through the Internals interface. No new tests, since we are improving here the infra-structure for testing a specific method. * testing/Internals.cpp: (WebCore::Internals::hasGrammarMarker): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-22 Xingnan Wang Add exception for the setter of "fftSize" in RealtimeAnalyserNode https://bugs.webkit.org/show_bug.cgi?id=81748 Reviewed by Chris Rogers. * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/RealtimeAnalyser.h: (RealtimeAnalyser): * Modules/webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::setFftSize): (WebCore): * Modules/webaudio/RealtimeAnalyserNode.h: (RealtimeAnalyserNode): * Modules/webaudio/RealtimeAnalyserNode.idl: 2012-03-22 Leo Yang [BlackBerry] Add HistoryItemViewState for BlackBerry port https://bugs.webkit.org/show_bug.cgi?id=81867 Reviewed by Rob Buis. HistoryItemViewState is the blackberry specific field of HistoryItem. It's used to maintain the porting specific view state. No new test because the port can't be built yet. * history/HistoryItem.h: (HistoryItem): (WebCore::HistoryItem::viewState): 2012-03-22 SravanKumar Sandela Fieldset unexpectedly stretches to minimum intrinsic width https://bugs.webkit.org/show_bug.cgi?id=79128 Reviewed by Julien Chaffraix. Fieldset element width will now check if css width is specified explicitly before stretching to minimum intrinsic width. The reference can be taken from IE9, instead of FF(FF acknowledged the broken behavior). Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html fast/forms/fieldset-width-nostretch-ifspecified.html * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth): (WebCore): * rendering/RenderFieldset.h: (RenderFieldset): 2012-03-22 Shawn Singh [chromium] Target surface should be damaged for a new layers even when layer had no changes https://bugs.webkit.org/show_bug.cgi?id=81879 Reviewed by Adrienne Walker. Unit test added to CCDamageTrackerTest. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a boolean arg to detect if the layer is new on this update. (WebCore::CCDamageTracker::extendDamageForLayer): added logic that damages the target surface if the layer is new. (WebCore::CCDamageTracker::extendDamageForRenderSurface): added logic that damages the target surface if the descendant surface is new; similar logic for the surface's replica if the replica is new. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): 2012-03-22 Charles Wei [BlackBerry] Need to store the meta info of a page in the ViewState of the history https://bugs.webkit.org/show_bug.cgi?id=82000 Reviewed by Rob Buis. Internally reviewed by George Staikos. No new tests, BlackBerry porting doesn't build yet upstreaming. * history/blackberry/HistoryItemViewState.h: (WebCore::HistoryItemViewState::HistoryItemViewState): (HistoryItemViewState): 2012-03-22 Adam Klein [v8] wrapSlow methods should ref underlying object before creating wrapper https://bugs.webkit.org/show_bug.cgi?id=81919 Reviewed by Adam Barth. Because instatiating the wrapper can trigger GC, it's important that wrapSlow() hold a reference to an object when creating a wrapper for that object. Once the V8 wrapper exists and is associated with the object, the reference can be handed off (via leakRef) to be handled by the normal binding code logic (where derefObject is called if the handle is GCed). Binding tests have been updated to reflect this change. Testing the change directly is hard. Any test landed today would only be a valid test until V8's logic about when to GC changes, at which point it would become dead weight. So I don't think it's worth landing a layout test along with this. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects. (GenerateToV8Converters): Get rid of the explicit call to ref() and instead call leakRef() when adding a RefCounted object to the DOM map. (GetPassRefPtrType): Helper to generate "PassRefPtr", or "PassRefPtr >" as appropriate. * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): 2012-03-22 Jonathan Dong [BlackBerry] add interface clearCredentials() and clearNeverRememberSites() https://bugs.webkit.org/show_bug.cgi?id=81887 Reviewed by Rob Buis. Fixed SQL issue when clearing table logins and table never_remember. No new tests. * platform/network/blackberry/CredentialBackingStore.cpp: (WebCore::CredentialBackingStore::clearLogins): (WebCore::CredentialBackingStore::clearNeverRemember): 2012-03-22 Jonathan Dong [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. Modified the interface function authenticationChallenge() in class PageClientBlackBerry, moved Credential from return value to the function's reference parameter, and returned a bool to indicate if user pressed Ok button or not. Removed the logic which checks m_currentWebChallenge not null, because we should challenge user again if the last provided credential is not valid; also added the logic that will popup challenge dialog again immediately if user press Ok buttton directly without inputting anything. No new tests. * platform/blackberry/PageClientBlackBerry.h: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleAuthHeader): (WebCore::NetworkJob::sendRequestWithCredentials): 2012-03-22 Jason Liu [BlackBerry] Synchronize platform/network/blackberry https://bugs.webkit.org/show_bug.cgi?id=81874 We changed a lot in these files locally. But the changes are not upstreamed. It is not convenient to do the other upstreaming work based on these differences. So upstream these changes. Reviewed by Rob Buis. No new tests. Just synchronize codes. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::initialize): (WebCore::NetworkJob::handleNotifyHeaderReceived): (WebCore::NetworkJob::handleNotifyDataReceived): (WebCore::NetworkJob::sendResponseIfNeeded): (WebCore::NetworkJob::sendRequestWithCredentials): (WebCore::NetworkJob::handleAbout): * platform/network/blackberry/NetworkJob.h: (WebCore::NetworkJob::isError): (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): * platform/network/blackberry/ResourceRequest.h: (WebCore::ResourceRequest::ResourceRequest): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::platformTargetTypeForRequest): 2012-03-22 Tom Sepez XSS Auditor bypass via script tag src=data:, URLS. https://bugs.webkit.org/show_bug.cgi?id=81948 Reviewed by Adam Barth. This change fixes an XSSAuditor bypass wherby a script with a data: URL src attribute could evade detection by using characters from the page to create a snippet for matching not found in the URL's reflected vector. This change terminates the snippet for matching earlier in these cases. Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::decodedSnippetForAttribute): 2012-03-22 Dana Jansens [chromium] Incorrect assert on animating opacity for a surface https://bugs.webkit.org/show_bug.cgi?id=81994 Reviewed by Adrienne Walker. Draw opacity and animation state match on the surface itself. A surface with animating opacity always has an owning layer without animation, as the surface does the animation for it. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): 2012-03-22 Dana Jansens [chromium] Skip frames when checkerboarding an animation https://bugs.webkit.org/show_bug.cgi?id=81716 Reviewed by Adrienne Walker. This will stop drawing frames when prepareToDraw fails, if the draw is not forced. The expected behaviour is outlined below by the unit tests. When a draw fails, we: 1. Set m_needsRedraw to try again next vsync 2. Set m_needsCommit because we need more data from webkit to succeed 3. Set m_drawIfPossibleFailed. This allows us to try draw again within the same vsync *if* a commit finishes during this time. Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw CCSchedulerTest.RequestCommitInsideFailedDraw CCSchedulerTest.NoBeginFrameWhenDrawFails CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::processScheduledActions): * platform/graphics/chromium/cc/CCScheduler.h: (CCSchedulerClient): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::nextAction): (WebCore::CCSchedulerStateMachine::updateState): (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (CCSchedulerStateMachine): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-03-22 W. James MacLean [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created. https://bugs.webkit.org/show_bug.cgi?id=81968 Reviewed by Adrienne Walker. Added unit test to existing tests for TreeSynchronizer. When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as the new CCLayerImpl will default to an empty region. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::nonFastScrollableRegion): (WebCore::LayerChromium::setNonFastScrollableRegionChanged): * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl): 2012-03-22 Raphael Kubo da Costa [CMake] Unreviewed build fix after r111778. * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with ${WTF_DIR}/wtf ones. 2012-03-22 Tony Chang Unreviewed, fix chromium build after wtf move. Only use newwtf, remove references to wtf. * WebCore.gyp/WebCore.gyp: 2012-03-22 Benjamin Poulain Remove an obsolete comment regarding magic frames from Geolocation https://bugs.webkit.org/show_bug.cgi?id=81871 Reviewed by Alexey Proskuryakov. Moving a frame into another document is no longer possible after r111361. The comment is now irrelevant. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::stop): 2012-03-22 Csaba Osztrogonác Actually move WTF files to their new home https://bugs.webkit.org/show_bug.cgi?id=81844 [Qt] Unreviewed buildfix after r111778. * Target.pri: 2012-03-22 Kentaro Hara run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl https://bugs.webkit.org/show_bug.cgi?id=81852 Reviewed by Adam Barth. run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl: Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743. Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119. Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969. Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972. Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367. Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368. ... This is because [Constructor(...)] does not yet support [Optional] arguments. It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments: https://trac.webkit.org/wiki/WebKitIDL#Constructor This patch replaces [Optional] with [Optional=DefaultIsUndefined] in TestSerializedScriptValueInterface.idl. Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-03-22 Michal Mocny [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer. https://bugs.webkit.org/show_bug.cgi?id=81823 Reviewed by Adrienne Walker. New UnitTests: LayerRendererChromiumTest * platform/graphics/chromium/LayerRendererChromium.cpp: (LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::discardFramebuffer): (WebCore::LayerRendererChromium::ensureFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromiumClient): (LayerRendererChromium): (WebCore::LayerRendererChromium::isFramebufferDiscarded): (ScopedEnsureFramebufferAllocation): (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation): (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::LayerRendererCapabilities::LayerRendererCapabilities): (LayerRendererCapabilities): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::compositeAndReadback): 2012-03-22 Adam Barth ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns https://bugs.webkit.org/show_bug.cgi?id=80570 Reviewed by Ryosuke Niwa. These functions use weak iteration patterns, but as far as I can tell, we never execute script below these functions. This patch adds ASSERTs to help us avoid adding events in the future. * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertedIntoTree): (WebCore::ContainerNode::removedFromTree): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): - There's a somewhat complex call chain from insertedIntoTree into HTMLMediaElement, and somewhat complex control flow below loadInternal that eventually leads to the BeforeLoad event being fired. In studying this code, I don't see a way for the BeforeLoad event to be fired during insertedIntoTree, but I've added this assert here to make sure we don't call loadInternal when we're not supposed to dispatch events. This ASSERT should help us catch these BeforeLoad errors more quickly. 2012-03-22 Raphael Kubo da Costa Crash in fast/dom/navigator-detached-nocrash.html https://bugs.webkit.org/show_bug.cgi?id=81773 Reviewed by Adam Barth. BatteryManager::create() blindly assumes the Navigator* it receives has a valid Frame, which is not always the case, as made evident by the crashing test. Follow abarth's suggestion and just stop NavigatorBattery::webkitBattery() before it reaches the call to BatteryManager::create() if that's the case. No new tests, covered by fast/dom/navigator-detached-nocrash.html. * Modules/battery/NavigatorBattery.cpp: (WebCore::NavigatorBattery::webkitBattery): 2012-03-22 Emil A Eklund Unreviewed, add missing include statement for CSSValueList.h. * css/CSSStyleSelector.h: 2012-03-22 Tony Chang flexbox flexing implementation should match the spec https://bugs.webkit.org/show_bug.cgi?id=70796 Reviewed by Ojan Vafai. Match the algorithm in the spec. Handling min/max constraints are slightly improved. http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths New test cases in css3/flexbox/flex-algorithm-min-max.html. * rendering/RenderFlexibleBox.cpp: (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths. (WebCore): (WebCore::RenderFlexibleBox::Violation::Violation): (RenderFlexibleBox::Violation): (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6. (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderFlexibleBox.h: 2012-03-22 Emil A Eklund Unreviewed, add missing import. * rendering/RenderThemeMac.mm: 2012-03-22 Anders Carlsson ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/ https://bugs.webkit.org/show_bug.cgi?id=81953 Reviewed by Sam Weinig. If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then we'll end up calling into painting code before all the layers have been flushed. Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::LayerClient::platformCALayerDidCreateTiles): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/PlatformCALayerClient.h: (PlatformCALayerClient): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setScale): (WebCore::TileCache::revalidateTiles): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles): 2012-03-19 Robert Hogan Text should overflow when list item height set to 0 https://bugs.webkit.org/show_bug.cgi?id=78726 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/height-applies-to-010a-expected.html fast/css/heightless-list-item-expected.html fast/css/heightless-list-item.html * rendering/RenderListItem.cpp: (WebCore::RenderListItem::paint): If the list item has height:0, only paint it if the list item allows any block or inline content to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and this seems to be the only case where there's something to do. 2012-03-22 Dave Michael HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel. Make HTMLPluginElement release its m_NPObject in detach() to break a reference-counting cycle that happens on reload or navigation. With this change, HTMLPlugInElement::removedFromDocument is unnecessary, so it was removed. Note that Releasing m_NPObject does not result in a call to the plugin; it simply releases a reference count on the wrapper object for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked when the render tree is destroyed, when PluginView calls PluginPackage::unload.) Thus, it is safe to release m_NPObject in detach, because it can not result in layout or style changes. Also added numberOfLiveNodes() and numberOfLiveDocuments() to window.internals to enable testing. Test: plugins/netscape-dom-access-and-reload.html * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: (WebCore::Internals::numberOfLiveDocuments): (WebCore::Internals::numberOfLiveNodes): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-22 Shawn Singh [chromium] Make CCDamageTracker robust to empty layer lists https://bugs.webkit.org/show_bug.cgi?id=81831 Reviewed by Adrienne Walker. Added a unit test in CCDamageTrackerTest that causes a crash in the old code. With this patch applied, the crash will not occur. In theory, that crash should never occur anyway, unless there is a bug outside the damage tracker, but for robustness it's appropriate to handle it properly. In addition to this fix, performed some trivial maintenance on the damage tracker code. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::updateDamageTrackingState): removed unclean code that accessed the targetSurface to get necessary information. Instead, we now pass those args through the damage tracker's API. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): modified args passed to damage tracker on update. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): modified args passed to damage tracker on update. 2012-03-22 Julien Chaffraix Enable style sharing for elements with a style attribute https://bugs.webkit.org/show_bug.cgi?id=81523 Reviewed by Antti Koivisto. Memory improvement change only. Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing). Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks: - HTML5 isn't impacted as it doesn't use much inline style - page cyclers' intl1 showed a 6% increase in style sharing. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): This method now handles inline style like presentation attributes on the element. (WebCore::CSSStyleSelector::collectMatchingRulesForList): (WebCore::CSSStyleSelector::locateSharedStyle): Don't bail out for an element with an inline style declaration. (WebCore::CSSStyleSelector::stylesEqual): Generalized attributeStylesEqual to share the logic between attribute and inline style property set. This means that attribute checks are actually doing a little extra more work but that didn't impact our benchmarks. 2012-03-22 Kevin Ollivier [wx] Unreviewed. WebDOM build fix after array type changes. * bindings/scripts/CodeGeneratorCPP.pm: (ShouldSkipType): 2012-03-22 Pavel Feldman Web Inspector: text gutter decorations should move upon edits. https://bugs.webkit.org/show_bug.cgi?id=81932 Reviewed by Vsevolod Vlasov. Decorations set by the line number now shift as editing inserts / removes lines. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._syncLineHeight): (WebInspector.TextEditorGutterPanel): (WebInspector.TextEditorGutterPanel.prototype.textChanged): (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight): (WebInspector.TextEditorGutterPanel.prototype.addDecoration): (WebInspector.TextEditorGutterPanel.prototype.removeDecoration): 2012-03-21 Robert Hogan CSS 2.1 failure: fixed-table-layout-006 fails https://bugs.webkit.org/show_bug.cgi?id=78412 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/fixed-table-layout-006.htm fast/css/fixed-table-layout-cell-padding.htm In fixed tables, positive width specified on a column should include borders and padding. See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column. Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate. 2012-03-22 Simon Fraser Factor compositing layer updates after scroll into a new method https://bugs.webkit.org/show_bug.cgi?id=81943 Reviewed by Dean Jackson. Move some code that updates compositing layers after scrolling into its own method, for cleanliness. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): (WebCore::RenderLayer::updateCompositingLayersAfterScroll): (WebCore): * rendering/RenderLayer.h: (RenderLayer): 2012-03-22 Gavin Barraclough Add JSValue::isFunction https://bugs.webkit.org/show_bug.cgi?id=81935 Reviewed by Geoff Garen. This would be useful in the WebCore bindings code. Also, remove asFunction, replace with jsCast. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::functionDetails): * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-03-22 Jocelyn Turcotte TiledBackingStore: Fix test regressions that appeared with r111560. https://bugs.webkit.org/show_bug.cgi?id=81519 Reviewed by Kenneth Rohde Christiansen. The visible rect wasn't intersected with the contents rect anymore which could lead to an astronomical layer size to check for intersecting tiles. Add a visibleContentsRect that doesn't do the conversion and use it in visibleAreaIsCovered. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::visibleContentsRect): (WebCore): (WebCore::TiledBackingStore::visibleRect): (WebCore::TiledBackingStore::visibleAreaIsCovered): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): 2012-03-22 Joe Thomas Make Length Calculation functions non-inline https://bugs.webkit.org/show_bug.cgi?id=81733 Currently length calculation functions in LengthFunctions.h are inline. These functions are pretty big to be inline. And these functions are expected to grow again when new length units will be introduced in bug 27160. A decent rule of thumb is to not inline a function if it is more than 10 lines long. Also it's typically not cost effective to inline functions with loops or switch statements. (Reference: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inline_Functions). Ran PerformanceTests/Parser/html5-full-render.html on Mac Snow-Leopard with and without the patch and did not see much performance difference. Reviewed by Antti Koivisto. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/LengthFunctions.cpp: Added. (WebCore): (WebCore::miminumValueForLength): (WebCore::valueForLength): (WebCore::floatValueForLength): * css/LengthFunctions.h: (WebCore): 2012-03-22 Alexis Menard Increase code sharing between CSSParser and CSSPropertyLonghand. https://bugs.webkit.org/show_bug.cgi?id=81587 Reviewed by Antti Koivisto. Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and make CSSParser use them. It will make the declaration of longhands in one place only. Remove the map of CSSPropertyLonghand and replace it by a regular switch/case. The map doesn't bring much here and it's cleaner and faster to use the switch. It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html. No new tests : no behavior change. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::parseShorthand): Modify the prototype of this function to directly use the CSSPropertyLonghand. * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSPropertyLonghand.cpp: (WebCore): (WebCore::backgroundLonghand): (WebCore::backgroundPositionLonghand): (WebCore::backgroundRepeatLonghand): (WebCore::borderLonghand): (WebCore::borderBottomLonghand): (WebCore::borderColorLonghand): (WebCore::borderImageLonghand): (WebCore::borderLeftLonghand): (WebCore::borderRadiusLonghand): (WebCore::borderRightLonghand): (WebCore::borderSpacingLonghand): (WebCore::borderStyleLonghand): (WebCore::borderTopLonghand): (WebCore::borderWidthLonghand): (WebCore::listStyleLonghand): (WebCore::fontLonghand): (WebCore::marginLonghand): (WebCore::outlineLonghand): (WebCore::overflowLonghand): (WebCore::paddingLonghand): (WebCore::webkitAnimationLonghand): (WebCore::webkitBorderAfterLonghand): (WebCore::webkitBorderBeforeLonghand): (WebCore::webkitBorderEndLonghand): (WebCore::webkitBorderStartLonghand): (WebCore::webkitColumnsLonghand): (WebCore::webkitColumnRuleLonghand): (WebCore::webkitFlexFlowLonghand): (WebCore::webkitMarginCollapseLonghand): (WebCore::webkitMarqueeLonghand): (WebCore::webkitMaskLonghand): (WebCore::webkitMaskPositionLonghand): (WebCore::webkitMaskRepeatLonghand): (WebCore::webkitTextEmphasisLonghand): (WebCore::webkitTextStrokeLonghand): (WebCore::webkitTransitionLonghand): (WebCore::webkitTransformOriginLonghand): (WebCore::webkitWrapLonghand): (WebCore::longhandForProperty): * css/CSSPropertyLonghand.h: (WebCore): 2012-03-22 Emil A Eklund Unreviewed, touching file to force bots to pick up CSS_SHADERS flag change. * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-03-22 Xingnan Wang ReverbConvolver::latencyFrames() should return 0. https://bugs.webkit.org/show_bug.cgi?id=81806 Reviewed by Chris Rogers. * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::latencyFrames): 2012-03-22 Tony Chang refactor flexbox in preparation for flex-line-pack https://bugs.webkit.org/show_bug.cgi?id=81843 Reviewed by Ojan Vafai. Replace WrapReverseContext with a vector of LineContexts that contain the same information, plus values needed for flex-align. alignChildren has been moved to after all the lines have been positioned. We want to align children after flex-line-pack has changed the size of each line to avoid unnecessary layouts. Take 2: Remove the assert. If there are no children, then there are no flex lines. Instead, assert that child is not null. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct, holds information needed for wrap-reverse and aligning children. (RenderFlexibleBox::LineContext): (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time. (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext * rendering/RenderFlexibleBox.h: 2012-03-22 Allan Sandfeld Jensen Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent https://bugs.webkit.org/show_bug.cgi?id=46743 Reviewed by Julien Chaffraix Based on original patch by Anton D'Auria In preparation for platform-specific queuing of XMLHttpRequest events, this patch changes all calls to m_target->dispatchEvent to XMLHttpRequestProgressEventThrottle::dispatchEvent. Currently, we queue only one progress event on suspend() if we have throttled progress events. We should be able to queue all XHR events that can be generated after suspend(), if the platform network layer continues to receive data. XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only download events, so this doesn't change behavior of upload events, which aren't throttled or queued. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent): (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent): (WebCore::XMLHttpRequestProgressEventThrottle::fired): * xml/XMLHttpRequestProgressEventThrottle.h: (XMLHttpRequestProgressEventThrottle): 2012-03-22 Sudarsana Nagineni [EFL] Map BackSpace key code to Unicode value https://bugs.webkit.org/show_bug.cgi?id=81130 Reviewed by Gustavo Noronha Silva. Test: fast/events/backspace-navigates-back.html * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createKeyMap): Map BackSpace to Unicode value 2012-03-22 Abhishek Arya Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren. https://bugs.webkit.org/show_bug.cgi?id=80297 Reviewed by Julien Chaffraix. beforeChild might share the same anonymous block parent with other previous siblings. Before moving the children across ruby bases, we need to make sure to split the tree across the beforeChild correctly. Test: fast/ruby/ruby-text-before-child-split.html * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveChildren): 2012-03-22 Kristóf Kosztyó [Qt] Fix Qt minimal build after r111692 Reviewed by Csaba Osztrogonác. * bindings/js/JSScriptProfileNodeCustom.cpp: 2012-03-22 Adrienne Walker [chromium] Fix scrollbar layers holding onto invalid textures after lost context https://bugs.webkit.org/show_bug.cgi?id=81841 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::willDraw): 2012-03-22 Philippe Normand [GTK] ASSERT bug in WebAudio (AudioFileReader) https://bugs.webkit.org/show_bug.cgi?id=81777 Reviewed by Martin Robinson. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal the GstBus floating reference. (WebCore::AudioFileReader::createBus): Ditto. 2012-03-22 Ilya Tikhonovsky Unreviewed: Web Inspector: fix syntax error in text. * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker.prototype._messageReceived): 2012-03-22 Sheriff Bot Unreviewed, rolling out r111688. http://trac.webkit.org/changeset/111688 https://bugs.webkit.org/show_bug.cgi?id=81912 "Heap profiler test fails" (Requested by yurys on #webkit). * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildRetainers): 2012-03-22 Dana Jansens [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame https://bugs.webkit.org/show_bug.cgi?id=81437 Reviewed by Adrienne Walker. Split CCLayerTreeHostImpl::drawLayers() into two phases: prepareToDraw() and drawLayers(). When calculating a RenderPass, and we checkerboard a quad on a layer, bubble this info back up to CCLayerTreeHostImpl. If the layer is transforming in an animation, then abort the prepareToDraw() phase and cause it to return false back to the thread proxy. Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (FrameData): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * 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/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * 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-03-22 Levi Weintraub Correct LayoutUnit usage in Accessibility code https://bugs.webkit.org/show_bug.cgi?id=81789 Reviewed by Eric Seidel. Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly expose them to the embedder. No new tests. No change in behavior. * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above. * accessibility/AccessibilityListBox.h: (AccessibilityListBox): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu, which is always done with integer coordinates. (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We don't pixel snap floats, so we return an integer bounding box. (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above. (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying up the code to position it at (0,0). * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::accessibilityHitTest): See above. (AccessibilityObject): (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from screen coordinates and originates in embedder code. Reverting it to take an integer. (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above. (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above. * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::accessibilityHitTest): See above. * accessibility/AccessibilityScrollView.h: (AccessibilityScrollView): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above. * accessibility/AccessibilitySlider.h: (AccessibilitySlider): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end https://bugs.webkit.org/show_bug.cgi?id=81804 Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception. At this momemnt we have no way to see the error in the front-end. Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console. (WebInspector.HeapSnapshotWorker.prototype._messageReceived): * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side. (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage): 2012-03-22 Carlos Garcia Campos [GTK] Use the angle-bracket form to include wtf headers https://bugs.webkit.org/show_bug.cgi?id=81884 Reviewed by Eric Seidel. Use #include instead of #include "foo". * platform/graphics/freetype/FontPlatformData.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/gtk/DataObjectGtk.h: * platform/network/ResourceHandleInternal.h: * platform/network/soup/SocketStreamHandleSoup.cpp: 2012-03-22 Alexander Pavlov Web Inspector: Case of the elements of the xml document should be shown as it is in the console https://bugs.webkit.org/show_bug.cgi?id=81902 When registering a detached root, DOMAgent always presumes it is a node, while it can also be a document. Reviewed by Vsevolod Vlasov. Test: inspector/console/console-xml-document.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._setDetachedRoot): 2012-03-22 Vsevolod Vlasov Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping. https://bugs.webkit.org/show_bug.cgi?id=81904 Reviewed by Pavel Feldman. This is another step on the way to cleaner BreakpointManager logic. Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event. This allows us to handle script-uiSourceCode binding separately from uiSourceCode creation/deletion and to handle unbinding that was not possible at all before. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap): (WebInspector.CompilerScriptMapping.prototype.addScript.get this): (WebInspector.CompilerScriptMapping.prototype.addScript): (WebInspector.CompilerScriptMapping.prototype.reset): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): * inspector/front-end/ScriptMapping.js: (WebInspector.MainScriptMapping): (WebInspector.MainScriptMapping.prototype._updateLiveLocation): (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged): (WebInspector.MainScriptMapping.prototype._handleScriptBound): (WebInspector.MainScriptMapping.prototype._handleScriptUnbound): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype.addScript.get this): (WebInspector.SnippetsScriptMapping.prototype._snippetAdded): (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this): (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved): (WebInspector.SnippetsScriptMapping.prototype.reset): 2012-03-22 Vineet Chaudhary https://bugs.webkit.org/show_bug.cgi?id=81893 Remove custom bindings form ScriptProfileNode.idl of attribute type Array. Reviewed by Kentaro Hara. Replace [CustomGetter] Array with sequence. To remove the custom bindings code. Test: No new tests. LayoutTests/fast/profiler/* test are enough for this. * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function. (WebCore::JSScriptProfileNode::callUID): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function. (WebCore): * inspector/ScriptProfileNode.idl: Replaced Array with sequence. 2012-03-22 Andrey Kosyakov Web Inspector: only update timeline overview categories strips when these are visible https://bugs.webkit.org/show_bug.cgi?id=81903 Reviewed by Pavel Feldman. - factor out category strips update into a separate method; - only invoke it when "Timeline" overview mode is selected. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._showTimelines): (WebInspector.TimelineOverviewPane.prototype.update): (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips): 2012-03-22 Levi Weintraub Update LayoutUnit usage in FrameSelection https://bugs.webkit.org/show_bug.cgi?id=81754 Reviewed by Eric Seidel. FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision will still be used when these coordinates are passed down and used locally. No new tests. No change in behavior. * editing/FrameSelection.cpp: (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints. (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection modification. Sub-pixel precision will be used when these values are converted to local ones. (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints. (WebCore::FrameSelection::absoluteCaretBounds): Ditto. (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates. Reverting the values to ints. (WebCore::FrameSelection::recomputeCaretRect): Ditto. * editing/FrameSelection.h: (FrameSelection): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute coordinates as integers. 2012-03-22 Alexei Filippov Web Inspector: Speed up the build retainers phase. https://bugs.webkit.org/show_bug.cgi?id=81763 Replacing the edge iterator with a raw loop makes it faster by more than 10 times. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildRetainers): 2012-03-22 No'am Rosenthal [Qt][WK2] The background appears to have one extra pixel from the contents https://bugs.webkit.org/show_bug.cgi?id=81830 Reviewed by Kenneth Rohde Christiansen. TextureMapperGL applied a 1-offset that was covering for another bug, which was already fixed. No new tests, this would be tested once we test GL rendering results. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGLData::SharedGLData::scissorClip): 2012-03-22 W. James MacLean Rename touchpad fling curve, add curve parameters to constructor. https://bugs.webkit.org/show_bug.cgi?id=81820 Reviewed by Adrienne Walker. Covered by existing unit tests. * GNUmakefile.list.am: * WebCore.gypi: * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::fireUpAnAnimation): * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp. (WebCore): (WebCore::TouchpadFlingPlatformGestureCurve::create): (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve): (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve): (WebCore::TouchpadFlingPlatformGestureCurve::apply): * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h. (WebCore): (TouchpadFlingPlatformGestureCurve): 2012-03-22 Pavel Feldman Web Inspector: make CSS and JavaScript files editable by default. https://bugs.webkit.org/show_bug.cgi?id=81787 Reviewed by Vsevolod Vlasov. This change removes cancelEditing and setReadOnly capabilities from source frame. It removes dblclick handler as well since one does not need to enter editing mode. It also establishes proper content dispatching so that views are updated with the resource content. All these are inter-dependent, need to be landed simultaneously. Drive-by follow up to the r111675 where range is modified prior to the exiting edit mode. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.requestContent): (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.didEditContent): (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): (WebInspector.ResourceSourceFrame.prototype.suggestedFileName): (WebInspector.ResourceSourceFrame.prototype._contentChanged): (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper): (WebInspector.EditableResourceSourceFrame.prototype.editContent): (WebInspector.EditableResourceSourceFrame.prototype._contentChanged): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._innerShowView): (WebInspector.FrameResourceTreeElement.prototype._appendRevision): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype.didEditContent): (WebInspector.SourceFrame.prototype.editContent): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._startEditing): (WebInspector.TextPrompt.prototype._stopEditing): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): (WebInspector.TextViewer.prototype._registerShortcuts): (WebInspector.TextEditorMainPanel.prototype.handleEnterKey): 2012-03-22 Allan Sandfeld Jensen [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated. https://bugs.webkit.org/show_bug.cgi?id=81889 Reviewed by Kenneth Rohde Christiansen. On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated. * rendering/RenderObject.cpp: (WebCore::RenderObject::styleWillChange): 2012-03-22 Pavel Feldman Web Inspector: dispatch styleSheetChanged event synchronously. https://bugs.webkit.org/show_bug.cgi?id=81892 Reviewed by Vsevolod Vlasov. Today, backend generates stylesheet change event synchronously from within set* command. But CSSStyleModel defers its dispatching until the stylesheet content is available. This prevents us from ignoring update events from within commands that initiated those updates. This change makes stylesheet change event dispatch synchronously and delegates stylesheet content fetching to the event client. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged): (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent): (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged): (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): 2012-03-21 Ian Vollick [chromium] timing functions are getting incorrectly applied for accelerated css transitions https://bugs.webkit.org/show_bug.cgi?id=81692 Reviewed by Adrienne Walker. Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: 2012-03-22 Pavel Feldman Web Inspector: allow on-hover popover while in edit mode. https://bugs.webkit.org/show_bug.cgi?id=81898 Reviewed by Vsevolod Vlasov. This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself). * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ElementsPanel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover): (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown): * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): * inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype.isPopoverVisible): * inspector/front-end/TimelinePanel.js: 2012-03-22 Pavel Feldman Web Inspector: breakpoints should shift when line break is inserted in the middle of the line. https://bugs.webkit.org/show_bug.cgi?id=81896 Reviewed by Vsevolod Vlasov. There is a bug that collapses selection prior to exiting change mode, we should never collapse edit area prior committing. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): (WebInspector.TextEditorMainPanel.prototype.highlightLine): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo): 2012-03-22 Zoltan Herczeg Merge SVGImageBufferTools to SVGRenderingContext https://bugs.webkit.org/show_bug.cgi?id=81890 Reviewed by Nikolas Zimmermann. Copy the code to SVGRenderingContext and delete SVGImageBufferTools[.cpp.h]. Update build systems, no functionality change. This is the first step towards making SVGImageBufferTools stageful. Existing tests cover this issue. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * rendering/svg/RenderSVGAllInOne.cpp: * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/SVGImageBufferTools.cpp: Removed. * rendering/svg/SVGImageBufferTools.h: Removed. * rendering/svg/SVGInlineTextBox.cpp: * rendering/svg/SVGRenderingContext.cpp: (WebCore::currentContentTransformation): (WebCore): (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem): (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::createImageBufferForPattern): (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): (WebCore::SVGRenderingContext::clipToImageBuffer): (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): (WebCore::SVGRenderingContext::clampedAbsoluteSize): (WebCore::SVGRenderingContext::clear2DRotation): * rendering/svg/SVGRenderingContext.h: (SVGRenderingContext): (WebCore::SVGRenderingContext::calculateImageBufferRect): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): 2012-03-22 Hyowon Kim [EFL] Add PageClientEfl to WebCoreSupport. https://bugs.webkit.org/show_bug.cgi?id=80748 Reviewed by Noam Rosenthal. * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient. (WebCore): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type. * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::platformGetValue): Use PageClientEfl. 2012-03-22 Kaustubh Atrawalkar blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees https://bugs.webkit.org/show_bug.cgi?id=81102 Reviewed by Hajime Morita. This implementation will support blur for a focused element when its shadowHost's blur() is called. To achieve this Element::blur() function is modified to blur the focused node in it's treeScope. Test: fast/dom/shadow/shadow-root-blur.html * dom/Element.cpp: (WebCore::Element::blur): Modified to blur current treeScope's focused node. * dom/ShadowRoot.h: (WebCore::ShadowRoot::activeElement): Rework for code sharing. * dom/TreeScope.cpp: (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node. * dom/TreeScope.h: (TreeScope): New function declartion. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::activeElement): Rework for code sharing. 2012-03-22 Vsevolod Vlasov Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one. https://bugs.webkit.org/show_bug.cgi?id=81894 RawSourceCode never has more than one uiSourceCode, uiSourceCodeList are just remains of older implementation. This patch switches RawSourceCode and SourceMappings from uiSourceCodeList to uiSourceCode. Reviewed by Pavel Feldman. * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.uiSourceCode): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode): (WebInspector.RawSourceCode.PlainSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode): (WebInspector.RawSourceCode.FormattedSourceMapping): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList): (WebInspector.ResourceScriptMapping.prototype.addScript): (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): (WebInspector.ResourceScriptMapping.prototype.reset): 2012-03-22 Mario Sanchez Prada [GTK] Fix the only remaining coding style issue in GTK accessibility code https://bugs.webkit.org/show_bug.cgi?id=81885 Reviewed by Xan Lopez. Add needed extra line and remove an unneeded one. * accessibility/gtk/AccessibilityObjectAtk.cpp: 2012-03-22 Kent Tamura Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect(). https://bugs.webkit.org/show_bug.cgi?id=81866 Reviewed by Hajime Morita. We need to expand the controlClipRect because the existing shadow tree of a text field can be wrapped by another shadow tree. e.g. A current situation: ┗ ShadowRoot ┗ container element ┌────────────┐'s border box │┌──────────┐│ ││container box ││ │└──────────┘│ └────────────┘ Wrapped by another ShadowRoot: ┗ New ShadowRoot ┣ represents the existing shadow tree ┃ ┗ container element ┗ D: an additional decoration element ┌────────────┐'s border box │┌───────┬──┐│ ││container box │ D ││ │└───────┴──┘│ └────────────┘ In this case, if we clip child renderers by container box, D is not drawn. We should clip by the content box of the . A search field has an exceptional behavior. It can have the container box of which height is taller than the content box height. The controlClipRect should contain both of the container box and the content box in this case. In other cases, the container box is equivalent to the content box. So the code always unites them. No new tests. This won't make any behavior change for now. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect): 2012-03-22 Yoshifumi Inoue [Forms] The option element should not be form associated element. https://bugs.webkit.org/show_bug.cgi?id=79764 Reviewed by Kent Tamura. This patch changes base class of HTMLOptionELement to HTMLElement from HTMLFormControlElement for saving memory space and iteration time of extra "option" elements in HTMLFormElement::m_formAssociatedElements and matching the HTML5 specification for ease of maintenance. This patch changes behavior of handling of CSS pseudo classes "invalid" and "valid". The "option" elements no longer use these CSS pseudo classes as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088 Changes of TextIterator is lead by usage of isFormControlElement. This changes will be replaced with more meaningful predicate as part of https://bugs.webkit.org/show_bug.cgi?id=80381 No new tests but updated select-live-pseudo-selectors.html test. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization. (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed. (WebCore::HTMLOptionElement::attach): Changeid base class. (WebCore::HTMLOptionElement::detach): Changed base class. (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling. (WebCore::HTMLOptionElement::childrenChanged): Changed base class. (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class. * html/HTMLOptionElement.h: (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement. (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled. * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function. 2012-03-21 Pavel Podivilov Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js. https://bugs.webkit.org/show_bug.cgi?id=81780 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript): (WebInspector.SourceMapParserPayload): (WebInspector.SourceMapParser): (WebInspector.SourceMapParser.prototype.load): (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation): (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation): (WebInspector.SourceMapParser.prototype.sources): (WebInspector.SourceMapParser.prototype.loadSourceCode): (WebInspector.SourceMapParser.prototype._findMapping): (WebInspector.SourceMapParser.prototype._parseMappingPayload): (WebInspector.SourceMapParser.prototype._parseSections): (WebInspector.SourceMapParser.prototype._parseMap): (WebInspector.SourceMapParser.prototype._isSeparator): (WebInspector.SourceMapParser.prototype._decodeVLQ): (WebInspector.SourceMapParser.prototype._canonicalizeURL): (WebInspector.SourceMapParser.StringCharIterator): (WebInspector.SourceMapParser.StringCharIterator.prototype.next): (WebInspector.SourceMapParser.StringCharIterator.prototype.peek): (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext): * inspector/front-end/CompilerSourceMapping.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-03-21 Vsevolod Vlasov Web Inspector: IndexedDB transaction is not closed when requesting data. https://bugs.webkit.org/show_bug.cgi?id=81837 Reviewed by Pavel Feldman. * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call. (WebCore): 2012-03-21 Yury Semikhatsky Web Inspector: event listeners section is broken for about:blank page https://bugs.webkit.org/show_bug.cgi?id=81795 Parse about:blank as a valid URL. Reviewed by Pavel Feldman. Test: inspector/elements/event-listeners-about-blank.html * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2012-03-21 Dan Bernstein REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests https://bugs.webkit.org/show_bug.cgi?id=81870 Reverted r111635, the fix for bug 81843. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext): (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset): (RenderFlexibleBox::WrapReverseContext): (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine): (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta): (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::alignChildren): (WebCore::RenderFlexibleBox::flipForWrapReverse): * rendering/RenderFlexibleBox.h: 2012-03-21 Emil A Eklund Unreviewed change touching CustomFilterProgram.h to try to force the chromium-win bots to rebuilt it and pick up on the fact that CSS_SHADERS is not set (since r111610). * platform/graphics/filters/CustomFilterProgram.h: 2012-03-21 Vangelis Kokkevis [chromium] FPS counter causes garbage to be displayed at top left corner https://bugs.webkit.org/show_bug.cgi?id=81851 The HUD expects the PlatformCanvas it paints on to be cleared on creation which is no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 . This patch does an explicit clearRect before the HUD contents are painted. Reviewed by Adrienne Walker. TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): 2012-03-21 Ryosuke Niwa Touch a file to make Chromium Windows bots happy. * css/CSSValueKeywords.in: 2012-03-19 Igor Oliveira Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2) https://bugs.webkit.org/show_bug.cgi?id=38025 Implement updateAnimationTimerForRender. This reduces unnecessary animation steps on the current RenderObject by checking the value of timeToNextService before starting a new timer. Reviewed by Dean Jackson. Test: animations/animation-welcome-safari.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): (WebCore): (WebCore::AnimationController::updateAnimations): * page/animation/AnimationControllerPrivate.h: (AnimationControllerPrivate): 2012-03-21 Sheriff Bot Unreviewed, rolling out r111616. http://trac.webkit.org/changeset/111616 https://bugs.webkit.org/show_bug.cgi?id=81862 broke chromium mac (Requested by eae on #webkit). * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * 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/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * 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-03-21 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=80322 Implement image-set Reviewed by Dean Jackson. This initial implementation of -webkit-image-set. http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html The idea behind the feature is to allow authors to provide multiple variants of the same image at differing resolutions, and to allow the User Agent to choose the resource that is most appropriate at the time. This patch will choose the most appropriate image based on device scale factor. CSSImageSetValue inherits from CSSValueList and behaves a lot like CSSImageValue. * WebCore.xcodeproj/project.pbxproj: * css/CSSImageSetValue.h: Added. (WebCore): (CSSImageSetValue): (WebCore::CSSImageSetValue::create): (WebCore::CSSImageSetValue::isPending): (ImageWithScale): (WebCore::CSSImageSetValue::compareByScaleFactor): * css/CSSImageSetValue.cpp: Added. (WebCore): (WebCore::CSSImageSetValue::CSSImageSetValue): (WebCore::CSSImageSetValue::~CSSImageSetValue): (WebCore::CSSImageSetValue::cachedOrPendingImageSet): (WebCore::CSSImageSetValue::customCssText): fillImageSet() iterates through the value list and turns the information into a sorted Vector of ImageWithScales (which is a struct containing image URLs and scale factors). (WebCore::CSSImageSetValue::fillImageSet): cachedImageSet() finds which image is most appropriate based on the device scale factor, and it loads only that image. In the future, additional scale factors will be taken into account. (WebCore::CSSImageSetValue::bestImageForScaleFactor): (WebCore::CSSImageSetValue::cachedImageSet): parseImageSet() is called everywhere in the CSSParser that a regular image or generated image can be found. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFillImage): (WebCore::CSSParser::parseBorderImage): (WebCore): (WebCore::CSSParser::parseImageSet): * css/CSSParser.h: Since CSSImageSetValue is implemented as a value list, ApplyPropertyFillLayer::applyValue() needs to be more specific when it's looking for a list of multiple URLs. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFillLayer::applyValue): Handle image-set as a valid image value. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): * css/CSSValue.cpp: (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): * css/CSSValue.h: (CSSValue): (WebCore::CSSValue::isImageSetValue): computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::computeIntrinsicDimensions): * loader/cache/CachedImage.h: (CachedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratedImage::computeIntrinsicDimensions): * platform/graphics/Image.cpp: (WebCore::Image::computeIntrinsicDimensions): * platform/graphics/Image.h: (Image): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::computeIntrinsicDimensions): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::computeIntrinsicDimensions): * svg/graphics/SVGImage.h: (SVGImage): Inherits from StyleImage and returns a scaled size for imageSize() and computeIntrinsicDimensions(). * rendering/style/StyleCachedImageSet.cpp: Added. (WebCore): (WebCore::StyleCachedImageSet::StyleCachedImageSet): (WebCore::StyleCachedImageSet::cssValue): (WebCore::StyleCachedImageSet::canRender): (WebCore::StyleCachedImageSet::isLoaded): (WebCore::StyleCachedImageSet::errorOccurred): (WebCore::StyleCachedImageSet::imageSize): (WebCore::StyleCachedImageSet::imageHasRelativeWidth): (WebCore::StyleCachedImageSet::imageHasRelativeHeight): (WebCore::StyleCachedImageSet::computeIntrinsicDimensions): (WebCore::StyleCachedImageSet::usesImageContainerSize): (WebCore::StyleCachedImageSet::setContainerSizeForRenderer): (WebCore::StyleCachedImageSet::addClient): (WebCore::StyleCachedImageSet::removeClient): (WebCore::StyleCachedImageSet::image): * rendering/style/StyleCachedImageSet.h: Added. (WebCore): (StyleCachedImageSet): (WebCore::StyleCachedImageSet::create): (WebCore::StyleCachedImageSet::data): (WebCore::StyleCachedImageSet::cachedImage): Handle image-set. * rendering/style/StyleImage.h: (WebCore::StyleImage::isCachedImageSet): (WebCore::StyleImage::StyleImage): (StyleImage): * rendering/style/StylePendingImage.h: (StylePendingImage): (WebCore::StylePendingImage::cssImageSetValue): 2012-03-21 David Barton MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp https://bugs.webkit.org/show_bug.cgi?id=81850 Reviewed by Eric Seidel. This prepares these files for bug fixes, and eventually combining their common code. To understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's simpler than RenderMathMLRoot.cpp. No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore): (WebCore::RenderMathMLRoot::addChild): (WebCore::RenderMathMLRoot::paint): (WebCore::RenderMathMLRoot::layout): * rendering/mathml/RenderMathMLRoot.h: (WebCore): (RenderMathMLRoot): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore): (WebCore::RenderMathMLSquareRoot::paint): (WebCore::RenderMathMLSquareRoot::layout): * rendering/mathml/RenderMathMLSquareRoot.h: (WebCore): (RenderMathMLSquareRoot): * rendering/mathml/RenderMathMLSubSup.h: (WebCore): 2012-03-21 Tony Chang refactor flexbox in preparation for flex-line-pack https://bugs.webkit.org/show_bug.cgi?id=81843 Reviewed by Ojan Vafai. Replace WrapReverseContext with a vector of LineContexts that contain the same information, plus values needed for flex-align. alignChildren has been moved to after all the lines have been positioned. We want to align children after flex-line-pack has changed the size of each line to avoid unnecessary layouts. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct, holds information needed for wrap-reverse and aligning children. (RenderFlexibleBox::LineContext): (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time. (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext * rendering/RenderFlexibleBox.h: 2012-03-21 Ryosuke Niwa BDI element should have dir=auto by default https://bugs.webkit.org/show_bug.cgi?id=68773 Reviewed by Daniel Bates. Treat bdi elements without dir content attribute as if they have dir=auto per spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element The patch tries to encapsulate the logic to look for dir content attribute and dir=auto. It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi elements can be overridden by dir content attribute, we must change and only change the default value. Tests: fast/text/international/bdi-dir-default-to-auto-expected.html fast/text/international/bdi-dir-default-to-auto.html * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * html/HTMLBDIElement.h: Added. (WebCore): (HTMLBDIElement): (WebCore::HTMLBDIElement::create): (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because bdi elements are treated as if it has dir=auto by default. * html/HTMLElement.cpp: (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or has dir content attribute. (WebCore): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated as if it has dir=auto (bdi or element with dir=auto). (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLElement.h: (HTMLElement): * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding. 2012-03-21 Luke Macpherson Use CSSPrimitiveValue::convertToLength() in a few places. https://bugs.webkit.org/show_bug.cgi?id=81492 Reviewed by Eric Seidel. No new tests - refactoring only. CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated in many places in CSSStyleSelector. This patch removes some of that code duplication. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-21 Patrick Gansterer Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601. * rendering/svg/RenderSVGRoot.cpp: 2012-03-21 Patrick Gansterer Build fix for !ENABLE(INSPECTOR) after r104831. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): 2012-03-21 Xiaomei Ji visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox https://bugs.webkit.org/show_bug.cgi?id=81408 Reviewed by Ryosuke Niwa. Cache logically ordered leaf boxes under a particular root box. Also, move 'Vector string' declared in visualWordPosition() to outside of loop (it is always clear-ed before use). * editing/visible_units.cpp: (CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box. (WebCore::CachedLogicallyOrderedLeafBoxes::size): (WebCore::CachedLogicallyOrderedLeafBoxes::firstBox): (WebCore): (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes): (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox): (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox): (WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes): (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves): (WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around. (WebCore::logicallyNextBox): (WebCore::wordBreakIteratorForMinOffsetBoundary): (WebCore::wordBreakIteratorForMaxOffsetBoundary): (WebCore::visualWordPosition): 2012-03-21 Dana Jansens [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame https://bugs.webkit.org/show_bug.cgi?id=81437 Reviewed by Adrienne Walker. Split CCLayerTreeHostImpl::drawLayers() into two phases: prepareToDraw() and drawLayers(). When calculating a RenderPass, and we checkerboard a quad on a layer, bubble this info back up to CCLayerTreeHostImpl. If the layer is transforming in an animation, then abort the prepareToDraw() phase and cause it to return false back to the thread proxy. Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (FrameData): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * 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/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * 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-03-21 Enrica Casucci WebKitURLWithTitles pasteboard format should support URLs containing Emoji characters. https://bugs.webkit.org/show_bug.cgi?id=81835 Reviewed by Brady Eidson. When writing the URL in the pasteboard for the WebURLWithTitles format, we use the user visible string instead of the original URL. In case of URL with Unicode characters, we lose the encoding. Added TestWebKitAPI test. * platform/mac/PasteboardMac.mm: (WebCore::writeURLForTypes): Writes to the pasteboard the original URL. 2012-03-21 Levi Weintraub Correct LayoutUnit usage in VisiblePosition.cpp https://bugs.webkit.org/show_bug.cgi?id=81775 Reviewed by Eric Seidel. Correcting a mismatch between the .h and .cpp for the definition of localCaretRect, and properly using LayoutUnits for local coordinates. No new tests. No change in behavior. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::localCaretRect): Switching to return a LayoutRect, as in the header. Local coordinates are in LayoutUnits. (WebCore::VisiblePosition::absoluteCaretBounds): Using LayoutRect for the localCaretRect. (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Ditto. 2012-03-21 Adam Klein "this" argument for MutationCallbacks should be the MutationObserver https://bugs.webkit.org/show_bug.cgi?id=81712 Reviewed by Adam Barth. Test: fast/mutation/callback-arguments.html * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): Add an overload that takes an explicit this argument and have the old method call the new one. * bindings/js/JSCallbackData.h: (JSCallbackData): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): Call the new overload. * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): Add an overload that takes an explicit this argument and have the old method call the new one. * bindings/v8/custom/V8CustomVoidCallback.h: (WebCore): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): Call the new overload. 2012-03-21 Alexandru Chiculita [CSS Shaders] Make CSS Shaders compile on Chromium https://bugs.webkit.org/show_bug.cgi?id=81435 Reviewed by Stephen White. This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled. The only way to test the functionality now is to use the overridePreference from dump render tree. Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter get recreated anyway. No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results. I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force enable the feature at runtime. * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium. (WebCore::cachedResourceTypeToTargetType): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly. (WebCore::FECustomFilter::create): (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute. Other drivers didn't complain about it, but it was clearly a bug. (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the projection matrix only on Chromium, so that we get the correct result. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document. 2012-03-21 Mark Pilgrim Realphabetize about webaudio move https://bugs.webkit.org/show_bug.cgi?id=81825 Reviewed by Adam Barth. No new tests, all existing tests pass. * CMakeLists.txt: 2012-03-21 Anders Carlsson Evict tiles from pages in background tabs https://bugs.webkit.org/show_bug.cgi?id=81829 Reviewed by Andreas Kling. When the tile cache for a page is no longer in a window (which happens when it's moved to a background tab), schedule a tile revalidation after 4 seconds. This tile revalidation will ensure that tiles outside of the visible rect will be dropped. * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::tileCacheLayerBoundsChanged): (WebCore::TileCache::setIsInWindow): (WebCore::TileCache::tileCoverageRect): (WebCore): (WebCore::TileCache::scheduleTileRevalidation): (WebCore::TileCache::revalidateTiles): 2012-03-21 Stephen Chenney SVG layout leaves objects still needing layout https://bugs.webkit.org/show_bug.cgi?id=81006 Reviewed by Nikolas Zimmermann. Change the layout of SVG objects such that resources that trigger layout of other objects are handled in a distinct pass, and then objects still requiring layout are laid out again. Test: svg/custom/delete-text-innerText-crash.html * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::layout): * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::layout): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::addResourceForClientInvalidation): (WebCore): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): 2012-03-21 Tim Horton Make use of CG rounded-rect primitives https://bugs.webkit.org/show_bug.cgi?id=79932 Reviewed by Simon Fraser. Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman. Dispatch to potentially platform-specific rounded rectangle path construction from addPathForRoundedRect. Make use of this to call wkCGPathAddRoundedRect on Lion and above, as long as the rounded corners are all equivalent. The origin of the stroke dash differs between the bezier approach and the path added by wkCGPathAddRoundedRect, so Path::addRoundedRect() takes a new parameter allowing code which is sensitive to stroke dash origin (i.e. SVG) to fall back to the old behavior if need be. Make use of the new Path::addRoundedRect() parameter to fall back to the old (bezier) rounded-rect behavior when constructing a dashed SVG path, in order to continue complying with the spec. No new tests, as this is covered by many that use rounded corners, and is only a performance improvement. * WebCore.exp.in: * platform/graphics/Path.cpp: (WebCore::Path::addRoundedRect): (WebCore): (WebCore::Path::addPathForRoundedRect): * platform/graphics/Path.h: (Path): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): (WebCore): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromRectElement): 2012-03-21 David Reveman [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support. https://bugs.webkit.org/show_bug.cgi?id=80988 Reviewed by Adrienne Walker. Expose EXT_occlusion_query API to WebKit compositor. Add GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query enums. * platform/graphics/chromium/Extensions3DChromium.h: (Extensions3DChromium): 2012-03-21 Tony Chang compute the sign of flexibility for new flexbox https://bugs.webkit.org/show_bug.cgi?id=81722 Reviewed by Ojan Vafai. This implements the computation of the sign of flexibility used by the new flexing algorithm. http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths No new tests, we don't use the sign of flexibility yet. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeNextFlexLine): Compute the size adjusted for min/max as well as not adjusted. (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Renamed to match spec text better. * rendering/RenderFlexibleBox.h: Added enum for flex sign. 2012-03-21 Vsevolod Vlasov Web Inspector: Extract WebInspector.UIBreakpoint from WebInspector.Breakpoint. https://bugs.webkit.org/show_bug.cgi?id=81669 Reviewed by Pavel Feldman. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.get for): (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._innerRemoveBreakpoint): (WebInspector.BreakpointManager.prototype.removeAllBreakpoints): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._uiBreakpoints.get this): (WebInspector.BreakpointManager.prototype._uiBreakpoints): (WebInspector.BreakpointManager.prototype.get _uiBreakpoint): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._addBreakpointToModel): (WebInspector.BreakpointManager.prototype._removeBreakpointFromModel): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.prototype.get uiBreakpoint): (WebInspector.Breakpoint.prototype.createUIBreakpoint): (WebInspector.Breakpoint.prototype.removeUIBreakpoint): (WebInspector.UIBreakpoint): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): * inspector/front-end/ScriptsPanel.js: 2012-03-21 Anders Carlsson TileCache needs to know if its containing page is in a window https://bugs.webkit.org/show_bug.cgi?id=81821 Reviewed by Andreas Kling. This is in preparation for throwing away invisible tiles in background tabs to reduce memory usage. * page/FrameView.cpp: (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::didMoveOnscreen): (WebCore::Page::willMoveOffscreen): * page/Page.h: (WebCore::Page::isOnscreen): (Page): * platform/graphics/TiledBacking.h: (TiledBacking): * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): (WebCore::TileCache::setIsInWindow): (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): 2012-03-21 Xingnan Wang Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp https://bugs.webkit.org/show_bug.cgi?id=81744 Reviewed by Chris Rogers. * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): 2012-03-21 Xiaomei Ji [chromium] Font fallback in cr-win is wrong for string contains zero-width-space. https://bugs.webkit.org/show_bug.cgi?id=79961 Reviewed by Adam Barth. Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt(). * platform/graphics/Font.h: (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): 2012-03-21 Patrick Gansterer Build fix for !ENABLE(INSPECTOR) after r111005. * inspector/ContentSearchUtils.h: 2012-03-21 Ulan Degenbaev [V8] V8GCForContextDispose should indicate whether a context is disposed for the main frame or not https://bugs.webkit.org/show_bug.cgi?id=81200 Reviewed by Adam Barth. Pass a hint to V8::IdleNotification that requests more aggressive GC when a main frame context is disposed and requests incremental GC otherwise. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::disposeContextHandles): * bindings/v8/V8GCForContextDispose.cpp: (WebCore::V8GCForContextDispose::V8GCForContextDispose): (WebCore::V8GCForContextDispose::notifyContextDisposed): (WebCore::V8GCForContextDispose::pseudoIdleTimerFired): * bindings/v8/V8GCForContextDispose.h: (V8GCForContextDispose): 2012-03-21 Nat Duca [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero https://bugs.webkit.org/show_bug.cgi?id=81790 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionBeginFrame): 2012-03-21 Xingnan Wang Add multichannel support in RealtimeAnalyser https://bugs.webkit.org/show_bug.cgi?id=81745 Reviewed by Chris Rogers. * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::writeInput): (WebCore): 2012-03-21 Eric Carlson Removing HTMLTrackElement does not delete TextTrack https://bugs.webkit.org/show_bug.cgi?id=80873 Reviewed by Antti Koivisto. No new tests, but media/track/track-language-preference.html has been updated to test this fix. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didAddTrack): Renamed from trackWasAdded. (WebCore::HTMLMediaElement::willRemoveTrack): Renamed from trackWasRemoved because it is called before the track is removed, to allow the TextTrack to be removed. * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedIntoTree): Renamed from insertedIntoDocument (WebCore::HTMLTrackElement::willRemove): Renamed from removedFromDocument. * html/HTMLTrackElement.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::trackElementIndex): Don't include tracks that are not in the document in the calcualtion. 2012-03-21 Zeno Albisser [Qt][Mac] ranlib segfaults when creating symbol tables for libWebCore.a. https://bugs.webkit.org/show_bug.cgi?id=81750 Building WebCore on mac currently creates an archive that is bigger than 4GB. But ranlib fails to create a symbol table for such a big archive, even on 64bit machines. Therefore we start using SVGAllInOne.cpp when building debug on mac. This reduces the size of the archive by about 300MB. Reviewed by Tor Arne Vestbø. * Target.pri: 2012-03-21 Tommy Widenflycht [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate https://bugs.webkit.org/show_bug.cgi?id=81339 Reviewed by Adam Barth. Not possible to test until the entire JSEP feature is commited. * Modules/mediastream/IceCandidate.cpp: (WebCore::IceCandidate::toSdp): * Modules/mediastream/SessionDescription.cpp: (WebCore::SessionDescription::toSdp): * platform/mediastream/IceCandidateDescriptor.cpp: (WebCore::IceCandidateDescriptor::toSDP): * platform/mediastream/IceCandidateDescriptor.h: (IceCandidateDescriptor): * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::constructSDP): * platform/mediastream/MediaStreamCenter.h: (MediaStreamCenter): * platform/mediastream/SessionDescriptionDescriptor.cpp: (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor): (WebCore::SessionDescriptionDescriptor::toSDP): (WebCore::SessionDescriptionDescriptor::initialSDP): * platform/mediastream/SessionDescriptionDescriptor.h: (SessionDescriptionDescriptor): 2012-03-21 Yuta Kitamura Use RFC version of WebSocket protocol by default https://bugs.webkit.org/show_bug.cgi?id=81718 Reviewed by Kent Tamura. Flip the default value of Settings::m_useHixie76WebSocketProtocol so WebKit ports will use RFC version of WebSocket protocol by default. All the existing ports already use the RFC protocol as of now, so this change will not make any impact (hopefully). No new tests. No change in functionality. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-03-21 Andrey Kosyakov Web Inspector: only show JS event listeners in Event Listeners tab of Elements panel https://bugs.webkit.org/show_bug.cgi?id=81798 Reviewed by Pavel Feldman. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::getJSListenerFunctions): * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): (WebCore::eventListenerHandlerLocation): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::getJSListenerFunctions): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListeners): 2012-03-21 Andrey Kosyakov EventListener::Type enum has unused member InspectorDOMAgentType https://bugs.webkit.org/show_bug.cgi?id=81794 Reviewed by Pavel Feldman. * dom/EventListener.h: 2012-03-21 Tom Hudson Incremental cleanup of BitmapImage: inlined virtual functions https://bugs.webkit.org/show_bug.cgi?id=81688 Reviewed by James Robinson. No change in functionality, so no new tests. Move virtual functions defined in headers into .cpp files. * WebCore.gypi: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::isBitmapImage): (WebCore): (WebCore::BitmapImage::hasSingleSecurityOrigin): (WebCore::BitmapImage::nativeImageForCurrentFrame): (WebCore::BitmapImage::currentFrameHasAlpha): (WebCore::BitmapImage::notSolidColor): (WebCore::BitmapImage::decodedSize): (WebCore::BitmapImage::mayFillWithSolidColor): (WebCore::BitmapImage::solidColor): * platform/graphics/BitmapImage.h: (BitmapImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Added. (WebCore): (WebCore::BitmapImageSingleFrameSkia::isBitmapImage): (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::size): (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData): (WebCore::BitmapImageSingleFrameSkia::decodedSize): (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): 2012-03-21 Alexey Proskuryakov Remove obsolete File attributes https://bugs.webkit.org/show_bug.cgi?id=79383 Reviewed by Hajime Morita. * bindings/objc/PublicDOMInterfaces.h: * fileapi/File.h: * fileapi/File.idl: Removed fileName and fileSize, they have different names now. * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData): (WebCore::FileInputType::getTypeSpecificValue): (WebCore::FileInputType::defaultToolTip): Updated to use new function names. 2012-03-21 Jocelyn Turcotte TiledBackingStore: Create the first round of tiles synchronously after setting the visible rect. https://bugs.webkit.org/show_bug.cgi?id=81762 Reviewed by Kenneth Rohde Christiansen. The first round of tiles should cover completely the visible rect. Creating the tiles synchronously allows us to get the new tiles immediately and prevents an extra AC layers sync to be able to remove the old tiles. At some point it might also make sense to remove the tile creation timer completely. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::coverWithTilesIfNeeded): 2012-03-19 Jocelyn Turcotte TiledBackingStore: When checking if the visible area is covered, only convert to scaled coordinates once. https://bugs.webkit.org/show_bug.cgi?id=81519 Reviewed by Kenneth Rohde Christiansen. Both visibleRect and coverageRatio call mapFromContents on the input rect, this woulc cause the coverageRatio to never reach 1.0 when the contents is scaled up. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::visibleAreaIsCovered): 2012-03-21 Mao Yujie MediaStream API: Need to support MediaStream constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=78781 Reviewed by Adam Barth. No new tests. * Modules/mediastream/DOMWindowMediaStream.idl: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled): 2012-03-21 Philip Rogers Skip building resources if SVGTRef is not in a document https://bugs.webkit.org/show_bug.cgi?id=81473 Reviewed by Nikolas Zimmermann. We can skip the building of pending resources in SVGTRef if we're not yet in a document. This mirrors the nearly identical logic in SVGUseElement::buildPendingResource() and SVGFEImageElement::buildPendingResource(). Test: http/tests/svg/tref-adoptNode-crash.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::buildPendingResource): 2012-03-21 Sami Kyostila [chromium] Use floating point scroll deltas for layers https://bugs.webkit.org/show_bug.cgi?id=81546 Reviewed by James Robinson. Use floating point scroll deltas for layers instead of integral scroll deltas. This is because due to page scaling it may be necessary to scroll layers in sub-CSS-pixel steps to avoid visible jumps. When the floating point scroll offset is committed to the main thread, it is truncated to integer, but the fractional part is kept on the CC side to make sure fractional scroll offsets are accumulated correctly over multiple commits. Test: CCLayerTreeHostTestFractionalScroll * platform/graphics/FloatPoint.h: (WebCore::toSize): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::scrollBy): (WebCore::CCLayerImpl::setScrollDelta): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollDelta): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): (WebCore::CCLayerTreeHostImpl::animatePageScale): 2012-03-21 Li Yin [WebSocket]The Sec-WebSocket-Accept MUST NOT appear more than once in an HTTP response https://bugs.webkit.org/show_bug.cgi?id=81655 Reviewed by Adam Barth. Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::readHTTPHeaders): 2012-03-21 Alexei Filippov Web Inspector: Speedup heap snapshot loading. https://bugs.webkit.org/show_bug.cgi?id=81788 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotLoader.prototype._parseNodes): 2012-03-21 Pavel Feldman Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element. https://bugs.webkit.org/show_bug.cgi?id=81766 Reviewed by Yury Semikhatsky. We should check event target and its ancestors for being edited, not use some global property. This change also introduces Event.prototype.consume so that we were consistently consuming events. * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype._onKeyDown): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): * inspector/front-end/CSSSelectorProfileView.js: * inspector/front-end/Checkbox.js: (WebInspector.Checkbox.prototype.addEventListener): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._enterKeyPressed): (WebInspector.ConsoleGroup.prototype._titleClicked): * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype.show): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._keyDown): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._enterKeyPressed): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging): (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging): (WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging): * inspector/front-end/Dialog.js: (WebInspector.Dialog.prototype._onKeyDown): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._statusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.get if): * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen.prototype._onKeyDown): * inspector/front-end/InspectorView.js: (WebInspector.InspectorView.prototype._keyDown): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode): * inspector/front-end/NetworkPanel.js: * inspector/front-end/Object.js: (WebInspector.Event.prototype.preventDefault): (WebInspector.Event.prototype.consume): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._promptKeyDown): * inspector/front-end/ProfileView.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype._onKeyDown): * inspector/front-end/Section.js: (WebInspector.Section.prototype.handleClick): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype.show): (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): (.WebInspector.SoftContextMenu.prototype._discardMenu): * inspector/front-end/Spectrum.js: (WebInspector.Spectrum.draggable.consume): (WebInspector.Spectrum.draggable.start): (WebInspector.Spectrum.draggable.stop): (WebInspector.Spectrum.draggable): (WebInspector.Spectrum.prototype._onKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.muteEventListener): (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.set _createNewRule): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick): (WebInspector.StylePropertiesSection.prototype._handleSelectorClick): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.onKeyDown): (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler): (WebInspector.TextPrompt.SuggestBox.prototype._onItemMouseDown): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleKeyDown): * inspector/front-end/Toolbar.js: (WebInspector.ToolbarDropdown.prototype._onKeyDown): * inspector/front-end/UIUtils.js: (WebInspector.isBeingEdited): (WebInspector.startEditing): * inspector/front-end/View.js: (WebInspector.View.prototype._doLoadCSS): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked): (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked): * inspector/front-end/inspector.js: (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector.documentKeyDown): (WebInspector.postDocumentKeyDown): (WebInspector.addMainEventListeners): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._treeKeyDown): (TreeOutline.prototype._searchInputKeyDown): (TreeElement.treeElementToggled): (TreeElement.prototype.selectOnMouseDown): * inspector/front-end/utilities.js: (Event.prototype.consume): 2012-03-21 Yury Semikhatsky Web Inspector: event listener section doesn't show all event listeners of the element ancestors https://bugs.webkit.org/show_bug.cgi?id=81782 Event listeners section now contains all event listeners for the selected element ancestors chain (in case option "All Nodes" is selected). Reviewed by Pavel Feldman. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListenersForNode): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (WebInspector.EventListenersSidebarPane.prototype): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapSnapshot: move all builders and calculation calls to HeapSnapshot._init function. https://bugs.webkit.org/show_bug.cgi?id=81784 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype._retainersForNode): (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode): (WebInspector.HeapSnapshot.prototype._flagsOfNode): (WebInspector.HeapSnapshot.prototype.aggregates): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype.get nodeIndexes): 2012-03-21 Jessie Berlin WTF headers should be in $(ConfigurationBuildDir)\include\private\wtf, not $(ConfigurationBuildDir)\include\private\JavaScriptCore\wtf. https://bugs.webkit.org/show_bug.cgi?id=81739 Reviewed by Dan Bernstein. * WebCore.vcproj/WebCore.vcproj: Look for AtomicString.cpp, StringBuilder.cpp, StringImpl.cpp, and WTFString.cpp in the wtf subdirectory of the build output, not the JavaScriptCore/wtf subdirectory. 2012-03-21 Jonathan Dong [BlackBerry] Credential save and autofill implemetation https://bugs.webkit.org/show_bug.cgi?id=80401 Reviewed by Rob Buis. Added interface function authenticationChallenge() and notifyShouldSaveCredential() into PageClientBlackBerry. As this class is our platform specific interface, by doing this we don't need to add an interface function in class FrameLoaderClient which is a platform independent interface. No new tests. * platform/blackberry/PageClientBlackBerry.h: (WebCore): * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapProfiler: DOM node id can overflow Int32. https://bugs.webkit.org/show_bug.cgi?id=81776 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.Uint32Array): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var): (WebInspector.HeapSnapshot.prototype._buildReverseIndex): (WebInspector.HeapSnapshot.prototype._buildNodeIndex): 2012-03-21 Tim Dresser [chromium] Increase size of Combo Box Options for touch and high DPI devices https://bugs.webkit.org/show_bug.cgi?id=80027 Reviewed by Darin Fisher. Scale Combo box popups by defaultDeviceScaleFactor, and add padding to