2012-03-30 Alexandru Chiculita [CSS Filters] Drop Shadow is not repainting correctly when repaint area is smaller than the filtered element https://bugs.webkit.org/show_bug.cgi?id=80323 Reviewed by Dean Jackson. The problem is that shadow and blur (and custom filters - although not treated in this patch) need the full source image of the surface that needs to be filtered. Until now the filter was computed only using the area defined by the dirty repaint rectangle. Those filters need full image source because they displace pixel positions, meaning that pixels in the current dirty rectangle have a dependency on pixels from the RenderLayer outside the dirty rect. See the bug pictures for an example of how that could go wrong. The fix is to always keep a copy of the RenderLayer representation in memory. When repaint is needed we still invalidate only the parts that changed, but the filter is computed using the full source image and not only the dirty rectangle. In order to make that work, we needed the full repaint rectangle of the current RenderLayer and not just the clipped version that we get through the ::paint methods. Also, because filters sometime need to repaint more than just the dirty area (because of the outsets of the filters - ie blur, drop-shadow), it makes it easier to just capture all the repaints in the RenderLayer itself in a similar way WebKit does now for composited layers. As a result the repaint container can also be a filtered layer (not just composited ones), so that we can catch all the filter repaints in one place in the RenderLayer. Also with this change I removed the need to add visual overflow to the RenderBox and also there's no need to patch the repaintUsingContainer. By the way, repaintUsingContainer did not always work because of the LayoutState optimizations, so repaints during layout would fail (I know that that could be fixed by disabling the LayoutState for filtered areas). Also part of this patch I extracted a function from RenderLayerCompositor::calculateCompositedBounds, so that we can also use it from RenderLayer. I called it RenderLayer::calculateLayerBounds and there should be no change in functionality. It now also includes the outsets of the filter. I've added a different bug to avoid adding the outsets when the filter is computed in hardware. That's because some platforms do not support that yet: https://bugs.webkit.org/show_bug.cgi?id=81239 Also the visual overflow doesn't include the child RenderLayers, meaning that the outsets would have been applied to the border and not to the bounding box of the RenderLayer. The end result was that some child RenderLayers could be clipped out of the filtered area. Tests: css3/filters/filter-repaint-blur.html css3/filters/filter-repaint-child-layers.html css3/filters/filter-repaint-composited-fallback-crash.html css3/filters/filter-repaint-composited-fallback.html css3/filters/filter-repaint-sepia.html css3/filters/filter-repaint-shadow-clipped.html css3/filters/filter-repaint-shadow-rotated.html css3/filters/filter-repaint-shadow.html * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::getOutsets): Drop shadow should only enlarge the outsets and never make them smaller. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): Caching the operations.hasFilterThatMovesPixels() in the FilterEffectRenderer. (WebCore::FilterEffectRenderer::updateBackingStore): It now returns true when the backing store was recreated, so that we can repaint it all. (WebCore): (WebCore::FilterEffectRendererHelper::prepareFilterEffect): Separated beginFilterEffect into two methods. One that computed the rects and one that prepares the draw context. (WebCore::FilterEffectRendererHelper::beginFilterEffect): (WebCore::FilterEffectRendererHelper::applyFilterEffect): * rendering/FilterEffectRenderer.h: (FilterEffectRendererHelper): (FilterEffectRenderer): (WebCore::FilterEffectRenderer::hasFilterThatMovesPixels): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): No need to include the outsets in the repaint rect here, we will do it later in RenderLayer. (WebCore::RenderBox::addVisualEffectOverflow): Removed outsets from the overflow. * rendering/RenderInline.cpp: (WebCore::RenderInline::computeRectForRepaint): Removed the outsets from this method. We now compute that in RenderLayer::setFilterBackendNeedsRepaintingInRect. * rendering/RenderLayer.cpp: (WebCore): In this change I introduce a new dirty rectangle used by filters. It accumulates all the repaint requests inside the filtered layer, so that we can invalidate the areas that are outside the clipping rectangle. Such cases include "overflow:scroll" and "overflow:hidden", when we still want to blur or drop shadow based on content that is not actually displayed on screen (but the shadow for that content is visible). That rectangle is called m_filterRepaintRect and resets back to zero when the next repaint is finished. All the filtered layers that apply blur and drop-shadow will have an extra backing surface and only the invalidated areas are repainted in that surface. This is very similar to how composited layers work. (WebCore::RenderLayer::requiresFullLayerImageForFilters): Returns true in CPU mode and only if the layer needs the full source image of the layer to compute the filter. Otherwise GPU layers already have access to the full bakcing image. (WebCore::RenderLayer::enclosingFilterLayer): Returns the enclosing layer that returns true on requiresFullLayerImageForFilters. (WebCore::RenderLayer::enclosingFilterRepaintLayer): Returns the enclosing layer that can be used to repaint the current layer. Usually that is the RenderView layer or the parent RenderLayer that is composited. (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Intercepts all the repaint queries for the filtered layers and uses enclosingFilterRepaintLayer to enforce the repaint using the parent container. (WebCore::RenderLayer::paintLayerContents): Consolidated the filters code in one single place. Also, it is now sending the bounding box and the dirty rect to the FilterEffectRendererHelper::prepareFilterEffect to make sure the backing store is repainted accordingly. In some cases it might rewrite the dirty rectangle used to paint the current layer, so that all the dirty areas in the backing store are covered. (WebCore::RenderLayer::calculateLayerBounds): Extracted from RenderLayerCompositor::calculateCompositedBounds. (WebCore::RenderLayer::updateOrRemoveFilterEffect): We should not create the filter builder when there's no filter specified. * rendering/RenderLayer.h: (RenderLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): Now using the code from RenderLayer::calculateLayerBounds * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): Using RenderLayer::enclosingFilterLayer to also find the parent filtered area. (WebCore::RenderObject::repaintUsingContainer): Removed the need to add filter outsets in this method. We now compute that in RenderLayer::setFilterBackendNeedsRepaintingInRect. 2012-03-30 Ryosuke Niwa Add a compile assert for the size of BidiContext https://bugs.webkit.org/show_bug.cgi?id=82793 Reviewed by Eric Seidel. Added the assertion. Also reduced the number of bits used for bidi levels from 8 to 6 as done in InlineBox since bidi levels require exactly 6 bits. * rendering/InlineBox.h: Added a comment about why bidi level needs exactly 6 bits. * platform/text/BidiContext.cpp: (SameSizeAsBidiContext): (WebCore): * platform/text/BidiContext.h: (BidiContext): 2012-03-30 Joshua Bell IndexedDB: Race condition causes version change transaction to commit after onblocked https://bugs.webkit.org/show_bug.cgi?id=82678 For a version change event, the blocked and success events could both be queued before either is dispatched. The transaction would erroneously be allowed to commit after the blocked event was dispatched; it should not be, as the request was not finished. Reviewed by Tony Chang. Test: storage/indexeddb/dont-commit-on-blocked.html * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): 2012-03-30 Ryosuke Niwa Add a compile assert for the size of FontDescription https://bugs.webkit.org/show_bug.cgi?id=82786 Reviewed by Eric Seidel. Added the assertion. Also converted a couple of boolean bitfields to unsinged. I've verified that the conversions are safe (they're only used in FontDescription.h/cpp). * platform/graphics/FontDescription.cpp: (SameSizeAsFontDescription): (WebCore): * platform/graphics/FontDescription.h: (FontDescription): 2012-03-30 Adam Barth Move CPP files related to ResourceHandle to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=82582 Reviewed by James Robinson. Re-land a tiny piece of http://trac.webkit.org/changeset/112572 in the hopes of not breaking the component build this time. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp. 2012-03-30 Andreas Kling Kill CSSTimingFunctionValue. Reviewed by Antti Koivisto. Remove CSSTimingFunctionValue and let the 3 subclasses inherit directly from CSSValue. CSSTimingFunctionValue is a pointless middle-man class that adds nothing. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSTimingFunctionValue.h: (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue): (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue): (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue): * css/CSSValue.h: (WebCore::CSSValue::isCubicBezierTimingFunctionValue): (WebCore::CSSValue::isLinearTimingFunctionValue): (WebCore::CSSValue::isStepsTimingFunctionValue): 2012-03-30 Nat Duca [chromium] Bump max texture updates per frame to 48 https://bugs.webkit.org/show_bug.cgi?id=82779 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WTF): 2012-03-30 Nate Chapin Merge FrameLoader::finishedLoading() into DocumentLoader::finishedLoading(). https://bugs.webkit.org/show_bug.cgi?id=82653 Reviewed by Adam Barth. No new tests, no functionality change intended. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): * loader/FrameLoader.cpp: * loader/FrameLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didFinishLoading): 2012-03-30 Antti Koivisto Cache origin check result to RuleData https://bugs.webkit.org/show_bug.cgi?id=82774 Reviewed by Andreas Kling. You wan't be able to get back to the stylesheet from a css style rule soon. We need to do the origin check when we know the sheet it came from. * css/CSSStyleSelector.cpp: (RuleData): (WebCore::RuleData::hasDocumentSecurityOrigin): (RuleSet): (WebCore::makeRuleSet): (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::RuleFeature::RuleFeature): (RuleFeature): (Features): 2012-03-30 Mike Reed Remove deadcode behind "SafeSkia" flag https://bugs.webkit.org/show_bug.cgi?id=82771 Reviewed by Stephen White. Just removing dead code (behind obsolete build flag), existing webkit tests apply * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::addInnerRoundedRectClip): (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::canvasClip): (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::clipConvexPolygon): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): (WebCore::GraphicsContext::platformFillEllipse): (WebCore::GraphicsContext::platformStrokeEllipse): 2012-03-30 Ryosuke Niwa Add a compile assert for the size of InlineFlowBox https://bugs.webkit.org/show_bug.cgi?id=82767 Reviewed by Tony Chang. Add a compile assert to ensure InlineFlowBox stays small. Also make some of the member variables not used in RootInlineBox private. Changing these booleans to unsigned is safe as I've audited all code that uses these member variables (they're all in InlineFlowBox or RootInlineBox). * rendering/InlineFlowBox.cpp: (SameSizeAsInlineFlowBox): (WebCore): * rendering/InlineFlowBox.h: (InlineFlowBox): 2012-03-30 Zalan Bujtas Fix defective size_t overflow in GestureTapHighlighter. https://bugs.webkit.org/show_bug.cgi?id=82605 Reviewed by Kenneth Rohde Christiansen. In pathForRenderer, the for loop has 'i < rects().size() - 1' as test expression, where rects().size() returns with size_t. In case of empty rect, it leads to unsigned int overflow. Overflow value makes the associated for loop run with invalid values. Fix it by making loop variable int and stop using size_t type in the test expression. Also, return early, if no focus ring found. Manual test added. Tap gesture highlighter is getting triggered by UI process. * page/GestureTapHighlighter.cpp: 2012-03-30 Mark Pilgrim GEOLOCATION should be implemented as Page Supplement https://bugs.webkit.org/show_bug.cgi?id=82228 Reviewed by Adam Barth. Geolocation now uses the Supplement interface instead of keeping an instance variable on Page. This allows us to remove all geolocation-related functions, variables, and ifdefs out of Page and into Modules/geolocation/. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::stop): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::requestPermission): (WebCore::Geolocation::startUpdating): (WebCore::Geolocation::stopUpdating): * Modules/geolocation/Geolocation.h: (WebCore): * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::supplementName): (WebCore): (WebCore::provideGeolocationTo): * Modules/geolocation/GeolocationController.h: (GeolocationController): (WebCore::GeolocationController::from): * WebCore.exp.in: * page/GeolocationClient.h: (WebCore): (GeolocationClient): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): 2012-03-30 Anders Carlsson This is fun. * WebCore.xcodeproj/project.pbxproj: 2012-03-30 Anders Carlsson Yet another build fix attempt. * WebCore.xcodeproj/project.pbxproj: 2012-03-30 Joe Mason [BlackBerry] Make sure strings do not leak in PluginViewBlackberry. https://bugs.webkit.org/show_bug.cgi?id=82764 Update PluginViewBlackBerry to follow the changes in BlackBerry::Platform::Window which now returns std::string instead of char* for strings. Also copy the windowGroup and rootGroup strings in PluginViewPrivate instead of just saving a pointer to the returned memory, which could become invalid at any time. Reviewed by Rob Buis. * plugins/blackberry/PluginViewBlackBerry.cpp: (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::platformGetValue): (WebCore::PluginView::platformDestroy): * plugins/blackberry/PluginViewPrivateBlackBerry.h: (PluginViewPrivate): 2012-03-30 Anders Carlsson Another build fix. * WebCore.xcodeproj/project.pbxproj: 2012-03-30 Anders Carlsson Fix build. * page/scrolling/mac/ScrollingTreeMac.mm: 2012-03-30 Anders Carlsson Show a scrolling indicator light when compositing borders are turned on https://bugs.webkit.org/show_bug.cgi?id=82758 Reviewed by Andreas Kling. With this change, turning on compositing borders also turn on a tiny indicator in the top left corner. This indicator uses color coding to show where wheel events are handled and where the scroll layer position is updated: - Green means that both wheel events and scroll layer position updates are handled on the scrolling thread. - Yellow means that wheel events need to be dispatched to the main thread (due to wheel event handlers), but that scroll layer position updates still happen on the scrolling thread. - Red means that scroll layer position updates happen on the main thread (due to background-attachment: fixed or fixed position objects). * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitNewTreeState): Call updateDebugRootLayer(). * page/scrolling/ScrollingTreeNode.h: (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread): Make this public. (ScrollingTreeNode): * page/scrolling/mac/ScrollingTreeMac.mm: Added. (WebCore::ScrollingTree::setDebugRootLayer): Set up a new debug info sublayer. (WebCore::ScrollingTree::updateDebugRootLayer): Update the debug root layer background color based on the scrolling tree state. 2012-03-30 Peter Rybin Web Inspector: CodeGeneratorInspector.py: add missing runtime assert method for InspectorObject https://bugs.webkit.org/show_bug.cgi?id=82753 Reviewed by Vsevolod Vlasov. Type validator generator is extended to support missing InspectorObject type and made more accurate for "int" type. Strict types are enabled for 2 more domains. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.generate_validate_method): (RawTypes.String.get_validate_method_params.ValidateMethodParams): (RawTypes.Int): (RawTypes.Int.generate_validate_method): (RawTypes.Int.get_raw_validator_call_text): (RawTypes.Number.get_validate_method_params.ValidateMethodParams): (RawTypes.Bool.get_validate_method_params.ValidateMethodParams): (RawTypes.Object.get_validate_method_params.ValidateMethodParams): (RawTypes.Object.get_validate_method_params): (TypeBindings.create_type_declaration_.ClassBinding.request_internal_runtime_cast): (PlainObjectBinding.request_internal_runtime_cast): (PlainObjectBinding.get_validator_call_text): (ArrayBinding.request_internal_runtime_cast): 2012-03-30 Ian Vollick [chromium] assertion being hit in CCLayerAnimationController https://bugs.webkit.org/show_bug.cgi?id=82237 Reviewed by James Robinson. Animations are no longer pushed to the impl thread if they have already completed. Tested in CCLayerAnimationControllerTest.doNotSyncFinishedAnimation * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread): 2012-03-30 Ryosuke Niwa Build fix after r112699. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::findPropertyWithId): 2012-03-30 Ryosuke Niwa Add a compile assert for the size of CSSProperty https://bugs.webkit.org/show_bug.cgi?id=82756 Reviewed by Andreas Kling. Add a compile assert to ensure CSSProperty instances stay small. Also make member variables of CSSProperty private as they should have been, and extract wrapValueInCommaSeparatedList from createFontFaceRule. * css/CSSParser.cpp: (WebCore::CSSParser::createFontFaceRule): * css/CSSProperty.cpp: (SameSizeAsCSSProperty): (WebCore): (WebCore::CSSProperty::wrapValueInCommaSeparatedList): * css/CSSProperty.h: (CSSProperty): 2012-03-30 Ryosuke Niwa Let there be a clean xcodeproj. * WebCore.xcodeproj/project.pbxproj: 2012-03-30 Chris Fleizach AX: Crash at WebCore::renderObjectContainsPosition(WebCore::RenderObject*, WebCore::Position const&) https://bugs.webkit.org/show_bug.cgi?id=82745 Reviewed by Simon Fraser. Test: platform/mac/accessibility/range-for-position.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::index): 2012-03-30 John Sullivan Certain emoji characters should not be displayed in user-visible URL strings. Reviewed by Alexey Proskuryakov * platform/mac/WebCoreNSURLExtras.mm: (WebCore::isLookalikeCharacter): Added five emoji characters to the list. 2012-03-30 David Barr Split up top-level .gitignore and .gitattributes https://bugs.webkit.org/show_bug.cgi?id=82687 Reviewed by Tor Arne Vestbø. No new tests, source control administrivia. * .gitattributes: Added. * WebCore.gyp/.gitignore: Added. 2012-03-30 Patrick Gansterer [WinCE] Correct include paths. https://bugs.webkit.org/show_bug.cgi?id=82713 Reviewed by Eric Seidel. Modify the #include declarations for several WinCE-related files so that the wtf types are included using the full path. * platform/graphics/wince/ImageBufferWinCE.cpp: 2012-03-30 Vsevolod Vlasov Web Inspector: ScriptsNavigator scripts selection/focus polish. https://bugs.webkit.org/show_bug.cgi?id=82732 Reviewed by Pavel Feldman. Script could be selected by space in ScriptsNavigator now. This patch also polishes focus behavior when using ScriptsNavigator. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._scriptSelected): Added focusSource param to give clients possibility to release focus. (WebInspector.NavigatorScriptTreeElement.prototype.onspace): Added script selection on space pressed. (WebInspector.NavigatorScriptTreeElement.prototype._onclick): (WebInspector.NavigatorScriptTreeElement.prototype.onenter): * inspector/front-end/ScriptsPanel.js: _hideNavigatorOverlay moved to the end of events processing to set focus correctly. (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.prototype._fileSelected): (WebInspector.ScriptsPanel.prototype._hideNavigatorOverlay): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyDown): onspace event added. 2012-03-30 Mike Reed remove unneeded copies of SkPaths, remove unneeded save/restore https://bugs.webkit.org/show_bug.cgi?id=82641 Reviewed by Stephen White. Performance change, existing webkit tests apply. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::strokePath): 2012-03-30 Pavel Feldman Web Inspector: undo-ing edit that consists of a Tab does not work. https://bugs.webkit.org/show_bug.cgi?id=82733 Reviewed by Vsevolod Vlasov. We should never modify the range returned by the edit operation manually. And we should clone ranges that get into the model so that subsequent edits don't mutate them. Drive-by: restore selection after undo via selecting all the text that undo operation produced. Test: inspector/editor/text-editor-undo-redo.html * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/TextViewer.js: 2012-03-30 Malcolm MacLeod [wx] Implement Gradient and ImageBuffer support. https://bugs.webkit.org/show_bug.cgi?id=82710 Reviewed by Kevin Ollivier. * platform/graphics/BitmapImage.h: (BitmapImage): (WebCore::BitmapImage::create): * platform/graphics/Gradient.h: * platform/graphics/wx/GradientWx.cpp: (WebCore::Gradient::platformDestroy): (WebCore::Gradient::platformGradient): (WebCore::Gradient::fill): * platform/graphics/wx/ImageBufferDataWx.h: (ImageBufferData): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore): (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBufferData::~ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::context): (WebCore::ImageBuffer::toDataURL): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::clip): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore): (WebCore::BitmapImage::draw): * platform/wx/LocalDC.h: (WebCore): 2012-03-30 Allan Sandfeld Jensen [Qt] Find zoomable area using area-based hit-testing https://bugs.webkit.org/show_bug.cgi?id=82609 Reviewed by Kenneth Rohde Christiansen. Implement API for calculating the best zoomable area for a tap-to-zoom gesture. It picks the area with the largest intersection with the touch. In most cases this will be all areas fully containing the area, and returns the smallest inner-most of these. * page/EventHandler.cpp: (WebCore::EventHandler::bestZoomableAreaForTouchPoint): * page/EventHandler.h: * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::nodeIsZoomTarget): (WebCore::TouchAdjustment::appendZoomableSubtargets): (WebCore::TouchAdjustment::compileZoomableSubtargets): (WebCore::TouchAdjustment::areaOfIntersection): (WebCore::TouchAdjustment::findAreaWithLargestIntersection): (WebCore::findBestZoomableArea): * page/TouchAdjustment.h: * platform/graphics/IntSize.h: (WebCore::IntSize::area): 2012-03-30 Pavel Feldman Web Inspector: do not issue attributes modified event if actual values were not changed. https://bugs.webkit.org/show_bug.cgi?id=82726 Reviewed by Yury Semikhatsky. When style attribute is invalidated, we re-fetch the attributes values. There is no point in further dispatching attrs modified event if model stays the same. Test: inspector/elements/edit-style-attribute.html * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._setAttributesPayload): (WebInspector.DOMAgent.prototype._loadNodeAttributes): 2012-03-30 Philip Rogers Add new renderer for circles and ellipses https://bugs.webkit.org/show_bug.cgi?id=80423 Reviewed by Eric Seidel. This patch introduces a special renderer for SVGCircleElements and SVGEllipseElements to avoid having to use the slower path rendering code. This patch includes optimized circle code for the CG platform, and hooks (GC::fillEllipse, GC::strokeEllipse) are available for other platforms as well. Tests: svg/hittest/svg-ellipse-non-scale-stroke.xhtml svg/hittest/svg-ellipse.xhtml Added a test to exercise hit testing on an ellipse, and on an ellipse's stroke, to make sure the formulae in this patch are correct. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::fillEllipse): (WebCore): (WebCore::GraphicsContext::strokeEllipse): (WebCore::GraphicsContext::fillEllipseAsPath): (WebCore::GraphicsContext::strokeEllipseAsPath): (WebCore::GraphicsContext::platformFillEllipse): (WebCore::GraphicsContext::platformStrokeEllipse): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformFillEllipse): (WebCore): (WebCore::GraphicsContext::platformStrokeEllipse): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::platformFillEllipse): (WebCore): (WebCore::GraphicsContext::platformStrokeEllipse): * rendering/svg/RenderSVGAllInOne.cpp: * rendering/svg/RenderSVGEllipse.cpp: Added. (WebCore): (WebCore::RenderSVGEllipse::RenderSVGEllipse): (WebCore::RenderSVGEllipse::~RenderSVGEllipse): (WebCore::RenderSVGEllipse::createShape): (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): (WebCore::RenderSVGEllipse::objectBoundingBox): (WebCore::RenderSVGEllipse::strokeBoundingBox): (WebCore::RenderSVGEllipse::fillShape): (WebCore::RenderSVGEllipse::strokeShape): (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): (WebCore::RenderSVGEllipse::shapeDependentFillContains): * rendering/svg/RenderSVGEllipse.h: Added. (WebCore): (RenderSVGEllipse): (WebCore::RenderSVGEllipse::isSVGEllipse): (WebCore::RenderSVGEllipse::renderName): (WebCore::RenderSVGEllipse::isEmpty): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore): (WebCore::SVGCircleElement::createRenderer): * svg/SVGCircleElement.h: (SVGCircleElement): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::createRenderer): (WebCore): * svg/SVGEllipseElement.h: (SVGEllipseElement): 2012-03-30 Jesus Sanchez-Palencia Add a "preview" state to Page Visibility API implementation https://bugs.webkit.org/show_bug.cgi?id=81355 Reviewed by Adam Barth. Updating the Page Visibility API implementation to the current spec version. This change is covered by fast/events/page-visibility-transition-test.html, so no new tests needed. * page/PageVisibilityState.cpp: (WebCore::pageVisibilityStateString): * page/PageVisibilityState.h: 2012-03-30 Vsevolod Vlasov Web Inspector: [Regression] Execution line is not revealed after pretty print. https://bugs.webkit.org/show_bug.cgi?id=82727 Reviewed by Pavel Feldman. This patch makes JavaScriptSourceFrame reveal execution line after pretty print. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine): 2012-03-30 Yury Semikhatsky Web Inspector: preload field values into local variables for better heap profiler performance https://bugs.webkit.org/show_bug.cgi?id=82703 Reading from object fields takes a noticable time when the only other thing you do is just manipulating on big(several million elements) Uint32Array array cells. Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype._bfs): 2012-03-30 Sheriff Bot Unreviewed, rolling out r112489. http://trac.webkit.org/changeset/112489 https://bugs.webkit.org/show_bug.cgi?id=82725 Tentatively introduces a lot of webfont-related test flakiness on Snow Leopard (Requested by apavlov on #webkit). * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): 2012-03-30 Keishi Hattori Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium https://bugs.webkit.org/show_bug.cgi?id=80972 Reviewed by Kent Tamura. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * WebCore.exp.in: * css/html.css: * html/ColorInputType.cpp: * html/ColorInputType.h: * html/HTMLInputElement.cpp: (WebCore): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore): (InputTypeNames): * html/InputType.h: (InputType): (InputTypeNames): * loader/EmptyClients.h: (EmptyChromeClient): * page/Chrome.cpp: (WebCore): * page/Chrome.h: (WebCore): (Chrome): * page/ChromeClient.h: (WebCore): (ChromeClient): * platform/ColorChooser.h: * platform/ColorChooserClient.h: * testing/InternalSettings.cpp: * testing/Internals.cpp: (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-30 Charles Wei [BlackBerry] EventLoop::platformInit() obsolete. https://bugs.webkit.org/show_bug.cgi?id=82709 Reviewed by Rob Buis. No new tests, build fix for BlackBerry porting. * platform/blackberry/EventLoopBlackBerry.cpp: 2012-03-30 Vsevolod Vlasov Web Inspector: ScriptsNavigator should open scripts with single click (not double click). https://bugs.webkit.org/show_bug.cgi?id=82723 Reviewed by Pavel Feldman. This patch makes ScriptsNavigator open scripts with single click. * inspector/front-end/ScriptsNavigator.js: (WebInspector.NavigatorScriptTreeElement.prototype.onattach): (WebInspector.NavigatorScriptTreeElement.prototype._onclick): 2012-03-30 Vineet Chaudhary IDLParser.pm should be able to parse sequence as method argument. https://bugs.webkit.org/show_bug.cgi?id=82599 Reviewed by Kentaro Hara. With this patch IDL parser should support sequence as method argument. Current behaviour is argument name is not parsed hence shows empty spaces instead. Tests: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorCPP.pm: (SkipFunction): Skip functions for specific type. (SkipAttribute): Skip functions for specific type. (AddIncludesForType): Skip header for sequence type. (GenerateHeader): Skip header and declaration for sequence type. (GenerateImplementation): Skip header and implementation for sequence type. * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Skip functions for sequence type. * bindings/scripts/CodeGeneratorObjC.pm: (SkipFunction): Skip functions for specific type. (SkipAttribute): Skip functions for specific type. (AddForwardDeclarationsForType): Skip header for sequence type. (AddIncludesForType): Skip header for sequence type. (GenerateHeader):Skip header and declaration for sequence type. (GenerateImplementation): Skip header and implementation for sequence type. * bindings/scripts/CodeGeneratorV8.pm: (CreateCustomSignature): Add appropriate headers. * bindings/scripts/IDLStructure.pm: Add support to parse sequence. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Modified results from run-binding-tests. (WebDOMTestObj::objMethodWithArgs): * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_obj_method_with_args): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. (-[DOMTestObj objMethodWithArgs:strArg:objArg:]): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::methodWithSequenceArgCallback): (WebCore::ConfigureV8TestObjTemplate): 2012-03-30 Pavel Feldman Web Inspector: editing resets line-ending of the whole file https://bugs.webkit.org/show_bug.cgi?id=82708 Reviewed by Yury Semikhatsky. This change splits TextEditorModel's setText into setText (for initialization) and editRange (for editing). Distinguishing between the two allowed properly detecting the preferred line endings. Test: inspector/editor/text-editor-line-breaks.html * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.setContent): * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorCommand): (WebInspector.TextEditorModel): (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._textChanged): (WebInspector.TextEditorMainPanel.prototype._unindentLines.get var): (WebInspector.TextEditorMainPanel.prototype._unindentLines): (WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var): (WebInspector.TextEditorMainPanel.prototype.handleEnterKey): (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates): (WebInspector.TextEditorMainPanel.prototype._editRange): 2012-03-29 Vsevolod Vlasov Web Inspector: Take IndexedDB support out of experiments. https://bugs.webkit.org/show_bug.cgi?id=82635 Reviewed by Pavel Feldman. This patch takes inspector IndexedDB support out of experiments and enables tests. Test: http/tests/inspector/indexeddb/resources-panel.html * inspector/front-end/ResourcesPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): 2012-03-30 Patrick Gansterer Build fix after r112482. * platform/network/cf/FormDataStreamCFNet.h: Added missing forward decleration. 2012-03-30 Philippe Normand [GTK] WebAudio channelSize issue https://bugs.webkit.org/show_bug.cgi?id=81905 Reviewed by Martin Robinson. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::AudioFileReader::handleBuffer): Calculate the audio buffer duration and frames number from the buffer and caps instead of relying on the buffer offets that are not always correctly set depending on the audio file format. 2012-03-29 Alexandru Chiculita [CSS Filters] Trigger a repaint on elements with changed filter https://bugs.webkit.org/show_bug.cgi?id=82521 Reviewed by Dean Jackson. I've added ContextSensitivePropertyFilter and changed RenderStyle::diff to use it when the filter property is changed. In RenderObject::adjustStyleDifference the appropriate StyleDifferenceRepaintLayer or StyleDifferenceRecompositeLayer is used depending on whether the layer is painting filters in software or in hardware (composited). Tests: css3/filters/filter-change-repaint-composited.html css3/filters/filter-change-repaint.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::createFilterOperations): None was treated as an invalid value. * platform/graphics/ca/mac/PlatformCALayerMac.mm: Shadows were remaining behind. Fixed that. (PlatformCALayer::setFilters): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleWillChange): Repaint the layer when there is a layout change and a filter change. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): Making sure that the backing store is repainted when filters fallback to hardware. * rendering/RenderObject.cpp: (WebCore::RenderObject::adjustStyleDifference): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/RenderStyleConstants.h: 2012-03-29 Koji Ishii Vertical flow support for OpenType fonts with the least platform dependencies https://bugs.webkit.org/show_bug.cgi?id=81326 Reviewed by Dan Bernstein. This patch introduces a new class OpenTypeVerticalData to read vertical font metrics from OpenType fonts. Currently, WebKit relies on platform APIs to do the work. However, some platforms such as Windows lack support for all the capabilities WebKit requires for vertical flow and the text-orientation property to work correctly. Reading OpenType tables directly also gives benefits in consistent behavior among the WebKit platforms. This patch is for any platforms that want to parse OpenType tables directly, but it's currently included only in CGWin and isn't on any code path even on CGWin yet. Caller's side change for CGWin and support for other platforms will be in separate bugs. No new tests are required. No behavior changes. * WebCore.vcproj/WebCore.vcproj: Added OpenTypeTypes.h and OpenTypeVerticalData.h/cpp. * platform/SharedBuffer.cpp: Add create(size_t) (WebCore::SharedBuffer::SharedBuffer): (WebCore): * platform/SharedBuffer.h: Add create(size_t) (WebCore::SharedBuffer::create): (SharedBuffer): * platform/graphics/FontPlatformData.h: Added openTypeTable(). (WebCore): (FontPlatformData): * platform/graphics/SimpleFontData.h: Added sizePerUnit(). (WebCore::SimpleFontData::sizePerUnit): size() / unitsPerEm() for less multiplication. * platform/graphics/opentype/OpenTypeTypes.h: Added OpenType basic type definitions. (OpenType): (WebCore::OpenType::BigEndianShort::operator short): (WebCore::OpenType::BigEndianShort::BigEndianShort): (BigEndianShort): (WebCore::OpenType::BigEndianUShort::operator unsigned short): (WebCore::OpenType::BigEndianUShort::BigEndianUShort): (BigEndianUShort): (WebCore::OpenType::BigEndianLong::operator int): (WebCore::OpenType::BigEndianLong::BigEndianLong): (BigEndianLong): (WebCore::OpenType::BigEndianULong::operator unsigned): (WebCore::OpenType::BigEndianULong::BigEndianULong): (BigEndianULong): * platform/graphics/opentype/OpenTypeVerticalData.cpp: Added. (OpenType): (HheaTable): (VheaTable): (Entry): (VORGTable): (VertOriginYMetrics): (WebCore::OpenType::VORGTable::requiredSize): (WebCore): (WebCore::validatedPtr): (WebCore::OpenTypeVerticalData::OpenTypeVerticalData): (WebCore::OpenTypeVerticalData::advanceHeight): Advance height for a glyph. (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs): Vertical origin. * platform/graphics/opentype/OpenTypeVerticalData.h: Added. (WebCore): (OpenTypeVerticalData): A new class to handle vertical flow data in OpenType. (WebCore::OpenTypeVerticalData::isOpenType): (WebCore::OpenTypeVerticalData::hasVerticalMetrics): (WebCore::OpenTypeVerticalData::hasVORG): * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore): (WebCore::FontPlatformData::openTypeTable): Implemented openTypeTable() for Win32. 2012-03-29 Leo Yang [BlackBerry] Sync up PlatformMouseEvent https://bugs.webkit.org/show_bug.cgi?id=82567 Reviewed by Rob Buis. This patch is adding blackberry specific members to PlatformMouseEvent. Also re-base PlatformMouseEventBlackBerry to adapt to the re-factor of PlatformMouseEvent. * platform/PlatformMouseEvent.h: (PlatformMouseEvent): BlackBerry specific constructor. (WebCore::PlatformMouseEvent::inputMethod): Input source of mouse event for blackberry platform. * platform/blackberry/PlatformMouseEventBlackBerry.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): Re-base the constructor to adapt the re-factor of PlatformMouseEvent. 2012-03-29 Leo Yang [BlackBerry] Turn on STORE_FONT_CUSTOM_PLATFORM_DATA in CachedFont.cpp https://bugs.webkit.org/show_bug.cgi?id=82573 Reviewed by Rob Buis. Tests: covered by existing tests. * loader/cache/CachedFont.cpp: 2012-03-29 Adam Barth [Chromium] Attempt to fix the component build https://bugs.webkit.org/show_bug.cgi?id=82676 Reviewed by Dirk Pranke. Now that we're implementing some of the WEBKIT_EXPORT symbols in WebCore/platform/chromium/support, we need to tell the build system that we want to actually export these symbols. * WebCore.gyp/WebCore.gyp: 2012-03-29 Adam Barth Unreviewed, rolling out r112572. http://trac.webkit.org/changeset/112572 https://bugs.webkit.org/show_bug.cgi?id=82582 Does not compile in Windows component build * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-03-29 Adam Barth Unreviewed, rolling out r112579. http://trac.webkit.org/changeset/112579 https://bugs.webkit.org/show_bug.cgi?id=82657 Does not compile in Windows component build * WebCore.gypi: 2012-03-29 Adam Barth Unreviewed, rolling out r112611. http://trac.webkit.org/changeset/112611 https://bugs.webkit.org/show_bug.cgi?id=82676 Does not compile in Windows component build * WebCore.gyp/WebCore.gyp: 2012-03-29 Bear Travis Update shape-inside/shape-outside CSS Exclusion properties https://bugs.webkit.org/show_bug.cgi?id=82365 Reviewed by Ryosuke Niwa. Updating CSS property names for wrap-shape-inside and wrap-shape-outside to shape-inside and shape-outside, per the current exclusions spec. Renaming some parsing functions in CSSParser for clarity. No new functionality. * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseClipShape): (WebCore::CSSParser::parseExclusionShapeRect): (WebCore::CSSParser::parseExclusionShapeCircle): (WebCore::CSSParser::parseExclusionShapeEllipse): (WebCore::CSSParser::parseExclusionShapePolygon): (WebCore::CSSParser::parseExclusionShape): * css/CSSParser.h: * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-29 Ryan Sleevi [chromium] Update paths in GYP files https://bugs.webkit.org/show_bug.cgi?id=82663 Reviewed by Adam Barth. * WebCore.gypi: Remove PluginDataGtk.cpp following r112401 2012-03-29 Abhishek Arya Crash in GenericEventQueue::~GenericEventQueue. https://bugs.webkit.org/show_bug.cgi?id=81976 Reviewed by Eric Carlson. * dom/GenericEventQueue.cpp: (WebCore::GenericEventQueue::create): (WebCore): (WebCore::GenericEventQueue::GenericEventQueue): (WebCore::GenericEventQueue::enqueueEvent): (WebCore::GenericEventQueue::timerFired): * dom/GenericEventQueue.h: (GenericEventQueue): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::scheduleEvent): (WebCore::HTMLMediaElement::updateActiveTextTrackCues): (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): (WebCore::HTMLMediaElement::hasPendingActivity): * html/HTMLMediaElement.h: (HTMLMediaElement): 2012-03-29 Adam Barth [Chromium] Attempt to fix the component build https://bugs.webkit.org/show_bug.cgi?id=82676 Unreviewed. Now that we're implementing some of the WEBKIT_EXPORT symbols in WebCore/platform/chromium/support, we need to tell the build system that we want to actually export these symbols. * WebCore.gyp/WebCore.gyp: 2012-03-29 Nate Chapin Simplify reporting a main resource error to DocumentLoader and FrameLoader. https://bugs.webkit.org/show_bug.cgi?id=82649 Reviewed by Adam Barth. No new tests, no functionality change intended. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainReceivedError): Remove isComplete parameter, since it was always true. Call FrameLoader::receivedMainResourceError, instead of the other way around. * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedMainResourceError): Remove isComplete parameter, since it was always true. Merge in most of mainReceivedCompleteError(). * loader/FrameLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::receivedError): (WebCore::MainResourceLoader::didCancel): 2012-03-28 Jer Noble Heap-use-after-free in WebCore::InlineFlowBox::deleteLine due to fullscreen issues. https://bugs.webkit.org/show_bug.cgi?id=82055 Reviewed by David Hyatt. No new tests; fixes fuzz test crasher which is not reproducible in DRT or WKTR. When a RenderFullScreen object is inserted between a child and parent renderer, make sure the parent renderer deletes its line boxes by calling setNeedsLayoutAndPrefWidthsRecalc(). This forces its InlineBox renderers to be removed from the line boxes and their parents in the correct order, fixing a double-delete crash. The same is true when unwrapping the RenderFullScreen object, and when creating and inserting the full screen placeholder. * rendering/RenderFullScreen.cpp: (RenderFullScreen::wrapRenderer): (RenderFullScreen::unwrapRenderer): (RenderFullScreen::createPlaceholder): 2012-03-29 Benjamin Poulain Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly https://bugs.webkit.org/show_bug.cgi?id=82543 Reviewed by Andreas Kling. After the change to client based geolocation, the method positionChangedInternal() is called only by positionChanged(). This patch remove this extra indirection. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::positionChanged): * Modules/geolocation/Geolocation.h: (Geolocation): * WebCore.order: 2012-03-29 Joseph Pecoraro InputType attribute changed functions should happen after the attribute change https://bugs.webkit.org/show_bug.cgi?id=82644 Reviewed by Benjamin Poulain. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseAttribute): 2012-03-29 Bear Travis Update CSS Exclusion wrap-flow values left & right to start & end https://bugs.webkit.org/show_bug.cgi?id=82366 http://dev.w3.org/csswg/css3-exclusions/ -webkit-wrap-flow now takes the values start and end rather than left and right. Updating the code to reflect this. Functionality is covered by existing tests. Reviewed by Andreas Kling. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator WrapFlow): * rendering/style/RenderStyleConstants.h: 2012-03-29 Dirk Pranke rollout r112484, r112545, r112574 https://bugs.webkit.org/show_bug.cgi?id=82662 Unreviewed, build fix. this appears to be producing some questionable differences on the apple mac bots, and possibly one test on chromium linux. * css/mediaControls.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): * css/mediaControlsChromium.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * html/shadow/MediaControlElements.cpp: (RenderMediaVolumeSliderContainer): (WebCore): (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer): (WebCore::RenderMediaVolumeSliderContainer::layout): (WebCore::MediaControlVolumeSliderContainerElement::createRenderer): * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderContainerElement): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::create): 2012-03-29 Julien Chaffraix REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il https://bugs.webkit.org/show_bug.cgi?id=82129 Reviewed by Ojan Vafai. Tests: fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html This is a regression from r110072. I wrongly thought we should call ensureLayer if we create our RenderOverflow. However the current overflow code removes the before and start overflows (like in horizontal writing mode with ltr direction, we never have a top or a left overflow). Because of that we would not get a RenderLayer as expected and the overflow clip rects would be wrong on our RenderLayer children. * rendering/RenderBox.cpp: (WebCore::RenderBox::addLayoutOverflow): Moved the ensureLayer() call after the check that we do have some overflow but before we remove the overflow in some directions. 2012-03-29 Adam Barth [Chromium] Move ResourceHandle to WebCore/platform/network/chromium https://bugs.webkit.org/show_bug.cgi?id=82657 Reviewed by James Robinson. We finally arive at our destination. This patch actually moves WebCore::ResourceHandle from Source/WebKit/chromium/src to Source/WebCore/network/chromium, matching its location in other ports. To make this happen, we also need to move WrappedResourceRequest and WrappedResourceResponse. This patch is the last patch from https://github.com/abarth/webkit/compare/master...webcore-platform * WebCore.gypi: * platform/chromium/support/WrappedResourceRequest.h: Copied from Source/WebKit/chromium/src/WrappedResourceRequest.h. * platform/chromium/support/WrappedResourceResponse.h: Copied from Source/WebKit/chromium/src/WrappedResourceResponse.h. * platform/network/chromium/ResourceHandle.cpp: Copied from Source/WebKit/chromium/src/ResourceHandle.cpp. (WebCore::ResourceHandleInternal::ResourceHandleInternal): (WebCore::ResourceHandleInternal::start): (WebCore::ResourceHandle::loadResourceSynchronously): (WebCore::ResourceHandle::cacheMetadata): * platform/network/chromium/ResourceHandleInternal.h: Copied from Source/WebKit/chromium/src/ResourceHandleInternal.h. 2012-03-29 Patrick Gansterer Build fix for WinCE after r112555. * platform/text/wince/TextCodecWinCE.cpp: (WebCore::LanguageManager::LanguageManager): 2012-03-29 Anders Carlsson Images that reload via media queries don't paint when device scale factor changes https://bugs.webkit.org/show_bug.cgi?id=82648 Reviewed by Beth Dakin. Commit scale factor changes before dirty rect changes, since setting the scale factor can lead to more rects being dirtied when using the tile cache. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): 2012-03-29 Adam Barth Move CPP files related to ResourceHandle to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=82582 Reviewed by James Robinson. This patch moves a number of files that implement parts of the platform portion of the Chromium WebKit API from the WebKit layer to WebCore/platform. These files are in the dependency cone of ResourceHandle and have no dependencies on anything outside WebCore/platform. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/support: Added. * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp. * platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp. * platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp. * platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp. * platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp. * platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp. * platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h. * platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp. * platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h. 2012-03-29 Michal Mocny [chromium] Ensure framebuffer exists at the start of beginDrawingFrame. https://bugs.webkit.org/show_bug.cgi?id=82569 Reviewed by James Robinson. Updated LayerRendererChromiumTest unittests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::beginDrawingFrame): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::requestReadbackOnImplThread): 2012-03-29 Ryosuke Niwa Add a compile assert for the size of RenderBlock https://bugs.webkit.org/show_bug.cgi?id=82586 Reviewed by Tony Chang. Add compile asserts for the size of RenderBlock and RenderBlock::MarginValues. We can't add asserts for FloatingObject and MarginInfo because they're private to RenderBlock. * rendering/RenderBlock.cpp: (SameSizeAsRenderBlock): (WebCore): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::adjustForBorderFit): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::shouldPaint): (WebCore::RenderBlock::FloatingObject::setShouldPaint): (WebCore::RenderBlock::FloatingObject::isDescendant): (WebCore::RenderBlock::FloatingObject::setIsDescendant): (FloatingObject): (RenderBlock): 2012-03-29 Gavin Barraclough Template the Yarr::Interpreter on the character type https://bugs.webkit.org/show_bug.cgi?id=82637 Reviewed by Sam Weinig. We should be able to call to the interpreter after having already checked the character type, without having to re-package the character pointer back up into a string! * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::findMagicComment): * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::match): - Don't pass length. 2012-03-29 Sheriff Bot Unreviewed, rolling out r112553. http://trac.webkit.org/changeset/112553 https://bugs.webkit.org/show_bug.cgi?id=82638 It made all tests crash on Qt WK2 (Requested by Ossy_away on #webkit). * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::stop): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::requestPermission): (WebCore::Geolocation::startUpdating): (WebCore::Geolocation::stopUpdating): * Modules/geolocation/Geolocation.h: (WebCore): * Modules/geolocation/GeolocationController.cpp: * Modules/geolocation/GeolocationController.h: * WebCore.exp.in: * page/GeolocationClient.h: (WebCore): (GeolocationClient): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): (WebCore::Page::geolocationController): 2012-03-29 Caio Marcelo de Oliveira Filho HashMap<>::add should return a more descriptive object https://bugs.webkit.org/show_bug.cgi?id=71063 Reviewed by Ryosuke Niwa. Update code to use AddResult instead of a pair. No new tests, just a refactoring. * Modules/webdatabase/SQLTransactionCoordinator.cpp: (WebCore::SQLTransactionCoordinator::acquireLock): * Modules/webdatabase/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::updateDatabaseSize): * bindings/js/DOMObjectHashTableMap.h: (WebCore::DOMObjectHashTableMap::get): * bindings/js/JSDOMBinding.cpp: (WebCore::cacheDOMStructure): * bindings/js/JSDOMBinding.h: (WebCore::cacheWrapper): * bindings/js/JSDOMGlobalObject.h: (WebCore::getDOMConstructor): * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::startObjectInternal): (WebCore::CloneSerializer::write): * bindings/v8/NPV8Object.cpp: (WebCore::npCreateV8ScriptObject): * bridge/IdentifierRep.cpp: (WebCore::IdentifierRep::get): * bridge/NP_jsobject.cpp: (ObjectMap::add): * css/CSSComputedStyleDeclaration.cpp: (WebCore::logUnimplementedPropertyID): * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): (WebCore::CSSFontSelector::getFontData): * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::appendAuthorStylesheets): (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSValuePool.cpp: (WebCore::CSSValuePool::createIdentifierValue): (WebCore::CSSValuePool::createColorValue): (WebCore::CSSValuePool::createValue): (WebCore::CSSValuePool::createFontFamilyValue): (WebCore::CSSValuePool::createFontFaceValue): * dom/CheckedRadioButtons.cpp: (WebCore::RadioButtonGroup::add): (WebCore::CheckedRadioButtons::addButton): * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel): * dom/Document.cpp: (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): (WebCore::Document::getCSSCanvasElement): (WebCore::Document::getItems): * dom/DocumentEventQueue.cpp: (WebCore::DocumentEventQueue::enqueueEvent): (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): (WebCore::DocumentEventQueue::pendingEventTimerFired): * dom/DocumentOrderedMap.cpp: (WebCore::DocumentOrderedMap::add): * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::add): * dom/Node.cpp: (WebCore::Node::dumpStatistics): (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::collectMatchingObserversForMutation): * dom/QualifiedName.cpp: (WebCore::QualifiedName::init): * dom/SpaceSplitString.cpp: (WebCore::SpaceSplitStringData::create): * dom/StyledElement.cpp: (WebCore::StyledElement::updateAttributeStyle): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::append): * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::diff): * inspector/InspectorCSSAgent.cpp: (WebCore::SelectorProfile::commitSelector): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::performSearch): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resolveBreakpoint): * inspector/InspectorValues.h: (WebCore::InspectorObject::setValue): (WebCore::InspectorObject::setObject): (WebCore::InspectorObject::setArray): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::addEntry): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup): * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): * page/PageGroup.cpp: (WebCore::PageGroup::pageGroup): (WebCore::PageGroup::addVisitedLink): (WebCore::PageGroup::addUserScriptToWorld): (WebCore::PageGroup::addUserStyleSheetToWorld): * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::compileSubtargetList): * platform/cf/BinaryPropertyList.cpp: (WebCore::BinaryPropertyListPlan::writeInteger): (WebCore::BinaryPropertyListPlan::writeString): (WebCore::BinaryPropertyListPlan::writeIntegerArray): * platform/graphics/blackberry/LayerTiler.cpp: (WebCore::LayerTiler::addTileJob): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::findOrMakeClone): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::revalidateTiles): * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon): * platform/graphics/chromium/FontUtilsChromiumWin.cpp: (WebCore::getDerivedFontData): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability): * platform/graphics/mac/ComplexTextControllerATSUI.cpp: (WebCore::initializeATSUStyle): * platform/graphics/mac/SimpleFontDataCoreText.cpp: (WebCore::SimpleFontData::getCFStringAttributes): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::canRenderCombiningCharacterSequence): * platform/graphics/wince/FontPlatformData.cpp: (WebCore::FixedSizeFontData::create): * platform/gtk/RenderThemeGtk3.cpp: (WebCore::getStyleContext): * platform/mac/ThreadCheck.mm: (WebCoreReportThreadViolation): * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::add): * platform/network/HTTPHeaderMap.h: (HTTPHeaderMap): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::addHTTPHeaderField): * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::add): (WebCore::PluginDatabase::loadPersistentMetadataCache): * plugins/win/PluginDatabaseWin.cpp: (WebCore::PluginDatabase::getPluginPathsInDirectories): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addPercentHeightDescendant): * rendering/RenderBlockLineLayout.cpp: (WebCore::setLogicalWidthForTextRun): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::setRenderBoxRegionInfo): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): * storage/StorageMap.cpp: (WebCore::StorageMap::setItem): (WebCore::StorageMap::importItem): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setRequestHeaderInternal): * xml/XPathFunctions.cpp: (WebCore::XPath::FunId::evaluate): * xml/XPathPath.cpp: (WebCore::XPath::LocationPath::evaluate): * xml/XPathPredicate.cpp: (WebCore::XPath::Union::evaluate): 2012-03-29 Andrey Kosyakov Web Inspector: improve window selection accuracy in vertical overview of timeline panel https://bugs.webkit.org/show_bug.cgi?id=82625 Reviewed by Vsevolod Vlasov. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineVerticalOverview): (WebInspector.TimelineVerticalOverview.prototype._renderBars): preserve actual padding used while rendering bars. (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes): account for outer and inter-bars padding when calculating bar offsets. 2012-03-29 Mark Pilgrim GEOLOCATION should be implemented as Page Supplement https://bugs.webkit.org/show_bug.cgi?id=82228 Reviewed by Adam Barth. Geolocation now uses the Supplement interface instead of keeping an instance variable on Page. This allows us to remove all geolocation-related functions, variables, and ifdefs out of Page and into Modules/geolocation/. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::stop): (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::requestPermission): (WebCore::Geolocation::startUpdating): (WebCore::Geolocation::stopUpdating): * Modules/geolocation/Geolocation.h: (WebCore): * Modules/geolocation/GeolocationController.cpp: (WebCore::GeolocationController::supplementName): (WebCore): (WebCore::provideGeolocationTo): * Modules/geolocation/GeolocationController.h: (GeolocationController): (WebCore::GeolocationController::from): * WebCore.exp.in: * page/GeolocationClient.h: (WebCore): (GeolocationClient): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): 2012-03-29 John Bates Sync up WebKit TraceEvent.h with chromium trace_event.h https://bugs.webkit.org/show_bug.cgi?id=82527 Reviewed by James Robinson. * platform/chromium/TraceEvent.h: 2012-03-29 Pavel Feldman Web Inspector: subtree disapears from