2010-02-26 Kwang Yul Seo Reviewed by Kenneth Rohde Christiansen. [BREWMP] Port EventHandler https://bugs.webkit.org/show_bug.cgi?id=34796 Add platform-specific code required to implement EventHandler. * page/brew/EventHandlerBrew.cpp: Added. (WebCore::EventHandler::tabsToAllControls): (WebCore::EventHandler::focusDocumentView): (WebCore::EventHandler::passWidgetMouseDownEventToWidget): (WebCore::EventHandler::passMouseDownEventToWidget): (WebCore::EventHandler::eventActivatedView): (WebCore::EventHandler::passSubframeEventToSubframe): (WebCore::EventHandler::passWheelEventToWidget): (WebCore::EventHandler::passMousePressEventToSubframe): (WebCore::EventHandler::passMouseMoveEventToSubframe): (WebCore::EventHandler::passMouseReleaseEventToSubframe): (WebCore::EventHandler::accessKeyModifiers): 2010-02-26 Leandro Pereira Reviewed by NOBODY. Add EFL port files to platform/efl. http://webkit.org/b/35087 * WebCore/platform/efl/ClipboardEfl.cpp: Added. * WebCore/platform/efl/PopupMenuEfl.cpp: Added. * WebCore/platform/efl/SharedTimerEfl.cpp: Added. * WebCore/platform/efl/RenderThemeEfl.h: Added. * WebCore/platform/efl/Language.cpp: Added. * WebCore/platform/efl/CookieJarEfl.cpp: Added. * WebCore/platform/efl/MIMETypeRegistryEfl.cpp: Added. 2010-02-26 Robert Kroeger Reviewed by Nate Chapin To fire each event handler registered on an SVG node once per event, Chromium needs an implementation of wasCreatedFromMarkup added to V8LazyEventListener.h that matches the one in WebKit/WebCore/bindings/js/JSLazyEventListener.h. This patch adds such a matching implementation of wasCreatedFromMarkup to V8LazyEventListener.h. https://bugs.webkit.org/show_bug.cgi?id=35325 * bindings/v8/V8LazyEventListener.h: (WebCore::V8LazyEventListener::wasCreatedFromMarkup): 2010-02-26 Arno Renevier Reviewed by Gustavo Noronha Silva. [Gtk] use geoclue_position_get_position_async to get geolocation position. https://bugs.webkit.org/show_bug.cgi?id=35355 No new tests, behaviour depends on system. * platform/gtk/GeolocationServiceGtk.cpp: (WebCore::GeolocationServiceGtk::startUpdating): (WebCore::GeolocationServiceGtk::get_position): * platform/gtk/GeolocationServiceGtk.h: 2010-02-26 Yaar Schnitman Chromium Win build fix. * WebCore.gyp/WebCore.gyp: Added missing file to action input. 2010-02-12 Brett Wilson Reviewed by Adam Barth. Update the Google-URL version of KURL and the V8 bindings to the new behavior of KURL.IsStandard. https://bugs.webkit.org/show_bug.cgi?id=34859 This is covered by fast/dom/Window/invalid-protocol.html * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::protocolAccessorSetter): * platform/KURLGoogle.cpp: (WebCore::KURL::setProtocol): (WebCore::KURL::isHierarchical): 2010-02-26 Gavin Barraclough Reviewed by NOBODY (Build fix following r55312). * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::invokeMethod): 2010-02-26 Yaar Schnitman Reviewed by Dimitri Glazkov. [V8] Auto-generate and split DerivedSourcesAllInOne.cpp https://bugs.webkit.org/show_bug.cgi?id=33048 * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: Added. * bindings/v8/DerivedSourcesAllInOne.cpp: Removed. 2010-02-26 Gavin Barraclough Reviewed by NOBODY (Build fix following r55312). * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapInstance::invokeMethod): 2010-02-26 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=35450 Crash when a Java array property accessor raises an exception Test: java/inaccessible-class.html * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::valueFromInstance): Check if the result is null before interpreting it as an object or array. 2010-02-26 Dirk Schulze Reviewed by Nikolas Zimmermann. Extend AffineTransform to mapQuad https://bugs.webkit.org/show_bug.cgi?id=35444 This makes mapQuad available for AffineTransform. So that platforms can make use of it after the switch from TransformationMatrix to AffineTransform in GraphicsContext. * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::mapRect): mapRect already did the calculation for mapQuad but gave back the boundingBox of the resulting FloatQuad. (WebCore::AffineTransform::mapQuad): * platform/graphics/transforms/AffineTransform.h: 2010-02-26 Brady Eidson Reviewed by Pavel Feldman. Arrow keys do not scroll source view in Resources pane or Scripts pane. and https://bugs.webkit.org/show_bug.cgi?id=34356 Handle vertical scrolling in the Text Viewer: * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): Listen for the keydown event. (WebInspector.TextViewer.prototype._handleKeyDown): If the event has no modifiers and refers to an arrow key, scroll. The horizontal values were ripped from the default "pixels per scroll line" value in ScrollBar.h. 2010-02-26 Gavin Barraclough Reviewed by Alexey Proskuryakov. Bug 35401 - Fix handling of errors in handling calls over bridge, where base object bridge-type does not match method bridge-type. The code assumes users will only attempt to invoke a Java method on a Java base object, etc. Add language specific subclasses of RuntimeMethod, and pass the RuntimeMethod into invokeMethod, so we can typecheck before casting. Throw an exception on type mismatch. * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):new class to distinguish this type of RuntimeMethod. (JSC::Bindings::CInstance::getMethod): create an appropriate sublclass of RuntimeMethod. (JSC::Bindings::CInstance::invokeMethod): dynamically check the type of the RuntimeMethod. * bridge/c/c_instance.h: * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::JavaRuntimeMethod): new class to distinguish this type of RuntimeMethod. (JavaInstance::getMethod): create an appropriate sublclass of RuntimeMethod. (JavaInstance::invokeMethod): dynamically check the type of the RuntimeMethod. * bridge/jni/jsc/JavaInstanceJSC.h: * bridge/jsc/BridgeJSC.h: * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: (ObjcRuntimeMethod::ObjcRuntimeMethod): new class to distinguish this type of RuntimeMethod. (ObjcInstance::getMethod): create an appropriate sublclass of RuntimeMethod. (ObjcInstance::invokeMethod): dynamically check the type of the RuntimeMethod. (ObjcInstance::invokeObjcMethod): new method, takes an ObjcMethod* as an argument so that we don't need to dynamically determine the type. * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): use new invokeObjcMethod method. * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): pass RuntimeMethod as argument to invokeMethod, rather than its MethodList. * bridge/runtime_object.cpp: (JSC::RuntimeObject::methodGetter): use new getMethod method. 2010-02-26 Oliver Hunt Reviewed by Geoff Garen. Make the lookup table generator include an explicit cast to expected type of the function. We do this because otherwise the blind intptr_t cast that is subsequently applied allows incorrectly typed functions to be inserted into the table, where they will only fail at runtime. This change makes such errors produce a compile time failure. * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorJS.pm: >>>>>>> .r55317 2010-02-26 Alex Milowski Reviewed by Kenneth Rohde Christiansen. Added basic support for the munder, munderover, and mover elements. Tests: mathml/presentation/over.xhtml mathml/presentation/under.xhtml mathml/presentation/underover.xhtml * WebCore.xcodeproj/project.pbxproj: * mathml/MathMLInlineContainerElement.cpp: (WebCore::MathMLInlineContainerElement::createRenderer): * mathml/RenderMathMLUnderOver.cpp: Added. (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): (WebCore::RenderMathMLUnderOver::addChild): (WebCore::getOffsetHeight): (WebCore::RenderMathMLUnderOver::stretchToHeight): (WebCore::RenderMathMLUnderOver::layout): (WebCore::RenderMathMLUnderOver::baselinePosition): (WebCore::RenderMathMLUnderOver::nonOperatorHeight): * mathml/RenderMathMLUnderOver.h: Added. (WebCore::RenderMathMLUnderOver::hasBase): (WebCore::RenderMathMLUnderOver::): 2010-02-24 Stephen White Reviewed by Darin Adler. This CL implements a simple ad-hoc parser for CSS rgb() values. If it fails, it returns false and the normal lex/yacc parser will be invoked. https://bugs.webkit.org/show_bug.cgi?id=35362 Covered by fast/canvas/canvas-bg.html, fast/canvas/canvas-bg-zoom.html, and many more. * css/CSSParser.cpp: (WebCore::parseInt): (WebCore::CSSParser::parseColor): 2010-02-26 Jarkko Sakkinen Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=35419 3D canvas did not update when WTF_USE_ACCELERATED_COMPOSITING was enabled but not from run-time settings. Added run-time check that compositing is enabled. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::markContextChanged): 2010-02-26 Jarkko Sakkinen Reviewed by Kenneth Rohde Christiansen. Compilation failed because functions glSampleCoverage, glBlendEquation and glActiveTexture were not available. https://bugs.webkit.org/show_bug.cgi?id=35423 * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::sampleCoverage): 2010-02-26 Jarkko Sakkinen Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=35380 Fixed compilation error when WTF_USE_ACCELERATED_COMPOSITING=0 * css/MediaQueryEvaluator.cpp: (WebCore::transform_3dMediaFeatureEval): 2010-02-26 Nicholas Young Reviewed by Tor Arne Vestbø. [Qt] Incorrect painting after a size changed. https://bugs.webkit.org/show_bug.cgi?id=35412 No new tests. Bug fix in backend. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivate::paint): Provide the source rectangle, rather than inferring it. 2010-02-26 Nicholas Young Reviewed by Tor Arne Vestbø. [Qt] Incorrect handling of MIME types in Media Player https://bugs.webkit.org/show_bug.cgi?id=35413 No new tests. Bug fix in backend. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivate::supportsType): Corrected logic. 2010-02-26 Joanmarie Diggs Reviewed by Xan Lopez. https://bugs.webkit.org/show_bug.cgi?id=35418 [Gtk] Every table, including layout tables, should be exposed as a table This patch exposes layout tables as tables. (Addressing the problematic table hierarchy remains to be done.) * accessibility/gtk/AccessibilityObjectAtk.cpp: (AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/AccessibilityRenderObject.cpp: (AccessibilityRenderObject::determineAccessibilityRole): 2010-02-26 Adam Barth Reviewed by Darin Adler. XSSAuditor is super super super slow https://bugs.webkit.org/show_bug.cgi?id=35373 In this patch, we separate the decoding cache for the page's URL and form data. Previously, we used the same cache for both, which caused us miss the cache every time when the page had form data (because the cache only stored one entry). When the form data is large, we were wasting a lot of time canonicalizing. * page/XSSAuditor.cpp: (WebCore::XSSAuditor::findInRequest): * page/XSSAuditor.h: 2010-02-26 Dirk Schulze Reviewed by Nikolas Zimmermann. SVGResourceClipper needs to be moved to RenderSVGResourceClipper https://bugs.webkit.org/show_bug.cgi?id=35421 Move SVGResourceClipper to RenderSVGResourceClipper. This follows the changes of Masker and helps to clean up the SVG code. Code snippets from SVGClipPathElement and SVGResourceClipper got combined in RenderSVGResourceClipper. DRT results are more readable for clipPath's now. It's possible to see the unit type of clipper, as well as it's childs instead of just one path. * Android.mk: * GNUmakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderSVGResource.h: (WebCore::): * rendering/RenderSVGResourceClipper.cpp: Added. (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper): (WebCore::RenderSVGResourceClipper::invalidateClients): (WebCore::RenderSVGResourceClipper::invalidateClient): (WebCore::RenderSVGResourceClipper::applyResource): (WebCore::RenderSVGResourceClipper::resourceBoundingBox): * rendering/RenderSVGResourceClipper.h: Added. (WebCore::RenderSVGResourceClipper::renderName): (WebCore::RenderSVGResourceClipper::resourceType): (WebCore::RenderSVGResourceClipper::clipPathUnits): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): (WebCore::SVGRenderBase::clipperBoundingBoxForRenderer): (WebCore::SVGRenderBase::deregisterFromResources): * rendering/SVGRenderTreeAsText.cpp: (WebCore::operator<<): (WebCore::writeStyle): (WebCore::writeSVGResource): (WebCore::writeResources): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::svgAttributeChanged): (WebCore::SVGClipPathElement::childrenChanged): (WebCore::SVGClipPathElement::createRenderer): * svg/SVGClipPathElement.h: (WebCore::SVGClipPathElement::isValid): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::invalidateResources): * svg/graphics/SVGResource.h: (WebCore::): (WebCore::SVGResource::isPaintServer): (WebCore::SVGResource::isFilter): (WebCore::SVGResource::isMarker): * svg/graphics/SVGResourceClipper.cpp: Removed. * svg/graphics/SVGResourceClipper.h: Removed. 2010-02-26 Ben Murdoch Reviewed by Kenneth Rohde Christiansen. The element that a touchevent is dispatched to isn't always right https://bugs.webkit.org/show_bug.cgi?id=35431 The element that touch events are dispatched on is not always the correct one, as the cached m_touchEventTarget member is only updated when the first element of the PlatformTouchEvent touch list is in the TouchPressed state. This patch changes this behavior to dispatch the event to the target of the touch that caused the event to be generated and eliminates the m_touchEventTarget in favour of using the touch target hashmap. It also simplifies the way in which the touchTargets list is generated as we no longer have m_touchEventTarget (which was used previously to build the list). The new behavior matches the observed behavior of the iPhone and Android. * page/EventHandler.cpp: (WebCore::assembleTargetTouches): Added. new function to build the targetTouches list. Filters a list of touches (passed) about another given touch. (WebCore::EventHandler::handleTouchEvent): Remove the m_touchEventTarget member, and simplify the generation of the TouchLists that are bundled with the TouchEVent object. Dispatch the event to the target of the touch that caused the event to be fired. * page/EventHandler.h: Remove m_touchEventTarget. 2010-02-26 Dirk Pranke Reviewed by Darin Fisher. Fix the handling of updates to #hash fragments to check for differences post-canonicalization rather than comparing pre- to post-. Chromium had a bug where we would set the #hash on an about:blank URL and generate an onload event because we thought the URL (not just the fragment) was changing. http://bugs.webkit.org/show_bug.cgi?id=35180 Test: fast/loader/about-blank-hash-change.html * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::hashAccessorSetter): 2010-02-26 Zhenyao Mo Reviewed by David Levin. texImage2D and texSubImage2D taking ImageData ignore flipY and premultiplyAlpha https://bugs.webkit.org/show_bug.cgi?id=34459 Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::texImage2D): Apply flipY and premultiplyAlpha to the texture data. (WebCore::WebGLRenderingContext::texSubImage2D): Ditto. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): Extract data from ImageData, applying flipY and premultiplyAlpha. * platform/graphics/GraphicsContext3D.h: Add function extractImageData declaration. 2010-02-26 Zhenyao Mo Reviewed by David Levin. Set viewport to canvas size upon context creation https://bugs.webkit.org/show_bug.cgi?id=35057 Covered by existing tests, in particular fast/canvas/webgl/gl-get-calls.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): Set the viewport size to match the canvas size. 2010-02-26 Pavel Feldman Not reviewed: touch InspectorController to force front-end deployment. * inspector/InspectorController.cpp: 2010-02-26 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: While the current timeline view in DevTools provides a great overview of things happening, we should make it easier to locate the cause of an event, e.g., link to JS where relevant. Caller info support for all kind of Timeline events and new Function Call event will be added. JSC can be patched the same way as it will be done for V8. https://bugs.webkit.org/show_bug.cgi?id=33995 * bindings/js/ScriptCallStack.cpp: (WebCore::ScriptCallStack::callLocation): * bindings/js/ScriptCallStack.h: * bindings/v8/ScriptCallStack.cpp: (WebCore::ScriptCallStack::create): (WebCore::ScriptCallStack::callLocation): * bindings/v8/ScriptCallStack.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::willCallFunction): (WebCore::InspectorTimelineAgent::didCallFunction): (WebCore::InspectorTimelineAgent::pushCurrentRecord): * inspector/InspectorTimelineAgent.h: (WebCore::): (WebCore::InspectorTimelineAgent::instanceCount): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createGenericRecord): (WebCore::TimelineRecordFactory::createFunctionCallData): * inspector/TimelineRecordFactory.h: * inspector/front-end/Popover.js: (WebInspector.Popover.prototype.hideWhenClicked): (WebInspector.Popover.prototype._positionElement): * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._formatRecord): (WebInspector.TimelinePanel.prototype._getRecordDetails): (WebInspector.TimelinePanel.prototype.reset): (WebInspector.TimelinePanel.prototype._closeRecordDetails): (WebInspector.TimelinePanel.prototype._onScroll): (WebInspector.TimelinePanel.prototype._refresh): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelineRecordListRow): (WebInspector.TimelineRecordListRow.prototype.update): (WebInspector.TimelineRecordListRow.prototype._createCell): (WebInspector.TimelineRecordListRow.prototype._createRow): (WebInspector.TimelineRecordListRow.prototype._createLinkRow): (WebInspector.TimelineRecordListRow.prototype._generateBubbleContent): (WebInspector.TimelineRecordListRow.prototype._onClick): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.js: (WebInspector.linkifyResourceAsNode): 2010-02-26 Csaba Osztrogonác Unreviewed. Roll-out r55263 because it broke fast/forms/textarea-type-spaces-pretty-diff.html. https://bugs.webkit.org/show_bug.cgi?id=30946 * editing/CompositeEditCommand.cpp: (WebCore::isWhitespace): (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): * editing/InsertTextCommand.h: * editing/htmlediting.cpp: * editing/htmlediting.h: 2010-02-25 Mark Rowe Reviewed by Brady Eidson. REGRESSION(r55205): Crash inside dispatchEventsOnWindowAndFocusedNode when clicking link from bookmarks view Null-check the document's page to avoid dereferencing a null page. No regression test is added as this appears to be dependent on an interaction with Safari's bookmarks view that is not testable from within DumpRenderTree. * page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode): 2010-02-25 Oliver Hunt Reviewed by Simon Fraser. Multiple repaints on apple.com https://bugs.webkit.org/show_bug.cgi?id=35409 apple.com was triggering the fast scaling path for background images due to repeated repaints as more content came in. This occured due to a two problems in the logic to detect scaling. The first is that the main context is flipped on mac so fails the identity or translation check. We work around this by adding an function that allows the scaling for a flipped CTM. The other problem was that we were looking at the destination rect size instead of the destination tile size when deciding if the size we were drawn at would cause scaling. * platform/graphics/transforms/AffineTransform.h: (WebCore::AffineTransform::isIdentityOrTranslationOrFlipped): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality): (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2010-02-25 Enrica Casucci Reviewed by Adele Peterson. Extra layout on keypress after a space (problem with rebalanceWhitespaceAt in InsertTextCommand). https://bugs.webkit.org/show_bug.cgi?id=30946 Do text insertion and whitespace rebalancing around the insertion in one step so that there's only one layout. This patch was originally made by Justin Garcia. Test: editing/inserting/rebalance-whitespace-1.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): No behavior changes here, just pushed the code that determined the extent of whitespace surrounding a position to its own helper function. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::insertTextIntoNodeAndRebalanceWhitespace): Added. Find whitespace surrounding the insertion position, add the text to insert, rebalance that entire string, then insert it into the document. (WebCore::InsertTextCommand::input): * editing/InsertTextCommand.h: * editing/htmlediting.cpp: (WebCore::isWhitespace): Moved from CompositeEditCommand.cpp. (WebCore::extentOfWhitespaceForRebalancingAt): Moved code from rebalanceWhitespaceAt into this helper function. Obtains the offset of the start and end of whitespace around a particular position. * editing/htmlediting.h: 2010-02-25 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=35406 Make generic array methods work with JavaArray Test: java/array-sort.html Made RuntimeArray inherit from JSArray, keeping the promise given in ClassInfo. * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): (JSC::RuntimeArray::~RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::classInfo): (JSC::RuntimeArray::getConcreteArray): 2010-02-25 Dan Bernstein Reviewed by Alexey Proskuryakov. Fixed a regression introduced in r44243, which made the assertion in checkListItems() ineffective. * dom/SelectElement.cpp: (WebCore::SelectElementData::checkListItems): Copy the items vector before recomputing it, then assert that the newly-computed vector is equal to the copy. 2010-02-25 Dirk Schulze Reviewed by Nikolas Zimmermann. SVG's tspan is no member of SVGRenderBase, this can cause crashes on filters https://bugs.webkit.org/show_bug.cgi?id=35354 This makes the base class RenderSVGInline of RenderSVGTSpan and RenderSVGInlineText dependent on SVGBaseRenderer. The SVG spec want as to use the object bounding box of the text root as the bounding box for text-childs. So we search for the text root and use it's bounding box, stroke rect and repaint rect for further calculations. Test: svg/filters/filter-on-tspan.svg * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::objectBoundingBox): Find the text root and give back it's bounding box. (WebCore::RenderSVGInline::strokeBoundingBox): same for stroke rect (WebCore::RenderSVGInline::repaintRectInLocalCoordinates): same for repaint rect * rendering/RenderSVGInline.h: (WebCore::RenderSVGInline::toSVGRenderBase): RenderSVGInline is part of SVGRenderBase now. * rendering/RenderSVGTSpan.h: (WebCore::RenderSVGTSpan::renderName): Removed bounding box code. Was just a hack for filters and maskers. * rendering/SVGRenderSupport.cpp: (WebCore::findTextRootObject): Search for the text root. * rendering/SVGRenderSupport.h: * svg/graphics/SVGPaintServerGradient.cpp: moved findTextRootObject to SVGRenderSupport 2010-02-25 Dirk Schulze Reviewed by Nikolas Zimmermann. Use-element doesn't transform clipPath https://bugs.webkit.org/show_bug.cgi?id=35375 If the use element is a child of clipPath, any settings on x, y or transform does not transform the clipPath it references. The use-element just misses this transformation in toClipPath. Test: svg/custom/use-on-clip-path-with-transformation.svg * platform/graphics/cairo/PathCairo.cpp: Gtk port translated the path to the wrong direction. (WebCore::Path::translate): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::toClipPath): 2010-02-25 Jian Li Reviewed by Dmitry Titov. File.type support. https://bugs.webkit.org/show_bug.cgi?id=35361 Test: LayoutTests/editing/pasteboard/file-input-files-access.html * html/File.cpp: (WebCore::File::File): * html/File.h: (WebCore::File::type): * html/File.idl: 2010-02-25 Alexander Pavlov Reviewed by Pavel Feldman. Javascript console should not attempt to scroll to end of console if console is not visible https://bugs.webkit.org/show_bug.cgi?id=22992 * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView): (WebInspector.ConsoleView.prototype._scheduleScrollIntoView): (WebInspector.ConsoleView.prototype.addMessage): 2010-02-25 Alexey Proskuryakov Qt and Gtk build fixes. * GNUmakefile.am: * WebCore.pro: Added CRuntimeObject.{c,cpp}. 2010-02-25 Alexey Proskuryakov Windows build fix. * WebCore.vcproj/WebCore.vcproj: Added CRuntimeObject.{c,cpp}. 2010-02-25 Alexey Proskuryakov Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=35394 Make passing objects between Java and plug-ins work * WebCore.PluginHostProcess.exp: WebKit now subclasses RuntimeObject, so it needed more exports. * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeObject): (JSC::Bindings::callRuntimeConstructor): Assert that a runtime object is passed as function. * bridge/runtime_object.h: Moved RuntimeObject into Bindings namespace, matching other related classes. * bridge/jni/jni_jsobject.mm: (JavaJSObject::toString): Pass rootObject to convertValueToJValue(). It's not needed when constructing a string, but this function now takes it for the sake of Object. (JavaJSObject::convertValueToJObject): Check that object class is JavaRuntimeObject, not just RuntimeObject. * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::setValueToInstance): Pass rootObject to convertValueToJValue(). (JavaArray::setValueAt): Ditto. * bridge/jni/jsc/JNIUtilityPrivate.h: convertValueToJValue() now takes a RootObject argument, because one is needed to gcProtect an object ghtat is wrapped into JSObject. * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Convert JavaScript objects to Java JSObject ones. This was already happening in other code paths, which we should change to use common code. * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::newRuntimeObject): Create an appropriate RuntimeObject subclass, which is JavaRuntimeObject for Java. (JavaInstance::invokeMethod): Unwrap returned JavaObjects that contain JS objects. * WebCore.xcodeproj/project.pbxproj: * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/c/CRuntimeObject.cpp: Added. (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::~CRuntimeObject): (JSC::Bindings::CRuntimeObject::getInternalCInstance): * bridge/c/CRuntimeObject.h: Added. (JSC::Bindings::CRuntimeObject::classInfo): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::newRuntimeObject): * bridge/c/c_instance.h: * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): * bridge/jni/jsc/JavaInstanceJSC.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: Added. (JSC::Bindings::): (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::~JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::getInternalJavaInstance): * bridge/jni/jsc/JavaRuntimeObject.h: Added. (JSC::Bindings::JavaRuntimeObject::classInfo): * bridge/jsc/BridgeJSC.h: * bridge/objc/ObjCRuntimeObject.h: Added. (JSC::Bindings::ObjCRuntimeObject::classInfo): * bridge/objc/ObjCRuntimeObject.mm: Added. (JSC::Bindings::): (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::~ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::getInternalObjCInstance): * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: (ObjcInstance::newRuntimeObject): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * bridge/runtime_root.h: Added RuntimeObject subclasses for each instance type, and use them for type casting. 2010-02-25 Gustavo Noronha Silva Rubber-stamped by Xan Lopez. Adopt the same string as the one that is expected by fast/parser/fragment-parser.html for the description used by the element. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::searchableIndexIntroduction): 2010-02-25 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: evaluate-on-hover does not work on HTML files. https://bugs.webkit.org/show_bug.cgi?id=35378 * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/SourceHTMLTokenizer.js: (WebInspector.SourceHTMLTokenizer): (WebInspector.SourceHTMLTokenizer.prototype.set line): (WebInspector.SourceHTMLTokenizer.prototype._isExpectingAttribute): (WebInspector.SourceHTMLTokenizer.prototype._isExpectingAttributeValue): (WebInspector.SourceHTMLTokenizer.prototype._setExpectingAttribute): (WebInspector.SourceHTMLTokenizer.prototype._setExpectingAttributeValue): (WebInspector.SourceHTMLTokenizer.prototype._attrValueTokenType): (WebInspector.SourceHTMLTokenizer.prototype.nextToken): * inspector/front-end/SourceHTMLTokenizer.re2js: * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer): * inspector/front-end/SourceJavaScriptTokenizer.re2js: * inspector/front-end/SourceTokenizer.js: (WebInspector.SourceTokenizer.prototype.set condition): (WebInspector.SourceTokenizer.prototype.get condition): (WebInspector.SourceTokenizer.prototype.get subTokenizer): (WebInspector.SourceTokenizer.prototype.getLexCondition): (WebInspector.SourceTokenizer.prototype.setLexCondition): * inspector/front-end/TextEditorHighlighter.js: (WebInspector.TextEditorHighlighter): (WebInspector.TextEditorHighlighter.prototype.set mimeType): (WebInspector.TextEditorHighlighter.prototype.highlight): (WebInspector.TextEditorHighlighter.prototype._highlightInChunks): (WebInspector.TextEditorHighlighter.prototype._highlightLines): (WebInspector.TextEditorHighlighter.prototype._highlightLine): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._paintLine): 2010-02-25 Xan Lopez Reviewed by Gustavo Noronha. Simple style cleanups. * plugins/gtk/PluginViewGtk.cpp: (WebCore::plugRemovedCallback): (WebCore::plugAddedCallback): (WebCore::PluginView::platformStart): 2010-02-25 Andreas Kling Reviewed by Darin Adler. Optimize decoding of Latin-1 text by exploiting the fact that most of it will be ASCII-only data. https://bugs.webkit.org/show_bug.cgi?id=35233 * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): 2010-02-25 Pavel Feldman Reviewed by Dimitri Glazkov. Web Inspector: make script lines count calculation lazy. https://bugs.webkit.org/show_bug.cgi?id=35392 * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.get linesCount): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._addBreakpoint): 2010-02-25 James Choi Reviewed by David Levin. Change hardcoded gcc paths to be Solaris friendly https://bugs.webkit.org/show_bug.cgi?id=35213 * bindings/scripts/CodeGeneratorObjC.pm: * bindings/scripts/IDLParser.pm: * css/make-css-file-arrays.pl: * dom/make_names.pl: 2010-02-25 Xan Lopez Reviewed by Gustavo Noronha. Workaround Java plugins not drawing themselves properly on first expose by doing a late size-allocate after 'plug-added' has been emitted on the embedding GtkSocket. It's unclear to me if this is a bug in our side or theirs, but this should be pretty safe and fixes the annoyance while we investigate it further. * plugins/gtk/PluginViewGtk.cpp: (WebCore::plugAddedCallback): (WebCore::PluginView::platformStart): 2010-02-23 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. Add missing include guards * loader/CrossOriginPreflightResultCache.h: * loader/MainResourceLoader.h: 2010-02-25 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Restrict the optimization flags for Symbian to release builds. * WebCore.pro: 2010-02-25 Jarkko Sakkinen Reviewed by Kenneth Rohde Christiansen. Qt WebGL support Adds GraphicsContext3D QtWebKit implementation. https://bugs.webkit.org/show_bug.cgi?id=35153 * WebCore.pri: * WebCore.pro: * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: Added. (WebCore::GraphicsContext3DInternal::isValid): (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): (WebCore::GraphicsContext3DInternal::getProcAddress): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformTexture): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::beginPaint): (WebCore::GraphicsContext3D::endPaint): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFunc): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::clearColor): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::cullFace): (WebCore::GraphicsContext3D::depthFunc): (WebCore::GraphicsContext3D::depthMask): (WebCore::GraphicsContext3D::depthRange): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disable): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::drawArrays): (WebCore::GraphicsContext3D::drawElements): (WebCore::GraphicsContext3D::enable): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::finish): (WebCore::GraphicsContext3D::flush): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::frontFace): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::hint): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isEnabled): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::scissor): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFunc): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMask): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOp): (WebCore::GraphicsContext3D::stencilOpSeparate): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4i): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::vertexAttrib1f): (WebCore::GraphicsContext3D::vertexAttrib1fv): (WebCore::GraphicsContext3D::vertexAttrib2f): (WebCore::GraphicsContext3D::vertexAttrib2fv): (WebCore::GraphicsContext3D::vertexAttrib3f): (WebCore::GraphicsContext3D::vertexAttrib3fv): (WebCore::GraphicsContext3D::vertexAttrib4f): (WebCore::GraphicsContext3D::vertexAttrib4fv): (WebCore::GraphicsContext3D::vertexAttribPointer): (WebCore::GraphicsContext3D::viewport): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getFloatv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): (WebCore::GraphicsContext3D::deleteTexture): (WebCore::GraphicsContext3D::sizeInBytes): (WebCore::GraphicsContext3D::synthesizeGLError): (WebCore::GraphicsContext3D::getImageData): 2010-02-25 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Swap images for activate and deactivate breakpoints. https://bugs.webkit.org/show_bug.cgi?id=35383 * WebCore.gypi: * inspector/front-end/Images/breakpointsActivateButtonGlyph.png: Renamed from WebCore/inspector/front-end/Images/deactivateBreakpointsButtonGlyph.png. * inspector/front-end/Images/breakpointsDeactivateButtonGlyph.png: Renamed from WebCore/inspector/front-end/Images/deactivateBreakpointsDisabledButtonGlyph.png. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: 2010-02-25 Gustavo Noronha Silva Reviewed by Xan Lopez. Go back on symlink resolution if we are loading the flash plugin, and the path contains /netscape/, following what Chromium does. Thanks to Evan Martin for the help on this! * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::load): 2010-02-25 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Scripts panel shows blank source when stopping on a breakpoint on refresh. https://bugs.webkit.org/show_bug.cgi?id=35232 * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.canShowSourceLine): (WebInspector.Panel.prototype.showSourceLine): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.canShowSourceLine): (WebInspector.ResourcesPanel.prototype.showSourceLine): * inspector/front-end/Script.js: (WebInspector.Script): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype.get searchableViews): (WebInspector.ScriptsPanel.prototype.addScript): (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished): (WebInspector.ScriptsPanel.prototype.addBreakpoint): (WebInspector.ScriptsPanel.prototype.removeBreakpoint): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype.canShowSourceLine): (WebInspector.ScriptsPanel.prototype.showSourceLine): (WebInspector.ScriptsPanel.prototype._scriptOrResourceForURLAndLine): (WebInspector.ScriptsPanel.prototype.showView): (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): (WebInspector.ScriptsPanel.prototype._showScriptOrResource): (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu.optionCompare): (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._addBreakpoint): * inspector/front-end/inspector.js: (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector._choosePanelToShowSourceLine): (WebInspector.canShowSourceLine): (WebInspector.showSourceLine): 2010-02-25 Ben Murdoch Reviewed by Kenneth Rohde Christiansen. The target element of a Touch should be the target where that touch originated, not where it is now. https://bugs.webkit.org/show_bug.cgi?id=34585 Currently the target of a touch is set to the resulting node of the hit test where the touch currently is. This does not match the behavior of iPhone or Android. This patch uses a hashmap on the EventHandler to keep track of the target element when a touch is first started. This target is then used as the target for subsequent touches with the same id. This matches observed behavior on iPhone and Android. Tests: fast/events/touch/touch-target.html: Added. fast/events/touch/basic-single-touch-events.html: Updated. * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): Store the originating target element of a touch in a hashmap so that we can reuse that target for future events caused by that touch. This matches observed behavior on iPhone and Android. * page/EventHandler.h: Add hashmap as a member. * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::id): Store the touch point id as unsigned. * platform/qt/PlatformTouchPointQt.cpp: (WebCore::PlatformTouchPoint::PlatformTouchPoint): Cast platform touch id from signed to unsigned. Qt API docs state that it will always be >= 0. 2010-02-24 Antonio Gomes Reviewed by Simon Fraser. Patch by Antonio Gomes Add a convenient center() method to IntRect https://bugs.webkit.org/show_bug.cgi?id=35346 As it is a convenience method, and implemention is based on FloatRect's one, patch does not provide a layout test. * platform/graphics/IntRect.h: (WebCore::IntRect::center): 2010-02-25 Andrey Kosyakov Reviewed by Pavel Feldman. Fake workers implementation that simulates workers using iframe and timer, needed to support workers debugging. Also, a facility to inject scripts into inspected page upon load. https://bugs.webkit.org/show_bug.cgi?id=35148 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::addScriptToEvaluateOnLoad): (WebCore::InspectorBackend::removeAllScriptsToEvaluateOnLoad): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::addScriptToEvaluateOnLoad): (WebCore::InspectorController::removeAllScriptsToEvaluateOnLoad): * inspector/InspectorController.h: * inspector/front-end/InjectedFakeWorker.js: Added. (InjectedFakeWorker.Worker): (InjectedFakeWorker.FakeWorker): (InjectedFakeWorker.FakeWorker.prototype.postMessage): (InjectedFakeWorker.FakeWorker.prototype.terminate): (InjectedFakeWorker.FakeWorker.prototype._onmessageWrapper): (InjectedFakeWorker.FakeWorker.prototype._dispatchMessage): (InjectedFakeWorker.FakeWorker.prototype._handleException): (InjectedFakeWorker.FakeWorker.prototype._buildWorker): (InjectedFakeWorker.FakeWorker.prototype._setupWorkerContext.handler): (InjectedFakeWorker.FakeWorker.prototype._setupWorkerContext): (InjectedFakeWorker.FakeWorker.prototype._importScripts): (InjectedFakeWorker.FakeWorker.prototype._loadScript): (InjectedFakeWorker.URL): (InjectedFakeWorker.URL.prototype.urlRegEx.split): (InjectedFakeWorker.URL.prototype.mockLocation): (InjectedFakeWorker.URL.prototype.completeWith): (InjectedFakeWorker.URL.prototype.sameOrigin): (InjectedFakeWorker.DOMCoreException.formatError): (InjectedFakeWorker.DOMCoreException): (InjectedFakeWorker.noop): * inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.setInjectedScriptSource): (.WebInspector.InspectorBackendStub.prototype.addScriptToEvaluateOnLoad): (.WebInspector.InspectorBackendStub.prototype.removeAllScriptsToEvaluateOnLoad): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2010-02-24 Nicholas Young Reviewed by Eric Carlson. Add mediaPlayerOwningDocument() to MediaPlayerClient. https://bugs.webkit.org/show_bug.cgi?id=35374 No new tests. These are interface changes only. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Implementation for media element. * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerOwningDocument): New virtual method. 2010-02-24 Andreas Kling Reviewed by Kenneth Rohde Christiansen. Optimized Font::normalizeSpaces() by caching the String::characters() instead of repeatedly calling operator[] https://bugs.webkit.org/show_bug.cgi?id=35336 * platform/graphics/Font.cpp: (WebCore::Font::normalizeSpaces): 2010-02-24 Jungshik Shin Reviewed by David Levin. [Chromium] Traditional Chinese Chrome on Windows should use PMingLiu instead of Simsun for Han characters https://bugs.webkit.org/show_bug.cgi?id=35319 No visible change in the layout test. * platform/graphics/chromium/FontUtilsChromiumWin.cpp: (WebCore::): 2010-02-24 Anthony Ricaud Reviewed by Pavel Feldman. Web Inspector: Reduce the timer to show the eval popover https://bugs.webkit.org/show_bug.cgi?id=35344 * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._mouseMove): 2010-02-24 Jay Campan Reviewed by David Levin. Don't show the autofill popup when the input text is disabled or read only. Test: manual-tests/chromium/no-autofill-on-readonly.html https://bugs.webkit.org/show_bug.cgi?id=35129 * src/EditorClientImpl.cpp: (WebKit::EditorClientImpl::autofill): * manual-tests/chromium/no-autofill-on-readonly.html: Added. 2010-02-24 Dominic Mazzoni Reviewed by Jeremy Orlow. Wraps includes of SVG headers so that it's possible to compile the V8 bindings with SVG disabled, e.g. 'enable_svg=0'. https://bugs.webkit.org/show_bug.cgi?id=35345 No new tests. * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8Proxy.cpp: * bindings/v8/custom/V8CSSValueCustom.cpp: * bindings/v8/custom/V8DocumentCustom.cpp: * bindings/v8/custom/V8ElementCustom.cpp: * bindings/v8/custom/V8EventCustom.cpp: * bindings/v8/custom/V8SVGElementCustom.cpp: 2010-02-24 Maciej Stachowiak Unreviewed build fix. Fix gtk build. Include JSC headers as runtime/ instead of JavaScriptCore/ * bindings/js/JSDOMWrapper.h: * bindings/js/ScriptWrappable.h: 2010-02-24 Maciej Stachowiak Reviewed by Oliver Hunt. Cache JavaScript wrappers inline in DOM nodes https://bugs.webkit.org/show_bug.cgi?id=35226 7.4% speedup on Dromaeo DOM Core tests. 2.3% speedup on Hixie DOM Core tests. This fixes the following things from the last attempt: - Now builds in both debug and release and passes all tests - Properly use a WeakGCPtr, not just a raw pointer, in ScriptWrappable - Properly look in the appropriate per-document or per-world map - Added an assert that would have caught any of the problems I found - Handle clearing the inline cache properly in all cases * bindings/js/JSDOMBinding.cpp: (WebCore::cacheDOMObjectWrapper): Adjust for name changes. (WebCore::forgetDOMNode): Clear wrapper pointer. (WebCore::cacheDOMNodeWrapper): Cache inline too if caching for normal world. * bindings/js/JSDOMBinding.h: (WebCore::Document::getWrapperCache): Inlined. (WebCore::domObjectWrapperMapFor): Renamed to start with lowercase. Moved to header to inline. * bindings/js/JSDOMWrapper.h: Added. (WebCore::DOMObject::DOMObject): Factored this out of JSDOMBinding.h to avoid include cycle. I think the class should be renamed, I picked a forward-looking header name because we already have a DOMObject.h * bindings/js/JSNodeCustom.cpp: (WebCore::createWrapperInline): Renamed version of original createWrapper. (WebCore::createWrapper): Call createWrapperInline. Out-of-line version. (WebCore::toJSNewlyCreated): Call createWrapperInline instead of createWrapper. * bindings/js/JSNodeCustom.h: Added. (WebCore::getCachedDOMNodeWrapper): Moved from JSDOMBinding.cpp and moved here, so it could inline everywhere without creating an include cycle. Consider inline cache. (WebCore::toJS): Moved to header to inline. * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::ScriptWrappable): Implement this in the obvious way for JavaScriptCore. (Using a WeakGCPtr). (WebCore::ScriptWrappable::wrapper): (WebCore::ScriptWrappable::setWrapper): (WebCore::ScriptWrappable::clearWrapper): * bindings/scripts/CodeGeneratorJS.pm: Include CustomHeader heaaders in the header, not just the impl file, so they can add inlining. * dom/Node.idl: Add CustomHeader directive. Add new files to build. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2010-02-24 Jochen Eisinger Reviewed by Jeremy Orlow. Expose Database object of currently active task on the database thread https://bugs.webkit.org/show_bug.cgi?id=35341 * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::databaseThread): * storage/DatabaseThread.h: (WebCore::DatabaseThread::getDatabaseOfCurrentTask): 2010-02-24 Nicholas Young Reviewed by Eric Carlson. supportsMuting() should be an internal interface between MediaPlayer and MediaPlayerPrivate. https://bugs.webkit.org/show_bug.cgi?id=35327 No new tests. Refactoring Only. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setMuted): Do not check supportsMuting() (WebCore::HTMLMediaElement::updateVolume): Set volume and muted * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::setVolume): Check supportsMuting() (WebCore::MediaPlayer::setMuted): Check supportsMuting() * platform/graphics/MediaPlayer.h: Remove supportsMuting() 2010-02-24 Adam Barth Reviewed by Darin Fisher. [Chromium API] Disambiguate allowJavaScript from didNotAllowScript https://bugs.webkit.org/show_bug.cgi?id=35205 For clients that want to show a user interface element when JavaScript was blocked on a page, we need to disambiguate between querying the client for whether JavaScript is enabled from actually failing to execute some script. This patch adds a new FrameLoaderClient callback for when WebCore would like to execute JavaScript but fails to because JavaScript is disabled. This patch also touches every client of canExecuteScripts so they can indicate whether we should make this callback. I was hoping there was a better choke point, but my first two attempts were wrong in subtle ways. pkasting points out that this will be easy to screw up in the future, so it's better to make all the clients be explicit. * WebCore.PluginHostProcess.exp: * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::canExecuteScripts): (WebCore::ScriptController::executeScript): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::bindingRootObject): (WebCore::ScriptController::windowScriptNPObject): (WebCore::ScriptController::jsObjectForPluginElement): (WebCore::ScriptController::executeScriptInWorld): * bindings/js/ScriptController.h: (WebCore::): * bindings/js/ScriptControllerMac.mm: (WebCore::ScriptController::windowScriptObject): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setJavaScriptPaused): * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/js/ScriptState.cpp: (WebCore::scriptStateFromNode): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::windowScriptNPObject): (WebCore::ScriptController::createScriptObjectForPluginElement): * bindings/v8/ScriptController.h: (WebCore::): * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::retrieve): * dom/ScriptElement.cpp: (WebCore::ScriptElementData::evaluateScript): * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::startElementNs): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::controls): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): (WebCore::HTMLTokenizer::processToken): * inspector/InspectorController.cpp: (WebCore::canPassNodeToJavaScript): * loader/FrameLoader.cpp: (WebCore::FrameLoader::isProcessingUserGesture): (WebCore::FrameLoader::open): (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds): (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::didNotAllowScript): 2010-02-24 Adam Barth Reviewed by Darin Fisher. Add call to FrameLoaderClient::allowPlugins everywhere arePluginsEnabled is called https://bugs.webkit.org/show_bug.cgi?id=34997 If we want to let the FrameLoaderClient override arePluginsEnabled, then we need to call out to the FrameLoaderClient every time we read the setting. We don't have testing infrustructure for these changes, which is lame. I'm supposed to fix that in Bug 33991. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase): * loader/PluginDocument.cpp: (WebCore::PluginTokenizer::writeRawData): * page/Page.cpp: (WebCore::Page::pluginData): * plugins/MimeType.cpp: (WebCore::MimeType::enabledPlugin): 2010-02-24 James Robinson Reviewed by Dmitry Titov. Do not fire focus events while a modal dialog is up. https://bugs.webkit.org/show_bug.cgi?id=33962 Modifies the FocusController to check the frame's page's defersLoading() flag before firing blur/focus events. This flag is set while a modal dialog (like a window.alert or window.confirm) is up. Firing the events causes assertion failures, since when the dialog is dismissed the PageGroupLoadDeferrer assumes that no script has run. Manual tests only as DumpRenderTree does not support modal dialogs * manual-tests/modal-dialog-blur-selfclose.html: Added. * manual-tests/modal-dialog-blur.html: Added. * page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode): 2010-02-24 Dan Bernstein Reviewed by Anders Carlsson. innerHTML applies meta/link/title tags from a detached html element Test: fast/parser/fragment-parser.html Ensure that fragment parsing has no side effects on the fragment’s owner document. * html/HTMLParser.cpp: (WebCore::HTMLParser::insertNode): Don’t call dispatchDocumentElementAvailable() for fragments. (WebCore::HTMLParser::handleError): Don’t copy attributes to the owner document’s and elements when a redundant or is encountered while parsing a fragment. (WebCore::HTMLParser::framesetCreateErrorCheck): Don’t change the owner document’s element’s style when parsing a fragment. (WebCore::HTMLParser::createHead): Don’t attach the new to the ownder document of a fragment. 2010-02-24 David Levin Reviewed by Darin Adler. Need to create a CanvasSurface base class for HTMLCanvasElement. https://bugs.webkit.org/show_bug.cgi?id=35322 This is an initial step in making the OffscreenCanvas object. No new functionality so no new tests. * GNUmakefile.am: Added CanvasSurface to the build. * WebCore.gypi: ditto * WebCore.pro: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * dom/CanvasSurface.cpp: Added. * dom/CanvasSurface.h: Added. * html/HTMLCanvasElement.h: Made HTMLCanvasElement inherit from CanvasSurface. 2010-02-24 Peter Kasting Reviewed by Adam Barth. Fix regression in calculating an animated image's start time. https://bugs.webkit.org/show_bug.cgi?id=35115 * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): 2010-02-24 Dan Bernstein Reviewed by Simon Fraser. Text with :first-letter lingers after being removed Test: fast/css/first-letter-set-text.html * rendering/RenderTextFragment.cpp: (WebCore::RenderTextFragment::setTextInternal): Set this back as the text node’s renderer, as removing the first letter has resets the node’s renderer. 2010-02-24 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Faster cut-off for rectangle fill without shadow. https://bugs.webkit.org/show_bug.cgi?id=35337 * platform/graphics/qt/GraphicsContextQt.cpp: 2010-02-24 Jocelyn Turcotte Reviewed by nobody, build fix. [Qt] Corrects build break of QtLauncher on Windows. The VERSION variable was not set anymore while building in trunk. * WebCore.pro: 2010-02-24 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Activate/Deactivate breaks does not look consistent with rest of the toolbar. Fix style and add the new images to the related file sets. https://bugs.webkit.org/show_bug.cgi?id=35307 * WebCore.gypi: * inspector/front-end/Images/deactivateBreakpointsButtonGlyph.png: * inspector/front-end/Images/deactivateBreakpointsDisabledButtonGlyph.png: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: 2010-02-24 Xan Lopez Reviewed by Gustavo Noronha. Get rid of an extra call to setNPWindowIfNeeded. updatePluginWidget already calls this for us if needed. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformStart): 2010-02-24 Xan Lopez Reviewed by Gustavo Noronha. Try to sanitize a bit the geometry management of plugins. Stop doing contradictory things in updatePluginWidget (we were at the same time pretending the geometry setting was delayed until ::paint and setting the geometry not once but twice) and just set it any time the windowRect or clipRect for the plugin has changed. This is closer to what the Mac port does, and fixes instances of the plugins not being drawn until the window is resized or scrolled. Other than that all manual and layout tests seems to still work. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::setNPWindowIfNeeded): 2010-02-23 Geoff Garen Reviewed by Oliver Hunt. Simplify animation lifetime handling. Previously we manually determined whether our base element was safe when we unregistered our listener, now we simply ensure that the base element itself registers and unregisters the animation listener. * svg/animation/SVGSMILElement.cpp: (WebCore::ConditionEventListener::create): (WebCore::ConditionEventListener::disconnectAnimation): (WebCore::ConditionEventListener::ConditionEventListener): (WebCore::ConditionEventListener::operator==): (WebCore::ConditionEventListener::handleEvent): (WebCore::SVGSMILElement::eventBaseFor): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): * svg/animation/SVGSMILElement.h: 2010-02-23 Dmitry Titov Reviewed by David Levin. Chromium: Use V8::TerminateExecution to actually terminate workers. https://bugs.webkit.org/show_bug.cgi?id=35137 Test: existing fast/workers/stress-js-execution.html which is currently failing on Mac and Linux bots for Chromium. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::evaluate): * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::forbidExecution): 2010-02-23 Enrica Casucci Reviewed by Simon Fraser. REGRESSION: WebKit crashes when deleting images on blogger.com (34957) https://bugs.webkit.org/show_bug.cgi?id=34957 Fixing a regression introduced with revision 53085. Anchor elements should not be considered in editable content when calculating the position in the parent before the node. Test: editing/execCommand/delete-image-in-anchor.html * dom/Position.cpp: (WebCore::Position::getInlineBoxAndOffset): 2010-02-23 Tony Chang Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=34634 Pasting a list into the middle of another list item should split the target list item into two separate list items. This matches the behavior in other browsers. Test: editing/pasteboard/paste-list-004.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): 2010-02-23 Brady Eidson Reviewed by Tim Hatcher and Pavel Feldman. Regression (r55107) - WebInspector docking is busted. https://bugs.webkit.org/show_bug.cgi?id=35274 * inspector/InspectorController.cpp: (WebCore::InspectorController::canAttachWindow): Use the minimum height for this calculation, not the preferred height. (WebCore::InspectorController::attachWindow): attachWindow() shouldn't decide the policy, as it is often called partway through the show or dock procedure after some of the initial conditions have changed. Let the front-end itself and the InspectorClient's make the policy decision at the start of the show/dock operation. * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::canAttachWindow): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/inspector.js: (WebInspector.toggleAttach): Before attaching, ask the front-end-host if attaching is allowed. 2010-02-23 Mark Rowe Reviewed by Geoff Garen. ImageSourceCG::frameIsCompleteAtIndex returns false for all frames until image has completed loading CGImageSourceGetStatusAtIndex claims that all frames of a multi-frame image are incomplete when we've not yet received the complete data for an image that is using an incremental data source (). We work around this by special-casing all frames except the last in an image and treating them as complete if they are present and reported as being incomplete. We do this on the assumption that loading new data can only modify the existing last frame or append new frames. The last frame is only treated as being complete if the image source reports it as such. This ensures that it is truly the last frame of the image rather than just the last that we currently have data for. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::frameIsCompleteAtIndex): 2010-02-23 Enrica Casucci Reviewed by Darin Adler. Crash in createContextualFragment when inserting a list in a non HTML document. https://bugs.webkit.org/show_bug.cgi?id=35305 createFragmentFromMarkup did not handle correctly the case where documentElement is not an HTMLElement. The static cast to HTMLElement was causing createContextualFragment to crash. Test: editing/execCommand/insert-list-xml.xhtml * dom/Element.cpp: (WebCore::Element::createContextualFragment): Added. * dom/Element.h: Added createContextualFragment virtual function. * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Removed static cast to HTMLElement. * html/HTMLElement.cpp: (WebCore::HTMLElement::createContextualFragment): Modified to perform only checks that are specific for an HTMLElement object. The rest of the logic has been moved to the corresponding method in the Element class. 2010-02-23 Steve Falkenburg Reviewed by Adam Roben. WebCore should stop throwing away the CGImageSourceRef on Windows to improve GIF performance https://bugs.webkit.org/show_bug.cgi?id=35309 * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): 2010-02-23 Leandro Pereira Reviewed by Gustavo Noronha Silva. Changes references of GOwnPtr to reflect their new place. http://webkit.org/b/35084 * WebCore/platform/KURL.cpp * WebCore/platform/TextEncoding.cpp: * WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp: * WebCore/platform/text/gtk/TextCodecGtk.cpp: 2010-02-23 Brady Eidson Reviewed by Alexey Proskuryakov. HTTP 307 after a 303 after a POST re-sends POST data from the original request. and https://bugs.webkit.org/show_bug.cgi?id=31410 Test: http/tests/loading/307-after-303-after-post.html Remember the last HTTP method send out during a redirect chain for a resource handle: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::lastHTTPMethod): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): Refer to the last HTTP method used instead of the original method: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): (WebCore::ResourceHandle::willSendRequest): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::willSendRequest): (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): 2010-02-23 Crystal Zhang Unreviewed build fix. Fix build error when enable plugin proxy: 'toRenderEmbeddedObject' identifier not found. As RenderEmbeddedObject inherits RenderPartObject and 'toRenderEmbeddedObject' belongs to former one. * html/HTMLMediaElement.cpp: 2010-02-23 Evan Martin Reviewed by Jeremy Orlow. [chromium] fix previous SVG-disabling patch https://bugs.webkit.org/show_bug.cgi?id=35298 * WebCore.gypi: rename variable * WebCore.gyp/WebCore.gyp: actually use the variable 2010-02-23 Michael Lotz Reviewed by David Levin. [Haiku] Fix conversion from BString to String https://bugs.webkit.org/show_bug.cgi?id=35082 The previous patch to this file was broken (sorry). First of all, the conversion from UTF8 was accidentally removed. Second, for empty strings, we need to point the implementation at StringImpl::empty(). Covered by existing tests. * platform/text/haiku/StringHaiku.cpp: (WebCore::String::String): 2010-02-23 Tor Arne Vestbø Reviewed by Eric Carlson. [Qt] Prevent the media backend from handling non-audio or -video mime types * platform/graphics/qt/MediaPlayerPrivateQt.cpp: 2010-02-23 Evan Martin Reviewed by Jeremy Orlow. [chromium] Allow building without SVG https://bugs.webkit.org/show_bug.cgi?id=31522 * WebCore.gyp/WebCore.gyp, WebCore.gypi: test enable_svg flag. * bindings/v8/custom/V8SVGDocumentCustom.cpp, bindings/v8/custom/V8SVGPathSegCustom.cpp: test ENABLE(SVG). 2010-02-23 Leandro Pereira Reviewed by Gustavo Noronha Silva. Fixes references to GOwnPtr and GRefPtr so the GTK+ port builds again. http://webkit.org/b/35084 * WebCore/platform/gtk/DataObjectGtk.h: * WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 2010-02-23 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Faster cut-off for rectangle drawing without shadow. https://bugs.webkit.org/show_bug.cgi?id=35267 * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): 2010-02-23 Steve Block Reviewed by Jeremy Orlow. Removes redundant Settings::setGeolocationEnabled and Settings::geolocationEnabled https://bugs.webkit.org/show_bug.cgi?id=35242 No new tests, removing dead code only. * page/Settings.cpp: * page/Settings.h: 2010-02-23 Ben Murdoch Reviewed by Eric Seidel. pageX/Y co-ordinates of TouchEvent should be 0,0 https://bugs.webkit.org/show_bug.cgi?id=35239 The co-ordinates attached to a touch event are not used for tracking touch motion, rather the co-ordinates attached to Touches within the touch event should be used. Set the co-ordinates on the event itself to 0 to avoid confusion and match observed iPhone behavior. * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): Set the pageX/Y and screenX/Y co-ordinates attached to the touch event to 0,0 to match observed behavior on the iPhone. * page/EventHandler.h: Remove now unused members m_firstTouchScreenPos and m_firstTouchPagePos. 2010-02-23 Stephan Aßmus Reviewed by Eric Seidel. [Haiku] Various improvements to EventHandlerHaiku. https://bugs.webkit.org/show_bug.cgi?id=34685 Covered by existing tests. Fix the build by not including PlatformScrollBar.h. * page/haiku/EventHandlerHaiku.cpp: (WebCore::isKeyboardOptionTab): Use the correct keycode for tab keys. (WebCore::EventHandler::focusDocumentView): Use proper locking. In any case, Haiku doesn't append platform widgets to WebCore widgets. But if it did, this implementation would be correct. (WebCore::EventHandler::passWidgetMouseDownEventToWidget): Implemented. (WebCore::EventHandler::eventActivatedView): Removed notImplemented() and added note. (WebCore::EventHandler::passMousePressEventToSubframe): Implemented. (WebCore::EventHandler::passMouseMoveEventToSubframe): Implemented. (WebCore::EventHandler::passMouseReleaseEventToSubframe): Implemented. (WebCore::EventHandler::accessKeyModifiers): Added note. 2010-02-23 Tony Chang Not reviewed. Revert r55135 because the layout test is failing on all the bots. https://bugs.webkit.org/show_bug.cgi?id=34634 * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): 2010-02-17 Steve Block Reviewed by Ariya Hidayat. Adds cache to store Geolocation positions between browser sessions. https://bugs.webkit.org/show_bug.cgi?id=34084 This is required to fully implement the Geolocation maximumAge property. See Bug 30676. No new tests, will add tests for maximumAge once complete. * Android.mk: Modified. Added GeolocationPositionCache.cpp * GNUmakefile.am: Modified. Added GeolocationPositionCache.[cpp|h] * WebCore.gypi: Modified. Added GeolocationPositionCache.[cpp|h] * WebCore.pro: Modified. Added GeolocationPositionCache.[cpp|h] * WebCore.vcproj/WebCore.vcproj: Modified. Added GeolocationPositionCache.[cpp|h] * WebCore.xcodeproj/project.pbxproj: Modified. Added GeolocationPositionCache.[cpp|h] * page/GeolocationPositionCache.cpp: Added. (WebCore::GeolocationPositionCache::GeolocationPositionCache): (WebCore::GeolocationPositionCache::~GeolocationPositionCache): (WebCore::GeolocationPositionCache::setCachedPosition): (WebCore::GeolocationPositionCache::cachedPosition): (WebCore::GeolocationPositionCache::setDatabasePath): (WebCore::GeolocationPositionCache::readFromDB): (WebCore::GeolocationPositionCache::writeToDB): * page/GeolocationPositionCache.h: Added. 2010-02-23 Yuta Kitamura Reviewed by Dan Bernstein. Fix alignment of vertical-align: text-bottom inside an inline-block. This patch is based on a fix provided by Takahito Hirano. display: inline-block + vertical-align: text-bottom causes misalignment. https://bugs.webkit.org/show_bug.cgi?id=30846 Test: fast/inline-block/inline-block-vertical-align-2.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::verticalPosition): Fixed vpos calculation. We cannot cut corners for inline blocks, since they may have their own text metrics. 2010-02-23 Steve Block Reviewed by David Levin. Sets default values of V8 runtime enabler flags to match behavior with JSC https://bugs.webkit.org/show_bug.cgi?id=35095 No new tests, modifies a Chromium feature only. * bindings/generic/RuntimeEnabledFeatures.cpp: Modified. Sets appcache and geolocation flag defaults to 'on' * storage/Database.cpp: Modified. Sets database flag default to 'on'. 2010-02-23 Stephan Aßmus Reviewed by Eric Seidel. [Haiku] Fix various issues in keyboard event generation. https://bugs.webkit.org/show_bug.cgi?id=34685 Covered by existing tests. Fixed backspace keycode. Fixed using the appropriate fields from the Haiku event for mapping to the VK_* codes and added mapping a great deal more codes. Added extraction of modifier key flags. Completed implementation of disambiguateKeyDownEvent() Implemented currentCapsLockState(). * platform/haiku/PlatformKeyboardEventHaiku.cpp: (WebCore::keyIdentifierForHaikuKeyCode): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): (WebCore::PlatformKeyboardEvent::currentCapsLockState): 2010-02-23 Steve Block Reviewed by Darin Adler. Adds Client::cancelGeolocationPermissionRequestForFrame and ChromeClient::cancelGeolocationPermissionRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=34962 These methods are required so that a Geolocation object can cancel an asynchronous permission request. This allows the chrome client to cancel any UI it is showing for the permission request. No new tests, as this is for the purposes of browser UI only. * loader/EmptyClients.h: Modified (WebCore::EmptyChromeClient::cancelGeolocationPermissionRequestForFrame): Added * page/Chrome.cpp: Modified. (WebCore::Chrome::cancelGeolocationPermissionRequestForFrame): Added * page/Chrome.h: Modified. * page/ChromeClient.h: Modified. (WebCore::ChromeClient::cancelGeolocationPermissionRequestForFrame): Added * page/Geolocation.cpp: Modified. (WebCore::Geolocation::disconnectFrame): Modified. Call cancelGeolocationPermissionRequestForFrame 2010-02-23 Tony Chang Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=34634 Pasting a list into the middle of another list item should split the target list item into two separate list items. This matches the behavior in other browsers. Test: editing/pasteboard/paste-list-004.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::insertAsListItems): 2010-02-23 Jocelyn Turcotte Reviewed by Laszlo Gombos. [Qt] Correct build problems while building QtWebKit inside Qt. https://bugs.webkit.org/show_bug.cgi?id=34975 * WebCore.pro: Change the condition !standalone_package to !QTDIR_build 2010-02-23 Noam Rosenthal Reviewed by Ariya Hidayat. [Qt] Connect video with accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=35276 MediaControlPrivate and GraphicsLayer are patched together via a shared PlatformLayer (QGraphicsItem). This patch makes sure that the QGraphicsVideoItem from MediaControl becomes part of the scene associsated with GraphicsLayer Test: http://double.co.nz/video_test/test1.html with AC turned on * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::): mediaLayer member (WebCore::GraphicsLayerQtImpl::opaqueArea): video is opaque (WebCore::GraphicsLayerQtImpl::paint): don't paint video (WebCore::GraphicsLayerQtImpl::flushChanges): flush mediaLayer (WebCore::GraphicsLayerQt::setContentsToMedia): notify * platform/graphics/qt/GraphicsLayerQt.h: reimp setContentsToMedia * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): m_compositing (WebCore::MediaPlayerPrivate::paint): don't paint if compositing (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged): reimp from MediaPlayerPrivateInterface to support AC (WebCore::MediaPlayerPrivate::platformLayer): ditto * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering): ditto 2010-02-23 Stephan Aßmus Reviewed by Eric Seidel. Fix various issues in PlatformWheelEventHaiku. https://bugs.webkit.org/show_bug.cgi?id=34685 Covered by existing tests. Fixed coding style violations. Synced extracting the correct coordinates with Haiku WebKit implementation. Added extracting modifier key flags. * platform/haiku/PlatformWheelEventHaiku.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2010-02-23 Laszlo Gombos Reviewed by Eric Seidel. Build fix for PluginView https://bugs.webkit.org/show_bug.cgi?id=35230 No new tests, build fix only. * plugins/PluginView.cpp: * plugins/PluginView.h: * plugins/PluginViewNone.cpp: 2010-02-23 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Port ScriptController::createScriptInstanceForWidget https://bugs.webkit.org/show_bug.cgi?id=34413 * bindings/js/ScriptControllerBrew.cpp: Added. (WebCore::ScriptController::createScriptInstanceForWidget): 2010-02-23 José Millán Soto Reviewed by Eric Seidel. [Gtk] Webkit crashes when using orca https://bugs.webkit.org/show_bug.cgi?id=35169 Made webkit_accessible_text_get_caret_offset check if end selection node is null. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_text_get_caret_offset): 2010-02-22 Stephan Aßmus Reviewed by Eric Seidel. [Haiku] Implemented PopupMenu support. https://bugs.webkit.org/show_bug.cgi?id=35078 Covered by existing tests. The implementation is currently very simple: Added a PopupMenuHaiku class that derives from a native BPopUpMenu. It attaches a BHandler derivative to the BApplication (WebCore main thread) which receives the item invokation and menu hidden events and informs the PopupMenuClient accordingly. * platform/PopupMenu.h: Changed type of m_menu for Haiku. * platform/haiku/PopupMenuHaiku.cpp: (WebCore::PopupMenuHandler::PopupMenuHandler): (WebCore::PopupMenuHandler::MessageReceived): (WebCore::PopupMenuHaiku::PopupMenuHaiku): (WebCore::PopupMenuHaiku::~PopupMenuHaiku): (WebCore::PopupMenuHaiku::show): (WebCore::PopupMenuHaiku::hide): (WebCore::PopupMenuHaiku::Hide): (WebCore::PopupMenu::PopupMenu): (WebCore::PopupMenu::~PopupMenu): Removed bogus code. (WebCore::PopupMenu::show): Implemented using new PopupMenuHaiku class. (WebCore::PopupMenu::hide): Implemented using new PopupMenuHaiku class. (WebCore::PopupMenu::updateFromElement): Implemented. (WebCore::PopupMenu::itemWritingDirectionIsNatural): Implemented according to Gtk port. 2010-02-22 Stephan Aßmus Reviewed by Eric Seidel. Fix various issues in PlatformMouseEventHaiku. https://bugs.webkit.org/show_bug.cgi?id=34685 Covered by existing tests. Mapping Haiku button constants (bit field) to WebCore buttons was broken. Extracting event time was broken (supposed to be in seconds). Wrong coordinate was being extracted, needs to be content local. Added extracting modifier key flags. * platform/haiku/PlatformMouseEventHaiku.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): 2010-02-22 Stephan Aßmus Reviewed by Eric Seidel. [Haiku] Implement creating and filling platform gradients. https://bugs.webkit.org/show_bug.cgi?id=34683 Covered by existing tests. * platform/graphics/Gradient.h: Typedef PlatformGradient to BGradient * platform/graphics/haiku/GradientHaiku.cpp: (WebCore::Gradient::platformDestroy): Delete the cached BGradient object. (WebCore::Gradient::platformGradient): Create a BGradient object according to the type of Gradient. Return the cached object. (WebCore::Gradient::fill): use BView API to fill with the platform gradient. 2010-02-22 Stephan Aßmus Reviewed by Eric Seidel. Build fix for debug builds of GlyphPageTreeNode.cpp https://bugs.webkit.org/show_bug.cgi?id=34528 Covered by existing tests. * platform/graphics/GlyphPageTreeNode.cpp: include since printf() is used if NDEBUG is not defined. 2010-02-22 Nate Chapin Unreviewed, Chromium build fix. Add special case in CodeGeneratorV8.pm for named getters for html plugin-related elements. CodeGeneratorV8.pm was relying on HasOverridingNameGetter to hint that a custom named getter was needed. That hint was removed in http://trac.webkit.org/changeset/55104. * bindings/scripts/CodeGeneratorV8.pm: 2010-02-22 Alexey Proskuryakov Rubber-stamped by Geoff Garen. Rename RuntimeObjectImp to RuntimeObject. * WebCore.PluginHostProcess.exp: * bindings/js/JSPluginElementFunctions.cpp: (WebCore::getRuntimeObject): (WebCore::runtimeObjectPropertyGetter): (WebCore::runtimeObjectCustomGetOwnPropertySlot): (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor): (WebCore::runtimeObjectCustomPut): * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): * bridge/jni/jni_jsobject.mm: (JavaJSObject::convertValueToJObject): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): * bridge/jsc/BridgeJSC.cpp: (JSC::Bindings::Instance::createRuntimeObject): (JSC::Bindings::Instance::newRuntimeObject): * bridge/jsc/BridgeJSC.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::markChildren): (JSC::Bindings::): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): (JSC::Bindings::QtInstance::getInstance): (JSC::Bindings::QtInstance::newRuntimeObject): * bridge/qt/qt_instance.h: * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): (JSC::Bindings::): (JSC::Bindings::QtPixmapInstance::variantFromObject): (JSC::Bindings::QtPixmapInstance::createRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::valueRealType): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::RuntimeObject::RuntimeObject): (JSC::RuntimeObject::~RuntimeObject): (JSC::RuntimeObject::invalidate): (JSC::RuntimeObject::fallbackObjectGetter): (JSC::RuntimeObject::fieldGetter): (JSC::RuntimeObject::methodGetter): (JSC::RuntimeObject::getOwnPropertySlot): (JSC::RuntimeObject::getOwnPropertyDescriptor): (JSC::RuntimeObject::put): (JSC::RuntimeObject::deleteProperty): (JSC::RuntimeObject::defaultValue): (JSC::callRuntimeObject): (JSC::RuntimeObject::getCallData): (JSC::callRuntimeConstructor): (JSC::RuntimeObject::getConstructData): (JSC::RuntimeObject::getOwnPropertyNames): (JSC::RuntimeObject::throwInvalidAccessError): * bridge/runtime_object.h: * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::invalidate): (JSC::Bindings::RootObject::addRuntimeObject): (JSC::Bindings::RootObject::removeRuntimeObject): * bridge/runtime_root.h: 2010-02-19 Peter Kasting Reviewed by Eric Seidel. Avoid recursion when trying to get the size of a PNG; it's unnecessary and in the worst case can lead to heap corruption. https://bugs.webkit.org/show_bug.cgi?id=35167 Test: fast/images/bad-png.html * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::decode): 2010-02-22 Brady Eidson Reviewed by Tim Hatcher. Disable WebView docking to views that are too small. and https://bugs.webkit.org/show_bug.cgi?id=35254 * WebCore.base.exp: * inspector/InspectorController.cpp: (WebCore::InspectorController::canAttachWindow): Provide a utility for WebKits to make a showWindow() decision based on if attachment would be allowed or not. (WebCore::InspectorController::attachWindow): Don't attach if the view is too small to attach to. * inspector/InspectorController.h: 2010-02-22 Alexey Proskuryakov Build fix. * WebCore.base.exp: Export Instance::newRuntimeObject, it's virtual! 2010-02-22 Alexey Proskuryakov Undo a small part of the previous commit. * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): Let's keep the instance local variable as RefPtr for safety. 2010-02-22 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=35260 Eliminate __apple_runtime_object No change in functionality, so no tests. * WebCore.base.exp: Don't export Instance::newRuntimeObject, WebKit doesn't need it. * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * html/HTMLAppletElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLObjectElement.idl: These objects no longer need overriding name getters, as they no longer intercept the __apple_runtime_object property. * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginInstance): This is no longer static. It was used for callPlugin() in this file, and now it's also used elsewhere when calling plug-in methods. (WebCore::runtimeObjectGetter): Removed. This function was only used by the intercepting name getters. * bindings/js/JSPluginElementFunctions.h: Export pluginInstance(). * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): Take plug-in element's instance directly, without relying on fake attribute lookup. One change resulting from this is that RuntimeObjectImp may not be created in some cases - this code only needs an instance, but the old code had to pass the instance wrapped into RuntimeObjectImp. 2010-02-22 John Sullivan Reviewed by Tim Hatcher. https://bugs.webkit.org/show_bug.cgi?id=35256 HTMLSelectElement::setSelectedIndexByUser() can trigger unnecessary JS when there is no change to the selected index No new tests because this code path is not used for JS-initiated changes. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setSelectedIndexByUser): Bail out if the to-be-selected index matches the already-selected index. 2010-02-22 Enrica Casucci Reviewed by Dan Bernstein. Reproducible crash in WebCore::nextLinePosition on Tweeteorites.com https://bugs.webkit.org/show_bug.cgi?id=35060 Test: editing/selection/extend-byline-withfloat.html * editing/visible_units.cpp: (WebCore::previousLinePosition): Skip elements with zero height. (WebCore::nextLinePosition): Skip elements with zero height. 2010-02-22 Nate Chapin Unreviewed, Chromium build fix. * bindings/scripts/CodeGeneratorV8.pm: Compile break due to bad patch merge. 2010-02-22 Nate Chapin Reviewed by Dimitri Glazkov. [V8] Streamline V8 event listener code. Merge all the variants of V8DOMWrapper::getEventListner() into a single version and generate addEventListener() and removeEventListener() bindings for all objects except DOMWindow. https://bugs.webkit.org/show_bug.cgi?id=35245 * Android.v8bindings.mk: * WebCore.gypi: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getEventListener): * bindings/v8/V8DOMWrapper.h: * bindings/v8/WorkerContextExecutionProxy.cpp: * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/custom/V8AbstractWorkerCustom.cpp: Removed. * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp: Removed. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::addEventListenerCallback): (WebCore::V8DOMWindow::removeEventListenerCallback): * bindings/v8/custom/V8EventSourceCustom.cpp: Removed. * bindings/v8/custom/V8MessagePortCustom.cpp: * bindings/v8/custom/V8NodeCustom.cpp: * bindings/v8/custom/V8NotificationCenterCustom.cpp: * bindings/v8/custom/V8SVGElementInstanceCustom.cpp: Removed. * bindings/v8/custom/V8WebSocketCustom.cpp: * bindings/v8/custom/V8WorkerContextCustom.cpp: * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: * dom/MessagePort.idl: * dom/Node.idl: * loader/appcache/DOMApplicationCache.idl: * notifications/Notification.idl: * page/EventSource.idl: * svg/SVGElementInstance.idl: * websockets/WebSocket.idl: * workers/AbstractWorker.idl: * workers/WorkerContext.idl: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestUpload.idl: 2010-02-22 Chris Fleizach Reviewed by Beth Dakin. AX: AXFocused is not writable like it should be on nodes https://bugs.webkit.org/show_bug.cgi?id=35186 Test: platform/mac/accessibility/element-focus.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::canSetFocusAttribute): 2010-02-22 Simon Fraser Reviewed by Dan Bernstein, Darin Adler. Remove addScrolledContentOffset/subtractScrolledContentOffset https://bugs.webkit.org/show_bug.cgi?id=35225 Remove RenderLayer's addScrolledContentOffset() and subtractScrolledContentOffset() methods, and instead use the existing scrolledContentOffset(), and use IntSize and IntPoint instead of lots of x, y variables. Added new IntPoint toPoint(const IntSize&) method as a convenience to convert a size to a point, which is needed in a few places. * page/EventHandler.cpp: (WebCore::EventHandler::handleDrag): Use the new toPoint() convenience. * platform/graphics/IntPoint.h: (WebCore::toPoint): New convenience method to convert an IntSize to an IntPoint. * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::selectionGapRectsForRepaint): (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::offsetForContents): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): * rendering/RenderLayer.h: (WebCore::RenderLayer::size): * rendering/RenderObject.cpp: (WebCore::RenderObject::computeRectForRepaint): * rendering/TextControlInnerElements.cpp: (WebCore::RenderTextControlInnerBlock::positionForPoint): 2009-02-22 Adam Langley Reviewed by Darin Fisher. fontconfig on Linux can change the render preferences on a per strike basis (a strike a combination of face and size). Because of this, we need to query fontconfig each time a new FontPlatformData is created for a new size. This patch adds support for querying this via ChromiumBridge. https://bugs.webkit.org/show_bug.cgi?id=33065 * platform/chromium/ChromiumBridge.h: add getRenderStyleForStrike * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/chromium/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): (WebCore::FontPlatformData::setupPaint): (WebCore::FontPlatformData::queryStyle): add code to query fontconfig via ChromiumBridge * platform/graphics/chromium/FontPlatformDataLinux.h: 2010-02-22 Gustavo Noronha Silva Build fix for make distcheck. * GNUmakefile.am: 2010-02-22 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. Fix compiler warning "suggest parentheses around" https://bugs.webkit.org/show_bug.cgi?id=35197 No new tests as there is no new functionality. * wml/WMLVariables.cpp: (WebCore::substituteVariableReferences): 2010-02-22 Gustavo Noronha Silva Reviewed by Xan Lopez. [Soup] loses information related to message flags when converting from/to Resource{Request,Response} https://bugs.webkit.org/show_bug.cgi?id=35093 Store message flags in WebCore objects, and set them on the SoupMessage, when creating one from them. No behaviour change. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::fillResponseFromMessage): * platform/network/soup/ResourceRequest.h: (WebCore::ResourceRequest::soupMessageFlags): (WebCore::ResourceRequest::setSoupMessageFlags): * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::toSoupMessage): (WebCore::ResourceRequest::updateFromSoupMessage): * platform/network/soup/ResourceResponse.h: (WebCore::ResourceResponse::soupMessageFlags): (WebCore::ResourceResponse::setSoupMessageFlags): * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::toSoupMessage): (WebCore::ResourceResponse::updateFromSoupMessage): 2010-02-22 Steve Block Reviewed by Nate Chapin. Shared worker types used in globalObjectPrototypeIsDOMWindow are not properly guarded https://bugs.webkit.org/show_bug.cgi?id=35238 No new tests, build fix only. * bindings/v8/V8DOMWrapper.cpp: (WebCore::globalObjectPrototypeIsDOMWindow): 2010-02-22 Steve Block Reviewed by Simon Fraser. Simplifies calculation of the transform in RenderLayer::paintLayer https://bugs.webkit.org/show_bug.cgi?id=35101 No new tests, optimization only. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): 2010-02-22 Nicholas Young Reviewed by Tor Arne Vestbø. [Qt] Switching from Phonon to QtMultimedia Backend for Qt 4.7 https://bugs.webkit.org/show_bug.cgi?id=34631 No new tests. This patch only affects multimedia backend. * WebCore.pro: Build depends on Qt version. * css/mediaControlsQt.css: Updated media controls. * platform/graphics/MediaPlayer.cpp: Different backend included depending on Qt version. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Added new QtMultimedia Backend. (WebCore::MediaPlayerPrivate::create): (WebCore::MediaPlayerPrivate::registerMediaEngine): (WebCore::MediaPlayerPrivate::getSupportedTypes): (WebCore::MediaPlayerPrivate::supportsType): (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::hasVideo): (WebCore::MediaPlayerPrivate::hasAudio): (WebCore::MediaPlayerPrivate::load): (WebCore::MediaPlayerPrivate::cancelLoad): (WebCore::MediaPlayerPrivate::play): (WebCore::MediaPlayerPrivate::pause): (WebCore::MediaPlayerPrivate::paused): (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::seeking): (WebCore::MediaPlayerPrivate::duration): (WebCore::MediaPlayerPrivate::currentTime): (WebCore::MediaPlayerPrivate::buffered): (WebCore::MediaPlayerPrivate::maxTimeSeekable): (WebCore::MediaPlayerPrivate::bytesLoaded): (WebCore::MediaPlayerPrivate::totalBytes): (WebCore::MediaPlayerPrivate::setRate): (WebCore::MediaPlayerPrivate::setVolume): (WebCore::MediaPlayerPrivate::supportsMuting): (WebCore::MediaPlayerPrivate::setMuted): (WebCore::MediaPlayerPrivate::networkState): (WebCore::MediaPlayerPrivate::readyState): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::mediaStatusChanged): (WebCore::MediaPlayerPrivate::handleError): (WebCore::MediaPlayerPrivate::stateChanged): (WebCore::MediaPlayerPrivate::nativeSizeChanged): (WebCore::MediaPlayerPrivate::queuedSeekTimeout): (WebCore::MediaPlayerPrivate::seekTimeout): (WebCore::MediaPlayerPrivate::positionChanged): (WebCore::MediaPlayerPrivate::durationChanged): (WebCore::MediaPlayerPrivate::volumeChanged): (WebCore::MediaPlayerPrivate::mutedChanged): (WebCore::MediaPlayerPrivate::updateStates): (WebCore::MediaPlayerPrivate::setSize): (WebCore::MediaPlayerPrivate::naturalSize): (WebCore::MediaPlayerPrivate::paint): (WebCore::MediaPlayerPrivate::repaint): * platform/graphics/qt/MediaPlayerPrivateQt.h: Added new QtMultimedia Backend. (WebCore::MediaPlayerPrivate::isAvailable): (WebCore::MediaPlayerPrivate::supportsFullscreen): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::mediaControlsBaselineOpacity): New method. (WebCore::RenderThemeQt::paintMediaBackground): Background depends on baseline opacity. (WebCore::RenderThemeQt::paintMediaMuteButton): Changed styling. (WebCore::RenderThemeQt::paintMediaCurrentTime): Added current time display. (WebCore::RenderThemeQt::formatMediaControlsCurrentTime): Added time formatting. (WebCore::RenderThemeQt::formatMediaControlsRemainingTime): Added time formatting. (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack): Volume slider added. (WebCore::RenderThemeQt::paintMediaVolumeSliderThumb): Volume slider added. (WebCore::RenderThemeQt::paintMediaSliderTrack): Updated for QtMultimedia. (WebCore::RenderThemeQt::paintMediaSliderThumb): Dropped an unnecessary check. (WebCore::RenderThemeQt::adjustSliderThumbSize): Handle a missing case. * platform/qt/RenderThemeQt.h: Reimplemented a few more methods. 2010-02-22 Alexander Pavlov Not reviewed: mac build fix * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): 2010-02-22 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: there should be a way to "deactivate" or "skip" all breakpoints while debugging. https://bugs.webkit.org/show_bug.cgi?id=33217 * English.lproj/localizedStrings.js: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::setBreakpointsActivated): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.h: (WebCore::ScriptDebugServer::setBreakpointsActivated): * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::activateBreakpoints): (WebCore::InspectorBackend::deactivateBreakpoints): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/front-end/Images/deactivateBreakpointsButtonGlyph.png: Added. * inspector/front-end/Images/deactivateBreakpointsDisabledButtonGlyph.png: Added. * inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.activateBreakpoints): (.WebInspector.InspectorBackendStub.prototype.deactivateBreakpoints): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.get breakpointsActivated): (WebInspector.ScriptsPanel.prototype.addBreakpoint): (WebInspector.ScriptsPanel.prototype._stepOutClicked): (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked): * inspector/front-end/inspector.css: * inspector/front-end/textViewer.css: 2010-02-22 Mark Rowe Rubber-stamped by Sam Weinig and Maciej Stachowiak. REGRESSION (r55039): Animation starts from near end when loaded over slow network / Roll out r55039 (related to ) as it causes animated GIFs to skip intermediate frames when loading over a slower network. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): 2010-02-22 Maciej Stachowiak Not reviewed, build fix. Revert the previous change. 2010-02-21 Maciej Stachowiak Reviewed by Darin Adler. Cache JavaScript wrappers inline in DOM nodes https://bugs.webkit.org/show_bug.cgi?id=35226 8.8% speedup on Dromaeo DOM Core tests. 3.3% speedup on Hixie DOM Core tests. * bindings/js/JSDOMBinding.cpp: (WebCore::forgetDOMNode): Clear wrapper pointer. (WebCore::cacheDOMNodeWrapper): Cache inline too if caching for normal world. * bindings/js/JSDOMBinding.h: (WebCore::DOMObjectWrapperMapFor): * bindings/js/JSDocumentCustom.cpp: (WebCore::toJS): Remove unneeded argument from getCachedDOMNodeWrapper. * bindings/js/JSNodeCustom.cpp: (WebCore::createWrapperInline): Renamed version of original createWrapper. (WebCore::createWrapper): Call createWrapperInline. Out-of-line version. (WebCore::toJSNewlyCreated): Call createWrapperInline instead of createWrapper. * bindings/js/JSNodeCustom.h: Added. (WebCore::getCachedDOMNodeWrapper): Moved here so it can be inlined. (WebCore::toJS): Moved here so it can be inlined. * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::ScriptWrappable): Implement this in the obvious way for JavaScriptCore. (WebCore::ScriptWrappable::wrapper): (WebCore::ScriptWrappable::setWrapper): (WebCore::ScriptWrappable::clearWrapper): * bindings/scripts/CodeGeneratorJS.pm: Include CustomHeader heaaders in the header, not just the impl file, so they can add inlining. * dom/Node.idl: Add CustomHeader directive. Add new files to build. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: 2010-02-22 Pavel Feldman Not reviewed: windows build fix. 2010-02-21 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: stop on inline breakpoints on reload. - ScriptBreakpoint struct has been introduced and reused in InspectorController and debug server. - JavaScriptDebugServer was moved to bindings/js and renamed to ScriptDebugServer There were no changes to semantics, only some mechanical changes: - addBreakpoint and updateBreakpoint were merged into setBreakpoint - ScriptDebugServer now operates ScriptBreakpoint instances instead of BreakpointInfo. - It no longer allocates maps and breakpoint info in heap - all done on stack. - JavaScriptDebugListener is now ScriptDebugServer::Listener - Listener methods no longer have ExecState (was unused). - addListener/removeListener pair wuth no page argument removed (was unused). - InspectorController now binds sourceID to url and maintains a map of 'sticky' breakpoints. Whenever script is loaded and there is a sticky breakpoint url matching, breakpoint is being 'restored' synchronously in debug server and pushed to frontend. Front-end no longer stores map of sticky breakpoints. - setBreakpoint/removeBreakpoint/didParseSource trio handle this logic. - A bunch of if(USE_JSC/V8/other) forks removed. - InspectorFrontend now operates primitive types only, got rid of USE_JSC as well. https://bugs.webkit.org/show_bug.cgi?id=28799 * GNUmakefile.am: * WebCore.base.exp: * WebCore.gypi: * WebCore.order: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::currentCallFrame): (WebCore::JSInjectedScriptHost::isActivation): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::shared): (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::~ScriptDebugServer): (WebCore::ScriptDebugServer::addListener): (WebCore::ScriptDebugServer::removeListener): (WebCore::ScriptDebugServer::pageCreated): (WebCore::ScriptDebugServer::hasListenersInterestedInPage): (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::clearBreakpoints): (WebCore::ScriptDebugServer::setPauseOnExceptionsState): (WebCore::ScriptDebugServer::pauseProgram): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::currentCallFrame): (WebCore::ScriptDebugServer::currentCallFrameState): (WebCore::ScriptDebugServer::dispatchDidParseSource): (WebCore::ScriptDebugServer::dispatchFailedToParseSource): (WebCore::toPage): (WebCore::ScriptDebugServer::detach): (WebCore::ScriptDebugServer::sourceParsed): (WebCore::ScriptDebugServer::dispatchFunctionToListeners): (WebCore::ScriptDebugServer::setJavaScriptPaused): (WebCore::ScriptDebugServer::pauseIfNeeded): (WebCore::ScriptDebugServer::callEvent): (WebCore::ScriptDebugServer::atStatement): (WebCore::ScriptDebugServer::returnEvent): (WebCore::ScriptDebugServer::exception): (WebCore::ScriptDebugServer::willExecuteProgram): (WebCore::ScriptDebugServer::didExecuteProgram): (WebCore::ScriptDebugServer::didReachBreakpoint): (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon): (WebCore::ScriptDebugServer::recompileAllJSFunctions): (WebCore::ScriptDebugServer::didAddListener): (WebCore::ScriptDebugServer::didRemoveListener): (WebCore::ScriptDebugServer::didRemoveLastListener): * bindings/js/ScriptDebugServer.h: (WebCore::ScriptDebugServer::Listener::~Listener): (WebCore::ScriptDebugServer::): (WebCore::ScriptDebugServer::pauseOnExceptionsState): (WebCore::ScriptDebugServer::hasListeners): (WebCore::ScriptDebugServer::hasGlobalListeners): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::shared): * bindings/v8/ScriptDebugServer.h: (WebCore::ScriptDebugServer::Listener::~Listener): (WebCore::ScriptDebugServer::addListener): (WebCore::ScriptDebugServer::removeListener): (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::clearBreakpoints): (WebCore::ScriptDebugServer::): (WebCore::ScriptDebugServer::pauseOnExceptionsState): (WebCore::ScriptDebugServer::setPauseOnExceptionsState): (WebCore::ScriptDebugServer::pauseProgram): (WebCore::ScriptDebugServer::continueProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon): (WebCore::ScriptDebugServer::recompileAllJSFunctions): (WebCore::ScriptDebugServer::currentCallFrameState): (WebCore::ScriptDebugServer::pageCreated): (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::~ScriptDebugServer): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::currentCallFrameCallback): (WebCore::V8InjectedScriptHost::isActivationCallback): * inspector/InjectedScriptHost.cpp: * inspector/InjectedScriptHost.h: * inspector/InjectedScriptHost.idl: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::setBreakpoint): (WebCore::InspectorBackend::removeBreakpoint): (WebCore::InspectorBackend::pauseInDebugger): (WebCore::InspectorBackend::stepOverStatementInDebugger): (WebCore::InspectorBackend::stepIntoStatementInDebugger): (WebCore::InspectorBackend::stepOutOfFunctionInDebugger): (WebCore::InspectorBackend::pauseOnExceptionsState): (WebCore::InspectorBackend::setPauseOnExceptionsState): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/ScriptBreakpoint.h: Added. (WebCore::InspectorBreakpoint::InspectorBreakpoint): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::scriptObjectReady): (WebCore::InspectorController::close): (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::addProfile): (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::stopUserInitiatedProfiling): (WebCore::InspectorController::enableProfiler): (WebCore::InspectorController::disableProfiler): (WebCore::InspectorController::enableDebuggerFromFrontend): (WebCore::InspectorController::disableDebugger): (WebCore::InspectorController::resumeDebugger): (WebCore::InspectorController::setBreakpoint): (WebCore::InspectorController::removeBreakpoint): (WebCore::InspectorController::didParseSource): (WebCore::InspectorController::failedToParseSource): (WebCore::InspectorController::didPause): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::parsedScriptSource): (WebCore::InspectorFrontend::restoredBreakpoint): (WebCore::InspectorFrontend::failedToParseScriptSource): (WebCore::InspectorFrontend::resumedScript): * inspector/InspectorFrontend.h: * inspector/JavaScriptDebugListener.h: Removed. * inspector/JavaScriptDebugServer.cpp: Removed. * inspector/JavaScriptDebugServer.h: Removed. * inspector/front-end/Breakpoint.js: (WebInspector.Breakpoint.prototype.set condition): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): * inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.addBreakpoint): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.sourceFrameForResource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.addScript): (WebInspector.ScriptsPanel.prototype.addBreakpoint): (WebInspector.ScriptsPanel.prototype.removeBreakpoint): (WebInspector.ScriptsPanel.prototype._showScriptOrResource): * inspector/front-end/inspector.js: (WebInspector.restoredBreakpoint): * page/Page.cpp: (WebCore::Page::Page): * platform/android/TemporaryLinkStubs.cpp: 2010-02-21 Gavin Barraclough Reviewed by Oliver Hunt. Make the UChar owned/ref-counted by StringImpl::CrossThreadRefCounted be const. * platform/text/StringImpl.cpp: (WebCore::StringImpl::sharedBuffer): * platform/text/StringImpl.h: 2010-02-07 Yuzo Fujishima Reviewed by Eric Seidel. When page-break-{after,before} is set to always, force page breaks even for overflow-specified elements. RenderBlock::inRootBlockContext() was introduced by Changeset 5611. Although it is a reasonable criteria for choosing an optional page break location, it is not for a mandatory page break as specified by http://dev.w3.org/csswg/css3-page/#forced-pg-brk. The method is removed because it is not used anywhere else. Note: this patch makes page break work for overflow-specified elements. For tables and floated elements, more work is needed. https://bugs.webkit.org/show_bug.cgi?id=9526 Test: printing/page-break-always-for-overflow.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): * rendering/RenderBlock.h: 2010-02-21 Julien Chaffraix Reviewed by Eric Seidel. Remove auto_ptr usage in WebCore. https://bugs.webkit.org/show_bug.cgi?id=35157 The changes consists of: - Changing auto_ptr arguments or return types to PassOwnPtr. - Replacing local auto_ptr by OwnPtr. - Removing now unneeded inclusion. * css/CSSParser.cpp: (WebCore::CSSParser::addProperty): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): (WebCore::workerContextDidReceiveResponse): (WebCore::workerContextDidReceiveData): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): (WebCore::workerContextDidReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: * loader/icon/IconLoader.cpp: (WebCore::IconLoader::create): * loader/icon/IconLoader.h: * platform/ContextMenu.cpp: (WebCore::separatorItem): * platform/CrossThreadCopier.h: (WebCore::): * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::copyData): (WebCore::HTTPHeaderMap::adopt): * platform/network/HTTPHeaderMap.h: * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): * platform/network/ResourceRequestBase.h: * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::adopt): (WebCore::ResourceResponseBase::copyData): * platform/network/ResourceResponseBase.h: * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::removePendingResource): * svg/SVGDocumentExtensions.h: * svg/SVGElement.cpp: (WebCore::SVGElement::insertedIntoDocument): * workers/GenericWorkerTask.h: * workers/WorkerThread.cpp: (WebCore::WorkerThreadStartupData::create): 2010-02-21 Simon Fraser Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=22215 Avoid calling absoluteClippedOverflowRect() so many times RenderLayer::updateLayerPositions() computes the clipped overflow rect and the outline bounds for repaint, and then calls repaintAfterLayoutIfNeeded() which can compute the same rects all over again. Avoid this by passing these two rects into repaintAfterLayoutIfNeeded() if known. This measurably reduces the time spent in updateLayerPositions() for some content. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderObject.h: 2010-02-20 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=35202 Calling Java method which accepts Object always passes a null argument * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Add cases for other JS types. 2010-02-20 Laszlo Gombos Reviewed by Darin Adler. Fix compiler warning "suggest parentheses around" https://bugs.webkit.org/show_bug.cgi?id=35197 No new tests as there is no new functionality. * html/DateComponents.cpp: (WebCore::beforeGregorianStartDate): * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::findPlugin): 2010-02-20 Noam Rosenthal Reviewed by Laszlo Gombos. [Qt] ENABLE_3D_RENDERING should be optional https://bugs.webkit.org/show_bug.cgi?id=35100 No new tests: this is a build fix. * WebCore.pri: ENABLE_3D_RENDERING is now a proper feature test 2010-02-20 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=23742 Applet methods can not return arrays to JS * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaArray::JavaArray): Don't accidentally zero out m_rootObject (that's how PassRefPtr works). Without m_rootObject, we crash quickly. * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): Do handle returned arrays. Also, added an ifdef around code that's only needed on Tiger, and removed a comment saying it can be removed when "new" plugin ships. I doubt that anyone can remember what "new" could refer to back then. 2010-02-20 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: re-creating view in ResourcesPanel confuses ScriptsPanel's visibleView logic. https://bugs.webkit.org/show_bug.cgi?id=35192 * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype.viewRecreated): 2010-02-20 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: need to highlight the evaluated expression used for popovers. https://bugs.webkit.org/show_bug.cgi?id=35126 * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._mouseMove): (WebInspector.SourceFrame.prototype._hidePopup): (WebInspector.SourceFrame.prototype._mouseHover): (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup): * inspector/front-end/inspector.css: 2010-02-20 Gustavo Noronha Silva Roll out 55047 because it causes layout, and API tests to fail 2010-02-19 Gustavo Noronha Silva Reviewed by Xan Lopez. [Soup] loses information related to message flags when converting from/to Resource{Request,Response} https://bugs.webkit.org/show_bug.cgi?id=35093 Refactor updating of ResourceResponse objects from soup message objects, to avoid code duplication. No behaviour change. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::fillResponseFromMessage): * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateFromSoupMessage): 2010-02-20 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=35190 Don't use system malloc in Java bindings * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): Switched to WTF::Vector. 2010-02-20 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=9761 LiveConnect string conversion fails for java.lang.Object Can't test Java in DRT (I wonder why). * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Added the necessary conversion. Also, removed CONVERT_NULL_TO_EMPTY_STRING dead code. 2010-02-19 Maciej Stachowiak Reviewed by David Levin. Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases https://bugs.webkit.org/show_bug.cgi?id=35147 I made ENABLE(SANDBOX) only control the sandbox attribute itself; I did not ifdef the infrastructure to make sandboxing switchable. This is because the likely concerns about sandboxing are not stability of the infrastructure code, but rather the fact that the security model exposed to authors is still evolving. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * WebCore.pri: * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseMappedAttribute): 2010-02-19 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=35132 Mouse cursor sometimes flickers over Flash content (35132) * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent): Don't set mouse pointer when above a plug-in or applet to prevent flicker. 2010-02-18 Peter Kasting Reviewed by Adam Barth. Fix regression in calculating an animated image's start time. https://bugs.webkit.org/show_bug.cgi?id=35115 * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): 2010-02-19 Alexey Proskuryakov Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=35178 LiveConnect code uses hand-rolled fprintf logging Changed to use LOG, LOG_ERROR and ASSERT. * platform/Logging.cpp: (WebCore::getChannelFromName): * platform/Logging.h: * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary): * platform/win/LoggingWin.cpp: (WebCore::InitializeLoggingChannelsIfNecessary): TextConversion channel was (almost) unused, renamed to LiveConnect. * platform/text/gtk/TextCodecGtk.cpp: (WebCore::TextCodecGtk::registerEncodingNames): The only use of this channel was in platform specific code, commandeered it for cross-platform needs. * bridge/jni/JNIBridge.cpp: * bridge/jni/JNIUtility.cpp: (JSC::Bindings::getJavaVM): (JSC::Bindings::getJNIEnv): (JSC::Bindings::getJNIField): * bridge/jni/JNIUtility.h: (JSC::Bindings::callJNIMethodV): (JSC::Bindings::callJNIStaticMethod): * bridge/jni/jni_jsobject.mm: (completedJavaScriptAccess): (dispatchToJavaScriptThread): (performJavaScriptAccess): (JavaJSObject::invoke): (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::getSlot): (JavaJSObject::setSlot): (JavaJSObject::toString): (JavaJSObject::createNative): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::valueFromInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): (JObjectWrapper::JObjectWrapper): (JObjectWrapper::~JObjectWrapper): 2010-02-19 Dirk Schulze Reviewed by Nikolas Zimmermann. RenderSVGResourceMasker causes an Assert on Wind builds during DRT https://bugs.webkit.org/show_bug.cgi?id=35182 We remove the Assert for now and return earlier, if the HashMap of the Masker does not contain the RenderObject. The RenderObject is an identifiert to get a already calculated mask. A race condition during parsing can cause the invalidation call, before the mask got calculated (only during DRT on Win build bots). The real bug will be fixed with: https://bugs.webkit.org/show_bug.cgi?id=35181 * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::invalidateClient): 2010-02-18 Peter Kasting Reviewed by Darin Fisher. Make Pasteboard::writeImage() safe against NULL cachedImages, and clean up some code. https://bugs.webkit.org/show_bug.cgi?id=35136 * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateRenderer): Shorten some code. * page/DragController.cpp: (WebCore::getImage): Shorten some code. * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage): NULL-check cachedImage(). 2010-02-19 Kenneth Rohde Christiansen Rubberstamped by Noam Rosenthal, who wrote the original code. Make mouse wheel scrolling work when using the GraphicsLayer. * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): 2010-02-19 Nate Chapin Reviewed by Dimitri Glazkov. [V8] Fix Worker crash regression in r54972 https://bugs.webkit.org/show_bug.cgi?id=35166 * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): Properly unwrap global objects when inside a WorkerContext. 2010-02-19 Steve Block Not reviewed. Reverts r55020 which causes crashes in Chromium LayoutTests * bindings/generic/RuntimeEnabledFeatures.cpp: * storage/Database.cpp: 2010-02-19 Steve Block Reviewed by David Levin. Sets default values of V8 runtime enabler flags to match behavior with JSC https://bugs.webkit.org/show_bug.cgi?id=35095 No new tests, modifies a Chromium feature only. * bindings/generic/RuntimeEnabledFeatures.cpp: Modified. Sets appcache and geolocation flag defaults to 'on' * storage/Database.cpp: Modified. Sets database flag default to 'on'. 2010-02-19 Alexander Pavlov Reviewed by Pavel Feldman. WebInspector: Elements panel: Correctly show empty elements' ending tags for XML and HTML documents. https://bugs.webkit.org/show_bug.cgi?id=26315 Test: inspector/elements-panel-xhtml-structure.xhtml * inspector/InspectorController.cpp: (WebCore::InspectorController::populateScriptObjects): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode): (WebInspector.ElementsTreeOutline.prototype.get isXMLMimeType): (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired): (WebInspector.ElementsTreeElement.prototype.onexpand): (WebInspector.ElementsTreeElement.prototype.oncollapse): (WebInspector.ElementsTreeElement.prototype.updateTitle.callback): (WebInspector.ElementsTreeElement.prototype.updateTitle): (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo): 2010-02-19 Pavel Feldman Not reviewed. Chromium build fix: reverting r54997 and r54998. * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::protocolAccessorSetter): * platform/KURLGoogle.cpp: (WebCore::KURL::setProtocol): (WebCore::KURL::isHierarchical): 2010-02-17 Philippe Normand Reviewed by Eric Seidel. [GTK] RTP/RTSP streams playback support https://bugs.webkit.org/show_bug.cgi?id=33662 Added live pipelines support in updateStates(). * manual-tests/video-rtsp.html: Added. * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::updateStates): 2010-02-18 Yaar Schnitman Reviewed by Darin Adler. Normalize custom ctors for Image, Option, Audio https://bugs.webkit.org/show_bug.cgi?id=34782 Test: fast/js/custom-constructors.html * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::constructAudio): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSOptionConstructor.cpp: (WebCore::constructHTMLOptionElement): * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: (WebCore::v8HTMLAudioElementConstructorCallback): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: (WebCore::v8HTMLOptionElementConstructorCallback): * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::HTMLAudioElement): (WebCore::HTMLAudioElement::createForJSConstructor): * html/HTMLAudioElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::createForJSConstructor): (WebCore::HTMLImageElement::mapToEntry): (WebCore::HTMLImageElement::createRenderer): (WebCore::HTMLImageElement::attach): (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::naturalHeight): * html/HTMLImageElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): (WebCore::HTMLOptionElement::createForJSConstructor): (WebCore::HTMLOptionElement::ownerSelectElement): (WebCore::HTMLOptionElement::nonRendererRenderStyle): (WebCore::HTMLOptionElement::disabled): (WebCore::HTMLOptionElement::insertedIntoTree): * html/HTMLOptionElement.h: 2010-02-18 Simon Fraser No Review. Remove a couple of extraneous spaces that got added to the project file by hand-ending. * WebCore.xcodeproj/project.pbxproj: 2010-02-18 Simon Fraser Reviewed by Dan Bernstein. Page contents missing from snapshot on Newsweek.com article Add logic to determine when painting via the software rendering path will give an equivalent result to the accelerated compositing presentation. This tests for the presence of 3D transforms via the existing RenderLayerCompositor::has3DContent() method. * WebCore.base.exp: Export FrameView's isSoftwareRenderable(), paintBehavior() and setPaintBehavior(). * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::isSoftwareRenderable): New method. (WebCore::FrameView::paintBehavior): Make this non-inline so that we can reliably export it. 2010-02-18 Dan Bernstein Reviewed by John Sullivan. Multiple style recalcs due to getComputedStyle() on “display: none;” element when there are pending style sheets Test: fast/css/getComputedStyle/pending-stylesheet.html When querying a property of a computed style declaration for a non-rendered element, CSSStyleSelector::styleForElement() was called, and if there were pending style sheet, it would behave as if the lack of renderer is due to FOUC suppression, and set a flag on the document causing it to recalculate style. On the next computed style property access, style would be recalculated for the document, but then the flag would get set again if the element did not have a renderer. * dom/Document.cpp: (WebCore::Document::styleForElementIgnoringPendingStylesheets): Added. Temporarily sets m_ignorePendingStylesheets around the call to CSSStyleSelector::styleForElement(). * dom/Document.h: * dom/Element.cpp: (WebCore::Element::computedStyle): Use Document::styleForElementIgnoringPendingStylesheets(). 2010-02-18 Dirk Schulze Reviewed by Nikolas Zimmermann. Move SVGResources to Renderers, starting with Masker https://bugs.webkit.org/show_bug.cgi?id=35020 We have rendering specific code in WebCore/svg/graphics. The goal is to move this code into suitable Renderers. This helps us to clean up the code and makes maintenance easier. It also makes it possible to remove rendering specific code from SVG*Elements into this renderers. So the Renderer contains everything that is needed to use the resource. RenderSVGResource will be the base class for all new resource render classes like RenderSVGResourceMasker, RenderSVGResourceClipper and the other resources. This patch starts moving SVGResourceMasker to RenderSVGResourceMasker. Another benefit is the much more useful result in DRT on using masker. * Android.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderObject.cpp: (WebCore::RenderObject::toRenderSVGResource): Conversion to RenderSVGResource base class. * rendering/RenderObject.h: (WebCore::RenderObject::isSVGResource): Check if renderer is a resource. * rendering/RenderPath.cpp: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGImage.h: Some code clean up according to the webkit style. (WebCore::RenderSVGImage::toSVGRenderBase): (WebCore::RenderSVGImage::renderName): (WebCore::RenderSVGImage::isSVGImage): (WebCore::RenderSVGImage::localToParentTransform): (WebCore::RenderSVGImage::strokeBoundingBox): (WebCore::RenderSVGImage::requiresLayer): (WebCore::RenderSVGImage::localTransform): * rendering/RenderSVGInlineText.h: (WebCore::RenderSVGInlineText::objectBoundingBox): Needed for SVGRenderTreeAsText * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGModelObject.h: * rendering/RenderSVGResource.h: Added. (WebCore::): Base class for all Resource renderers like masker, clipper and others. (WebCore::RenderSVGResource::RenderSVGResource): (WebCore::RenderSVGResource::cast): (WebCore::RenderSVGResource::toRenderSVGResource): (WebCore::RenderSVGResource::isSVGResource): (WebCore::RenderSVGResource::drawsContents): (WebCore::getRenderSVGResourceById): * rendering/RenderSVGResourceMasker.cpp: Added. (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker): (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): (WebCore::RenderSVGResourceMasker::invalidateClients): Status of masker changed, remove all clients. (WebCore::RenderSVGResourceMasker::invalidateClient): Status of an object changed, remove pending client. (WebCore::RenderSVGResourceMasker::applyResource): Apply masker to object. (WebCore::RenderSVGResourceMasker::resourceBoundingBox): boundingBox of the resource, depending on the object. (WebCore::RenderSVGResourceMasker::createMaskImage): Creates the mask image, the context gets clipped with. * rendering/RenderSVGResourceMasker.h: Added. (WebCore::MaskerData::MaskerData): (WebCore::RenderSVGResourceMasker::renderName): (WebCore::RenderSVGResourceMasker::maskUnits): Unit of mask for DRT. (WebCore::RenderSVGResourceMasker::maskContentUnits): Unit of childs from mask for DRT. (WebCore::RenderSVGResourceMasker::resourceType): * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGRoot.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::destroy): dito. * rendering/RenderSVGText.h: * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer): (WebCore::SVGRenderBase::deregisterFromResources): Unregister object from all it's resources after status changed. * rendering/SVGRenderSupport.h: (WebCore::SVGRenderBase::toSVGRenderBase): (WebCore::SVGRenderBase::strokeBoundingBox): (WebCore::SVGRenderBase::markerBoundingBox): * rendering/SVGRenderTreeAsText.cpp: Update TreeAsText to dump maskers correctly. (WebCore::operator<<): (WebCore::writeSVGResource): (WebCore::writeSVGContainer): (WebCore::writeSVGText): (WebCore::writeSVGInlineText): (WebCore::writeSVGImage): (WebCore::write): (WebCore::writeResourcesToObject): * rendering/SVGRenderTreeAsText.h: * svg/SVGMaskElement.cpp: Update Masker to use the new renderer. (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::childrenChanged): (WebCore::SVGMaskElement::maskBoundingBox): (WebCore::SVGMaskElement::createRenderer): * svg/SVGMaskElement.h: * svg/SVGStyledElement.cpp: We need to tell the renderer to unregister object, after the status changed. (WebCore::SVGStyledElement::invalidateResources): (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): * svg/SVGUnitTypes.h: Conversion of integer to SVGUnitType. (WebCore::toUnitType): * svg/graphics/SVGResource.h: (WebCore::): (WebCore::SVGResource::isMarker): * svg/graphics/SVGResourceMasker.cpp: Removed. * svg/graphics/SVGResourceMasker.h: Removed. 2010-02-18 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Allow creating/dropping virtual tables when the module is FTS2. https://bugs.webkit.org/show_bug.cgi?id=34867 * storage/DatabaseAuthorizer.cpp: (WebCore::DatabaseAuthorizer::createVTable): (WebCore::DatabaseAuthorizer::dropVTable): 2010-02-18 Peter Kasting Not reviewed, Chromium build fix. r54963 had a typo in the WebCore.gypi change. https://bugs.webkit.org/show_bug.cgi?id=35003 * WebCore.gypi: 2010-02-18 Vangelis Kokkevis Reviewed by Simon Fraser. Changing forward declaration of TimingFunction in GraphicsLayer.h from class to struct to match its actual definition in TimingFunction.h https://bugs.webkit.org/show_bug.cgi?id=35069 * platform/graphics/GraphicsLayer.h: Change forward declaration from: class TimingFunction to: struct TimingFunction 2010-02-18 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Minor improvement to hybrid QPixmap https://bugs.webkit.org/show_bug.cgi?id=34507 Instead of having toHTMLImageElement which creates a new element, assignToHTMLImageElement would set an existing HTML element to contain the native QPixmap/QImge. Also made some style fixes. Additions to existing tests: see WebKit/qt/tests * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapWidthField::valueFromInstance): style (JSC::Bindings::QtPixmapHeightField::valueFromInstance): style (JSC::Bindings::QtPixmapAssignToElementMethod::name): assignTo (JSC::Bindings::QtPixmapAssignToElementMethod::invoke): new function (JSC::Bindings::QtPixmapAssignToElementMethod::numParameters): 1 (JSC::Bindings::QtPixmapToDataUrlMethod::invoke): style (JSC::Bindings::QtPixmapToStringMethod::invoke): style (JSC::Bindings::QtPixmapInstance::invokeMethod): style (JSC::Bindings::QtPixmapClass::methodsNamed): new func, removed old (JSC::Bindings::QtPixmapInstance::getPropertyNames): ditto (JSC::Bindings::QtPixmapInstance::defaultValue): style (JSC::Bindings::QtPixmapInstance::valueOf): style (JSC::Bindings::QtPixmapInstance::toPixmap): style (JSC::Bindings::QtPixmapInstance::variantFromObject): style 2010-02-18 Peter Kasting Not reviewed, bustage fix. An extraneous line in r54839 broke GIF animation. * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::read): 2010-02-18 Dan Bernstein Reviewed by Simon Fraser. REGRESSION: Selection painting issue in bug review textbox https://bugs.webkit.org/show_bug.cgi?id=34946 Test: fast/repaint/selection-gap-overflow-scroll-2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintSelection): localToContainerQuad() adjusts for overflow scroll, but RenderLayer::addBlockSelectionGapsBounds() takes non-scrolled coordinates, so account for that. 2010-02-17 Dumitru Daniliuc Reviewed by Darin Adler. Change the V8 and JSC SQLStatementErrorCallback to interpret 'undefined' return values as 'true', as required by the spec. https://bugs.webkit.org/show_bug.cgi?id=35048 * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallbackHelper): (WebCore::invokeCallback): (WebCore::invokeCallbackTreatUndefinedAsTrue): * bindings/v8/custom/V8CustomVoidCallback.h: 2010-02-17 Ojan Vafai Reviewed by Adam Barth. keyboard selection sometimes moves the wrong end of the selection for Win/Linux https://bugs.webkit.org/show_bug.cgi?id=35066 On Windows/Linux keyboard based selections should always move the same end of the seleciton. On Mac, lineboundary and documentboundary changes move different ends of the selection depending on which direction your extending. Test: editing/selection/extend-after-mouse-selection.html * editing/SelectionController.cpp: (WebCore::SelectionController::positionForPlatform): (WebCore::SelectionController::startForPlatform): (WebCore::SelectionController::endForPlatform): (WebCore::SelectionController::modifyExtendingRight): (WebCore::SelectionController::modifyExtendingForward): (WebCore::SelectionController::modifyMovingForward): (WebCore::SelectionController::modifyExtendingBackward): (WebCore::SelectionController::modifyMovingBackward): * editing/SelectionController.h: 2010-02-18 Timothy Hatcher Add "with" to the list of keywords to syntax highlight. http://webkit.org/b/35123 Reviewed by Pavel Feldman. * inspector/front-end/SourceJavaScriptTokenizer.js: (WebInspector.SourceJavaScriptTokenizer): Add "width" to _keywords. * inspector/front-end/SourceJavaScriptTokenizer.re2js: (WebInspector.SourceJavaScriptTokenizer): Ditto. 2010-02-17 Peter Kasting Reviewed by Adam Barth. Rework PNG-in-ICO decoding to copy the decoded framebuffer into the ICO decoder, making the logic less crazy and more like the other decoders. https://bugs.webkit.org/show_bug.cgi?id=28751 * platform/image-decoders/ImageDecoder.cpp: (WebCore::RGBA32Buffer::operator=): * platform/image-decoders/ImageDecoder.h: (WebCore::RGBA32Buffer::RGBA32Buffer): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::frameBufferAtIndex): (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/ico/ICOImageDecoder.h: * platform/image-decoders/qt/RGBA32BufferQt.cpp: (WebCore::RGBA32Buffer::operator=): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::RGBA32Buffer::operator=): 2010-02-18 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: multiple popovers on screen at the same time. https://bugs.webkit.org/show_bug.cgi?id=35105 * inspector/front-end/Popover.js: (WebInspector.Popover.prototype.show): (WebInspector.Popover.prototype.hide): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup): 2010-02-18 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Expand Object.__proto__ properly. https://bugs.webkit.org/show_bug.cgi?id=35113 * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): * inspector/front-end/ObjectProxy.js: (WebInspector.ObjectProxy): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.callback): * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): 2010-02-18 Nate Chapin Reviewed by Adam Barth. [V8] Merge the DOMWindow and WorkerContext object wrapping code paths, and use a faster method of disambiguating between the types of contexts. https://bugs.webkit.org/show_bug.cgi?id=35009 * bindings/scripts/CodeGeneratorV8.pm: Remove logic determining whether we need to handle the WorkerContext case. * bindings/v8/V8DOMWrapper.cpp: (WebCore::globalObjectPrototypeIsDOMWindow): (WebCore::V8DOMWrapper::instantiateV8Object): Merge instantiateV8Object paths. * bindings/v8/V8DOMWrapper.h: 2010-02-12 Brett Wilson Reviewed by Adam Barth. Update the Google-URL version of KURL and the V8 bindings to the new behavior of KURL.IsStandard. https://bugs.webkit.org/show_bug.cgi?id=34859 This is covered by fast/dom/Window/invalid-protocol.html * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::protocolAccessorSetter): * platform/KURLGoogle.cpp: (WebCore::KURL::setProtocol): (WebCore::KURL::isHierarchical): 2010-02-18 Xan Lopez Reviewed by Gustavo Noronha. Remove some duplication between PluginView and Widget methods, and move the setSelfVisible calls to the parent class. * platform/gtk/WidgetGtk.cpp: (WebCore::Widget::show): (WebCore::Widget::hide): * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::setFocus): (WebCore::PluginView::show): (WebCore::PluginView::hide): 2010-02-18 Simon Fraser Reviewed by Darin Adler. Switch Leopard back to using CGShading to avoid CGGradient leaks Define USE_CG_SHADING on for Tiger and Leopard, and use it to toggle the methods used for Core Graphics gradient drawing. * platform/graphics/Gradient.h: * platform/graphics/cg/GradientCG.cpp: (WebCore::Gradient::platformDestroy): (WebCore::Gradient::paint): 2010-02-18 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: on-hover evaluation renders nodes and arrays as strings. https://bugs.webkit.org/show_bug.cgi?id=35103 * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): 2010-02-18 Brady Eidson Reviewed by Sam Weinig. Particularly constructed WebFrames can try to access a null HistoryItem and https://bugs.webkit.org/show_bug.cgi?id=35063 Test: fast/loader/api-test-new-window-data-load-base-url.html * loader/HistoryController.cpp: (WebCore::HistoryController::updateBackForwardListForFragmentScroll): We have a known case where a fragment scroll might take place with a null m_currentItem. updateBackForwardListClippedAtTarget() will either move m_currentItem to m_previousItem then create a new m_currentItem... or it will do nothing. So we either have both an m_currentItem and m_previousItem, or we have neither. In the case where we have no m_previousItem, return early. 2010-02-18 Nate Chapin Reviewed by Eric Seidel. [V8] Correctly handle the case where the event field on the global object is a v8::Object, but not a DOM wrapper. https://bugs.webkit.org/show_bug.cgi?id=34899 Test: fast/dom/Window/window-event-override-no-crash.html * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::isValidDOMObject): (WebCore::V8DOMWrapper::isWrapperOfType): * bindings/v8/V8DOMWrapper.h: 2010-02-18 Pavel Feldman Not reviewed, Qt build fix. * inspector/front-end/WebKit.qrc: 2010-02-18 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Implement evaluate-on-hover for scripts panel. https://bugs.webkit.org/show_bug.cgi?id=35003 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/Images/gearButtonGlyph.png: Added. * inspector/front-end/Images/popoverArrows.png: Added. * inspector/front-end/Images/popoverBackground.png: Added. * inspector/front-end/Images/thumbActiveHoriz.png: Added. * inspector/front-end/Images/thumbActiveVert.png: Added. * inspector/front-end/Images/thumbHoriz.png: Added. * inspector/front-end/Images/thumbHoverHoriz.png: Added. * inspector/front-end/Images/thumbHoverVert.png: Added. * inspector/front-end/Images/thumbVert.png: Added. * inspector/front-end/Images/trackHoriz.png: Added. * inspector/front-end/Images/trackVert.png: Added. * inspector/front-end/Popup.js: (WebInspector.Popup): (WebInspector.Popup.prototype.show): (WebInspector.Popup.prototype.hide): (WebInspector.Popup.prototype._positionElement): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._createViewerIfNeeded): (WebInspector.SourceFrame.prototype._scroll): (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._mouseUp): (WebInspector.SourceFrame.prototype._mouseMove): (WebInspector.SourceFrame.prototype._mouseOut): (WebInspector.SourceFrame.prototype._resetHoverTimer): (WebInspector.SourceFrame.prototype._hidePopup): (WebInspector.SourceFrame.prototype._mouseHover): (WebInspector.SourceFrame.prototype._showPopup.showTextPopup): (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup): (WebInspector.SourceFrame.prototype._showPopup.evaluateCallback): (WebInspector.SourceFrame.prototype._showPopup): (WebInspector.HoverPropertiesSection): (WebInspector.HoverPropertiesSection.prototype.update): * inspector/front-end/TextEditorHighlighter.js: (WebInspector.TextEditorHighlighter): (WebInspector.TextEditorHighlighter.prototype._lex): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._paintLine): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: * inspector/front-end/inspectorSyntaxHighlight.css: * inspector/front-end/popover.css: Added. 2010-02-18 Ben Murdoch Reviewed by Jeremy Orlow. [v8] Complete upstreaming of V8 Touch Event bindings https://bugs.webkit.org/show_bug.cgi?id=35094 No new tests required. * bindings/v8/V8Index.cpp: Add generated touch event headers. 2010-02-18 Steve Block Reviewed by Jeremy Orlow. Updates Android V8 build to use DerivedSourcesAllInOne.cpp https://bugs.webkit.org/show_bug.cgi?id=35083 No new tests, build fix only. * Android.derived.v8bindings.mk: * Android.v8bindings.mk: 2010-02-18 Gustavo Noronha Silva Reviewed by Xan Lopez. fast/frames/iframe-reparenting.html crashing on GTK Debug bots https://bugs.webkit.org/show_bug.cgi?id=35081 Check that the client is alive after every call to it, since any of them could cause the load to be cancelled, and the client to go away. This is much better than protecting a specific subclass of ResourceHandleClient (ResourceLoader), which makes us fail when any other client is used. Test: fast/frames/iframe-reparenting.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): 2010-02-18 Ben Murdoch Reviewed by Nate Chapin. [v8] [Android] V8 bindings for touch events are missing. https://bugs.webkit.org/show_bug.cgi?id=33795 No new tests as this just enables touch events in V8. Existing touch tests suffice. * WebCore.gypi: Add Touch idl files. * bindings/scripts/CodeGeneratorV8.pm: Add TouchList to typeCanFailConversion map. * bindings/v8/DOMObjectsInclude.h: Add touch headers. * bindings/v8/DerivedSourcesAllInOne.cpp: Add touch generated bindings. * bindings/v8/V8Index.h: Add touch DOM object types. * bindings/v8/custom/V8EventCustom.cpp: Add conversion of event to touch event. * Android.derived.jscbindings.mk: Add the touch derived sources to the makefile. * Android.derived.v8bindings.mk: Add the touch derived sources to the makefile. 2010-02-18 William Chan Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=35071 Disable loader limiting of requests per host for the chromium port. No tests because we're only changing a constant. * platform/network/chromium/ResourceRequest.cpp: (WebCore::initializeMaximumHTTPConnectionCountPerHost): 2010-02-18 Xan Lopez Reviewed by Eric Seidel. [Linux] Webkit incompatible with Java plugins https://bugs.webkit.org/show_bug.cgi?id=24912 The NP Version supported by WebKit is at the moment hardcoded in PluginPackage.cpp (to 24), but not all backends actually implement the methods needed to claim this. Introduce a new method to be implemented by each backend where the maximum supported version can be specified, and set the GTK+ port NPVersion to 19. This fixes an instantaneous crasher in the Sun Java NPAPI plugin. * plugins/PluginPackage.cpp: (WebCore::PluginPackage::initializeBrowserFuncs): * plugins/PluginPackage.h: * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::NPVersion): * plugins/mac/PluginPackageMac.cpp: (WebCore::PluginPackage::NPVersion): * plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::NPVersion): * plugins/symbian/PluginPackageSymbian.cpp: (WebCore::PluginPackage::NPVersion): * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::NPVersion): 2010-02-17 Dmitry Titov Reviewed by David Levin, Darin Fisher, Simon Hausmann. When a live iframe element is moved between pages, it still depends on the old page. https://bugs.webkit.org/show_bug.cgi?id=34382 Test: fast/frames/iframe-reparenting-new-page.html * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setName): Move the code setting the frame name into a separate function. (WebCore::HTMLFrameElementBase::setNameAndOpenURL): (WebCore::HTMLFrameElementBase::updateOnReparenting): Called on the frame that was just re-parented and inserted into another Document. Simply invoke Frame::transferChildFrameToNewDocument(...); (WebCore::HTMLFrameElementBase::insertedIntoDocument): * html/HTMLFrameElementBase.h: * html/HTMLFrameOwnerElement.h: (WebCore::HTMLFrameOwnerElement::setName): Make this a virtual function, to be able to reach it via Frame::m_ownerElement. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::adoptFrame): * loader/FrameLoaderClient.h: Add a new method, didTransferChildFrameToNewDocument(). It compliments createFrame() in that a frame which was re-parented in DOM and potentially changes Page, should notify the WebKit implementation about potential ownership change. Many embedders assume that Page owns all the Frames, or at least all Frames are destroyed before 'their' Page is destroyed. Obviously, if Frame can be transferred to another Page, the embedders should be notified. * page/Frame.cpp: (WebCore::Frame::transferChildFrameToNewDocument): Added, makes actual adjustments for Frame - resets the Page, updates the frame tree and frame name, calls to FrameLoaderClient to update external objects and recurses into children. Can only be used on child frames. * page/Frame.h: 2010-02-17 Tony Chang Reviewed by Eric Seidel. Copying and pasting into a contenteditable area can create
s surrounded by s https://bugs.webkit.org/show_bug.cgi?id=26937 This happens because of a span added when we copy that is used to preserve styles. To avoid this, when we paste, make sure to apply the styles to the span's children and then remove the style span. This change is covered by existing layout tests. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::handleStyleSpans): (WebCore::ReplaceSelectionCommand::copyStyleToChildren): * editing/ReplaceSelectionCommand.h: 2010-02-17 Tony Chang Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=34914 When pasting absolute font sizes into a content editable area with page zoom, adjust the font sizes to be the same after page zoom is applied. Test: editing/pasteboard/page-zoom.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance): 2010-02-17 Tony Chang Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=34737 Copying styled list items then pasting into a list should work the same as copying unstyle list items: it shouldn't indent an extra level, but styles should be copied. Small cleanups to insertAsListItems to make variable names more descriptive. Test: editing/pasteboard/paste-list-003.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::insertAsListItems): 2010-02-17 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Port PlatformKeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=34794 Retrieve the type, key code, text and modifiers from BREW's keyboard event. * platform/PlatformKeyboardEvent.h: * platform/brew/PlatformKeyboardEventBrew.cpp: Added. (WebCore::keyIdentifierForBrewKeyCode): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::singleCharacterString): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): (WebCore::PlatformKeyboardEvent::currentCapsLockState): 2010-02-17 Hayato Ito Reviewed by Eric Seidel. Support CSS page-break-inside with a value of 'avoid'. https://bugs.webkit.org/show_bug.cgi?id=34080 Test: printing/page-break-inside.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): 2010-02-17 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. WebSocket bufferedAmount should not be 0 when send after close. https://bugs.webkit.org/show_bug.cgi?id=34633 Fixed bug in webkit r54694. check m_client after it calls user callback, because user callback may call close(), which would call onclose event handler. Test: websocket/tests/bufferedAmount-after-close.html * websockets/ThreadableWebSocketChannelClientWrapper.h: (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): * websockets/WebSocket.cpp: (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::send): (WebCore::WebSocket::close): (WebCore::WebSocket::bufferedAmount): (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::send): (WebCore::WebSocketChannel::bufferedAmount): (WebCore::WebSocketChannel::didClose): (WebCore::WebSocketChannel::didReceiveData): * websockets/WebSocketChannel.h: * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didClose): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: 2010-02-17 Yuzo Fujishima Reviewed by Eric Seidel. In diffing render styles, consider all pseudo style changes. Without this patch, only :before and :after are considered. This is the cause of the following bug. https://bugs.webkit.org/show_bug.cgi?id=32187 Test: fast/css/first-letter-first-line-hover.html * dom/Node.cpp: (WebCore::Node::diff): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::hasAnyPublicPseudoStyles): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: (WebCore::): 2010-02-17 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Add WebCore::prefetchDNS https://bugs.webkit.org/show_bug.cgi?id=34873 DNS prefetching is not implemented because the maximum number of UDP sockets is quite small in most BREW devices. * platform/network/brew/DNSBrew.cpp: Added. (WebCore::prefetchDNS): 2010-02-17 Kent Tamura Reviewed by Eric Seidel. Introduces new Icon loading interface in order to support asynchronous loading. https://bugs.webkit.org/show_bug.cgi?id=32054 It's hard for Chromium port to load an icon inside Icon::createIconForFiles() because of sanbox and multi-process architecture. So this change adds a method to request an icon to Chrome class, and makes FileChooser receives an Icon instance asynchronously. Synchronous loading also works with the new interface. Because all ports don't have implementations of Chrome::iconForFiles() yet, FileChooser tries to load an Icon synchronously with Icon::createIconForFiles(), then tries to load an Icon asynchronously with Chrome::iconForFiles() if Icon::createIconForFiles() returns 0. The existing Icon::createIconForFiles() implementations should be moved to Chrome::iconForFiles(). We're going to remove Icon::createIconForFiles(). * loader/EmptyClients.h: (WebCore::EmptyChromeClient::iconForFiles): Add an empty implementation. * page/Chrome.cpp: (WebCore::Chrome::iconForFiles): Delegate to ChromeClient::iconForFiles(). * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::iconForFiles): Add a declaration as a pure virtual method. * platform/FileChooser.cpp: (WebCore::FileChooser::FileChooser): Use loadIcon(). (WebCore::FileChooser::chooseFiles): ditto. (WebCore::FileChooser::loadIcon): Added. (WebCore::FileChooser::iconLoaded): Added. * platform/FileChooser.h: Add two methods to FileChooserClient; repaint() and iconForFiles(). * platform/graphics/Icon.h: Add a FIXME comment. * platform/graphics/gtk/IconGtk.cpp: ditto. * platform/graphics/mac/IconMac.mm: ditto. * platform/graphics/qt/IconQt.cpp: ditto. * platform/graphics/win/IconWin.cpp: ditto. * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::iconForFiles): Delegate to Chrome::iconForFiles(). (WebCore::RenderFileUploadControl::click): Use chrome(). (WebCore::RenderFileUploadControl::chrome): * rendering/RenderFileUploadControl.h: (WebCore::RenderFileUploadControl::repaint): 2010-02-17 Mark Rowe Reviewed by Darin Adler. Bug 35065: Delay between page loading and animated GIF playing / BitmapImage::startAnimation was adding the current frame duration to the desired start time of the frame for every time it was called. If the function then bailed out due to not having sufficient data to render the frame, this would lead to the desired start time of the frame being pushed out multiple times. On an animated GIF that took mulitple seconds to load this could happen many times for a single frame, resulting in the start time of the second frame of the animation being pushed out by as much as five seconds. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::startAnimation): Change the order of the code slightly so that the desired start time is only updated after determining that we have sufficient data to handle the next frame. 2010-02-17 Stephan Aßmus Reviewed by Eric Seidel. Implemented homeDirectoryPath() and listDirectory() on the Haiku platform. https://bugs.webkit.org/show_bug.cgi?id=34687 Covered by existing tests. * platform/haiku/FileSystemHaiku.cpp: (WebCore::homeDirectoryPath): Implemented (WebCore::listDirectory): Implemented 2010-02-17 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Port userIdleTime https://bugs.webkit.org/show_bug.cgi?id=34259 Return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed. * platform/brew/SystemTimeBrew.cpp: Added. (WebCore::userIdleTime): 2010-02-17 Dirk Schulze Rolling out r54909. Breaks SL and Win. 2010-02-17 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Fix Chromium's bindings for Database.transaction(): a 'null' callback should be treated as no callback. Test: storage/null-callbacks.html https://bugs.webkit.org/show_bug.cgi?id=35047 * bindings/v8/custom/V8DatabaseCustom.cpp: (WebCore::createTransaction): 2010-02-17 Dirk Schulze Reviewed by Nikolas Zimmermann. Move SVGResources to Renderers, starting with Masker https://bugs.webkit.org/show_bug.cgi?id=35020 We have rendering specific code in WebCore/svg/graphics. The goal is to move this code into suitable Renderers. This helps us to clean up the code and makes maintenance easier. It also makes it possible to remove rendering specific code from SVG*Elements into this renderers. So the Renderer contains everything that is needed to use the resource. RenderSVGResource will be the base class for all new resource render classes like RenderSVGResourceMasker, RenderSVGResourceClipper and the other resources. This patch starts moving SVGResourceMasker to RenderSVGResourceMasker. Another benefit is the much more useful result in DRT on using masker. * Android.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderObject.cpp: (WebCore::RenderObject::toRenderSVGResource): Conversion to RenderSVGResource base class. * rendering/RenderObject.h: (WebCore::RenderObject::isSVGResource): Check if renderer is a resource. * rendering/RenderPath.cpp: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGImage.h: Some code clean up according to the webkit style. (WebCore::RenderSVGImage::toSVGRenderBase): (WebCore::RenderSVGImage::renderName): (WebCore::RenderSVGImage::isSVGImage): (WebCore::RenderSVGImage::localToParentTransform): (WebCore::RenderSVGImage::strokeBoundingBox): (WebCore::RenderSVGImage::requiresLayer): (WebCore::RenderSVGImage::localTransform): * rendering/RenderSVGInlineText.h: (WebCore::RenderSVGInlineText::objectBoundingBox): Needed for SVGRenderTreeAsText * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGModelObject.h: * rendering/RenderSVGResource.h: Added. (WebCore::): Base class for all Resource renderers like masker, clipper and others. (WebCore::RenderSVGResource::RenderSVGResource): (WebCore::RenderSVGResource::cast): (WebCore::RenderSVGResource::toRenderSVGResource): (WebCore::RenderSVGResource::isSVGResource): (WebCore::RenderSVGResource::drawsContents): (WebCore::getRenderSVGResourceById): * rendering/RenderSVGResourceMasker.cpp: Added. (WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker): (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): (WebCore::RenderSVGResourceMasker::invalidateClients): Status of masker changed, remove all clients. (WebCore::RenderSVGResourceMasker::invalidateClient): Status of an object changed, remove pending client. (WebCore::RenderSVGResourceMasker::applyResource): Apply masker to object. (WebCore::RenderSVGResourceMasker::resourceBoundingBox): boundingBox of the resource, depending on the object. (WebCore::RenderSVGResourceMasker::createMaskImage): Creates the mask image, the context gets clipped with. * rendering/RenderSVGResourceMasker.h: Added. (WebCore::MaskerData::MaskerData): (WebCore::RenderSVGResourceMasker::renderName): (WebCore::RenderSVGResourceMasker::maskUnits): Unit of mask for DRT. (WebCore::RenderSVGResourceMasker::maskContentUnits): Unit of childs from mask for DRT. (WebCore::RenderSVGResourceMasker::resourceType): * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::destroy): Renderer gets destroyed, unregister it from it's resources. * rendering/RenderSVGRoot.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::destroy): dito. * rendering/RenderSVGText.h: * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): (WebCore::SVGRenderBase::maskerBoundingBoxForRenderer): (WebCore::SVGRenderBase::deregisterFromResources): Unregister object from all it's resources after status changed. * rendering/SVGRenderSupport.h: (WebCore::SVGRenderBase::toSVGRenderBase): (WebCore::SVGRenderBase::strokeBoundingBox): (WebCore::SVGRenderBase::markerBoundingBox): * rendering/SVGRenderTreeAsText.cpp: Update TreeAsText to dump maskers correctly. (WebCore::operator<<): (WebCore::writeSVGResource): (WebCore::writeSVGContainer): (WebCore::writeSVGText): (WebCore::writeSVGInlineText): (WebCore::writeSVGImage): (WebCore::write): (WebCore::writeResourcesToObject): * rendering/SVGRenderTreeAsText.h: * svg/SVGMaskElement.cpp: Update Masker to use the new renderer. (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::childrenChanged): (WebCore::SVGMaskElement::maskBoundingBox): (WebCore::SVGMaskElement::createRenderer): * svg/SVGMaskElement.h: * svg/SVGStyledElement.cpp: We need to tell the renderer to unregister object, after the status changed. (WebCore::SVGStyledElement::invalidateResources): (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): * svg/SVGUnitTypes.h: Conversion of integer to SVGUnitType. (WebCore::toUnitType): * svg/graphics/SVGResource.h: (WebCore::): (WebCore::SVGResource::isMarker): * svg/graphics/SVGResourceMasker.cpp: Removed. * svg/graphics/SVGResourceMasker.h: Removed. 2010-02-17 Kenneth Russell Reviewed by Oliver Hunt. Refactor texImage2D and texSubImage2D taking Image to use common code https://bugs.webkit.org/show_bug.cgi?id=34458 Merged the Safari and Chromium code which extracts the data from Image objects into common entry points on GraphicsContext3D. This immediately fixes the following three problems: - Chromium not implementing texSubImage2D taking Image. - Safari not obeying the flipY parameter to texImage2D or texSubImage2D taking Image. - Safari not obeying the premultipyAlpha parameter to texImage2D or texSubImage2D taking Image. Added new test verifying the behavior of texImage2D and texSubImage2D and the flipY parameter. The premultiplyAlpha parameter can not be tested yet as the implementation is not yet spec compliant. This will be fixed in a follow-on bug. Ran all WebGL demos in demo repository on Safari and Chromium; textures are now the right way up in both browsers, and transparent textures in Particles demo now look correct in Safari. Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext3D.cpp: Added. (WebCore::GraphicsContext3D::extractImageData): (WebCore::GraphicsContext3D::processImageData): (WebCore::GraphicsContext3D::premultiplyAlpha): (WebCore::GraphicsContext3D::unmultiplyAlpha): * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): * platform/graphics/cg/GraphicsContext3DCG.cpp: Added. (WebCore::GraphicsContext3D::getImageData): * platform/graphics/mac/GraphicsContext3DMac.cpp: (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): * platform/graphics/skia/GraphicsContext3DSkia.cpp: Added. (WebCore::GraphicsContext3D::getImageData): 2010-02-17 Noam Rosenthal Reviewed by Ariya Hidayat. [Qt] GraphicsLayer: support perspective and 3D transforms https://bugs.webkit.org/show_bug.cgi?id=34960 New tests: http://webkit.org/blog-files/3d-transforms/perspective-by-example.html * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::updateTransform): (WebCore::GraphicsLayerQtImpl::setBaseTransform): (WebCore::GraphicsLayerQtImpl::computeTransform): (WebCore::GraphicsLayerQtImpl::flushChanges): (WebCore::TransformAnimationQt::~TransformAnimationQt): 2010-02-17 Peter Kasting Unreviewed, build fix. Fix crashes due to an omitted line in r54839. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::decodingFailed): 2010-02-17 Alok Priyadarshi Reviewed by Ariya Hidayat. Bug 34900: Implement accelerated compositing for chromium. https://bugs.webkit.org/show_bug.cgi?id=34900 Do not exclude files needed for accelerated compositing. In fact there is no need to exclude these files. These files are already guarded with WTF_USE_ACCELERATED_COMPOSITING flag. * WebCore.gyp/WebCore.gyp: Removed GraphicsLayer.cpp, RenderLayerBacking.cpp, and RenderLayerCompositor.cpp from excluded list. 2010-02-17 Jian Li Reviewed by Darin Fisher. [chromium] Remove the obsolete chromium interface for handling DownloadURL. https://bugs.webkit.org/show_bug.cgi?id=34982 * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::clear): (WebCore::ChromiumDataObject::hasData): (WebCore::ChromiumDataObject::ChromiumDataObject): * platform/chromium/ChromiumDataObject.h: * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::setData): 2010-02-17 Dan Bernstein Reviewed by Darin Adler. REGRESSION (r51324): Incorrect marker rects for blocks that span multiple columns * manual-tests/match-marker-rects.html: Added. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintTextMatchMarker): Use the text renderer rather than its ancestor block for the local-to-absolute transformation. (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto. 2010-02-17 Gustavo Noronha Silva Reviewed by Xan Lopez. Does not send an Accept header for subresources, causing some sites to break https://bugs.webkit.org/show_bug.cgi?id=33242 Set */* as the Accept header when downloading resources that did not set an Accept header. This behaviour is similar to the one adopted by Chromium. Test: http/tests/misc/image-checks-for-accept.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::startHttp): 2010-02-17 Marcus Bulach Reviewed by Jeremy Orlow. Fixes initialization order of members for GeolocationServiceChromium. https://bugs.webkit.org/show_bug.cgi?id=35034 * platform/chromium/GeolocationServiceChromium.cpp: 2010-02-17 Xan Lopez Reviewed by Gustavo Noronha. [Linux] Webkit incompatible with Java plugins https://bugs.webkit.org/show_bug.cgi?id=24912 Resolve symlinks before trying to load plugins as modules, since GModule won't do it. Based on original work by Gustavo Noronha. * plugins/gtk/PluginPackageGtk.cpp: (WebCore::PluginPackage::load): 2010-02-17 Gustavo Noronha Silva Reviewed by Xan Lopez. Protect the resource loader object from disappearing during parseDataUrl. Tested by testdownload API test. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): 2010-02-17 Marcus Bulach Reviewed by Jeremy Orlow. Implements GeolocationServices for Chromium. https://bugs.webkit.org/show_bug.cgi?id=32068 This is part of implementing Geolocation framework for Chromium. Existing layout tests should pass. * WebCore.gypi: * page/Geolocation.h: * platform/GeolocationService.h: 2010-02-17 Steve Block Reviewed by Ariya Hidayat. Adds missing platform and feature guards to V8 bindings https://bugs.webkit.org/show_bug.cgi?id=34987 No new tests, build fix only. * bindings/v8/V8Proxy.cpp: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge * bindings/v8/V8Proxy.h: Modified. Adds CHROMIUM guards and uses PlatformBridge in place of ChromiumBridge * bindings/v8/custom/V8DocumentCustom.cpp: Modified. Adds XPATH guards 2010-02-17 Steve Block Reviewed by Ariya Hidayat. Include WebCore's npruntime.h for Android in V8 bindings https://bugs.webkit.org/show_bug.cgi?id=35002 Currently, the V8 bindings include bindings/npruntime.h, which is a Chromium-specific file outside of the WebKit tree. No new tests, build fix only. * bindings/v8/NPV8Object.cpp: * bindings/v8/NPV8Object.h: * bindings/v8/V8NPObject.h: * bindings/v8/V8NPUtils.h: * bindings/v8/npruntime_impl.h: * bindings/v8/npruntime_priv.h: 2010-01-07 Philippe Normand Reviewed by Gustavo Noronha Silva. [GStreamer] Should handle BUFFERING messages https://bugs.webkit.org/show_bug.cgi?id=30004 Initial support for on-disk buffering of videos. This works only for Quicktime and flv though. * css/mediaControlsGtk.css: * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintMediaSliderTrack): Draw the buffering status in the media controls. * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::mediaPlayerPrivateMessageCallback): Defer buffering messages handling to processBufferingStats(). (WebCore::bufferingTimeoutCallback): Closure called periodically during the on-disk buffering process. (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): New instance variables and create playbin2 here instead of doing it in load(). (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): New instance variables. (WebCore::MediaPlayerPrivate::load): Simply set uri on playbin2 instead of creating the pipeline and setting uri all together. (WebCore::MediaPlayerPrivate::processBufferingStats): Start a new timeout source if the player is starting on-disk buffering. (WebCore::MediaPlayerPrivate::queryBufferingStats): Method called 200ms during on-disk buffering to update the maxTimeLoaded and few other private variables. (WebCore::MediaPlayerPrivate::maxTimeSeekable): (WebCore::MediaPlayerPrivate::maxTimeLoaded): (WebCore::MediaPlayerPrivate::bytesLoaded): Fixed implementations regarding buffering. (WebCore::MediaPlayerPrivate::totalBytes): Improved logging. (WebCore::MediaPlayerPrivate::updateStates): Start playback if it was internally paused at beginning of on-disk buffering and set ready/network states depending on the state of the on-disk buffering process. (WebCore::MediaPlayerPrivate::didEnd): Emit durationChanged. (WebCore::MediaPlayerPrivate::setAutobuffer): Edit playbin2 flags property depending on autoBuffer value. (WebCore::MediaPlayerPrivate::createGSTPlayBin): Don't set uri there, it is now done in load(). * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: New methods and instance variables. 2010-02-16 Chris Evans Reviewed by Adam Barth. Add a new setting which gives the option of assigning every file:/// to its own unique domain. https://bugs.webkit.org/show_bug.cgi?id=34778 Test: Pending in forthcoming separate change due to non-trivial dependencies. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Place file:/// URI documents into their own unique domains if the new setting requires it. * page/Settings.h: * page/Settings.cpp: (WebCore::Settings::setAllowFileAccessFromFileURLs): Simple setter. * page/SecurityOrigin.h: * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::makeUnique): Add simple ability to force an origin to be considered unique. 2010-02-16 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: drosera/demo.js not syntax highlighted correctly. https://bugs.webkit.org/show_bug.cgi?id=35008 * inspector/front-end/SourceTokenizer.js: (WebInspector.SourceTokenizer.Registry): (WebInspector.SourceTokenizer.Registry.prototype.getTokenizer): 2010-02-16 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: prefer smooth scrolling to instant highlight. https://bugs.webkit.org/show_bug.cgi?id=34978 * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): (WebInspector.TextViewer.prototype._scroll): (WebInspector.TextChunk): (WebInspector.TextChunk.prototype._createRow): * inspector/front-end/textViewer.css: 2010-02-16 Yael Aharon Reviewed by Nikolas Zimmermann. SVG not rendered as background-image from data URI https://bugs.webkit.org/show_bug.cgi?id=33630 When the background image is an SVG image, and it is smaller than the area it is supposed to fill, we were using renderSubTreeToImage to draw it. That call was not going through all the drawing phases, and so the SVG itself would not be drawn. Test: svg/css/background-image-svg.html * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): 2010-02-16 Bryan Yeung Reviewed by Nikolas Zimmermann. Remove the bounds on stroke width and miter for the skia platform. https://bugs.webkit.org/show_bug.cgi?id=34954 Test: svg/custom/stroke-width-large.svg * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::setupPaintForStroking): 2010-02-16 MORITA Hajime Reviewed by Nikolas Zimmermann. REGRESSION: SVG text disappaears after double click https://bugs.webkit.org/show_bug.cgi?id=34880 Tests: svg/text/selection-doubleclick.svg svg/text/selection-tripleclick.svg * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::mayHaveSelection): Use InlineTextBox::selectionStartEnd() instead of RenderObject::selectionStartEnd() because latter may span multiple comparing startPos and endPos is irrelevant in some cases. former selectionStartEnd() is for single line and comparing startPos and endPos will make sense. 2010-02-16 Jessie Berlin Reviewed by Timothy Hatcher. Inspector should display Array lengths in the property lists. https://bugs.webkit.org/show_bug.cgi?id=20695 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): For objects of type 'array' (which includes Arrays, NodeLists, and HTMLCollections), make the length of the object available via propertyLength on the proxy object. * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): For properties that have propertyLength defined, append it to the displayed description. 2010-02-16 Yusuke Sato Reviewed by Dimitri Glazkov. [Chromium] OpenType font with CFF glyphs is not handled correctly on Windows XP https://bugs.webkit.org/show_bug.cgi?id=34735 Use 0xFFFF as invalidGlyph when fontData is a OpenType font with CFF glyphs. Test: fast/css/font-face-opentype.html * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp: (WebCore::fillBMPGlyphs): 2010-02-16 Darin Adler * page/MediaCanStartListener.h: Fixed license. 2010-02-16 Darin Adler Reviewed by Sam Weinig. Generalize delayed plug-in start for background tabs for use for other media https://bugs.webkit.org/show_bug.cgi?id=34981 Also did some simple cleanup of HTMLMediaElement to get ready to make it a client of the same mechanism. * WebCore.base.exp: Added Page::setCanStartMedia and resorted. * WebCore.xcodeproj/project.pbxproj: Added MediaCanStartListener.h. * html/HTMLAudioElement.h: Added an implementation of isVideo since that is now a pure virtual function in HTMLMediaElement. Also made tagPriority private. * html/HTMLMediaElement.h: Made it clearer that HTMLMediaElement is an abstract base class by making its constructor protected and making the isVideo function a pure virtual function. * page/Page.cpp: (WebCore::Page::Page): Updated for name change from m_canStartPlugins to m_canStartMedia. (WebCore::Page::addMediaCanStartListener): Renamed and added an assertion. (WebCore::Page::removeUnstartedMedia): Ditto. (WebCore::Page::setCanStartMedia): Renamed plugin to media and moved the code here from PageWin.cpp. The main change from the one in PageWin.cpp is that this function calls mediaCanStart rather than explicitly calling a combination of start and dispatchDidFailToStartPlugin on a PluginView. * page/Page.h: Re-sorted forward class declarations. Renamed the plugin starting functions to media starting names and changed types from PluginView to MediaCanStartListener. * page/MediaCanStartListener.h: Added. * page/win/PageWin.cpp: Moved setCanStartPlugins to the platform-independent Page.cpp file so it can be used for more than just Windows plug-ins. * plugins/PluginView.cpp: Sorted includes. (WebCore::PluginView::startOrAddToUnstartedList): Use addMediaCanStartListener. (WebCore::PluginView::mediaCanStart): Added. Called when the page decides that media can start. Contains the code that used to be in Page::setCanStartPlugins. (WebCore::PluginView::removeFromUnstartedListIfNecessary): Use removeMediaCanStartListener. * plugins/PluginView.h: Adopted MediaCanStartListener. 2010-02-16 Simon Fraser Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=34999 Compositing layers inside overflow:scroll divs are not always updated on scrolling When RenderLayer::scrollToOffset() updates compositing layer positions, it needs to start updating at its stacking context rather than just its compositing ancestor. The stacking context is guaranteed to contain all descendants of the overflow layer, including those that are not direct descendants of the overflow layer in stacking (and therefore compositing) order. Test: compositing/overflow/scroll-ancestor-update.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): 2010-02-16 Dan Bernstein Reviewed by Simon Fraser. Allow FloatRect::center() to return fractional coordinates. It was mistakenly converting to integers. * platform/graphics/FloatRect.h: (WebCore::FloatRect::center): 2010-02-16 Gavin Barraclough Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=34964 Leaks tool reports false memory leaks due to Rope implementation. Renamed cUStringImpl::size() to UStringImpl::size()UStringImpl::length() (matches WebCore::StringImpl). * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::length): * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): (WebCore::AtomicString::find): 2010-02-15 Jon Honeycutt Message about missing plugin does not specify the type or download link for download Reviewed by Mark Rowe. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::findPlugin): Only update the mimeType out param if we find a plug-in for the file extension. 2010-02-16 Simon Fraser Build fix for Tiger. Add #if USE(ACCELERATED_COMPOSITING) around the call to mediaPlayerRenderingModeChanged(). * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::setUpVideoRendering): 2010-02-16 Csaba Osztrogonác Reviewed by Eric Carlson. Buildfix for r54826. HTMLMediaElement class defined by HTMLMediaElement.h in #if ENABLE(VIDEO) block, it should be in #if ENABLE(VIDEO) block in rendering/RenderLayerBacking.cpp too. * rendering/RenderLayerBacking.cpp: Missing #if ENABLE(VIDEO) guard added. (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): 2010-02-16 Julie Parent Unreviewed: Chromium build fix. http://trac.webkit.org/changeset/54823 introduced an unused variable. Remove it. * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageDecoder::create): 2010-02-16 Mark Rowe Reviewed by Alexey Proskuryakov. Bug 34974: Leak of ScheduledAction during layout tests ScheduledAction::create was returning a raw pointer which was threaded down through to an OwnPtr in DOMTimer. If any of the code paths in between hit an error case and returned early the raw pointer would be leaked. We can avoid this by passing it as a PassOwnPtr. This will ensure that the ScheduledAction is cleaned up should an error case be hit. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setTimeout): Store the newly-created ScheduledAction in an OwnPtr and then hand it off as the function argument. (WebCore::JSDOMWindow::setInterval): Ditto. * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::setTimeout): Ditto. (WebCore::JSWorkerContext::setInterval): Ditto. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): Return a PassOwnPtr. * bindings/js/ScheduledAction.h: * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): Update argument type. (WebCore::DOMTimer::install): Ditto. * page/DOMTimer.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::setTimeout): Ditto. (WebCore::DOMWindow::setInterval): Ditto. * page/DOMWindow.h: 2010-02-16 Nikolas Zimmermann Reviewed by David Hyatt. SVG units don't stay consistently sized on zoom https://bugs.webkit.org/show_bug.cgi?id=14004 Large step towards making WebKit an usable SVG viewer. Make zooming into SVG documents work as expected, in both standalone and XHTML/SVG compound documents. SVG applies a global scale to the document, whereas CSS zooms all individual length units (on full-page-zoom). Scaling has to be avoided for all SVG specific CSS properties (already works) and for some selected CSS properties shared between CSS & SVG that explicitely need a different treatment in the context of SVG. To name a few: font-size, letter-spacing, etc. should stay invariant under zoom in SVG document fragments. Some new rules regarding zooming: - "Zoom text only" should never affect SVG documents, neither text nor content should zoom. This option doesn't make much sense for SVG, so it's wise to avoid side-effects and disable it. In compound documents the SVG would stay as-is and only text of surrounding XHTML content would zoom. - "Full page zoom" is the only zoom mode affecting SVG. (Panning only works in standalone documents.) Cover all mentioned cases above by a new set of layout tests. Tests: svg/zoom/page/absolute-sized-document-no-scrollbars.svg svg/zoom/page/absolute-sized-document-scrollbars.svg svg/zoom/page/relative-sized-document-scrollbars.svg svg/zoom/page/zoom-coords-viewattr-01-b.svg svg/zoom/page/zoom-foreignObject.svg svg/zoom/page/zoom-hixie-mixed-008.xml svg/zoom/page/zoom-hixie-mixed-009.xml svg/zoom/page/zoom-hixie-rendering-model-004.xhtml svg/zoom/page/zoom-svg-float-border-padding.xml svg/zoom/text/absolute-sized-document-no-scrollbars.svg svg/zoom/text/absolute-sized-document-scrollbars.svg svg/zoom/text/relative-sized-document-scrollbars.svg svg/zoom/text/zoom-coords-viewattr-01-b.svg svg/zoom/text/zoom-foreignObject.svg svg/zoom/text/zoom-hixie-mixed-008.xml svg/zoom/text/zoom-hixie-mixed-009.xml svg/zoom/text/zoom-hixie-rendering-model-004.xhtml svg/zoom/text/zoom-svg-float-border-padding.xml * css/CSSStyleSelector.cpp: Blacklist certain properties not to be zoomed for SVG elements. (WebCore::CSSStyleSelector::styleForDocument): Don't zoom font-sizes. (WebCore::CSSStyleSelector::applyProperty): Ditto (+ letter/word-spacing). (WebCore::CSSStyleSelector::setFontSize): Ditto. (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Never apply text zoom to SVG. * css/CSSStyleSelector.h: * css/SVGCSSStyleSelector.cpp: -webkit-shadow + SVG was incorrectly respecting zoom factor. (WebCore::CSSStyleSelector::applySVGProperty): * page/Frame.cpp: (WebCore::Frame::shouldApplyTextZoom): Remove SVG special cases. (WebCore::Frame::shouldApplyPageZoom): Ditto. (WebCore::Frame::setZoomFactor): Don't force setZoomsTextOnly() - SVG now uses FPZ as well. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::calcReplacedWidth): CSSPropertyWidth is explicitely not scaled by CSSStyleSelector, fix that for outermost elements. (WebCore::RenderSVGRoot::calcReplacedHeight): Ditto for CSSPropertyHeight. (WebCore::RenderSVGRoot::layout): Simplify & cleanup code, take advantage of new calcWidth/Height functionality, no need to scale anything here. (WebCore::RenderSVGRoot::paint): Use parentOriginToBorderBox() instead of duplicating code. (WebCore::RenderSVGRoot::calcViewport): Simplify code. (WebCore::RenderSVGRoot::localToBorderBoxTransform): Calculate viewBoxToViewTransformation() against unscaled width()/height() values. * rendering/RenderSVGRoot.h: * svg/SVGLength.cpp: (WebCore::SVGLength::PercentageOfViewport): Cleanup & document function. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::currentScale): Return pageZoomFactor(), not just the zoomFactor() - as we want to ignore text-only zoom. (WebCore::SVGSVGElement::setCurrentScale): Pass isTextOnly=false to setZoomFactor(). 2010-02-16 Julie Parent Unreviewed: Chromium build fix. https://bugs.webkit.org/show_bug.cgi?id=34998 Move include of JavaScriptProfile.h behind if (USE_JSC). * inspector/InspectorController.cpp: 2010-02-16 Alexey Proskuryakov Reviewed by Geoffrey Garen and Kevin Decker. https://bugs.webkit.org/show_bug.cgi?id=34989 Cursor disappears on scroll bars that are over plugin content * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Added some comments about the way we pass events down to plug-ins. 2010-02-16 Simon Fraser Reviewed by Eric Carlson. With hardware acceleration turned off, video frames never display if poster image is specified https://bugs.webkit.org/show_bug.cgi?id=34965 HTMLVideoElement's m_shouldDisplayPosterImage was never updated after the movie supplied its first video frame, so the poster would continue to show. Fixed by calling updatePosterImage() from mediaPlayerRepaint(), which is called each time a new frame is available. updatePosterImage() is cheap. Also made updatePosterImage() virtual on HTMLMediaElement to avoid a number of ugly casts. Test: manual-tests/media-elements/video-replaces-poster.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::noneSupported): Call updatePosterImage() without video check. (WebCore::HTMLMediaElement::setNetworkState): Ditto. (WebCore::HTMLMediaElement::setReadyState): Ditto. (WebCore::HTMLMediaElement::mediaPlayerRepaint): Call udpatePosterImage(). * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::updatePosterImage): Make this an empty virtual method on the base class. * html/HTMLVideoElement.h: Override updatePosterImage(). 2010-02-16 Simon Fraser Build fix for platforms without ACCELERATED_COMPOSITING defined. mediaPlayerRenderingModeChanged() is only available when ACCELERATED_COMPOSITING is defined. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::setUpVideoRendering): 2010-02-16 Simon Fraser Reviewed by Eric Carlson. Autoplaying video with poster doesn't reliably show up https://bugs.webkit.org/show_bug.cgi?id=34966 A timing issue with compositing updates when replacing the poster image with the video could cause the video to not display. Fix by making video layer hook up more similar to WebGL etc, by having the video kick off a recalcStyle() via a SyntheticStyleChange. This requires vending a PlaformLayer* from the media player, up through the element. Test: media/video-replaces-poster.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged): Use setNeedsStyleRecalc() to kick off a compositing update. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::platformLayer): Export the media engine's layer. * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::platformLayer): Method to vend the media layer. (WebCore::MediaPlayer::platformLayer): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRenderingModeChanged): New client callback to indicate that the rendering mode changed. The element uses this to kick off a recalcStyle. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::platformLayer): Method to vend the media layer. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovieLayer): No longer parent the layer directly via setContentsToMedia(). (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged): Ditto. (WebCore::MediaPlayerPrivate::setUpVideoRendering): Tell the client that the rendering mode changed. (WebCore::MediaPlayerPrivate::platformLayer): Method to vend the media layer. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Call setContentsToMedia() here. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Add platformLayer(). * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::platformLayer): Method to vend the media layer. (WebCore::MediaPlayerPrivate::setUpVideoRendering): Call mediaPlayerRenderingModeChanged() (WebCore::MediaPlayerPrivate::createLayerForMovie): Don't parent the layer ourselves any more. * rendering/RenderVideo.h: videoGraphicsLayer() is no longer needed. * rendering/RenderVideo.cpp: Ditto. 2010-02-12 Peter Kasting Reviewed by Adam Barth. Code cleanup in ImageDecoders; no functional change. https://bugs.webkit.org/show_bug.cgi?id=28751 * Make code mostly comply with the style guide (switch indenting, use of "!" vs. "== 0", don't unnecessarily wrap lines, etc.) * Eliminate m_allDataReceived in ICO/BMP decoders since it's in the base ImageDecoder class * Remove some useless or wrong comments, add others * Wrap comments at 80 columns (most already were) for consistency/readability * Avoid casts by using correct variable types * Consistent naming of decode() function/args * Shorter code in some places * Make declaration and definition order match * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::frameCount): (WebCore::ImageDecoderQt::frameBufferAtIndex): (WebCore::ImageDecoderQt::forceLoadEverything): * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageDecoder::create): (WebCore::RGBA32Buffer::clear): (WebCore::RGBA32Buffer::setSize): * platform/image-decoders/ImageDecoder.h: (WebCore::RGBA32Buffer::): (WebCore::ImageDecoder::ImageDecoder): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::BMPImageDecoder): (WebCore::BMPImageDecoder::setData): (WebCore::BMPImageDecoder::isSizeAvailable): (WebCore::BMPImageDecoder::frameBufferAtIndex): (WebCore::BMPImageDecoder::decode): (WebCore::BMPImageDecoder::decodeHelper): (WebCore::BMPImageDecoder::processFileHeader): * platform/image-decoders/bmp/BMPImageDecoder.h: (WebCore::BMPImageDecoder::readUint32): * platform/image-decoders/bmp/BMPImageReader.cpp: (WebCore::BMPImageReader::BMPImageReader): (WebCore::BMPImageReader::decodeBMP): (WebCore::BMPImageReader::readInfoHeaderSize): (WebCore::BMPImageReader::processInfoHeader): (WebCore::BMPImageReader::readInfoHeader): (WebCore::BMPImageReader::isInfoHeaderValid): (WebCore::BMPImageReader::processBitmasks): (WebCore::BMPImageReader::processColorTable): (WebCore::BMPImageReader::processRLEData): (WebCore::BMPImageReader::processNonRLEData): * platform/image-decoders/bmp/BMPImageReader.h: (WebCore::BMPImageReader::readUint32): (WebCore::BMPImageReader::pastEndOfImage): (WebCore::BMPImageReader::readCurrentPixel): (WebCore::BMPImageReader::getComponent): (WebCore::BMPImageReader::getAlpha): (WebCore::BMPImageReader::setI): (WebCore::BMPImageReader::setRGBA): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::GIFImageDecoder): (WebCore::GIFImageDecoder::setData): (WebCore::GIFImageDecoder::isSizeAvailable): (WebCore::GIFImageDecoder::frameCount): (WebCore::GIFImageDecoder::frameBufferAtIndex): (WebCore::GIFImageDecoder::clearFrameBufferCache): (WebCore::GIFImageDecoder::sizeNowAvailable): (WebCore::GIFImageDecoder::haveDecodedRow): (WebCore::GIFImageDecoder::frameComplete): (WebCore::GIFImageDecoder::decode): (WebCore::GIFImageDecoder::initFrameBuffer): * platform/image-decoders/gif/GIFImageDecoder.h: (WebCore::GIFImageDecoder::): (WebCore::GIFImageDecoder::filenameExtension): * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::do_lzw): (GIFImageReader::read): * platform/image-decoders/gif/GIFImageReader.h: (GIFImageReader::~GIFImageReader): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::ICOImageDecoder): (WebCore::ICOImageDecoder::~ICOImageDecoder): (WebCore::ICOImageDecoder::setData): (WebCore::ICOImageDecoder::isSizeAvailable): (WebCore::ICOImageDecoder::frameSizeAtIndex): (WebCore::ICOImageDecoder::frameCount): (WebCore::ICOImageDecoder::frameBufferAtIndex): (WebCore::ICOImageDecoder::compareEntries): (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex): (WebCore::ICOImageDecoder::decode): (WebCore::ICOImageDecoder::decodeDirectory): (WebCore::ICOImageDecoder::decodeAtIndex): (WebCore::ICOImageDecoder::processDirectoryEntries): (WebCore::ICOImageDecoder::readDirectoryEntry): * platform/image-decoders/ico/ICOImageDecoder.h: (WebCore::ICOImageDecoder::readUint16): (WebCore::ICOImageDecoder::readUint32): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::): (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::skipBytes): (WebCore::JPEGImageReader::decode): (WebCore::error_exit): (WebCore::fill_input_buffer): (WebCore::term_source): (WebCore::JPEGImageDecoder::setData): (WebCore::JPEGImageDecoder::setSize): (WebCore::JPEGImageDecoder::frameBufferAtIndex): (WebCore::JPEGImageDecoder::jpegComplete): (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/jpeg/JPEGImageDecoder.h: (WebCore::JPEGImageDecoder::filenameExtension): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::decodingFailed): (WebCore::decodingWarning): (WebCore::headerAvailable): (WebCore::rowAvailable): (WebCore::pngComplete): (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::decode): (WebCore::PNGImageReader::createInterlaceBuffer): (WebCore::PNGImageDecoder::setData): (WebCore::PNGImageDecoder::frameBufferAtIndex): (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): (WebCore::PNGImageDecoder::pngComplete): (WebCore::PNGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.h: (WebCore::PNGImageDecoder::filenameExtension): * platform/image-decoders/qt/RGBA32BufferQt.cpp: (WebCore::RGBA32Buffer::setDecodedImage): 2010-02-16 Csaba Osztrogonác [Qt] Unreviewed buildfix. * WebCore.pro: Missing backslash added. 2010-02-16 Mikhail Naganov Reviewed by Pavel Feldman. Move JSC-specific wrappers for Profile and ProfileNode to bindings/js. https://bugs.webkit.org/show_bug.cgi?id=34848 * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JavaScriptProfile.cpp: Added. (WebCore::profileCache): (WebCore::getTitleCallback): (WebCore::getHeadCallback): (WebCore::getUniqueIdCallback): (WebCore::focus): (WebCore::exclude): (WebCore::restoreAll): (WebCore::finalize): (WebCore::ProfileClass): (WebCore::toJS): * bindings/js/JavaScriptProfile.h: Added. * bindings/js/JavaScriptProfileNode.cpp: Added. (WebCore::profileNodeCache): (WebCore::getFunctionName): (WebCore::getURL): (WebCore::getLineNumber): (WebCore::getTotalTime): (WebCore::getSelfTime): (WebCore::getNumberOfCalls): (WebCore::getChildren): (WebCore::getVisible): (WebCore::getCallUID): (WebCore::finalize): (WebCore::ProfileNodeClass): (WebCore::toJS): * bindings/js/JavaScriptProfileNode.h: Added. * inspector/JavaScriptProfile.cpp: Removed. * inspector/JavaScriptProfile.h: Removed. * inspector/JavaScriptProfileNode.cpp: Removed. * inspector/JavaScriptProfileNode.h: Removed. 2010-02-16 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Elements Panel: Limit the number of initially loaded element children https://bugs.webkit.org/show_bug.cgi?id=34421 Test: inspector/elements-panel-limited-children.html * English.lproj/localizedStrings.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype._insertChild): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateModifiedNodes): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor): (WebInspector.ElementsTreeOutline.prototype.revealAndSelectNode): (WebInspector.ElementsTreeElement): (WebInspector.ElementsTreeElement.prototype.get expandedChildrenLimit): (WebInspector.ElementsTreeElement.prototype.set expandedChildrenLimit): (WebInspector.ElementsTreeElement.prototype.get expandedChildCount): (WebInspector.ElementsTreeElement.prototype.showChild): (WebInspector.ElementsTreeElement.prototype.insertChildElement): (WebInspector.ElementsTreeElement.prototype.moveChild): (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): (WebInspector.ElementsTreeElement.prototype._updateChildren): (WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange): (WebInspector.ElementsTreeElement.prototype.handleLoadAllChildren): (): * inspector/front-end/inspector.css: 2010-02-16 Ismail Donmez Reviewed by Pavel Feldman. Fix compilation with inspector disabled. https://bugs.webkit.org/show_bug.cgi?id=32724 * rendering/RenderLayerBacking.cpp: (WebCore::inspectorTimelineAgent): 2010-02-16 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: turn off line wrapping in source view. https://bugs.webkit.org/show_bug.cgi?id=34935 * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.markAndRevealRange): (WebInspector.TextViewer.prototype._paintLine): * inspector/front-end/textViewer.css: * inspector/front-end/utilities.js: 2010-02-16 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: let search iterate over views in Resources and keep the view in Scripts. https://bugs.webkit.org/show_bug.cgi?id=34968 * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): (WebInspector.Panel.prototype.showSourceLineForURL): (WebInspector.Panel.prototype.searchIteratesOverViews): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.get _resources): (WebInspector.ResourcesPanel.prototype.searchIteratesOverViews): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.showingLastSearchResult): * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): (WebInspector.focusSearchField): 2010-02-16 Noam Rosenthal Reviewed by Ariya Hidayat. [Qt] canvas clipping is buggy https://bugs.webkit.org/show_bug.cgi?id=32405 Apparently the bug was in GraphicsContext::roundToDevicePixels, we didn't take unto accounts rotation, so the device pixels were rounded incorrectly. The new formula is a 1:1 copy from GraphicsContextCG so it should be rather safe Test: http://glimr.rubyforge.org/cake/canvas.html#Polaroids now looks right * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::roundToDevicePixels): Copy the formula from GraphicsContextCG 2010-02-16 Yury Semikhatsky Not Reviewed, build fix. * platform/graphics/FloatRect.h: (WebCore::FloatRect::center): make conversion from float to int explicit so that compiler doesn't complain about that. 2010-02-15 Dan Bernstein Reviewed by Simon Fraser. [webView selectionRect] API is broken for multicolumn layout Refine the fix for https://bugs.webkit.org/show_bug.cgi?id=34923 by using the center of a quad’s bounding box, rather than its top left, as the reference point passed to offsetFromContainer(). This ensures that if a sliver off the top of the selection rect is in one column, but most of it is on another column, the single rect we return will be for the second column. * platform/graphics/FloatRect.h: (WebCore::FloatRect::center): Added. * rendering/RenderObject.cpp: (WebCore::RenderObject::localToContainerQuad): Use the center instead of the top left. 2010-02-15 MORITA Hajime Reviewed by Nikolas Zimmermann. SVG text refactor: reduce paint specific callbacks on SVGTextChunkWalker https://bugs.webkit.org/show_bug.cgi?id=34831 No new tests, no change of functionality. * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGTextChunkWalker::SVGTextChunkWalker): Removed setupBackground(), setupFill(), setupFillSelection(), setupStroke(), setupStrokeSelection(), setupForeground() and associated member variables. * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::setupBackground): renamed from chunkSetupBackgroundCallback. (WebCore::SVGRootInlineBoxPaintWalker::setupFill): renamed from chunkSetupFillCallback. (WebCore::SVGRootInlineBoxPaintWalker::setupFillSelection): renamed from chunkSetupFillSelectionCallback. (WebCore::SVGRootInlineBoxPaintWalker::setupStroke): renamed from chunkSetupStrokeCallback. (WebCore::SVGRootInlineBoxPaintWalker::setupStrokeSelection): renamed from chunkSetupStrokeSelectionCallback. (WebCore::SVGRootInlineBoxPaintWalker::setupForeground): renamed from chunkSetupForegroundCallback. (WebCore::SVGRootInlineBoxPaintWalker::paintChunk): renamed from chunkPortionCallback. (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback): extracted from walkTextChunks. (WebCore::SVGRootInlineBox::paint): follow SVGTextChunkWalker change. (WebCore::SVGRootInlineBox::walkTextChunks): moved paint some specific code to SVGRootInlineBoxPaintWalker::chunkPortionCallback(). 2010-02-15 Dan Bernstein Try to fix the Chromium build. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::convertToPaintingRect): 2010-02-14 Gavin Barraclough Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=33731 Many false leaks in release builds due to PtrAndFlags PtrAndFlags has now been removed; remove forwarding header. * ForwardingHeaders/wtf/PtrAndFlags.h: Removed. 2010-02-15 Gavin Barraclough Reviewed by Geoff Garen. Bug 34952 - String lengths in UString should be unsigned. This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::atob): (WebCore::JSDOMWindow::btoa): 2010-02-15 Gustavo Noronha Silva Reviewed by Xan Lopez. [GTK] Crashes when going back to a page that has data: URIs, with page cache enabled https://bugs.webkit.org/show_bug.cgi?id=34944 Set the URL in the newly created response, when parsing data: URIs. Test: fast/harness/page-cache-crash-on-data-urls.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): 2010-02-15 Dan Bernstein Reviewed by Simon Fraser. Incorrect client rects for blocks the span multiple columns and their descendants https://bugs.webkit.org/show_bug.cgi?id=34923 Test: fast/multicol/client-rects.html In column layout, a different transform applies to different points in the block and its descendants, depending on their y coordinate within the block. offsetFromContainer() used to return the offset that applied to the origin. With this change, it returns the offset that applies to a given reference point. When mapping a quad from local to absolute coordinates, the top left of the quad’s bounding box is used as that reference point. * editing/SelectionController.cpp: (WebCore::SelectionController::layout): Pass the caret’s origin as the reference point to offsetFromContainer(). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForColumns): Adds the offset between the given point and its image under the column paint-time transform to the given offset. Used by offsetFromContainer() where it had previously used adjustRectForColumns(), which takes a rect and operates less efficiently. * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): Pass the transformed point as the reference point to offsetFromContainer(). (WebCore::RenderBox::mapAbsoluteToLocalPoint): Pass a point to offsetFromContainer(). (WebCore::RenderBox::offsetFromContainer): Use adjustForColumns() instead of adjustRectForColumns(), and use the reference point to get the right adjustment for the point of interest, instead of the origin, in case this box spans multiple columns. * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetFromContainer): Ditto. Actually apply the column offset to the computation, which previously this function didn’t do. (WebCore::RenderInline::mapLocalToContainer): Pass the transformed point as the reference point to offsetFromContainer(). (WebCore::RenderInline::mapAbsoluteToLocalPoint): Pass a point to offsetFromContainer(). * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Apply column adjustment, based on the reference point, to the transform if needed. (WebCore::RenderObject::localToContainerQuad): Initialize the TransformState with the top left corner of the quad’s bounding box. It is later used as the reference point when deciding on which column to base the calculations. (WebCore::RenderObject::offsetFromContainer): Adjust for columns. (WebCore::RenderObject::offsetFromAncestorContainer): Pass the origin as the reference point to offsetFromContainer(). * rendering/RenderObject.h: (WebCore::RenderObject::adjustForColumns): Added. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::offsetFromContainer): Pass the reference point through. * rendering/RenderTableCell.h: * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRectsForRange): Map (the origin of) each rect to absolute coordinates individually. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::convertToPaintingRect): Pass a point to offsetFromContainer(). 2010-02-12 Alexey Proskuryakov Reviewed by Kevin Decker. Browser objects identity is not preserved by Safari Test: plugins/netscape-browser-object-identity.html * bridge/runtime_root.h: (JSC::Bindings::RootObject::addInvalidationCallback): RootObject can now call out during invalidation, making it possible for other code to know when this happens. * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::InvalidationCallback::~InvalidationCallback): Empty destructor, in cpp file since it's virtual. (JSC::Bindings::RootObject::invalidate): Invoke invalidation callbacks. * bridge/NP_jsobject.cpp: (ObjectMap): Keep a JSObject->NPObject map for each RootObject. It somewhat cleaner to keep it outside RootObject, because (1) it is agnostic of what kinds of objects can wrap JSObject, and (2) out of process NPAPI implementation also keeps its corresponding map separately, due to supporting per-instance granularity (as opposed to per-RootObject here). (jsDeallocate): Remove the corresponding map entry. (_NPN_CreateScriptObject): Try to fetch existing object from the map, incrementing refcount. 2010-02-15 Philippe Normand Rubber-stamped by Gustavo Noronha Silva. Removed redefine of LOG_VERBOSE. This should not have commited in the first place. * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 2010-02-15 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: incorrect syntax highlighting as HTML in a script tag. We were preserving initial lexer state upon entering other tags while in